[gnome-games] libgames-support: Remove obsolete version checks



commit be2ac47bb42bdf5db5ed9850c719489786b53ec6
Author: Christian Persch <chpe gnome org>
Date:   Thu Apr 7 15:52:04 2011 +0200

    libgames-support: Remove obsolete version checks
    
    All games that use libgames-support already require gtk3 and the latest glib,
    so there's no need for those version checks and compat headers anymore.

 glines/glines.c                        |    1 -
 gnect/src/main.c                       |    1 -
 gnect/src/prefs.c                      |    1 -
 gnibbles/gnibbles.c                    |    1 -
 gnomine/gnomine.c                      |    1 -
 gnomine/minefield.c                    |    1 -
 gnotravex/gnotravex.c                  |    1 -
 libgames-support/Makefile.am           |    2 -
 libgames-support/games-clock.c         |    1 -
 libgames-support/games-conf.c          |   33 +++++-------------
 libgames-support/games-debug.c         |    6 ---
 libgames-support/games-glib-compat.h   |   57 --------------------------------
 libgames-support/games-gridframe.c     |    1 -
 libgames-support/games-gtk-compat.h    |   51 ----------------------------
 libgames-support/games-help.c          |    5 ---
 libgames-support/games-runtime.c       |   53 -----------------------------
 libgames-support/games-scores-dialog.c |    1 -
 libgames-support/games-settings.c      |   10 +-----
 libgames-support/games-show.c          |   32 ------------------
 libgames-support/games-stock.c         |   53 ++++-------------------------
 mahjongg/drawing.c                     |    1 -
 21 files changed, 18 insertions(+), 295 deletions(-)
---
diff --git a/glines/glines.c b/glines/glines.c
index 2a53b43..6a87b35 100644
--- a/glines/glines.c
+++ b/glines/glines.c
@@ -39,7 +39,6 @@
 #include <libgames-support/games-files.h>
 #include <libgames-support/games-frame.h>
 #include <libgames-support/games-gridframe.h>
-#include <libgames-support/games-gtk-compat.h>
 #include <libgames-support/games-help.h>
 #include <libgames-support/games-preimage.h>
 #include <libgames-support/games-runtime.h>
diff --git a/gnect/src/main.c b/gnect/src/main.c
index a645f58..d84912f 100644
--- a/gnect/src/main.c
+++ b/gnect/src/main.c
@@ -30,7 +30,6 @@
 
 #include <libgames-support/games-conf.h>
 #include <libgames-support/games-gridframe.h>
-#include <libgames-support/games-gtk-compat.h>
 #include <libgames-support/games-help.h>
 #include <libgames-support/games-runtime.h>
 #include <libgames-support/games-sound.h>
diff --git a/gnect/src/prefs.c b/gnect/src/prefs.c
index 058852b..ccb3de7 100644
--- a/gnect/src/prefs.c
+++ b/gnect/src/prefs.c
@@ -32,7 +32,6 @@
 
 #include <libgames-support/games-conf.h>
 #include <libgames-support/games-frame.h>
-#include <libgames-support/games-gtk-compat.h>
 #include <libgames-support/games-controls.h>
 #include <libgames-support/games-sound.h>
 
diff --git a/gnibbles/gnibbles.c b/gnibbles/gnibbles.c
index d8918ec..b9a2487 100644
--- a/gnibbles/gnibbles.c
+++ b/gnibbles/gnibbles.c
@@ -30,7 +30,6 @@
 #include <gdk-pixbuf/gdk-pixbuf.h>
 #include <clutter/clutter.h>
 
-#include <libgames-support/games-gtk-compat.h>
 #include <libgames-support/games-runtime.h>
 #include <libgames-support/games-scores-dialog.h>
 #include <libgames-support/games-scores.h>
