summaryrefslogtreecommitdiff
path: root/src/terminal-util.c
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2013-12-23 11:12:22 -0800
committerStefano Karapetsas <[email protected]>2013-12-23 11:12:22 -0800
commitcd91bda44db67879f943067c041dce0d00525e20 (patch)
tree963cad0779cdbb1947c5bf8805d7088a322f82ab /src/terminal-util.c
parentf4d794edf8d671cd69d7974e5617c7fd6c4067ba (diff)
parent8a4039c6a33fc6f21be8f8f9fdd96b1fcfbf3ba5 (diff)
downloadmate-terminal-cd91bda44db67879f943067c041dce0d00525e20.tar.bz2
mate-terminal-cd91bda44db67879f943067c041dce0d00525e20.tar.xz
Merge pull request #47 from infirit/yelp
Fix help handling.
Diffstat (limited to 'src/terminal-util.c')
-rw-r--r--src/terminal-util.c36
1 files changed, 3 insertions, 33 deletions
diff --git a/src/terminal-util.c b/src/terminal-util.c
index 0ffb8b8..a909a53 100644
--- a/src/terminal-util.c
+++ b/src/terminal-util.c
@@ -150,44 +150,15 @@ terminal_util_show_help (const char *topic,
GtkWindow *parent)
{
GError *error = NULL;
- const char *lang;
- char *uri = NULL, *url;
- guint i;
-
- const char * const * langs = g_get_language_names ();
- for (i = 0; langs[i]; i++)
- {
- lang = langs[i];
- if (strchr (lang, '.'))
- {
- continue;
- }
-
- uri = g_build_filename (TERM_HELPDIR,
- "mate-terminal", /* DOC_MODULE */
- lang,
- "mate-terminal.xml",
- NULL);
-
- if (g_file_test (uri, G_FILE_TEST_EXISTS))
- {
- break;
- }
-
- g_free (uri);
- uri = NULL;
- }
-
- if (!uri)
- return;
+ char *url;
if (topic)
{
- url = g_strdup_printf ("help://%s?%s", uri, topic);
+ url = g_strdup_printf ("help:mate-terminal/%s", topic);
}
else
{
- url = g_strdup_printf ("help://%s", uri);
+ url = g_strdup ("help:mate-terminal");
}
if (!open_url (GTK_WINDOW (parent), url, gtk_get_current_event_time (), &error))
@@ -197,7 +168,6 @@ terminal_util_show_help (const char *topic,
g_error_free (error);
}
- g_free (uri);
g_free (url);
}