X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fhelper.c;h=1007ff967fb50653f21f09782d426f03ee01f62c;hb=47aaa033c935d0427abd7cbb591a35450eb7db81;hp=9cbd6f0f2a9d9bf6991da032358d344e25d505a6;hpb=c65449a628d13f4683e7dc7125874608c7152017;p=pspp diff --git a/src/ui/gui/helper.c b/src/ui/gui/helper.c index 9cbd6f0f2a..1007ff967f 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); } @@ -336,6 +338,8 @@ clone_list_store (const GtkListStore *src) row++; } + g_free (types); + return dest; }