summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitrios Christidis <dchristidis@ceid.upatras.gr>2013-02-05 21:03:51 +0200
committerAndrea Diamantini <adjam7@gmail.com>2013-02-10 10:39:08 +0100
commiteeaaca01eddfa1fb1360ee68c7d9f4efb9d717f4 (patch)
tree0314dfd4151d9610d8668deaf72063ec1848dd50
parentRestore rekonq migration to nepomuk2 (diff)
downloadrekonq-eeaaca01eddfa1fb1360ee68c7d9f4efb9d717f4.tar.xz
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 <adjam7@gmail.com>
-rw-r--r--src/webwindow/webwindow.cpp25
1 files 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 <KUrl>
#include <KToolBar>
#include <KToggleFullScreenAction>
-#include <KShortcutsEditor>
+#include <KShortcutsDialog>
#include <QLabel>
#include <QStyle>
@@ -979,31 +979,16 @@ void WebWindow::keyPressEvent(QKeyEvent *kev)
void WebWindow::keyBindings()
{
- QPointer<KDialog> dialog = new KDialog(this);
+ QPointer<KShortcutsDialog> 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();
}