[perl-Gtk2] Wrap Gtk2::Window->get_default_icon_name (new in gtk+ 2.16)



commit ffcd3c597d19220093b1484d3d00f2067b367629
Author: Quentin Sculo <squentin free fr>
Date:   Tue Apr 13 19:09:12 2010 +0200

    Wrap Gtk2::Window->get_default_icon_name (new in gtk+ 2.16)
    
    And make Gtk2::Window->set_default_icon_name accept undef.

 t/01.GtkWindow.t |   13 ++++++++++++-
 xs/GtkWindow.xs  |   14 +++++++++++++-
 2 files changed, 25 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..b1aeb28 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,18 @@ GtkWidget_ornull * gtk_window_get_default_widget (GtkWindow *window);
 
 #endif /* 2.14 */
 
+#if GTK_CHECK_VERSION (2, 16, 0)
+
+=for apidoc
+Gets the value set by C<< Gtk2::Window->set_default_icon_name >>.
+=cut
+## gchar * gtk_window_get_icon_name (void)
+const gchar_ornull *
+gtk_window_get_default_icon_name (class);
+    C_ARGS: /* void */
+
+#endif /* 2.16 */
+
 MODULE = Gtk2::Window	PACKAGE = Gtk2::WindowGroup	PREFIX = gtk_window_group_
 
 ## GtkWindowGroup * gtk_window_group_new (void)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]