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
1=== modified file 'gsd-plugin/gsd-ubuntuone.c'
2--- gsd-plugin/gsd-ubuntuone.c 2011-01-19 18:52:53 +0000
3+++ gsd-plugin/gsd-ubuntuone.c 2011-04-05 18:52:43 +0000
4@@ -143,6 +143,8 @@
5
6 volume_type = g_hash_table_lookup (file_info, "type");
7 owner_id = g_hash_table_lookup (file_info, "owner_id");
8+ if (owner_id == NULL)
9+ owner_id = g_hash_table_lookup (file_info, "volume_id");
10 data = g_hash_table_lookup (plugin->map_quota_dialogs, owner_id);
11
12 if (data == NULL) {
13@@ -308,8 +310,6 @@
14 gsd_ubuntuone_dispose (GObject *object)
15 {
16 GsdUbuntuOne *plugin = GSD_UBUNTUONE (object);
17- GsdUbuntuOneClass *klass = GSD_UBUNTUONE_GET_CLASS (object);
18- GObjectClass *parent_class = G_OBJECT_CLASS (klass);
19
20 if (plugin->syncdaemon != NULL)
21 g_object_unref (plugin->syncdaemon);
22@@ -317,7 +317,7 @@
23 if (plugin->map_quota_dialogs != NULL)
24 g_hash_table_destroy (plugin->map_quota_dialogs);
25
26- parent_class->dispose (object);
27+ G_OBJECT_CLASS (gsd_ubuntuone_parent_class)->dispose (object);
28 }
29
30 static void
31@@ -329,3 +329,4 @@
32 g_class->dispose = gsd_ubuntuone_dispose;
33 gsp_class->activate = gsd_ubuntuone_activate;
34 }
35+
36
37=== modified file 'gsd-plugin/test-send-signal.py'
38--- gsd-plugin/test-send-signal.py 2011-01-13 16:38:00 +0000
39+++ gsd-plugin/test-send-signal.py 2011-04-05 18:52:43 +0000
40@@ -33,7 +33,6 @@
41 OBJECT_INTERFACE = "com.ubuntuone.SyncDaemon.SyncDaemon"
42 SAMPLE_VOLUME_INFO = {
43 "volume_id": "sample_volume_id",
44- "owner_id": "sample_owner_id",
45 "volume_name": "sample_volume_name",
46 "type": "UDF",
47 }
48@@ -46,6 +45,7 @@
49 "path": "~/A shared folder",
50 }
51
52+
53 class SyncDaemonMocker(dbus.service.Object):
54 def __init__(self, conn, object_path=OBJECT_PATH):
55 dbus.service.Object.__init__(self, conn, object_path)
56@@ -68,15 +68,15 @@
57
58 bus = dbus.SessionBus()
59 name = dbus.service.BusName(OBJECT_NAME, bus)
60- object = SyncDaemonMocker(bus)
61+ sd = SyncDaemonMocker(bus)
62
63 main_loop = gobject.MainLoop()
64
65 if "-d" not in sys.argv:
66 if "-3" in sys.argv:
67- gobject.timeout_add(10, object.QuotaExceeded, SAMPLE_SHARE_INFO)
68+ gobject.timeout_add(10, sd.QuotaExceeded, SAMPLE_SHARE_INFO)
69 else:
70- gobject.timeout_add(10, object.QuotaExceeded, SAMPLE_VOLUME_INFO)
71+ gobject.timeout_add(10, sd.QuotaExceeded, SAMPLE_VOLUME_INFO)
72 gobject.timeout_add(200, main_loop.quit)
73
74 main_loop.run()

Subscribers

People subscribed via source and target branches

to all changes: