Changeset View
Changeset View
Standalone View
Standalone View
src/qml/ApplicationMenu.qml
Show All 15 Lines | |||||
16 | * along with this library; see the file COPYING.LIB. If not, write to | 16 | * along with this library; see the file COPYING.LIB. If not, write to | ||
17 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 17 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
18 | * Boston, MA 02110-1301, USA. | 18 | * Boston, MA 02110-1301, USA. | ||
19 | */ | 19 | */ | ||
20 | 20 | | |||
21 | import QtQuick 2.7 | 21 | import QtQuick 2.7 | ||
22 | //explore menu from Qt 5.10 once we can require it, but it is item-based | 22 | //explore menu from Qt 5.10 once we can require it, but it is item-based | ||
23 | import QtQuick.Controls 1.4 | 23 | import QtQuick.Controls 1.4 | ||
24 | import org.kde.elisa 1.0 | ||||
24 | 25 | | |||
25 | Menu { | 26 | Menu { | ||
26 | id: applicationMenu | 27 | id: applicationMenu | ||
27 | title: i18nc("open application menu", "Application Menu") | 28 | title: i18nc("open application menu", "Application Menu") | ||
28 | 29 | | |||
29 | property var helpAction: elisa.action("help_contents") | 30 | property var helpAction: elisa.action("help_contents") | ||
30 | property var quitApplication: elisa.action("file_quit") | 31 | property var quitApplication: elisa.action("file_quit") | ||
31 | property var reportBugAction: elisa.action("help_report_bug") | 32 | property var reportBugAction: elisa.action("help_report_bug") | ||
32 | property var aboutAppAction: elisa.action("help_about_app") | 33 | property var aboutAppAction: elisa.action("help_about_app") | ||
33 | property var configureShortcutsAction: elisa.action("options_configure_keybinding") | 34 | property var configureShortcutsAction: elisa.action("options_configure_keybinding") | ||
34 | property var configureAction: elisa.action("options_configure") | 35 | property var configureAction: elisa.action("options_configure") | ||
35 | 36 | | |||
37 | Action { | ||||
38 | id: togglePlaylistAction | ||||
39 | text: i18nc("Toggle playlist", "Toggle Playlist") | ||||
40 | iconName: "view-media-playlist" | ||||
41 | onTriggered: contentView.showPlaylist = !contentView.showPlaylist | ||||
42 | } | ||||
43 | | ||||
36 | MenuItem { | 44 | MenuItem { | ||
37 | text: configureAction.text | 45 | text: configureAction.text | ||
38 | shortcut: configureAction.shortcut | 46 | shortcut: configureAction.shortcut | ||
39 | iconName: elisa.iconName(configureAction.icon) | 47 | iconName: elisa.iconName(configureAction.icon) | ||
40 | onTriggered: configureAction.trigger() | 48 | onTriggered: configureAction.trigger() | ||
41 | visible: configureAction.text !== "" | 49 | visible: configureAction.text !== "" | ||
42 | } | 50 | } | ||
43 | 51 | | |||
44 | MenuItem { | 52 | MenuItem { | ||
45 | text: configureShortcutsAction.text | 53 | text: configureShortcutsAction.text | ||
46 | shortcut: configureShortcutsAction.shortcut | 54 | shortcut: configureShortcutsAction.shortcut | ||
47 | iconName: elisa.iconName(configureShortcutsAction.icon) | 55 | iconName: elisa.iconName(configureShortcutsAction.icon) | ||
48 | onTriggered: configureShortcutsAction.trigger() | 56 | onTriggered: configureShortcutsAction.trigger() | ||
49 | visible: configureShortcutsAction.text !== "" | 57 | visible: configureShortcutsAction.text !== "" | ||
50 | } | 58 | } | ||
51 | 59 | | |||
60 | MenuItem { action: togglePlaylistAction } | ||||
61 | | ||||
52 | MenuSeparator { | 62 | MenuSeparator { | ||
53 | visible: reportBugAction.text !== "" | 63 | visible: reportBugAction.text !== "" | ||
54 | } | 64 | } | ||
55 | 65 | | |||
56 | MenuItem { | 66 | MenuItem { | ||
57 | text: reportBugAction.text | 67 | text: reportBugAction.text | ||
58 | shortcut: reportBugAction.shortcut | 68 | shortcut: reportBugAction.shortcut | ||
59 | iconName: elisa.iconName(reportBugAction.icon) | 69 | iconName: elisa.iconName(reportBugAction.icon) | ||
Show All 36 Lines |