[perl-Gtk2] Fix compilation and tests of Gtk2::BindingSet for gtk+ 2.0
- From: Torsten Schönfeld <tsch src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [perl-Gtk2] Fix compilation and tests of Gtk2::BindingSet for gtk+ 2.0
- Date: Thu, 17 Dec 2009 20:59:53 +0000 (UTC)
commit a67f953e8e326af7913e511d6cb79539ee1e1c3e
Author: Torsten Schönfeld <kaffeetisch gmx de>
Date: Thu Dec 17 21:51:49 2009 +0100
Fix compilation and tests of Gtk2::BindingSet for gtk+ 2.0
t/GtkBindings.t | 4 ++--
xs/GtkBindings.xs | 4 ++++
2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/t/GtkBindings.t b/t/GtkBindings.t
index e88fdad..3d276cd 100644
--- a/t/GtkBindings.t
+++ b/t/GtkBindings.t
@@ -161,8 +161,8 @@ HERE
# Gtk2::Widget, not a Gtk2::Object, hence using My::Widget to exercise
# add_path() instead of My::Object.
SKIP: {
- skip 'Need a keymap', 5
- unless $have_valid_keymap;
+ skip 'Need a keymap and gtk+ >= 2.4', 5
+ unless $have_valid_keymap && Gtk2->CHECK_VERSION(2, 4, 0);
my $my_widget_bindings = Gtk2::BindingSet->find('my_widget_bindings');
ok ($my_widget_bindings, 'find() of RC parsed bindings');
diff --git a/xs/GtkBindings.xs b/xs/GtkBindings.xs
index 8f4247d..1f3e631 100644
--- a/xs/GtkBindings.xs
+++ b/xs/GtkBindings.xs
@@ -412,6 +412,8 @@ gtk_bindings_activate (object, keyval, modifiers)
guint keyval
GdkModifierType modifiers
+#if GTK_CHECK_VERSION(2, 4, 0)
+
gboolean
gtk_bindings_activate_event (object, event)
GtkObject *object
@@ -425,3 +427,5 @@ CODE:
RETVAL = gtk_bindings_activate_event (object, (GdkEventKey*) event);
OUTPUT:
RETVAL
+
+#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]