[perl-Gtk3] Avoid warnings from the Gtk3::UIManager tests



commit 844fc3a842689ac0415b95d8df4e61b5bb9b9b28
Author: Torsten SchÃnfeld <kaffeetisch gmx de>
Date:   Sun Aug 12 13:09:57 2012 +0200

    Avoid warnings from the Gtk3::UIManager tests

 t/overrides.t |   18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)
---
diff --git a/t/overrides.t b/t/overrides.t
index 91178c2..aa267f6 100644
--- a/t/overrides.t
+++ b/t/overrides.t
@@ -270,17 +270,23 @@ SKIP: {
 __EOD__
   ok ($ui_manager->add_ui_from_string ($ui_info) != 0);
 
-  $ui_manager->ensure_update;
-  my @menubars = $ui_manager->get_toplevels ("menubar");
-  is (@menubars, 2);
-  isa_ok ($menubars[0], "Gtk3::MenuBar");
-  isa_ok ($menubars[1], "Gtk3::MenuBar");
-
   my $group_one = Gtk3::ActionGroup->new ("Barney");
   my $group_two = Gtk3::ActionGroup->new ("Fred");
+  my @entries = (
+    [ "HelpMenu", undef, "_Help" ],
+    [ "About", undef, "_About", "<control>A", "About" ],
+    [ "License", undef, "_License", "<control>L", "License" ],
+  );
+  $group_one->add_actions (\ entries, undef);
   $ui_manager->insert_action_group ($group_one, 0);
   $ui_manager->insert_action_group ($group_two, 1);
   is_deeply ([$ui_manager->get_action_groups], [$group_one, $group_two]);
+
+  $ui_manager->ensure_update;
+  my @menubars = $ui_manager->get_toplevels ("menubar");
+  is (@menubars, 2);
+  isa_ok ($menubars[0], "Gtk3::MenuBar");
+  isa_ok ($menubars[1], "Gtk3::MenuBar");
 }
 
 # Gtk3::Gdk::Window::new



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