[libgtk3-perl] 13/20: Handle double-button-press and triple-button-press event type aliases

Intrigeri intrigeri at moszumanska.debian.org
Wed Mar 25 20:34:46 UTC 2015


This is an automated email from the git hooks/post-receive script.

intrigeri pushed a commit to branch experimental
in repository libgtk3-perl.

commit 2b4f3c50207b9ccc5747604933937793a4fe416e
Author: Torsten Schönfeld <kaffeetisch at gmx.de>
Date:   Sat Jan 17 15:20:32 2015 +0100

    Handle double-button-press and triple-button-press event type aliases
    
    These aliases were introduced in gtk+ 3.6.
---
 NEWS            | 1 +
 lib/Gtk3.pm     | 3 +++
 t/zz-GdkEvent.t | 9 +++++++--
 3 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/NEWS b/NEWS
index 6f04275..3fff553 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,7 @@
 {{$NEXT}}
 
 * Fix handling of 2button-press and 3button-press events
+* Handle double-button-press and triple-button-press event type aliases
 
 Overview of changes in Gtk3 0.020 [2014-12-25]
 ==============================================
diff --git a/lib/Gtk3.pm b/lib/Gtk3.pm
index ca6b01b..69c531b 100644
--- a/lib/Gtk3.pm
+++ b/lib/Gtk3.pm
@@ -186,6 +186,9 @@ my %_GDK_EVENT_TYPE_TO_PACKAGE = (
   'touch-update' => 'Touch',
   'touch-end' => 'Touch',
   'touch-cancel' => 'Touch',
+  # added in 3.6:
+  'double-button-press' => 'Button',
+  'triple-button-press' => 'Button',
 );
 
 # Make all of the above sub-types inherit from Gtk3::Gdk::Event.
diff --git a/t/zz-GdkEvent.t b/t/zz-GdkEvent.t
index 4460038..0eece8f 100644
--- a/t/zz-GdkEvent.t
+++ b/t/zz-GdkEvent.t
@@ -7,7 +7,7 @@ BEGIN { require './t/inc/setup.pl' }
 use strict;
 use warnings;
 
-plan tests => 144;
+plan tests => 146;
 
 sub fields_ok {
   my ($event, %fields_values) = @_;
@@ -119,7 +119,12 @@ SKIP: {
 
 # Button #######################################################################
 
-foreach (qw/3button-press 2button-press button-press/) {
+foreach (qw/triple-button-press
+            3button-press
+            double-button-press
+            2button-press
+            button-press/)
+{
   isa_ok ($event = Gtk3::Gdk::Event->new ($_),
           'Gtk3::Gdk::EventButton', "Gtk3::Gdk::Event->new $_");
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libgtk3-perl.git



More information about the Pkg-perl-cvs-commits mailing list