Commit ce5ad806 authored by Sebastian Ramacher's avatar Sebastian Ramacher

Remove old glib compat code

Signed-off-by: default avatarSebastian Ramacher <sebastian@ramacher.at>
parent 61f33840
......@@ -9,7 +9,7 @@ enhance the user interface that is used by zathura and jumanji.
Requirements
------------
glib (>= 2.28)
glib (>= 2.36)
gtk3 (>= 3.4)
intltool
libnotify (optional, for notification support)
......
......@@ -50,7 +50,7 @@ GTK_MIN_VERSION = 3.4
GTK_PKG_CONFIG_NAME = gtk+-3.0
# glib
GLIB_VERSION_CHECK ?= 1
GLIB_MIN_VERSION = 2.28
GLIB_MIN_VERSION = 2.36
GLIB_PKG_CONFIG_NAME = glib-2.0
# libs
......
......@@ -90,12 +90,7 @@ char*
girara_get_home_directory(const char* user)
{
if (user == NULL || g_strcmp0(user, g_get_user_name()) == 0) {
#if GLIB_CHECK_VERSION(2, 35, 3)
return g_strdup(g_get_home_dir());
#else
const char* homedir = g_getenv("HOME");
return g_strdup(homedir ? homedir : g_get_home_dir());
#endif
}
// XXX: The following code is very unportable.
......
......@@ -116,7 +116,6 @@ static void
xdg_path_impl(girara_xdg_path_t path, const gchar* envvar,
const gchar* expected)
{
#if GLIB_CHECK_VERSION(2, 35, 3)
const gchar* home = g_getenv("HOME");
gchar* home_env_var = NULL;
gchar** envp = NULL;
......@@ -132,9 +131,6 @@ xdg_path_impl(girara_xdg_path_t path, const gchar* envvar,
}
envp[0] = g_strdup_printf("%s=", envvar);
#else
gchar* envp[] = { g_strdup_printf("%s=", envvar), NULL };
#endif
gchar* argv[] = { XDG_TEST_HELPER, g_strdup_printf("%d", path), NULL };
gchar* output = NULL;
......@@ -166,10 +162,8 @@ xdg_path_impl(girara_xdg_path_t path, const gchar* envvar,
g_free(envp[0]);
g_free(argv[1]);
#if GLIB_CHECK_VERSION(2, 35, 3)
g_free(home_env_var);
g_free(envp);
#endif
}
START_TEST(test_xdg_path) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment