mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-21 13:48:08 +00:00
feat(app): add many shortcuts, hide settings...
This commit is contained in:
parent
10da9784cd
commit
4704c5d38c
9 changed files with 50 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue