Merge lp:~rye/ubuntuone-client/add-marshallers into lp:ubuntuone-client

Proposed by Roman Yepishev
Status: Merged
Merged at revision: not available
Proposed branch: lp:~rye/ubuntuone-client/add-marshallers
Merge into: lp:ubuntuone-client
Diff against target: 73 lines (+35/-0)
3 files modified
nautilus/Makefile.am (+10/-0)
nautilus/ubuntuone-marshallers.list (+4/-0)
nautilus/ubuntuone-nautilus.c (+21/-0)
To merge this branch: bzr merge lp:~rye/ubuntuone-client/add-marshallers
Reviewer Review Type Date Requested Status
dobey (community) Approve
Review via email: mp+16313@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Vincenzo Di Somma (vds) wrote :

What is this branch meant to do?

Revision history for this message
Roman Yepishev (rye) wrote :

> What is this branch meant to do?

Originally, some method arguments for syncdaemon calls were pretty simple. After some changes were introduced to syncdaemon code, these arguments became no longer valid.
They were replaced by more complex structures. It turned out, that glib does not have marshallers for such kind of object, therefore causing those signals to be trappable by nautilus plugin.

This branch adds missing marshallers signatures, adds target for Makefile to generate corresponding source and header files and adds code to ubuntuone-nautilus plugin to register these marshallers for those complex structures.

Additionally, this branch fixes the ShareCreateError-related bug #496713 as the only thing that was required was to have the correct marshaller registered for ShareCreateError signal callback.

Revision history for this message
Roman Yepishev (rye) wrote :

> They were replaced by more complex structures. It turned out, that glib does
> not have marshallers for such kind of object, therefore causing those signals
> to be trappable by nautilus plugin.

Should be:
It turned out that glib does not have marshallers for such kind of object, therefore causing those signals to be invisible for nautilus plugin.

Revision history for this message
dobey (dobey) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'nautilus/Makefile.am'
2--- nautilus/Makefile.am 2009-06-03 20:30:50 +0000
3+++ nautilus/Makefile.am 2009-12-18 00:41:13 +0000
4@@ -1,3 +1,4 @@
5+MARSHAL_PREFIX=ubuntuone_nautilus_marshal
6
7 extensiondir = $(libdir)/nautilus/extensions-2.0
8
9@@ -9,7 +10,16 @@
10 $(DBUS_CFLAGS) \
11 $(NAUTILUS_CFLAGS)
12
13+ubuntuone-marshallers.c: ubuntuone-marshallers.list
14+ glib-genmarshal --body --prefix=$(MARSHAL_PREFIX) $< > $@
15+
16+ubuntuone-marshallers.h: ubuntuone-marshallers.list
17+ glib-genmarshal --header --prefix=$(MARSHAL_PREFIX) $< > $@
18+
19+ubuntuone-nautilus.c: ubuntuone-marshallers.h
20+
21 libnautilus_ubuntuone_la_SOURCES = \
22+ ubuntuone-marshallers.c \
23 ubuntuone-nautilus.c
24
25 libnautilus_ubuntuone_la_LDFLAGS = -no-undefined -avoid-version
26
27=== added file 'nautilus/ubuntuone-marshallers.list'
28--- nautilus/ubuntuone-marshallers.list 1970-01-01 00:00:00 +0000
29+++ nautilus/ubuntuone-marshallers.list 2009-12-18 00:41:13 +0000
30@@ -0,0 +1,4 @@
31+# UploadFinished, DownloadFinished
32+VOID:STRING,OBJECT
33+# ShareCreateError
34+VOID:OBJECT,STRING
35
36=== modified file 'nautilus/ubuntuone-nautilus.c'
37--- nautilus/ubuntuone-nautilus.c 2009-12-14 20:59:00 +0000
38+++ nautilus/ubuntuone-nautilus.c 2009-12-18 00:41:13 +0000
39@@ -45,6 +45,9 @@
40 #include <sys/types.h>
41 #include <utime.h>
42
43+/* The header is generated from ubuntuone-marshallers.list */
44+#include "ubuntuone-marshallers.h"
45+
46 #define UBUNTUONE_TYPE_NAUTILUS (ubuntuone_nautilus_get_type ())
47 #define UBUNTUONE_NAUTILUS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), UBUNTUONE_TYPE_NAUTILUS, UbuntuOneNautilus))
48
49@@ -609,6 +612,24 @@
50 NULL, G_TYPE_INVALID);
51 #endif
52
53+ /* Marshaller for UploadFinished and DownloadFinished signals */
54+ dbus_g_object_register_marshaller (ubuntuone_nautilus_marshal_VOID__STRING_OBJECT,
55+ G_TYPE_NONE,
56+ G_TYPE_STRING,
57+ dbus_g_type_get_map ("GHashTable",
58+ G_TYPE_STRING,
59+ G_TYPE_STRING),
60+ G_TYPE_INVALID);
61+
62+ /* Marshaller for ShareCreateError signal */
63+ dbus_g_object_register_marshaller (ubuntuone_nautilus_marshal_VOID__OBJECT_STRING,
64+ G_TYPE_NONE,
65+ dbus_g_type_get_map ("GHashTable",
66+ G_TYPE_STRING,
67+ G_TYPE_STRING),
68+ G_TYPE_STRING,
69+ G_TYPE_INVALID);
70+
71 dbus_g_proxy_add_signal (uon->u1_status, "StatusChanged",
72 dbus_g_type_get_map ("GHashTable",
73 G_TYPE_STRING,

Subscribers

People subscribed via source and target branches