Updating branch refs/heads/master to 7cb16405f82e5466a6864a788f30b055178c798f (commit) from 3b2d95c0e43f310cc16b7560d0695367e3857a2b (commit)
commit 7cb16405f82e5466a6864a788f30b055178c798f Author: Christian Dywan <christ...@twotoasts.de> Date: Wed Oct 26 20:04:39 2011 +0200 Commit missing file gtk3-compat.c The file was intended to be part of 52de7471. katze/gtk3-compat.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 files changed, 40 insertions(+), 0 deletions(-) diff --git a/katze/gtk3-compat.c b/katze/gtk3-compat.c new file mode 100644 index 0000000..cffff31 --- /dev/null +++ b/katze/gtk3-compat.c @@ -0,0 +1,40 @@ +#include "katze/gtk3-compat.h" + +#if !GTK_CHECK_VERSION (2, 12, 0) + +void +gtk_widget_set_has_tooltip (GtkWidget* widget, + gboolean has_tooltip) +{ + /* Do nothing */ +} + +void +gtk_widget_set_tooltip_text (GtkWidget* widget, + const gchar* text) +{ + if (text && *text) + { + static GtkTooltips* tooltips = NULL; + if (G_UNLIKELY (!tooltips)) + tooltips = gtk_tooltips_new (); + gtk_tooltips_set_tip (tooltips, widget, text, NULL); + } +} + +void +gtk_tool_item_set_tooltip_text (GtkToolItem* toolitem, + const gchar* text) +{ + if (text && *text) + { + static GtkTooltips* tooltips = NULL; + if (G_UNLIKELY (!tooltips)) + tooltips = gtk_tooltips_new (); + + gtk_tool_item_set_tooltip (toolitem, tooltips, text, NULL); + } +} + +#endif + _______________________________________________ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits