Re-added the help button callbacks
[pspp-builds.git] / src / ui / gui / helper.c
index ae645a61477bb867a3c70f557cf92ff759ab62d3..75b88f1d8ba5f63d972b9a21304af3fedea7c50d 100644 (file)
@@ -82,3 +82,34 @@ pspp_locale_to_utf8 (const gchar *text, gssize len, GError **err)
   return recode_string (CONV_PSPP_TO_UTF8, text, len);
 }
 
+#define _(msgid) gettext (msgid)
+#define N_(msgid) msgid
+
+
+static void
+give_help (void)
+{
+  static struct msg m = {
+    MSG_GENERAL,
+    MSG_NOTE,
+    {0, -1},
+    0,
+  };
+
+  if (! m.text)
+    m.text=g_strdup (_("Sorry. The help system hasn't yet been implemented."));
+
+  popup_message (&m);
+}
+
+void
+connect_help (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);
+}
+
+