Merge lp:~dobey/ubuntuone-client-gnome/kill-share-contacts into lp:ubuntuone-client-gnome
- kill-share-contacts
- Merge into trunk
Proposed by
dobey
Status: | Merged |
---|---|
Approved by: | dobey |
Approved revision: | 23 |
Merged at revision: | 22 |
Proposed branch: | lp:~dobey/ubuntuone-client-gnome/kill-share-contacts |
Merge into: | lp:ubuntuone-client-gnome |
Diff against target: |
431 lines (+13/-317) 7 files modified
configure.ac (+11/-0) gsd/gsd-ubuntuone.c (+2/-0) nautilus/Makefile.am (+0/-2) nautilus/context-menu.c (+0/-102) nautilus/share-dialog.c (+0/-161) nautilus/share-dialog.h (+0/-51) po/POTFILES.in (+0/-1) |
To merge this branch: | bzr merge lp:~dobey/ubuntuone-client-gnome/kill-share-contacts |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Roberto Alsina (community) | Approve | ||
Review via email: mp+134296@code.launchpad.net |
Commit message
Remove folder sharing UI and related code.
Description of the change
To post a comment you must log in.
Revision history for this message
Roberto Alsina (ralsina) : | # |
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'configure.ac' | |||
2 | --- configure.ac 2012-10-31 21:25:54 +0000 | |||
3 | +++ configure.ac 2012-11-27 21:44:20 +0000 | |||
4 | @@ -109,6 +109,17 @@ | |||
5 | 109 | fi | 109 | fi |
6 | 110 | AM_CONDITIONAL([HAVE_GSD_30], [test "x$have_gsd_30" = "xyes"]) | 110 | AM_CONDITIONAL([HAVE_GSD_30], [test "x$have_gsd_30" = "xyes"]) |
7 | 111 | 111 | ||
8 | 112 | # gnome-settings-daemon 3.5.91 changes REGISTER macro behavior again | ||
9 | 113 | # To compensate, we need an additional define to avoid defining the | ||
10 | 114 | # class_finalize method for the plug-in | ||
11 | 115 | PKG_CHECK_EXISTS([gnome-settings-daemon >= 3.5.91], | ||
12 | 116 | [have_gsd_36=yes], | ||
13 | 117 | [have_gsd_36=no]) | ||
14 | 118 | if test "x$have_gsd_36" = "xyes"; then | ||
15 | 119 | AC_DEFINE_UNQUOTED([HAVE_GSD_36], [1], | ||
16 | 120 | [If using gnome-settings-daemon 3.5.91 or newer]) | ||
17 | 121 | fi | ||
18 | 122 | |||
19 | 112 | PKG_CHECK_MODULES(SETTINGS_PLUGIN, | 123 | PKG_CHECK_MODULES(SETTINGS_PLUGIN, |
20 | 113 | gnome-settings-daemon | 124 | gnome-settings-daemon |
21 | 114 | gio-2.0 | 125 | gio-2.0 |
22 | 115 | 126 | ||
23 | === modified file 'gsd/gsd-ubuntuone.c' | |||
24 | --- gsd/gsd-ubuntuone.c 2011-09-23 15:31:01 +0000 | |||
25 | +++ gsd/gsd-ubuntuone.c 2012-11-27 21:44:20 +0000 | |||
26 | @@ -201,11 +201,13 @@ | |||
27 | 201 | } | 201 | } |
28 | 202 | 202 | ||
29 | 203 | #ifdef HAVE_GSD_30 | 203 | #ifdef HAVE_GSD_30 |
30 | 204 | #ifndef HAVE_GSD_36 | ||
31 | 204 | static void | 205 | static void |
32 | 205 | gsd_ubuntuone_class_finalize (GsdUbuntuOneClass *klass) | 206 | gsd_ubuntuone_class_finalize (GsdUbuntuOneClass *klass) |
33 | 206 | { | 207 | { |
34 | 207 | } | 208 | } |
35 | 208 | #endif | 209 | #endif |
36 | 210 | #endif | ||
37 | 209 | 211 | ||
38 | 210 | static void | 212 | static void |
39 | 211 | gsd_ubuntuone_class_init (GsdUbuntuOneClass *klass) | 213 | gsd_ubuntuone_class_init (GsdUbuntuOneClass *klass) |
40 | 212 | 214 | ||
41 | === modified file 'nautilus/Makefile.am' | |||
42 | --- nautilus/Makefile.am 2012-08-29 21:24:36 +0000 | |||
43 | +++ nautilus/Makefile.am 2012-11-27 21:44:20 +0000 | |||
44 | @@ -38,8 +38,6 @@ | |||
45 | 38 | error-dialog.c \ | 38 | error-dialog.c \ |
46 | 39 | file-watcher.c \ | 39 | file-watcher.c \ |
47 | 40 | file-watcher.h \ | 40 | file-watcher.h \ |
48 | 41 | share-dialog.c \ | ||
49 | 42 | share-dialog.h \ | ||
50 | 43 | ubuntuone-marshallers.c \ | 41 | ubuntuone-marshallers.c \ |
51 | 44 | ubuntuone-marshallers.h \ | 42 | ubuntuone-marshallers.h \ |
52 | 45 | ubuntuone-nautilus.c \ | 43 | ubuntuone-nautilus.c \ |
53 | 46 | 44 | ||
54 | === modified file 'nautilus/context-menu.c' | |||
55 | --- nautilus/context-menu.c 2012-02-20 16:45:35 +0000 | |||
56 | +++ nautilus/context-menu.c 2012-11-27 21:44:20 +0000 | |||
57 | @@ -26,7 +26,6 @@ | |||
58 | 26 | #include <glib/gi18n-lib.h> | 26 | #include <glib/gi18n-lib.h> |
59 | 27 | #include <libsyncdaemon/libsyncdaemon.h> | 27 | #include <libsyncdaemon/libsyncdaemon.h> |
60 | 28 | #include "context-menu.h" | 28 | #include "context-menu.h" |
61 | 29 | #include "share-dialog.h" | ||
62 | 30 | 29 | ||
63 | 31 | typedef struct { | 30 | typedef struct { |
64 | 32 | UbuntuOneNautilus *uon; | 31 | UbuntuOneNautilus *uon; |
65 | @@ -141,55 +140,6 @@ | |||
66 | 141 | file_watcher_update_path (data->uon->file_watcher, data->path); | 140 | file_watcher_update_path (data->uon->file_watcher, data->path); |
67 | 142 | } | 141 | } |
68 | 143 | 142 | ||
69 | 144 | static void | ||
70 | 145 | share_folder_cb (NautilusMenuItem *item, gpointer user_data) | ||
71 | 146 | { | ||
72 | 147 | MenuCallbackData * data = (MenuCallbackData *) user_data; | ||
73 | 148 | GtkWidget * dialog; | ||
74 | 149 | |||
75 | 150 | dialog = share_dialog_new (data->parent, data->uon, data->path); | ||
76 | 151 | gtk_widget_show (dialog); | ||
77 | 152 | } | ||
78 | 153 | |||
79 | 154 | static void | ||
80 | 155 | unshare_folder_cb (NautilusMenuItem *item, gpointer user_data) | ||
81 | 156 | { | ||
82 | 157 | MenuCallbackData * data = (MenuCallbackData *) user_data; | ||
83 | 158 | SyncdaemonSharesInterface *interface; | ||
84 | 159 | |||
85 | 160 | interface = (SyncdaemonSharesInterface *) syncdaemon_daemon_get_shares_interface (data->uon->syncdaemon); | ||
86 | 161 | if (interface != NULL) | ||
87 | 162 | syncdaemon_shares_interface_delete (interface, data->path); | ||
88 | 163 | } | ||
89 | 164 | |||
90 | 165 | gboolean | ||
91 | 166 | check_share_offer_pending (UbuntuOneNautilus *uon, const gchar *path) | ||
92 | 167 | { | ||
93 | 168 | GSList *shares, *l; | ||
94 | 169 | SyncdaemonInterface *interface; | ||
95 | 170 | gboolean is_share_offer_pending = FALSE; | ||
96 | 171 | const gchar *node_id; | ||
97 | 172 | |||
98 | 173 | interface = syncdaemon_daemon_get_shares_interface (uon->syncdaemon); | ||
99 | 174 | if (SYNCDAEMON_IS_SHARES_INTERFACE (interface)) { | ||
100 | 175 | shares = syncdaemon_shares_interface_get_shared (SYNCDAEMON_SHARES_INTERFACE (interface)); | ||
101 | 176 | for (l = shares; l != NULL; l = l->next) { | ||
102 | 177 | SyncdaemonShareInfo *share_info = SYNCDAEMON_SHARE_INFO (l->data); | ||
103 | 178 | |||
104 | 179 | if (g_strcmp0 (syncdaemon_share_info_get_path (share_info), path) == 0) { | ||
105 | 180 | node_id = syncdaemon_share_info_get_node_id (share_info); | ||
106 | 181 | if (node_id == NULL) | ||
107 | 182 | is_share_offer_pending = TRUE; | ||
108 | 183 | break; | ||
109 | 184 | } | ||
110 | 185 | } | ||
111 | 186 | |||
112 | 187 | g_slist_free (shares); | ||
113 | 188 | } | ||
114 | 189 | |||
115 | 190 | return is_share_offer_pending; | ||
116 | 191 | } | ||
117 | 192 | |||
118 | 193 | NautilusMenuItem * | 143 | NautilusMenuItem * |
119 | 194 | context_menu_new (UbuntuOneNautilus *uon, | 144 | context_menu_new (UbuntuOneNautilus *uon, |
120 | 195 | GtkWidget *window, | 145 | GtkWidget *window, |
121 | @@ -201,12 +151,10 @@ | |||
122 | 201 | gchar *path, *item, *homedir_path, *path_uri; | 151 | gchar *path, *item, *homedir_path, *path_uri; |
123 | 202 | gboolean is_managed, is_root, is_udf, is_public, is_shared, is_pending; | 152 | gboolean is_managed, is_root, is_udf, is_public, is_shared, is_pending; |
124 | 203 | gboolean is_shared_to_me, is_inhome, is_dir, is_regular, is_symlink; | 153 | gboolean is_shared_to_me, is_inhome, is_dir, is_regular, is_symlink; |
125 | 204 | gboolean is_share_offer_pending; | ||
126 | 205 | MenuCallbackData *cb_data; | 154 | MenuCallbackData *cb_data; |
127 | 206 | 155 | ||
128 | 207 | is_managed = is_root = is_udf = is_public = is_shared = is_pending = FALSE; | 156 | is_managed = is_root = is_udf = is_public = is_shared = is_pending = FALSE; |
129 | 208 | is_shared_to_me = is_inhome = is_dir = is_regular = is_symlink = FALSE; | 157 | is_shared_to_me = is_inhome = is_dir = is_regular = is_symlink = FALSE; |
130 | 209 | is_share_offer_pending = FALSE; | ||
131 | 210 | 158 | ||
132 | 211 | if (g_list_length (files) != 1) | 159 | if (g_list_length (files) != 1) |
133 | 212 | return NULL; | 160 | return NULL; |
134 | @@ -239,8 +187,6 @@ | |||
135 | 239 | 187 | ||
136 | 240 | if (ubuntuone_is_folder_shared (uon, path)) { | 188 | if (ubuntuone_is_folder_shared (uon, path)) { |
137 | 241 | is_shared = TRUE; | 189 | is_shared = TRUE; |
138 | 242 | if (check_share_offer_pending (uon, path)) | ||
139 | 243 | is_share_offer_pending = TRUE; | ||
140 | 244 | } | 190 | } |
141 | 245 | 191 | ||
142 | 246 | if (ubuntuone_is_inside_shares (uon, path)) | 192 | if (ubuntuone_is_inside_shares (uon, path)) |
143 | @@ -266,54 +212,6 @@ | |||
144 | 266 | 212 | ||
145 | 267 | g_object_weak_ref (G_OBJECT (root_item), (GWeakNotify) free_menu_cb_data, cb_data); | 213 | g_object_weak_ref (G_OBJECT (root_item), (GWeakNotify) free_menu_cb_data, cb_data); |
146 | 268 | 214 | ||
147 | 269 | /* Share/unshare */ | ||
148 | 270 | if ((is_managed || is_udf) && !is_root && is_dir && !is_symlink) { | ||
149 | 271 | |||
150 | 272 | menu_item = nautilus_menu_item_new ("ubuntuone-share", | ||
151 | 273 | _("_Share..."), | ||
152 | 274 | _("Share this folder on Ubuntu One"), | ||
153 | 275 | "ubuntuone"); | ||
154 | 276 | if (is_pending) | ||
155 | 277 | g_object_set (menu_item, "sensitive", FALSE, NULL); | ||
156 | 278 | |||
157 | 279 | g_signal_connect (menu_item, "activate", | ||
158 | 280 | G_CALLBACK (share_folder_cb), cb_data); | ||
159 | 281 | } else { | ||
160 | 282 | /* the different tooltips will probably do us no good */ | ||
161 | 283 | if (is_root) { | ||
162 | 284 | menu_item = nautilus_menu_item_new ("ubuntuone-noshare-root", | ||
163 | 285 | _("_Share..."), | ||
164 | 286 | _("Sorry, you can't share the root of a Ubuntu One volume"), | ||
165 | 287 | "ubuntuone"); | ||
166 | 288 | } else if (!(is_managed || is_udf)) { | ||
167 | 289 | menu_item = nautilus_menu_item_new ("ubuntuone-noshare-unmanaged", | ||
168 | 290 | _("_Share..."), | ||
169 | 291 | _("Sorry, you can't share folders not managed by Ubuntu One"), | ||
170 | 292 | "ubuntuone"); | ||
171 | 293 | } else { | ||
172 | 294 | menu_item = nautilus_menu_item_new ("ubuntuone-noshare-unmanaged", | ||
173 | 295 | _("_Share..."), | ||
174 | 296 | _("Sorry, you can only share folders"), | ||
175 | 297 | "ubuntuone"); | ||
176 | 298 | } | ||
177 | 299 | g_object_set (menu_item, "sensitive", FALSE, NULL); | ||
178 | 300 | } | ||
179 | 301 | |||
180 | 302 | nautilus_menu_append_item (submenu, menu_item); | ||
181 | 303 | |||
182 | 304 | if ((is_managed && is_shared) && !is_root && is_dir && !is_symlink) { | ||
183 | 305 | menu_item = nautilus_menu_item_new ("ubuntuone-unshare", | ||
184 | 306 | _("Stop _Sharing"), | ||
185 | 307 | _("Stop sharing this folder on Ubuntu One"), | ||
186 | 308 | "ubuntuone"); | ||
187 | 309 | if (is_pending || is_share_offer_pending) | ||
188 | 310 | g_object_set (menu_item, "sensitive", FALSE, NULL); | ||
189 | 311 | |||
190 | 312 | g_signal_connect (menu_item, "activate", | ||
191 | 313 | G_CALLBACK (unshare_folder_cb), cb_data); | ||
192 | 314 | nautilus_menu_append_item (submenu, menu_item); | ||
193 | 315 | } | ||
194 | 316 | |||
195 | 317 | /* UDF logic | 215 | /* UDF logic |
196 | 318 | * | 216 | * |
197 | 319 | * XXX: clean this up and separate the logic out and reuse elsewhere | 217 | * XXX: clean this up and separate the logic out and reuse elsewhere |
198 | 320 | 218 | ||
199 | === removed file 'nautilus/share-dialog.c' | |||
200 | --- nautilus/share-dialog.c 2012-08-30 18:27:39 +0000 | |||
201 | +++ nautilus/share-dialog.c 1970-01-01 00:00:00 +0000 | |||
202 | @@ -1,161 +0,0 @@ | |||
203 | 1 | /* | ||
204 | 2 | * UbuntuOne Nautilus plugin | ||
205 | 3 | * | ||
206 | 4 | * Authors: Rodrigo Moya <rodrigo.moya@canonical.com> | ||
207 | 5 | * | ||
208 | 6 | * Copyright 2009-2010 Canonical Ltd. | ||
209 | 7 | * | ||
210 | 8 | * This program is free software: you can redistribute it and/or modify it | ||
211 | 9 | * under the terms of the GNU General Public License version 3, as published | ||
212 | 10 | * by the Free Software Foundation. | ||
213 | 11 | * | ||
214 | 12 | * This program is distributed in the hope that it will be useful, but | ||
215 | 13 | * WITHOUT ANY WARRANTY; without even the implied warranties of | ||
216 | 14 | * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR | ||
217 | 15 | * PURPOSE. See the GNU General Public License for more details. | ||
218 | 16 | * | ||
219 | 17 | * You should have received a copy of the GNU General Public License along | ||
220 | 18 | * with this program. If not, see <http://www.gnu.org/licenses/>. | ||
221 | 19 | * | ||
222 | 20 | */ | ||
223 | 21 | |||
224 | 22 | #ifdef HAVE_CONFIG_H | ||
225 | 23 | #include <config.h> | ||
226 | 24 | #endif | ||
227 | 25 | |||
228 | 26 | #include <glib/gi18n-lib.h> | ||
229 | 27 | #include <libsyncdaemon/libsyncdaemon.h> | ||
230 | 28 | #include "share-dialog.h" | ||
231 | 29 | |||
232 | 30 | G_DEFINE_TYPE(ShareDialog, share_dialog, GTK_TYPE_DIALOG) | ||
233 | 31 | |||
234 | 32 | static void | ||
235 | 33 | share_dialog_finalize (GObject *object) | ||
236 | 34 | { | ||
237 | 35 | ShareDialog *dialog = SHARE_DIALOG (object); | ||
238 | 36 | |||
239 | 37 | if (dialog->path != NULL) | ||
240 | 38 | g_free (dialog->path); | ||
241 | 39 | |||
242 | 40 | G_OBJECT_CLASS (share_dialog_parent_class)->finalize (object); | ||
243 | 41 | } | ||
244 | 42 | |||
245 | 43 | static void | ||
246 | 44 | share_dialog_class_init (ShareDialogClass *klass) | ||
247 | 45 | { | ||
248 | 46 | GObjectClass *object_class = G_OBJECT_CLASS (klass); | ||
249 | 47 | |||
250 | 48 | object_class->finalize = share_dialog_finalize; | ||
251 | 49 | } | ||
252 | 50 | |||
253 | 51 | static void | ||
254 | 52 | dialog_response_cb (GtkDialog *gtk_dialog, | ||
255 | 53 | gint response, | ||
256 | 54 | gpointer user_data) | ||
257 | 55 | { | ||
258 | 56 | ShareDialog *dialog = SHARE_DIALOG (gtk_dialog); | ||
259 | 57 | |||
260 | 58 | switch (response) { | ||
261 | 59 | case GTK_RESPONSE_ACCEPT: { | ||
262 | 60 | const gchar *entry_data; | ||
263 | 61 | |||
264 | 62 | entry_data = gtk_entry_get_text (GTK_ENTRY (dialog->user_picker)); | ||
265 | 63 | if (entry_data != NULL && strlen (entry_data) > 0) { | ||
266 | 64 | SyncdaemonSharesInterface *interface; | ||
267 | 65 | gchar **email_entries; | ||
268 | 66 | GSList *emails = NULL; | ||
269 | 67 | gboolean allow_mods = FALSE; | ||
270 | 68 | gint i; | ||
271 | 69 | |||
272 | 70 | email_entries = g_strsplit (entry_data, ",", -1); | ||
273 | 71 | for (i = 0; email_entries[i] != NULL; i++) { | ||
274 | 72 | const gchar *email = g_strstrip (email_entries[i]); | ||
275 | 73 | emails = g_slist_prepend (emails, g_strdup (email)); | ||
276 | 74 | } | ||
277 | 75 | g_strfreev (email_entries); | ||
278 | 76 | |||
279 | 77 | if (emails != NULL && g_slist_length (emails) > 0) { | ||
280 | 78 | allow_mods = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->allow_mods)); | ||
281 | 79 | |||
282 | 80 | interface = SYNCDAEMON_SHARES_INTERFACE (syncdaemon_daemon_get_shares_interface (dialog->uon->syncdaemon)); | ||
283 | 81 | if (interface != NULL) { | ||
284 | 82 | syncdaemon_shares_interface_create (interface, | ||
285 | 83 | dialog->path, | ||
286 | 84 | emails, | ||
287 | 85 | g_path_get_basename (dialog->path), | ||
288 | 86 | allow_mods); | ||
289 | 87 | } | ||
290 | 88 | } | ||
291 | 89 | } | ||
292 | 90 | } | ||
293 | 91 | default: | ||
294 | 92 | gtk_widget_destroy (GTK_WIDGET (dialog)); | ||
295 | 93 | break; | ||
296 | 94 | } | ||
297 | 95 | } | ||
298 | 96 | |||
299 | 97 | static void | ||
300 | 98 | share_dialog_init (ShareDialog *dialog) | ||
301 | 99 | { | ||
302 | 100 | GtkWidget *area, *table, *hbox, *label; | ||
303 | 101 | |||
304 | 102 | gtk_window_set_title (GTK_WINDOW (dialog), _("Share on Ubuntu One")); | ||
305 | 103 | gtk_window_set_destroy_with_parent (GTK_WINDOW (dialog), TRUE); | ||
306 | 104 | gtk_dialog_add_buttons (GTK_DIALOG (dialog), | ||
307 | 105 | GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, | ||
308 | 106 | (_("Share")), GTK_RESPONSE_ACCEPT, | ||
309 | 107 | NULL); | ||
310 | 108 | gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT); | ||
311 | 109 | gtk_window_set_icon_name (GTK_WINDOW (dialog), "ubuntuone"); | ||
312 | 110 | g_signal_connect (G_OBJECT (dialog), "response", | ||
313 | 111 | G_CALLBACK (dialog_response_cb), NULL); | ||
314 | 112 | |||
315 | 113 | area = gtk_dialog_get_content_area (GTK_DIALOG (dialog)); | ||
316 | 114 | |||
317 | 115 | table = gtk_vbox_new (FALSE, 12); | ||
318 | 116 | gtk_container_set_border_width (GTK_CONTAINER (table), 7); | ||
319 | 117 | gtk_box_pack_start (GTK_BOX (area), table, TRUE, TRUE, 0); | ||
320 | 118 | gtk_widget_show (table); | ||
321 | 119 | |||
322 | 120 | /* entry here maybe */ | ||
323 | 121 | hbox = gtk_hbox_new (FALSE, 12); | ||
324 | 122 | gtk_box_pack_start (GTK_BOX (table), hbox, FALSE, FALSE, 0); | ||
325 | 123 | gtk_widget_show (hbox); | ||
326 | 124 | |||
327 | 125 | label = gtk_label_new_with_mnemonic (_("_Email:")); | ||
328 | 126 | gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); | ||
329 | 127 | gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); | ||
330 | 128 | gtk_widget_show (label); | ||
331 | 129 | |||
332 | 130 | dialog->user_picker = gtk_entry_new (); | ||
333 | 131 | gtk_widget_set_tooltip_text (dialog->user_picker, | ||
334 | 132 | _("Type an email address to share this " | ||
335 | 133 | "folder with. Use a comma to separate " | ||
336 | 134 | "multiple addresses.")); | ||
337 | 135 | gtk_label_set_mnemonic_widget (GTK_LABEL (label), dialog->user_picker); | ||
338 | 136 | gtk_entry_set_activates_default (GTK_ENTRY (dialog->user_picker), TRUE); | ||
339 | 137 | gtk_box_pack_start (GTK_BOX (hbox), dialog->user_picker, TRUE, TRUE, 0); | ||
340 | 138 | gtk_widget_show (dialog->user_picker); | ||
341 | 139 | |||
342 | 140 | dialog->allow_mods = gtk_check_button_new_with_mnemonic (_("_Allow Modification")); | ||
343 | 141 | /* Default to RW */ | ||
344 | 142 | gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->allow_mods), | ||
345 | 143 | TRUE); | ||
346 | 144 | gtk_box_pack_end (GTK_BOX (table), dialog->allow_mods, FALSE, FALSE, 0); | ||
347 | 145 | gtk_widget_show (dialog->allow_mods); | ||
348 | 146 | |||
349 | 147 | gtk_widget_set_size_request (GTK_WIDGET (dialog), 320, -1); | ||
350 | 148 | } | ||
351 | 149 | |||
352 | 150 | GtkWidget * | ||
353 | 151 | share_dialog_new (GtkWidget *parent, UbuntuOneNautilus *uon, const gchar *path) | ||
354 | 152 | { | ||
355 | 153 | ShareDialog *dialog; | ||
356 | 154 | |||
357 | 155 | dialog = (ShareDialog *) g_object_new (TYPE_SHARE_DIALOG, NULL); | ||
358 | 156 | dialog->uon = uon; | ||
359 | 157 | dialog->path = g_strdup (path); | ||
360 | 158 | gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (parent)); | ||
361 | 159 | |||
362 | 160 | return (GtkWidget *) dialog; | ||
363 | 161 | } | ||
364 | 162 | 0 | ||
365 | === removed file 'nautilus/share-dialog.h' | |||
366 | --- nautilus/share-dialog.h 2011-07-20 20:44:39 +0000 | |||
367 | +++ nautilus/share-dialog.h 1970-01-01 00:00:00 +0000 | |||
368 | @@ -1,51 +0,0 @@ | |||
369 | 1 | /* | ||
370 | 2 | * UbuntuOne Nautilus plugin | ||
371 | 3 | * | ||
372 | 4 | * Authors: Rodrigo Moya <rodrigo.moya@canonical.com> | ||
373 | 5 | * | ||
374 | 6 | * Copyright 2009-2010 Canonical Ltd. | ||
375 | 7 | * | ||
376 | 8 | * This program is free software: you can redistribute it and/or modify it | ||
377 | 9 | * under the terms of the GNU General Public License version 3, as published | ||
378 | 10 | * by the Free Software Foundation. | ||
379 | 11 | * | ||
380 | 12 | * This program is distributed in the hope that it will be useful, but | ||
381 | 13 | * WITHOUT ANY WARRANTY; without even the implied warranties of | ||
382 | 14 | * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR | ||
383 | 15 | * PURPOSE. See the GNU General Public License for more details. | ||
384 | 16 | * | ||
385 | 17 | * You should have received a copy of the GNU General Public License along | ||
386 | 18 | * with this program. If not, see <http://www.gnu.org/licenses/>. | ||
387 | 19 | * | ||
388 | 20 | */ | ||
389 | 21 | |||
390 | 22 | #ifndef __SHARE_DIALOG_H__ | ||
391 | 23 | #define __SHARE_DIALOG_H__ | ||
392 | 24 | |||
393 | 25 | #include <gtk/gtk.h> | ||
394 | 26 | #include "ubuntuone-nautilus.h" | ||
395 | 27 | |||
396 | 28 | #define TYPE_SHARE_DIALOG (share_dialog_get_type ()) | ||
397 | 29 | #define SHARE_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SHARE_DIALOG, ShareDialog)) | ||
398 | 30 | #define IS_SHARE_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SHARE_DIALOG)) | ||
399 | 31 | #define SHARE_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SHARE_DIALOG, ShareDialogClass)) | ||
400 | 32 | #define IS_SHARE_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SHARE_DIALOG)) | ||
401 | 33 | #define SHARE_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SHARE_DIALOG, ShareDialogClass)) | ||
402 | 34 | |||
403 | 35 | typedef struct { | ||
404 | 36 | GtkDialog parent; | ||
405 | 37 | |||
406 | 38 | UbuntuOneNautilus *uon; | ||
407 | 39 | gchar *path; | ||
408 | 40 | GtkWidget *user_picker; | ||
409 | 41 | GtkWidget *allow_mods; | ||
410 | 42 | } ShareDialog; | ||
411 | 43 | |||
412 | 44 | typedef struct { | ||
413 | 45 | GtkDialogClass parent_class; | ||
414 | 46 | } ShareDialogClass; | ||
415 | 47 | |||
416 | 48 | GType share_dialog_get_type (void); | ||
417 | 49 | GtkWidget *share_dialog_new (GtkWidget *parent, UbuntuOneNautilus *uon, const gchar *path); | ||
418 | 50 | |||
419 | 51 | #endif | ||
420 | 52 | 0 | ||
421 | === modified file 'po/POTFILES.in' | |||
422 | --- po/POTFILES.in 2012-08-30 19:00:33 +0000 | |||
423 | +++ po/POTFILES.in 2012-11-27 21:44:20 +0000 | |||
424 | @@ -1,7 +1,6 @@ | |||
425 | 1 | nautilus/ubuntuone-nautilus.c | 1 | nautilus/ubuntuone-nautilus.c |
426 | 2 | nautilus/context-menu.c | 2 | nautilus/context-menu.c |
427 | 3 | nautilus/file-watcher.c | 3 | nautilus/file-watcher.c |
428 | 4 | nautilus/share-dialog.c | ||
429 | 5 | nautilus/utils.c | 4 | nautilus/utils.c |
430 | 6 | gsd/gsd-ubuntuone.c | 5 | gsd/gsd-ubuntuone.c |
431 | 7 | [type: gettext/ini]gsd/ubuntuone.gnome-settings-plugin.in | 6 | [type: gettext/ini]gsd/ubuntuone.gnome-settings-plugin.in |