[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/kstars/unfrozen/kstars/kstars
From:       Jason Harris <kstars () 30doradus ! org>
Date:       2008-07-01 4:47:51
Message-ID: 1214887671.156410.512.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 826610 by harris:

porting fix from trunk, revision 822804.  Quoting the original commit message:

Fixing a usability issue in the options window.
Toggling the view toolbar buttons now toggles the
corresponding control in the options dialog.  This is
useful for those who keep the options window open while
using the program.

TODO: there's no meta-option for deep-sky objects in the
options window.  I'll ask translators if it's ok to add
one for 4.2.

Thanks for pointing this out, James.

CCMAIL: kstars-devel@kde.org



 M  +12 -0     kstars.h  
 M  +30 -5     kstarsactions.cpp  


--- branches/kstars/unfrozen/kstars/kstars/kstars.h #826609:826610
@@ -48,6 +48,12 @@
 class JMoonTool;
 class ImageViewer;
 
+class OpsCatalog;
+class OpsGuides;
+class OpsSolarSystem;
+class OpsColors;
+class OpsAdvanced;
+
 /**
 	*@class KStars
 	*@short This is the main window for KStars.
@@ -710,6 +716,12 @@
 
     QPalette OriginalPalette, DarkPalette;
 
+    OpsCatalog *opcatalog;
+    OpsGuides *opguides;
+    OpsSolarSystem *opsolsys;
+    OpsColors *opcolors;
+    OpsAdvanced *opadvanced;
+
     KLed *m_DiskLED;
 };
 
--- branches/kstars/unfrozen/kstars/kstars/kstarsactions.cpp #826609:826610
@@ -102,25 +102,50 @@
 
 void KStars::slotViewToolBar() {
     KToggleAction *a = (KToggleAction*)sender();
+    KConfigDialog *kcd = KConfigDialog::exists( "settings" );
 
     if ( a == actionCollection()->action( "show_stars" ) ) {
         Options::setShowStars( a->isChecked() );
+        if ( kcd ) {
+            opcatalog->kcfg_ShowStars->setChecked( a->isChecked() );
+        }
     } else if ( a == actionCollection()->action( "show_deepsky" ) ) {
         Options::setShowDeepSky( a->isChecked() );
     } else if ( a == actionCollection()->action( "show_planets" ) ) {
         Options::setShowSolarSystem( a->isChecked() );
+        if ( kcd ) {
+            opsolsys->kcfg_ShowSolarSystem->setChecked( a->isChecked() );
+        }
     } else if ( a == actionCollection()->action( "show_clines" ) ) {
         Options::setShowCLines( a->isChecked() );
+        if ( kcd ) {
+            opguides->kcfg_ShowCLines->setChecked( a->isChecked() );
+        }
     } else if ( a == actionCollection()->action( "show_cnames" ) ) {
         Options::setShowCNames( a->isChecked() );
+        if ( kcd ) {
+            opguides->kcfg_ShowCNames->setChecked( a->isChecked() );
+        }
     } else if ( a == actionCollection()->action( "show_cbounds" ) ) {
         Options::setShowCBounds( a->isChecked() );
+        if ( kcd ) {
+            opguides->kcfg_ShowCBounds->setChecked( a->isChecked() );
+        }
     } else if ( a == actionCollection()->action( "show_mw" ) ) {
         Options::setShowMilkyWay( a->isChecked() );
+        if ( kcd ) {
+            opguides->kcfg_ShowMilkyWay->setChecked( a->isChecked() );
+        }
     } else if ( a == actionCollection()->action( "show_grid" ) ) {
         Options::setShowGrid( a->isChecked() );
+        if ( kcd ) {
+            opguides->kcfg_ShowGrid->setChecked( a->isChecked() );
+        }
     } else if ( a == actionCollection()->action( "show_horizon" ) ) {
         Options::setShowGround( a->isChecked() );
+        if ( kcd ) {
+            opguides->kcfg_ShowGround->setChecked( a->isChecked() );
+        }
     }
 
     // update time for all objects because they might be not initialized
@@ -364,11 +389,11 @@
 
     connect( dialog, SIGNAL( settingsChanged( const QString &) ), this, SLOT( \
slotApplyConfigChanges() ) );  
-    OpsCatalog *opcatalog    = new OpsCatalog( this );
-    OpsGuides  *opguides     = new OpsGuides( this );
-    OpsSolarSystem *opsolsys = new OpsSolarSystem( this );
-    OpsColors  *opcolors     = new OpsColors( this );
-    OpsAdvanced *opadvanced  = new OpsAdvanced( this );
+    opcatalog    = new OpsCatalog( this );
+    opguides     = new OpsGuides( this );
+    opsolsys = new OpsSolarSystem( this );
+    opcolors     = new OpsColors( this );
+    opadvanced  = new OpsAdvanced( this );
 
     dialog->addPage(opcatalog, i18n("Catalogs"), "kstars_catalog");
     dialog->addPage(opsolsys, i18n("Solar System"), "kstars_solarsystem");


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic