aboutsummaryrefslogtreecommitdiffstats
path: root/src/xterm.h
diff options
context:
space:
mode:
authorJan Djärv2010-08-02 14:50:03 +0200
committerJan Djärv2010-08-02 14:50:03 +0200
commitac01763ed233b649f0daffc08b4f6e3b16d8876a (patch)
treec3c8ac641e1d39741e55a4b4131e501b719b2fb4 /src/xterm.h
parent3311d1c27f57fcc757b5c4f2c9c814008f6cb003 (diff)
downloademacs-ac01763ed233b649f0daffc08b4f6e3b16d8876a.tar.gz
emacs-ac01763ed233b649f0daffc08b4f6e3b16d8876a.zip
Don't use Gtk+ tooltip unless Gtk+ version => 2.14.
* gtkutil.c (hierarchy_ch_cb, qttip_cb): Do not define unless USE_GTK_TOOLTIP. (xg_prepare_tooltip): Return 0 unless USE_GTK_TOOLTIP (xg_show_tooltip, xg_hide_tooltip): Do nothing unless USE_GTK_TOOLTIP. (xg_create_frame_widgets): Surrond tooltip-related code with ifdef USE_GTK_TOOLTIP. (xg_free_frame_widgets): Don't delete ttip_* unless USE_GTK_TOOLTIP. * xterm.h (USE_GTK_TOOLTIP): New define. (struct x_output): Put ttip_* inside ifdef USE_GTK_TOOLTIP.
Diffstat (limited to 'src/xterm.h')
-rw-r--r--src/xterm.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/xterm.h b/src/xterm.h
index 1674cdbac68..278c6b13cf1 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -51,6 +51,10 @@ typedef GtkWidget *xt_or_gtk_widget;
51#define XSync(d, b) do { gdk_window_process_all_updates (); \ 51#define XSync(d, b) do { gdk_window_process_all_updates (); \
52 XSync (d, b); } while (0) 52 XSync (d, b); } while (0)
53 53
54/* The GtkTooltip API came in 2.12, but gtk-enable-tooltips in 2.14. */
55#if GTK_MAJOR_VERSION > 2 || GTK_MINOR_VERSION > 13
56#define USE_GTK_TOOLTIP
57#endif
54 58
55#endif /* USE_GTK */ 59#endif /* USE_GTK */
56 60
@@ -503,10 +507,13 @@ struct x_output
503 GdkGeometry size_hints; 507 GdkGeometry size_hints;
504 long hint_flags; 508 long hint_flags;
505 509
510#ifdef USE_GTK_TOOLTIP
506 GtkTooltip *ttip_widget; 511 GtkTooltip *ttip_widget;
507 GtkWidget *ttip_lbl; 512 GtkWidget *ttip_lbl;
508 GtkWindow *ttip_window; 513 GtkWindow *ttip_window;
509#endif 514#endif /* USE_GTK_TOOLTIP */
515
516#endif /* USE_GTK */
510 517
511 /* If >=0, a bitmap index. The indicated bitmap is used for the 518 /* If >=0, a bitmap index. The indicated bitmap is used for the
512 icon. */ 519 icon. */