Remove compatibility code for GLib < 2.32

Since the minimum GLib version is now 2.32 the code paths for older GLib
2 versions can be removed too.
This commit is contained in:
Stefan Gehn 2014-07-12 21:59:20 +02:00
parent 6e3ee7db10
commit 33133c63ae
4 changed files with 1 additions and 26 deletions

View File

@ -787,14 +787,8 @@ read_config(void)
// on windows also load config from INSTALLDIR/etc/gkrellmd.conf // on windows also load config from INSTALLDIR/etc/gkrellmd.conf
#if defined(WIN32) #if defined(WIN32)
#if GLIB_CHECK_VERSION(2,16,0)
install_path = g_win32_get_package_installation_directory_of_module(NULL); install_path = g_win32_get_package_installation_directory_of_module(NULL);
path = g_build_filename(install_path, "etc", GKRELLMD_CONFIG, NULL); path = g_build_filename(install_path, "etc", GKRELLMD_CONFIG, NULL);
#else
// deprecated since glib 2.16
install_path = g_win32_get_package_installation_subdirectory(NULL, NULL, "etc");
path = g_build_filename(install_path, GKRELLMD_CONFIG, NULL);
#endif
load_config(path); load_config(path);
g_free(install_path); g_free(install_path);
g_free(path); g_free(path);

View File

@ -285,7 +285,6 @@ gkrellmd_plugins_load(void)
#if defined(WIN32) #if defined(WIN32)
path = NULL; path = NULL;
#if GLIB_CHECK_VERSION(2,16,0)
gchar *install_path; gchar *install_path;
install_path = g_win32_get_package_installation_directory_of_module(NULL); install_path = g_win32_get_package_installation_directory_of_module(NULL);
if (install_path != NULL) if (install_path != NULL)
@ -293,10 +292,6 @@ gkrellmd_plugins_load(void)
path = g_build_filename(install_path, "lib", "gkrellm2", "plugins-gkrellmd", NULL); path = g_build_filename(install_path, "lib", "gkrellm2", "plugins-gkrellmd", NULL);
g_free(install_path); g_free(install_path);
} }
#else
// deprecated since glib 2.16.0
path = g_win32_get_package_installation_subdirectory(NULL, NULL, "lib/gkrellm2/plugins-gkrellmd");
#endif
if (path) if (path)
{ {
gkrellmd_plugin_scan(path); gkrellmd_plugin_scan(path);

View File

@ -1427,7 +1427,6 @@ gkrellm_make_themes_list(void)
#if defined(WIN32) #if defined(WIN32)
theme_dir = NULL; theme_dir = NULL;
#if GLIB_CHECK_VERSION(2,16,0)
gchar *install_path; gchar *install_path;
install_path = g_win32_get_package_installation_directory_of_module(NULL); install_path = g_win32_get_package_installation_directory_of_module(NULL);
if (install_path != NULL) if (install_path != NULL)
@ -1435,10 +1434,6 @@ gkrellm_make_themes_list(void)
theme_dir = g_build_filename(install_path, "share", "gkrellm2", "themes", NULL); theme_dir = g_build_filename(install_path, "share", "gkrellm2", "themes", NULL);
g_free(install_path); 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) if (theme_dir)
{ {
add_themes_to_list(theme_dir, FALSE); add_themes_to_list(theme_dir, FALSE);

View File

@ -1265,23 +1265,14 @@ gkrellm_plugins_load(void)
g_free(path); g_free(path);
#if defined(WIN32) #if defined(WIN32)
path = NULL;
#if GLIB_CHECK_VERSION(2,16,0)
gchar *install_path; gchar *install_path;
install_path = g_win32_get_package_installation_directory_of_module(NULL); install_path = g_win32_get_package_installation_directory_of_module(NULL);
if (install_path != NULL) if (install_path != NULL)
{ {
path = g_build_filename(install_path, "lib", "gkrellm2", "plugins", 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); scan_for_plugins(path);
g_free(path); g_free(path);
g_free(install_path);
} }
#endif #endif