[aisleriot] Drop obsolete glib version checks
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [aisleriot] Drop obsolete glib version checks
- Date: Tue, 12 Apr 2011 16:46:18 +0000 (UTC)
commit 92b96e520655a36def569e2995139ea1e2480217
Author: Christian Persch <chpe gnome org>
Date: Mon Apr 11 23:17:59 2011 +0200
Drop obsolete glib version checks
src/lib/ar-card-themes.c | 26 --------------------------
src/lib/ar-card-themes.h | 2 --
src/lib/ar-card.c | 9 ---------
src/lib/ar-debug.c | 6 ------
src/lib/ar-help.c | 5 -----
src/window.c | 1 -
6 files changed, 0 insertions(+), 49 deletions(-)
---
diff --git a/src/lib/ar-card-themes.c b/src/lib/ar-card-themes.c
index 4d98b2f..24f30f0 100644
--- a/src/lib/ar-card-themes.c
+++ b/src/lib/ar-card-themes.c
@@ -24,10 +24,7 @@
#include <glib.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <gtk/gtk.h>
-
-#if GLIB_CHECK_VERSION (2, 25, 7)
#include <gio/gio.h>
-#endif
#ifdef GDK_WINDOWING_X11
#include <gdk/gdkx.h>
@@ -372,8 +369,6 @@ themes_foreach_any (gpointer key,
data->theme = ar_card_themes_get_theme (data->theme_manager, theme_info);
}
-#if GLIB_CHECK_VERSION (2, 25, 7)
-
static void
theme_install_reply_cb (GDBusConnection *connection,
GAsyncResult *result,
@@ -399,8 +394,6 @@ theme_install_reply_cb (GDBusConnection *connection,
g_object_unref (theme_manager);
}
-#endif /* GLIB >= 2.25.7 */
-
/* Class implementation */
G_DEFINE_TYPE (ArCardThemes, ar_card_themes, G_TYPE_OBJECT);
@@ -644,23 +637,6 @@ ar_card_themes_get_themes (ArCardThemes *theme_manager)
return g_list_sort (list, (GCompareFunc) _ar_card_theme_info_collate);
}
-
-/**
- * ar_card_themes_can_install_themes:
- * @theme_manager:
- *
- * Returns: whether the new theme installer is supported
- */
-gboolean
-ar_card_themes_can_install_themes (ArCardThemes *theme_manager)
-{
-#if GLIB_CHECK_VERSION (2, 25, 7)
- return TRUE;
-#else
- return FALSE;
-#endif
-}
-
/**
* ar_card_themes_install_themes:
* @theme_manager:
@@ -674,7 +650,6 @@ ar_card_themes_install_themes (ArCardThemes *theme_manager,
GtkWindow *parent_window,
guint user_time)
{
-#if GLIB_CHECK_VERSION (2, 25, 7)
static const char *formats[] = {
#ifdef ENABLE_CARD_THEME_FORMAT_SVG
"ThemesSVG",
@@ -767,5 +742,4 @@ ar_card_themes_install_themes (ArCardThemes *theme_manager,
NULL,
(GAsyncReadyCallback) theme_install_reply_cb,
g_object_ref (theme_manager));
-#endif /* GLIB >= 2.25.7 */
}
diff --git a/src/lib/ar-card-themes.h b/src/lib/ar-card-themes.h
index 693835d..776f316 100644
--- a/src/lib/ar-card-themes.h
+++ b/src/lib/ar-card-themes.h
@@ -57,8 +57,6 @@ ArCardTheme *ar_card_themes_get_theme_by_name (ArCardThemes *theme_manager,
ArCardTheme *ar_card_themes_get_theme_any (ArCardThemes *theme_manager);
-gboolean ar_card_themes_can_install_themes (ArCardThemes *theme_manager);
-
void ar_card_themes_install_themes (ArCardThemes *theme_manager,
GtkWindow *parent_window,
guint user_time);
diff --git a/src/lib/ar-card.c b/src/lib/ar-card.c
index 1237430..5ef63d3 100644
--- a/src/lib/ar-card.c
+++ b/src/lib/ar-card.c
@@ -176,7 +176,6 @@ ar_card_get_name_by_id (gint card_id)
const char *
ar_card_get_localised_rank_symbol (int rank)
{
-#if GLIB_CHECK_VERSION (2, 18, 0)
static const char *rank_texts[] = {
/* Translators: this is the symbol that's on a Joker card */
NC_("card symbol", "JOKER"),
@@ -213,14 +212,6 @@ ar_card_get_localised_rank_symbol (int rank)
g_return_val_if_fail (rank >= AR_CARD_JOKER && rank <= AR_CARD_ACE_HIGH, NULL);
return g_dpgettext2 (GETTEXT_PACKAGE, "card symbol", rank_texts[rank]);
-
-#else
- static const char rank_texts[][6] = { "JOKER", "A", "1", "2", "3", "4", "5", "6", "7", "8", "9", "J", "Q", "K", "A" };
-
- g_return_val_if_fail (rank >= AR_CARD_JOKER && rank <= AR_CARD_ACE_HIGH, NULL);
-
- return rank_texts[rank];
-#endif /* GLIB >= 2.18.0 */
}
guint
diff --git a/src/lib/ar-debug.c b/src/lib/ar-debug.c
index 2587508..6b5ddc6 100644
--- a/src/lib/ar-debug.c
+++ b/src/lib/ar-debug.c
@@ -49,12 +49,6 @@ ar_debug_init (void)
env = g_getenv ("AR_DEBUG");
-#if !GLIB_CHECK_VERSION (2, 16, 0)
- /* g_parse_debug_string is only NULL-safe since 2.16 */
- if (env == NULL)
- return;
-#endif
-
ar_debug_flags = g_parse_debug_string (env, keys, G_N_ELEMENTS (keys));
#endif /* GNOME_ENABLE_DEBUG */
}
diff --git a/src/lib/ar-help.c b/src/lib/ar-help.c
index d3a8973..b2594bf 100644
--- a/src/lib/ar-help.c
+++ b/src/lib/ar-help.c
@@ -59,16 +59,11 @@ ar_help_display_full (GtkWidget *window,
#if defined(WITH_HELP_METHOD_GHELP)
if (section != NULL) {
-#if GLIB_CHECK_VERSION (2, 16, 0)
char *escaped_section;
escaped_section = g_uri_escape_string (section, NULL, TRUE);
help_uri = g_strdup_printf ("ghelp:%s?%s", doc_module, escaped_section);
g_free (escaped_section);
-#else
- /* Not ideal, but the best we can do */
- help_uri = g_strdup_printf ("ghelp:%s?%s", doc_module, section);
-#endif /* GLIB >= 2.16.0 */
} else {
help_uri = g_strdup_printf ("ghelp:%s", doc_module);
}
diff --git a/src/window.c b/src/window.c
index 2b65a16..b06f047 100644
--- a/src/window.c
+++ b/src/window.c
@@ -2733,7 +2733,6 @@ aisleriot_window_init (AisleriotWindow *window)
#ifndef HAVE_HILDON
action = gtk_action_group_get_action (priv->action_group, "InstallThemes");
- gtk_action_set_visible (action, ar_card_themes_can_install_themes (priv->theme_manager));
#endif /* HAVE_HILDON */
set_fullscreen_actions (window, FALSE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]