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
1=== modified file 'gsd-plugin/gsd-ubuntuone.c'
2--- gsd-plugin/gsd-ubuntuone.c 2010-07-14 19:51:54 +0000
3+++ gsd-plugin/gsd-ubuntuone.c 2010-07-29 14:43:40 +0000
4@@ -38,13 +38,15 @@
5 #define NO_SPACE_SHARE _("There is no available space on the folder:\n\"%s\" shared by %s")
6 #define NO_SPACE_TITLE _("Out of space")
7 #define UPGRADE_SUBSCRIPTION_TEXT _("Upgrade Subscription")
8-#define UPGRADE_SUBSCRIPTION_URI _("http://one.ubuntu.com/plans/")
9+#define UPGRADE_SUBSCRIPTION_URI "http://one.ubuntu.com/plans/"
10
11-static void dialog_closed_callback (GtkDialog *dialog,
12- gint response_id,
13- gpointer user_data)
14+static void
15+dialog_closed_callback (GtkDialog *dialog,
16+ gint response_id,
17+ gpointer user_data)
18 {
19 GsdUbuntuOne *plugin = GSD_UBUNTUONE (user_data);
20+
21 g_debug ("dialog closed %d", response_id);
22 gtk_widget_destroy (GTK_WIDGET (plugin->out_of_space_dialog));
23 plugin->out_of_space_dialog = NULL;
24@@ -57,8 +59,6 @@
25 gboolean show_upgrade_link)
26 {
27 GError *error = NULL;
28- GtkWidget *upgrade_link;
29- GtkResponseType result;
30
31 if (plugin->out_of_space_dialog != NULL) {
32 gtk_widget_destroy (GTK_WIDGET (plugin->out_of_space_dialog));
33@@ -79,20 +79,18 @@
34 gtk_window_set_icon_name (GTK_WINDOW (plugin->out_of_space_dialog), "ubuntuone");
35 gtk_window_set_position (GTK_WINDOW (plugin->out_of_space_dialog), GTK_WIN_POS_CENTER);
36
37-
38- upgrade_link = gtk_link_button_new_with_label (UPGRADE_SUBSCRIPTION_URI,
39- UPGRADE_SUBSCRIPTION_TEXT);
40-
41- gtk_dialog_add_action_widget (GTK_DIALOG (plugin->out_of_space_dialog),
42- upgrade_link, 0);
43-
44-
45- if (show_upgrade_link) {
46- gtk_widget_show (GTK_WIDGET (upgrade_link));
47- }
48+ if (show_upgrade_link) {
49+ GtkWidget *upgrade_link;
50+
51+ upgrade_link = gtk_link_button_new_with_label (UPGRADE_SUBSCRIPTION_URI,
52+ UPGRADE_SUBSCRIPTION_TEXT);
53+ gtk_widget_show (GTK_WIDGET (upgrade_link));
54+ gtk_dialog_add_action_widget (GTK_DIALOG (plugin->out_of_space_dialog),
55+ upgrade_link, 0);
56+ }
57
58 g_signal_connect (G_OBJECT (plugin->out_of_space_dialog), "response",
59- G_CALLBACK (dialog_closed_callback), plugin);
60+ G_CALLBACK (dialog_closed_callback), plugin);
61 gtk_widget_show (plugin->out_of_space_dialog);
62 }
63
64@@ -104,9 +102,11 @@
65 {
66 gchar * volume_type;
67 GsdUbuntuOne *plugin = GSD_UBUNTUONE (user_data);
68+
69 volume_type = g_hash_table_lookup (file_info, "type");
70- if (volume_type != NULL && strcmp (volume_type, "Share") == 0) {
71+ if (g_strcmp0 (volume_type, "Share") == 0) {
72 gchar * other_visible_name, * path, * message;
73+
74 other_visible_name = g_hash_table_lookup (file_info, "other_visible_name");
75 path = g_hash_table_lookup (file_info, "path");
76 message = g_strdup_printf (NO_SPACE_SHARE, path, other_visible_name);
77@@ -121,6 +121,7 @@
78 delayed_syncdaemon_start (gpointer data)
79 {
80 GsdUbuntuOne *plugin;
81+
82 plugin = GSD_UBUNTUONE (data);
83 g_debug ("Performing delayed syncdaemon init");
84
85@@ -140,6 +141,7 @@
86 gsd_ubuntuone_activate (GnomeSettingsPlugin *gsp_object)
87 {
88 GsdUbuntuOne *plugin = GSD_UBUNTUONE (gsp_object);
89+
90 g_timeout_add (DELAYED_START_TIMEOUT, delayed_syncdaemon_start, plugin);
91 }
92

Subscribers

People subscribed via source and target branches