>From ef59b9ea531e7b8610b61bd4993d60e8fc3b743a Mon Sep 17 00:00:00 2001 From: Quentin Sculo Date: Tue, 13 Apr 2010 19:59:01 +0200 Subject: [PATCH 16/16] wrap gtk_notebook_[gs]et_action_widget (new in gtk+-2.20) --- t/GtkNotebook.t | 11 ++++++++++- xs/GtkNotebook.xs | 9 +++++++++ 2 files changed, 19 insertions(+), 1 deletions(-) diff --git a/t/GtkNotebook.t b/t/GtkNotebook.t index e207c07..144d835 100644 --- a/t/GtkNotebook.t +++ b/t/GtkNotebook.t @@ -7,7 +7,7 @@ # - rm ######################### -use Gtk2::TestHelper tests => 63; +use Gtk2::TestHelper tests => 64; my $win = Gtk2::Window->new; @@ -132,6 +132,15 @@ SKIP: { $nb->set_window_creation_hook (sub { warn join ", ", @_; }); } +SKIP: { + skip "2.20 stuff", 1 + unless Gtk2->CHECK_VERSION (2, 20, 0); + + my $button=Gtk2::Button->new("click me"); + $nb->set_action_widget($button,'end'); + is ($nb->set_action_widget('end'), $button, '[gs]et_action_widget'); +} + $win->show_all; ok(1); run_main sub { diff --git a/xs/GtkNotebook.xs b/xs/GtkNotebook.xs index 44d599c..ee15e24 100644 --- a/xs/GtkNotebook.xs +++ b/xs/GtkNotebook.xs @@ -456,3 +456,12 @@ void gtk_notebook_set_tab_detachable (GtkNotebook *notebook, GtkWidget *child, g gboolean gtk_notebook_get_tab_detachable (GtkNotebook *notebook, GtkWidget *child); #endif /* 2.10 */ + +#if GTK_CHECK_VERSION (2, 20, 0) + +void gtk_notebook_set_action_widget (GtkNotebook *notebook, GtkWidget *widget, GtkPackType pack_type); + +GtkWidget* gtk_notebook_get_action_widget (GtkNotebook *notebook, GtkPackType pack_type); + +#endif /* 2.20 */ + -- 1.6.4.4