[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/workspace/kcontrol/standard_actions
From: Michael Jansen <kde () michael-jansen ! biz>
Date: 2008-07-10 19:51:23
Message-ID: 1215719483.717140.7131.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 830584 by mjansen:
Skip Standard Action with ShortcutId AccelNone
M +12 -4 standard_actions_module.cpp
--- trunk/KDE/kdebase/workspace/kcontrol/standard_actions/standard_actions_module.cpp #830583:830584
@@ -78,8 +78,17 @@
// Put all standard shortcuts into the collection
Q_FOREACH(KStandardAction::StandardAction id, KStandardAction::actionIds())
{
+ KStandardShortcut::StandardShortcut shortcutId = KStandardAction::shortcutForActionId(id);
+ // If the StandardShortcutId is AccelNone skip configuration for this
+ // action.
+ if (shortcutId == KStandardShortcut::AccelNone)
+ {
+ continue;
+ }
+ // Create the action
KAction *action = KStandardAction::create(id, NULL, NULL, m_actionCollection);
- KStandardShortcut::StandardShortcut shortcutId = KStandardAction::shortcutForActionId(id);
+ // Remember the shortcutId so we know where to save changes.
+ action->setData(shortcutId);
// We have to manually adjust the action. We want to show the
// hardcoded default and the user set shortcut. But action currently
// only contain the active shortcuts as default shortcut. So we
@@ -89,14 +98,13 @@
// Set the hardcoded default shortcut as default shortcut
action->setShortcut(hardcoded, KAction::DefaultShortcut);
// Set the user defined values as active shortcuts. If the user only
- // has overwritten the primary shortcut make sure alternate still
- // get's shown
+ // has overwritten the primary shortcut make sure the alternate one
+ // still get's shown
if (active.alternate()==QKeySequence())
{
active.setAlternate(hardcoded.alternate());
}
action->setShortcut(active, KAction::ActiveShortcut);
- action->setData(shortcutId);
}
// Hand the collection to the editor
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic