Merge lp:~alecu/unity-scope-click/confirm-uninstalls into lp:unity-scope-click

Proposed by Alejandro J. Cura
Status: Merged
Approved by: Alejandro J. Cura
Approved revision: 60
Merged at revision: 66
Proposed branch: lp:~alecu/unity-scope-click/confirm-uninstalls
Merge into: lp:unity-scope-click
Prerequisite: lp:~alecu/unity-scope-click/download-errors
Diff against target: 43 lines (+13/-1)
1 file modified
src/click-scope.vala (+13/-1)
To merge this branch: bzr merge lp:~alecu/unity-scope-click/confirm-uninstalls
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
dobey (community) Approve
Review via email: mp+188726@code.launchpad.net

Commit message

Ask for confirmation before uninstall

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
dobey (dobey) wrote :

17 + var message = "Uninstall this app will delete all the related information. Are you sure you want to uninstall?";
18 + var preview = new Unity.GenericPreview("Confirmation", message, null);
19 + preview.add_action (new Unity.PreviewAction (ACTION_CLOSE_PREVIEW, ("Not anymore"), null));
20 + preview.add_action (new Unity.PreviewAction (ACTION_CONFIRM_UNINSTALL, ("Yes Uninstall"), null));

The text here should be changed, I think.

We should probably use "Remove" rather than "Uninstall" in the UI, For the message, I would suggest:

"Removing this application will delete all its information. Do you want to continue?"

And for the buttons, I would use "Cancel" and "Remove" respectively.

Also, we should use "application" in all UI, and not the short-hand "app."

review: Needs Fixing
Revision history for this message
Alejandro J. Cura (alecu) wrote :

On Wed, Oct 2, 2013 at 10:50 AM, Rodney Dawes
<email address hidden> wrote:
> Review: Needs Fixing
>
> 17 + var message = "Uninstall this app will delete all the related information. Are you sure you want to uninstall?";
> 18 + var preview = new Unity.GenericPreview("Confirmation", message, null);
> 19 + preview.add_action (new Unity.PreviewAction (ACTION_CLOSE_PREVIEW, ("Not anymore"), null));
> 20 + preview.add_action (new Unity.PreviewAction (ACTION_CONFIRM_UNINSTALL, ("Yes Uninstall"), null));
>
> The text here should be changed, I think.
>
> We should probably use "Remove" rather than "Uninstall" in the UI, For the message, I would suggest:
>
> "Removing this application will delete all its information. Do you want to continue?"
>
> And for the buttons, I would use "Cancel" and "Remove" respectively.
>
> Also, we should use "application" in all UI, and not the short-hand "app."

Thanks for your review.
I copied these texts from the UX spec document. If it's ok with you,
let's land this branch as it is, and I'll ask Design to check these
texts with a copy editor.

Revision history for this message
Alejandro J. Cura (alecu) wrote :

I've opened this bug to get UX input on this issue: #1234211

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
dobey (dobey) :
review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Alejandro J. Cura (alecu) wrote :

This seems to be failing due to some error with launchpad servers.

Revision history for this message
Francis Ginther (fginther) wrote :

Transient network error, best course of action is to re-approve.

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

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/click-scope.vala'
2--- src/click-scope.vala 2013-10-02 15:45:53 +0000
3+++ src/click-scope.vala 2013-10-02 15:45:53 +0000
4@@ -20,6 +20,7 @@
5 private const string ACTION_OPEN_CLICK = "open_click";
6 private const string ACTION_PIN_TO_LAUNCHER = "pin_to_launcher";
7 private const string ACTION_UNINSTALL_CLICK = "uninstall_click";
8+private const string ACTION_CONFIRM_UNINSTALL = "confirm_uninstall";
9 private const string ACTION_CLOSE_PREVIEW = "close_preview";
10 private const string ACTION_OPEN_ACCOUNTS = "open_accounts";
11
12@@ -92,6 +93,14 @@
13 return preview;
14 }
15
16+ Unity.Preview build_uninstall_confirmation_preview () {
17+ var message = "Uninstall this app will delete all the related information. Are you sure you want to uninstall?";
18+ var preview = new Unity.GenericPreview("Confirmation", message, null);
19+ preview.add_action (new Unity.PreviewAction (ACTION_CLOSE_PREVIEW, ("Not anymore"), null));
20+ preview.add_action (new Unity.PreviewAction (ACTION_CONFIRM_UNINSTALL, ("Yes Uninstall"), null));
21+ return preview;
22+ }
23+
24 internal async Unity.Preview build_app_preview(string app_id) {
25 var webservice = new ClickWebservice();
26 try {
27@@ -188,12 +197,15 @@
28 debug ("Let the dash launch the app: %s", application_uri);
29 return new Unity.ActivationResponse(Unity.HandledType.NOT_HANDLED, application_uri);
30 } else if (action_id == ACTION_UNINSTALL_CLICK) {
31+ preview = build_uninstall_confirmation_preview();
32+ } else if (action_id == ACTION_CONFIRM_UNINSTALL) {
33 yield click_if.uninstall(app_id);
34 results_invalidated(Unity.SearchType.GLOBAL);
35 results_invalidated(Unity.SearchType.DEFAULT);
36 return new Unity.ActivationResponse(Unity.HandledType.SHOW_DASH);
37 } else if (action_id == ACTION_CLOSE_PREVIEW) {
38- // default is to close the dash
39+ // default is to close the preview
40+ return new Unity.ActivationResponse(Unity.HandledType.SHOW_DASH);
41 } else if (action_id == ACTION_OPEN_ACCOUNTS) {
42 return new Unity.ActivationResponse (Unity.HandledType.NOT_HANDLED,
43 ACCOUNT_SETTINGS_URL);

Subscribers

People subscribed via source and target branches