only close the desktop toolbox if the action is non-repeatable, which implies it's a fire-and-forget type of action such as something that triggers a dialog
CCBUG:198229 svn path=/branches/KDE/4.3/kdelibs/; revision=988885
This commit is contained in:
parent
153934b66d
commit
ba90bd8374
@ -1442,11 +1442,13 @@ KActionCollection* AppletPrivate::defaultActions(QObject *parent)
|
||||
actions->setConfigGroup("Shortcuts-Applet");
|
||||
|
||||
KAction *configAction = actions->addAction("configure");
|
||||
configAction->setAutoRepeat(false);
|
||||
configAction->setText(i18n("Widget Settings"));
|
||||
configAction->setIcon(KIcon("configure"));
|
||||
configAction->setShortcut(KShortcut("alt+d, s"));
|
||||
|
||||
KAction *closeApplet = actions->addAction("remove");
|
||||
closeApplet->setAutoRepeat(false);
|
||||
closeApplet->setText("Remove this Widget");
|
||||
closeApplet->setIcon(KIcon("edit-delete"));
|
||||
closeApplet->setShortcut(KShortcut("alt+d, r"));
|
||||
|
@ -240,6 +240,7 @@ void ContainmentPrivate::addDefaultActions(KActionCollection *actions)
|
||||
|
||||
//add our own actions
|
||||
KAction *appletBrowserAction = actions->addAction("add widgets");
|
||||
appletBrowserAction->setAutoRepeat(false);
|
||||
appletBrowserAction->setText(i18n("Add Widgets..."));
|
||||
appletBrowserAction->setIcon(KIcon("list-add"));
|
||||
appletBrowserAction->setShortcut(KShortcut("alt+d, a"));
|
||||
@ -255,6 +256,7 @@ void ContainmentPrivate::addDefaultActions(KActionCollection *actions)
|
||||
action->setShortcut(KShortcut("alt+d, p"));
|
||||
|
||||
KAction *zoomAction = actions->addAction("zoom in");
|
||||
zoomAction->setAutoRepeat(false);
|
||||
zoomAction->setText(i18n("Zoom In"));
|
||||
zoomAction->setIcon(KIcon("zoom-in"));
|
||||
//two shortcuts because I hate ctrl-+ but others expect it
|
||||
|
@ -98,6 +98,7 @@ public:
|
||||
KAction *action = actions.addAction("configure shortcuts");
|
||||
action->setText(i18n("Shortcut Settings"));
|
||||
action->setIcon(KIcon("configure"));
|
||||
action->setAutoRepeat(false);
|
||||
QObject::connect(action, SIGNAL(triggered()),
|
||||
q, SLOT(showShortcutConfig()));
|
||||
//action->setShortcut(KShortcut("ctrl+h"));
|
||||
|
@ -309,7 +309,11 @@ void DesktopToolBox::assignColors()
|
||||
|
||||
void DesktopToolBox::toolTriggered(bool)
|
||||
{
|
||||
QAction *action = qobject_cast<QAction *>(sender());
|
||||
|
||||
if (!action || !action->autoRepeat()) {
|
||||
hideToolBox();
|
||||
}
|
||||
}
|
||||
|
||||
void DesktopToolBox::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
|
||||
|
Loading…
Reference in New Issue
Block a user