[shotwell] Fix showing help when running from build dir



commit 8e2edcaa7291a8f36dd41f94c657c1f89e66ba8e
Author: Jens Georg <mail jensge org>
Date:   Sun Dec 24 16:22:10 2017 +0100

    Fix showing help when running from build dir
    
    https://bugzilla.gnome.org/show_bug.cgi?id=717126

 src/Resources.vala |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/Resources.vala b/src/Resources.vala
index 03a7b9b..07a60f8 100644
--- a/src/Resources.vala
+++ b/src/Resources.vala
@@ -948,8 +948,13 @@ along with Shotwell; if not, write to the Free Software Foundation, Inc.,
         // Try looking for our 'index.page' in the build directory.
         //
         // TODO: Need to look for internationalized help before falling back on help/C
+        File dir = AppDirs.get_exec_dir();
         
-        File help_dir = AppDirs.get_exec_dir().get_child("help").get_child("C");
+        if (dir.get_path().has_suffix("src")) {
+            dir = dir.get_parent().get_parent();
+        }
+
+        File help_dir = dir.get_child("help").get_child("C");
         File help_index = help_dir.get_child("index.page");
         
         if (help_index.query_exists(null)) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]