--- a/gntcolors.c Fri Aug 17 00:28:50 2012 -0400
+++ b/gntcolors.c Sun Jan 20 20:31:16 2013 -0500
@@ -142,7 +142,6 @@
-#if GLIB_CHECK_VERSION(2,6,0)
gnt_colors_get_color(char *key)
@@ -293,8 +292,6 @@
int gnt_color_pair(int pair)
return (hascolors ? COLOR_PAIR(pair) :
--- a/gntcolors.h Fri Aug 17 00:28:50 2012 -0400
+++ b/gntcolors.h Sun Jan 20 20:31:16 2013 -0500
@@ -71,7 +71,6 @@
void gnt_uninit_colors(void);
-#if GLIB_CHECK_VERSION(2,6,0)
* Parse color information from a file.
@@ -96,7 +95,6 @@
int gnt_colors_get_color(char *key);
* Return the appropriate character attribute for a specified color.
--- a/gntfilesel.c Fri Aug 17 00:28:50 2012 -0400
+++ b/gntfilesel.c Sun Jan 20 20:31:16 2013 -0500
@@ -66,106 +66,6 @@
-#if !GLIB_CHECK_VERSION(2,8,0)
-/* ripped from glib/gfileutils.c */
-g_build_path_va (const gchar *separator,
- gint separator_len = strlen (separator);
- gboolean is_first = TRUE;
- gboolean have_leading = FALSE;
- const gchar *single_element = NULL;
- const gchar *next_element;
- const gchar *last_trailing = NULL;
- result = g_string_new (NULL);
- next_element = str_array[i++];
- element = next_element;
- next_element = str_array[i++];
- /* Ignore empty elements */
- strncmp (start, separator, separator_len) == 0)
- start += separator_len;
- end = start + strlen (start);
- while (end >= start + separator_len &&
- strncmp (end - separator_len, separator, separator_len) == 0)
- while (last_trailing >= element + separator_len &&
- strncmp (last_trailing - separator_len, separator, separator_len) == 0)
- last_trailing -= separator_len;
- /* If the leading and trailing separator strings are in the
- * same element and overlap, the result is exactly that element
- if (last_trailing <= start)
- single_element = element;
- g_string_append_len (result, element, start - element);
- g_string_append (result, separator);
- g_string_append_len (result, start, end - start);
- g_string_free (result, TRUE);
- return g_strdup (single_element);
- g_string_append (result, last_trailing);
- return g_string_free (result, FALSE);
-g_build_pathv (const gchar *separator,
- return g_build_path_va (separator, args);
process_path(const char *path)
--- a/gntmain.c Fri Aug 17 00:28:50 2012 -0400
+++ b/gntmain.c Sun Jan 20 20:31:16 2013 -0500
@@ -675,7 +675,6 @@
return gnt_clipboard_get_string(clipboard);
-#if GLIB_CHECK_VERSION(2,4,0)
void (*callback)(int status, gpointer data);
@@ -697,13 +696,11 @@
gboolean gnt_giveup_console(const char *wd, char **argv, char **envp,
gint *stin, gint *stout, gint *sterr,
void (*callback)(int status, gpointer data), gpointer data)
-#if GLIB_CHECK_VERSION(2,4,0)
@@ -721,18 +718,11 @@
g_child_watch_add(pid, reap_child, cp);
gboolean gnt_is_refugee()
-#if GLIB_CHECK_VERSION(2,4,0)
return (wm && wm->mode == GNT_KP_MODE_WAIT_ON_CHILD);
const char *C_(const char *x)
--- a/gntprogressbar.c Fri Aug 17 00:28:50 2012 -0400
+++ b/gntprogressbar.c Sun Jan 20 20:31:16 2013 -0500
@@ -36,16 +36,9 @@
-#if !GLIB_CHECK_VERSION(2,4,0)
- GntProgressBarPrivate priv;
-#if GLIB_CHECK_VERSION(2,4,0)
#define GNT_PROGRESS_BAR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GNT_TYPE_PROGRESS_BAR, GntProgressBarPrivate))
-#define GNT_PROGRESS_BAR_GET_PRIVATE(o) &(GNT_PROGRESS_BAR(o)->priv)
static GntWidgetClass *parent_class = NULL;
@@ -128,9 +121,7 @@
parent_class = GNT_WIDGET_CLASS (klass);
-#if GLIB_CHECK_VERSION(2,4,0)
g_type_class_add_private (g_class, sizeof (GntProgressBarPrivate));
parent_class->draw = gnt_progress_bar_draw;
parent_class->size_request = gnt_progress_bar_size_request;
--- a/gntstyle.c Fri Aug 17 00:28:50 2012 -0400
+++ b/gntstyle.c Sun Jan 20 20:31:16 2013 -0500
@@ -35,9 +35,7 @@
#define MAX_WORKSPACES 99
-#if GLIB_CHECK_VERSION(2,6,0)
static char * str_styles[GNT_STYLES];
static int int_styles[GNT_STYLES];
@@ -50,7 +48,6 @@
char *gnt_style_get_from_name(const char *group, const char *key)
-#if GLIB_CHECK_VERSION(2,6,0)
const char *prg = g_get_prgname();
if ((group == NULL || *group == '\0') && prg &&
g_key_file_has_group(gkfile, prg))
@@ -58,15 +55,11 @@
return g_key_file_get_value(gkfile, group, key, NULL);
gnt_style_get_color(char *group, char *key)
-#if GLIB_CHECK_VERSION(2,6,0)
@@ -79,14 +72,10 @@
char **gnt_style_get_string_list(const char *group, const char *key, gsize *length)
-#if GLIB_CHECK_VERSION(2,6,0)
const char *prg = g_get_prgname();
if ((group == NULL || *group == '\0') && prg &&
g_key_file_has_group(gkfile, prg))
@@ -94,9 +83,6 @@
return g_key_file_get_string_list(gkfile, group, key, length, NULL);
gboolean gnt_style_get_bool(GntStyle style, gboolean def)
@@ -134,7 +120,6 @@
-#if GLIB_CHECK_VERSION(2,6,0)
@@ -175,11 +160,9 @@
return (char *)gnt_key_translate(key);
void gnt_style_read_workspaces(GntWM *wm)
-#if GLIB_CHECK_VERSION(2,6,0)
@@ -212,11 +195,10 @@
void gnt_style_read_actions(GType type, GntBindableClass *klass)
-#if GLIB_CHECK_VERSION(2,6,0)
@@ -264,12 +246,10 @@
gboolean gnt_style_read_menu_accels(const char *name, GHashTable *table)
-#if GLIB_CHECK_VERSION(2,6,0)
@@ -322,13 +302,10 @@
void gnt_styles_get_keyremaps(GType type, GHashTable *hash)
-#if GLIB_CHECK_VERSION(2,6,0)
@@ -373,10 +350,8 @@
-#if GLIB_CHECK_VERSION(2,6,0)
read_general_style(GKeyFile *kfile)
@@ -419,11 +394,9 @@
void gnt_style_read_configure_file(const char *filename)
-#if GLIB_CHECK_VERSION(2,6,0)
gkfile = g_key_file_new();
@@ -436,7 +409,6 @@
gnt_colors_parse(gkfile);
read_general_style(gkfile);
@@ -458,9 +430,7 @@
-#if GLIB_CHECK_VERSION(2,6,0)
--- a/gntwm.c Fri Aug 17 00:28:50 2012 -0400
+++ b/gntwm.c Sun Jan 20 20:31:16 2013 -0500
@@ -37,14 +37,7 @@
-#if GLIB_CHECK_VERSION(2,6,0)
-# include <glib/gstdio.h>
+#include <glib/gstdio.h> @@ -337,7 +330,6 @@
read_window_positions(GntWM *wm)
-#if GLIB_CHECK_VERSION(2,6,0)
GKeyFile *gfile = g_key_file_new();
char *filename = g_build_filename(g_get_home_dir(), ".gntpositions", NULL);
@@ -379,7 +371,6 @@
static gboolean check_idle(gpointer n)
@@ -1753,31 +1744,6 @@
-#if !GLIB_CHECK_VERSION(2,4,0)
-table_find_helper(gpointer key, gpointer value, gpointer data)
- if (func(key, value, table_find_data.data))
- table_find_data.value = value;
-g_hash_table_find(GHashTable * table, GHRFunc func, gpointer data)
- table_find_data.data = data;
- table_find_data.value = NULL;
- g_hash_table_foreach(table, table_find_helper, func);
- return table_find_data.value;
new_widget_find_workspace(GntWM *wm, GntWidget *widget)