Merge lp:~verzegnassi-stefano/quick-memo/fix-1411614 into lp:quick-memo/trunk

Proposed by Stefano Verzegnassi
Status: Merged
Approved by: Stefano Verzegnassi
Approved revision: 59
Merged at revision: 59
Proposed branch: lp:~verzegnassi-stefano/quick-memo/fix-1411614
Merge into: lp:quick-memo/trunk
Diff against target: 208 lines (+46/-47)
2 files modified
app/components/EditMemoPage.qml (+28/-29)
po/quick-memo.pot (+18/-18)
To merge this branch: bzr merge lp:~verzegnassi-stefano/quick-memo/fix-1411614
Reviewer Review Type Date Requested Status
Stefano Verzegnassi Pending
Review via email: mp+246831@code.launchpad.net

Commit message

Fix bug #1411614: Input lost after deleting memo

Description of the change

Fix bug #1411614: Input lost after deleting memo

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'app/components/EditMemoPage.qml'
--- app/components/EditMemoPage.qml 2014-11-03 00:21:23 +0000
+++ app/components/EditMemoPage.qml 2015-01-17 19:46:33 +0000
@@ -122,7 +122,8 @@
122122
123 onTriggered: {123 onTriggered: {
124 if (!canSave) { // Change timer inteval if can't save?124 if (!canSave) { // Change timer inteval if can't save?
125 PopupUtils.open(deleteDialog, memoPage, {emptyMemo: true})125 deleteDialog.emptyMemo = true;
126 deleteDialog.show();
126 } else {127 } else {
127 console.log("autoSaveTimer triggered... updating the note!")128 console.log("autoSaveTimer triggered... updating the note!")
128 saveNote()129 saveNote()
@@ -204,7 +205,7 @@
204 id: deleteMemo205 id: deleteMemo
205 text: i18n.tr("Delete memo")206 text: i18n.tr("Delete memo")
206 iconName: "delete"207 iconName: "delete"
207 onTriggered: PopupUtils.open(deleteDialog)208 onTriggered: deleteDialog.show()
208 visible: editMemo209 visible: editMemo
209 }210 }
210 Action {211 Action {
@@ -220,7 +221,8 @@
220 iconName: "back"221 iconName: "back"
221 onTriggered: {222 onTriggered: {
222 if (!canSave) {223 if (!canSave) {
223 PopupUtils.open(deleteDialog, memoPage, {emptyMemo: true})224 deleteDialog.emptyMemo = true;
225 deleteDialog.show();
224 } else {226 } else {
225 // Check if a saveNote request was made. If so, stop the timer and save before exiting the page.227 // Check if a saveNote request was made. If so, stop the timer and save before exiting the page.
226 if (autoSaveTimer.running) {228 if (autoSaveTimer.running) {
@@ -256,33 +258,30 @@
256 }258 }
257259
258 // *** DIALOGS ***260 // *** DIALOGS ***
259 Component {261 Dialog {
260 id: deleteDialog262 id: deleteDialog
261 Dialog {263
262 id: deleteDialogue264 property bool emptyMemo: false
263265
264 property bool emptyMemo: false266 title: emptyMemo ? i18n.tr("Empty memo") : i18n.tr("Delete memo")
265267 text: emptyMemo ? i18n.tr("This memo has no content.") : i18n.tr("Are you sure?")
266 title: emptyMemo ? i18n.tr("Empty memo") : i18n.tr("Delete memo")268
267 text: emptyMemo ? i18n.tr("This memo has no content.") : i18n.tr("Are you sure?")269 Button {
268270 text: i18n.tr("Cancel")
269 Button {271 gradient: UbuntuColors.greyGradient
270 text: i18n.tr("Cancel")272 onClicked: deleteDialog.hide()
271 gradient: UbuntuColors.greyGradient273 visible: !emptyMemo
272 onClicked: PopupUtils.close(deleteDialogue)274 }
273 visible: !emptyMemo275 Button {
274 }276 text: i18n.tr("Delete")
275 Button {277 color: UbuntuColors.orange
276 text: i18n.tr("Delete")278 onClicked: {
277 color: UbuntuColors.orange279 deleteDialog.hide()
278 onClicked: {280 pageStack.pop();
279 PopupUtils.close(deleteDialogue)281 pageStack.push(mainPage)
280 pageStack.pop();282 notes.deleteNote(index)
281 pageStack.push(mainPage)283
282 notes.deleteNote(index)284 root.showNotification(i18n.tr("Memo deleted!"))
283
284 root.showNotification(i18n.tr("Memo deleted!"))
285 }
286 }285 }
287 }286 }
288 }287 }
289288
=== modified file 'po/quick-memo.pot'
--- po/quick-memo.pot 2014-11-06 05:09:59 +0000
+++ po/quick-memo.pot 2015-01-17 19:46:33 +0000
@@ -8,7 +8,7 @@
8msgstr ""8msgstr ""
9"Project-Id-Version: \n"9"Project-Id-Version: \n"
10"Report-Msgid-Bugs-To: \n"10"Report-Msgid-Bugs-To: \n"
11"POT-Creation-Date: 2014-11-06 06:08+0100\n"11"POT-Creation-Date: 2015-01-17 20:43+0100\n"
12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14"Language-Team: LANGUAGE <LL@li.org>\n"14"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -54,11 +54,11 @@
54msgid "A big thanks to:"54msgid "A big thanks to:"
55msgstr ""55msgstr ""
5656
57#: ../app/components/AboutPage.qml:15357#: ../app/components/AboutPage.qml:158
58msgid "Copyright"58msgid "Copyright"
59msgstr ""59msgstr ""
6060
61#: ../app/components/AboutPage.qml:18561#: ../app/components/AboutPage.qml:190
62msgid "Close"62msgid "Close"
63msgstr ""63msgstr ""
6464
@@ -72,7 +72,7 @@
7272
73#: ../app/components/ColorDialog.qml:15173#: ../app/components/ColorDialog.qml:151
74#: ../app/components/EditMemoPage.qml:27074#: ../app/components/EditMemoPage.qml:270
75#: ../app/components/EditMemoPage.qml:299 ../app/components/MainPage.qml:28375#: ../app/components/EditMemoPage.qml:298 ../app/components/MainPage.qml:283
76#: ../app/components/MultiSelectionHandler.qml:3376#: ../app/components/MultiSelectionHandler.qml:33
77msgid "Cancel"77msgid "Cancel"
78msgstr ""78msgstr ""
@@ -91,7 +91,7 @@
9191
92#. TRANSLATORS: This is a custom text for the "enter" key of92#. TRANSLATORS: This is a custom text for the "enter" key of
93#. the on-screen keyboard (max 4 char, so it's not elided)93#. the on-screen keyboard (max 4 char, so it's not elided)
94#: ../app/components/EditMemoPage.qml:83 ../app/components/ListManager.qml:22994#: ../app/components/EditMemoPage.qml:83 ../app/components/ListManager.qml:287
95msgid "Next"95msgid "Next"
96msgstr ""96msgstr ""
9797
@@ -104,15 +104,15 @@
104msgid "Last update: %1"104msgid "Last update: %1"
105msgstr ""105msgstr ""
106106
107#: ../app/components/EditMemoPage.qml:190107#: ../app/components/EditMemoPage.qml:191
108msgid "Memo saved!"108msgid "Memo saved!"
109msgstr ""109msgstr ""
110110
111#: ../app/components/EditMemoPage.qml:196111#: ../app/components/EditMemoPage.qml:197
112msgid "Save"112msgid "Save"
113msgstr ""113msgstr ""
114114
115#: ../app/components/EditMemoPage.qml:205115#: ../app/components/EditMemoPage.qml:206
116#: ../app/components/EditMemoPage.qml:266 ../app/components/MainPage.qml:240116#: ../app/components/EditMemoPage.qml:266 ../app/components/MainPage.qml:240
117#: ../app/components/MainPage.qml:279117#: ../app/components/MainPage.qml:279
118msgid "Delete memo"118msgid "Delete memo"
@@ -120,17 +120,17 @@
120msgstr[0] ""120msgstr[0] ""
121msgstr[1] ""121msgstr[1] ""
122122
123#: ../app/components/EditMemoPage.qml:212 ../app/components/MainPage.qml:233123#: ../app/components/EditMemoPage.qml:213 ../app/components/MainPage.qml:233
124msgid "Change memo color"124msgid "Change memo color"
125msgstr ""125msgstr ""
126126
127#: ../app/components/EditMemoPage.qml:238 ../app/components/MainPage.qml:268127#: ../app/components/EditMemoPage.qml:240 ../app/components/MainPage.qml:268
128msgid "Memo updated!"128msgid "Memo updated!"
129msgid_plural "Memos updated!"129msgid_plural "Memos updated!"
130msgstr[0] ""130msgstr[0] ""
131msgstr[1] ""131msgstr[1] ""
132132
133#: ../app/components/EditMemoPage.qml:253133#: ../app/components/EditMemoPage.qml:255
134msgid "Memo aborted!"134msgid "Memo aborted!"
135msgstr ""135msgstr ""
136136
@@ -156,15 +156,15 @@
156msgstr[0] ""156msgstr[0] ""
157msgstr[1] ""157msgstr[1] ""
158158
159#: ../app/components/EditMemoPage.qml:294
160msgid "Discard changes?"
161msgstr ""
162
159#: ../app/components/EditMemoPage.qml:295163#: ../app/components/EditMemoPage.qml:295
160msgid "Discard changes?"
161msgstr ""
162
163#: ../app/components/EditMemoPage.qml:296
164msgid "Your memo will be PERMANENTLY lost."164msgid "Your memo will be PERMANENTLY lost."
165msgstr ""165msgstr ""
166166
167#: ../app/components/EditMemoPage.qml:304167#: ../app/components/EditMemoPage.qml:303
168msgid "Go back!"168msgid "Go back!"
169msgstr ""169msgstr ""
170170
@@ -177,11 +177,11 @@
177msgstr ""177msgstr ""
178178
179#. TRANSLATORS: Text of a button used for add an item in the To-do list.179#. TRANSLATORS: Text of a button used for add an item in the To-do list.
180#: ../app/components/ListManager.qml:96180#: ../app/components/ListManager.qml:98
181msgid "Add item"181msgid "Add item"
182msgstr ""182msgstr ""
183183
184#: ../app/components/ListManager.qml:229184#: ../app/components/ListManager.qml:287
185msgid "Add"185msgid "Add"
186msgstr ""186msgstr ""
187187

Subscribers

People subscribed via source and target branches

to all changes: