Merge lp:~sergiusens/ciborium/1372774 into lp:ciborium

Proposed by Sergio Schvezov
Status: Merged
Approved by: Ricardo Salveti
Approved revision: 63
Merged at revision: 59
Proposed branch: lp:~sergiusens/ciborium/1372774
Merge into: lp:ciborium
Diff against target: 175 lines (+119/-5)
4 files modified
po/ciborium.pot (+51/-1)
share/ciborium/qml/components/SafeRemoval.qml (+64/-0)
share/ciborium/qml/main.qml (+2/-3)
update_translations.sh (+2/-1)
To merge this branch: bzr merge lp:~sergiusens/ciborium/1372774
Reviewer Review Type Date Requested Status
Manuel de la Peña (community) Approve
Ricardo Salveti (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+235815@code.launchpad.net

Commit message

Adding a pre remove and post remove dialog

Description of the change

The dialog here is based out of the Format one.

To post a comment you must log in.
lp:~sergiusens/ciborium/1372774 updated
60. By Sergio Schvezov

Updating translations to fetch qml files as well

61. By Sergio Schvezov

Updated translation template

62. By Sergio Schvezov

Disabling the button after "safely removing"

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
lp:~sergiusens/ciborium/1372774 updated
63. By Sergio Schvezov

Updating translation pot

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Ricardo Salveti (rsalveti) wrote :

LGTM, works fine.

review: Approve
Revision history for this message
Manuel de la Peña (mandel) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'po/ciborium.pot'
2--- po/ciborium.pot 2014-09-17 18:03:37 +0000
3+++ po/ciborium.pot 2014-09-24 20:40:29 +0000
4@@ -8,7 +8,7 @@
5 msgstr ""
6 "Project-Id-Version: ciborium\n"
7 "Report-Msgid-Bugs-To: \n"
8-"POT-Creation-Date: 2014-09-17 15:03-0300\n"
9+"POT-Creation-Date: 2014-09-24 17:38-0300\n"
10 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
11 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12 "Language-Team: LANGUAGE <LL@li.org>\n"
13@@ -76,6 +76,56 @@
14 msgid "Only %d%% is available on the external storage device"
15 msgstr ""
16
17+#: share/ciborium/qml/main.qml:33
18+msgid "SD Card Management"
19+msgstr ""
20+
21+#: share/ciborium/qml/components/SafeRemoval.qml:17
22+msgid "Safe to remove"
23+msgstr ""
24+
25+#: share/ciborium/qml/components/SafeRemoval.qml:18
26+msgid "You can now safely remove the device"
27+msgstr ""
28+
29+#: share/ciborium/qml/components/SafeRemoval.qml:21
30+msgid "Ok"
31+msgstr ""
32+
33+#: share/ciborium/qml/components/SafeRemoval.qml:36
34+msgid "Confirm remove"
35+msgstr ""
36+
37+#: share/ciborium/qml/components/SafeRemoval.qml:37
38+msgid "Files on the device can't be accessed after removing"
39+msgstr ""
40+
41+#: share/ciborium/qml/components/SafeRemoval.qml:40
42+#: share/ciborium/qml/components/FormatDialog.qml:21
43+msgid "Cancel"
44+msgstr ""
45+
46+#: share/ciborium/qml/components/SafeRemoval.qml:44
47+msgid "Continue"
48+msgstr ""
49+
50+#: share/ciborium/qml/components/SafeRemoval.qml:59
51+msgid "Safely Remove"
52+msgstr ""
53+
54+#: share/ciborium/qml/components/FormatDialog.qml:17
55+#: share/ciborium/qml/components/FormatDialog.qml:37
56+msgid "Format"
57+msgstr ""
58+
59+#: share/ciborium/qml/components/FormatDialog.qml:18
60+msgid "This action will wipe the content from the device"
61+msgstr ""
62+
63+#: share/ciborium/qml/components/FormatDialog.qml:25
64+msgid "Continue with format"
65+msgstr ""
66+
67 #: share/applications/ciborium.desktop.tr.h:1
68 msgid "External Drives"
69 msgstr ""
70
71=== added file 'share/ciborium/qml/components/SafeRemoval.qml'
72--- share/ciborium/qml/components/SafeRemoval.qml 1970-01-01 00:00:00 +0000
73+++ share/ciborium/qml/components/SafeRemoval.qml 2014-09-24 20:40:29 +0000
74@@ -0,0 +1,64 @@
75+import QtQuick 2.0
76+import Ubuntu.Components 1.1
77+import Ubuntu.Components.Popups 1.0
78+
79+Item {
80+ property int driveIndex
81+
82+ height: childrenRect.height
83+ width: childrenRect.width
84+
85+ Component {
86+ id: dialogRemoved
87+
88+ Dialog {
89+ id: dialogueRemoved
90+
91+ title: i18n.tr("Safe to remove")
92+ text: i18n.tr("You can now safely remove the device")
93+
94+ Button {
95+ text: i18n.tr("Ok")
96+ color: UbuntuColors.orange
97+ onClicked: {
98+ PopupUtils.close(dialogueRemoved)
99+ }
100+ }
101+ }
102+ }
103+
104+ Component {
105+ id: dialogConfirmRemove
106+
107+ Dialog {
108+ id: dialogueConfirmRemove
109+
110+ title: i18n.tr("Confirm remove")
111+ text: i18n.tr("Files on the device can't be accessed after removing")
112+
113+ Button {
114+ text: i18n.tr("Cancel")
115+ onClicked: PopupUtils.close(dialogueConfirmRemove)
116+ }
117+ Button {
118+ text: i18n.tr("Continue")
119+ color: UbuntuColors.orange
120+ onClicked: {
121+ driveCtrl.driveUnmount(index)
122+ PopupUtils.close(dialogueConfirmRemove)
123+ saferemoval.enabled= false
124+ PopupUtils.open(dialogRemoved)
125+ }
126+ }
127+ }
128+ }
129+
130+ Button {
131+ anchors.centerIn: parent
132+ id: saferemoval
133+ text: i18n.tr("Safely Remove")
134+ onClicked: {
135+ PopupUtils.open(dialogConfirmRemove)
136+ }
137+ }
138+}
139
140=== modified file 'share/ciborium/qml/main.qml'
141--- share/ciborium/qml/main.qml 2014-08-26 22:19:48 +0000
142+++ share/ciborium/qml/main.qml 2014-09-24 20:40:29 +0000
143@@ -83,9 +83,8 @@
144 FormatDialog {
145 driveIndex: index
146 }
147- Button {
148- text: i18n.tr("Safely Remove")
149- onClicked: driveCtrl.driveUnmount(index)
150+ SafeRemoval {
151+ driveIndex: index
152 }
153 }
154 }
155
156=== modified file 'update_translations.sh'
157--- update_translations.sh 2014-09-03 20:19:03 +0000
158+++ update_translations.sh 2014-09-24 20:40:29 +0000
159@@ -1,6 +1,7 @@
160 #!/bin/sh
161
162 sources=$(find . -name '*.go' | xargs)
163+qml=$(find . -name '*.qml' | xargs)
164 domain='ciborium'
165 pot_file=po/$domain.pot
166 desktop=share/applications/$domain.desktop
167@@ -16,7 +17,7 @@
168 --keyword=Gettext --keyword=tr --keyword=tr:1,2 --keyword=N_ \
169 --package-name=$domain \
170 --copyright-holder='Canonical Ltd.' \
171- $sources $desktop.tr.h
172+ $sources $qml $desktop.tr.h
173
174 echo Removing $desktop.tr.h $desktop.tr
175 rm $desktop.tr.h $desktop.tr

Subscribers

People subscribed via source and target branches