[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:       2009-05-05 10:01:50
Message-ID: 1241517710.440281.24475.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 963714 by bcooksley:

Use XMLGUI instead of doing the help menu ourselves
Remove whitespace
Remove unused members and unneeded headers

 M  +6 -7      app/SettingsBase.cpp  
 M  +0 -5      app/SettingsBase.h  
 M  +6 -2      app/systemsettingsui.rc  
 M  +0 -1      core/BaseData.cpp  
 M  +3 -4      core/BaseMode.cpp  
 M  +2 -3      core/ModuleView.cpp  
 M  +0 -2      core/ToolTipManager.cpp  
 M  +0 -1      core/ToolTipManager.h  
 M  +0 -1      icons/IconMode.cpp  
 M  +19 -18    icons/IconMode.h  


--- trunk/KDE/kdebase/workspace/systemsettings/app/SettingsBase.cpp #963713:963714
@@ -22,9 +22,11 @@
 #include <QTimer>
 #include <QVariantList>
 
+#include <KMenu>
 #include <KDebug>
 #include <KConfig>
 #include <KMenuBar>
+#include <KToolBar>
 #include <KAboutData>
 #include <KMessageBox>
 #include <KCModuleInfo>
@@ -126,6 +128,7 @@
     setupGUI(Save|Create,QString());
     menuBar()->hide();
     // Toolbar & Configuration
+    helpActionMenu->setMenu( dynamic_cast<KMenu*>( factory()->container("help", \
this) ) );  setMinimumSize(800,480);
     toolBar()->setMovable(false); // We don't allow any changes
     changeToolBar( BaseMode::Search | BaseMode::Configure );
@@ -133,17 +136,13 @@
 
 void SettingsBase::initHelpMenu()
 {
-    helpMenuObject = new KHelpMenu( this, KGlobal::activeComponent().aboutData() );
     helpActionMenu = new KActionMenu( KIcon("system-help"), i18n("Help"), this );
-    helpActionMenu->setMenu( helpMenuObject->menu() );
     helpActionMenu->setDelayed( false );
-    actionCollection()->addAction( "helpMenu", helpActionMenu );
+    actionCollection()->addAction( "help_toolbar_menu", helpActionMenu );
     // Add the custom actions
-    aboutModuleAction = actionCollection()->addAction( KStandardAction::AboutApp, \
"aboutModule", this, SLOT( about() ) ); +    aboutModuleAction = \
actionCollection()->addAction( KStandardAction::AboutApp, "help_about_module", this, \
SLOT( about() ) );  changeAboutMenu( 0, aboutModuleAction, i18n("About Active \
                Module") );
-    aboutViewAction = actionCollection()->addAction( KStandardAction::AboutApp, \
                "aboutView", this, SLOT( about() ) );
-    helpActionMenu->insertAction( helpMenuObject->action( KHelpMenu::menuAboutApp ), \
                aboutModuleAction );
-    helpActionMenu->insertAction( aboutModuleAction, aboutViewAction );
+    aboutViewAction = actionCollection()->addAction( KStandardAction::AboutApp, \
"help_about_view", this, SLOT( about() ) );  }
 
 void SettingsBase::initConfig()
--- trunk/KDE/kdebase/workspace/systemsettings/app/SettingsBase.h #963713:963714
@@ -29,9 +29,7 @@
 
 #include <KDialog>
 #include <KService>
-#include <KToolBar>
 #include <KLineEdit>
-#include <KHelpMenu>
 #include <KActionMenu>
 #include <KConfigGroup>
 #include <KXmlGuiWindow>
@@ -78,19 +76,16 @@
     // The toolbar
     KAction * searchAction;
     KAction * spacerAction;
-    KAction * quitAction;
     KAction * configureAction;
     // The help menu
     KAction * aboutViewAction;
     KAction * aboutModuleAction;
-    KHelpMenu * helpMenuObject;
     KActionMenu * helpActionMenu;
     // The configuration
     KDialog * configDialog;
     Ui::ConfigDialog configWidget;
     KConfigGroup mainConfigGroup;
     // The control module
-    KToolBar * viewToolbar;
     QStackedWidget * stackedWidget;
     // The module list
     MenuItem * rootModule;
--- trunk/KDE/kdebase/workspace/systemsettings/app/systemsettingsui.rc #963713:963714
@@ -7,12 +7,16 @@
                          http://www.kde.org/standards/kxmlgui/1.0/kxmlgui.xsd" >
 
   <MenuBar>
+    <Menu name="help">
+      <Action name="help_about_view" append="about_merge" />
+      <Action name="help_about_module" append="about_merge" />
+    </Menu>
   </MenuBar>
-  <ToolBar name="mainToolBar" >
+  <ToolBar name="mainToolBar" noEdit="true" >
     <text>About System Settings</text>
     <ActionList name="viewActions" />
     <Separator />
-    <Action name="helpMenu" />
+    <Action name="help_toolbar_menu" />
     <ActionList name="configure" />
     <ActionList name="search" />
   </ToolBar>
--- trunk/KDE/kdebase/workspace/systemsettings/core/BaseData.cpp #963713:963714
@@ -21,7 +21,6 @@
 
 #include "MenuItem.h"
 
-#include <KService>
 #include <KConfigGroup>
 
 class DataHelper {
--- trunk/KDE/kdebase/workspace/systemsettings/core/BaseMode.cpp #963713:963714
@@ -18,7 +18,6 @@
  ***************************************************************************/
 
 #include "BaseMode.h"
-#include "BaseData.h"
 
 #include <QList>
 #include <QAction>
@@ -28,8 +27,8 @@
 #include <KServiceTypeTrader>
 
 #include "MenuItem.h"
+#include "BaseData.h"
 #include "ModuleView.h"
-
 #include "ToolTipManager.h"
 
 class BaseMode::Private {
@@ -45,7 +44,7 @@
 
 BaseMode::BaseMode(QObject* parent)
     : QObject( parent ), d( new Private() )
-{ 
+{
 }
 
 BaseMode::~BaseMode()
@@ -67,7 +66,7 @@
 }
 
 QWidget * BaseMode::mainWidget()
-{ 
+{
     return 0;
 }
 
--- trunk/KDE/kdebase/workspace/systemsettings/core/ModuleView.cpp #963713:963714
@@ -27,7 +27,6 @@
 #include <QWhatsThis>
 #include <QScrollArea>
 #include <QVBoxLayout>
-#include <QDialogButtonBox>
 
 #include <KDebug>
 #include <KDialog>
@@ -115,7 +114,7 @@
     if ( aboutData ) {
         aboutData->setProgramIconName( activeModule->moduleInfo().service()->icon() \
);  return aboutData;
-    } 
+    }
     return 0;
 }
 
@@ -314,7 +313,7 @@
         event->accept();
         return;
     }
-    
+
     QWidget::keyPressEvent( event );
 }
 
