[perl-Gtk2] Wrap missing 2.16 API for GtkEntry
- From: Torsten Schönfeld <tsch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [perl-Gtk2] Wrap missing 2.16 API for GtkEntry
- Date: Sat, 24 Apr 2010 21:08:21 +0000 (UTC)
commit 6de4aca061f184a057876da5e71c05906a1dd287
Author: Torsten Schönfeld <kaffeetisch gmx de>
Date: Fri Apr 23 11:27:02 2010 +0100
Wrap missing 2.16 API for GtkEntry
Specifically, wrap gtk_entry_set_icon_drag_source and
gtk_entry_get_current_icon_drag_source.
Original patch by Emmanuele Bassi.
https://bugzilla.gnome.org/show_bug.cgi?id=616634
t/GtkEntry.t | 11 +++++++++--
xs/GtkEntry.xs | 3 +++
2 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/t/GtkEntry.t b/t/GtkEntry.t
index ea0856e..d6fc564 100644
--- a/t/GtkEntry.t
+++ b/t/GtkEntry.t
@@ -1,6 +1,6 @@
#!/usr/bin/perl -w
use strict;
-use Gtk2::TestHelper tests => 61;
+use Gtk2::TestHelper tests => 63;
# $Id$
@@ -100,7 +100,7 @@ SKIP: {
}
SKIP: {
- skip '2.16 stuff', 38
+ skip '2.16 stuff', 40
unless Gtk2->CHECK_VERSION(2, 16, 0);
## progress methods
@@ -199,6 +199,13 @@ sub test_icon_methods {
$entry -> set_icon_tooltip_text($icon_pos, "Text tooltip");
$entry -> set_icon_tooltip_text($icon_pos, undef);
+
+
+ $entry -> set_icon_drag_source(
+ $icon_pos,
+ Gtk2::TargetList->new({target => 'TEXT', flags => 'same-app', info => 23 }),
+ 'move');
+ ok(defined $entry -> get_current_icon_drag_source());
}
__END__
diff --git a/xs/GtkEntry.xs b/xs/GtkEntry.xs
index 6e28bb8..ee2a322 100644
--- a/xs/GtkEntry.xs
+++ b/xs/GtkEntry.xs
@@ -277,6 +277,9 @@ void gtk_entry_set_progress_pulse_step (GtkEntry *entry, gdouble fraction);
void gtk_entry_unset_invisible_char (GtkEntry *entry);
+void gtk_entry_set_icon_drag_source (GtkEntry *entry, GtkEntryIconPosition icon_pos, GtkTargetList *target_list, GdkDragAction actions);
+
+gint gtk_entry_get_current_icon_drag_source (GtkEntry *entry);
#endif /* 2.16 */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]