>From 00c86ef2d95cdfdb7ccf72188474752462ad9ee1 Mon Sep 17 00:00:00 2001 From: Quentin Sculo Date: Tue, 13 Apr 2010 19:24:00 +0200 Subject: [PATCH 08/16] wrap 3 uri-related GtkLabel functions added in gtk+-2.18 --- t/GtkLabel.t | 13 ++++++++++++- xs/GtkLabel.xs | 11 +++++++++++ 2 files changed, 23 insertions(+), 1 deletions(-) diff --git a/t/GtkLabel.t b/t/GtkLabel.t index 498bdc9..9b4d309 100644 --- a/t/GtkLabel.t +++ b/t/GtkLabel.t @@ -12,7 +12,7 @@ ######################### -use Gtk2::TestHelper tests => 30; +use Gtk2::TestHelper tests => 32; my $win = Gtk2::Window->new; @@ -104,6 +104,17 @@ SKIP: { is ($label->get_line_wrap_mode, 'word'); } +SKIP: { + skip 'new 2.18 stuff', 2 + unless Gtk2->CHECK_VERSION (2, 18, 0); + + $label->set_markup('uri test'); + is ($label->get_current_uri,"http://example.com/uri",'get_current_uri'); + + $label->set_track_visited_links(FALSE); + is ($label->get_track_visited_links, FALSE, '[sg]et_track_visited_links'); +} + 1; __END__ diff --git a/xs/GtkLabel.xs b/xs/GtkLabel.xs index f6d40f3..d15dbc4 100644 --- a/xs/GtkLabel.xs +++ b/xs/GtkLabel.xs @@ -216,3 +216,14 @@ void gtk_label_set_line_wrap_mode (GtkLabel *label, PangoWrapMode wrap_mode); PangoWrapMode gtk_label_get_line_wrap_mode (GtkLabel *label); #endif + +#if GTK_CHECK_VERSION (2, 18, 0) + +const gchar * gtk_label_get_current_uri (GtkLabel *label) + +void gtk_label_set_track_visited_links (GtkLabel *label, gboolean track_links) + +gboolean gtk_label_get_track_visited_links (GtkLabel *label) + +#endif + -- 1.6.4.4