Hello community, here is the log from the commit of package perl-Gtk2 for openSUSE:Factory checked in at 2014-07-28 16:20:58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Gtk2 (Old) and /work/SRC/openSUSE:Factory/.perl-Gtk2.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Gtk2" Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Gtk2/perl-Gtk2.changes 2014-05-13 20:46:52.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.perl-Gtk2.new/perl-Gtk2.changes 2014-07-28 16:20:59.000000000 +0200 @@ -1,0 +2,15 @@ +Mon Jul 28 05:30:58 UTC 2014 - [email protected] + +- updated to 1.2492 + * Fix compatibility with perl 5.20 and non-dot locales. + * Disable some tests that are known to behave erratically in certain + environments. They are still available in the "xt" directory, but they will + not be run by default. + + Overview of changes in Gtk2 1.2491 + ================================== + + * Fix a test failure in t/GdkPixbufLoader.t. +- removed perl-Gtk2-fix_GdkPixbufLoader_test.patch again + +------------------------------------------------------------------- Old: ---- Gtk2-1.249.tar.gz perl-Gtk2-fix_GdkPixbufLoader_test.patch New: ---- Gtk2-1.2492.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Gtk2.spec ++++++ --- /var/tmp/diff_new_pack.aeiwzt/_old 2014-07-28 16:20:59.000000000 +0200 +++ /var/tmp/diff_new_pack.aeiwzt/_new 2014-07-28 16:20:59.000000000 +0200 @@ -17,7 +17,7 @@ Name: perl-Gtk2 -Version: 1.249 +Version: 1.2492 Release: 0 %define cpan_name Gtk2 Summary: Perl interface to the 2.x series of the Gimp Toolkit library @@ -37,7 +37,6 @@ BuildRequires: perl(Glib) >= 1.280 BuildRequires: perl(Pango) >= 1.220 BuildRequires: pkgconfig(gtk+-2.0) -Patch: perl-Gtk2-fix_GdkPixbufLoader_test.patch Requires: perl(Cairo) >= 1.000 Requires: perl(ExtUtils::Depends) >= 0.300 Requires: perl(ExtUtils::PkgConfig) >= 1.03 @@ -63,7 +62,6 @@ %prep %setup -q -n %{cpan_name}-%{version} -%patch -p1 %build perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" ++++++ Gtk2-1.249.tar.gz -> Gtk2-1.2492.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Gtk2-1.249/MANIFEST new/Gtk2-1.2492/MANIFEST --- old/Gtk2-1.249/MANIFEST 2013-12-11 06:43:11.000000000 +0100 +++ new/Gtk2-1.2492/MANIFEST 2014-07-01 04:02:49.000000000 +0200 @@ -130,7 +130,6 @@ t/GdkCursor.t t/GdkDisplay.t t/GdkDisplayManager.t -t/GdkDnd.t t/GdkDrawable.t t/GdkEvent.t t/GdkGC.t @@ -196,7 +195,6 @@ t/GtkComboBoxEntry.t t/GtkCurve.t t/GtkDialog.t -t/GtkDnd.t t/GtkDrawingArea.t t/GtkEditable.t t/GtkEntry.t @@ -283,7 +281,6 @@ t/GtkSimpleList.t t/GtkSimpleMenu.t t/GtkSizeGroup.t -t/GtkSocket-GtkPlug.t t/GtkSpinButton.t t/GtkSpinner.t t/GtkStatusbar.t @@ -580,5 +577,8 @@ xs_files-2.4 xs_files-2.6 xs_files-2.8 +xt/GdkDnd.t +xt/GtkDnd.t +xt/GtkSocket-GtkPlug.t META.yml Module YAML meta-data (added by MakeMaker) META.json Module JSON meta-data (added by MakeMaker) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Gtk2-1.249/META.json new/Gtk2-1.2492/META.json --- old/Gtk2-1.249/META.json 2013-12-11 06:43:11.000000000 +0100 +++ new/Gtk2-1.2492/META.json 2014-07-01 04:02:49.000000000 +0200 @@ -4,7 +4,7 @@ "gtk2-perl Team <gtk-perl-list at gnome dot org>" ], "dynamic_config" : 1, - "generated_by" : "ExtUtils::MakeMaker version 6.66, CPAN::Meta::Converter version 2.132830", + "generated_by" : "ExtUtils::MakeMaker version 6.86, CPAN::Meta::Converter version 2.133380", "license" : [ "lgpl_2_1" ], @@ -26,10 +26,25 @@ ] }, "prereqs" : { + "build" : { + "requires" : { + "ExtUtils::MakeMaker" : "0" + } + }, "configure" : { "requires" : { "Cairo" : "1.000", "ExtUtils::Depends" : "0.300", + "ExtUtils::MakeMaker" : "0", + "ExtUtils::PkgConfig" : "1.030", + "Glib" : "1.280", + "Pango" : "1.220" + } + }, + "runtime" : { + "requires" : { + "Cairo" : "1.000", + "ExtUtils::Depends" : "0.300", "ExtUtils::PkgConfig" : "1.030", "Glib" : "1.280", "Pango" : "1.220" @@ -53,5 +68,5 @@ }, "x_MailingList" : "https://mail.gnome.org/mailman/listinfo/gtk-perl-list" }, - "version" : "1.249" + "version" : "1.2492" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Gtk2-1.249/META.yml new/Gtk2-1.2492/META.yml --- old/Gtk2-1.249/META.yml 2013-12-11 06:43:11.000000000 +0100 +++ new/Gtk2-1.2492/META.yml 2014-07-01 04:02:49.000000000 +0200 @@ -2,15 +2,17 @@ abstract: 'Perl interface to the 2.x series of the Gimp Toolkit library' author: - 'gtk2-perl Team <gtk-perl-list at gnome dot org>' -build_requires: {} +build_requires: + ExtUtils::MakeMaker: 0 configure_requires: Cairo: 1.000 ExtUtils::Depends: 0.300 + ExtUtils::MakeMaker: 0 ExtUtils::PkgConfig: 1.030 Glib: 1.280 Pango: 1.220 dynamic_config: 1 -generated_by: 'ExtUtils::MakeMaker version 6.66, CPAN::Meta::Converter version 2.132830' +generated_by: 'ExtUtils::MakeMaker version 6.86, CPAN::Meta::Converter version 2.133380' license: lgpl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -25,10 +27,16 @@ file: - Makefile.PL - gtk-demo/main.pl +requires: + Cairo: 1.000 + ExtUtils::Depends: 0.300 + ExtUtils::PkgConfig: 1.030 + Glib: 1.280 + Pango: 1.220 resources: MailingList: https://mail.gnome.org/mailman/listinfo/gtk-perl-list bugtracker: http://rt.cpan.org/Public/Dist/Display.html?Name=Gtk2 homepage: http://gtk2-perl.sourceforge.net license: http://www.gnu.org/licenses/lgpl-2.1.html repository: git://git.gnome.org/perl-Gtk2 -version: 1.249 +version: 1.2492 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Gtk2-1.249/NEWS new/Gtk2-1.2492/NEWS --- old/Gtk2-1.249/NEWS 2013-12-11 06:39:22.000000000 +0100 +++ new/Gtk2-1.2492/NEWS 2014-07-01 04:02:24.000000000 +0200 @@ -1,3 +1,16 @@ +Overview of changes in Gtk2 1.2492 +================================== + +* Fix compatibility with perl 5.20 and non-dot locales. +* Disable some tests that are known to behave erratically in certain + environments. They are still available in the "xt" directory, but they will + not be run by default. + +Overview of changes in Gtk2 1.2491 +================================== + +* Fix a test failure in t/GdkPixbufLoader.t. + Overview of changes in Gtk2 1.249 ================================= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Gtk2-1.249/lib/Gtk2.pm new/Gtk2-1.2492/lib/Gtk2.pm --- old/Gtk2-1.249/lib/Gtk2.pm 2013-12-11 06:39:42.000000000 +0100 +++ new/Gtk2-1.2492/lib/Gtk2.pm 2014-07-01 04:02:41.000000000 +0200 @@ -73,7 +73,7 @@ use Exporter; require DynaLoader; -our $VERSION = '1.249'; +our $VERSION = '1.2492'; our @ISA = qw(DynaLoader Exporter); @@ -98,6 +98,36 @@ our @EXPORT_OK = map { @$_ } values %Gtk2::EXPORT_TAGS; $Gtk2::EXPORT_TAGS{all} = \@EXPORT_OK; +# Compatibility with perl 5.20 and non-dot locales. Wrap all functions that +# might end up calling setlocale() such that POSIX::setlocale() is also called +# to ensure perl knows about the current locale. See the discussion in +# <https://rt.perl.org//Public/Bug/Display.html?id=121930>, +# <https://rt.perl.org/Public/Bug/Display.html?id=121317>, +# <https://rt.perl.org/Public/Bug/Display.html?id=120723>. +if ($^V ge v5.20.0) { + require POSIX; + no strict 'refs'; + no warnings 'redefine'; + + my $disable_setlocale = 0; + my $orig = \&Gtk2::disable_setlocale; + *{Gtk2::disable_setlocale} = sub { + $disable_setlocale = 1; + $orig->(@_); + }; + + # gtk_init_with_args is not wrapped. + foreach my $function (qw/Gtk2::init Gtk2::init_check Gtk2::parse_args/) { + my $orig = \&{$function}; + *{$function} = sub { + if (!$disable_setlocale) { + POSIX::setlocale (POSIX::LC_ALL (), ''); + } + $orig->(@_); + }; + } +} + # Names "STOP" and "PROPAGATE" here are per the GtkWidget event signal # descriptions. In some other flavours of signals the jargon is "handled" # instead of "stop". "Handled" matches g_signal_accumulator_true_handled(), diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Gtk2-1.249/t/00.Gtk2.t new/Gtk2-1.2492/t/00.Gtk2.t --- old/Gtk2-1.249/t/00.Gtk2.t 2013-02-05 00:47:40.000000000 +0100 +++ new/Gtk2-1.2492/t/00.Gtk2.t 2014-06-29 01:31:05.000000000 +0200 @@ -50,7 +50,7 @@ Gtk2->disable_setlocale; skip 'Gtk2->init_check failed, probably unable to open DISPLAY', - 18, unless( Gtk2->init_check ); + 17, unless( Gtk2->init_check ); ok( Gtk2->init ); ok( Gtk2->set_locale ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Gtk2-1.249/t/GdkDnd.t new/Gtk2-1.2492/t/GdkDnd.t --- old/Gtk2-1.249/t/GdkDnd.t 2012-05-21 09:46:26.000000000 +0200 +++ new/Gtk2-1.2492/t/GdkDnd.t 1970-01-01 01:00:00.000000000 +0100 @@ -1,121 +0,0 @@ -#!/usr/bin/perl -w -use strict; -use Gtk2::TestHelper tests => 26; - -# $Id$ - -my $window = Gtk2::Window -> new(); -$window -> realize(); -$window -> show_now; - -############################################################################### - -my $context = Gtk2::Gdk::DragContext -> new(); -isa_ok($context, "Gtk2::Gdk::DragContext"); - -my @targets = (Gtk2::Gdk::Atom -> new("target-string"), - Gtk2::Gdk::Atom -> new("target-bitmap")); - -$context = Gtk2::Gdk::DragContext -> begin($window -> window(), @targets); -isa_ok($context, "Gtk2::Gdk::DragContext"); - -my ($destination, $protocol); - -SKIP: { - skip("GdkScreen is new in 2.2", 2) - unless Gtk2 -> CHECK_VERSION(2, 2, 0); - - ($destination, $protocol) = $context -> find_window_for_screen($window -> window(), Gtk2::Gdk::Screen -> get_default(), 0, 0); - - ok(not defined $destination or ref $destination eq "Gtk2::Gdk::Window"); - ok(not defined $destination or $protocol); -} - -$context -> abort(0); - -############################################################################### - -$context = Gtk2::Gdk::DragContext -> begin($window -> window(), @targets); -isa_ok($context, "Gtk2::Gdk::DragContext"); - -ok($context -> protocol()); -is($context -> is_source(), 1); -is($context -> source_window(), $window -> window()); -is_deeply([map { $_ -> name() } $context -> targets()], - [map { $_ -> name() } @targets]); -isa_ok(($context -> targets())[0], "Gtk2::Gdk::Atom"); - -($destination, $protocol) = $context -> find_window($window -> window(), 0, 0); - -ok(not defined $destination or ref $destination eq "Gtk2::Gdk::Window"); -ok(not defined $destination or $protocol); - -SKIP: { - skip "find_window returned no destination window, skipping the tests that need one", 9 - unless defined $destination; - - # FIXME: what about the return value? - $context -> motion($destination, $protocol, 100, 100, [qw(copy)], [qw(copy move)], 0); - - ok($context -> actions() == [qw(copy move)]); - ok($context -> suggested_action() == qw(copy)); - is($context -> start_time(), 0); - - SKIP: { - skip "can't do x11 stuff on this platform", 2 - if $^O eq 'MSWin32'; - - is_deeply([Gtk2::Gdk::DragContext -> get_protocol($destination -> get_xid())], - [$destination -> get_xid(), $protocol]); - - skip("get_protocol_for_display is new in 2.2", 1) - unless Gtk2->CHECK_VERSION (2, 2, 0); - - is_deeply([Gtk2::Gdk::DragContext -> get_protocol_for_display(Gtk2::Gdk::Display -> get_default(), $destination -> get_xid())], - [$destination -> get_xid(), $protocol]); - } - - is($context -> dest_window(), $destination); - my $selection = $context -> get_selection(); - SKIP: { - skip "selection test: get_selection returned undef", 1 - unless defined $selection; - isa_ok($selection, "Gtk2::Gdk::Atom"); - } - - $context -> status(qw(move), 0); - ok($context -> action() == qw(move)); - - $context -> status([], 0); - - $context -> drop_reply(1, 0); - $context -> drop_finish(1, 0); - - SKIP: { - skip "new 2.6 stuff", 1 - unless Gtk2 -> CHECK_VERSION(2, 6, 0); - - like($context -> drag_drop_succeeded(), qr/^(?:1|)$/); - } - - $context -> drop(0); - $context -> abort(0); -} - -SKIP: { - skip 'new 2.22 stuff', 5 - unless Gtk2->CHECK_VERSION(2, 22, 0); - - my $context = Gtk2::Gdk::DragContext -> begin($window -> window(), @targets); - ok(defined $context -> get_actions()); - ok(defined $context -> get_selected_action()); - ok(defined $context -> get_suggested_action()); - is($context -> get_source_window(), $window -> window()); - is_deeply([map { $_ -> name() } $context -> list_targets()], - [map { $_ -> name() } @targets]); -} - -__END__ - -Copyright (C) 2003 by the gtk2-perl team (see the file AUTHORS for the -full list). See LICENSE for more information. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Gtk2-1.249/t/GdkPixbufLoader.t new/Gtk2-1.2492/t/GdkPixbufLoader.t --- old/Gtk2-1.249/t/GdkPixbufLoader.t 2011-11-27 08:57:26.000000000 +0100 +++ new/Gtk2-1.2492/t/GdkPixbufLoader.t 2014-04-21 03:24:56.000000000 +0200 @@ -123,7 +123,7 @@ # test chunked writing and signals and such SKIP: { - my $filename = 'gtk-demo/gnome-foot.png'; + my $filename = 'gtk-demo/alphatest.png'; skip "can't locate test image file", 4 unless -f $filename; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Gtk2-1.249/t/GtkDnd.t new/Gtk2-1.2492/t/GtkDnd.t --- old/Gtk2-1.249/t/GtkDnd.t 2011-11-27 08:57:26.000000000 +0100 +++ new/Gtk2-1.2492/t/GtkDnd.t 1970-01-01 01:00:00.000000000 +0100 @@ -1,136 +0,0 @@ -#!/usr/bin/perl -w -use strict; -use Gtk2::TestHelper tests => 6; - -# $Id$ - -my $button = Gtk2::Button -> new("Bla"); -my $window = Gtk2::Window -> new(); - -$window -> add($button); -$window -> realize(); -$button -> realize(); - -# Dest ######################################################################## - -$button -> drag_dest_set("all", "copy", - { target => "BITMAP", info => 23 }, - { target => "STRING", flags => ["same-app", "same-widget"], info => 42 } -); - -my $list = $button -> drag_dest_get_target_list(); -$button -> drag_dest_set_target_list(undef); -$button -> drag_dest_set_target_list($list); - -is($list -> find(Gtk2::Gdk -> TARGET_BITMAP), 23); -is($list -> find(Gtk2::Gdk -> TARGET_STRING), 42); - -my $pixbuf = Gtk2::Gdk::Pixbuf -> new("rgb", 0, 8, 10, 10); - -my $event = Gtk2::Gdk::Event -> new("button-press"); - -my $context = Gtk2::Drag -> begin($button, $list, "default", 1, $event); -SKIP: { - skip "context test", 1 unless defined $context; - isa_ok($context, "Gtk2::Gdk::DragContext"); -} - -$context = $button -> drag_begin($list, "default", 1, $event); -SKIP: { - skip "context test", 1 unless defined $context; - isa_ok($context, "Gtk2::Gdk::DragContext"); -} - -if (defined($context)) { - # warn $button -> drag_dest_find_target($context, $list); - # $context -> finish(1, 0, 0); - # $button -> drag_get_data($context, Gtk2::Gdk -> TARGET_STRING, 0); - # warn $context -> get_source_widget(); - - $context -> set_icon_widget($window, 5, 5); - - my $pixmap = Gtk2::Gdk::Pixmap->new ($window->window, 16, 16, -1); - $context -> set_icon_pixmap($pixmap->get_colormap, $pixmap, undef, 5, 5); - my $mask = Gtk2::Gdk::Pixmap->new ($window->window, 16, 16, 1); - $context -> set_icon_pixmap($pixmap->get_colormap, $pixmap, $mask, 5, 5); - - $context -> set_icon_pixbuf($pixbuf, 5, 5); - $context -> set_icon_stock("gtk-add", 5, 5); - $context -> set_icon_default(); - - SKIP: { - skip "new 2.8 stuff", 0 - unless Gtk2 -> CHECK_VERSION(2, 8, 0); - - $context -> set_icon_name("gtk-add", 5, 5); - } -} - -is($button -> drag_check_threshold(5, 5, 100, 100), 1); - -$button -> drag_highlight(); -$button -> drag_unhighlight(); - -$button -> drag_dest_set_proxy($window -> window(), "xdnd", 0); - -SKIP: { - skip("2.6 stuff", 0) - unless Gtk2 -> CHECK_VERSION(2, 6, 0); - - $button -> drag_dest_add_text_targets(); - $button -> drag_dest_add_image_targets(); - $button -> drag_dest_add_uri_targets(); -} - -SKIP: { - skip("2.10 stuff", 1) - unless Gtk2 -> CHECK_VERSION(2, 10, 0); - - $button -> drag_dest_set_track_motion(FALSE); - ok(!$button -> drag_dest_get_track_motion()); -} - -$button -> drag_dest_unset(); - -# Source ###################################################################### - -$button -> drag_source_set("shift-mask", "copy", - { target => "BITMAP", info => 23 }, - { target => "STRING", flags => ["same-app", "same-widget"], info => 42 } -); - -# $button -> drag_source_set_icon(...); -$button -> drag_source_set_icon_pixbuf($pixbuf); -$button -> drag_source_set_icon_stock("gtk-quit"); - -SKIP: { - skip("drag_source_[sg]et_target_list is new in 2.4", 0) - unless Gtk2->CHECK_VERSION (2, 4, 0); - - $list = $button -> drag_source_get_target_list(); - $button -> drag_source_set_target_list(undef); - $button -> drag_source_set_target_list($list); -} - -SKIP: { - skip("2.6 stuff", 0) - unless Gtk2 -> CHECK_VERSION(2, 6, 0); - - $button -> drag_source_add_text_targets(); - $button -> drag_source_add_image_targets(); - $button -> drag_source_add_uri_targets(); -} - -SKIP: { - skip("2.8 stuff", 0) - unless Gtk2 -> CHECK_VERSION(2, 8, 0); - - $button -> drag_source_set_icon_name("gtk-ok"); -} - -$button -> drag_source_unset(); - -__END__ - -Copyright (C) 2003-2006 by the gtk2-perl team (see the file AUTHORS for -the full list). See LICENSE for more information. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Gtk2-1.249/t/GtkSocket-GtkPlug.t new/Gtk2-1.2492/t/GtkSocket-GtkPlug.t --- old/Gtk2-1.249/t/GtkSocket-GtkPlug.t 2011-11-27 08:57:26.000000000 +0100 +++ new/Gtk2-1.2492/t/GtkSocket-GtkPlug.t 1970-01-01 01:00:00.000000000 +0100 @@ -1,105 +0,0 @@ -#!/usr/bin/perl -# -# $Id$ -# - -# ...despite patches that have been around for a long time, no win32 -use Gtk2::TestHelper tests => 12, nowin32 => 1; - -SKIP: { - -skip "blib can't be found", 6 - unless -d "blib"; - -ok( my $win = Gtk2::Window->new ); - -ok( my $socket = Gtk2::Socket->new ); -$win->add($socket); - -ok( my $id = $socket->get_id ); - -SKIP: { - skip 'new 2.14 stuff', 2 - unless Gtk2->CHECK_VERSION(2, 14, 0); - - is( $socket->get_plug_window, undef ); - $socket->signal_connect (plug_added => sub { - isa_ok( $socket->get_plug_window, 'Gtk2::Gdk::Window' ); - }); -} - -my $pid = fork; - -skip 'fork failed', 2 unless defined $pid && $pid >= 0; - -if( $pid == 0 ) -{ - exec("$^X -Mblib -e 'my \$id = $id;\n\n" . <<EOL); -use Gtk2; - -Gtk2->init; - -my \$plug = Gtk2::Plug->new($id); - -my \$btn = Gtk2::Button->new("gtk-quit"); -\$btn->signal_connect("clicked" => sub { Gtk2->main_quit; 1; }); -\$plug->add(\$btn); - -\$plug->show_all; - -Glib::Idle->add(sub { \$btn->clicked; 0; }); - -Gtk2->main;' -EOL - exit 0; -} -else -{ - $socket->signal_connect('plug-removed' => sub { - Gtk2->main_quit; - 1; - }); - $win->show_all; - Gtk2->main; - ok( waitpid($pid, 0) ); -} - -} - -# Standalone GtkPlug tests. -SKIP: { - my $id = 23; - my $display = Gtk2::Gdk::Display->get_default; - - # Backwards compatibility tests - my $plug = Gtk2::Plug->new($id); - isa_ok( $plug, 'Gtk2::Plug' ); - - $plug->construct($id); - $plug->construct_for_display($display, $id); - - ok( defined $plug->get_id ); - - skip 'new 2.14 stuff', 2 - unless Gtk2->CHECK_VERSION(2, 14, 0); - - is( $plug->get_embedded, FALSE ); - is( $plug->get_socket_window, undef ); -} - -# Backwards compatibility tests. -{ - my $id = 23; - my $display = Gtk2::Gdk::Display->get_default; - - isa_ok( Gtk2::Plug::new_for_display($display, $id), - 'Gtk2::Plug' ); - - isa_ok( Gtk2::Plug->new_for_display($display, $id), - 'Gtk2::Plug' ); -} - -__END__ - -Copyright (C) 2003 by the gtk2-perl team (see the file AUTHORS for the -full list). See LICENSE for more information. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Gtk2-1.249/t/GtkTreeView-Dnd.t new/Gtk2-1.2492/t/GtkTreeView-Dnd.t --- old/Gtk2-1.249/t/GtkTreeView-Dnd.t 2011-11-27 08:57:26.000000000 +0100 +++ new/Gtk2-1.2492/t/GtkTreeView-Dnd.t 2014-06-29 01:31:05.000000000 +0200 @@ -24,8 +24,8 @@ #my $pixmap = $view->create_row_drag_icon (Gtk2::TreePath->new ("0:0")); #isa_ok ($pixmap, '', 'create_row_drag_icon'); -$view->enable_model_drag_source (['button1-mask'], ['copy'], ['example', 0, 0]); -$view->enable_model_drag_dest (['copy'], ['example', 0, 0]); +$view->enable_model_drag_source (['button1-mask'], ['copy'], ['example', ['same-app'], 0]); +$view->enable_model_drag_dest (['copy'], ['example', ['same-app'], 0]); $view->signal_connect (drag_data_received => sub { print Dumper (@_); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Gtk2-1.249/xt/GdkDnd.t new/Gtk2-1.2492/xt/GdkDnd.t --- old/Gtk2-1.249/xt/GdkDnd.t 1970-01-01 01:00:00.000000000 +0100 +++ new/Gtk2-1.2492/xt/GdkDnd.t 2014-06-29 01:31:05.000000000 +0200 @@ -0,0 +1,121 @@ +#!/usr/bin/perl -w +use strict; +use Gtk2::TestHelper tests => 26; + +# $Id$ + +my $window = Gtk2::Window -> new(); +$window -> realize(); +$window -> show_now; + +############################################################################### + +my $context = Gtk2::Gdk::DragContext -> new(); +isa_ok($context, "Gtk2::Gdk::DragContext"); + +my @targets = (Gtk2::Gdk::Atom -> new("target-string"), + Gtk2::Gdk::Atom -> new("target-bitmap")); + +$context = Gtk2::Gdk::DragContext -> begin($window -> window(), @targets); +isa_ok($context, "Gtk2::Gdk::DragContext"); + +my ($destination, $protocol); + +SKIP: { + skip("GdkScreen is new in 2.2", 2) + unless Gtk2 -> CHECK_VERSION(2, 2, 0); + + ($destination, $protocol) = $context -> find_window_for_screen($window -> window(), Gtk2::Gdk::Screen -> get_default(), 0, 0); + + ok(not defined $destination or ref $destination eq "Gtk2::Gdk::Window"); + ok(not defined $destination or $protocol); +} + +$context -> abort(0); + +############################################################################### + +$context = Gtk2::Gdk::DragContext -> begin($window -> window(), @targets); +isa_ok($context, "Gtk2::Gdk::DragContext"); + +ok($context -> protocol()); +is($context -> is_source(), 1); +is($context -> source_window(), $window -> window()); +is_deeply([map { $_ -> name() } $context -> targets()], + [map { $_ -> name() } @targets]); +isa_ok(($context -> targets())[0], "Gtk2::Gdk::Atom"); + +($destination, $protocol) = $context -> find_window($window -> window(), 0, 0); + +ok(not defined $destination or ref $destination eq "Gtk2::Gdk::Window"); +ok(not defined $destination or $protocol); + +SKIP: { + skip "find_window returned no destination window, skipping the tests that need one", 9 + unless defined $destination; + + # FIXME: what about the return value? + $context -> motion($destination, $protocol, 100, 100, [qw(copy)], [qw(copy move)], 0); + + ok($context -> actions() == [qw(copy move)]); + ok($context -> suggested_action() == qw(copy)); + is($context -> start_time(), 0); + + SKIP: { + skip "can't do x11 stuff on this platform", 2 + if $^O eq 'MSWin32'; + + is_deeply([Gtk2::Gdk::DragContext -> get_protocol($destination -> get_xid())], + [$destination -> get_xid(), $protocol]); + + skip("get_protocol_for_display is new in 2.2", 1) + unless Gtk2->CHECK_VERSION (2, 2, 0); + + is_deeply([Gtk2::Gdk::DragContext -> get_protocol_for_display(Gtk2::Gdk::Display -> get_default(), $destination -> get_xid())], + [$destination -> get_xid(), $protocol]); + } + + is($context -> dest_window(), $destination); + my $selection = $context -> get_selection(); + SKIP: { + skip "selection test: get_selection returned undef", 1 + unless defined $selection; + isa_ok($selection, "Gtk2::Gdk::Atom"); + } + + $context -> status(qw(move), 0); + ok($context -> action() == qw(move)); + + $context -> status([], 0); + + $context -> drop_reply(1, 0); + $context -> drop_finish(1, 0); + + SKIP: { + skip "new 2.6 stuff", 1 + unless Gtk2 -> CHECK_VERSION(2, 6, 0); + + like($context -> drag_drop_succeeded(), qr/^(?:1|)$/); + } + + $context -> drop(0); + $context -> abort(0); +} + +SKIP: { + skip 'new 2.22 stuff', 5 + unless Gtk2->CHECK_VERSION(2, 22, 0); + + my $context = Gtk2::Gdk::DragContext -> begin($window -> window(), @targets); + ok(defined $context -> get_actions()); + ok(defined $context -> get_selected_action()); + ok(defined $context -> get_suggested_action()); + is($context -> get_source_window(), $window -> window()); + is_deeply([map { $_ -> name() } $context -> list_targets()], + [map { $_ -> name() } @targets]); +} + +__END__ + +Copyright (C) 2003 by the gtk2-perl team (see the file AUTHORS for the +full list). See LICENSE for more information. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Gtk2-1.249/xt/GtkDnd.t new/Gtk2-1.2492/xt/GtkDnd.t --- old/Gtk2-1.249/xt/GtkDnd.t 1970-01-01 01:00:00.000000000 +0100 +++ new/Gtk2-1.2492/xt/GtkDnd.t 2014-06-29 01:31:05.000000000 +0200 @@ -0,0 +1,136 @@ +#!/usr/bin/perl -w +use strict; +use Gtk2::TestHelper tests => 6; + +# $Id$ + +my $button = Gtk2::Button -> new("Bla"); +my $window = Gtk2::Window -> new(); + +$window -> add($button); +$window -> realize(); +$button -> realize(); + +# Dest ######################################################################## + +$button -> drag_dest_set("all", "copy", + { target => "BITMAP", info => 23 }, + { target => "STRING", flags => ["same-app", "same-widget"], info => 42 } +); + +my $list = $button -> drag_dest_get_target_list(); +$button -> drag_dest_set_target_list(undef); +$button -> drag_dest_set_target_list($list); + +is($list -> find(Gtk2::Gdk -> TARGET_BITMAP), 23); +is($list -> find(Gtk2::Gdk -> TARGET_STRING), 42); + +my $pixbuf = Gtk2::Gdk::Pixbuf -> new("rgb", 0, 8, 10, 10); + +my $event = Gtk2::Gdk::Event -> new("button-press"); + +my $context = Gtk2::Drag -> begin($button, $list, "default", 1, $event); +SKIP: { + skip "context test", 1 unless defined $context; + isa_ok($context, "Gtk2::Gdk::DragContext"); +} + +$context = $button -> drag_begin($list, "default", 1, $event); +SKIP: { + skip "context test", 1 unless defined $context; + isa_ok($context, "Gtk2::Gdk::DragContext"); +} + +if (defined($context)) { + # warn $button -> drag_dest_find_target($context, $list); + # $context -> finish(1, 0, 0); + # $button -> drag_get_data($context, Gtk2::Gdk -> TARGET_STRING, 0); + # warn $context -> get_source_widget(); + + $context -> set_icon_widget($window, 5, 5); + + my $pixmap = Gtk2::Gdk::Pixmap->new ($window->window, 16, 16, -1); + $context -> set_icon_pixmap($pixmap->get_colormap, $pixmap, undef, 5, 5); + my $mask = Gtk2::Gdk::Pixmap->new ($window->window, 16, 16, 1); + $context -> set_icon_pixmap($pixmap->get_colormap, $pixmap, $mask, 5, 5); + + $context -> set_icon_pixbuf($pixbuf, 5, 5); + $context -> set_icon_stock("gtk-add", 5, 5); + $context -> set_icon_default(); + + SKIP: { + skip "new 2.8 stuff", 0 + unless Gtk2 -> CHECK_VERSION(2, 8, 0); + + $context -> set_icon_name("gtk-add", 5, 5); + } +} + +is($button -> drag_check_threshold(5, 5, 100, 100), 1); + +$button -> drag_highlight(); +$button -> drag_unhighlight(); + +$button -> drag_dest_set_proxy($window -> window(), "xdnd", 0); + +SKIP: { + skip("2.6 stuff", 0) + unless Gtk2 -> CHECK_VERSION(2, 6, 0); + + $button -> drag_dest_add_text_targets(); + $button -> drag_dest_add_image_targets(); + $button -> drag_dest_add_uri_targets(); +} + +SKIP: { + skip("2.10 stuff", 1) + unless Gtk2 -> CHECK_VERSION(2, 10, 0); + + $button -> drag_dest_set_track_motion(FALSE); + ok(!$button -> drag_dest_get_track_motion()); +} + +$button -> drag_dest_unset(); + +# Source ###################################################################### + +$button -> drag_source_set("shift-mask", "copy", + { target => "BITMAP", info => 23 }, + { target => "STRING", flags => ["same-app", "same-widget"], info => 42 } +); + +# $button -> drag_source_set_icon(...); +$button -> drag_source_set_icon_pixbuf($pixbuf); +$button -> drag_source_set_icon_stock("gtk-quit"); + +SKIP: { + skip("drag_source_[sg]et_target_list is new in 2.4", 0) + unless Gtk2->CHECK_VERSION (2, 4, 0); + + $list = $button -> drag_source_get_target_list(); + $button -> drag_source_set_target_list(undef); + $button -> drag_source_set_target_list($list); +} + +SKIP: { + skip("2.6 stuff", 0) + unless Gtk2 -> CHECK_VERSION(2, 6, 0); + + $button -> drag_source_add_text_targets(); + $button -> drag_source_add_image_targets(); + $button -> drag_source_add_uri_targets(); +} + +SKIP: { + skip("2.8 stuff", 0) + unless Gtk2 -> CHECK_VERSION(2, 8, 0); + + $button -> drag_source_set_icon_name("gtk-ok"); +} + +$button -> drag_source_unset(); + +__END__ + +Copyright (C) 2003-2006 by the gtk2-perl team (see the file AUTHORS for +the full list). See LICENSE for more information. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Gtk2-1.249/xt/GtkSocket-GtkPlug.t new/Gtk2-1.2492/xt/GtkSocket-GtkPlug.t --- old/Gtk2-1.249/xt/GtkSocket-GtkPlug.t 1970-01-01 01:00:00.000000000 +0100 +++ new/Gtk2-1.2492/xt/GtkSocket-GtkPlug.t 2014-06-29 01:31:05.000000000 +0200 @@ -0,0 +1,105 @@ +#!/usr/bin/perl +# +# $Id$ +# + +# ...despite patches that have been around for a long time, no win32 +use Gtk2::TestHelper tests => 12, nowin32 => 1; + +SKIP: { + +skip "blib can't be found", 6 + unless -d "blib"; + +ok( my $win = Gtk2::Window->new ); + +ok( my $socket = Gtk2::Socket->new ); +$win->add($socket); + +ok( my $id = $socket->get_id ); + +SKIP: { + skip 'new 2.14 stuff', 2 + unless Gtk2->CHECK_VERSION(2, 14, 0); + + is( $socket->get_plug_window, undef ); + $socket->signal_connect (plug_added => sub { + isa_ok( $socket->get_plug_window, 'Gtk2::Gdk::Window' ); + }); +} + +my $pid = fork; + +skip 'fork failed', 2 unless defined $pid && $pid >= 0; + +if( $pid == 0 ) +{ + exec("$^X -Mblib -e 'my \$id = $id;\n\n" . <<EOL); +use Gtk2; + +Gtk2->init; + +my \$plug = Gtk2::Plug->new($id); + +my \$btn = Gtk2::Button->new("gtk-quit"); +\$btn->signal_connect("clicked" => sub { Gtk2->main_quit; 1; }); +\$plug->add(\$btn); + +\$plug->show_all; + +Glib::Idle->add(sub { \$btn->clicked; 0; }); + +Gtk2->main;' +EOL + exit 0; +} +else +{ + $socket->signal_connect('plug-removed' => sub { + Gtk2->main_quit; + 1; + }); + $win->show_all; + Gtk2->main; + ok( waitpid($pid, 0) ); +} + +} + +# Standalone GtkPlug tests. +SKIP: { + my $id = 23; + my $display = Gtk2::Gdk::Display->get_default; + + # Backwards compatibility tests + my $plug = Gtk2::Plug->new($id); + isa_ok( $plug, 'Gtk2::Plug' ); + + $plug->construct($id); + $plug->construct_for_display($display, $id); + + ok( defined $plug->get_id ); + + skip 'new 2.14 stuff', 2 + unless Gtk2->CHECK_VERSION(2, 14, 0); + + is( $plug->get_embedded, FALSE ); + is( $plug->get_socket_window, undef ); +} + +# Backwards compatibility tests. +{ + my $id = 23; + my $display = Gtk2::Gdk::Display->get_default; + + isa_ok( Gtk2::Plug::new_for_display($display, $id), + 'Gtk2::Plug' ); + + isa_ok( Gtk2::Plug->new_for_display($display, $id), + 'Gtk2::Plug' ); +} + +__END__ + +Copyright (C) 2003 by the gtk2-perl team (see the file AUTHORS for the +full list). See LICENSE for more information. -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
