Remove the default help function.
authorJohn Darrington <john@darrington.wattle.id.au>
Sat, 4 Jul 2020 09:52:39 +0000 (11:52 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Sat, 4 Jul 2020 09:52:39 +0000 (11:52 +0200)
This function is no longer reachable.

src/ui/gui/helper.c
src/ui/gui/helper.h
src/ui/gui/psppire-data-window.c
src/ui/gui/psppire-output-window.c
src/ui/gui/psppire-syntax-window.c

index 40cd8e53878c43c04f089fad3373584aeef10774..4fc1b72beb84c7b9a1699677134715b1eab221fa 100644 (file)
@@ -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)
index 7431d4c4e3fd1cdc10e4c9fa80b562bea51ab819..3562ec3bfe7cb923396f8a2bb05e7a8feb54f75e 100644 (file)
@@ -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);
 
index 811d5e9eb8825bd52d4922e787773fb6f5b9132c..8e2bcf55338baf80fa29fff2391f7eba8c94d4f7 100644 (file)
@@ -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);
index 2c45f7cf6a835415fe3700c96b539df8238bcaec..680618de92bfdfe17eb4f59ea07e2cd285ab24b6 100644 (file)
@@ -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),
index f9e5db633a08e6b88b6dc483fe4f4a0c2d1a923a..261254cf644a69216ffde308b509daea029d2baa 100644 (file)
@@ -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);