aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/capture_file_dlg.c
diff options
context:
space:
mode:
authorStephen Fisher <steve@stephen-fisher.com>2011-02-12 00:27:47 +0000
committerStephen Fisher <steve@stephen-fisher.com>2011-02-12 00:27:47 +0000
commita29a04f112a42e9c4997595e396755fc7b9ef34a (patch)
tree1467a014bf653a2a35f398b5f2d48bc9effbba85 /gtk/capture_file_dlg.c
parente13389a2b745466f8cf4797ba83989d41cdecad2 (diff)
Traditional GtkTooltips deprecated at GTK+ 2.14 (and removed in 3.0), so
use the new functions when available. svn path=/trunk/; revision=35926
Diffstat (limited to 'gtk/capture_file_dlg.c')
-rw-r--r--gtk/capture_file_dlg.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gtk/capture_file_dlg.c b/gtk/capture_file_dlg.c
index 14151681f4..85b693cee2 100644
--- a/gtk/capture_file_dlg.c
+++ b/gtk/capture_file_dlg.c
@@ -456,7 +456,9 @@ file_open_cmd(GtkWidget *w)
#else /* _WIN32 */
GtkWidget *main_hb, *main_vb, *filter_hbox, *filter_bt, *filter_te,
*m_resolv_cb, *n_resolv_cb, *t_resolv_cb, *prev;
+#if !GTK_CHECK_VERSION(2,14,0)
GtkTooltips *tooltips = gtk_tooltips_new();
+#endif
/* No Apply button, and "OK" just sets our text widget, it doesn't
activate it (i.e., it doesn't cause us to try to open the file). */
static construct_args_t args = {
@@ -522,8 +524,12 @@ file_open_cmd(GtkWidget *w)
G_CALLBACK(filter_button_destroy_cb), NULL);
gtk_box_pack_start(GTK_BOX(filter_hbox), filter_bt, FALSE, TRUE, 0);
gtk_widget_show(filter_bt);
+#if GTK_CHECK_VERSION(2,14,0)
+ gtk_widget_set_tooltip_text(filter_bt, "Open the \"Display Filter\" dialog, to edit/apply filters");
+#else
gtk_tooltips_set_tip(tooltips, filter_bt,
"Open the \"Display Filter\" dialog, to edit/apply filters", NULL);
+#endif
filter_te = gtk_entry_new();
g_object_set_data(G_OBJECT(filter_bt), E_FILT_TE_PTR_KEY, filter_te);
@@ -535,7 +541,11 @@ file_open_cmd(GtkWidget *w)
g_signal_connect(file_open_w, "key-press-event", G_CALLBACK (filter_parent_dlg_key_pressed_cb), NULL);
colorize_filter_te_as_empty(filter_te);
gtk_widget_show(filter_te);
+#if GTK_CHECK_VERSION(2,14,0)
+ gtk_widget_set_tooltip_text(filter_te, "Enter a display filter.");
+#else
gtk_tooltips_set_tip(tooltips, filter_te, "Enter a display filter.", NULL);
+#endif
g_object_set_data(G_OBJECT(file_open_w), E_RFILTER_TE_KEY, filter_te);