[perl-Gtk2] Wrap 3 URI-related GtkLabel functions added in gtk+ 2.18



commit 7403034327d1bc2515f392d4eb570dcfbb6fd111
Author: Quentin Sculo <squentin free fr>
Date:   Tue Apr 13 19:24:00 2010 +0200

    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('<a href="http://example.com/uri";>uri test</a>');
+	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
+



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