OSDN Git Service

refactoring.
authorikemo <ikemo@56b19765-1e22-0410-a548-a0f45d66c51a>
Thu, 7 Oct 2004 14:35:08 +0000 (14:35 +0000)
committerikemo <ikemo@56b19765-1e22-0410-a548-a0f45d66c51a>
Thu, 7 Oct 2004 14:35:08 +0000 (14:35 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/kita/kita/trunk@1419 56b19765-1e22-0410-a548-a0f45d66c51a

kita/src/libkita/kitaconfig.cpp

index 2bb7c39..2e63cf2 100644 (file)
@@ -127,6 +127,7 @@ void KitaConfig::readConfig( KConfig* config )
     KitaConfig::setUseStyleSheet( config->readBoolEntry( "UseStyleSheet", KitaConfig::defaultUseStyleSheet() ) );
 
     {
+        // MIME list
         QStringList mimeList = config->readListEntry( "PartMimeList" );
         if ( ! mimeList.isEmpty() ) {
             KitaConfig::setPartMimeList( mimeList );
@@ -137,32 +138,44 @@ void KitaConfig::readConfig( KConfig* config )
 
     config->setGroup( "Color" );
 
-    QColor threadColor = config->readColorEntry( "Thread" );
-    if ( threadColor.isValid() ) {
-        KitaConfig::setThreadColor( threadColor );
-    } else {
-        KitaConfig::setThreadColor( KitaConfig::defaultThreadColor() );
+    {
+        // Thread text color
+        QColor threadColor = config->readColorEntry( "Thread" );
+        if ( threadColor.isValid() ) {
+            KitaConfig::setThreadColor( threadColor );
+        } else {
+            KitaConfig::setThreadColor( KitaConfig::defaultThreadColor() );
+        }
     }
 
-    QColor threadBackgroundColor = config->readColorEntry( "ThreadBackground" );
-    if ( threadBackgroundColor.isValid() ) {
-        KitaConfig::setThreadBackgroundColor( threadBackgroundColor );
-    } else {
-        KitaConfig::setThreadBackgroundColor( KitaConfig::defaultThreadBackgroundColor() );
+    {
+        // Thread background color
+        QColor threadBackgroundColor = config->readColorEntry( "ThreadBackground" );
+        if ( threadBackgroundColor.isValid() ) {
+            KitaConfig::setThreadBackgroundColor( threadBackgroundColor );
+        } else {
+            KitaConfig::setThreadBackgroundColor( KitaConfig::defaultThreadBackgroundColor() );
+        }
     }
 
-    QColor popupColor = config->readColorEntry( "Popup" );
-    if ( popupColor.isValid() ) {
-        KitaConfig::setPopupColor( popupColor );
-    } else {
-        KitaConfig::setPopupColor( KitaConfig::defaultPopupColor() );
+    {
+        // Popup text color
+        QColor popupColor = config->readColorEntry( "Popup" );
+        if ( popupColor.isValid() ) {
+            KitaConfig::setPopupColor( popupColor );
+        } else {
+            KitaConfig::setPopupColor( KitaConfig::defaultPopupColor() );
+        }
     }
 
-    QColor popupBackgroundColor = config->readColorEntry( "PopupBackground" );
-    if ( popupBackgroundColor.isValid() ) {
-        KitaConfig::setPopupBackgroundColor( popupBackgroundColor );
-    } else {
-        KitaConfig::setPopupBackgroundColor( KitaConfig::defaultPopupBackgroundColor() );
+    {
+        // Popup background color
+        QColor popupBackgroundColor = config->readColorEntry( "PopupBackground" );
+        if ( popupBackgroundColor.isValid() ) {
+            KitaConfig::setPopupBackgroundColor( popupBackgroundColor );
+        } else {
+            KitaConfig::setPopupBackgroundColor( KitaConfig::defaultPopupBackgroundColor() );
+        }
     }
 
     config->setGroup( "Account" );