[geany/geany-plugins] 9c970c: pohelper: Fix locating the ui file on OS X when using bundle
Jiří Techet
git-noreply at xxxxx
Wed Apr 26 20:46:20 UTC 2017
Branch: refs/heads/osx_relpath
Author: Jiří Techet <techet at gmail.com>
Committer: Jiří Techet <techet at gmail.com>
Date: Wed, 26 Apr 2017 20:46:20 UTC
Commit: 9c970c1acc7961d862d1a2f4498583b321035907
https://github.com/geany/geany-plugins/commit/9c970c1acc7961d862d1a2f4498583b321035907
Log Message:
-----------
pohelper: Fix locating the ui file on OS X when using bundle
Modified Paths:
--------------
pohelper/src/gph-plugin.c
Modified: pohelper/src/gph-plugin.c
16 lines changed, 9 insertions(+), 7 deletions(-)
===================================================================
@@ -1360,16 +1360,18 @@ on_color_button_color_notify (GtkWidget *widget,
static gchar *
get_data_dir_path (const gchar *filename)
{
-#ifdef G_OS_WIN32
- gchar *prefix = g_win32_get_package_installation_directory_of_module (NULL);
-#else
gchar *prefix = NULL;
+ gchar *path;
+
+#ifdef G_OS_WIN32
+ prefix = g_win32_get_package_installation_directory_of_module (NULL);
+#elif defined(__APPLE__)
+ if (g_getenv ("GEANY_PLUGINS_SHARE_PATH"))
+ return g_build_filename( g_getenv ("GEANY_PLUGINS_SHARE_PATH"),
+ PLUGIN, filename, NULL);
#endif
- gchar *path = g_build_filename (prefix ? prefix : "", PLUGINDATADIR,
- filename, NULL);
-
+ path = g_build_filename (prefix ? prefix : "", PLUGINDATADIR, filename, NULL);
g_free (prefix);
-
return path;
}
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
More information about the Plugins-Commits
mailing list