+// ----------------------------------------------------------------------------
+// GTK+ signal handler
+// ----------------------------------------------------------------------------
+
+#if defined( __WXGTK20__ ) && GTK_CHECK_VERSION(2,12,0)
+extern "C" {
+static
+gboolean statusbar_query_tooltip(GtkWidget *widget,
+ gint x,
+ gint y,
+ gboolean keyboard_mode,
+ GtkTooltip *tooltip,
+ wxStatusBar* statbar)
+{
+ int n = statbar->GetFieldFromPoint(wxPoint(x,y));
+ if (n == wxNOT_FOUND)
+ return FALSE;
+
+ // should we show the tooltip for the n-th pane of the statusbar?
+ if (!statbar->GetField(n).IsEllipsized())
+ return FALSE; // no, it's not useful
+
+ gtk_tooltip_set_text(tooltip, wxGTK_CONV_SYS(statbar->GetStatusText(n)));
+ return TRUE;
+}
+}
+#endif