From 171dbcdedf0712c3822bf619ea2fc4f329c0aef3 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Sun, 12 May 2013 05:58:16 +0200 Subject: [PATCH] Remove dead GLib code --- src/common/dcc.c | 9 --------- src/fe-gtk/fkeys.c | 4 ---- src/fe-gtk/sexy-spell-entry.c | 21 --------------------- 3 files changed, 34 deletions(-) diff --git a/src/common/dcc.c b/src/common/dcc.c index 9014296e..4980cabc 100644 --- a/src/common/dcc.c +++ b/src/common/dcc.c @@ -66,15 +66,6 @@ #define BIG_STR_TO_INT(x) strtoul(x,NULL,10) #endif -/* This is practically copy-paste from gstdio.h. - * GStatBuf was added in 2.26. On Win32 we already use that, - * so we only gotta check this on Unix */ -#ifndef WIN32 -#if !GLIB_CHECK_VERSION(2,26,0) -typedef struct stat GStatBuf; -#endif -#endif - static char *dcctypes[] = { "SEND", "RECV", "CHAT", "CHAT" }; struct dccstat_info dccstat[] = { diff --git a/src/fe-gtk/fkeys.c b/src/fe-gtk/fkeys.c index d1532e60..8a9a13c2 100644 --- a/src/fe-gtk/fkeys.c +++ b/src/fe-gtk/fkeys.c @@ -1637,10 +1637,6 @@ key_action_tab_comp (GtkWidget *t, GdkEventKey *entry, char *d1, char *d2, strncat (buf, result, COMP_BUF - prefix_len); cursor_pos = strlen (buf); g_free(result); -#if !GLIB_CHECK_VERSION(2,4,0) - g_utf8_validate (buf, -1, (const gchar **)&result); - (*result) = 0; -#endif if (postfix) { strcat (buf, " "); diff --git a/src/fe-gtk/sexy-spell-entry.c b/src/fe-gtk/sexy-spell-entry.c index 0b9aa0e4..2d83fb86 100644 --- a/src/fe-gtk/sexy-spell-entry.c +++ b/src/fe-gtk/sexy-spell-entry.c @@ -954,7 +954,6 @@ enchant_has_lang(const gchar *lang, GSList *langs) { void sexy_spell_entry_activate_default_languages(SexySpellEntry *entry) { -#if GLIB_CHECK_VERSION (2, 6, 0) /*const gchar* const *langs; int i; gchar *lastprefix = NULL;*/ @@ -1003,26 +1002,6 @@ sexy_spell_entry_activate_default_languages(SexySpellEntry *entry) /* If we don't have any languages activated, use "en" */ if (entry->priv->dict_list == NULL) sexy_spell_entry_activate_language_internal(entry, "en", NULL); -#else - gchar *lang; - - if (!have_enchant) - return; - - lang = (gchar *) g_getenv("LANG"); - - if (lang != NULL) { - if (g_ascii_strncasecmp(lang, "C", 1) == 0) - lang = NULL; - else if (lang[0] == '\0') - lang = NULL; - } - - if (lang == NULL) - lang = "en"; - - sexy_spell_entry_activate_language_internal(entry, lang, NULL); -#endif } static void