forked from osmocom/wireshark
Traditional GtkTooltips deprecated at GTK+ 2.14 (and removed in 3.0), so
use the new functions when available. svn path=/trunk/; revision=35926
This commit is contained in:
parent
e13389a2b7
commit
a29a04f112
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue