Commit f719aae3 authored by Matthieu Gallien's avatar Matthieu Gallien 🎵
Browse files

starts to make listeners configurable by adding a menu entry for it

parent 6578dd64
......@@ -48,6 +48,7 @@ ApplicationWindow {
property var reportBugAction: elisa.action("help_report_bug")
property var aboutAppAction: elisa.action("help_about_app")
property var configureShortcutsAction: elisa.action("options_configure_keybinding")
property var configureAction: elisa.action("options_configure")
SystemPalette {
id: myPalette
......@@ -341,8 +342,16 @@ ApplicationWindow {
visible: configureShortcutsAction.text !== ""
}
MenuItem {
text: configureAction.text
shortcut: configureAction.shortcut
iconName: elisa.iconName(configureAction.icon)
onTriggered: configureAction.trigger()
visible: configureAction.text !== ""
}
MenuSeparator {
visible: configureShortcutsAction.text !== ""
visible: (configureShortcutsAction.text !== "" || configureAction.text !== "") && aboutAppAction.text !== ""
}
MenuItem {
......
......@@ -80,6 +80,9 @@ void ElisaApplication::setupActions()
auto mKeyBindignsAction = KStandardAction::keyBindings(this, &ElisaApplication::configureShortcuts, this);
mCollection.addAction(mKeyBindignsAction->objectName(), mKeyBindignsAction);
auto configureAction = KStandardAction::preferences(this, &ElisaApplication::configureListeners, this);
mCollection.addAction(QStringLiteral("options_configure"), configureAction);
#endif
}
......@@ -122,6 +125,11 @@ void ElisaApplication::configureShortcuts()
#endif
}
void ElisaApplication::configureListeners()
{
}
QAction * ElisaApplication::action(const QString& name)
{
#if defined KF5XmlGui_FOUND && KF5XmlGui_FOUND
......
......@@ -56,6 +56,8 @@ public Q_SLOTS:
void configureShortcuts();
void configureListeners();
private:
#if defined KF5XmlGui_FOUND && KF5XmlGui_FOUND
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment