[perl-Gtk2] Wrap gtk_image_menu_item_[gs]et_always_show_image (new in gtk+ 2.16)
- From: Torsten Schönfeld <tsch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [perl-Gtk2] Wrap gtk_image_menu_item_[gs]et_always_show_image (new in gtk+ 2.16)
- Date: Tue, 20 Apr 2010 21:09:29 +0000 (UTC)
commit 0ad785948ceb4d4333dada52e66699e3e4553d17
Author: Quentin Sculo <squentin free fr>
Date: Tue Apr 13 19:58:40 2010 +0200
Wrap gtk_image_menu_item_[gs]et_always_show_image (new in gtk+ 2.16)
t/GtkImageMenuItem.t | 8 ++++++--
xs/GtkImageMenuItem.xs | 5 +++++
2 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/t/GtkImageMenuItem.t b/t/GtkImageMenuItem.t
index 7a2321f..6dd798a 100644
--- a/t/GtkImageMenuItem.t
+++ b/t/GtkImageMenuItem.t
@@ -1,6 +1,6 @@
#!/usr/bin/perl -w
use strict;
-use Gtk2::TestHelper tests => 11;
+use Gtk2::TestHelper tests => 12;
# $Id$
@@ -28,7 +28,7 @@ $item -> set_image($image);
is($item -> get_image(), $image);
SKIP: {
- skip 'use_stock methods', 4
+ skip 'use_stock methods', 5
unless Gtk2->CHECK_VERSION(2, 16, 0);
# Get an item from a stock and test the getter/setter
@@ -48,6 +48,10 @@ SKIP: {
# the method call is tested for a crash
my $with_accelartor = Gtk2::ImageMenuItem -> new_from_stock("gtk-no");
$from_stock -> set_accel_group(Gtk2::AccelGroup -> new());
+
+ my $imagemitem = Gtk2::ImageMenuItem->new_from_stock("gtk-yes");
+ $imagemitem->set_always_show_image(TRUE);
+ is( $imagemitem->get_always_show_image, TRUE, '[gs]et_always_show_image');
}
__END__
diff --git a/xs/GtkImageMenuItem.xs b/xs/GtkImageMenuItem.xs
index e3aaa2b..c6a3592 100644
--- a/xs/GtkImageMenuItem.xs
+++ b/xs/GtkImageMenuItem.xs
@@ -82,5 +82,10 @@ gtk_image_menu_item_set_accel_group (image_menu_item, accel_group)
GtkImageMenuItem * image_menu_item
GtkAccelGroup * accel_group
+
+gboolean gtk_image_menu_item_get_always_show_image (GtkImageMenuItem *image_menu_item);
+
+void gtk_image_menu_item_set_always_show_image (GtkImageMenuItem *image_menu_item, gboolean always_show);
+
#endif /* 2.16 */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]