[perl-Gtk3] Fix warnings from the dialog tests



commit 23acf498c52f27ccba2751cad31961e028865649
Author: Torsten Schönfeld <kaffeetisch gmx de>
Date:   Sun Aug 2 16:22:13 2015 +0200

    Fix warnings from the dialog tests
    
    Dialogs without a parent now issue warnings.

 t/overrides.t    |    8 ++++++--
 t/zz-GtkDialog.t |    2 ++
 2 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/t/overrides.t b/t/overrides.t
index fe0b3e7..34afeab 100644
--- a/t/overrides.t
+++ b/t/overrides.t
@@ -40,8 +40,12 @@ note('Gtk3::show_about_dialog');
                version => '42',
                authors => [qw/me myself i/],
                license_type => 'lgpl-2-1');
-  Gtk3::show_about_dialog (undef, %props);
-  Gtk3->show_about_dialog (undef, %props);
+  SKIP: {
+    skip 'dialogs without parent warn as of gtk+ >= 3.16', 0
+      if Gtk3::CHECK_VERSION (3, 16, 0);
+    Gtk3::show_about_dialog (undef, %props);
+    Gtk3->show_about_dialog (undef, %props);
+  }
   Gtk3::show_about_dialog (Gtk3::Window->new, %props);
   Gtk3->show_about_dialog (Gtk3::Window->new, %props);
   ok (1);
diff --git a/t/zz-GtkDialog.t b/t/zz-GtkDialog.t
index 7fa606a..b11ead5 100644
--- a/t/zz-GtkDialog.t
+++ b/t/zz-GtkDialog.t
@@ -22,6 +22,7 @@ $d1->hide;
 
 # a hand-made dialog, run
 my $d2 = Gtk3::Dialog->new;
+$d2->set_transient_for ($win);
 $d2->add_button ('First Button', 0);
 my $btn2 = $d2->add_button ('gtk-ok', 1);
 $d2->add_buttons ('gtk-cancel', 2, 'gtk-quit', 3, 'Last Button', 4);
@@ -57,6 +58,7 @@ SKIP: {
 
   foreach my $package (qw/Gtk3::Dialog Gtk3::AboutDialog/) {
     my $d = $package->new;
+    $d->set_transient_for ($win);
     my $b = $d->add_button ('First Button', 'ok');
     $d->signal_connect (response => sub {
       is ($_[1], 'ok', "$package response");



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]