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
=== modified file 'nautilus/Makefile.am'
--- nautilus/Makefile.am 2009-06-03 20:30:50 +0000
+++ nautilus/Makefile.am 2009-12-18 00:41:13 +0000
@@ -1,3 +1,4 @@
1MARSHAL_PREFIX=ubuntuone_nautilus_marshal
12
2extensiondir = $(libdir)/nautilus/extensions-2.03extensiondir = $(libdir)/nautilus/extensions-2.0
34
@@ -9,7 +10,16 @@
9 $(DBUS_CFLAGS) \10 $(DBUS_CFLAGS) \
10 $(NAUTILUS_CFLAGS)11 $(NAUTILUS_CFLAGS)
1112
13ubuntuone-marshallers.c: ubuntuone-marshallers.list
14 glib-genmarshal --body --prefix=$(MARSHAL_PREFIX) $< > $@
15
16ubuntuone-marshallers.h: ubuntuone-marshallers.list
17 glib-genmarshal --header --prefix=$(MARSHAL_PREFIX) $< > $@
18
19ubuntuone-nautilus.c: ubuntuone-marshallers.h
20
12libnautilus_ubuntuone_la_SOURCES = \21libnautilus_ubuntuone_la_SOURCES = \
22 ubuntuone-marshallers.c \
13 ubuntuone-nautilus.c23 ubuntuone-nautilus.c
1424
15libnautilus_ubuntuone_la_LDFLAGS = -no-undefined -avoid-version25libnautilus_ubuntuone_la_LDFLAGS = -no-undefined -avoid-version
1626
=== added file 'nautilus/ubuntuone-marshallers.list'
--- nautilus/ubuntuone-marshallers.list 1970-01-01 00:00:00 +0000
+++ nautilus/ubuntuone-marshallers.list 2009-12-18 00:41:13 +0000
@@ -0,0 +1,4 @@
1# UploadFinished, DownloadFinished
2VOID:STRING,OBJECT
3# ShareCreateError
4VOID:OBJECT,STRING
05
=== modified file 'nautilus/ubuntuone-nautilus.c'
--- nautilus/ubuntuone-nautilus.c 2009-12-14 20:59:00 +0000
+++ nautilus/ubuntuone-nautilus.c 2009-12-18 00:41:13 +0000
@@ -45,6 +45,9 @@
45#include <sys/types.h>45#include <sys/types.h>
46#include <utime.h>46#include <utime.h>
4747
48/* The header is generated from ubuntuone-marshallers.list */
49#include "ubuntuone-marshallers.h"
50
48#define UBUNTUONE_TYPE_NAUTILUS (ubuntuone_nautilus_get_type ())51#define UBUNTUONE_TYPE_NAUTILUS (ubuntuone_nautilus_get_type ())
49#define UBUNTUONE_NAUTILUS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), UBUNTUONE_TYPE_NAUTILUS, UbuntuOneNautilus))52#define UBUNTUONE_NAUTILUS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), UBUNTUONE_TYPE_NAUTILUS, UbuntuOneNautilus))
5053
@@ -609,6 +612,24 @@
609 NULL, G_TYPE_INVALID);612 NULL, G_TYPE_INVALID);
610#endif613#endif
611614
615 /* Marshaller for UploadFinished and DownloadFinished signals */
616 dbus_g_object_register_marshaller (ubuntuone_nautilus_marshal_VOID__STRING_OBJECT,
617 G_TYPE_NONE,
618 G_TYPE_STRING,
619 dbus_g_type_get_map ("GHashTable",
620 G_TYPE_STRING,
621 G_TYPE_STRING),
622 G_TYPE_INVALID);
623
624 /* Marshaller for ShareCreateError signal */
625 dbus_g_object_register_marshaller (ubuntuone_nautilus_marshal_VOID__OBJECT_STRING,
626 G_TYPE_NONE,
627 dbus_g_type_get_map ("GHashTable",
628 G_TYPE_STRING,
629 G_TYPE_STRING),
630 G_TYPE_STRING,
631 G_TYPE_INVALID);
632
612 dbus_g_proxy_add_signal (uon->u1_status, "StatusChanged",633 dbus_g_proxy_add_signal (uon->u1_status, "StatusChanged",
613 dbus_g_type_get_map ("GHashTable",634 dbus_g_type_get_map ("GHashTable",
614 G_TYPE_STRING,635 G_TYPE_STRING,

Subscribers

People subscribed via source and target branches