diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-01-02 00:19:01 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-01-02 00:31:49 +0100 |
commit | 1ef70a4c8c2bb9fd70d5bc73614b09177b6b970c (patch) | |
tree | 57503402891c5d02720a06b2bdebb26ba551d9d7 /components | |
parent | 8cf790d6bc91e5e9c06651ffe4a193b625207f0d (diff) | |
download | kube-1ef70a4c8c2bb9fd70d5bc73614b09177b6b970c.tar.gz kube-1ef70a4c8c2bb9fd70d5bc73614b09177b6b970c.zip |
Foldercontroller
Diffstat (limited to 'components')
-rw-r--r-- | components/mail/contents/ui/main.qml | 21 | ||||
-rw-r--r-- | components/package/contents/ui/AccountSwitcher.qml | 11 |
2 files changed, 14 insertions, 18 deletions
diff --git a/components/mail/contents/ui/main.qml b/components/mail/contents/ui/main.qml index 423d8f34..bf3b4954 100644 --- a/components/mail/contents/ui/main.qml +++ b/components/mail/contents/ui/main.qml | |||
@@ -49,23 +49,11 @@ Controls2.ApplicationWindow { | |||
49 | isDraft: mailListView.isDraft | 49 | isDraft: mailListView.isDraft |
50 | } | 50 | } |
51 | 51 | ||
52 | KubeAction.Context { | ||
53 | id: folderListContext | ||
54 | property variant folder | ||
55 | folder: folderListView.currentFolder | ||
56 | } | ||
57 | |||
58 | KubeAction.Action { | 52 | KubeAction.Action { |
59 | id: replyAction | 53 | id: replyAction |
60 | actionId: "org.kde.kube.actions.reply" | 54 | actionId: "org.kde.kube.actions.reply" |
61 | context: maillistcontext | 55 | context: maillistcontext |
62 | } | 56 | } |
63 | |||
64 | KubeAction.Action { | ||
65 | id: syncAction | ||
66 | actionId: "org.kde.kube.actions.synchronize" | ||
67 | context: folderListContext | ||
68 | } | ||
69 | //END Actions | 57 | //END Actions |
70 | 58 | ||
71 | //BEGIN ActionHandler | 59 | //BEGIN ActionHandler |
@@ -103,12 +91,17 @@ Controls2.ApplicationWindow { | |||
103 | mail: mailListView.currentMail | 91 | mail: mailListView.currentMail |
104 | } | 92 | } |
105 | 93 | ||
94 | KubeFramework.FolderController { | ||
95 | id: folderController | ||
96 | folder: folderListView.currentFolder | ||
97 | } | ||
98 | |||
106 | 99 | ||
107 | //BEGIN Shortcuts | 100 | //BEGIN Shortcuts |
108 | Shortcut { | 101 | Shortcut { |
109 | sequence: StandardKey.Refresh | 102 | sequence: StandardKey.Refresh |
110 | onActivated: syncAction.execute() | 103 | onActivated: folderController.synchronizeAction.execute() |
111 | enabled: syncAction.ready | 104 | enabled: folderController.synchronizeAction.enabled |
112 | } | 105 | } |
113 | Shortcut { | 106 | Shortcut { |
114 | sequence: StandardKey.Delete | 107 | sequence: StandardKey.Delete |
diff --git a/components/package/contents/ui/AccountSwitcher.qml b/components/package/contents/ui/AccountSwitcher.qml index 78ec38cb..a29a290d 100644 --- a/components/package/contents/ui/AccountSwitcher.qml +++ b/components/package/contents/ui/AccountSwitcher.qml | |||
@@ -28,6 +28,10 @@ import org.kube.components 1.0 as KubeComponents | |||
28 | Controls2.Button { | 28 | Controls2.Button { |
29 | id: accountSwitcher | 29 | id: accountSwitcher |
30 | 30 | ||
31 | KubeFramework.FolderController { | ||
32 | id: folderController | ||
33 | } | ||
34 | |||
31 | Layout.fillWidth: true | 35 | Layout.fillWidth: true |
32 | height: parent.height | 36 | height: parent.height |
33 | 37 | ||
@@ -87,7 +91,6 @@ Controls2.Button { | |||
87 | } | 91 | } |
88 | 92 | ||
89 | Controls2.Button { | 93 | Controls2.Button { |
90 | |||
91 | anchors { | 94 | anchors { |
92 | verticalCenter: parent.verticalCenter | 95 | verticalCenter: parent.verticalCenter |
93 | left: parent.left | 96 | left: parent.left |
@@ -95,10 +98,10 @@ Controls2.Button { | |||
95 | 98 | ||
96 | //iconName: "view-refresh" | 99 | //iconName: "view-refresh" |
97 | text: "Sync" | 100 | text: "Sync" |
98 | enabled: syncAction.ready | 101 | enabled: folderController.synchronizeAction.enabled |
99 | |||
100 | onClicked: { | 102 | onClicked: { |
101 | syncAction.execute() | 103 | folderController.synchronizeAction.execute() |
104 | popup.close() | ||
102 | } | 105 | } |
103 | } | 106 | } |
104 | } | 107 | } |