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

List:       kde-commits
Subject:    KDE/kdebase/workspace/systemsettings
From:       Ben Cooksley <sourtooth () gmail ! com>
Date:       2010-02-26 9:23:48
Message-ID: 1267176228.656762.3002.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1096209 by bcooksley:

Allow Quit to be hidden by views.

 M  +8 -2      app/SettingsBase.cpp  
 M  +1 -0      app/SettingsBase.h  
 M  +1 -1      app/systemsettingsui.rc  
 M  +2 -1      core/BaseMode.h  
 M  +1 -1      icons/IconMode.cpp  


--- trunk/KDE/kdebase/workspace/systemsettings/app/SettingsBase.cpp #1096208:1096209
@@ -112,7 +112,7 @@
 {
     // Fill the toolbar with default actions
     // Exit is the very last action
-    actionCollection()->addAction( KStandardAction::Quit, "quit", this, SLOT( \
close() ) ); +    quitAction = actionCollection()->addAction( KStandardAction::Quit, \
"quit_action", this, SLOT( close() ) );  // Configure goes at the end
     configureAction = actionCollection()->addAction( KStandardAction::Preferences, \
                this, SLOT( configShow() ) );
     configureAction->setShortcut(KShortcut(QKeySequence(Qt::CTRL + Qt::Key_M)));
@@ -137,7 +137,7 @@
     helpActionMenu->setMenu( dynamic_cast<KMenu*>( factory()->container("help", \
this) ) );  setMinimumSize(620,430);
     toolBar()->setMovable(false); // We don't allow any changes
-    changeToolBar( BaseMode::Search | BaseMode::Configure );
+    changeToolBar( BaseMode::Search | BaseMode::Configure | BaseMode::Quit );
 }
 
 void SettingsBase::initHelpMenu()
@@ -337,6 +337,7 @@
     }
     guiFactory()->unplugActionList( this, "configure" );
     guiFactory()->unplugActionList( this, "search" );
+    guiFactory()->unplugActionList( this, "quit" );
     if ( BaseMode::Search & toolbar ) {
         QList<QAction*> searchBarActions;
         searchBarActions << spacerAction << searchAction;
@@ -347,6 +348,11 @@
         configureBarActions << configureAction;
         guiFactory()->plugActionList( this, "configure", configureBarActions );
     }
+    if ( BaseMode::Quit & toolbar ) {
+        QList<QAction*> quitBarActions;
+        quitBarActions << quitAction;
+        guiFactory()->plugActionList( this, "quit", quitBarActions );
+    }
 }
 
 void SettingsBase::changeAboutMenu( const KAboutData * menuAbout, KAction * \
                menuItem, QString fallback )
--- trunk/KDE/kdebase/workspace/systemsettings/app/SettingsBase.h #1096208:1096209
@@ -74,6 +74,7 @@
     KAction * searchAction;
     KAction * spacerAction;
     KAction * configureAction;
+    KAction * quitAction;
     // The help menu
     KAction * aboutViewAction;
     KAction * aboutModuleAction;
--- trunk/KDE/kdebase/workspace/systemsettings/app/systemsettingsui.rc \
#1096208:1096209 @@ -18,7 +18,7 @@
     <Separator />
     <ActionList name="configure" />
     <Action name="help_toolbar_menu" />
-    <Action name="quit" />
+    <ActionList name="quit" />
     <ActionList name="search" />
   </ToolBar>
 </gui>
--- trunk/KDE/kdebase/workspace/systemsettings/core/BaseMode.h #1096208:1096209
@@ -73,7 +73,8 @@
     enum ToolBarItemsFlags {
         NoItems = 0x1, /**< The Toolbar will not have any items added by System \
                Settings */
         Search = 0x2, /**< The Toolbar will have the search bar added by System \
                Settings */
-        Configure = 0x4 /**< The Toolbar will have configure added by System \
Settings */ +        Configure = 0x4, /**< The Toolbar will have configure added by \
System Settings */ +        Quit = 0x8, /**< The toolbar will have exit added by \
System Settings */  };
     Q_DECLARE_FLAGS(ToolBarItems, ToolBarItemsFlags)
 
--- trunk/KDE/kdebase/workspace/systemsettings/icons/IconMode.cpp #1096208:1096209
@@ -153,7 +153,7 @@
         d->moduleView->closeModules();
         d->mainWidget->setCurrentWidget( d->iconWidget );
         d->backAction->setEnabled( false );
-        emit changeToolBarItems( BaseMode::Search | BaseMode::Configure );
+        emit changeToolBarItems( BaseMode::Search | BaseMode::Configure | \
BaseMode::Quit );  emit viewChanged( false );
     }
 }


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

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