File: 0021_Display-sync-button-only-if-profiles-are-enabled-and.patch

package info (click to toggle)
lomiri-calendar-app 1.1.4-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,472 kB
  • sloc: python: 723; javascript: 656; cpp: 25; makefile: 16; sh: 1
file content (66 lines) | stat: -rw-r--r-- 2,644 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
From 47a36c222ca92a37db7a6ec1ff6ba8d4eb1957fd Mon Sep 17 00:00:00 2001
From: Lionel Duboeuf <lduboeuf@ouvaton.org>
Date: Fri, 10 Jan 2025 17:45:39 +0100
Subject: [PATCH 11/14] Display sync button only if profiles are enabled and
 set

Signed-off-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
---
 src/qml/CalendarChoicePopup.qml | 5 +++--
 src/qml/EventActions.qml        | 6 ++++--
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/qml/CalendarChoicePopup.qml b/src/qml/CalendarChoicePopup.qml
index a0367138..3964c3c1 100644
--- a/src/qml/CalendarChoicePopup.qml
+++ b/src/qml/CalendarChoicePopup.qml
@@ -30,7 +30,8 @@ Page {
     objectName: "calendarchoicepopup"
 
     property var model
-    readonly property var canSynchronize: !networkError && buteoSync.serviceAvailable && buteoSync.profiles.length > 0 && !buteoSync.synchronizing
+    readonly property bool syncAvailable: buteoSync.serviceAvailable && buteoSync.profiles.length > 0
+    readonly property var canSynchronize: !networkError && syncAvailable && !buteoSync.synchronizing
     signal collectionUpdated()
 
     function accountFromId(accountId)
@@ -62,7 +63,7 @@ Page {
             text: enabled ? i18n.tr("Sync") : i18n.tr("Syncing")
             onTriggered: buteoSync.synchronize()
             enabled: calendarChoicePage.canSynchronize
-            visible: buteoSync.serviceAvailable
+            visible: calendarChoicePage.syncAvailable
         }
         flickable: flickable
     }
diff --git a/src/qml/EventActions.qml b/src/qml/EventActions.qml
index 63e50fb9..579981d5 100644
--- a/src/qml/EventActions.qml
+++ b/src/qml/EventActions.qml
@@ -30,7 +30,8 @@ Item {
     property alias settingsAction: _settingsAction
     property Settings settings
     readonly property bool syncInProgress: buteoSync.synchronizing
-    readonly property var canSynchronize: !networkError && buteoSync.serviceAvailable && buteoSync.profiles.length > 0 && !buteoSync.synchronizing
+    readonly property bool syncAvailable: buteoSync.serviceAvailable && buteoSync.profiles.length > 0
+    readonly property var canSynchronize: !networkError && syncAvailable && !buteoSync.synchronizing
 
 
     onSyncInProgressChanged: {
@@ -81,11 +82,12 @@ Item {
         text: i18n.tr("Sync")
         onTriggered: buteoSync.synchronize()
         enabled: actionPool.canSynchronize
-        visible: buteoSync.serviceAvailable
+        visible: actionPool.syncAvailable
     }
 
     SyncManager {
         id: buteoSync
+        filterDisabled: true
         filterHidden: true
         filterBy.key: "category"
         filterBy.value: "calendar"
-- 
2.39.5