[perl-Gtk2] Wrap gtk_icon_view_[gs]et_item_padding (new in gtk+ 2.18)
- From: Torsten Schönfeld <tsch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [perl-Gtk2] Wrap gtk_icon_view_[gs]et_item_padding (new in gtk+ 2.18)
- Date: Thu, 22 Apr 2010 23:07:52 +0000 (UTC)
commit 9a578c17f0a2e2fd9508b2c4d8e0c3e1a8566e2c
Author: Quentin Sculo <squentin free fr>
Date: Tue Apr 13 19:27:34 2010 +0200
Wrap gtk_icon_view_[gs]et_item_padding (new in gtk+ 2.18)
t/GtkIconView.t | 15 ++++++++++++++-
xs/GtkIconView.xs | 9 +++++++++
2 files changed, 23 insertions(+), 1 deletions(-)
---
diff --git a/t/GtkIconView.t b/t/GtkIconView.t
index b5bc78d..fef497f 100644
--- a/t/GtkIconView.t
+++ b/t/GtkIconView.t
@@ -14,7 +14,7 @@
use strict;
use warnings;
-use Gtk2::TestHelper tests => 56,
+use Gtk2::TestHelper tests => 57,
at_least_version => [2, 6, 0, "GtkIconView is new in 2.6"],
;
@@ -213,6 +213,19 @@ SKIP: {
}
SKIP: {
+ skip 'new 2.18 stuff', 1
+ unless Gtk2->CHECK_VERSION (2, 18, 0);
+
+ my $win = Gtk2::Window->new;
+ my $model = create_store ();
+ fill_store ($model, get_pixbufs ($win));
+ my $iview = Gtk2::IconView->new_with_model ($model);
+
+ $iview->set_item_padding(2);
+ is ($iview->get_item_padding, 2, '[gs]et_icon_padding');
+}
+
+SKIP: {
skip 'query-tooltip is hard to test automatically', 5;
my $win = Gtk2::Window->new;
diff --git a/xs/GtkIconView.xs b/xs/GtkIconView.xs
index 55ee84f..4c4c231 100644
--- a/xs/GtkIconView.xs
+++ b/xs/GtkIconView.xs
@@ -309,3 +309,12 @@ void gtk_icon_view_set_tooltip_column (GtkIconView *icon_view, gint column);
gint gtk_icon_view_get_tooltip_column (GtkIconView *icon_view);
#endif
+
+#if GTK_CHECK_VERSION (2, 18, 0)
+
+void gtk_icon_view_set_item_padding (GtkIconView *icon_view, gint item_padding);
+
+gint gtk_icon_view_get_item_padding (GtkIconView *icon_view);
+
+#endif
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]