changeset 13554:52985bb3ec70

[gaim-migrate @ 15932] SF Patch #1456692 from Sadrul "GaimBuddyIcon bindings for DBus" committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Thu, 23 Mar 2006 18:36:45 +0000
parents e83afa26a42e
children a7b24ba66570
files src/Makefile.am src/buddyicon.c
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/Makefile.am	Thu Mar 23 17:05:47 2006 +0000
+++ b/src/Makefile.am	Thu Mar 23 18:36:45 2006 +0000
@@ -174,7 +174,7 @@
 dbus_sources  = dbus-server.c dbus-useful.c
 dbus_headers  = dbus-bindings.h dbus-gaim.h dbus-server.h dbus-useful.h dbus-define-api.h
 
-dbus_exported = dbus-useful.h dbus-define-api.h account.h blist.h connection.h conversation.h core.h roomlist.h status.h server.h
+dbus_exported = dbus-useful.h dbus-define-api.h account.h blist.h buddyicon.h connection.h conversation.h core.h roomlist.h status.h server.h
 
 gaim_build_coreheaders = $(addprefix $(srcdir)/, $(gaim_coreheaders))
 dbus_build_exported = $(addprefix $(srcdir)/, $(dbus_exported))
--- a/src/buddyicon.c	Thu Mar 23 17:05:47 2006 +0000
+++ b/src/buddyicon.c	Thu Mar 23 18:36:45 2006 +0000
@@ -25,6 +25,7 @@
 #include "internal.h"
 #include "buddyicon.h"
 #include "conversation.h"
+#include "dbus-maybe.h"
 #include "debug.h"
 #include "util.h"
 
@@ -39,6 +40,7 @@
 	GHashTable *icon_cache;
 
 	icon = g_new0(GaimBuddyIcon, 1);
+	GAIM_DBUS_REGISTER_POINTER(icon, GaimBuddyIcon);
 
 	gaim_buddy_icon_set_account(icon,  account);
 	gaim_buddy_icon_set_username(icon, username);
@@ -136,6 +138,7 @@
 	if (icon->data != NULL)
 		g_free(icon->data);
 
+	GAIM_DBUS_UNREGISTER_POINTER(icon);
 	g_free(icon);
 }