Same as the previous patch but with the proper gtk version check.

Please, if something is wrong comment it to me as soon as possible as
I will start to do the others modules.

-- 
Emmanuel Rodriguez
Index: xs/GtkCellView.xs
===================================================================
--- xs/GtkCellView.xs	(revision 2104)
+++ xs/GtkCellView.xs	(working copy)
@@ -66,3 +66,9 @@
 	}
 	else
 		XSRETURN_EMPTY;
+
+#if GTK_CHECK_VERSION (2, 16, 0)
+
+GtkTreeModel_ornull * gtk_cell_view_get_model (GtkCellView * cellview);
+
+#endif /* 2.16 */
Index: t/GtkCellView.t
===================================================================
--- t/GtkCellView.t	(revision 2104)
+++ t/GtkCellView.t	(working copy)
@@ -12,7 +12,7 @@
 use strict;
 use warnings;
 
-use Gtk2::TestHelper tests => 10,
+use Gtk2::TestHelper tests => 12,
     at_least_version => [2, 6, 0, "GtkCellView is new in 2.6"],
     ;
 
@@ -25,6 +25,11 @@
 isa_ok (my $cview = Gtk2::CellView->new, 'Gtk2::CellView',
 	'Gtk2::CellView->new');
 
+SKIP: {
+	skip 'new 2.16 stuff', 1 unless Gtk2->CHECK_VERSION(2, 16, 0);
+	is($cview->get_model(), undef, '$cview->get_model is undef');
+}
+
 ginterfaces_ok($cview);
 
 isa_ok ($cview = Gtk2::CellView->new_with_text ('text'), 'Gtk2::CellView',
@@ -41,7 +46,11 @@
 fill_store ($model, get_pixbufs ($win));
 
 ok (eval { $cview->set_model ($model); 1; }, '$cview->set_model');
-# there is no get, or property???
+# there is a get (new since gtk 2.16) !!!!
+SKIP: {
+	skip 'new 2.16 stuff', 1 unless Gtk2->CHECK_VERSION(2, 16, 0);
+	is($cview->get_model(), $model, '$cview->get_model');
+}
 
 my $treepath = Gtk2::TreePath->new_from_string ('0');
 $cview->set_displayed_row ($treepath);
_______________________________________________
gtk-perl-list mailing list
gtk-perl-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list

Reply via email to