[Kstars-devel] KDE/kdeedu/kstars/kstars
Jason Harris
kstars at 30doradus.org
Sat Mar 11 18:08:17 CET 2006
SVN commit 517621 by harris:
Toolbars now remember their settings. For example, you can turn off the
text by setting "Text position|Icons only" in the toolbar's right-click
menu, and this will be remembered on subsequent startups.
CCMAIL: kstars-devel at kde.org
M +10 -1 kstars.cpp
--- trunk/KDE/kdeedu/kstars/kstars/kstars.cpp #517620:517621
@@ -26,6 +26,7 @@
#include <kdebug.h>
#include <kactioncollection.h>
#include <kiconloader.h>
+#include <ktoolbar.h>
#include <qpalette.h>
#include <kglobal.h>
@@ -112,9 +113,13 @@
Options::setWindowWidth( width() );
Options::setWindowHeight( height() );
- //We need to explicitly save the colorscheme data to the config file
+ //explicitly save the colorscheme data to the config file
data()->colorScheme()->saveToConfig( KGlobal::config() );
+ //explicitly save toolbar settings to config file
+ toolBar( "mainToolBar" )->saveSettings( KGlobal::config(), "MainToolBar" );
+ toolBar( "viewToolBar" )->saveSettings( KGlobal::config(), "ViewToolBar" );
+
//synch the config file with the Config object
Options::writeConfig();
@@ -188,6 +193,10 @@
// if ( !Options::showMainToolBar() ) ks->toolBar( "mainToolBar" )->hide();
// if ( !Options::showViewToolBar() ) ks->toolBar( "viewToolBar" )->hide();
+ //Set toolbar options from config file
+ toolBar( "mainToolBar" )->applySettings( KGlobal::config(), "MainToolBar" );
+ toolBar( "viewToolBar" )->applySettings( KGlobal::config(), "ViewToolBar" );
+
//Geographic location
data()->setLocationFromOptions();
More information about the Kstars-devel
mailing list