diff options
author | Stephen Fisher <steve@stephen-fisher.com> | 2011-02-12 00:27:47 +0000 |
---|---|---|
committer | Stephen Fisher <steve@stephen-fisher.com> | 2011-02-12 00:27:47 +0000 |
commit | a29a04f112a42e9c4997595e396755fc7b9ef34a (patch) | |
tree | 1467a014bf653a2a35f398b5f2d48bc9effbba85 /gtk | |
parent | e13389a2b745466f8cf4797ba83989d41cdecad2 (diff) | |
download | wireshark-a29a04f112a42e9c4997595e396755fc7b9ef34a.tar.gz |
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')
-rw-r--r-- | gtk/capture_file_dlg.c | 10 | ||||
-rw-r--r-- | gtk/capture_info_dlg.c | 6 |
2 files changed, 16 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); diff --git a/gtk/capture_info_dlg.c b/gtk/capture_info_dlg.c index 299d448026..39a7569d58 100644 --- a/gtk/capture_info_dlg.c +++ b/gtk/capture_info_dlg.c @@ -128,9 +128,11 @@ capture_options *capture_opts) gchar *cap_w_title; gchar *title_iface; gchar *descr; +#if !GTK_CHECK_VERSION(2,14,0) GtkTooltips *tooltips; tooltips = gtk_tooltips_new (); +#endif info = g_malloc0(sizeof(capture_info_ui_t)); info->counts[0].title = "Total"; @@ -272,7 +274,11 @@ capture_options *capture_opts) g_signal_connect(info->cap_w, "delete_event", G_CALLBACK(capture_info_delete_cb), capture_opts); ci_help = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_HELP); +#if GTK_CHECK_VERSION(2,14,0) + gtk_widget_set_tooltip_text(ci_help, "Get help about this dialog"); +#else gtk_tooltips_set_tip (tooltips, ci_help, ("Get help about this dialog"), NULL); +#endif g_signal_connect(ci_help, "clicked", G_CALLBACK(topic_cb), (gpointer)HELP_CAPTURE_INFO_DIALOG); gtk_widget_show(info->cap_w); |