perl-Gtk2 r2108 - in trunk: . t xs
- From: tsch svn gnome org
- To: svn-commits-list gnome org
- Subject: perl-Gtk2 r2108 - in trunk: . t xs
- Date: Tue, 13 Jan 2009 20:30:33 +0000 (UTC)
Author: tsch
Date: Tue Jan 13 20:30:33 2009
New Revision: 2108
URL: http://svn.gnome.org/viewvc/perl-Gtk2?rev=2108&view=rev
Log:
Allow undef for the model in Gtk2::CellView::set_model.
Modified:
trunk/ChangeLog
trunk/t/GtkCellView.t
trunk/xs/GtkCellView.xs
Modified: trunk/t/GtkCellView.t
==============================================================================
--- trunk/t/GtkCellView.t (original)
+++ trunk/t/GtkCellView.t Tue Jan 13 20:30:33 2009
@@ -26,11 +26,6 @@
isa_ok (my $cview = Gtk2::CellView->new, 'Gtk2::CellView',
'Gtk2::CellView->new');
-SKIP: {
- skip 'new 2.16 stuff', 1 unless Gtk2->CHECK_VERSION(2, 15, 0); # FIXME: 2.16
- is($cview->get_model(), undef, '$cview->get_model is undef');
-}
-
ginterfaces_ok($cview);
isa_ok ($cview = Gtk2::CellView->new_with_text ('text'), 'Gtk2::CellView',
@@ -46,10 +41,19 @@
my $model = create_store ();
fill_store ($model, get_pixbufs ($win));
-ok (eval { $cview->set_model ($model); 1; }, '$cview->set_model');
-# there is a get (new since gtk 2.16) !!!!
+ok (eval { $cview->set_model (undef);
+ $cview->set_model ($model);
+ 1; },
+ '$cview->set_model');
+
SKIP: {
- skip 'new 2.16 stuff', 1 unless Gtk2->CHECK_VERSION(2, 15, 0); # FIXME: 2.16
+ skip 'new 2.16 stuff', 2
+ unless Gtk2->CHECK_VERSION(2, 15, 0); # FIXME: 2.16
+
+ $cview->set_model (undef);
+ is($cview->get_model(), undef, '$cview->get_model with undef');
+
+ $cview->set_model ($model);
is($cview->get_model(), $model, '$cview->get_model');
}
Modified: trunk/xs/GtkCellView.xs
==============================================================================
--- trunk/xs/GtkCellView.xs (original)
+++ trunk/xs/GtkCellView.xs Tue Jan 13 20:30:33 2009
@@ -29,7 +29,7 @@
C_ARGS:
pixbuf
-void gtk_cell_view_set_model (GtkCellView * cell_view, GtkTreeModel * model);
+void gtk_cell_view_set_model (GtkCellView * cell_view, GtkTreeModel_ornull * model);
void gtk_cell_view_set_displayed_row (GtkCellView * cell_view, GtkTreePath * path);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]