[gtranslator: 1/2] Fix loading help
- From: Daniel Garcia Moreno <danigm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtranslator: 1/2] Fix loading help
- Date: Mon, 5 Nov 2018 07:39:27 +0000 (UTC)
commit 2c4ea6184d9b8915bf5b29cc7b7e1c2ccf3c6a7e
Author: Jeremy Bicha <jbicha ubuntu com>
Date: Sat Nov 3 09:22:04 2018 -0400
Fix loading help
This should fix the Help link for Linux (& BSD).
The help loading code is overly complex for Linux
and might not help much for Windows and OS X.
I expect Windows and OS X are still broken after
this change but I don't have the ability to check there.
Closes: https://bugzilla.gnome.org/697406
meson.build | 1 -
src/gtr-actions-app.c | 2 +-
src/gtr-dirs.c | 2 +-
src/gtr-utils.c | 8 +++++---
4 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/meson.build b/meson.build
index fa242b09..54028faf 100644
--- a/meson.build
+++ b/meson.build
@@ -57,7 +57,6 @@ set_defines = [
# package
['PACKAGE', meson.project_name()],
['PACKAGE_DATADIR', gtr_datadir],
- ['PACKAGE_HELPDIR', join_paths(gtr_datadir, 'gnome', 'help')],
['PACKAGE_LIBDIR', gtr_libdir],
['PACKAGE_LOCALEDIR', gtr_localedir],
['PACKAGE_URL', 'https://wiki.gnome.org/Apps/Gtranslator'],
diff --git a/src/gtr-actions-app.c b/src/gtr-actions-app.c
index e9c515ca..9f1acabe 100644
--- a/src/gtr-actions-app.c
+++ b/src/gtr-actions-app.c
@@ -37,7 +37,7 @@
void
gtr_show_help (GtrWindow *window)
{
- gtr_utils_help_display (GTK_WINDOW (window), "gtranslator", "gtranslator.xml");
+ gtr_utils_help_display (GTK_WINDOW (window), "gtranslator", "");
}
/* Creates and shows the about box for gtranslator */
diff --git a/src/gtr-dirs.c b/src/gtr-dirs.c
index a1c6af7f..ce56749b 100644
--- a/src/gtr-dirs.c
+++ b/src/gtr-dirs.c
@@ -76,7 +76,7 @@ gtr_dirs_init ()
if (gtr_data_dir == NULL)
{
gtr_data_dir = g_build_filename (PACKAGE_DATADIR, "gtranslator", NULL);
- gtr_help_dir = g_build_filename (PACKAGE_HELPDIR, "gnome", "help", NULL);
+ gtr_help_dir = g_build_filename (PACKAGE_DATADIR, "help", NULL);
gtr_locale_dir = g_build_filename (PACKAGE_LOCALEDIR, "locale", NULL);
gtr_lib_dir = g_build_filename (PACKAGE_LIBDIR, "gtranslator", NULL);
}
diff --git a/src/gtr-utils.c b/src/gtr-utils.c
index 4e7bd45d..bc755fd2 100644
--- a/src/gtr-utils.c
+++ b/src/gtr-utils.c
@@ -494,8 +494,8 @@ gtr_utils_help_display (GtkWindow * parent,
continue;
path = gtr_dirs_get_gtr_help_dir ();
- uri = g_build_filename (path, doc_id,
- lang, file_name, NULL);
+ uri = g_build_filename (path, lang,
+ doc_id, file_name, NULL);
if (g_file_test (uri, G_FILE_TEST_EXISTS))
{
@@ -522,7 +522,9 @@ gtr_utils_help_display (GtkWindow * parent,
return;
}
- command = g_strconcat ("gnome-help help://", uri, NULL);
+ /* Should be updated to use gtk_show_uri instead, see
+ * https://wiki.gnome.org/Initiatives/GnomeGoals/RemoveGnomeOpenGnomeHelp */
+ command = g_strconcat ("yelp ", uri, NULL);
g_free (uri);
g_spawn_command_line_async (command, &error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]