Merge lp:~rodrigo-moya/ubuntuone-client/display-correct-message into lp:ubuntuone-client

Proposed by Rodrigo Moya
Status: Merged
Approved by: John Lenton
Approved revision: 661
Merged at revision: 663
Proposed branch: lp:~rodrigo-moya/ubuntuone-client/display-correct-message
Merge into: lp:ubuntuone-client
Diff against target: 91 lines (+15/-12)
1 file modified
nautilus/location-widget.c (+15/-12)
To merge this branch: bzr merge lp:~rodrigo-moya/ubuntuone-client/display-correct-message
Reviewer Review Type Date Requested Status
John Lenton (community) Approve
Vincenzo Di Somma (community) Approve
Review via email: mp+33852@code.launchpad.net

This proposal supersedes a proposal from 2010-08-26.

Commit message

Use spinner and gray out widgets when syncing/unsyncing

Description of the change

Show the correct help text on synchronized folders

To post a comment you must log in.
Revision history for this message
Vincenzo Di Somma (vds) : Posted in a previous version of this proposal
review: Approve
Revision history for this message
John Lenton (chipaca) : Posted in a previous version of this proposal
review: Approve
Revision history for this message
Vincenzo Di Somma (vds) :
review: Approve
Revision history for this message
John Lenton (chipaca) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'nautilus/location-widget.c'
2--- nautilus/location-widget.c 2010-08-26 19:34:47 +0000
3+++ nautilus/location-widget.c 2010-08-26 23:35:56 +0000
4@@ -24,12 +24,16 @@
5 #include <libsyncdaemon/syncdaemon-shares-interface.h>
6 #include "location-widget.h"
7
8+#define DISABLED_SYNC_HELP _("These files are not backed up and will not be available in your other computers")
9+#define ENABLED_SYNC_HELP _("These files are backed up and will be available in your other computers")
10+
11 G_DEFINE_TYPE(LocationWidget, location_widget, GTK_TYPE_HBOX)
12
13 static void
14 start_spinner (LocationWidget *location)
15 {
16- gtk_widget_hide (location->help_label);
17+ gtk_widget_set_sensitive (location->toggle_button, FALSE);
18+ gtk_widget_set_sensitive (location->help_label, FALSE);
19 gtk_widget_show (location->spinner);
20 gtk_spinner_start (GTK_SPINNER (location->spinner));
21 }
22@@ -39,6 +43,8 @@
23 {
24 gtk_spinner_stop (GTK_SPINNER (location->spinner));
25 gtk_widget_hide (location->spinner);
26+ gtk_widget_set_sensitive (location->help_label, TRUE);
27+ gtk_widget_set_sensitive (location->toggle_button, TRUE);
28 }
29
30 static void
31@@ -51,7 +57,7 @@
32 g_warning ("in folder_created_cb with path = %s", path);
33 if (g_strcmp0 (path, location->path) == 0) {
34 gtk_widget_set_sensitive (location->toggle_button, TRUE);
35- gtk_widget_hide (location->help_label);
36+ gtk_label_set_text (GTK_LABEL (location->help_label), ENABLED_SYNC_HELP);
37 if (!success) {
38 ubuntuone_show_error_dialog (location->uon, _("Error enabling folder"),
39 _("Could not enable folder %s for synchronizing to Ubuntu One"),
40@@ -70,12 +76,10 @@
41
42 path = syncdaemon_folder_info_get_path (folder_info);
43 if (g_strcmp0 (path, location->path) == 0) {
44- if (success) {
45- gtk_widget_set_sensitive (location->toggle_button, TRUE);
46- gtk_label_set_text (GTK_LABEL (location->help_label),
47- _("These files are not backed up and will not be available in your other computers"));
48- } else {
49- gtk_widget_set_sensitive (location->toggle_button, TRUE);
50+ stop_spinner (location);
51+ if (success)
52+ gtk_label_set_text (GTK_LABEL (location->help_label), DISABLED_SYNC_HELP);
53+ else {
54 ubuntuone_show_error_dialog (location->uon, _("Error disabling folder"),
55 _("Could not disable folder %s for synchronizing to Ubuntu One"),
56 location->path);
57@@ -128,7 +132,7 @@
58 location->path);
59 if (folder_info != NULL) {
60 if (ubuntuone_nautilus_check_shares_and_public_files (location->uon, folder_info, GTK_WIDGET (location))) {
61- gtk_widget_set_sensitive (location->toggle_button, FALSE);
62+ start_spinner (location);
63
64 syncdaemon_folders_interface_delete (
65 SYNCDAEMON_FOLDERS_INTERFACE (interface),
66@@ -165,7 +169,6 @@
67 gchar *labeltext;
68
69 start_spinner (location);
70- gtk_widget_set_sensitive (location->toggle_button, FALSE);
71
72 /* If there is no user authenticated, make Syncdaemon do so */
73 if (syncdaemon_authentication_has_credentials (
74@@ -268,7 +271,7 @@
75 gtk_box_pack_start (GTK_BOX (hbox), location->expander, TRUE, TRUE, 0);
76 location->info_label = gtk_expander_get_label_widget (GTK_EXPANDER (location->expander));
77
78- location->help_label = gtk_label_new (_("These files are not backed up and will not be available in your other computers"));
79+ location->help_label = gtk_label_new (DISABLED_SYNC_HELP);
80 gtk_widget_show (location->help_label);
81 gtk_label_set_use_markup (GTK_LABEL (location->help_label), TRUE);
82 gtk_label_set_line_wrap (GTK_LABEL (location->help_label), TRUE);
83@@ -375,7 +378,7 @@
84 if (!is_root || is_special_udf (uon, path))
85 gtk_widget_set_sensitive (location->toggle_button, FALSE);
86
87- gtk_label_set_text (GTK_LABEL (location->help_label), "");
88+ gtk_label_set_text (GTK_LABEL (location->help_label), ENABLED_SYNC_HELP);
89 } else {
90 /* Check if this is the 'Shared with me' folder */
91 if (is_special_udf (uon, path)) {

Subscribers

People subscribed via source and target branches