From: John Darrington Date: Tue, 24 Feb 2009 01:07:02 +0000 (+0900) Subject: Remove glade version of connect_help X-Git-Tag: v0.7.3~282 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c024275ff35e579eddef18b23b1d9c7dc81c4ca8;p=pspp-builds.git Remove glade version of connect_help --- 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);