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") | ||
36 | property var togglePlaylistAction: elisa.action("toggle_playlist") | ||||
35 | 37 | | |||
36 | MenuItem { | 38 | MenuItem { | ||
37 | text: configureAction.text | 39 | text: configureAction.text | ||
38 | shortcut: configureAction.shortcut | 40 | shortcut: configureAction.shortcut | ||
39 | iconName: elisa.iconName(configureAction.icon) | 41 | iconName: elisa.iconName(configureAction.icon) | ||
40 | onTriggered: configureAction.trigger() | 42 | onTriggered: configureAction.trigger() | ||
41 | visible: configureAction.text !== "" | 43 | visible: configureAction.text !== "" | ||
42 | } | 44 | } | ||
43 | 45 | | |||
44 | MenuItem { | 46 | MenuItem { | ||
45 | text: configureShortcutsAction.text | 47 | text: configureShortcutsAction.text | ||
46 | shortcut: configureShortcutsAction.shortcut | 48 | shortcut: configureShortcutsAction.shortcut | ||
47 | iconName: elisa.iconName(configureShortcutsAction.icon) | 49 | iconName: elisa.iconName(configureShortcutsAction.icon) | ||
48 | onTriggered: configureShortcutsAction.trigger() | 50 | onTriggered: configureShortcutsAction.trigger() | ||
49 | visible: configureShortcutsAction.text !== "" | 51 | visible: configureShortcutsAction.text !== "" | ||
50 | } | 52 | } | ||
51 | 53 | | |||
54 | MenuItem { | ||||
55 | shortcut: togglePlaylistAction.shortcut | ||||
56 | text: contentView.showPlaylist ? i18nc("Hide playlist", "Hide Playlist") : i18nc("Show playlist", "Show Playlist") | ||||
57 | iconName: "view-media-playlist" | ||||
58 | onTriggered: contentView.showPlaylist = !contentView.showPlaylist | ||||
59 | enabled: contentView.currentViewIndex != 0 | ||||
60 | } | ||||
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 |