[perl-Gtk3] Add overrides for Gtk3::SizeLayout::get_widgets



commit a47595b7404cb9c6cab435c4fdbf700a54cb537a
Author: Torsten Schönfeld <kaffeetisch gmx de>
Date:   Sat Dec 7 00:37:02 2013 +0100

    Add overrides for Gtk3::SizeLayout::get_widgets

 NEWS          |    3 ++-
 lib/Gtk3.pm   |    1 +
 t/overrides.t |   23 ++++++++++++++++++++++-
 3 files changed, 25 insertions(+), 2 deletions(-)
---
diff --git a/NEWS b/NEWS
index e4af7a9..61b58c8 100644
--- a/NEWS
+++ b/NEWS
@@ -2,7 +2,8 @@
 
 * Add overrides for Gtk3::RadioAction, Gtk3::RadioButton, Gtk3::RadioMenuItem
   and Gtk3::RadioToolButton.
-* Add overrides for Pango::Layout::set_text.
+* Add an override for Gtk3::SizeGroup::get_widgets.
+* Add an override for Pango::Layout::set_text.
 * Require Test::Simple >= 0.96.
 
 Overview of changes in Gtk3 0.014 [2013-10-18]
diff --git a/lib/Gtk3.pm b/lib/Gtk3.pm
index c8b407f..bfca557 100644
--- a/lib/Gtk3.pm
+++ b/lib/Gtk3.pm
@@ -39,6 +39,7 @@ my @_GTK_FLATTEN_ARRAY_REF_RETURN_FOR = qw/
   Gtk3::Builder::get_objects
   Gtk3::CellLayout::get_cells
   Gtk3::Container::get_children
+  Gtk3::SizeGroup::get_widgets
   Gtk3::Stock::list_ids
   Gtk3::TreePath::get_indices
   Gtk3::TreeView::get_columns
diff --git a/t/overrides.t b/t/overrides.t
index b61d0db..8b6f071 100644
--- a/t/overrides.t
+++ b/t/overrides.t
@@ -7,7 +7,7 @@ use warnings;
 use utf8;
 use Encode;
 
-plan tests => 161;
+plan tests => 163;
 
 # Gtk3::CHECK_VERSION and check_version
 {
@@ -264,6 +264,27 @@ SKIP: {
   }
 }
 
+# Gtk3::SizeGroup
+{
+  my $group = Gtk3::SizeGroup->new ("vertical");
+
+  my @widgets = $group->get_widgets;
+  ok (! widgets);
+
+  my ($uno, $dos, $tres, $cuatro) =
+    (Gtk3::Label->new ("Tinky-Winky"),
+     Gtk3::Label->new ("Dipsy"),
+     Gtk3::Label->new ("La La"),
+     Gtk3::Label->new ("Po"));
+
+  $group->add_widget ($uno);
+  $group->add_widget ($dos);
+  $group->add_widget ($tres);
+  $group->add_widget ($cuatro);
+  @widgets = $group->get_widgets;
+  is (scalar @widgets, 4);
+}
+
 # Gtk3::Stock
 {
   ok (grep { $_ eq 'gtk-ok' } Gtk3::Stock::list_ids ());


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