all plasma shortcuts are emacs-style now, starting with alt-d, to avoid conflicts.

svn path=/trunk/KDE/kdelibs/; revision=914295
This commit is contained in:
Chani Armitage 2009-01-20 19:38:45 +00:00
parent ce8a3e3ed7
commit 0f3f06f024
2 changed files with 15 additions and 13 deletions

View File

@ -911,9 +911,9 @@ void Applet::flushPendingConstraintsEvents()
closeApplet->setShortcutContext(Qt::WidgetShortcut); //don't clash with other views closeApplet->setShortcutContext(Qt::WidgetShortcut); //don't clash with other views
closeApplet->setText(i18nc("%1 is the name of the applet", "Remove this %1", name())); closeApplet->setText(i18nc("%1 is the name of the applet", "Remove this %1", name()));
if (isContainment()) { if (isContainment()) {
closeApplet->setShortcut(QKeySequence("ctrl+shift+r")); closeApplet->setShortcut(QKeySequence("alt+d,alt+r"));
} else { } else {
closeApplet->setShortcut(QKeySequence("ctrl+r")); closeApplet->setShortcut(QKeySequence("alt+d,r"));
} }
connect(closeApplet, SIGNAL(triggered(bool)), this, SLOT(selectItemToDestroy())); connect(closeApplet, SIGNAL(triggered(bool)), this, SLOT(selectItemToDestroy()));
d->actions.addAction("remove", closeApplet); d->actions.addAction("remove", closeApplet);
@ -1289,10 +1289,10 @@ void Applet::setHasConfigurationInterface(bool hasInterface)
configAction->setVisible(canConfig); configAction->setVisible(canConfig);
configAction->setEnabled(canConfig); configAction->setEnabled(canConfig);
if (isContainment()) { if (isContainment()) {
//kDebug() << "I am a containment"; //FIXME containments don't seem to use this action any more
configAction->setShortcut(QKeySequence("ctrl+shift+s")); //configAction->setShortcut(QKeySequence("ctrl+shift+s"));
} else { } else {
configAction->setShortcut(QKeySequence("ctrl+s")); configAction->setShortcut(QKeySequence("alt+d,s"));
} }
connect(configAction, SIGNAL(triggered(bool)), connect(configAction, SIGNAL(triggered(bool)),
this, SLOT(showConfigurationInterface())); this, SLOT(showConfigurationInterface()));

View File

