gobjectification: 229f4f73: removed the old purple_type_connect stuf...

grim at pidgin.im grim at pidgin.im
Sat Jul 18 23:15:33 EDT 2009


-----------------------------------------------------------------
Revision: 229f4f736cfe667301f13915e54ae37c6ac5f3a8
Ancestor: f9a727c10e726be45a8a202b05bf7934ed486849
Author: grim at pidgin.im
Date: 2009-07-19T03:10:38
Branch: im.pidgin.gobjectification
URL: http://d.pidgin.im/viewmtn/revision/info/229f4f736cfe667301f13915e54ae37c6ac5f3a8

Modified files:
        libpurple/pobject.c libpurple/pobject.h

ChangeLog: 

removed the old purple_type_connect stuff


-------------- next part --------------
============================================================
--- libpurple/pobject.c	1a4a7356fa73f484526252aaa3a32f5898c2be01
+++ libpurple/pobject.c	b6b4d35699e20131212d0d9a336179f49e99da96
@@ -138,70 +138,3 @@ int purple_object_get_int(PurpleObject *
 	return ret;
 }
 
-/**
- * Signal emission hooks utility function
- */
-typedef struct
-{
-	GType type;
-	GCallback callback;
-	gpointer user_data;
-	GConnectFlags flags;
-	GQuark detail;
-} PObjectConnectHook;
-
-static gboolean
-signal_emission_hook_fn(GSignalInvocationHint *hint, guint nparams,
-		const GValue *pvalues, gpointer data)
-{
-	PObjectConnectHook *hook = data;
-	PurpleObject *obj = PURPLE_OBJECT(g_value_get_object(pvalues + 0));
-
-	if (!G_TYPE_CHECK_INSTANCE_TYPE(obj, hook->type))
-		return TRUE;
-
-	if (g_signal_handler_find(obj,
-				G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA | G_SIGNAL_MATCH_DETAIL,
-				hint->signal_id, hook->detail, NULL,
-				hook->callback, hook->user_data) == 0) {
-		gboolean swap = (hook->flags & G_CONNECT_SWAPPED);
-		gboolean after = (hook->flags & G_CONNECT_AFTER);
-		GClosure *closure = (swap ? g_cclosure_new_swap : g_cclosure_new)
-					(hook->callback, hook->user_data, NULL);
-		g_signal_connect_closure_by_id(obj, hint->signal_id, hook->detail, closure, after);
-		g_closure_invoke(closure, NULL, nparams, pvalues, hint);
-	}
-	return TRUE;
-}
-
-gulong
-purple_type_connect(GType type, const char *detailed_signal, GCallback callback,
-		gpointer data)
-{
-	return purple_type_connect_flags(type, detailed_signal, callback, data, 0);
-}
-
-gulong
-purple_type_connect_flags(GType type, const char *detailed_signal, GCallback callback,
-		gpointer data, GConnectFlags flags)
-{
-	PObjectConnectHook *hook;
-	guint signal_id;
-	GQuark detail;
-
-	g_type_class_unref(g_type_class_ref(type));
-
-	if (!g_signal_parse_name(detailed_signal, type, &signal_id, &detail, TRUE))
-		return 0;
-
-	hook = g_new0(PObjectConnectHook, 1);
-	hook->callback = callback;
-	hook->user_data = data;
-	hook->flags = flags;
-	hook->detail = detail;
-	hook->type = type;
-
-	return g_signal_add_emission_hook(signal_id, detail,
-			signal_emission_hook_fn, hook, g_free);
-}
-
============================================================
--- libpurple/pobject.h	98224c7cc165bb6470ec000a56ef3ab2260dc9be
+++ libpurple/pobject.h	18fe9cec069e515633b56a33dea53ecdc2b83f88
@@ -63,11 +63,6 @@ int purple_object_get_int(PurpleObject *
 
 int purple_object_get_int(PurpleObject *pobj, const char *prop);
 
-gulong purple_type_connect(GType type, const char *signal, GCallback callback, gpointer data);
-
-gulong purple_type_connect_flags(GType type, const char *signal, GCallback callback,
-		gpointer data, GConnectFlags flags);
-
 G_END_DECLS
 
 #endif /* PURPLE_OBJECT_H */


More information about the Commits mailing list