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 #include +#include #include #include #include +#include #include #include #include @@ -126,6 +128,7 @@ setupGUI(Save|Create,QString()); menuBar()->hide(); // Toolbar & Configuration + helpActionMenu->setMenu( dynamic_cast( 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 #include -#include #include -#include #include #include #include @@ -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" > + + + + - + About System Settings - + --- trunk/KDE/kdebase/workspace/systemsettings/core/BaseData.cpp #963713:963714 @@ -21,7 +21,6 @@ #include "MenuItem.h" -#include #include class DataHelper { --- trunk/KDE/kdebase/workspace/systemsettings/core/BaseMode.cpp #963713:963714 @@ -18,7 +18,6 @@ ***************************************************************************/ #include "BaseMode.h" -#include "BaseData.h" #include #include @@ -28,8 +27,8 @@ #include #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 #include #include -#include #include #include @@ -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 #include -#include K_GLOBAL_STATIC(SystemSettingsBalloonToolTipDelegate, g_delegate) --- trunk/KDE/kdebase/workspace/systemsettings/core/ToolTipManager.h #963713:963714 @@ -23,7 +23,6 @@ #include #include "systemsettingsview_export.h" -#include #include class MenuItem; --- trunk/KDE/kdebase/workspace/systemsettings/icons/IconMode.cpp #963713:963714 @@ -26,7 +26,6 @@ #include -#include #include #include #include --- trunk/KDE/kdebase/workspace/systemsettings/icons/IconMode.h #963713:963714 @@ -1,21 +1,22 @@ -/************************************************************************** - * Copyright (C) 2009 Ben Cooksley * - * * - * 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 * + * * + * 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