[perl-Gtk2] Wrap gtk_notebook_[gs]et_action_widget (new in gtk+ 2.20)
- From: Torsten Schönfeld <tsch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [perl-Gtk2] Wrap gtk_notebook_[gs]et_action_widget (new in gtk+ 2.20)
- Date: Thu, 22 Apr 2010 23:08:07 +0000 (UTC)
commit c5ee2e86a6ec93c28ab09b75ec703fba0f936eb0
Author: Quentin Sculo <squentin free fr>
Date: Tue Apr 13 19:59:01 2010 +0200
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..6ae302b 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->get_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..414bcca 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_ornull* gtk_notebook_get_action_widget (GtkNotebook *notebook, GtkPackType pack_type);
+
+#endif /* 2.20 */
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]