Commit 4704c5d3 authored by Ronan Abhamon's avatar Ronan Abhamon

feat(app): add many shortcuts, hide settings...

parent 10da9784
......@@ -429,6 +429,10 @@ Server url not configured.</translation>
<source>confirm</source>
<translation>CONFIRM</translation>
</message>
<message>
<source>inviteFriendsTitle</source>
<translation>Linphone - Invite Friends</translation>
</message>
</context>
<context>
<name>MainWindow</name>
......
......@@ -428,6 +428,10 @@ Url du serveur non configurée.</translation>
<source>confirm</source>
<translation>CONFIRMER</translation>
</message>
<message>
<source>inviteFriendsTitle</source>
<translation>Linphone - Inviter des amis</translation>
</message>
</context>
<context>
<name>MainWindow</name>
......
......@@ -50,10 +50,11 @@ public:
QQuickWindow *getCallsWindow () const;
QQuickWindow *getMainWindow () const;
QQuickWindow *getSettingsWindow () const;
bool hasFocus () const;
Q_INVOKABLE QQuickWindow *getSettingsWindow () const;
Q_INVOKABLE QString locale () const {
return m_locale;
}
......
......@@ -37,6 +37,15 @@ Window {
// Handle normal windows close.
onClosing: !_disableExitStatus && exitStatus(0)
// ---------------------------------------------------------------------------
Shortcut {
sequence: StandardKey.Close
onActivated: exit(0)
}
// ---------------------------------------------------------------------------
ColumnLayout {
anchors.fill: parent
spacing: 0
......
......@@ -41,6 +41,13 @@ Window {
// ---------------------------------------------------------------------------
Shortcut {
sequence: StandardKey.Close
onActivated: window.hide()
}
// ---------------------------------------------------------------------------
Rectangle {
anchors.fill: parent
color: '#000000' // Not a style.
......
......@@ -12,17 +12,18 @@ DialogPlus {
TextButtonA {
text: qsTr('cancel')
onClicked: exit(0)
onClicked: exit(-1)
},
TextButtonB {
enabled: email.length && message.length
text: qsTr('confirm')
onClicked: exit(-1)
onClicked: exit(0)
}
]
centeredButtons: true
title: qsTr('inviteFriendsTitle')
height: InviteFriendsStyle.height
width: InviteFriendsStyle.width
......
......@@ -103,6 +103,13 @@ Controls1.ApplicationWindow {
// ---------------------------------------------------------------------------
Shortcut {
sequence: StandardKey.Close
onActivated: window.hide()
}
// ---------------------------------------------------------------------------
ColumnLayout {
id: container
......
......@@ -2,7 +2,7 @@ import QtQuick 2.7
import QtQuick.Controls 1.4
import QtQuick.Controls.Styles 1.4
import Common 1.0 as Common
import Linphone 1.0
import App.Styles 1.0
......@@ -109,6 +109,8 @@ import App.Styles 1.0
MenuItem {
shortcut: 'Ctrl+P'
text: qsTr('settings')
onTriggered: App.getSettingsWindow().show()
}
MenuSeparator {}
......@@ -116,6 +118,8 @@ import App.Styles 1.0
MenuItem {
shortcut: StandardKey.Quit
text: qsTr('quit')
onTriggered: Qt.quit()
}
}
......
......@@ -19,7 +19,15 @@ ApplicationWindow {
minimumWidth: SettingsWindowStyle.width
title: qsTr('settingsTitle')
visible: true
// ---------------------------------------------------------------------------
Shortcut {
sequence: StandardKey.Close
onActivated: window.hide()
}
// ---------------------------------------------------------------------------
ColumnLayout {
anchors.fill: parent
......
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