gnome-commander r2134 - in trunk: . src
- From: epiotr svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-commander r2134 - in trunk: . src
- Date: Mon, 29 Sep 2008 21:16:48 +0000 (UTC)
Author: epiotr
Date: Mon Sep 29 21:16:48 2008
New Revision: 2134
URL: http://svn.gnome.org/viewvc/gnome-commander?rev=2134&view=rev
Log:
Replace HAVE_GTK_2_10 with GTK_CHECK_VERSION(2,10,0)
Modified:
trunk/ChangeLog
trunk/configure.in
trunk/src/eggcellrendererkeys.cc
trunk/src/eggcellrendererkeys.h
trunk/src/gnome-cmd-data.cc
trunk/src/gnome-cmd-user-actions.cc
trunk/src/gnome-cmd-user-actions.h
Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in (original)
+++ trunk/configure.in Mon Sep 29 21:16:48 2008
@@ -121,10 +121,6 @@
else
AC_MSG_ERROR("only ${GTK_VERSION} found")
fi
-
- if pkg-config --exists gtk+-2.0 '>=' 2.10.0 ; then
- AC_DEFINE(HAVE_GTK_2_10, 1, [Define to 1 if you have GTK+ >= 2.10])
- fi
else
AC_MSG_ERROR(no)
fi
Modified: trunk/src/eggcellrendererkeys.cc
==============================================================================
--- trunk/src/eggcellrendererkeys.cc (original)
+++ trunk/src/eggcellrendererkeys.cc Mon Sep 29 21:16:48 2008
@@ -240,13 +240,13 @@
static const gchar text_mod1[] = "Alt+";
static const gchar text_mod2[] = "Mod2+";
static const gchar text_mod3[] = "Mod3+";
-#ifdef HAVE_GTK_2_10
+#if GTK_CHECK_VERSION (2, 10, 0)
static const gchar text_mod4[] = "Mod4+";
#else
static const gchar text_mod4[] = "Super+";
#endif
static const gchar text_mod5[] = "Mod5+";
-#ifdef HAVE_GTK_2_10
+#if GTK_CHECK_VERSION (2, 10, 0)
static const gchar text_meta[] = "Meta+";
static const gchar text_super[] = "Super+";
static const gchar text_hyper[] = "Hyper+";
@@ -272,7 +272,7 @@
l += sizeof(text_mod4)-1;
if (accel_mods & GDK_MOD5_MASK)
l += sizeof(text_mod5)-1;
-#ifdef HAVE_GTK_2_10
+#if GTK_CHECK_VERSION (2, 10, 0)
if (accel_mods & GDK_META_MASK)
l += sizeof(text_meta)-1;
if (accel_mods & GDK_HYPER_MASK)
@@ -319,7 +319,7 @@
strcpy (s, text_mod5);
s += sizeof(text_mod5)-1;
}
-#ifdef HAVE_GTK_2_10
+#if GTK_CHECK_VERSION (2, 10, 0)
if (accel_mods & GDK_META_MASK)
{
strcpy (s, text_meta);
@@ -445,7 +445,7 @@
static gboolean grab_key_callback (GtkWidget *widget, GdkEventKey *event, EggCellRendererKeys *keys)
{
-#ifdef HAVE_GTK_2_10
+#if GTK_CHECK_VERSION (2, 10, 0)
if (event->is_modifier)
return TRUE;
#else
@@ -482,7 +482,7 @@
if (accel_key == GDK_ISO_Left_Tab)
accel_key = GDK_Tab;
-#ifdef HAVE_GTK_2_10
+#if GTK_CHECK_VERSION (2, 10, 0)
accel_mods = event->state & gtk_accelerator_get_default_mod_mask ();
#else
accel_mods = event->state & (GDK_CONTROL_MASK | GDK_SHIFT_MASK | GDK_MOD1_MASK | GDK_MOD4_MASK);
Modified: trunk/src/eggcellrendererkeys.h
==============================================================================
--- trunk/src/eggcellrendererkeys.h (original)
+++ trunk/src/eggcellrendererkeys.h Mon Sep 29 21:16:48 2008
@@ -79,7 +79,7 @@
GType egg_cell_renderer_keys_get_type ();
GtkCellRenderer *egg_cell_renderer_keys_new ();
-#ifndef HAVE_GTK_2_10
+#if !GTK_CHECK_VERSION (2, 10, 0)
typedef enum
{
GTK_CELL_RENDERER_ACCEL_MODE_GTK,
Modified: trunk/src/gnome-cmd-data.cc
==============================================================================
--- trunk/src/gnome-cmd-data.cc (original)
+++ trunk/src/gnome-cmd-data.cc Mon Sep 29 21:16:48 2008
@@ -1555,7 +1555,7 @@
{GDK_SHIFT_MASK, "<shift>"},
{GDK_CONTROL_MASK, "<control>"},
{GDK_MOD1_MASK, "<alt>"},
-#ifdef HAVE_GTK_2_10
+#if GTK_CHECK_VERSION (2, 10, 0)
{GDK_SUPER_MASK, "<super>"},
{GDK_SUPER_MASK, "<win>"},
{GDK_SUPER_MASK, "<mod4>"},
Modified: trunk/src/gnome-cmd-user-actions.cc
==============================================================================
--- trunk/src/gnome-cmd-user-actions.cc (original)
+++ trunk/src/gnome-cmd-user-actions.cc Mon Sep 29 21:16:48 2008
@@ -110,7 +110,7 @@
if (e1.keyval > e2.keyval)
return false;
-#ifdef HAVE_GTK_2_10
+#if GTK_CHECK_VERSION (2, 10, 0)
return (e1.state & (GDK_SHIFT_MASK | GDK_CONTROL_MASK | GDK_MOD1_MASK | GDK_SUPER_MASK | GDK_HYPER_MASK | GDK_META_MASK)) < (e2.state & (GDK_SHIFT_MASK | GDK_CONTROL_MASK | GDK_MOD1_MASK | GDK_SUPER_MASK | GDK_HYPER_MASK | GDK_META_MASK));
#else
return (e1.state & (GDK_SHIFT_MASK | GDK_CONTROL_MASK | GDK_MOD1_MASK | GDK_MOD4_MASK)) < (e2.state & (GDK_SHIFT_MASK | GDK_CONTROL_MASK | GDK_MOD1_MASK | GDK_MOD4_MASK));
@@ -243,7 +243,7 @@
if (!registered("edit.search"))
{
register_action(GDK_MOD1_MASK, GDK_F7, "edit.search");
-#ifdef HAVE_GTK_2_10
+#if GTK_CHECK_VERSION (2, 10, 0)
register_action(GDK_SUPER_MASK, GDK_F, "edit.search");
#else
register_action(GDK_MOD4_MASK, GDK_F, "edit.search");
@@ -439,7 +439,7 @@
GdkEventKey event;
event.keyval = keyval;
-#ifdef HAVE_GTK_2_10
+#if GTK_CHECK_VERSION (2, 10, 0)
event.state = state & (GDK_SHIFT_MASK | GDK_CONTROL_MASK | GDK_MOD1_MASK | GDK_SUPER_MASK | GDK_HYPER_MASK | GDK_META_MASK);
#else
event.state = state & (GDK_SHIFT_MASK | GDK_CONTROL_MASK | GDK_MOD1_MASK | GDK_MOD4_MASK);
@@ -471,7 +471,7 @@
GdkEventKey event;
event.keyval = keyval;
-#ifdef HAVE_GTK_2_10
+#if GTK_CHECK_VERSION (2, 10, 0)
event.state = state & (GDK_SHIFT_MASK | GDK_CONTROL_MASK | GDK_MOD1_MASK | GDK_SUPER_MASK | GDK_HYPER_MASK | GDK_META_MASK);
#else
event.state = state & (GDK_SHIFT_MASK | GDK_CONTROL_MASK | GDK_MOD1_MASK | GDK_MOD4_MASK);
@@ -503,7 +503,7 @@
GdkEventKey event;
event.keyval = keyval;
-#ifdef HAVE_GTK_2_10
+#if GTK_CHECK_VERSION (2, 10, 0)
event.state = state & (GDK_SHIFT_MASK | GDK_CONTROL_MASK | GDK_MOD1_MASK | GDK_SUPER_MASK | GDK_HYPER_MASK | GDK_META_MASK);
#else
event.state = state & (GDK_SHIFT_MASK | GDK_CONTROL_MASK | GDK_MOD1_MASK | GDK_MOD4_MASK);
Modified: trunk/src/gnome-cmd-user-actions.h
==============================================================================
--- trunk/src/gnome-cmd-user-actions.h (original)
+++ trunk/src/gnome-cmd-user-actions.h Mon Sep 29 21:16:48 2008
@@ -64,7 +64,7 @@
if (state & GDK_SHIFT_MASK) key_name += gdk_modifiers_names[GDK_SHIFT_MASK];
if (state & GDK_CONTROL_MASK) key_name += gdk_modifiers_names[GDK_CONTROL_MASK];
if (state & GDK_MOD1_MASK) key_name += gdk_modifiers_names[GDK_MOD1_MASK];
-#ifdef HAVE_GTK_2_10
+#if GTK_CHECK_VERSION (2, 10, 0)
if (state & GDK_SUPER_MASK) key_name += gdk_modifiers_names[GDK_SUPER_MASK];
if (state & GDK_HYPER_MASK) key_name += gdk_modifiers_names[GDK_HYPER_MASK];
if (state & GDK_META_MASK) key_name += gdk_modifiers_names[GDK_META_MASK];
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]