Merge lp:~dobey/ubuntuone-client/fix-744383 into lp:ubuntuone-client/stable-1-4

Proposed by dobey
Status: Merged
Approved by: dobey
Approved revision: 752
Merged at revision: 751
Proposed branch: lp:~dobey/ubuntuone-client/fix-744383
Merge into: lp:ubuntuone-client/stable-1-4
Diff against target: 74 lines (+8/-7)
2 files modified
gsd-plugin/gsd-ubuntuone.c (+4/-3)
gsd-plugin/test-send-signal.py (+4/-4)
To merge this branch: bzr merge lp:~dobey/ubuntuone-client/fix-744383
Reviewer Review Type Date Requested Status
Eric Casteleijn (community) Approve
Natalia Bidart (community) Approve
Review via email: mp+56424@code.launchpad.net

Commit message

Default to using volume_id if owner_id is not in the dict
Properly call the parent dispose

To post a comment you must log in.
752. By dobey

Fix a warning

Revision history for this message
Natalia Bidart (nataliabidart) :
review: Approve
Revision history for this message
Eric Casteleijn (thisfred) :
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 2011-01-19 18:52:53 +0000
+++ gsd-plugin/gsd-ubuntuone.c 2011-04-05 18:52:43 +0000
@@ -143,6 +143,8 @@
143143
144 volume_type = g_hash_table_lookup (file_info, "type");144 volume_type = g_hash_table_lookup (file_info, "type");
145 owner_id = g_hash_table_lookup (file_info, "owner_id");145 owner_id = g_hash_table_lookup (file_info, "owner_id");
146 if (owner_id == NULL)
147 owner_id = g_hash_table_lookup (file_info, "volume_id");
146 data = g_hash_table_lookup (plugin->map_quota_dialogs, owner_id);148 data = g_hash_table_lookup (plugin->map_quota_dialogs, owner_id);
147149
148 if (data == NULL) {150 if (data == NULL) {
@@ -308,8 +310,6 @@
308gsd_ubuntuone_dispose (GObject *object)310gsd_ubuntuone_dispose (GObject *object)
309{311{
310 GsdUbuntuOne *plugin = GSD_UBUNTUONE (object);312 GsdUbuntuOne *plugin = GSD_UBUNTUONE (object);
311 GsdUbuntuOneClass *klass = GSD_UBUNTUONE_GET_CLASS (object);
312 GObjectClass *parent_class = G_OBJECT_CLASS (klass);
313313
314 if (plugin->syncdaemon != NULL)314 if (plugin->syncdaemon != NULL)
315 g_object_unref (plugin->syncdaemon);315 g_object_unref (plugin->syncdaemon);
@@ -317,7 +317,7 @@
317 if (plugin->map_quota_dialogs != NULL)317 if (plugin->map_quota_dialogs != NULL)
318 g_hash_table_destroy (plugin->map_quota_dialogs);318 g_hash_table_destroy (plugin->map_quota_dialogs);
319319
320 parent_class->dispose (object);320 G_OBJECT_CLASS (gsd_ubuntuone_parent_class)->dispose (object);
321}321}
322322
323static void323static void
@@ -329,3 +329,4 @@
329 g_class->dispose = gsd_ubuntuone_dispose;329 g_class->dispose = gsd_ubuntuone_dispose;
330 gsp_class->activate = gsd_ubuntuone_activate;330 gsp_class->activate = gsd_ubuntuone_activate;
331}331}
332
332333
=== modified file 'gsd-plugin/test-send-signal.py'
--- gsd-plugin/test-send-signal.py 2011-01-13 16:38:00 +0000
+++ gsd-plugin/test-send-signal.py 2011-04-05 18:52:43 +0000
@@ -33,7 +33,6 @@
33OBJECT_INTERFACE = "com.ubuntuone.SyncDaemon.SyncDaemon"33OBJECT_INTERFACE = "com.ubuntuone.SyncDaemon.SyncDaemon"
34SAMPLE_VOLUME_INFO = {34SAMPLE_VOLUME_INFO = {
35 "volume_id": "sample_volume_id",35 "volume_id": "sample_volume_id",
36 "owner_id": "sample_owner_id",
37 "volume_name": "sample_volume_name",36 "volume_name": "sample_volume_name",
38 "type": "UDF",37 "type": "UDF",
39}38}
@@ -46,6 +45,7 @@
46 "path": "~/A shared folder",45 "path": "~/A shared folder",
47}46}
4847
48
49class SyncDaemonMocker(dbus.service.Object):49class SyncDaemonMocker(dbus.service.Object):
50 def __init__(self, conn, object_path=OBJECT_PATH):50 def __init__(self, conn, object_path=OBJECT_PATH):
51 dbus.service.Object.__init__(self, conn, object_path)51 dbus.service.Object.__init__(self, conn, object_path)
@@ -68,15 +68,15 @@
6868
69 bus = dbus.SessionBus()69 bus = dbus.SessionBus()
70 name = dbus.service.BusName(OBJECT_NAME, bus)70 name = dbus.service.BusName(OBJECT_NAME, bus)
71 object = SyncDaemonMocker(bus)71 sd = SyncDaemonMocker(bus)
7272
73 main_loop = gobject.MainLoop()73 main_loop = gobject.MainLoop()
7474
75 if "-d" not in sys.argv:75 if "-d" not in sys.argv:
76 if "-3" in sys.argv:76 if "-3" in sys.argv:
77 gobject.timeout_add(10, object.QuotaExceeded, SAMPLE_SHARE_INFO)77 gobject.timeout_add(10, sd.QuotaExceeded, SAMPLE_SHARE_INFO)
78 else:78 else:
79 gobject.timeout_add(10, object.QuotaExceeded, SAMPLE_VOLUME_INFO)79 gobject.timeout_add(10, sd.QuotaExceeded, SAMPLE_VOLUME_INFO)
80 gobject.timeout_add(200, main_loop.quit)80 gobject.timeout_add(200, main_loop.quit)
8181
82 main_loop.run()82 main_loop.run()

Subscribers

People subscribed via source and target branches

to all changes: