- Unify search-paths for plugins and themes in both gkrellm and gkrellmd on win32
This commit is contained in:
parent
e09fe90ef8
commit
a5194a3488
|
@ -277,12 +277,12 @@ gkrellmd_plugins_load(void)
|
|||
install_path = g_win32_get_package_installation_directory_of_module(NULL);
|
||||
if (install_path != NULL)
|
||||
{
|
||||
path = g_build_filename(install_path, "plugins-gkrellmd", NULL);
|
||||
path = g_build_filename(install_path, "lib", "gkrellm2", "plugins-gkrellmd", NULL);
|
||||
g_free(install_path);
|
||||
}
|
||||
#else
|
||||
// deprecated since glib 2.16.0
|
||||
path = g_win32_get_package_installation_subdirectory(NULL, NULL, "plugins-gkrellmd");
|
||||
path = g_win32_get_package_installation_subdirectory(NULL, NULL, "lib/gkrellm2/plugins-gkrellmd");
|
||||
#endif
|
||||
if (path)
|
||||
{
|
||||
|
|
|
@ -131,9 +131,9 @@
|
|||
#else
|
||||
|
||||
#undef LOCAL_THEMES_DIR
|
||||
#define SYSTEM_THEMES_DIR "./themes"
|
||||
#undef SYSTEM_THEMES_DIR
|
||||
#undef LOCAL_PLUGINS_DIR
|
||||
#define SYSTEM_PLUGINS_DIR "./plugins"
|
||||
#undef SYSTEM_PLUGINS_DIR
|
||||
|
||||
#endif
|
||||
|
||||
|
|
22
src/gui.c
22
src/gui.c
|
@ -1445,6 +1445,28 @@ gkrellm_make_themes_list(void)
|
|||
theme_dir = gtk_rc_get_theme_dir();
|
||||
add_themes_to_list(theme_dir, TRUE);
|
||||
|
||||
#if defined(WIN32)
|
||||
theme_dir = NULL;
|
||||
#if GLIB_CHECK_VERSION(2,16,0)
|
||||
gchar *install_path;
|
||||
install_path = g_win32_get_package_installation_directory_of_module(NULL);
|
||||
if (install_path != NULL)
|
||||
{
|
||||
theme_dir = g_build_filename(install_path, "share", "gkrellm2", "themes", NULL);
|
||||
g_free(install_path);
|
||||
}
|
||||
#else
|
||||
// deprecated since glib 2.16.0
|
||||
path = g_win32_get_package_installation_subdirectory(NULL, NULL, "share/gkrellm2/themes");
|
||||
#endif
|
||||
if (theme_dir)
|
||||
{
|
||||
add_themes_to_list(theme_dir, FALSE);
|
||||
g_free(theme_dir);
|
||||
theme_dir = NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(LOCAL_THEMES_DIR)
|
||||
add_themes_to_list(LOCAL_THEMES_DIR, FALSE);
|
||||
#endif
|
||||
|
|
|
@ -1264,6 +1264,28 @@ gkrellm_plugins_load(void)
|
|||
scan_for_plugins(path);
|
||||
g_free(path);
|
||||
|
||||
#if defined(WIN32)
|
||||
path = NULL;
|
||||
#if GLIB_CHECK_VERSION(2,16,0)
|
||||
gchar *install_path;
|
||||
install_path = g_win32_get_package_installation_directory_of_module(NULL);
|
||||
if (install_path != NULL)
|
||||
{
|
||||
path = g_build_filename(install_path, "lib", "gkrellm2", "plugins", NULL);
|
||||
g_free(install_path);
|
||||
}
|
||||
#else
|
||||
// deprecated since glib 2.16.0
|
||||
path = g_win32_get_package_installation_subdirectory(NULL, NULL, "lib/gkrellm2/plugins");
|
||||
#endif
|
||||
if (path)
|
||||
{
|
||||
scan_for_plugins(path);
|
||||
g_free(path);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(LOCAL_PLUGINS_DIR)
|
||||
scan_for_plugins(LOCAL_PLUGINS_DIR);
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue