From 5d612c43713291cae1aa473ee3d31786ef6f5b99 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Sat, 4 Jul 2020 11:52:39 +0200 Subject: [PATCH] Remove the default help function. This function is no longer reachable. --- src/ui/gui/helper.c | 46 ------------------------------ src/ui/gui/helper.h | 3 -- src/ui/gui/psppire-data-window.c | 2 -- src/ui/gui/psppire-output-window.c | 3 -- src/ui/gui/psppire-syntax-window.c | 2 -- 5 files changed, 56 deletions(-) diff --git a/src/ui/gui/helper.c b/src/ui/gui/helper.c index 40cd8e5387..4fc1b72beb 100644 --- a/src/ui/gui/helper.c +++ b/src/ui/gui/helper.c @@ -197,52 +197,6 @@ convert_glib_filename_to_system_filename (const gchar *fname, GError **err) #define _(msgid) gettext (msgid) #define N_(msgid) msgid - -static void -give_help (void) -{ - GtkWidget *dialog; - - dialog = gtk_message_dialog_new (NULL, - GTK_DIALOG_MODAL, - GTK_MESSAGE_INFO, - GTK_BUTTONS_CLOSE, - _("Sorry. The help system hasn't yet " - "been implemented.")); - gtk_dialog_run (GTK_DIALOG (dialog)); - gtk_widget_destroy (dialog); -} - -void -connect_help (GtkBuilder *xml) -{ - GSList *helps = gtk_builder_get_objects (xml); - - GSList *i; - for (i = helps; i ; i = g_slist_next (i)) - { - GObject *o = i->data; - if (GTK_IS_WIDGET (o)) - { - const gchar *name = gtk_buildable_get_name (GTK_BUILDABLE (o)); - gchar s[12] = {0}; - - if (name) - strncpy (s, name, 11); - s[11] = '\0'; - - - if (0 == strcmp ("help_button", s)) - { - g_signal_connect (o, "clicked", give_help, 0); - } - } - } - - g_slist_free (helps); -} - - /* Create a deep copy of SRC */ GtkListStore * clone_list_store (const GtkListStore *src) diff --git a/src/ui/gui/helper.h b/src/ui/gui/helper.h index 7431d4c4e3..3562ec3bfe 100644 --- a/src/ui/gui/helper.h +++ b/src/ui/gui/helper.h @@ -59,9 +59,6 @@ union value *text_to_value__ (const gchar *text, const struct fmt_spec *, gchar * convert_glib_filename_to_system_filename (const gchar *fname, GError **err); -void connect_help (GtkBuilder *); - - /* Create a deep copy of SRC */ GtkListStore * clone_list_store (const GtkListStore *src); diff --git a/src/ui/gui/psppire-data-window.c b/src/ui/gui/psppire-data-window.c index 811d5e9eb8..8e2bcf5533 100644 --- a/src/ui/gui/psppire-data-window.c +++ b/src/ui/gui/psppire-data-window.c @@ -1470,8 +1470,6 @@ psppire_data_window_finish_init (PsppireDataWindow *de, dataset_set_callbacks (de->dataset, &cbs, de); - connect_help (de->builder); - gtk_box_pack_start (GTK_BOX (box), menubar, FALSE, TRUE, 0); gtk_box_pack_start (GTK_BOX (box), hb, FALSE, TRUE, 0); gtk_box_pack_start (GTK_BOX (box), GTK_WIDGET (de->data_editor), TRUE, TRUE, 0); diff --git a/src/ui/gui/psppire-output-window.c b/src/ui/gui/psppire-output-window.c index 2c45f7cf6a..680618de92 100644 --- a/src/ui/gui/psppire-output-window.c +++ b/src/ui/gui/psppire-output-window.c @@ -510,9 +510,6 @@ psppire_output_window_init (PsppireOutputWindow *window) GTK_LAYOUT (get_widget_assert (xml, "output")), GTK_TREE_VIEW (get_widget_assert (xml, "overview"))); - - connect_help (xml); - g_signal_connect (window, "focus-in-event", G_CALLBACK (cancel_urgency), diff --git a/src/ui/gui/psppire-syntax-window.c b/src/ui/gui/psppire-syntax-window.c index f9e5db633a..261254cf64 100644 --- a/src/ui/gui/psppire-syntax-window.c +++ b/src/ui/gui/psppire-syntax-window.c @@ -869,8 +869,6 @@ psppire_syntax_window_init (PsppireSyntaxWindow *window) window->ps_handler = g_signal_connect (clip_selection, "owner-change", G_CALLBACK (set_paste_sensitivity), window); - connect_help (xml); - gtk_container_add (GTK_CONTAINER (window), box); g_object_ref (sw); -- 2.30.2