diff --git a/gnomine/gnomine.c b/gnomine/gnomine.c
index 5bda857..7d435a5 100644
--- a/gnomine/gnomine.c
+++ b/gnomine/gnomine.c
@@ -35,7 +35,6 @@
 #include <libgames-support/games-clock.h>
 #include <libgames-support/games-conf.h>
 #include <libgames-support/games-frame.h>
-#include <libgames-support/games-gtk-compat.h>
 #include <libgames-support/games-help.h>
 #include <libgames-support/games-runtime.h>
 #include <libgames-support/games-scores.c>
diff --git a/gnomine/minefield.c b/gnomine/minefield.c
index bcb9722..69a0aff 100644
--- a/gnomine/minefield.c
+++ b/gnomine/minefield.c
@@ -31,7 +31,6 @@
 #include <gtk/gtk.h>
 #include <gdk-pixbuf/gdk-pixbuf.h>
 
-#include <libgames-support/games-gtk-compat.h>
 #include <libgames-support/games-runtime.h>
 #include <libgames-support/games-preimage.h>
 
diff --git a/gnotravex/gnotravex.c b/gnotravex/gnotravex.c
index da63969..ed2c2b2 100644
--- a/gnotravex/gnotravex.c
+++ b/gnotravex/gnotravex.c
@@ -29,7 +29,6 @@
 #include <gdk-pixbuf/gdk-pixbuf.h>
 #include <libgames-support/games-clock.h>
 #include <libgames-support/games-conf.h>
-#include <libgames-support/games-gtk-compat.h>
 #include <libgames-support/games-help.h>
 #include <libgames-support/games-scores.h>
 #include <libgames-support/games-scores-dialog.h>
diff --git a/libgames-support/Makefile.am b/libgames-support/Makefile.am
index 5346d5d..d55d3ca 100644
--- a/libgames-support/Makefile.am
+++ b/libgames-support/Makefile.am
@@ -18,8 +18,6 @@ libgames_support_la_SOURCES =		\
 	games-conf.h			\
 	games-debug.c			\
 	games-debug.h			\
-	games-glib-compat.h		\
-	games-gtk-compat.h		\
 	games-help.c			\
 	games-help.h			\
 	games-profile.c			\
diff --git a/libgames-support/games-clock.c b/libgames-support/games-clock.c
index c48139b..8225f16 100644
--- a/libgames-support/games-clock.c
+++ b/libgames-support/games-clock.c
@@ -11,7 +11,6 @@
 #include <config.h>
 
 #include "games-clock.h"
-#include "games-glib-compat.h"
 
 G_DEFINE_TYPE (GamesClock, games_clock, GTK_TYPE_LABEL)
 
diff --git a/libgames-support/games-conf.c b/libgames-support/games-conf.c
index 03e1dcb..d6df4cb 100644
--- a/libgames-support/games-conf.c
+++ b/libgames-support/games-conf.c
@@ -23,13 +23,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
-
 #ifdef HAVE_GNOME
 #include <gconf/gconf-client.h>
 #else
@@ -37,8 +30,6 @@
 #endif
 
 #include "games-debug.h"
-#include "games-glib-compat.h"
-#include "games-gtk-compat.h"
 #include "games-marshal.h"
 
 #include "games-conf.h"
@@ -1106,14 +1097,10 @@ games_conf_get_double (const char *group, const char *key,
   g_free (key_name);
 
   return value;
-#elif GLIB_CHECK_VERSION (2, 12, 0)
+#else
   GamesConfPrivate *priv = instance->priv;
 
   return g_key_file_get_double (priv->key_file, group ? group : priv->main_group, key, error);
-#else
-#warning games_conf_get_double not implemented on glib < 2.12!
-  /* Not supported */
-  return 0.0;
 #endif /* HAVE_GNOME */
 }
 
@@ -1135,13 +1122,11 @@ games_conf_set_double (const char *group, const char *key, double value)
   key_name = get_gconf_key_name (group, key);
   gconf_client_set_float (priv->gconf_client, key_name, value, NULL);
   g_free (key_name);
