[gucharmap] Fix looking for help files in wrong location, use new help: uri if files not found
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gucharmap] Fix looking for help files in wrong location, use new help: uri if files not found
- Date: Mon, 20 Aug 2012 21:10:45 +0000 (UTC)
commit fed1238a3b135941095e4a6681f6a4025cc5598f
Author: Robert Ancell <robert ancell canonical com>
Date: Mon Aug 20 10:09:16 2012 +1200
Fix looking for help files in wrong location, use new help: uri if files not found
gucharmap/gucharmap-window.c | 35 +++--------------------------------
1 files changed, 3 insertions(+), 32 deletions(-)
---
diff --git a/gucharmap/gucharmap-window.c b/gucharmap/gucharmap-window.c
index 55ff889..7c8d811 100644
--- a/gucharmap/gucharmap-window.c
+++ b/gucharmap/gucharmap-window.c
@@ -391,38 +391,9 @@ help_contents (GSimpleAction *action,
gpointer data)
{
GucharmapWindow *window = data;
- 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 (HELPDIR,
- "gucharmap", /* DOC_MODULE */
- lang,
- "gucharmap.xml",
- NULL);
-
- if (g_file_test (uri, G_FILE_TEST_EXISTS)) {
- break;
- }
-
- g_free (uri);
- uri = NULL;
- }
-
- if (!uri)
- return;
-
- url = g_strconcat ("help:", uri, NULL);
- open_url (GTK_WINDOW (window), url, gtk_get_current_event_time ());
- g_free (uri);
- g_free (url);
+ open_url (GTK_WINDOW (window),
+ "help:gucharmap", /* DOC_MODULE */
+ gtk_get_current_event_time ());
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]