From c024275ff35e579eddef18b23b1d9c7dc81c4ca8 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Tue, 24 Feb 2009 10:07:02 +0900 Subject: [PATCH] Remove glade version of connect_help --- src/ui/gui/helper.c | 33 ++------------------------------- src/ui/gui/helper.h | 2 +- 2 files changed, 3 insertions(+), 32 deletions(-) diff --git a/src/ui/gui/helper.c b/src/ui/gui/helper.c index b1fdb271..8b5dbb5a 100644 --- a/src/ui/gui/helper.c +++ b/src/ui/gui/helper.c @@ -179,8 +179,8 @@ give_help (void) gtk_widget_destroy (dialog); } -static void -connect_help_builder (GtkBuilder *xml) +void +connect_help (GtkBuilder *xml) { GSList *helps = gtk_builder_get_objects (xml); @@ -209,35 +209,6 @@ connect_help_builder (GtkBuilder *xml) g_slist_free (helps); } -static void -connect_help_glade (GladeXML *xml) -{ - GList *helps = glade_xml_get_widget_prefix (xml, "help_button_"); - - GList *i; - for ( i = g_list_first (helps); i ; i = g_list_next (i)) - g_signal_connect (GTK_WIDGET (i->data), "clicked", give_help, 0); - - g_list_free (helps); -} - - -void -connect_help (gpointer xml) -{ - if (GTK_IS_BUILDER (xml)) - connect_help_builder (GTK_BUILDER (xml)); - - else if (GLADE_IS_XML (xml)) - connect_help_glade (GLADE_XML (xml)); - - else - { - g_error ("XML of type %s", G_OBJECT_TYPE_NAME (xml)); - } -} - - void reference_manual (GtkMenuItem *menu, gpointer data) diff --git a/src/ui/gui/helper.h b/src/ui/gui/helper.h index 946a2cfa..3a64413b 100644 --- a/src/ui/gui/helper.h +++ b/src/ui/gui/helper.h @@ -54,7 +54,7 @@ GtkWidget * get_widget_assert (gpointer x, const gchar *name); char * pspp_locale_to_utf8 (const gchar *text, gssize len, GError **err); -void connect_help (gpointer); +void connect_help (GtkBuilder *); void reference_manual (GtkMenuItem *, gpointer); -- 2.30.2