diff options
-rw-r--r-- | eel/eel-gtk-extensions.c | 76 | ||||
-rw-r--r-- | eel/eel-gtk-extensions.h | 16 |
2 files changed, 0 insertions, 92 deletions
diff --git a/eel/eel-gtk-extensions.c b/eel/eel-gtk-extensions.c index f7ffdc90..c880ec32 100644 --- a/eel/eel-gtk-extensions.c +++ b/eel/eel-gtk-extensions.c @@ -374,82 +374,6 @@ eel_gtk_widget_set_shown (GtkWidget *widget, gboolean shown) } } -/* This stuff is stolen from Gtk. */ - -typedef struct DisconnectInfo -{ - GtkObject *object1; - guint disconnect_handler1; - guint signal_handler; - GtkObject *object2; - guint disconnect_handler2; -} DisconnectInfo; - -static void -alive_disconnecter (GtkObject *object, DisconnectInfo *info) -{ - g_assert (info != NULL); - g_assert (GTK_IS_OBJECT (info->object1)); - g_assert (info->disconnect_handler1 != 0); - g_assert (info->signal_handler != 0); - g_assert (GTK_IS_OBJECT (info->object2)); - g_assert (info->disconnect_handler2 != 0); - g_assert (object == info->object1 || object == info->object2); - - g_signal_handler_disconnect (info->object1, info->disconnect_handler1); - g_signal_handler_disconnect (info->object1, info->signal_handler); - g_signal_handler_disconnect (info->object2, info->disconnect_handler2); - - g_free (info); -} - -/** - * eel_gtk_signal_connect_full_while_alive - * - * Like gtk_signal_connect_while_alive, but works with full parameters. - **/ -void -eel_gtk_signal_connect_full_while_alive (GtkObject *object, - const gchar *name, - GCallback func, - GtkCallbackMarshal marshal, - gpointer data, - GDestroyNotify destroy_func, - gboolean object_signal, - gboolean after, - GtkObject *alive_object) -{ - DisconnectInfo *info; - - g_return_if_fail (GTK_IS_OBJECT (object)); - g_return_if_fail (name != NULL); - g_return_if_fail (func != NULL || marshal != NULL); - g_return_if_fail (object_signal == FALSE || object_signal == TRUE); - g_return_if_fail (after == FALSE || after == TRUE); - g_return_if_fail (GTK_IS_OBJECT (alive_object)); - - info = g_new (DisconnectInfo, 1); - info->object1 = object; - info->object2 = alive_object; - - - info->signal_handler = g_signal_connect_closure ( - object, name, - (object_signal - ? g_cclosure_new_swap - : g_cclosure_new) (func, data, (GClosureNotify) destroy_func), - after); - - info->disconnect_handler1 = g_signal_connect (G_OBJECT (object), - "destroy", - G_CALLBACK (alive_disconnecter), - info); - info->disconnect_handler2 = g_signal_connect (G_OBJECT (alive_object), - "destroy", - G_CALLBACK (alive_disconnecter), - info); -} - /* The standard gtk_adjustment_set_value ignores page size, which * disagrees with the logic used by scroll bars, for example. */ diff --git a/eel/eel-gtk-extensions.h b/eel/eel-gtk-extensions.h index 2ac8ae13..8703d4b5 100644 --- a/eel/eel-gtk-extensions.h +++ b/eel/eel-gtk-extensions.h @@ -35,22 +35,6 @@ #define EEL_DEFAULT_POPUP_MENU_DISPLACEMENT 2 #define EEL_STANDARD_CLOSE_WINDOW_CONTROL_KEY 'w' -/* signals */ -void eel_gtk_signal_connect_full_while_alive (GtkObject *object, - const gchar *name, - GCallback func, - GtkCallbackMarshal marshal, - gpointer data, - GDestroyNotify destroy_func, - gboolean object_signal, - gboolean after, - GtkObject *alive_object); -void eel_gtk_signal_connect_while_realized (GtkObject *object, - const char *name, - GCallback callback, - gpointer callback_data, - GtkWidget *realized_widget); - /* GtkWidget */ void eel_gtk_widget_set_shown (GtkWidget *widget, gboolean shown); |