summaryrefslogtreecommitdiff
path: root/eel/eel-gtk-extensions.c
diff options
context:
space:
mode:
Diffstat (limited to 'eel/eel-gtk-extensions.c')
-rw-r--r--eel/eel-gtk-extensions.c76
1 files changed, 0 insertions, 76 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.
*/