X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fhelper.c;h=1007ff967fb50653f21f09782d426f03ee01f62c;hb=c3ac5a8af9c449072c7e872ca70a78c1755ae309;hp=da74882a8f0bbae0557c91b3d6de82256a6e490b;hpb=1bcb0e4c5d3084983b86675187088bb3ad906cc2;p=pspp-builds.git diff --git a/src/ui/gui/helper.c b/src/ui/gui/helper.c index da74882a..1007ff96 100644 --- a/src/ui/gui/helper.c +++ b/src/ui/gui/helper.c @@ -25,6 +25,7 @@ #include #include "helper.h" #include "message-dialog.h" +#include #include #include #include @@ -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); }