From 33133c63aeca349739dba5a972e44776889c46f9 Mon Sep 17 00:00:00 2001 From: Stefan Gehn Date: Sat, 12 Jul 2014 21:59:20 +0200 Subject: [PATCH] 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. --- server/main.c | 6 ------ server/plugins.c | 5 ----- src/gui.c | 5 ----- src/plugins.c | 11 +---------- 4 files changed, 1 insertion(+), 26 deletions(-) diff --git a/server/main.c b/server/main.c index b9ff3d1..6b4ba1f 100644 --- a/server/main.c +++ b/server/main.c @@ -787,14 +787,8 @@ read_config(void) // on windows also load config from INSTALLDIR/etc/gkrellmd.conf #if defined(WIN32) -#if GLIB_CHECK_VERSION(2,16,0) install_path = g_win32_get_package_installation_directory_of_module(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); g_free(install_path); g_free(path); diff --git a/server/plugins.c b/server/plugins.c index 5404402..092d544 100644 --- a/server/plugins.c +++ b/server/plugins.c @@ -285,7 +285,6 @@ gkrellmd_plugins_load(void) #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) @@ -293,10 +292,6 @@ gkrellmd_plugins_load(void) 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, "lib/gkrellm2/plugins-gkrellmd"); -#endif if (path) { gkrellmd_plugin_scan(path); diff --git a/src/gui.c b/src/gui.c index 91eb6e5..d80591c 100644 --- a/src/gui.c +++ b/src/gui.c @@ -1427,7 +1427,6 @@ gkrellm_make_themes_list(void) #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) @@ -1435,10 +1434,6 @@ gkrellm_make_themes_list(void) 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); diff --git a/src/plugins.c b/src/plugins.c index 1089679..4a2b54a 100644 --- a/src/plugins.c +++ b/src/plugins.c @@ -1265,23 +1265,14 @@ gkrellm_plugins_load(void) 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); + g_free(install_path); } #endif