perl-Gtk2 r2111 - in trunk: . t xs
- From: tsch svn gnome org
- To: svn-commits-list gnome org
- Subject: perl-Gtk2 r2111 - in trunk: . t xs
- Date: Tue, 13 Jan 2009 21:03:48 +0000 (UTC)
Author: tsch
Date: Tue Jan 13 21:03:48 2009
New Revision: 2111
URL: http://svn.gnome.org/viewvc/perl-Gtk2?rev=2111&view=rev
Log:
Wrap new GtkStatusIcon API. Patch by Chris Sincock.
Modified:
trunk/AUTHORS
trunk/ChangeLog
trunk/t/GtkStatusIcon.t
trunk/xs/GtkStatusIcon.xs
Modified: trunk/AUTHORS
==============================================================================
--- trunk/AUTHORS (original)
+++ trunk/AUTHORS Tue Jan 13 21:03:48 2009
@@ -33,6 +33,7 @@
Philipp Rumpf prumpf at gmail dot com
Kevin Ryde user42 zip com au
Emmanuel Rodriguez emmanuel rodriguez gmail com
+Chris Sincock csincock gmail com
several important bits of gtk2-perl were heavily inspired by pygtk, gtk-perl,
and a good read-through of the gtk+ source code, so credit goes to those guys
Modified: trunk/t/GtkStatusIcon.t
==============================================================================
--- trunk/t/GtkStatusIcon.t (original)
+++ trunk/t/GtkStatusIcon.t Tue Jan 13 21:03:48 2009
@@ -4,7 +4,7 @@
use strict;
use warnings;
use Gtk2::TestHelper
- tests => 30,
+ tests => 36,
at_least_version => [2, 10, 0, "Gtk2::StatusIcon is new in 2.10"];
# $Id$
@@ -134,6 +134,34 @@
ok (defined $icon -> get_x11_window_id());
}
+# --------------------------------------------------------------------------- #
+
+SKIP: {
+ skip 'new 2.16 stuff', 6
+ unless Gtk2->CHECK_VERSION(2, 15, 0); # FIXME: 2.16
+
+ $icon->set_has_tooltip(TRUE);
+ is ($icon->get_has_tooltip(), TRUE);
+
+ $icon->set_has_tooltip(FALSE);
+ is ($icon->get_has_tooltip(), FALSE);
+
+ $icon->set_tooltip_markup("<b>TEST1</b>");
+ is ($icon->get_tooltip_markup(), "<b>TEST1</b>");
+
+ $icon->set_tooltip_markup(undef);
+ is ($icon->get_tooltip_markup(), undef);
+
+ $icon->set_tooltip_text("TEST2");
+ is ($icon->get_tooltip_text(), "TEST2");
+
+ $icon->set_tooltip_text(undef);
+ is ($icon->get_tooltip_text(), undef);
+
+
+}
+
+
__END__
Copyright (C) 2006 by the gtk2-perl team (see the file AUTHORS for the
Modified: trunk/xs/GtkStatusIcon.xs
==============================================================================
--- trunk/xs/GtkStatusIcon.xs (original)
+++ trunk/xs/GtkStatusIcon.xs Tue Jan 13 21:03:48 2009
@@ -133,3 +133,23 @@
guint32 gtk_status_icon_get_x11_window_id (GtkStatusIcon *status_icon);
#endif /* 2.14 */
+
+#if GTK_CHECK_VERSION (2, 15, 0) /* FIXME: 2.16 */
+
+void gtk_status_icon_set_has_tooltip (GtkStatusIcon *status_icon, gboolean has_tooltip);
+
+gboolean gtk_status_icon_get_has_tooltip (GtkStatusIcon *status_icon);
+
+gchar_own_ornull *gtk_status_icon_get_tooltip_markup (GtkStatusIcon *status_icon);
+
+gchar_own_ornull *gtk_status_icon_get_tooltip_text (GtkStatusIcon *status_icon);
+
+#Unlike the corresponding methods in GtkWidget, these setters use plain char instead of gchar.
+#However I expect that is an error or oversight and the char and gchar types are supposedly
+#equivalent anyway. Also using gchar lets me use the _ornull.
+
+void gtk_status_icon_set_tooltip_text (GtkStatusIcon *status_icon, const gchar_ornull *text);
+
+void gtk_status_icon_set_tooltip_markup (GtkStatusIcon *status_icon, const gchar_ornull *markup);
+
+#endif /* 2.16 */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]