@ -148,7 +148,7 @@ void Containment::init()
appletBrowserAction->setEnabled(unlocked); appletBrowserAction->setEnabled(unlocked);
connect(appletBrowserAction, SIGNAL(triggered()), this, SLOT(triggerShowAddWidgets())); connect(appletBrowserAction, SIGNAL(triggered()), this, SLOT(triggerShowAddWidgets()));
appletBrowserAction->setShortcutContext(Qt::WidgetShortcut); appletBrowserAction->setShortcutContext(Qt::WidgetShortcut);
//appletBrowserAction->setShortcut(QKeySequence("ctrl+a")); //FIXME in KDE 4.3, see bug #165938 appletBrowserAction->setShortcut(QKeySequence("alt+d,a"));
d->actions().addAction("add widgets", appletBrowserAction); d->actions().addAction("add widgets", appletBrowserAction);
QAction *configureActivityAction = new QAction(i18n("Appearance Settings"), this); QAction *configureActivityAction = new QAction(i18n("Appearance Settings"), this);
@ -157,20 +157,22 @@ void Containment::init()
configureActivityAction->setVisible(canConfig); configureActivityAction->setVisible(canConfig);
configureActivityAction->setEnabled(canConfig); configureActivityAction->setEnabled(canConfig);
connect(configureActivityAction, SIGNAL(triggered()), this, SLOT(requestConfiguration())); connect(configureActivityAction, SIGNAL(triggered()), this, SLOT(requestConfiguration()));
appletBrowserAction->setShortcutContext(Qt::WidgetShortcut);
configureActivityAction->setShortcut(QKeySequence("alt+d,alt+s"));
d->actions().addAction("activity settings", configureActivityAction); d->actions().addAction("activity settings", configureActivityAction);
QAction *action = new QAction(i18n("Next Widget"), this); QAction *action = new QAction(i18n("Next Widget"), this);
//no icon //no icon
connect(action, SIGNAL(triggered()), this, SLOT(focusNextApplet())); connect(action, SIGNAL(triggered()), this, SLOT(focusNextApplet()));
action->setShortcutContext(Qt::WidgetShortcut); action->setShortcutContext(Qt::WidgetShortcut);
action->setShortcut(QKeySequence("ctrl+n")); action->setShortcut(QKeySequence("alt+d,n"));
d->actions().addAction("next applet", action); d->actions().addAction("next applet", action);
action = new QAction(i18n("Previous Widget"), this); action = new QAction(i18n("Previous Widget"), this);
//no icon //no icon
connect(action, SIGNAL(triggered()), this, SLOT(focusPreviousApplet())); connect(action, SIGNAL(triggered()), this, SLOT(focusPreviousApplet()));
action->setShortcutContext(Qt::WidgetShortcut); action->setShortcutContext(Qt::WidgetShortcut);
action->setShortcut(QKeySequence("ctrl+p")); action->setShortcut(QKeySequence("alt+d,p"));
d->actions().addAction("previous applet", action); d->actions().addAction("previous applet", action);
if (immutability() != SystemImmutable) { if (immutability() != SystemImmutable) {
@ -182,7 +184,7 @@ void Containment::init()
connect(lockDesktopAction, SIGNAL(triggered(bool)), connect(lockDesktopAction, SIGNAL(triggered(bool)),
this, SLOT(toggleDesktopImmutability())); this, SLOT(toggleDesktopImmutability()));
lockDesktopAction->setShortcutContext(Qt::WidgetShortcut); lockDesktopAction->setShortcutContext(Qt::WidgetShortcut);
lockDesktopAction->setShortcut(QKeySequence("ctrl+l")); lockDesktopAction->setShortcut(QKeySequence("alt+d,l"));
d->actions().addAction("lock widgets", lockDesktopAction); d->actions().addAction("lock widgets", lockDesktopAction);
} }
@ -194,8 +196,8 @@ void Containment::init()
zoomAction->setShortcutContext(Qt::WidgetShortcut); zoomAction->setShortcutContext(Qt::WidgetShortcut);
//two shortcuts because I hate ctrl-+ but others expect it //two shortcuts because I hate ctrl-+ but others expect it
QList<QKeySequence> keys; QList<QKeySequence> keys;
keys << QKeySequence(QKeySequence::ZoomIn); keys << QKeySequence("alt+d,+");
keys << QKeySequence("ctrl+="); keys << QKeySequence("alt+d,=");
zoomAction->setShortcuts(keys); zoomAction->setShortcuts(keys);
d->actions().addAction("zoom in", zoomAction); d->actions().addAction("zoom in", zoomAction);
@ -203,7 +205,7 @@ void Containment::init()
zoomAction->setIcon(KIcon("zoom-out")); zoomAction->setIcon(KIcon("zoom-out"));
connect(zoomAction, SIGNAL(triggered(bool)), this, SLOT(zoomOut())); connect(zoomAction, SIGNAL(triggered(bool)), this, SLOT(zoomOut()));
zoomAction->setShortcutContext(Qt::WidgetShortcut); zoomAction->setShortcutContext(Qt::WidgetShortcut);
zoomAction->setShortcut(QKeySequence(QKeySequence::ZoomOut)); zoomAction->setShortcut(QKeySequence("alt+d,-"));
d->actions().addAction("zoom out", zoomAction); d->actions().addAction("zoom out", zoomAction);
QAction *activityAction = new QAction(i18n("Add Activity"), this); QAction *activityAction = new QAction(i18n("Add Activity"), this);
@ -212,7 +214,7 @@ void Containment::init()
activityAction->setEnabled(unlocked); activityAction->setEnabled(unlocked);
connect(activityAction, SIGNAL(triggered(bool)), this, SLOT(addSiblingContainment())); connect(activityAction, SIGNAL(triggered(bool)), this, SLOT(addSiblingContainment()));
activityAction->setShortcutContext(Qt::WidgetShortcut); activityAction->setShortcutContext(Qt::WidgetShortcut);
activityAction->setShortcut(QKeySequence("ctrl+shift+a")); activityAction->setShortcut(QKeySequence("alt+d,alt+a"));
d->actions().addAction("add sibling containment", activityAction); d->actions().addAction("add sibling containment", activityAction);
if (d->type == DesktopContainment && d->toolBox) { if (d->type == DesktopContainment && d->toolBox) {