X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fhelper.c;h=83319c453eebb41a0bb219b565bca7bc58bd3b19;hb=0f70b0dd47b62dbefe87fb08ba8a8984aa5a50c4;hp=6294e886f694983fb506572e03a2f422008ae402;hpb=1b2a87ad88df1fcbf19efaff1476b48711278917;p=pspp-builds.git diff --git a/src/ui/gui/helper.c b/src/ui/gui/helper.c index 6294e886..83319c45 100644 --- a/src/ui/gui/helper.c +++ b/src/ui/gui/helper.c @@ -160,6 +160,13 @@ pspp_locale_to_utf8 (const gchar *text, gssize len, GError **err) return recode_string (CONV_PSPP_TO_UTF8, text, len); } +gchar * +utf8_to_pspp_locale (const gchar *text, gssize len, GError **err) +{ + return recode_string (CONV_UTF8_TO_PSPP, text, len); +} + + #define _(msgid) gettext (msgid) #define N_(msgid) msgid @@ -214,10 +221,14 @@ void reference_manual (GtkMenuItem *menu, gpointer data) { GError *err = NULL; - if ( ! g_spawn_command_line_async ("yelp info:pspp", &err) ) + gchar *cmd = g_strdup_printf ("yelp file://%s", relocate (DOCDIR "/pspp.xml")); + + if ( ! g_spawn_command_line_async (cmd, &err) ) { msg (ME, _("Cannot open reference manual: %s"), err->message); } + + g_free (cmd); g_clear_error (&err); }