From kde-commits Sat Feb 28 23:10:11 2009 From: Michael Jansen Date: Sat, 28 Feb 2009 23:10:11 +0000 To: kde-commits Subject: KDE/kdebase/workspace/kcontrol/keys Message-Id: <1235862611.986121.1953.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=123586262603145 SVN commit 933453 by mjansen: Implement the possibility to unset all shortcuts for a component at once. I could have called it "The Amarok" button, because that app made me implement it. M +8 -0 kglobalshortcutseditor.cpp M +5 -0 kglobalshortcutseditor.h --- trunk/KDE/kdebase/workspace/kcontrol/keys/kglobalshortcutseditor.cpp #933452:933453 @@ -115,6 +115,7 @@ QMenu *menu = new QMenu(q); menu->addAction( i18n("Import Scheme..."), q, SLOT(importScheme())); menu->addAction( i18n("Export Scheme..."), q, SLOT(exportScheme())); + menu->addAction( i18n("Set All Shortcuts to None"), q, SLOT(clearConfiguration())); menu->addAction( i18n("Remove Component"), q, SLOT(removeComponent())); ui.menu_button->setMenu(menu); @@ -198,6 +199,13 @@ } +void KGlobalShortcutsEditor::clearConfiguration() +{ + QString name = d->ui.components->currentText(); + d->components.value(name).editor->clearConfiguration(); +} + + void KGlobalShortcutsEditor::defaults(ComponentScope scope) { switch (scope) --- trunk/KDE/kdebase/workspace/kcontrol/keys/kglobalshortcutseditor.h #933452:933453 @@ -113,6 +113,11 @@ void activateComponent(const QString &component); /** + * Set all shortcuts to none. + */ + void clearConfiguration(); + + /** * Load/Reload the global shortcuts */ void load();