changeset 22730:74f586c40f6e

merge of '006a7eef54129319c82b282c765b3fbba968006f' and '1512dadb99f3b96f7793c8e2dcff6e0ccf1b6eb3'
author Daniel Atallah <daniel.atallah@gmail.com>
date Fri, 25 Apr 2008 17:51:03 +0000
parents 4c731c4dcc0b (diff) 36e5b74b2f74 (current diff)
children 645423a7a7b6
files
diffstat 2 files changed, 13 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/dbus-server.h	Fri Apr 25 17:49:25 2008 +0000
+++ b/libpurple/dbus-server.h	Fri Apr 25 17:51:03 2008 +0000
@@ -28,9 +28,9 @@
 #ifndef _PURPLE_DBUS_SERVER_H_
 #define _PURPLE_DBUS_SERVER_H_
 
+#include "dbus-purple.h"
 #include "value.h"
 
-
 G_BEGIN_DECLS
 
 /**
@@ -51,6 +51,8 @@
     PurpleDBusType *parent;
 };
 
+#include "dbus-bindings.h"
+
 /* By convention, the PurpleDBusType variable representing each structure
    PurpleSomeStructure has the name PURPLE_DBUS_TYPE_PurpleSomeStructure.
    The following macros facilitate defining such variables
--- a/pidgin/gtkmain.c	Fri Apr 25 17:49:25 2008 +0000
+++ b/pidgin/gtkmain.c	Fri Apr 25 17:51:03 2008 +0000
@@ -27,6 +27,7 @@
 #include "account.h"
 #include "conversation.h"
 #include "core.h"
+#include "dbus-server.h"
 #include "debug.h"
 #include "eventloop.h"
 #include "ft.h"
@@ -783,6 +784,15 @@
 	}
 
 	if (opt_si && !purple_core_ensure_single_instance()) {
+#ifdef HAVE_DBUS
+		DBusConnection *conn = purple_dbus_get_connection();
+		DBusMessage *message = dbus_message_new_method_call(DBUS_SERVICE_PURPLE, DBUS_PATH_PURPLE,
+				DBUS_INTERFACE_PURPLE, "PurpleBlistSetVisible");
+		gboolean tr = TRUE;
+		dbus_message_append_args(message, DBUS_TYPE_UINT32, &tr, DBUS_TYPE_INVALID);
+		dbus_connection_send_with_reply_and_block(conn, message, -1, NULL);
+		dbus_message_unref(message);
+#endif
 		purple_debug_info("main", "exiting because another libpurple client is already running\n");
 		purple_core_quit();
 #ifdef HAVE_SIGNAL_H