[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/workspace/systemsettings
From: Michael Jansen <kde () michael-jansen ! biz>
Date: 2008-10-07 21:59:22
Message-ID: 1223416762.658418.31088.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 869017 by mjansen:
- Remove unneeded QWidget::addAction calls
- Do not add actions twice to the actionCollection
- Show shortcut in Back actions text. Systemsetting does not provide
possibility to configure/display it. Make it detectable this way.
- Do not use QAction* for KActions.
- Do not override the Standard Shortcut for go back with ctrl-a :-). I
agree that "go back"s shortcut is more intuitive given the used icon.
CCMAIL: uwolfer@kde.org
M +10 -6 mainwindow.cpp
M +1 -1 mainwindow.h
M +1 -6 systemsettingsui.rc
--- trunk/KDE/kdebase/workspace/systemsettings/mainwindow.cpp #869016:869017
@@ -202,13 +202,18 @@
void MainWindow::buildActions()
{
- addAction(actionCollection()->addAction(KStandardAction::Quit, \
qobject_cast<QObject*>(this), SLOT(close()))); + actionCollection()->addAction(
+ KStandardAction::Quit,
+ qobject_cast<QObject*>(this),
+ SLOT(close()));
- showOverviewAction = KStandardAction::back(this, SLOT(showOverview()), \
actionCollection());
- actionCollection()->addAction("showAll", showOverviewAction);
- showOverviewAction->setText( i18n("Overview") );
+ showOverviewAction = actionCollection()->addAction(
+ KStandardAction::Back,
+ qobject_cast<QObject*>(this),
+ SLOT(showOverview()));
+ showOverviewAction->setText(
+ i18n("Overview(%1)", \
showOverviewAction->shortcut().primary().toString())); \
showOverviewAction->setEnabled(false);
- addAction(showOverviewAction);
QWidget *searchWid = new QWidget( this );
QLabel * searchIcon = new QLabel( searchWid );
@@ -228,7 +233,6 @@
actionCollection()->addAction( "searchText", searchText );
searchText->setShortcut(Qt::Key_F6);
- addAction(searchText);
// Search edit box and result labels
QWidget *hbox = new QWidget( this );
--- trunk/KDE/kdebase/workspace/systemsettings/mainwindow.h #869016:869017
@@ -76,7 +76,7 @@
QHash<KService::Ptr,KCMultiWidget*> moduleItemToWidgetDict;
QHash<const QAbstractItemModel *,int> modelToTabHash;
- QAction *showOverviewAction;
+ KAction *showOverviewAction;
KAction *searchText;
KAction *searchClear;
KAction *searchAction;
--- trunk/KDE/kdebase/workspace/systemsettings/systemsettingsui.rc #869016:869017
@@ -2,15 +2,10 @@
<kpartgui name="systemsettings" version="1">
<ToolBar name="mainToolBar" iconText="icontextright">
- <Action name="showAll"/>
+ <Action name="go_back"/>
<Separator/>
<Action name="spacer"/>
<Action name="searchText"/>
<Action name="search"/>
</ToolBar>
-
-<ActionProperties>
- <Action shortcut="Ctrl+O" name="showAll" />
-</ActionProperties>
-
</kpartgui>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic