>From bcff86b939b74f9512c638e42e0f1be91beda3d7 Mon Sep 17 00:00:00 2001 From: Quentin Sculo Date: Tue, 13 Apr 2010 19:09:12 +0200 Subject: [PATCH 06/16] wrap Gtk2::Window->get_default_icon_name (new in 2.16) and make Gtk2::Window->set_default_icon_name accept undef --- t/01.GtkWindow.t | 13 ++++++++++++- xs/GtkWindow.xs | 15 ++++++++++++++- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/t/01.GtkWindow.t b/t/01.GtkWindow.t index da59956..b88254f 100644 --- a/t/01.GtkWindow.t +++ b/t/01.GtkWindow.t @@ -10,7 +10,7 @@ ######################### -use Gtk2::TestHelper tests => 114; +use Gtk2::TestHelper tests => 116; ok( my $win = Gtk2::Window->new ); ok( $win = Gtk2::Window->new('popup') ); @@ -389,6 +389,17 @@ SKIP: { isa_ok ($list[0], 'Gtk2::Window'); } +SKIP: { + skip 'new 2.16 stuff', 2 + unless Gtk2->CHECK_VERSION(2, 16, 0); + + Gtk2::Window->set_default_icon_name (undef); + is (Gtk2::Window->get_default_icon_name,undef, '[gs]et_default_icon_name with undef'); + Gtk2::Window->set_default_icon_name ('gtk-ok'); + is (Gtk2::Window->get_default_icon_name,'gtk-ok', 'get_default_icon_name'); +} + + __END__ Copyright (C) 2003-2006 by the gtk2-perl team (see the file AUTHORS for the diff --git a/xs/GtkWindow.xs b/xs/GtkWindow.xs index 04217f6..5e10a7d 100644 --- a/xs/GtkWindow.xs +++ b/xs/GtkWindow.xs @@ -690,7 +690,7 @@ const gchar_ornull * gtk_window_get_icon_name (GtkWindow *window); ## void gtk_window_set_default_icon_name (const gchar *name); void gtk_window_set_default_icon_name (class, name) - const gchar *name + const gchar_ornull *name C_ARGS: name @@ -732,6 +732,19 @@ GtkWidget_ornull * gtk_window_get_default_widget (GtkWindow *window); #endif /* 2.14 */ +#if GTK_CHECK_VERSION (2, 16, 0) + +## gchar * gtk_window_get_icon_name (void) +const gchar_ornull * +gtk_window_get_default_icon_name (class); + C_ARGS: /* void */ + +=for apidoc +Gets the value set by L<$window-Eset_default_icon_name>. +=cut + +#endif /* 2.16 */ + MODULE = Gtk2::Window PACKAGE = Gtk2::WindowGroup PREFIX = gtk_window_group_ ## GtkWindowGroup * gtk_window_group_new (void) -- 1.6.4.4