pidgin.custom_smiley: 5ff73a1d: Expose the smiley API to dbus.

sadrul at pidgin.im sadrul at pidgin.im
Mon May 12 22:50:50 EDT 2008


-----------------------------------------------------------------
Revision: 5ff73a1d1551900799733ad80872bdf14810437a
Ancestor: 41922067c9cef0b5e6f8a40439c8239e6f2b2a2f
Author: sadrul at pidgin.im
Date: 2008-05-13T00:29:22
Branch: im.pidgin.pidgin.custom_smiley
URL: http://d.pidgin.im/viewmtn/revision/info/5ff73a1d1551900799733ad80872bdf14810437a

Modified files:
        libpurple/Makefile.am libpurple/dbus-server.c
        libpurple/smiley.c

ChangeLog: 

Expose the smiley API to dbus.

-------------- next part --------------
============================================================
--- libpurple/Makefile.am	3988488ad4e4e5530fdcfa3fbf72df65f513c913
+++ libpurple/Makefile.am	5d4a87b4169c01976c9a5b912bbc3126507dabb1
@@ -156,7 +156,7 @@ dbus_exported = dbus-useful.h dbus-defin
 
 dbus_exported = dbus-useful.h dbus-define-api.h account.h blist.h buddyicon.h \
                 connection.h conversation.h core.h ft.h log.h notify.h prefs.h roomlist.h \
-                savedstatuses.h status.h server.h util.h xmlnode.h prpl.h
+                savedstatuses.h smiley.h status.h server.h util.h xmlnode.h prpl.h
 
 purple_build_coreheaders = $(addprefix $(srcdir)/, $(purple_coreheaders)) \
 		$(purple_builtheaders)
============================================================
--- libpurple/dbus-server.c	b7e888797aac27159becabf202e78dfe2f44fb38
+++ libpurple/dbus-server.c	d996cc7c970a108dc90d0cebe84eb2ff4a6e9b0c
@@ -40,6 +40,7 @@
 #include "core.h"
 #include "internal.h"
 #include "savedstatuses.h"
+#include "smiley.h"
 #include "util.h"
 #include "value.h"
 #include "xmlnode.h"
============================================================
--- libpurple/smiley.c	a737dad5e8298a2b7bc2ef3c5897df6ae4560d1c
+++ libpurple/smiley.c	d44f77ec339202ad23e409db223a3c712815f23b
@@ -25,11 +25,12 @@
  */
 
 #include "internal.h"
-#include "xmlnode.h"
+#include "dbus-maybe.h"
 #include "debug.h"
 #include "imgstore.h"
 #include "smiley.h"
 #include "util.h"
+#include "xmlnode.h"
 
 /**************************************************************************/
 /* Main structures, members and constants                                 */
@@ -305,6 +306,8 @@ purple_smiley_init(GTypeInstance *instan
 static void
 purple_smiley_init(GTypeInstance *instance, gpointer klass)
 {
+	PurpleSmiley *smiley = PURPLE_SMILEY(instance);
+	PURPLE_DBUS_REGISTER_POINTER(smiley, PurpleSmiley);
 }
 
 static void
@@ -379,6 +382,8 @@ purple_smiley_finalize(GObject *obj)
 		purple_smiley_data_unstore(purple_imgstore_get_filename(smiley->img));
 	purple_imgstore_unref(smiley->img);
 
+	PURPLE_DBUS_UNREGISTER_POINTER(smiley);
+
 	purple_smileys_save();
 }
 


More information about the Commits mailing list