From 834825f4061b1d74f6925233cdf9d1be1fdcc8f7 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Thu, 18 Oct 2012 14:30:45 -0700 Subject: Find translation files on Linux after Subsurface was installed So far we only looked in the a local subdirectory, but once Subsurface has been installed, we don't need to change the search path for translation files anymore. Fixes #2 Signed-off-by: Dirk Hohndel --- linux.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'linux.c') diff --git a/linux.c b/linux.c index 5861411ee..c11bc2f0c 100644 --- a/linux.c +++ b/linux.c @@ -84,9 +84,15 @@ const char *subsurface_default_filename() } } -const char *subsurface_gettext_domainpath() +const char *subsurface_gettext_domainpath(char *argv0) { - return "./share/locale"; + if (argv0[0] == '.') { + /* we're starting a local copy */ + return "./share/locale"; + } else { + /* subsurface is installed, so system dir should be fine */ + return NULL; + } } void subsurface_ui_setup(GtkSettings *settings, GtkWidget *menubar, -- cgit v1.2.3-70-g09d2