soc.2010.detachablepurple: 78f60f24: I'm changing the way remote gobject are ...

gillux at soc.pidgin.im gillux at soc.pidgin.im
Thu Jul 15 17:35:50 EDT 2010


----------------------------------------------------------------------
Revision: 78f60f24810b9aea458993308dd5cfeec6aed5b4
Parent:   03ac478656ac3fc032ed66d98643727b1624d3dc
Author:   gillux at soc.pidgin.im
Date:     07/15/10 09:57:22
Branch:   im.pidgin.soc.2010.detachablepurple
URL: http://d.pidgin.im/viewmtn/revision/info/78f60f24810b9aea458993308dd5cfeec6aed5b4

Changelog: 

I'm changing the way remote gobject are handled by a remote client. These
are no more "dummy" objects but "mirror" objects. They would hold the last
know state of their properties in addition to the dbus proxies. This way,
to get a property we read it locally, and to set it we send a dbus request.
The daemon will inform us about properties updates sending signals.

Changed the PURPLE_DBUS_REMOTELY_SET_PROP macro appropriately, it no more
returns so that when a property is set, it is set remotely on the daemon
and also on the local object. Also added a forgotten failure check.

Changes against parent 03ac478656ac3fc032ed66d98643727b1624d3dc

  patched  libpurple/dbus-maybe.h

-------------- next part --------------
============================================================
--- libpurple/dbus-maybe.h	8014bcfc47aaaf70ca8482349897cca7b37f335b
+++ libpurple/dbus-maybe.h	1bca1b04f1d4bc39e6fed006980096a28eb48f41
@@ -12,7 +12,9 @@
 #define DBUS_API_SUBJECT_TO_CHANGE
 #endif
 
+#include "core.h"
 #include "dbus-server.h"
+#include "debug.h"
 
 #define PURPLE_DBUS_REGISTER_OBJECT(path, object) \
 G_STMT_START { \
@@ -36,10 +38,10 @@ G_STMT_START { \
     if (purple_core_get_remote_mode()) { \
         g_value_init(&prop, gtype); \
         set_func(&prop, var); \
-        purple_dbus_remotely_set_obj_prop(PURPLE_OBJECT(account), \
-                                          name, &prop); \
+        if (!purple_dbus_remotely_set_obj_prop(PURPLE_OBJECT(account),	\
+                                               name, &prop)) \
+	    return; \
         g_value_unset(&prop); \
-        return; \
     } \
 } G_STMT_END
 


More information about the Commits mailing list