From 36e755ea70dd86fc0e650417bf095dacfdbb2586 Mon Sep 17 00:00:00 2001 From: Filippo Scognamiglio Date: Mon, 30 Dec 2013 02:32:02 +0100 Subject: [PATCH] Refactored menus into actions --- qml/cool-old-term/TerminalWindow.qml | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/qml/cool-old-term/TerminalWindow.qml b/qml/cool-old-term/TerminalWindow.qml index 0fee5e3..7b1927f 100644 --- a/qml/cool-old-term/TerminalWindow.qml +++ b/qml/cool-old-term/TerminalWindow.qml @@ -37,6 +37,17 @@ ApplicationWindow{ shortcut: "Alt+F11" onTriggered: shadersettings.fullscreen = !shadersettings.fullscreen; } + Action { + id: quitAction + text: "&Quit" + shortcut: "Ctrl+Q" + onTriggered: terminalWindow.close(); + } + Action{ + id: showsettingsAction + text: "&Settings" + onTriggered: settingswindow.show(); + } menuBar: MenuBar { id: menubar @@ -44,20 +55,13 @@ ApplicationWindow{ Menu { title: qsTr("File") visible: shadersettings.fullscreen ? false : true - MenuItem { text: "Close"; onTriggered: terminalWindow.close()} + MenuItem {action: quitAction} } Menu { title: qsTr("Edit") visible: shadersettings.fullscreen ? false : true - MenuItem { - text: qsTr("Settings") - onTriggered: { - settingswindow.show(); - } - } - MenuItem{ - action: fullscreenAction - } + MenuItem {action: showsettingsAction} + MenuItem {action: fullscreenAction} } }