diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-04-24 17:51:18 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-04-24 17:51:18 +0200 |
commit | 47e0f0c14b4bbcc64cb8bf562c566d29313db7ad (patch) | |
tree | c50362e5c6f68a8994bcc7177c7d401b48179371 /components | |
parent | b8962ee2d35772ab4f2bed1c415a386207067157 (diff) | |
download | kube-47e0f0c14b4bbcc64cb8bf562c566d29313db7ad.tar.gz kube-47e0f0c14b4bbcc64cb8bf562c566d29313db7ad.zip |
Ported more actions to the fabric
Diffstat (limited to 'components')
-rw-r--r-- | components/kube/contents/ui/Kube.qml | 56 |
1 files changed, 16 insertions, 40 deletions
diff --git a/components/kube/contents/ui/Kube.qml b/components/kube/contents/ui/Kube.qml index 81c678bd..8092a073 100644 --- a/components/kube/contents/ui/Kube.qml +++ b/components/kube/contents/ui/Kube.qml | |||
@@ -36,59 +36,35 @@ Controls2.ApplicationWindow { | |||
36 | 36 | ||
37 | visible: true | 37 | visible: true |
38 | 38 | ||
39 | Kube.NotificationHandler { | 39 | Kube.Listener { |
40 | id: notificationHandler | 40 | filter: Kube.Messages.notification |
41 | function handler(n) { | 41 | onMessageReceived: { |
42 | console.warn("We got a notification: ", n.message) | 42 | console.warn("We got a notification: ", message.message) |
43 | if (n.type == Kube.Notification.Warning) { | 43 | if (message.type == Kube.Notification.Warning) { |
44 | console.warn("And it's a warning!", n.type) | 44 | console.warn("And it's a warning!", message.type) |
45 | } | 45 | } |
46 | notificationPopup.notify(n.message); | 46 | notificationPopup.notify(message.message); |
47 | } | 47 | } |
48 | } | 48 | } |
49 | 49 | ||
50 | //BEGIN Actions | 50 | Kube.Listener { |
51 | Kube.Context { | 51 | filter: Kube.Messages.reply |
52 | id: maillistcontext | 52 | onMessageReceived: { |
53 | property variant mail | 53 | composer.loadMessage(message.mail, false) |
54 | property bool isDraft | ||
55 | mail: mailListView.currentMail | ||
56 | isDraft: mailListView.isDraft | ||
57 | } | ||
58 | |||
59 | Kube.Action { | ||
60 | id: replyAction | ||
61 | actionId: "org.kde.kube.actions.reply" | ||
62 | context: maillistcontext | ||
63 | } | ||
64 | //END Actions | ||
65 | |||
66 | //BEGIN ActionHandler | ||
67 | Kube.ActionHandler { | ||
68 | actionId: "org.kde.kube.actions.reply" | ||
69 | function isReady(context) { | ||
70 | return context.mail ? true : false; | ||
71 | } | ||
72 | |||
73 | function handler(context) { | ||
74 | composer.loadMessage(context.mail, false) | ||
75 | composer.open() | 54 | composer.open() |
76 | } | 55 | } |
77 | } | 56 | } |
78 | 57 | ||
79 | Kube.ActionHandler { | 58 | Kube.Listener { |
80 | actionId: "org.kde.kube.actions.edit" | 59 | filter: Kube.Messages.edit |
81 | function isReady(context) { | 60 | onMessageReceived: { |
82 | return context.mail && context.isDraft; | 61 | composer.loadMessage(message.mail, true) |
83 | } | ||
84 | function handler(context) { | ||
85 | composer.loadMessage(context.mail, true) | ||
86 | composer.open() | 62 | composer.open() |
87 | } | 63 | } |
88 | } | 64 | } |
89 | //END ActionHandler | ||
90 | 65 | ||
91 | //Controller | 66 | //Controller |
67 | //TODO replace | ||
92 | Kube.FolderController { | 68 | Kube.FolderController { |
93 | id: folderController | 69 | id: folderController |
94 | } | 70 | } |