X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire.c;h=ae962e66fcc408c8e56ded614754f219dbf319db;hb=b3cd77d4190ad01f3297eb82ffb5053c536a427a;hp=3560dbf634e8f107a971fddf88e8740d11b9cd45;hpb=b64685d06f8db1aff292ec409abe25f8a483d775;p=pspp-builds.git diff --git a/src/ui/gui/psppire.c b/src/ui/gui/psppire.c index 3560dbf6..ae962e66 100644 --- a/src/ui/gui/psppire.c +++ b/src/ui/gui/psppire.c @@ -54,6 +54,26 @@ PsppireDataStore *data_store = 0; static bool parse_command_line (int *argc, char ***argv, gchar **filename, GError **err); + +#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); +} + int main(int argc, char *argv[]) { @@ -129,6 +149,15 @@ main(int argc, char *argv[]) var_data_selection_init(); + { + 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); + } + + /* start the event loop */ gtk_main(); @@ -183,3 +212,5 @@ parse_command_line (int *argc, char ***argv, gchar **filename, GError **err) return true; } + +