[aisleriot] Remove obsolete gtk and glib version checks



commit 10e985f4e122d6f9c4a91cce83f2a25dc9162113
Author: Christian Persch <chpe gnome org>
Date:   Tue Apr 12 14:18:06 2011 +0200

    Remove obsolete gtk and glib version checks

 src/ar-cursor.c            |   77 ----------------
 src/ar-fullscreen-button.c |    9 --
 src/ar-game-chooser.c      |    8 --
 src/ar-stock.c             |   53 ++---------
 src/ar-style-gtk.c         |    8 --
 src/board-noclutter.c      |  216 +++++++-------------------------------------
 src/board.c                |    4 -
 src/prop-editor.c          |    9 --
 src/sol.c                  |   24 -----
 src/window.c               |  102 ++-------------------
 10 files changed, 47 insertions(+), 463 deletions(-)
---
diff --git a/src/ar-cursor.c b/src/ar-cursor.c
index 1d51a8e..a69a0be 100644
--- a/src/ar-cursor.c
+++ b/src/ar-cursor.c
@@ -27,8 +27,6 @@
 /* These cursors borrowed from EOG */
 /* FIXMEchpe use themeable cursors here! */
 
-#if GTK_CHECK_VERSION (2, 91, 0)
-
 #ifdef __SUNPRO_C
 #pragma align 4 (hand_closed)
 #endif
@@ -218,73 +216,6 @@ ar_cursor_new_from_data (GdkWindow *window,
   return cursor;
 }
 
