Merge lp:~radonapps/dekko/master into lp:~dpniel/dekko/trunk2

Proposed by Daniyaal Rasheed on 2015-12-24
Status: Approved
Approved by: Dan Chapman  on 2015-12-29
Approved revision: 579
Proposed branch: lp:~radonapps/dekko/master
Merge into: lp:~dpniel/dekko/trunk2
Diff against target: 86 lines (+31/-5)
2 files modified
qml/Composer/MessageComposer.qml (+10/-0)
qml/Dialogs/PasswordDialog.qml (+21/-5)
To merge this branch: bzr merge lp:~radonapps/dekko/master
Reviewer Review Type Date Requested Status
Dan Chapman  2015-12-24 Approve on 2015-12-29
Review via email: mp+281335@code.launchpad.net

Commit Message

Implemented prompt to check settings on connection & authentication errors

Description of the Change

Implements prompt to check settings on connection & authentication errors

This patch implements a prompt that will pop up whenever an error occurs
while trying to send an email. The prompt will both allow you to check your
settings in order to locate the source of the error, and it will allow you
to try sending the email again.

fixes: bug 1441505

To post a comment you must log in.
Dan Chapman  (dpniel) wrote :

Hey, sorry for the slow response.

So I have left a couple of comments inline that need addressing.

Not quite sure how you ended up with a bzr branch, out of curiosity did you find the git UI hard to navigate? Anyway i'll export this patch to git when it's complete so just carry on with bzr for now.

Hope you had a great xmas.

review: Needs Fixing
lp:~radonapps/dekko/master updated on 2015-12-28
578. By Daniyaal Rasheed on 2015-12-28

password dialog now waits for the password to be stored before closing.

Dan Chapman  (dpniel) wrote :

Looking good. Just one small fixup needed :-)

lp:~radonapps/dekko/master updated on 2015-12-29
579. By Daniyaal Rasheed on 2015-12-29

Closing Password Dialog will no longer close the imap connection/authentication process

Dan Chapman  (dpniel) wrote :

LGTM!

I'll export this and apply it to the git branch this afternoon.

Thanks alot for you contribution, i'll update your task now.

review: Approve

Unmerged revisions

579. By Daniyaal Rasheed on 2015-12-29

Closing Password Dialog will no longer close the imap connection/authentication process

578. By Daniyaal Rasheed on 2015-12-28

password dialog now waits for the password to be stored before closing.

577. By Daniyaal Rasheed on 2015-12-24

Implements prompt to check settings on connection & authentication errors

This patch implements a prompt that will pop up whenever an error occurs
while trying to send an email. The prompt will both allow you to check your
settings in order to locate the source of the error, and it will allow you
to try sending the email again.

fixes: bug 1441505

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/Composer/MessageComposer.qml'
2--- qml/Composer/MessageComposer.qml 2015-11-17 16:07:05 +0000
3+++ qml/Composer/MessageComposer.qml 2015-12-29 14:23:35 +0000
4@@ -288,6 +288,15 @@
5 }
6 );
7 }
8+ function compositionFailed(msg) {
9+ PopupUtils.open(Qt.resolvedUrl("../Dialogs/PasswordDialog.qml"), dekko, {
10+ type: "smtp",
11+ accountId: getSenderAccount().accountId,
12+ authErrorMessage: msg,
13+ onRetryBtnClicked: sendEmail()
14+ }
15+ );
16+ }
17
18 function getSenderAccount() {
19 return dekko.accountsManager.getFromId(
20@@ -561,6 +570,7 @@
21
22 Component.onCompleted: {
23 submissionManager.messageBuildFailed.connect(buildingFailed)
24+ submissionManager.failed.connect(compositionFailed)
25 submissionManager.passwordRequested.connect(function (user, host) {
26 dekko.submissionManager = submissionManager;
27 passwordManager.requestPassword(getSenderAccount().accountId, PasswordManager.SMTP);
28
29=== modified file 'qml/Dialogs/PasswordDialog.qml'
30--- qml/Dialogs/PasswordDialog.qml 2015-11-17 16:07:05 +0000
31+++ qml/Dialogs/PasswordDialog.qml 2015-12-29 14:23:35 +0000
32@@ -23,10 +23,10 @@
33
34 DialogBase {
35 id: passwordDialog
36-
37 property string type
38 property string accountId
39 property alias authErrorMessage: authErrorMessage.text
40+ signal retryBtnClicked()
41
42 readonly property string username: type === "imap" ? imapSettings.username : smtpSettings.username
43
44@@ -87,16 +87,24 @@
45 anchors.right: parent.right
46 spacing: units.gu(1)
47 Button {
48- text: qsTr("Cancel")
49+ text: qsTr("View Settings")
50 color: UbuntuColors.red
51 width: parent.width / 2 - units.gu(0.5)
52- onClicked: closeConnection.trigger()
53+ onClicked: {
54+ closeConnection.trigger()
55+ rootPageStack.push(Qt.resolvedUrl("../Settings/global/GlobalSettingsListView.qml"));
56+ }
57 }
58 Button {
59- text: qsTr("Confirm")
60+ id: retryBtn
61+ text: qsTr("Retry")
62 color: UbuntuColors.green
63 width: parent.width / 2 - units.gu(0.5)
64- onClicked: setPwdAction.trigger()
65+ property bool wantsToRetry: false
66+ onClicked: {
67+ wantsToRetry = true
68+ setPwdAction.trigger()
69+ }
70 }
71 }
72 ]
73@@ -114,5 +122,13 @@
74 id: passwordManager
75 accountId: passwordDialog.accountId
76 type: passwordDialog.type === "imap" ? PasswordManager.IMAP : PasswordManager.SMTP
77+ onPasswordStored: {
78+ if (id === accountId) {
79+ if (retryBtn.wantsToRetry)
80+ retryBtnClicked()
81+ if (type === "smtp")
82+ closeConnection.trigger()
83+ }
84+ }
85 }
86 }

Subscribers

People subscribed via source and target branches