--- trunk/KDE/kdebase/workspace/systemsettings/core/ToolTipManager.cpp #963713:963714
@@ -23,7 +23,6 @@
 
 #include "KToolTip.h"
 #include "KToolTipManager.h"
-#include "KToolTipDelegate.h"
 #include "SystemSettingsToolTipItem.h"
 #include "SystemSettingsBalloonToolTipDelegate.h"
 
@@ -37,7 +36,6 @@
 #include <QAbstractItemView>
 
 #include <KIcon>
-#include <kio/previewjob.h>
 
 K_GLOBAL_STATIC(SystemSettingsBalloonToolTipDelegate, g_delegate)
 
--- trunk/KDE/kdebase/workspace/systemsettings/core/ToolTipManager.h #963713:963714
@@ -23,7 +23,6 @@
 #include <QObject>
 #include "systemsettingsview_export.h"
 
-#include <QRect>
 #include <QModelIndex>
 
 class MenuItem;
--- trunk/KDE/kdebase/workspace/systemsettings/icons/IconMode.cpp #963713:963714
@@ -26,7 +26,6 @@
 
 #include <QStackedWidget>
 
-#include <KDebug>
 #include <KAction>
 #include <KDialog>
 #include <KTabWidget>
--- trunk/KDE/kdebase/workspace/systemsettings/icons/IconMode.h #963713:963714
@@ -1,21 +1,22 @@
-/**************************************************************************
- * Copyright (C) 2009 Ben Cooksley <ben@eclipse.endoftheinternet.org>     *
- *                                                                        *
- * This program is free software; you can redistribute it and/or          *
- * modify it under the terms of the GNU General Public License            *
- * as published by the Free Software Foundation; either version 2         *
- * of the License, or (at your option) any later version.                 *
- *                                                                        *
- * This program is distributed in the hope that it will be useful,        *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of         *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
- * GNU General Public License for more details.                           *
- *                                                                        *
- * You should have received a copy of the GNU General Public License      *
- * along with this program; if not, write to the Free Software            *
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA          *
- * 02110-1301, USA.                                                       *
-***************************************************************************/
+/***************************************************************************
+ *   Copyright (C) 2009 by Ben Cooksley <ben@eclipse.endoftheinternet.org> *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU General Public License as published by  *
+ *   the Free Software Foundation; either version 2 of the License, or     *
+ *   (at your option) any later version.                                   *
+ *                                                                         *
+ *   This program is distributed in the hope that it will be useful,       *
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
+ *   GNU General Public License for more details.                          *
+ *                                                                         *
+ *   You should have received a copy of the GNU General Public License     *
+ *   along with this program; if not, write to the                         *
+ *   Free Software Foundation, Inc.,                                       *
+ *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA          *
+ ***************************************************************************/
+
 #ifndef ICONMODE_H
 #define ICONMODE_H
 


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

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