>From fdfe8e3354b99d03f798a0e5d7bbcf67b171c11a Mon Sep 17 00:00:00 2001 From: Quentin Sculo Date: Tue, 13 Apr 2010 19:25:43 +0200 Subject: [PATCH 10/16] wrap gtk_file_chooser_[gs]et_create_folders (new in gtk+-2.18) --- t/GtkFileChooser.t | 10 +++++++++- xs/GtkFileChooser.xs | 9 +++++++++ 2 files changed, 18 insertions(+), 1 deletions(-) diff --git a/t/GtkFileChooser.t b/t/GtkFileChooser.t index abe60b0..3cdf2dc 100644 --- a/t/GtkFileChooser.t +++ b/t/GtkFileChooser.t @@ -4,7 +4,7 @@ use Gtk2::TestHelper at_least_version => [2, 4, 0, 'GtkFileChooser is new in 2.4'], - tests => 42, + tests => 43, skip_all => 'this test is unreliable', ; use File::Spec; @@ -184,6 +184,14 @@ SKIP: { is ($file_chooser->get_do_overwrite_confirmation, TRUE); } +SKIP: { + skip('new 2.18 stuff', 1) + unless Gtk2->CHECK_VERSION (2, 18, 0); + + $file_chooser->set_create_folders (FALSE); + is ($file_chooser->get_create_folders, FALSE, '[gs]et_create_folders'); +} + __END__ Copyright (C) 2003-2005 by the gtk2-perl team (see the file AUTHORS for the diff --git a/xs/GtkFileChooser.xs b/xs/GtkFileChooser.xs index 46ada69..cd8db7e 100644 --- a/xs/GtkFileChooser.xs +++ b/xs/GtkFileChooser.xs @@ -216,3 +216,12 @@ void gtk_file_chooser_set_do_overwrite_confirmation (GtkFileChooser *chooser, gb gboolean gtk_file_chooser_get_do_overwrite_confirmation (GtkFileChooser *chooser); #endif + +#if GTK_CHECK_VERSION (2, 18, 0) + +void gtk_file_chooser_set_create_folders (GtkFileChooser *chooser, gboolean create_folders); + +gboolean gtk_file_chooser_get_create_folders (GtkFileChooser *chooser); + +#endif + -- 1.6.4.4