Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudio Cambra <claudio.cambra@gmail.com>2022-06-30 17:20:13 +0300
committerClaudio Cambra <claudio.cambra@gmail.com>2022-07-06 12:26:53 +0300
commitb712eb95e2e40e2af8e9f0fa966f587a7fa58adb (patch)
tree0a0ba4e36bea459fc9758f46efa6192b184f3889 /src/gui/tray
parentd6faf0a250c9974260d5a4f3e1005df3328b3d46 (diff)
Clean up systray methods, make more QML-friendly
Signed-off-by: Claudio Cambra <claudio.cambra@gmail.com>
Diffstat (limited to 'src/gui/tray')
-rw-r--r--src/gui/tray/Window.qml16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/gui/tray/Window.qml b/src/gui/tray/Window.qml
index 81629711f..6419e651e 100644
--- a/src/gui/tray/Window.qml
+++ b/src/gui/tray/Window.qml
@@ -39,13 +39,11 @@ Window {
onActiveChanged: {
if (!Systray.useNormalWindow && !active) {
hide();
- Systray.setClosed();
+ Systray.isOpen = false;
}
}
- onClosing: {
- Systray.setClosed()
- }
+ onClosing: Systray.isOpen = false
onVisibleChanged: {
// HACK: reload account Instantiator immediately by restting it - could be done better I guess
@@ -97,13 +95,13 @@ Window {
trayWindow.raise();
trayWindow.requestActivate();
- Systray.setOpened();
+ Systray.isOpen = true;
UserModel.fetchCurrentActivityModel();
}
function onHideWindow() {
trayWindow.hide();
- Systray.setClosed();
+ Systray.isOpen = false;
}
function onShowFileActivityDialog(objectName, objectId) {
@@ -178,7 +176,7 @@ Window {
// We call open() instead of popup() because we want to position it
// exactly below the dropdown button, not the mouse
onClicked: {
- syncPauseButton.text = Systray.syncIsPaused() ? qsTr("Resume sync for all") : qsTr("Pause sync for all")
+ syncPauseButton.text = Systray.syncIsPaused ? qsTr("Resume sync for all") : qsTr("Pause sync for all")
if (accountMenu.visible) {
accountMenu.close()
} else {
@@ -322,7 +320,7 @@ Window {
font.pixelSize: Style.topLinePixelSize
palette.windowText: Style.ncTextColor
hoverEnabled: true
- onClicked: Systray.pauseResumeSync()
+ onClicked: Systray.syncIsPaused = !Systray.syncIsPaused
background: Item {
height: parent.height
@@ -335,7 +333,7 @@ Window {
}
Accessible.role: Accessible.MenuItem
- Accessible.name: Systray.syncIsPaused() ? qsTr("Resume sync for all") : qsTr("Pause sync for all")
+ Accessible.name: Systray.syncIsPaused ? qsTr("Resume sync for all") : qsTr("Pause sync for all")
Accessible.onPressAction: syncPauseButton.clicked()
}