Subject: | t/overrides.t warns: menu position callback ignoring error: Can't use string ("320") as an ARRAY ref while "strict refs" in use at t/overrides.t line 238 |
Even the latest 0.022 warns when running t/overrides.t test:
t/floating-refs.t .............. ok
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.
GLib-GObject-WARNING **: The property GtkColorButton:color is deprecated and shouldn't be used anymore. It will be removed in a future version. at /usr/lib64/perl5/vendor_perl/Glib/Object/Introspection.pm line 58.
GLib-GIO-Message: Using the 'memory' GSettings backend. Your settings will not be saved or shared with other applications.
GLib-GObject-WARNING **: The property GtkButton:use-stock is deprecated and shouldn't be used anymore. It will be removed in a future version. at /home/test/fedora/perl-Gtk3/Gtk3-0.022/blib/lib/Gtk3.pm line 702.
GLib-GObject-WARNING **: The property GtkSettings:gtk-button-images is deprecated and shouldn't be used anymore. It will be removed in a future version. at /home/test/fedora/perl-Gtk3/Gtk3-0.022/blib/lib/Gtk3.pm line 702.
*** menu position callback ignoring error: Can't use string ("320") as an ARRAY ref while "strict refs" in use at t/overrides.t line 238.
*** menu position callback must return two integers (x, y) or two integers and a boolean (x, y, push_in) at /home/test/fedora/perl-Gtk3/Gtk3-0.022/blib/lib/Gtk3.pm line 937.
*** menu position callback ignoring error: Can't use string ("320") as an ARRAY ref while "strict refs" in use at t/overrides.t line 238.
*** menu position callback must return two integers (x, y) or two integers and a boolean (x, y, push_in) at /home/test/fedora/perl-Gtk3/Gtk3-0.022/blib/lib/Gtk3.pm line 937.
t/overrides.t .................. ok
Attached patch fixes the test.
Subject: | Gtk3-0.019-position.patch |
diff --git a/t/overrides.t b/t/overrides.t
index 041e0aa..6b8fc85 100644
--- a/t/overrides.t
+++ b/t/overrides.t
@@ -233,9 +233,9 @@ SKIP: {
{
my $menu = Gtk3::Menu->new;
my $position_callback = sub {
- my ($menu, $data) = @_;
+ my ($menu, $x, $y) = @_;
isa_ok ($menu, "Gtk3::Menu");
- return @$data;
+ return ($x, $y);
};
$menu->popup (undef, undef, $position_callback, [50, 50], 1, 0);
$menu->popup_for_device (undef, undef, undef, $position_callback, [50, 50, Glib::TRUE], 1, 0);