[Kstars-devel] KDE/kdeedu/kstars/kstars

Jérôme Sonrier jsid at emor3j.fr.eu.org
Wed Jul 28 01:47:24 CEST 2010


SVN commit 1155734 by jsonrier:

select a radio button in Settings -> Color Schemes at startup.

CCMAIL: kstars-devel at kde.org
CCBUG: 218446



 M  +2 -0      colorscheme.cpp  
 M  +5 -0      kstars.kcfg  
 M  +5 -0      kstarsactions.cpp  
 M  +2 -0      kstarsdcop.cpp  


--- trunk/KDE/kdeedu/kstars/kstars/colorscheme.cpp #1155733:1155734
@@ -264,6 +264,8 @@
         setColor( KeyName.at(i), cg.readEntry( KeyName.at(i).toUtf8().constData(), Default.at( i ) ) );
 
     setStarColorModeIntensity( cg.readEntry( "StarColorMode", 0 ), cg.readEntry( "StarColorIntensity", 5 ) );
+
+    FileName = cg.readEntry( "ColorSchemeFile", "classic.colors" );
 }
 
 void ColorScheme::saveToConfig() {
--- trunk/KDE/kdeedu/kstars/kstars/kstars.kcfg #1155733:1155734
@@ -691,6 +691,11 @@
 	</group>
 
 	<group name="Colors">
+        <entry name="ColorSchemeFile" type="String">
+            <label>The name of the color scheme</label>
+            <whatsthis>The name of the color scheme</whatsthis>
+            <default>classic.colors</default>
+        </entry>
 		<entry name="DarkAppColors" type="Bool">
 			<label>Use Dark colors for KStars windows?</label>
 			<whatsthis>If true, then the application window colors will be switched to a dark red theme, for better night vision.</whatsthis>
--- trunk/KDE/kdeedu/kstars/kstars/kstarsactions.cpp #1155733:1155734
@@ -971,7 +971,12 @@
     kta->setActionGroup( cschemeGroup );
     connect( kta, SIGNAL( toggled( bool ) ), this, SLOT( slotColorScheme() ) );
     colorActionMenu->addAction( kta );
+
+    KConfigGroup cg = KGlobal::config()->group( "Colors" );
+    if ( actionName.mid( 3 ) == cg.readEntry( "ColorSchemeFile", "classic.colors" ).remove( ".colors" ) ) {
+        kta->setChecked( true );
 }
+}
 
 void KStars::removeColorMenuItem( const QString &actionName ) {
     kDebug() << "removing " << actionName;
--- trunk/KDE/kdeedu/kstars/kstars/kstarsdcop.cpp #1155733:1155734
@@ -422,6 +422,8 @@
             QApplication::setPalette( OriginalPalette );
         }
 
+        Options::setColorSchemeFile( name );
+
         map()->forceUpdate();
     }
 }


More information about the Kstars-devel mailing list