summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorinfirit <[email protected]>2013-12-22 19:03:28 +0100
committerinfirit <[email protected]>2013-12-22 19:12:28 +0100
commit8a4039c6a33fc6f21be8f8f9fdd96b1fcfbf3ba5 (patch)
tree963cad0779cdbb1947c5bf8805d7088a322f82ab /src
parentf3aff1c1063888e36ee2ce93b61c0d7c373c149b (diff)
downloadmate-terminal-8a4039c6a33fc6f21be8f8f9fdd96b1fcfbf3ba5.tar.bz2
mate-terminal-8a4039c6a33fc6f21be8f8f9fdd96b1fcfbf3ba5.tar.xz
Fix help handling.
Diffstat (limited to 'src')
-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);
}