-#else
-
-#define hand_closed_data_width 20
-#define hand_closed_data_height 20
-static const char hand_closed_data_bits[] = {
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x80, 0x3f, 0x00,
-  0x80, 0xff, 0x00, 0x80, 0xff, 0x00, 0xb0, 0xff, 0x00, 0xf0, 0xff, 0x00,
-  0xe0, 0xff, 0x00, 0xe0, 0x7f, 0x00, 0xc0, 0x7f, 0x00, 0x80, 0x3f, 0x00,
-  0x00, 0x3f, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
-};
-
-#define hand_closed_mask_width 20
-#define hand_closed_mask_height 20
-static const char hand_closed_mask_bits[] = {
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x80, 0x3f, 0x00, 0xc0, 0xff, 0x00,
-  0xc0, 0xff, 0x01, 0xf0, 0xff, 0x01, 0xf8, 0xff, 0x01, 0xf8, 0xff, 0x01,
-  0xf0, 0xff, 0x01, 0xf0, 0xff, 0x00, 0xe0, 0xff, 0x00, 0xc0, 0x7f, 0x00,
-  0x80, 0x7f, 0x00, 0x80, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
-};
-
-#define hand_open_data_width 20
-#define hand_open_data_height 20
-static const char hand_open_data_bits[] = {
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00,
-  0x60, 0x36, 0x00, 0x60, 0x36, 0x00, 0xc0, 0x36, 0x01, 0xc0, 0xb6, 0x01,
-  0x80, 0xbf, 0x01, 0x98, 0xff, 0x01, 0xb8, 0xff, 0x00, 0xf0, 0xff, 0x00,
-  0xe0, 0xff, 0x00, 0xe0, 0x7f, 0x00, 0xc0, 0x7f, 0x00, 0x80, 0x3f, 0x00,
-  0x00, 0x3f, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
-};
-
-#define hand_open_mask_width 20
-#define hand_open_mask_height 20
-static const char hand_open_mask_bits[] = {
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x60, 0x3f, 0x00,
-  0xf0, 0x7f, 0x00, 0xf0, 0x7f, 0x01, 0xe0, 0xff, 0x03, 0xe0, 0xff, 0x03,
-  0xd8, 0xff, 0x03, 0xfc, 0xff, 0x03, 0xfc, 0xff, 0x01, 0xf8, 0xff, 0x01,
-  0xf0, 0xff, 0x01, 0xf0, 0xff, 0x00, 0xe0, 0xff, 0x00, 0xc0, 0x7f, 0x00,
-  0x80, 0x7f, 0x00, 0x80, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
-};
-
-static GdkCursor *
-ar_cursor_new_from_data (GdkWindow *window,
-                         const char *data,
-                         const char *mask_data)
-{
-  GdkCursor *cursor;
-  const GdkColor fg = { 0, 65535, 65535, 65535 };
-  const GdkColor bg = { 0, 0, 0, 0 };
-  GdkPixmap *source;
-  GdkPixmap *mask;
-
-  /* Yeah, hard-coded sizes are bad. */
-  source = gdk_bitmap_create_from_data (window, data, 20, 20);
-  mask = gdk_bitmap_create_from_data (window, mask_data, 20, 20);
-
-  cursor = gdk_cursor_new_from_pixmap (source, mask, &fg, &bg, 10, 10);
-
-  g_object_unref (source);
-  g_object_unref (mask);
-
-  return cursor;
-}
-
-#endif /* GTK 2.91.0 */
-
 #endif /* !HAVE_HILDON */
 
 GdkCursor *ar_cursor_new (GdkWindow *window,
@@ -293,18 +224,10 @@ GdkCursor *ar_cursor_new (GdkWindow *window,
 #ifndef HAVE_HILDON
   switch (cursor_type) {
     case AR_CURSOR_OPEN:
-#if GTK_CHECK_VERSION (2, 90, 8)
       return ar_cursor_new_from_data (window, hand_open_data, sizeof (hand_open_data));
-#else
-      return ar_cursor_new_from_data (window, hand_open_data_bits, hand_open_mask_bits);
-#endif
 
     case AR_CURSOR_CLOSED:
-#if GTK_CHECK_VERSION (2, 90, 8)
       return ar_cursor_new_from_data (window, hand_closed_data, sizeof (hand_closed_data));
-#else
-      return ar_cursor_new_from_data (window, hand_closed_data_bits, hand_closed_mask_bits);
-#endif
 
     default:
       g_assert_not_reached ();
diff --git a/src/ar-fullscreen-button.c b/src/ar-fullscreen-button.c
index 6823e63..c0de718 100644
--- a/src/ar-fullscreen-button.c
+++ b/src/ar-fullscreen-button.c
@@ -77,17 +77,10 @@ autohide_reschedule (ArFullscreenButton *button)
   if (!priv->active)
     return;
 
-#if GTK_CHECK_VERSION (2, 14, 0)
   priv->autohide_timeout_id =
     gdk_threads_add_timeout_seconds (AUTOHIDE_TIMEOUT,
                                      (GSourceFunc) autohide_cb,
                                      button);
-#else
-  priv->autohide_timeout_id =
-    g_timeout_add (AUTOHIDE_TIMEOUT * 1000,
-                   (GSourceFunc) autohide_cb,
-                   button);
-#endif
 }
 
 static void
@@ -540,9 +533,7 @@ ar_fullscreen_button_new (GtkWindow *parent,
 {
   return g_object_new (AR_TYPE_FULLSCREEN_BUTTON,
                        "type", GTK_WINDOW_POPUP,
-#if GTK_CHECK_VERSION (2, 10, 0)
                        "transient-for", parent,
-#endif
                        "window", parent,
                        "corner", corner,
                        NULL);
diff --git a/src/ar-game-chooser.c b/src/ar-game-chooser.c
index 3121ff5..bdd3b6b 100644
--- a/src/ar-game-chooser.c
+++ b/src/ar-game-chooser.c
@@ -248,9 +248,6 @@ ar_game_chooser_constructor (GType type,
   content_area = gtk_dialog_get_content_area (dialog);
   gtk_box_set_spacing (GTK_BOX (content_area), 2);
 
-#if !GTK_CHECK_VERSION (2, 90, 7)
-  gtk_dialog_set_has_separator (dialog, FALSE);
-#endif
   gtk_dialog_add_buttons (dialog,
                           GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
                           _("_Select"), GTK_RESPONSE_OK,
@@ -350,9 +347,6 @@ ar_game_chooser_set_property (GObject      *object,
   switch (property_id) {
     case PROP_WINDOW:
       priv->window = g_value_get_object (value);
-#if !GTK_CHECK_VERSION (2, 10, 0)
-      gtk_window_set_transient_for (GTK_WINDOW (chooser), GTK_WINDOW (priv->window));
-#endif
       break;
 
     default:
@@ -398,9 +392,7 @@ ar_game_chooser_new (AisleriotWindow *window)
 {
   return g_object_new (AR_TYPE_GAME_CHOOSER,
                        "type", GTK_WINDOW_TOPLEVEL,
-#if GTK_CHECK_VERSION (2, 10, 0)
                        "transient-for", window,
-#endif
                        "destroy-with-parent", TRUE,
                        "window", window,
                        NULL);
diff --git a/src/ar-stock.c b/src/ar-stock.c
index f568822..2c33779 100644
--- a/src/ar-stock.c
+++ b/src/ar-stock.c
@@ -27,13 +27,6 @@
 #include <gtk/gtk.h>
 #include <glib/gi18n.h>
 
-#if GTK_CHECK_VERSION (2, 90, 7)
-#define GDK_KEY(symbol) GDK_KEY_##symbol
-#else
-#include <gdk/gdkkeysyms.h>
-#define GDK_KEY(symbol) GDK_##symbol
-#endif
-
 #include "ar-runtime.h"
 
 #include "ar-stock.h"
@@ -95,13 +88,7 @@ menu_item_select_cb (GtkWidget * widget, GtkStatusbar * statusbar)
 
   context_id = gtk_statusbar_get_context_id (statusbar, "games-tooltip");
 
-#if GTK_CHECK_VERSION (2, 16, 0)
   action = gtk_activatable_get_related_action (GTK_ACTIVATABLE (widget));
-#elif GTK_CHECK_VERSION (2, 10, 0)
-  action = gtk_widget_get_action (widget);
-#else
-  action = g_object_get_data (G_OBJECT (widget), "gtk-action");
-#endif
   g_return_if_fail (action != NULL);
 
   g_object_get (action, "tooltip", &tooltip, NULL);
@@ -245,12 +232,10 @@ ar_stock_init (void)
     { AR_STOCK_START_NEW_GAME,   GTK_STOCK_NEW },
     { AR_STOCK_RESET,            GTK_STOCK_CLEAR },
     { AR_STOCK_RESTART_GAME,     GTK_STOCK_REFRESH },
-#if GTK_CHECK_VERSION (2, 8, 0)
     /* This is used on hildon too, but only exists since 2.8 */
     { AR_STOCK_FULLSCREEN,       GTK_STOCK_FULLSCREEN },
     /* This is used on maemo 5 */
     { AR_STOCK_LEAVE_FULLSCREEN, GTK_STOCK_LEAVE_FULLSCREEN },
-#endif /* GTK+ >= 2.8.0 */
 #ifdef HAVE_GTK_ICON_FACTORY_ADD_ALIAS
     { AR_STOCK_REDO_MOVE,        GTK_STOCK_REDO },
     { AR_STOCK_UNDO_MOVE,        GTK_STOCK_UNDO },
@@ -293,27 +278,27 @@ ar_stock_init (void)
 #endif
 
   static const GtkStockItem ar_stock_items[] = {
-    { AR_STOCK_CONTENTS,         N_("_Contents"),          0, STOCK_ACCEL (GDK_KEY (F1), 0), NULL },
-    { AR_STOCK_FULLSCREEN,       N_("_Fullscreen"),        0, STOCK_ACCEL (GDK_KEY (F11), GDK_KEY (F6)), NULL },
-    { AR_STOCK_HINT,             N_("_Hint"),              STOCK_ACCEL (GDK_CONTROL_MASK, 0), STOCK_ACCEL ('h', GDK_KEY (Return)), NULL },
+    { AR_STOCK_CONTENTS,         N_("_Contents"),          0, STOCK_ACCEL (GDK_KEY_F1, 0), NULL },
+    { AR_STOCK_FULLSCREEN,       N_("_Fullscreen"),        0, STOCK_ACCEL (GDK_KEY_F11, GDK_KEY_F6), NULL },
+    { AR_STOCK_HINT,             N_("_Hint"),              STOCK_ACCEL (GDK_CONTROL_MASK, 0), STOCK_ACCEL ('h', GDK_KEY_Return), NULL },
     /* Translators: This "_New" is for the menu item 'Game->New', implies "New Game" */
     { AR_STOCK_NEW_GAME,         N_("_New"),               STOCK_ACCEL (GDK_CONTROL_MASK, 0), STOCK_ACCEL ('n', 0), NULL },
     /* Translators: This "_New Game" is for the game-over dialogue */
     { AR_STOCK_START_NEW_GAME,   N_("_New Game"),          0, 0, NULL },
-    { AR_STOCK_REDO_MOVE,        N_("_Redo Move"),         STOCK_ACCEL (GDK_CONTROL_MASK | GDK_SHIFT_MASK, 0), STOCK_ACCEL ('z', GDK_KEY (F7)), NULL },
+    { AR_STOCK_REDO_MOVE,        N_("_Redo Move"),         STOCK_ACCEL (GDK_CONTROL_MASK | GDK_SHIFT_MASK, 0), STOCK_ACCEL ('z', GDK_KEY_F7), NULL },
     /* Translators: this is the "Reset" scores button in a scores dialogue */
     { AR_STOCK_RESET,            N_("_Reset"),             0, 0, NULL },
     /* Translators: "_Restart" is the menu item 'Game->Restart', implies "Restart Game" */
     { AR_STOCK_RESTART_GAME,     N_("_Restart"),           0, 0, NULL },
-    { AR_STOCK_UNDO_MOVE,        N_("_Undo Move"),         STOCK_ACCEL (GDK_CONTROL_MASK, 0), STOCK_ACCEL ('z', GDK_KEY (F8)), NULL },
+    { AR_STOCK_UNDO_MOVE,        N_("_Undo Move"),         STOCK_ACCEL (GDK_CONTROL_MASK, 0), STOCK_ACCEL ('z', GDK_KEY_F8), NULL },
     { AR_STOCK_DEAL_CARDS,       N_("_Deal"),              GDK_CONTROL_MASK, 'd', NULL },
 #ifndef HAVE_HILDON
-    { AR_STOCK_LEAVE_FULLSCREEN, N_("_Leave Fullscreen"),  0, GDK_KEY (F11), NULL },
+    { AR_STOCK_LEAVE_FULLSCREEN, N_("_Leave Fullscreen"),  0, GDK_KEY_F11, NULL },
     { AR_STOCK_NETWORK_GAME,     N_("Network _Game"),      GDK_CONTROL_MASK, 'g', NULL },
     { AR_STOCK_NETWORK_LEAVE,    N_("L_eave Game"),        GDK_CONTROL_MASK, 'e', NULL },
     { AR_STOCK_PLAYER_LIST,      N_("Player _List"),       GDK_CONTROL_MASK, 'l', NULL },
-    { AR_STOCK_PAUSE_GAME,       N_("_Pause"),             0, GDK_KEY (Pause), NULL },
-    { AR_STOCK_RESUME_GAME,      N_("Res_ume"),            0, GDK_KEY (Pause), NULL },
+    { AR_STOCK_PAUSE_GAME,       N_("_Pause"),             0, GDK_KEY_Pause, NULL },
+    { AR_STOCK_RESUME_GAME,      N_("Res_ume"),            0, GDK_KEY_Pause, NULL },
     { AR_STOCK_SCORES,           N_("_Scores"),            0, 0, NULL },
     { AR_STOCK_END_GAME,         N_("_End Game"),          0, 0, NULL },
 #endif
@@ -407,28 +392,6 @@ ar_get_licence_version (const gchar * game_name,
   else
     license_trans = g_strjoin ("\n\n", _(license0), _(license1), _(license2), NULL);
 
-#if !GTK_CHECK_VERSION (2, 8, 0)
-  /* We have to manually wrap the text, since the about dialogue cannot
-   * do it itself before gtk 2.8.
-   */
-  {
-    char *p;
-    gsize line_length;
-
-    line_length = 0;
-    for (p = license_trans; *p; ++p) {
-      if (*p == ' ' && line_length > 42) {
-        *p = '\n';
-        line_length = 0;
-      } else if (*p == '\n') {
-        line_length = 0;
-      } else {
-        ++line_length;
-      }
-    }
-  }
-#endif /* ! GTK+ 2.8.0 */
-
   license_str =
     g_strdup_printf (license_trans, game_name, version, game_name, game_name);
   g_free (license_trans);
diff --git a/src/ar-style-gtk.c b/src/ar-style-gtk.c
index 1dc9f06..5cdd945 100644
--- a/src/ar-style-gtk.c
+++ b/src/ar-style-gtk.c
@@ -94,7 +94,6 @@ sync_settings (GtkSettings *settings,
     }
   }
 
-#if GTK_CHECK_VERSION (2, 14, 0)
   if (pspec_name == NULL || pspec_name == I_("gtk-enable-event-sounds")) {
     gboolean enable;
 
@@ -107,9 +106,7 @@ sync_settings (GtkSettings *settings,
       g_object_notify (style_object, AR_STYLE_PROP_ENABLE_SOUND);
     }
   }
-#endif /* GTK+ >= 2.14.0 */
 
-#if GTK_CHECK_VERSION (2, 10, 0)
   if (pspec_name == NULL || pspec_name == I_("gtk-touchscreen-mode")) {
     gboolean enable;
 
@@ -122,7 +119,6 @@ sync_settings (GtkSettings *settings,
       g_object_notify (style_object, AR_STYLE_PROP_TOUCHSCREEN_MODE);
     }
   }
-#endif /* GTK+ >= 2.10.0 */
 
   g_object_thaw_notify (style_object);
 }
@@ -195,14 +191,10 @@ screen_changed_cb (GtkWidget *widget,
                     G_CALLBACK (sync_settings), style);
   g_signal_connect (settings, "notify::gtk-enable-animations",
                     G_CALLBACK (sync_settings), style);
-#if GTK_CHECK_VERSION (2, 14, 0)
   g_signal_connect (settings, "notify::gtk-enable-event-sounds",
                     G_CALLBACK (sync_settings), style);
-#endif /* GTK+ >= 2.14.0 */
-#if GTK_CHECK_VERSION (2, 10, 0)
   g_signal_connect (settings, "notify::gtk-touchscreen-mode",
                     G_CALLBACK (sync_settings), style);
-#endif /* GTK+ >= 2.10.0 */
 }
 
 static void
diff --git a/src/board-noclutter.c b/src/board-noclutter.c
index 7791b6d..94ca86c 100644
--- a/src/board-noclutter.c
+++ b/src/board-noclutter.c
@@ -28,13 +28,6 @@
 
 #include <gtk/gtk.h>
 
-#if GTK_CHECK_VERSION (2, 90, 7)
-#define GDK_KEY(symbol) GDK_KEY_##symbol
-#else
-#include <gdk/gdkkeysyms.h>
-#define GDK_KEY(symbol) GDK_##symbol
-#endif
-
 #include "ar-glib-compat.h"
 #include "ar-gtk-compat.h"
 #include "ar-marshal.h"
@@ -832,9 +825,7 @@ slot_update_card_images (AisleriotBoard *board,
 static void
 aisleriot_board_error_bell (AisleriotBoard *board)
 {
-#if GTK_CHECK_VERSION (2, 12, 0) || (defined (HAVE_HILDON) && !defined(HAVE_MAEMO_3))
   gtk_widget_error_bell (GTK_WIDGET (board));
-#endif
 }
 
 /* Work out new sizes and spacings for the cards. */
@@ -947,15 +938,9 @@ drag_begin (AisleriotBoard *board)
   GdkWindow *window;
 #ifdef CAIRO_DRAWING
   cairo_t *cr;
-#if GTK_CHECK_VERSION (2, 90, 8)
   cairo_surface_t *surface;
   cairo_region_t *shape;
   cairo_pattern_t *pattern;
-#else
-  cairo_t *cr2;
-  GdkPixmap *moving_pixmap;
-  GdkPixmap *moving_mask;
-#endif /* GTK 2.90 */
 #else /* !CAIRO_DRAWING */
   const GdkColor masked = { 0, 0, 0, 0 };
   const GdkColor unmasked = { 1, 0xffff, 0xffff, 0xffff };
@@ -1022,50 +1007,21 @@ drag_begin (AisleriotBoard *board)
   attributes.y = y;
   attributes.width = width;
   attributes.height = height;
-#if GTK_CHECK_VERSION (2, 90, 8)
   attributes.visual = gdk_window_get_visual (window);
-#else
-  attributes.colormap = gdk_drawable_get_colormap (GDK_DRAWABLE (window));
-  attributes.visual = gdk_drawable_get_visual (GDK_DRAWABLE (window));
-#endif
 
   priv->moving_cards_window = gdk_window_new (window, &attributes,
-#if !GTK_CHECK_VERSION (2, 90, 8)
-                                              GDK_WA_COLORMAP |
-#endif
                                               GDK_WA_VISUAL | GDK_WA_X | GDK_WA_Y);
 
-#if !GTK_CHECK_VERSION (2, 90, 8)
-  moving_pixmap = gdk_pixmap_new (priv->moving_cards_window,
-                                  width, height,
-                                  gdk_visual_get_depth (gdk_drawable_get_visual (priv->moving_cards_window)));
-  moving_mask = gdk_pixmap_new (priv->moving_cards_window,
-                                width, height,
-                                1);
-#endif
 
 #ifdef CAIRO_DRAWING
-#if GTK_CHECK_VERSION (2, 90, 8)
   surface = gdk_window_create_similar_surface (priv->moving_cards_window, CAIRO_CONTENT_COLOR_ALPHA,
                                                width, height);
   cr = cairo_create (surface);
-#else
-  cr = gdk_cairo_create (moving_pixmap);
-#endif
 
   cairo_set_operator (cr, CAIRO_OPERATOR_CLEAR);
   cairo_paint (cr);
 
   cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
-
-#if !GTK_CHECK_VERSION (2, 90, 8)
-  cr2 = gdk_cairo_create (moving_mask);
-  cairo_set_operator (cr2, CAIRO_OPERATOR_CLEAR);
-  cairo_paint (cr2);
-
-  cairo_set_operator (cr2, CAIRO_OPERATOR_OVER);
-  cairo_set_source_rgb (cr2, 0., 0., 0.);
-#endif
 #endif /* CAIRO_DRAWING */
 
 #ifndef CAIRO_DRAWING
@@ -1112,11 +1068,6 @@ drag_begin (AisleriotBoard *board)
     cairo_set_source (cr, card_pattern);
     cairo_paint (cr);
 
-#if !GTK_CHECK_VERSION (2, 90, 8)
-    cairo_set_source (cr2, card_pattern);
-    cairo_paint (cr2);
-#endif
-
     cairo_pattern_destroy (card_pattern);
 
 #else /* !CAIRO_DRAWING */
@@ -1159,7 +1110,6 @@ drag_begin (AisleriotBoard *board)
 #ifdef CAIRO_DRAWING
   cairo_destroy (cr);
 
-#if GTK_CHECK_VERSION (2, 90, 8)
   pattern = cairo_pattern_create_for_surface (surface);
   gdk_window_set_background_pattern (priv->moving_cards_window, pattern);
   cairo_pattern_destroy (pattern);
@@ -1169,24 +1119,11 @@ drag_begin (AisleriotBoard *board)
   cairo_region_destroy (shape);
 
   cairo_surface_destroy (surface);
-#else /* !GTK 2.90 */
-  cairo_destroy (cr2);
-#endif /* GTK 2.90 */
 #else /* !CAIRO_DRAWING */
   g_object_unref (gc1);
   g_object_unref (gc2);
 #endif /* CAIRO_DRAWING */
 
-#if !GTK_CHECK_VERSION (2, 90, 8)
-  gdk_window_set_back_pixmap (priv->moving_cards_window,
-			      moving_pixmap, 0);
-  gdk_window_shape_combine_mask (priv->moving_cards_window,
-				 moving_mask, 0, 0);
-
-  g_object_unref (moving_pixmap);
-  g_object_unref (moving_mask);
-#endif /* !GTK 2.90*/
-
   gdk_window_show (priv->moving_cards_window);
 
   slot_update_geometry (board, hslot);
@@ -1504,7 +1441,7 @@ aisleriot_board_move_selected_cards_to_slot (AisleriotBoard *board,
 
 /* Tooltips */
 
-#if GTK_CHECK_VERSION (2, 12, 0) && !defined(HAVE_HILDON)
+#if !defined(HAVE_HILDON)
 
 static gboolean
 aisleriot_board_query_tooltip_cb (GtkWidget *widget,
@@ -1534,7 +1471,7 @@ aisleriot_board_query_tooltip_cb (GtkWidget *widget,
   return TRUE;
 }
 
-#endif /* GTK >= 2.12.0 && !HAVE_HILDON */
+#endif /* !HAVE_HILDON */
 
 /* Keynav */
 
@@ -1823,9 +1760,7 @@ aisleriot_board_move_cursor_left_right_by_slot (AisleriotBoard *board,
   int focus_slot_index, new_focus_slot_index;
   int new_focus_slot_topmost_card_id, new_focus_card_id;
   gboolean is_rtl;
-#if GTK_CHECK_VERSION (2, 12, 0)
   GtkDirectionType direction;
-#endif
 
   slots = aisleriot_game_get_slots (priv->game);
   if (!slots || slots->len == 0)
@@ -1852,7 +1787,6 @@ aisleriot_board_move_cursor_left_right_by_slot (AisleriotBoard *board,
     if (!wrap)
       return FALSE;
 
-#if GTK_CHECK_VERSION (2, 12, 0)
     if (count > 0) {
       direction = GTK_DIR_RIGHT;
     } else {
@@ -1862,7 +1796,6 @@ aisleriot_board_move_cursor_left_right_by_slot (AisleriotBoard *board,
     if (!gtk_widget_keynav_failed (widget, direction)) {
        return gtk_widget_child_focus (gtk_widget_get_toplevel (widget), direction);
     }
-#endif /* GTK 2.12. 0 */
 
     if (new_focus_slot_index < 0) {
       new_focus_slot_index = ((int) n_slots) - 1;
@@ -1930,7 +1863,6 @@ aisleriot_board_move_cursor_up_down_by_slot (AisleriotBoard *board,
            !test_slot_projection_intersects_x (slots->pdata[new_focus_slot_index], x_start, x_end));
 
   if (new_focus_slot_index < 0 || new_focus_slot_index == n_slots) {
-#if GTK_CHECK_VERSION (2, 12, 0)
     GtkWidget *widget = GTK_WIDGET (board);
     GtkDirectionType direction;
 
@@ -1943,7 +1875,6 @@ aisleriot_board_move_cursor_up_down_by_slot (AisleriotBoard *board,
     if (!gtk_widget_keynav_failed (widget, direction)) {
        return gtk_widget_child_focus (gtk_widget_get_toplevel (widget), direction);
     }
-#endif /* GTK 2.12. 0 */
 
     /* Wrap around */
     if (count > 0) {
@@ -2697,7 +2628,7 @@ aisleriot_board_sync_style (ArStyle *style,
   }
 #endif /* !CAIRO_DRAWING */
 
-#if GTK_CHECK_VERSION (2, 12, 0) && !defined(HAVE_HILDON)
+#if !defined(HAVE_HILDON)
   if (pspec_name == NULL || pspec_name == I_(AR_STYLE_PROP_SHOW_TOOLTIPS)) {
     gtk_widget_set_has_tooltip (widget, ar_style_get_show_tooltips (priv->style));
   }
@@ -2764,8 +2695,6 @@ aisleriot_board_size_allocate (GtkWidget *widget,
   }
 }
 
-#if GTK_CHECK_VERSION (2, 91, 0)
-
 static void
 aisleriot_board_get_preferred_width (GtkWidget *widget,
                                      gint      *minimum,
@@ -2782,18 +2711,6 @@ aisleriot_board_get_preferred_height (GtkWidget *widget,
   *minimum = *natural = BOARD_MIN_HEIGHT;
 }
 
-#else
-
-static void
-aisleriot_board_size_request (GtkWidget *widget,
-                              GtkRequisition *requisition)
-{
-  requisition->width = BOARD_MIN_WIDTH;
-  requisition->height = BOARD_MIN_HEIGHT;
-}
-
-#endif /* GTK 3.0 */
-
 #ifdef ENABLE_KEYNAV
 
 static gboolean
@@ -3163,10 +3080,6 @@ aisleriot_board_motion_notify (GtkWidget *widget,
     highlight_drop_target (board, slot);
 
     gdk_window_move (priv->moving_cards_window, x, y);
-#if !GTK_CHECK_VERSION (2, 90, 8)
-    /* FIXMEchpe: why? */
-    gdk_window_clear (priv->moving_cards_window);
-#endif
 
     set_cursor (board, AR_CURSOR_CLOSED);
   } else if (priv->click_status == STATUS_MAYBE_DRAG &&
@@ -3241,7 +3154,7 @@ aisleriot_board_tap_and_hold_cb (GtkWidget *widget,
 
 #ifdef CAIRO_DRAWING
 
-#if defined (OPTIMISED_EXPOSE) && GTK_CHECK_VERSION (2, 90, 8)
+#if defined (OPTIMISED_EXPOSE)
 
 static cairo_region_t *
 ar_cairo_get_clip_region (cairo_t *cr)
@@ -3283,17 +3196,11 @@ ar_cairo_get_clip_region (cairo_t *cr)
   return region;
 }
 
-#endif /* OPTIMISED_EXPOSE && GTK 2.90 */
+#endif /* OPTIMISED_EXPOSE */
 
-#if GTK_CHECK_VERSION (2, 90, 8)
 static gboolean
 aisleriot_board_draw (GtkWidget *widget,
                       cairo_t *cr)
-#else
-static gboolean
-aisleriot_board_expose_event (GtkWidget *widget,
-                              GdkEventExpose *event)
-#endif
 {
   AisleriotBoard *board = AISLERIOT_BOARD (widget);
   AisleriotBoardPrivate *priv = board->priv;
@@ -3307,30 +3214,16 @@ aisleriot_board_expose_event (GtkWidget *widget,
   cairo_surface_t *surface;
   cairo_pattern_t *pattern;
   cairo_matrix_t matrix;
-#if GTK_CHECK_VERSION (2, 90, 8)
 #ifdef OPTIMISED_EXPOSE
   cairo_region_t *region;
 #else
   cairo_rectangle_int_t clip_rect;
 #endif /* OPTIMISED_EXPOSE */
-#else
-  GdkWindow *window;
-  GdkRegion *region = event->region;
-  cairo_t *cr;
-#endif
 
   /* NOTE: It's ok to just return instead of chaining up, since the
    * parent class has no class closure for this event.
    */
 
-#if !GTK_CHECK_VERSION (2, 90, 8)
-  window = gtk_widget_get_window (widget);
-
-  if (event->window != window)
-    return FALSE;
-#endif
-
-#if GTK_CHECK_VERSION (2, 90, 8)
 #ifdef OPTIMISED_EXPOSE
   region = ar_cairo_get_clip_region (cr);
   if (region == NULL)
@@ -3344,12 +3237,8 @@ aisleriot_board_expose_event (GtkWidget *widget,
   if (!gdk_cairo_get_clip_rectangle (cr, &clip_rect))
     return FALSE;
 #endif /* OPTIMISED_EXPOSE */
-#else /* GTK < 2.90 */
-  if (gdk_region_empty (region))
-    return FALSE;
-#endif /* GTK 2.90 */
 
-#if 0 && GTK_CHECK_VERSION (2, 90, 8) && defined(OPTIMISED_EXPOSE) 
+#if 0 && defined(OPTIMISED_EXPOSE)
   {
     int n_rects;
 
@@ -3367,19 +3256,12 @@ aisleriot_board_expose_event (GtkWidget *widget,
   }
 #endif
 
-#if !GTK_CHECK_VERSION (2, 90, 8)
-  cr = gdk_cairo_create (window);
-
-  gdk_cairo_region (cr, region);
-  cairo_clip (cr);
-#endif
-
   /* First paint the background */
 
   ar_style_get_baize_color (priv->style, &color);
   gdk_cairo_set_source_color (cr, &color);
 
-#if !GTK_CHECK_VERSION (2, 90, 8) || defined (OPTIMISED_EXPOSE)
+#ifdef OPTIMISED_EXPOSE
   gdk_cairo_region (cr, region);
 #else
   gdk_cairo_rectangle (cr, &clip_rect);
@@ -3389,13 +3271,9 @@ aisleriot_board_expose_event (GtkWidget *widget,
 
   /* Only draw the the cards when the geometry is set, and we're in a resize */
   if (!priv->geometry_set) {
-#if GTK_CHECK_VERSION (2, 90, 8)
 #ifdef OPTIMISED_EXPOSE
     cairo_region_destroy (region);
 #endif
-#else
-    cairo_destroy (cr);
-#endif
     return TRUE;
   }
 
@@ -3414,13 +3292,8 @@ aisleriot_board_expose_event (GtkWidget *widget,
 
     /* Check whether this slot needs to be drawn */
 #ifdef OPTIMISED_EXPOSE
-#if GTK_CHECK_VERSION (2, 90, 5)
     if (cairo_region_contains_rectangle (region, &slot->rect) == CAIRO_REGION_OVERLAP_OUT)
       continue;
-#else
-    if (gdk_region_rect_in (region, &slot->rect) == GDK_OVERLAP_RECTANGLE_OUT)
-      continue;
-#endif
 #endif /* OPTIMISED_EXPOSE */
 
     exposed_slots[n_exposed_slots++] = slot;
@@ -3509,13 +3382,8 @@ draw_cards:
        * to be obscured by later drawn cards anyway.
        */
 #ifdef OPTIMISED_EXPOSE
-#if GTK_CHECK_VERSION (2, 90, 5)
       if (cairo_region_contains_rectangle (region, &card_rect) == CAIRO_REGION_OVERLAP_OUT)
         goto next;
-#else
-      if (gdk_region_rect_in (region, &card_rect) == GDK_OVERLAP_RECTANGLE_OUT)
-        goto next;
-#endif
 #endif /* OPTIMISED_EXPOSE */
 
       surface = card_images[j];
@@ -3551,14 +3419,9 @@ draw_cards:
 
   /* Draw the revealed card */
 #ifdef OPTIMISED_EXPOSE
-#if GTK_CHECK_VERSION (2, 90, 5)
   if (priv->show_card_slot != NULL &&
       cairo_region_contains_rectangle (region, &priv->show_card_slot->rect) != CAIRO_REGION_OVERLAP_OUT)
 #else
-  if (priv->show_card_slot != NULL &&
-      gdk_region_rect_in (region, &priv->show_card_slot->rect) != GDK_OVERLAP_RECTANGLE_OUT)
-#endif
-#else
   if (priv->show_card_slot != NULL)
 #endif /* OPTIMISED_EXPOSE */
   {
@@ -3595,13 +3458,8 @@ draw_focus:
 
     /* Check whether this needs to be drawn */
 #ifdef OPTIMISED_EXPOSE
-#if GTK_CHECK_VERSION (2, 90, 5)
     if (cairo_region_contains_rectangle (region, &priv->focus_rect) == CAIRO_REGION_OVERLAP_OUT)
       goto expose_done;
-#else
-    if (gdk_region_rect_in (region, &priv->focus_rect) == GDK_OVERLAP_RECTANGLE_OUT)
-      goto expose_done;
-#endif
 #endif /* OPTIMISED_EXPOSE */
 
     if (ar_style_get_interior_focus (priv->style)) {
@@ -3657,13 +3515,9 @@ expose_done:
   }
   #endif
 
-#if GTK_CHECK_VERSION (2, 90, 8)
 #ifdef OPTIMISED_EXPOSE
   cairo_region_destroy (region);
 #endif
-#else
-  cairo_destroy (cr);
-#endif
 
   /* Parent class has no expose handler, no need to chain up */
   return TRUE;
@@ -3993,7 +3847,7 @@ aisleriot_board_init (AisleriotBoard *board)
                     G_CALLBACK (aisleriot_board_tap_and_hold_cb), board);
 #endif /* HAVE_MAEMO */
 
-#if GTK_CHECK_VERSION (2, 12, 0) && !defined(HAVE_HILDON)
+#if !defined(HAVE_HILDON)
   g_signal_connect (widget, "query-tooltip",
                     G_CALLBACK (aisleriot_board_query_tooltip_cb), board);
 #endif
@@ -4094,12 +3948,8 @@ aisleriot_board_class_init (AisleriotBoardClass *klass)
   widget_class->realize = aisleriot_board_realize;
   widget_class->unrealize = aisleriot_board_unrealize;
   widget_class->size_allocate = aisleriot_board_size_allocate;
-#if GTK_CHECK_VERSION (2, 91, 0)
   widget_class->get_preferred_width = aisleriot_board_get_preferred_width;
   widget_class->get_preferred_height = aisleriot_board_get_preferred_height;
-#else
-  widget_class->size_request = aisleriot_board_size_request;
-#endif
 #ifdef ENABLE_KEYNAV
   widget_class->focus = aisleriot_board_focus;
 #endif /* ENABLE_KEYNAV */
@@ -4109,11 +3959,7 @@ aisleriot_board_class_init (AisleriotBoardClass *klass)
   widget_class->button_release_event = aisleriot_board_button_release;
   widget_class->motion_notify_event = aisleriot_board_motion_notify;
   widget_class->key_press_event = aisleriot_board_key_press;
-#if GTK_CHECK_VERSION (2, 90, 8)
   widget_class->draw = aisleriot_board_draw;
-#else
-  widget_class->expose_event = aisleriot_board_expose_event;
-#endif
 
   signals[STATUS_MESSAGE] =
     g_signal_new (I_("status-message"),
@@ -4213,60 +4059,60 @@ aisleriot_board_class_init (AisleriotBoardClass *klass)
   binding_set = gtk_binding_set_by_class (klass);
 
   /* Cursor movement */
-  aisleriot_board_add_move_and_select_binding (binding_set, GDK_KEY (Left), 0,
+  aisleriot_board_add_move_and_select_binding (binding_set, GDK_KEY_Left, 0,
                                                GTK_MOVEMENT_VISUAL_POSITIONS, -1);
-  aisleriot_board_add_move_and_select_binding (binding_set, GDK_KEY (KP_Left), 0,
+  aisleriot_board_add_move_and_select_binding (binding_set, GDK_KEY_KP_Left, 0,
                                                GTK_MOVEMENT_VISUAL_POSITIONS, -1);
 
-  aisleriot_board_add_move_and_select_binding (binding_set, GDK_KEY (Right), 0,
+  aisleriot_board_add_move_and_select_binding (binding_set, GDK_KEY_Right, 0,
                                                GTK_MOVEMENT_VISUAL_POSITIONS, 1);
-  aisleriot_board_add_move_and_select_binding (binding_set, GDK_KEY (KP_Right), 0,
+  aisleriot_board_add_move_and_select_binding (binding_set, GDK_KEY_KP_Right, 0,
                                                GTK_MOVEMENT_VISUAL_POSITIONS, 1);
 
-  aisleriot_board_add_move_and_select_binding (binding_set, GDK_KEY (Up), 0,
+  aisleriot_board_add_move_and_select_binding (binding_set, GDK_KEY_Up, 0,
                                                GTK_MOVEMENT_DISPLAY_LINES, -1);
-  aisleriot_board_add_move_and_select_binding (binding_set, GDK_KEY (KP_Up), 0,
+  aisleriot_board_add_move_and_select_binding (binding_set, GDK_KEY_KP_Up, 0,
                                                GTK_MOVEMENT_DISPLAY_LINES, -1);
 
-  aisleriot_board_add_move_and_select_binding (binding_set, GDK_KEY (Down), 0,
+  aisleriot_board_add_move_and_select_binding (binding_set, GDK_KEY_Down, 0,
                                                GTK_MOVEMENT_DISPLAY_LINES, 1);
-  aisleriot_board_add_move_and_select_binding (binding_set, GDK_KEY (KP_Down), 0,
+  aisleriot_board_add_move_and_select_binding (binding_set, GDK_KEY_KP_Down, 0,
                                                GTK_MOVEMENT_DISPLAY_LINES, 1);
 
-  aisleriot_board_add_move_and_select_binding (binding_set, GDK_KEY (Home), 0,
+  aisleriot_board_add_move_and_select_binding (binding_set, GDK_KEY_Home, 0,
                                                GTK_MOVEMENT_BUFFER_ENDS, -1);
-  aisleriot_board_add_move_and_select_binding (binding_set, GDK_KEY (KP_Home), 0,
+  aisleriot_board_add_move_and_select_binding (binding_set, GDK_KEY_KP_Home, 0,
                                                GTK_MOVEMENT_BUFFER_ENDS, -1);
 
-  aisleriot_board_add_move_and_select_binding (binding_set, GDK_KEY (End), 0,
+  aisleriot_board_add_move_and_select_binding (binding_set, GDK_KEY_End, 0,
                                                GTK_MOVEMENT_BUFFER_ENDS, 1);
-  aisleriot_board_add_move_and_select_binding (binding_set, GDK_KEY (KP_End), 0,
+  aisleriot_board_add_move_and_select_binding (binding_set, GDK_KEY_KP_End, 0,
                                                GTK_MOVEMENT_BUFFER_ENDS, 1);
 
-  aisleriot_board_add_move_binding (binding_set, GDK_KEY (Page_Up), 0,
+  aisleriot_board_add_move_binding (binding_set, GDK_KEY_Page_Up, 0,
                                     GTK_MOVEMENT_PAGES, -1);
-  aisleriot_board_add_move_binding (binding_set, GDK_KEY (KP_Page_Up), 0,
+  aisleriot_board_add_move_binding (binding_set, GDK_KEY_KP_Page_Up, 0,
                                     GTK_MOVEMENT_PAGES, -1);
 
-  aisleriot_board_add_move_binding (binding_set, GDK_KEY (Page_Down), 0,
+  aisleriot_board_add_move_binding (binding_set, GDK_KEY_Page_Down, 0,
                                     GTK_MOVEMENT_PAGES, 1);
-  aisleriot_board_add_move_binding (binding_set, GDK_KEY (KP_Page_Down), 0,
+  aisleriot_board_add_move_binding (binding_set, GDK_KEY_KP_Page_Down, 0,
                                     GTK_MOVEMENT_PAGES, 1);
 
   /* Selection */
-  gtk_binding_entry_add_signal (binding_set, GDK_KEY (space), 0,
+  gtk_binding_entry_add_signal (binding_set, GDK_KEY_space, 0,
                                 "toggle-selection", 0);
-  gtk_binding_entry_add_signal (binding_set, GDK_KEY (KP_Space), 0,
+  gtk_binding_entry_add_signal (binding_set, GDK_KEY_KP_Space, 0,
                                 "toggle-selection", 0);
-  gtk_binding_entry_add_signal (binding_set, GDK_KEY (a), GDK_CONTROL_MASK,
+  gtk_binding_entry_add_signal (binding_set, GDK_KEY_a, GDK_CONTROL_MASK,
                                 "select-all", 0);
-  gtk_binding_entry_add_signal (binding_set, GDK_KEY (a), GDK_CONTROL_MASK | GDK_SHIFT_MASK,
+  gtk_binding_entry_add_signal (binding_set, GDK_KEY_a, GDK_CONTROL_MASK | GDK_SHIFT_MASK,
                                 "deselect-all", 0);
 
   /* Activate */
-  aisleriot_board_add_activate_binding (binding_set, GDK_KEY (Return), 0);
-  aisleriot_board_add_activate_binding (binding_set, GDK_KEY (ISO_Enter), 0);
-  aisleriot_board_add_activate_binding (binding_set, GDK_KEY (KP_Enter), 0);
+  aisleriot_board_add_activate_binding (binding_set, GDK_KEY_Return, 0);
+  aisleriot_board_add_activate_binding (binding_set, GDK_KEY_ISO_Enter, 0);
+  aisleriot_board_add_activate_binding (binding_set, GDK_KEY_KP_Enter, 0);
 #endif /* ENABLE_KEYNAV */
 }
 
diff --git a/src/board.c b/src/board.c
index 9093f08..d6568fc 100644
--- a/src/board.c
+++ b/src/board.c
@@ -1767,7 +1767,6 @@ aisleriot_board_move_cursor_left_right_by_slot (AisleriotBoard *board,
 #ifdef FIXMEchpe
 {
     GtkDirectionType direction;
-#if GTK_CHECK_VERSION (2, 12, 0)
 
     if (count > 0) {
       direction = GTK_DIR_RIGHT;
@@ -1778,7 +1777,6 @@ aisleriot_board_move_cursor_left_right_by_slot (AisleriotBoard *board,
     if (!gtk_widget_keynav_failed (widget, direction)) {
        return gtk_widget_child_focus (gtk_widget_get_toplevel (widget), direction);
     }
-#endif /* GTK 2.12. 0 */
 }
 #endif // FIXMEchpe
 
@@ -1849,7 +1847,6 @@ aisleriot_board_move_cursor_up_down_by_slot (AisleriotBoard *board,
 
   if (new_focus_slot_index < 0 || new_focus_slot_index == n_slots) {
 #ifdef FIXMEchpe
-#if GTK_CHECK_VERSION (2, 12, 0)
     GtkWidget *widget = GTK_WIDGET (board);
     GtkDirectionType direction;
 
@@ -1862,7 +1859,6 @@ aisleriot_board_move_cursor_up_down_by_slot (AisleriotBoard *board,
     if (!gtk_widget_keynav_failed (widget, direction)) {
        return gtk_widget_child_focus (gtk_widget_get_toplevel (widget), direction);
     }
-#endif /* GTK 2.12. 0 */
 #endif // FIXMEchpe
 
     /* Wrap around */
diff --git a/src/prop-editor.c b/src/prop-editor.c
index 11429c8..ec0b485 100644
--- a/src/prop-editor.c
+++ b/src/prop-editor.c
@@ -913,24 +913,15 @@ property_widget (GObject    *object,
 	GEnumClass *eclass;
 	gint j;
 
-#if GTK_CHECK_VERSION (2, 91, 2)
 	prop_edit = gtk_combo_box_text_new ();
-#else
-	prop_edit = gtk_combo_box_new_text ();
-#endif
 	
 	eclass = G_ENUM_CLASS (g_type_class_ref (spec->value_type));
 	
 	j = 0;
 	while (j < eclass->n_values)
 	  {
-#if GTK_CHECK_VERSION (2, 91, 2)
 	    gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (prop_edit),
 	                                    eclass->values[j].value_name);
-#else
-	    gtk_combo_box_append_text (GTK_COMBO_BOX (prop_edit),
-                                      eclass->values[j].value_name);
-#endif
 	    ++j;
 	  }
 	
diff --git a/src/sol.c b/src/sol.c
index 8f26a01..4e826b4 100644
--- a/src/sol.c
+++ b/src/sol.c
@@ -32,10 +32,6 @@
 #include <cogl/cogl.h>
 #include <clutter/clutter.h>
 #include <clutter-gtk/clutter-gtk.h>
-
-#ifndef CLUTTER_GTK_CHECK_VERSION
-#define CLUTTER_GTK_CHECK_VERSION(a,b,c) (0)
-#endif
 #endif
 
 #ifdef HAVE_HILDON
@@ -259,9 +255,7 @@ main_prog (void *closure, int argc, char *argv[])
 #endif /* HAVE_MAEMO */
 
   option_context = g_option_context_new (NULL);
-#if GLIB_CHECK_VERSION (2, 12, 0)
   g_option_context_set_translation_domain (option_context, GETTEXT_PACKAGE);
-#endif /* GLIB 2.12.0 */
 
   add_main_options (option_context, &data);
 
@@ -275,9 +269,7 @@ main_prog (void *closure, int argc, char *argv[])
 #ifdef HAVE_CLUTTER
   g_option_context_add_group (option_context, cogl_get_option_group ());
   g_option_context_add_group (option_context, clutter_get_option_group_without_init ());
-#if CLUTTER_GTK_CHECK_VERSION (0, 90, 0)
   g_option_context_add_group (option_context, gtk_clutter_get_option_group ());
-#endif
 #endif /* HAVE_CLUTTER */
 
 #if defined(HAVE_HILDON) && defined(HAVE_MAEMO_5)
@@ -303,16 +295,6 @@ main_prog (void *closure, int argc, char *argv[])
     goto cleanup;
   }
 
-#ifdef HAVE_CLUTTER
-#if !CLUTTER_GTK_CHECK_VERSION (0, 90, 0)
-  if (gtk_clutter_init_with_args (NULL, NULL, NULL, NULL, NULL, &error) != CLUTTER_INIT_SUCCESS) {
-    g_printerr ("Failed to initialise clutter: %s\n", error->message);
-    g_error_free (error);
-    goto cleanup;
-  }
-#endif
-#endif /* HAVE_CLUTTER */
-
 #ifdef HAVE_MAEMO
   data.program = HILDON_PROGRAM (hildon_program_get_instance ());
 
@@ -378,7 +360,6 @@ main_prog (void *closure, int argc, char *argv[])
                 "gtk-toolbar-style", GTK_TOOLBAR_ICONS,
                 "gtk-menu-images", FALSE,
                 "gtk-button-images", FALSE,
-#if GTK_CHECK_VERSION (2, 10, 0)
                 "gtk-enable-mnemonics", FALSE,
 
                 /* We want the default of FALSE for this property, but to work
@@ -386,9 +367,6 @@ main_prog (void *closure, int argc, char *argv[])
                  * to set this to TRUE.
                  */
                 "gtk-enable-accels", TRUE,
-#else
-                "hildon-keyboard-shortcuts", FALSE,
-#endif /* GTK 2.10.0 */
                 NULL);
 #endif /* HAVE_HILDON */
 
@@ -418,9 +396,7 @@ cleanup:
   }
 #endif /* HAVE_MAEMO */
 
-#if GLIB_CHECK_VERSION (2, 25, 15)
   g_settings_sync ();
-#endif
 
   ar_runtime_shutdown ();
 }
diff --git a/src/window.c b/src/window.c
index b06f047..71049c7 100644
--- a/src/window.c
+++ b/src/window.c
@@ -45,10 +45,7 @@
 #include "ar-runtime.h"
 #include "ar-sound.h"
 #include "ar-string-utils.h"
-
-#if GLIB_CHECK_VERSION (2, 26, 0)
 #include "ar-gsettings.h"
-#endif
 
 #ifdef HAVE_CLUTTER
 #include "ar-clutter-embed.h"
@@ -92,10 +89,6 @@
 /* The maximum number of recent games saved */
 #define MAX_RECENT 5
 
-#if !GLIB_CHECK_VERSION (2, 16, 0)
-#define C_(context, string) (_(string))
-#endif
-
 /* On maemo5, there's no hardware key to exit the fullscreen mode. So we show
  * an overlay button to restore normal mode, if the toolbar is hidden too.
  */
@@ -451,11 +444,7 @@ help_about_cb (GtkAction *action,
   licence = ar_get_licence (priv->freecell_mode ? _("FreeCell Solitaire") : ("AisleRiot"));
 
   gtk_show_about_dialog (GTK_WINDOW (window),
-#if GTK_CHECK_VERSION (2, 11, 0)
                          "program-name",
-#else
-                         "name",
-#endif /* GTK 2.11.0 */
                             priv->freecell_mode ? _("FreeCell Solitaire")
                                                 : _("AisleRiot"),
                          "version", VERSION,
@@ -482,9 +471,7 @@ help_about_cb (GtkAction *action,
                                                                : "gnome-aisleriot",
                          "website", "http://www.gnome.org/projects/gnome-games/";,
                          "website-label", _("GNOME Games web site"),
-#if GTK_CHECK_VERSION (2, 8, 0)
                          "wrap-license", TRUE,
-#endif
                         NULL);
   g_free (licence);
 }
@@ -834,11 +821,7 @@ debug_choose_seed_cb (GtkAction *action,
   g_snprintf (str, sizeof (str), "%u", aisleriot_game_get_seed (priv->game));
   entry = gtk_entry_new ();
   gtk_entry_set_text (GTK_ENTRY (entry), str);
-#if GTK_CHECK_VERSION (2, 90, 5)
   gtk_box_pack_end (GTK_BOX (gtk_message_dialog_get_message_area (GTK_MESSAGE_DIALOG (dialog))), entry, FALSE, FALSE, 0);
-#else
-  gtk_box_pack_end (GTK_BOX (GTK_MESSAGE_DIALOG (dialog)->label->parent), entry, FALSE, FALSE, 0);
-#endif
   gtk_widget_show (entry);
   g_object_set_data (G_OBJECT (dialog), "entry", entry);
   gtk_entry_set_activates_default (GTK_ENTRY (entry), TRUE);
@@ -1402,9 +1385,7 @@ aisleriot_window_take_card_theme (AisleriotWindow *window,
                                   ArCardTheme *theme /* adopting */)
 {
   AisleriotWindowPrivate *priv = window->priv;
-#if GTK_CHECK_VERSION (2, 10, 0)
   GtkWidget *widget = GTK_WIDGET (window);
-#endif
 
   if (theme == priv->theme)
     return;
@@ -1414,17 +1395,15 @@ aisleriot_window_take_card_theme (AisleriotWindow *window,
   }
   priv->theme = theme;
 
-#if GTK_CHECK_VERSION (2, 10, 0)
   if (gtk_widget_has_screen (widget)) {
     const cairo_font_options_t *font_options;
 
     font_options = gdk_screen_get_font_options (gtk_widget_get_screen (widget));
     ar_card_theme_set_font_options (theme, font_options);
   }
-#endif /* GTK+ 2.10.0 */
 
   ar_style_set_card_theme (priv->board_style, theme);
-}    
+}
 
 static void
 card_theme_changed_cb (GtkToggleAction *action,
@@ -1452,9 +1431,7 @@ card_theme_changed_cb (GtkToggleAction *action,
   if (!theme) {
     GSList *group, *l;
 
-#if GTK_CHECK_VERSION (2, 12, 0) || (defined (HAVE_HILDON) && !defined(HAVE_MAEMO_3))
     gtk_widget_error_bell (GTK_WIDGET (window));
-#endif
 
     /* Set this action insensitive so we don't try again */
     gtk_action_set_sensitive (GTK_ACTION (action), FALSE);
@@ -1851,23 +1828,13 @@ game_exception_response_cb (GtkWidget *dialog,
       "--appname", "aisleriot",
       "--pid", pidstr,
       "--include", (const char *) error_file,
-#if GLIB_CHECK_VERSION (2, 20, 0)
-      /* This option was added to bug-buddy 2.25.x (bug 540150). We use the
-       * 2.26 glib version as a proxy to detect this, since there's no good
-       * other way.
-       */
       "--unlink-tempfile",
-#endif
       NULL
     };
 
     g_snprintf (pidstr, sizeof (pidstr), "%d", getpid ());
 
-#if GTK_CHECK_VERSION (2, 91, 8)
     if (!g_spawn_async (
-#else
-    if (!gdk_spawn_on_screen (gtk_widget_get_screen (GTK_WIDGET (window)),
-#endif
                               NULL /* working dir */,
                               (char **) argv,
                               NULL /* envp */,
@@ -1936,7 +1903,7 @@ game_exception_cb (AisleriotGame *game,
   gtk_widget_show (dialog);
 }
 
-#if defined(HAVE_CLUTTER) || (defined(ENABLE_SOUND) && GTK_CHECK_VERSION (2, 14, 0))
+#if defined(HAVE_CLUTTER) || defined(ENABLE_SOUND)
 
 static void
 settings_changed_cb (GtkSettings *settings,
@@ -1962,14 +1929,14 @@ settings_changed_cb (GtkSettings *settings,
   }
 #endif /* HAVE_CLUTTER */
 
-#if defined(ENABLE_SOUND) && GTK_CHECK_VERSION (2, 14, 0)
+#if defined(ENABLE_SOUND)
   if (name == NULL || strcmp (name, "gtk-enable-event-sounds") == 0) {
     g_object_get (settings, "gtk-enable-event-sounds", &enabled, NULL);
 
     action = gtk_action_group_get_action (priv->action_group, "Sound");
     gtk_action_set_visible (action, enabled);
   }
-#endif /* ENABLE_SOUND && GTK >= 2.14 */
+#endif /* ENABLE_SOUND */
 }
 
 static void
@@ -2001,13 +1968,13 @@ screen_changed_cb (GtkWidget *widget,
   g_signal_connect (settings, "notify::gtk-enable-animations",
                     G_CALLBACK (settings_changed_cb), window);
 #endif
-#if defined (ENABLE_SOUND) && GTK_CHECK_VERSION (2, 14, 0)
+#if defined (ENABLE_SOUND)
   g_signal_connect (settings, "notify::gtk-enable-event-sounds",
                     G_CALLBACK (settings_changed_cb), window);
 #endif
 }
 
-#endif /* HAVE_CLUTTER || ENABLE_SOUND && GTK+ >= 2.14.0 */
+#endif /* HAVE_CLUTTER || ENABLE_SOUND */
 
 /*
  * aisleriot_window_set_freecell_mode:
@@ -2071,9 +2038,7 @@ static void
 board_error_bell_cb (AisleriotBoard *board,
                      ArClutterEmbed *embed)
 {
-#if GTK_CHECK_VERSION (2, 12, 0) || (defined (HAVE_HILDON) && !defined(HAVE_MAEMO_3))
   gtk_widget_error_bell (GTK_WIDGET (embed));
-#endif
 }
 
 static void
@@ -2096,8 +2061,6 @@ G_DEFINE_TYPE (AisleriotWindow, aisleriot_window, HILDON_TYPE_WINDOW);
 G_DEFINE_TYPE (AisleriotWindow, aisleriot_window, GTK_TYPE_WINDOW);
 #endif
 
-#if GTK_CHECK_VERSION (2, 10, 0)
-
 static void
 aisleriot_window_style_set (GtkWidget *widget,
                             GtkStyle *previous_style)
@@ -2120,8 +2083,6 @@ aisleriot_window_style_set (GtkWidget *widget,
   /* FIXMEchpe: clear the cached cards in the slots?? */
 }
 
-#endif /* GTK >= 2.10.0 */
-
 static gboolean
 aisleriot_window_state_event (GtkWidget *widget,
                               GdkEventWindowState *event)
@@ -2140,16 +2101,6 @@ aisleriot_window_state_event (GtkWidget *widget,
     set_fullscreen_actions (window, is_fullscreen);
 
     set_fullscreen_button_active (window);
-
-#ifndef HAVE_HILDON
-#if !GTK_CHECK_VERSION (2, 91, 0)
-#if GTK_CHECK_VERSION (2, 11, 0)
-    gtk_statusbar_set_has_resize_grip (priv->statusbar, !is_maximised && !is_fullscreen);
-#else
-    gtk_statusbar_set_has_resize_grip (priv->statusbar, FALSE);
-#endif
-#endif /* GTK < 3.0 */
-#endif /* !HAVE_HILDON */
   }
 
 #ifndef HAVE_HILDON
@@ -2593,41 +2544,10 @@ aisleriot_window_init (AisleriotWindow *window)
                     G_CALLBACK (board_status_message_cb), window);
 #endif
 
-#if GTK_CHECK_VERSION (2, 91, 0)
   gtk_window_set_has_resize_grip (GTK_WINDOW (window), TRUE);
-#else
-#if GTK_CHECK_VERSION (2, 11, 0)
-  gtk_statusbar_set_has_resize_grip (priv->statusbar, TRUE);
-#else
-  gtk_statusbar_set_has_resize_grip (priv->statusbar, FALSE);
-#endif
-#endif /* GTK 3.0 */
 
-#if GTK_CHECK_VERSION (2, 19, 1)
   statusbar_hbox = gtk_statusbar_get_message_area (statusbar);
   gtk_box_set_spacing (GTK_BOX (statusbar_hbox), 24);
-#else
-{
-  GtkWidget *statusbar_label;
-  GtkContainer *statusbar_frame;
-  GList *list;
-
-  /* Widget surgery: move the statusbar's label into a hbox
-   * which we put in the statusbar's frame instead.
-   */
-  statusbar_hbox = gtk_hbox_new (FALSE, 24);
-  list = gtk_container_get_children (GTK_CONTAINER (statusbar));
-  statusbar_frame = GTK_CONTAINER (list->data);
-  g_list_free (list);
-  statusbar_label = gtk_bin_get_child (GTK_BIN (statusbar_frame));
-  g_object_ref (statusbar_label);
-  gtk_container_remove (statusbar_frame, statusbar_label);
-  gtk_box_pack_start (GTK_BOX (statusbar_hbox), statusbar_label, TRUE, TRUE, 0);
-  g_object_unref (statusbar_label);
-  gtk_container_add (statusbar_frame, statusbar_hbox);
-  gtk_widget_show (statusbar_hbox);
-}
-#endif /* GTK+ >= 2.19.1 */
 
   /* Score */
   priv->score_box = gtk_hbox_new (12, FALSE);
@@ -2744,12 +2664,12 @@ aisleriot_window_init (AisleriotWindow *window)
 
 #endif /* HAVE_CLUTTER */
 
-#if defined(HAVE_CLUTTER) || (defined(ENABLE_SOUND) && GTK_CHECK_VERSION (2, 14, 0))
+#if defined(HAVE_CLUTTER) || defined(ENABLE_SOUND)
   /* Set the action visibility and listen for animation and sound mode changes */
   screen_changed_cb (GTK_WIDGET (window), NULL, window);
   g_signal_connect (window, "screen-changed",
                     G_CALLBACK (screen_changed_cb), window);
-#endif /* HAVE_CLUTTER || ENABLE_SOUND && GTK+ >= 2.14.0 */
+#endif /* HAVE_CLUTTER || ENABLE_SOUND */
 
   /* Now set up the widgets */
   main_vbox = gtk_vbox_new (FALSE, 0);
@@ -2801,11 +2721,7 @@ aisleriot_window_init (AisleriotWindow *window)
   gtk_window_set_default_size (GTK_WINDOW (window), MIN_WIDTH, MIN_HEIGHT);
 
   /* Restore window state */
-#if GLIB_CHECK_VERSION (2, 25, 15)
   ar_gsettings_bind_window_state (AR_SETTINGS_WINDOW_STATE_PATH, GTK_WINDOW (window));
-#else
-  ar_conf_add_window (GTK_WINDOW (window), NULL);
-#endif
 
   /* Initial focus is in the board */
   gtk_widget_grab_focus (GTK_WIDGET (priv->board));
@@ -2927,9 +2843,7 @@ aisleriot_window_class_init (AisleriotWindowClass *klass)
   gobject_class->set_property = aisleriot_window_set_property;
 
   widget_class->window_state_event = aisleriot_window_state_event;
-#if GTK_CHECK_VERSION (2, 10, 0)
   widget_class->style_set = aisleriot_window_style_set;
-#endif
 
   g_type_class_add_private (gobject_class, sizeof (AisleriotWindowPrivate));
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]