summaryrefslogtreecommitdiffstats
path: root/components/mail/contents/ui/main.qml
diff options
context:
space:
mode:
authorMichael Bohlender <michael.bohlender@kdemail.net>2016-11-16 19:17:33 +0100
committerMichael Bohlender <michael.bohlender@kdemail.net>2016-11-16 19:17:33 +0100
commitc685ac89abed2b1cb61c63f361f414d6f9852cb9 (patch)
tree2b8b0559372609a7dd82c15f637841b5b826b98b /components/mail/contents/ui/main.qml
parentc10ea09be56a1945c9025afaaf0c98b7c37657e7 (diff)
downloadkube-c685ac89abed2b1cb61c63f361f414d6f9852cb9.tar.gz
kube-c685ac89abed2b1cb61c63f361f414d6f9852cb9.zip
port composer to qqc2 popup
Diffstat (limited to 'components/mail/contents/ui/main.qml')
-rw-r--r--components/mail/contents/ui/main.qml76
1 files changed, 43 insertions, 33 deletions
diff --git a/components/mail/contents/ui/main.qml b/components/mail/contents/ui/main.qml
index c891ea5f..c4340465 100644
--- a/components/mail/contents/ui/main.qml
+++ b/components/mail/contents/ui/main.qml
@@ -86,6 +86,35 @@ Controls2.ApplicationWindow {
86 } 86 }
87 //END Actions 87 //END Actions
88 88
89 //BEGIN ActionHandler
90
91 //TODO
92 /*
93 KubeAction.ActionHandler {
94 actionId: "org.kde.kube.actions.reply"
95 function isReady(context) {
96 return context.mail ? true : false;
97 }
98
99 function handler(context) {
100 var component = composerComponent.createObject(app)
101 component.loadMessage(context.mail, false)
102 }
103 }
104
105 KubeAction.ActionHandler {
106 actionId: "org.kde.kube.actions.edit"
107 function isReady(context) {
108 return context.mail && context.isDraft;
109 }
110 function handler(context) {
111 var component= composerComponent.createObject(app, {"draftMessage": context.mail})
112 component.loadMessage(context.mail, true)
113 }
114 }
115 */
116 //END ActionHandler
117
89 //BEGIN Shortcuts 118 //BEGIN Shortcuts
90 Shortcut { 119 Shortcut {
91 sequence: StandardKey.Refresh 120 sequence: StandardKey.Refresh
@@ -218,38 +247,6 @@ Controls2.ApplicationWindow {
218 height: parent.height 247 height: parent.height
219 width: mailView.width 248 width: mailView.width
220 249
221 Component {
222 id: composerComponent
223
224 KubeComponents.FocusComposer {
225 id: composer
226 anchors.fill: parent
227 }
228 }
229
230 KubeAction.ActionHandler {
231 actionId: "org.kde.kube.actions.reply"
232 function isReady(context) {
233 return context.mail ? true : false;
234 }
235
236 function handler(context) {
237 var component = composerComponent.createObject(app)
238 component.loadMessage(context.mail, false)
239 }
240 }
241
242 KubeAction.ActionHandler {
243 actionId: "org.kde.kube.actions.edit"
244 function isReady(context) {
245 return context.mail && context.isDraft;
246 }
247 function handler(context) {
248 var component= composerComponent.createObject(app, {"draftMessage": context.mail})
249 component.loadMessage(context.mail, true)
250 }
251 }
252
253 Button { 250 Button {
254 id: newMailButton 251 id: newMailButton
255 252
@@ -257,7 +254,7 @@ Controls2.ApplicationWindow {
257 text: "New Email" 254 text: "New Email"
258 tooltip: "compose new email" 255 tooltip: "compose new email"
259 onClicked: { 256 onClicked: {
260 composerComponent.createObject(app) 257 composer.open()
261 } 258 }
262 } 259 }
263 260
@@ -305,4 +302,17 @@ Controls2.ApplicationWindow {
305 } 302 }
306 } 303 }
307 //END ToolBar 304 //END ToolBar
305
306 //BEGIN Composer
307 KubeComponents.FocusComposer {
308 id: composer
309
310 height: app.height * 0.85
311 width: app.width * 0.85
312
313 x: app.width * 0.075
314 y: toolbar.y + toolbar.height
315 }
316 //END Composer
317
308} 318}