soc.2010.detachablepurple: 9a2dfa0d: Code cleanup.
gillux at soc.pidgin.im
gillux at soc.pidgin.im
Wed Jul 28 13:46:01 EDT 2010
----------------------------------------------------------------------
Revision: 9a2dfa0d95577eef69825f350ad2a29255fbb9c4
Parent: 457bf54be301a87ba25fb03725a7ad70230d04af
Author: gillux at soc.pidgin.im
Date: 07/28/10 13:18:14
Branch: im.pidgin.soc.2010.detachablepurple
URL: http://d.pidgin.im/viewmtn/revision/info/9a2dfa0d95577eef69825f350ad2a29255fbb9c4
Changelog:
Code cleanup.
Changes against parent 457bf54be301a87ba25fb03725a7ad70230d04af
patched libpurple/dbus-server.c
-------------- next part --------------
============================================================
--- libpurple/dbus-server.c c72e37dcddb40e694399e3ac712b68fedfc20eae
+++ libpurple/dbus-server.c cb3969c74637d0e9c75c853818739afd963d72f9
@@ -778,9 +778,9 @@ purple_dbus_g_init(void)
GError *error = NULL;
guint request_ret;
+ /* In remote mode we need to register the marshallers
+ * we will use to receive the signals sent by the daemon */
if (purple_core_is_remote_mode()) {
- /* In remote mode we need to register the marshallers
- * we will use to receive the signals sent by the daemon */
dbus_g_object_register_marshaller(purple_smarshal_VOID__STRING_BOXED,
G_TYPE_NONE, G_TYPE_STRING,
G_TYPE_VALUE, G_TYPE_INVALID);
@@ -788,22 +788,20 @@ purple_dbus_g_init(void)
/* We also use the "dbus path name -> gobject" hash table */
dbus_path_gobjects = g_hash_table_new_full(g_str_hash, g_str_equal,
g_free, NULL);
- return;
}
- /* Export our objects only if we are in daemon mode. */
- if (!purple_core_is_daemon_mode())
- return;
-
/* In daemon mode create a proxy for the purple service, so we can
* publish our gobjects on DBus.
*/
- dbus_proxy = dbus_g_proxy_new_for_name(purple_dbus_get_g_connection(),
+ if (purple_core_is_daemon_mode()) {
+ dbus_proxy = dbus_g_proxy_new_for_name(purple_dbus_get_g_connection(),
DBUS_SERVICE_DBUS, DBUS_PATH_DBUS,
DBUS_INTERFACE_DBUS);
- if (!dbus_proxy) {
- purple_debug_error("dbus", "Unable to create proxy\n");
- } else {
+ if (!dbus_proxy) {
+ purple_debug_error("dbus", "Unable to create proxy\n");
+ return;
+ }
+
if (!org_freedesktop_DBus_request_name(dbus_proxy,
DBUS_PURPLE_SERVICE, 0,
&request_ret, &error)) {
@@ -812,14 +810,14 @@ purple_dbus_g_init(void)
DBUS_PURPLE_SERVICE ": %s\n",
error->message);
g_error_free(error);
+ return;
}
/* We should also care about request_ret */
}
+ /* In remote and daemon mode, we create our singleton objects */
/* Instantiate and publish the PurpleConstructor */
- dbus_g_connection_register_g_object(purple_dbus_get_g_connection(),
- DBUS_CONSTRUCTOR_PATH,
- G_OBJECT(purple_constructor_get_instance()));
+ purple_constructor_get_instance();
}
More information about the Commits
mailing list