From eeaaca01eddfa1fb1360ee68c7d9f4efb9d717f4 Mon Sep 17 00:00:00 2001 From: Dimitrios Christidis Date: Tue, 5 Feb 2013 21:03:51 +0200 Subject: Replace shortcut configuration dialog. Using KShortcutsDialog allows for multiple shortcut schemes and the ability to print all actions and their assigned shortcuts (if any) in a table. REVIEW: 108796 Signed-off-by: Andrea Diamantini --- src/webwindow/webwindow.cpp | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/src/webwindow/webwindow.cpp b/src/webwindow/webwindow.cpp index 59c87571..faf919a7 100644 --- a/src/webwindow/webwindow.cpp +++ b/src/webwindow/webwindow.cpp @@ -61,7 +61,7 @@ #include #include #include -#include +#include #include #include @@ -979,31 +979,16 @@ void WebWindow::keyPressEvent(QKeyEvent *kev) void WebWindow::keyBindings() { - QPointer dialog = new KDialog(this); + QPointer dialog = new KShortcutsDialog(KShortcutsEditor::AllActions, KShortcutsEditor::LetterShortcutsAllowed, this); - KShortcutsEditor widget(this); - - widget.addCollection(actionCollection(), i18n("web window")); + dialog->addCollection(actionCollection(), i18n("web window")); TabWindow *tw = rApp->tabWindow(); if (tw) { - widget.addCollection(tw->actionCollection(), i18n("tab window")); - } - - dialog->setMainWidget(&widget); - - dialog->setCaption(i18nc("@title:window", "Configure Shortcuts")); - dialog->setButtons(KDialog::Ok | KDialog::Cancel | KDialog::Reset); - dialog->setMinimumSize(700, 525); - - connect(dialog, SIGNAL(resetClicked()), &widget, SLOT(allDefault())); - - if (dialog->exec() == QDialog::Accepted) - { - kDebug() << "OK"; - widget.save(); + dialog->addCollection(tw->actionCollection(), i18n("tab window")); } + dialog->configure(); dialog->deleteLater(); } -- cgit v1.2.1