Merge lp:~rodrigo-moya/ubuntuone-client/upgrade-on-quota-exceeded into lp:ubuntuone-client

Proposed by Rodrigo Moya
Status: Merged
Approved by: Natalia Bidart
Approved revision: 602
Merge reported by: Guillermo Gonzalez
Merged at revision: not available
Proposed branch: lp:~rodrigo-moya/ubuntuone-client/upgrade-on-quota-exceeded
Merge into: lp:ubuntuone-client
Diff against target: 91 lines (+21/-19)
1 file modified
gsd-plugin/gsd-ubuntuone.c (+21/-19)
To merge this branch: bzr merge lp:~rodrigo-moya/ubuntuone-client/upgrade-on-quota-exceeded
Reviewer Review Type Date Requested Status
Natalia Bidart (community) Approve
Alejandro J. Cura (community) Approve
Review via email: mp+31159@code.launchpad.net

Commit message

Some minor tweaks to upgrade functionality.

Description of the change

Some minor tweaks

To post a comment you must log in.
Revision history for this message
Natalia Bidart (nataliabidart) wrote :

The source file has a mixture of tabs and spaces that I think should be fixed before landing.

review: Needs Fixing
602. By Rodrigo Moya

Fix spacing

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

Yay fixes!

review: Approve
Revision history for this message
Natalia Bidart (nataliabidart) wrote :

Thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'gsd-plugin/gsd-ubuntuone.c'
--- gsd-plugin/gsd-ubuntuone.c 2010-07-14 19:51:54 +0000
+++ gsd-plugin/gsd-ubuntuone.c 2010-07-29 14:43:40 +0000
@@ -38,13 +38,15 @@
38#define NO_SPACE_SHARE _("There is no available space on the folder:\n\"%s\" shared by %s")38#define NO_SPACE_SHARE _("There is no available space on the folder:\n\"%s\" shared by %s")
39#define NO_SPACE_TITLE _("Out of space")39#define NO_SPACE_TITLE _("Out of space")
40#define UPGRADE_SUBSCRIPTION_TEXT _("Upgrade Subscription")40#define UPGRADE_SUBSCRIPTION_TEXT _("Upgrade Subscription")
41#define UPGRADE_SUBSCRIPTION_URI _("http://one.ubuntu.com/plans/")41#define UPGRADE_SUBSCRIPTION_URI "http://one.ubuntu.com/plans/"
4242
43static void dialog_closed_callback (GtkDialog *dialog,43static void
44 gint response_id,44dialog_closed_callback (GtkDialog *dialog,
45 gpointer user_data)45 gint response_id,
46 gpointer user_data)
46{47{
47 GsdUbuntuOne *plugin = GSD_UBUNTUONE (user_data);48 GsdUbuntuOne *plugin = GSD_UBUNTUONE (user_data);
49
48 g_debug ("dialog closed %d", response_id);50 g_debug ("dialog closed %d", response_id);
49 gtk_widget_destroy (GTK_WIDGET (plugin->out_of_space_dialog));51 gtk_widget_destroy (GTK_WIDGET (plugin->out_of_space_dialog));
50 plugin->out_of_space_dialog = NULL;52 plugin->out_of_space_dialog = NULL;
@@ -57,8 +59,6 @@
57 gboolean show_upgrade_link)59 gboolean show_upgrade_link)
58{60{
59 GError *error = NULL;61 GError *error = NULL;
60 GtkWidget *upgrade_link;
61 GtkResponseType result;
6262
63 if (plugin->out_of_space_dialog != NULL) {63 if (plugin->out_of_space_dialog != NULL) {
64 gtk_widget_destroy (GTK_WIDGET (plugin->out_of_space_dialog));64 gtk_widget_destroy (GTK_WIDGET (plugin->out_of_space_dialog));
@@ -79,20 +79,18 @@
79 gtk_window_set_icon_name (GTK_WINDOW (plugin->out_of_space_dialog), "ubuntuone");79 gtk_window_set_icon_name (GTK_WINDOW (plugin->out_of_space_dialog), "ubuntuone");
80 gtk_window_set_position (GTK_WINDOW (plugin->out_of_space_dialog), GTK_WIN_POS_CENTER);80 gtk_window_set_position (GTK_WINDOW (plugin->out_of_space_dialog), GTK_WIN_POS_CENTER);
8181
8282 if (show_upgrade_link) {
83 upgrade_link = gtk_link_button_new_with_label (UPGRADE_SUBSCRIPTION_URI,83 GtkWidget *upgrade_link;
84 UPGRADE_SUBSCRIPTION_TEXT);84
8585 upgrade_link = gtk_link_button_new_with_label (UPGRADE_SUBSCRIPTION_URI,
86 gtk_dialog_add_action_widget (GTK_DIALOG (plugin->out_of_space_dialog),86 UPGRADE_SUBSCRIPTION_TEXT);
87 upgrade_link, 0);87 gtk_widget_show (GTK_WIDGET (upgrade_link));
8888 gtk_dialog_add_action_widget (GTK_DIALOG (plugin->out_of_space_dialog),
89 89 upgrade_link, 0);
90 if (show_upgrade_link) {90 }
91 gtk_widget_show (GTK_WIDGET (upgrade_link));
92 }
9391
94 g_signal_connect (G_OBJECT (plugin->out_of_space_dialog), "response",92 g_signal_connect (G_OBJECT (plugin->out_of_space_dialog), "response",
95 G_CALLBACK (dialog_closed_callback), plugin);93 G_CALLBACK (dialog_closed_callback), plugin);
96 gtk_widget_show (plugin->out_of_space_dialog);94 gtk_widget_show (plugin->out_of_space_dialog);
97}95}
9896
@@ -104,9 +102,11 @@
104{102{
105 gchar * volume_type;103 gchar * volume_type;
106 GsdUbuntuOne *plugin = GSD_UBUNTUONE (user_data);104 GsdUbuntuOne *plugin = GSD_UBUNTUONE (user_data);
105
107 volume_type = g_hash_table_lookup (file_info, "type");106 volume_type = g_hash_table_lookup (file_info, "type");
108 if (volume_type != NULL && strcmp (volume_type, "Share") == 0) {107 if (g_strcmp0 (volume_type, "Share") == 0) {
109 gchar * other_visible_name, * path, * message;108 gchar * other_visible_name, * path, * message;
109
110 other_visible_name = g_hash_table_lookup (file_info, "other_visible_name");110 other_visible_name = g_hash_table_lookup (file_info, "other_visible_name");
111 path = g_hash_table_lookup (file_info, "path");111 path = g_hash_table_lookup (file_info, "path");
112 message = g_strdup_printf (NO_SPACE_SHARE, path, other_visible_name);112 message = g_strdup_printf (NO_SPACE_SHARE, path, other_visible_name);
@@ -121,6 +121,7 @@
121delayed_syncdaemon_start (gpointer data)121delayed_syncdaemon_start (gpointer data)
122{122{
123 GsdUbuntuOne *plugin;123 GsdUbuntuOne *plugin;
124
124 plugin = GSD_UBUNTUONE (data);125 plugin = GSD_UBUNTUONE (data);
125 g_debug ("Performing delayed syncdaemon init");126 g_debug ("Performing delayed syncdaemon init");
126127
@@ -140,6 +141,7 @@
140gsd_ubuntuone_activate (GnomeSettingsPlugin *gsp_object)141gsd_ubuntuone_activate (GnomeSettingsPlugin *gsp_object)
141{142{
142 GsdUbuntuOne *plugin = GSD_UBUNTUONE (gsp_object);143 GsdUbuntuOne *plugin = GSD_UBUNTUONE (gsp_object);
144
143 g_timeout_add (DELAYED_START_TIMEOUT, delayed_syncdaemon_start, plugin);145 g_timeout_add (DELAYED_START_TIMEOUT, delayed_syncdaemon_start, plugin);
144}146}
145147

Subscribers

People subscribed via source and target branches