-#elif GLIB_CHECK_VERSION (2, 12, 0)
+#else
   GamesConfPrivate *priv = instance->priv;
 
   g_key_file_set_double (priv->key_file, group ? group : priv->main_group, key, value);
   g_signal_emit (instance, signals[VALUE_CHANGED], 0, group, key);
-#else
-#warning games_conf_set_double not implemented on glib < 2.12!
 #endif /* HAVE_GNOME */
 }
 
@@ -1165,7 +1150,7 @@ games_conf_get_keyval (const char *group, const char *key,
 #ifdef HAVE_GNOME
   GConfValueType type;
   char *key_name, *value;
-  guint keyval = GDK_KEY (VoidSymbol);
+  guint keyval = GDK_KEY_VoidSymbol;
 
   key_name = get_gconf_key_name (group, key);
   type = get_gconf_value_type_from_schema (key_name);
@@ -1174,7 +1159,7 @@ games_conf_get_keyval (const char *group, const char *key,
   if (type == GCONF_VALUE_STRING) {
     value = gconf_client_get_string (priv->gconf_client, key_name, error);
     if (!value) {
-      keyval = GDK_KEY (VoidSymbol);
+      keyval = GDK_KEY_VoidSymbol;
     } else {
       keyval = gdk_keyval_from_name (value);
       g_free (value);
@@ -1182,7 +1167,7 @@ games_conf_get_keyval (const char *group, const char *key,
   } else if (type == GCONF_VALUE_INT) {
     keyval = gconf_client_get_int (priv->gconf_client, key_name, error);
     if (*error || keyval == 0)
-      keyval = GDK_KEY (VoidSymbol);
+      keyval = GDK_KEY_VoidSymbol;
   } else {
     g_warning ("Unknown value type for key %s\n", key_name);
   }
@@ -1192,7 +1177,7 @@ games_conf_get_keyval (const char *group, const char *key,
   return keyval;
 #else
   char *value;
-  guint keyval = GDK_KEY (VoidSymbol);
+  guint keyval = GDK_KEY_VoidSymbol;
 
   value = g_key_file_get_string (priv->key_file, group, key, error);
   if (value) {
@@ -1227,7 +1212,7 @@ games_conf_get_keyval_with_default (const char *group, const char *key,
     g_error_free (error);
     value = default_keyval;
   }
-  if (value == GDK_KEY (VoidSymbol)) {
+  if (value == GDK_KEY_VoidSymbol) {
     value = default_keyval;
   }
 
@@ -1251,7 +1236,7 @@ games_conf_set_keyval (const char *group, const char *key, guint value)
   GConfValueType type;
   char *key_name, *name;
 
-  if (value == GDK_KEY (VoidSymbol))
+  if (value == GDK_KEY_VoidSymbol)
     return;
 
   key_name = get_gconf_key_name (group, key);
@@ -1271,7 +1256,7 @@ games_conf_set_keyval (const char *group, const char *key, guint value)
 #else
   char *name;
 
-  if (value == GDK_KEY (VoidSymbol))
+  if (value == GDK_KEY_VoidSymbol)
     return;
   
   name = gdk_keyval_name (value);
diff --git a/libgames-support/games-debug.c b/libgames-support/games-debug.c
index 22aeb8a..6feb252 100644
--- a/libgames-support/games-debug.c
+++ b/libgames-support/games-debug.c
@@ -49,12 +49,6 @@ _games_debug_init (void)
 
   env = g_getenv ("GAMES_DEBUG");
 
-#if !GLIB_CHECK_VERSION (2, 16, 0)
-  /* g_parse_debug_string is only NULL-safe since 2.16 */
-  if (env == NULL)
-    return;
-#endif
-
   _games_debug_flags = g_parse_debug_string (env, keys, G_N_ELEMENTS (keys));
 #endif /* GNOME_ENABLE_DEBUG */
 }
diff --git a/libgames-support/games-gridframe.c b/libgames-support/games-gridframe.c
index 29416cd..968047f 100644
--- a/libgames-support/games-gridframe.c
+++ b/libgames-support/games-gridframe.c
@@ -28,7 +28,6 @@
 #include <glib/gi18n.h>
 
 #include "games-gridframe.h"
-#include "games-gtk-compat.h"
 
 enum {
   PROP_0,
diff --git a/libgames-support/games-help.c b/libgames-support/games-help.c
index cc53985..20a5448 100644
--- a/libgames-support/games-help.c
+++ b/libgames-support/games-help.c
@@ -59,16 +59,11 @@ games_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/libgames-support/games-runtime.c b/libgames-support/games-runtime.c
index b37633a..f24ad4d 100644
--- a/libgames-support/games-runtime.c
+++ b/libgames-support/games-runtime.c
@@ -251,54 +251,6 @@ static const DerivedDirectory derived_directories[] = {
 
 typedef int _assertion[G_N_ELEMENTS (derived_directories) + GAMES_RUNTIME_FIRST_DERIVED_DIRECTORY == GAMES_RUNTIME_LAST_DIRECTORY ? 1 : -1];
 
-#if !GTK_CHECK_VERSION (2, 17, 0)
-/* Since version 2.17.0, gtk has default about dialogue hook functions
- * using gtk_show_uri(). For earlier versions, we need to implement
- * our own hooks.
- */
-
-static void
-about_url_hook (GtkAboutDialog *about,
-                const char *uri,
-                gpointer user_data)
-{
-  GdkScreen *screen;
-  GError *error = NULL;
-
-  screen = gtk_widget_get_screen (GTK_WIDGET (about));
-
-  if (!games_show_uri (screen, uri, gtk_get_current_event_time (), &error)) {
-    games_show_error (GTK_WIDGET (about),
-                      error,
-                      "%s", _("Could not show link"));
-    g_error_free (error);
-  }
-}
-
-static void
-about_email_hook (GtkAboutDialog *about,
-                  const char *email_address,
-                  gpointer user_data)
-{
-  char *uri;
-
-#if GLIB_CHECK_VERSION (2, 16, 0)
-  char *escaped_email_address;
-
-  escaped_email_address = g_uri_escape_string (email_address, NULL, FALSE);
-  uri = g_strdup_printf ("mailto:%s";, escaped_email_address);
-  g_free (escaped_email_address);
-#else
-  /* Not really correct, but the best we can do */
-  uri = g_strdup_printf ("mailto:%s";, email_address);
-#endif
-
-  about_url_hook (about, uri, user_data);
-  g_free (uri);
-}
-
-#endif /* GTK < 2.17.0 */
-
 /* public API */
 
 /**
@@ -391,11 +343,6 @@ games_runtime_init (const char *name)
     gpl_version = 2;
   }
 
-#if !GTK_CHECK_VERSION (2, 17, 0)
-  gtk_about_dialog_set_url_hook (about_url_hook, NULL, NULL);
-  gtk_about_dialog_set_email_hook (about_email_hook, NULL, NULL);
-#endif
-
   _games_profile_end ("games_runtime_init");
 
   return retval;
diff --git a/libgames-support/games-scores-dialog.c b/libgames-support/games-scores-dialog.c
index fd43d83..42ab2cb 100644
--- a/libgames-support/games-scores-dialog.c
+++ b/libgames-support/games-scores-dialog.c
@@ -25,7 +25,6 @@
 #include <gtk/gtk.h>
 
 #include "games-scores-dialog.h"
-#include "games-gtk-compat.h"
 
 G_DEFINE_TYPE (GamesScoresDialog, games_scores_dialog, GTK_TYPE_DIALOG);
 
diff --git a/libgames-support/games-settings.c b/libgames-support/games-settings.c
index 475bfe8..09d220e 100644
--- a/libgames-support/games-settings.c
+++ b/libgames-support/games-settings.c
@@ -22,14 +22,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 "games-gtk-compat.h"
 #include "games-debug.h"
 
 #define I_(string) g_intern_static_string (string)
@@ -211,7 +203,7 @@ variant_to_keyval (GVariant *value,
                    KeyEntry *entry)
 {
   if (value == NULL) {
-    entry->keyval = GDK_KEY (VoidSymbol);
+    entry->keyval = GDK_KEY_VoidSymbol;
     entry->modifiers = 0;
     return TRUE;
   }
diff --git a/libgames-support/games-show.c b/libgames-support/games-show.c
index b8982e7..0500b3e 100644
--- a/libgames-support/games-show.c
+++ b/libgames-support/games-show.c
@@ -75,39 +75,7 @@ games_show_uri (GdkScreen *screen,
   return TRUE;
 #else /* !G_OS_WIN32 */
 
-#if GTK_CHECK_VERSION (2, 14, 0)
   return gtk_show_uri (screen, uri, timestamp, error);
-#else /* GTK+ < 2.14 */
-  char *argv[3] = { (char *) "xdg-open", (char *) uri, NULL };
- 
-  if (gdk_spawn_on_screen (screen,
-                           NULL /* working directory */,
-                           argv,
-                           NULL /* environment */,
-                           G_SPAWN_SEARCH_PATH,
-                           NULL, NULL,
-                           NULL,
-                           error))
-    return TRUE;
-
-  g_clear_error (error);
-
-  /* Try falling back to gnome-open */
-  argv[0] = (char *) "gnome-open";
-  if (gdk_spawn_on_screen (screen,
-                           NULL /* working directory */,
-                           argv,
-                           NULL /* environment */,
-                           G_SPAWN_SEARCH_PATH,
-                           NULL, NULL,
-                           NULL,
-                           error))
-    return TRUE;
-
-  g_set_error (error, G_SPAWN_ERROR, G_SPAWN_ERROR_FAILED,
-               "%s", "Failed to show help");
-  return FALSE;
-#endif /* GTK+ >= 2.14 */
 #endif /* G_OS_WIN32 */
 #endif /* HAVE_MAEMO */
 }
diff --git a/libgames-support/games-stock.c b/libgames-support/games-stock.c
index 82f53e0..6b011d0 100644
--- a/libgames-support/games-stock.c
+++ b/libgames-support/games-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 "games-runtime.h"
 
 #include "games-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 @@ games_stock_init (void)
     { GAMES_STOCK_START_NEW_GAME,   GTK_STOCK_NEW },
     { GAMES_STOCK_RESET,            GTK_STOCK_CLEAR },
     { GAMES_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 */
     { GAMES_STOCK_FULLSCREEN,       GTK_STOCK_FULLSCREEN },
     /* This is used on maemo 5 */
     { GAMES_STOCK_LEAVE_FULLSCREEN, GTK_STOCK_LEAVE_FULLSCREEN },
-#endif /* GTK+ >= 2.8.0 */
 #ifdef HAVE_GTK_ICON_FACTORY_ADD_ALIAS
     { GAMES_STOCK_REDO_MOVE,        GTK_STOCK_REDO },
     { GAMES_STOCK_UNDO_MOVE,        GTK_STOCK_UNDO },
@@ -293,27 +278,27 @@ games_stock_init (void)
 #endif
 
   static const GtkStockItem games_stock_items[] = {
-    { GAMES_STOCK_CONTENTS,         N_("_Contents"),          0, STOCK_ACCEL (GDK_KEY (F1), 0), NULL },
-    { GAMES_STOCK_FULLSCREEN,       N_("_Fullscreen"),        0, STOCK_ACCEL (GDK_KEY (F11), GDK_KEY (F6)), NULL },
-    { GAMES_STOCK_HINT,             N_("_Hint"),              STOCK_ACCEL (GDK_CONTROL_MASK, 0), STOCK_ACCEL ('h', GDK_KEY (Return)), NULL },
+    { GAMES_STOCK_CONTENTS,         N_("_Contents"),          0, STOCK_ACCEL (GDK_KEY_F1, 0), NULL },
+    { GAMES_STOCK_FULLSCREEN,       N_("_Fullscreen"),        0, STOCK_ACCEL (GDK_KEY_F11, GDK_KEY_F6), NULL },
+    { GAMES_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" */
     { GAMES_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 */
     { GAMES_STOCK_START_NEW_GAME,   N_("_New Game"),          0, 0, NULL },
-    { GAMES_STOCK_REDO_MOVE,        N_("_Redo Move"),         STOCK_ACCEL (GDK_CONTROL_MASK | GDK_SHIFT_MASK, 0), STOCK_ACCEL ('z', GDK_KEY (F7)), NULL },
+    { GAMES_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 */
     { GAMES_STOCK_RESET,            N_("_Reset"),             0, 0, NULL },
     /* Translators: "_Restart" is the menu item 'Game->Restart', implies "Restart Game" */
     { GAMES_STOCK_RESTART_GAME,     N_("_Restart"),           0, 0, NULL },
-    { GAMES_STOCK_UNDO_MOVE,        N_("_Undo Move"),         STOCK_ACCEL (GDK_CONTROL_MASK, 0), STOCK_ACCEL ('z', GDK_KEY (F8)), NULL },
+    { GAMES_STOCK_UNDO_MOVE,        N_("_Undo Move"),         STOCK_ACCEL (GDK_CONTROL_MASK, 0), STOCK_ACCEL ('z', GDK_KEY_F8), NULL },
     { GAMES_STOCK_DEAL_CARDS,       N_("_Deal"),              GDK_CONTROL_MASK, 'd', NULL },
 #ifndef HAVE_HILDON
-    { GAMES_STOCK_LEAVE_FULLSCREEN, N_("_Leave Fullscreen"),  0, GDK_KEY (F11), NULL },
+    { GAMES_STOCK_LEAVE_FULLSCREEN, N_("_Leave Fullscreen"),  0, GDK_KEY_F11, NULL },
     { GAMES_STOCK_NETWORK_GAME,     N_("Network _Game"),      GDK_CONTROL_MASK, 'g', NULL },
     { GAMES_STOCK_NETWORK_LEAVE,    N_("L_eave Game"),        GDK_CONTROL_MASK, 'e', NULL },
     { GAMES_STOCK_PLAYER_LIST,      N_("Player _List"),       GDK_CONTROL_MASK, 'l', NULL },
-    { GAMES_STOCK_PAUSE_GAME,       N_("_Pause"),             0, GDK_KEY (Pause), NULL },
-    { GAMES_STOCK_RESUME_GAME,      N_("Res_ume"),            0, GDK_KEY (Pause), NULL },
+    { GAMES_STOCK_PAUSE_GAME,       N_("_Pause"),             0, GDK_KEY_Pause, NULL },
+    { GAMES_STOCK_RESUME_GAME,      N_("Res_ume"),            0, GDK_KEY_Pause, NULL },
     { GAMES_STOCK_SCORES,           N_("_Scores"),            0, 0, NULL },
     { GAMES_STOCK_END_GAME,         N_("_End Game"),          0, 0, NULL },
 #endif
@@ -407,28 +392,6 @@ games_get_license_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/mahjongg/drawing.c b/mahjongg/drawing.c
index 8cc77ec..ed4e5c0 100644
--- a/mahjongg/drawing.c
+++ b/mahjongg/drawing.c
@@ -20,7 +20,6 @@
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
 
-#include <libgames-support/games-gtk-compat.h>
 #include <libgames-support/games-preimage.h>
 #include <libgames-support/games-runtime.h>
 



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