Remove marshaller from helper.c and use a generated one instead
[pspp-builds.git] / src / ui / gui / helper.c
index da74882a8f0bbae0557c91b3d6de82256a6e490b..a4ac261c6f2a03b7623105da6e2801403ea0fdef 100644 (file)
@@ -25,6 +25,7 @@
 #include <glib.h>
 #include "helper.h"
 #include "message-dialog.h"
+#include <data/format.h>
 #include <data/data-in.h>
 #include <data/data-out.h>
 #include <data/dictionary.h>
@@ -91,7 +92,7 @@ text_to_value (const gchar *text, union value *v,
     }
 
   msg_disable ();
-  ok = data_in (ss_cstr (text), LEGACY_NATIVE, format.type, 0, 0,
+  ok = data_in (ss_cstr (text), LEGACY_NATIVE, format.type, 0, 0, 0,
                 v, fmt_var_width (&format));
   msg_enable ();
 
@@ -129,17 +130,16 @@ pspp_locale_to_utf8 (const gchar *text, gssize len, GError **err)
 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);
+  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
@@ -150,6 +150,8 @@ connect_help (GladeXML *xml)
   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);
 }
 
 
@@ -252,52 +254,6 @@ execute_syntax (struct getl_interface *sss)
 
 
 
-#ifdef G_ENABLE_DEBUG
-# define g_marshal_value_peek_int(v)      g_value_get_int (v)
-#else
-# define g_marshal_value_peek_int(v)      (v)->data[0].v_int
-#endif
-
-
-/* VOID:INT,INT,INT */
-void
-marshaller_VOID__INT_INT_INT (GClosure     *closure,
-                        GValue       *return_value,
-                        guint         n_param_values,
-                        const GValue *param_values,
-                        gpointer      invocation_hint,
-                        gpointer      marshal_data)
-{
-  typedef void (*GMarshalFunc_VOID__INT_INT_INT) (gpointer     data1,
-                                                 gint         arg_1,
-                                                 gint         arg_2,
-                                                 gint         arg_3,
-                                                 gpointer     data2);
-  register GMarshalFunc_VOID__INT_INT_INT callback;
-  register GCClosure *cc = (GCClosure*) closure;
-  register gpointer data1, data2;
-
-  g_return_if_fail (n_param_values == 4);
-
-  if (G_CCLOSURE_SWAP_DATA (closure))
-    {
-      data1 = closure->data;
-      data2 = g_value_peek_pointer (param_values + 0);
-    }
-  else
-    {
-      data1 = g_value_peek_pointer (param_values + 0);
-      data2 = closure->data;
-    }
-  callback = (GMarshalFunc_VOID__INT_INT_INT) (marshal_data ? marshal_data : cc->callback);
-
-  callback (data1,
-            g_marshal_value_peek_int (param_values + 1),
-            g_marshal_value_peek_int (param_values + 2),
-            g_marshal_value_peek_int (param_values + 3),
-            data2);
-}
-
 /* Create a deep copy of SRC */
 GtkListStore *
 clone_list_store (const GtkListStore *src)