Fix more tooltips, mark gtk_tooltips_new with 'E' in checkapi.

svn path=/trunk/; revision=37976
This commit is contained in:
Anders Broman 2011-07-11 20:01:28 +00:00
parent 3a35b7229c
commit 1f923105f8
4 changed files with 25 additions and 35 deletions

View File

@ -62,7 +62,6 @@ static GtkWidget *fs_w;
static int row;
static GtkWidget *fs_tb;
static GtkWidget *fs_sw;
static GtkTooltips *tooltips;
static GtkWidget *fs_dir_lb;
static GtkWidget *fs_first_rb;
static GtkWidget *fs_tb_vb;
@ -186,7 +185,7 @@ fileset_dlg_add_file(fileset_entry *entry) {
if(entry->current) {
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (fs_rb), entry->current);
}
gtk_tooltips_set_tip(tooltips, fs_rb, "Open this capture file", NULL);
gtk_widget_set_tooltip_text(fs_rb, "Open this capture file");
gtk_table_attach_defaults(GTK_TABLE(fs_tb), fs_rb, 0, 1, row, row+1);
g_signal_connect(fs_rb, "toggled", G_CALLBACK(fs_rb_cb), entry);
gtk_widget_show(fs_rb);
@ -291,8 +290,6 @@ fileset_cb(GtkWidget *w _U_, gpointer d _U_)
fs_w = dlg_window_new(""); /* transient_for top_level */
gtk_window_set_destroy_with_parent (GTK_WINDOW(fs_w), TRUE);
tooltips = gtk_tooltips_new();
main_vb = gtk_vbox_new(FALSE, 5);
gtk_container_set_border_width(GTK_CONTAINER(main_vb), 5);
gtk_container_add(GTK_CONTAINER(fs_w), main_vb);
@ -316,7 +313,7 @@ fileset_cb(GtkWidget *w _U_, gpointer d _U_)
close_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE);
window_set_cancel_button(fs_w, close_bt, window_cancel_button_cb);
gtk_tooltips_set_tip(tooltips, close_bt, "Close this window.", NULL);
gtk_widget_set_tooltip_text(close_bt, "Close this window.");
help_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_HELP);
g_signal_connect(help_bt, "clicked", G_CALLBACK(topic_cb), (gpointer)HELP_FILESET_DIALOG);

View File

@ -369,7 +369,6 @@ filter_dialog_new(GtkWidget *button, GtkWidget *parent_filter_te,
*edit_fr,
*props_fr;
GdkWindow *parent;
GtkTooltips *tooltips;
static filter_list_type_t cfilter_list_type = CFILTER_EDITED_LIST;
static filter_list_type_t dfilter_list_type = DFILTER_EDITED_LIST;
filter_list_type_t *filter_list_type_p;
@ -408,8 +407,6 @@ filter_dialog_new(GtkWidget *button, GtkWidget *parent_filter_te,
break;
}
tooltips = gtk_tooltips_new ();
main_w = dlg_conf_window_new(construct_args->title);
gtk_window_set_default_size(GTK_WINDOW(main_w), 400, 400);
g_object_set_data(G_OBJECT(main_w), E_FILT_CONSTRUCT_ARGS_KEY, construct_args);
@ -447,8 +444,7 @@ filter_dialog_new(GtkWidget *button, GtkWidget *parent_filter_te,
g_signal_connect(new_bt, "clicked", G_CALLBACK(filter_new_bt_clicked_cb), filter_list_type_p);
gtk_widget_show(new_bt);
gtk_box_pack_start (GTK_BOX (list_bb), new_bt, FALSE, FALSE, 0);
gtk_tooltips_set_tip (tooltips, new_bt,
"Create a new filter at the end of the list (with the current properties)", NULL);
gtk_widget_set_tooltip_text(new_bt, "Create a new filter at the end of the list (with the current properties)");
del_bt = gtk_button_new_from_stock(GTK_STOCK_DELETE);
gtk_widget_set_sensitive(del_bt, FALSE);
@ -456,7 +452,7 @@ filter_dialog_new(GtkWidget *button, GtkWidget *parent_filter_te,
g_object_set_data(G_OBJECT(main_w), E_FILT_DEL_BT_KEY, del_bt);
gtk_widget_show(del_bt);
gtk_box_pack_start (GTK_BOX (list_bb), del_bt, FALSE, FALSE, 0);
gtk_tooltips_set_tip (tooltips, del_bt, ("Delete the selected filter"), NULL);
gtk_widget_set_tooltip_text(del_bt, "Delete the selected filter");
filter_fr = gtk_frame_new(list_name);
gtk_box_pack_start(GTK_BOX(top_hb), filter_fr, TRUE, TRUE, 0);
@ -549,11 +545,10 @@ filter_dialog_new(GtkWidget *button, GtkWidget *parent_filter_te,
g_object_set_data(G_OBJECT(main_w), E_FILT_PARENT_FILTER_TE_KEY, parent_filter_te);
if (list_type == DFILTER_EDITED_LIST) {
gtk_tooltips_set_tip(tooltips, filter_te,
gtk_widget_set_tooltip_text(filter_te,
"Enter a display filter. "
"The background color of this field is changed by a continuous syntax check"
" (green is valid, red is invalid, yellow may have unexpected results).",
NULL);
" (green is valid, red is invalid, yellow may have unexpected results).");
/* Create the "Add Expression..." button, to pop up a dialog
for constructing filter comparison expressions. */
@ -561,7 +556,7 @@ filter_dialog_new(GtkWidget *button, GtkWidget *parent_filter_te,
g_signal_connect(add_expression_bt, "clicked", G_CALLBACK(filter_add_expr_bt_cb), main_w);
gtk_box_pack_start(GTK_BOX(bottom_hb), add_expression_bt, FALSE, FALSE, 0);
gtk_widget_show(add_expression_bt);
gtk_tooltips_set_tip (tooltips, add_expression_bt, ("Add an expression to the filter string"), NULL);
gtk_widget_set_tooltip_text(add_expression_bt, "Add an expression to the filter string");
}
@ -572,7 +567,7 @@ filter_dialog_new(GtkWidget *button, GtkWidget *parent_filter_te,
ok_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_OK);
g_signal_connect(ok_bt, "clicked", G_CALLBACK(filter_dlg_ok_cb), filter_list_type_p);
gtk_tooltips_set_tip (tooltips, ok_bt, ("Apply the filters and close this dialog"), NULL);
gtk_widget_set_tooltip_text(ok_bt, "Apply the filters and close this dialog");
/* Catch the "activate" signal on the filter name and filter
expression text entries, so that if the user types Return
@ -586,14 +581,14 @@ filter_dialog_new(GtkWidget *button, GtkWidget *parent_filter_te,
apply_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_APPLY);
g_signal_connect(apply_bt, "clicked", G_CALLBACK(filter_dlg_apply_cb), filter_list_type_p);
gtk_tooltips_set_tip (tooltips, apply_bt, ("Apply the filters and keep this dialog open"), NULL);
gtk_widget_set_tooltip_text(apply_bt, "Apply the filters and keep this dialog open");
save_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_SAVE);
g_signal_connect(save_bt, "clicked", G_CALLBACK(filter_dlg_save_cb), filter_list_type_p);
gtk_tooltips_set_tip (tooltips, save_bt, ("Save the filters permanently and keep this dialog open"), NULL);
gtk_widget_set_tooltip_text(save_bt, "Save the filters permanently and keep this dialog open");
cancel_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CANCEL);
gtk_tooltips_set_tip (tooltips, cancel_bt, ("Cancel the changes"), NULL);
gtk_widget_set_tooltip_text(cancel_bt, "Cancel the changes");
g_signal_connect(cancel_bt, "clicked", G_CALLBACK(filter_dlg_cancel_cb), filter_list_type_p);
window_set_cancel_button(main_w, cancel_bt, NULL);
@ -603,7 +598,7 @@ filter_dialog_new(GtkWidget *button, GtkWidget *parent_filter_te,
} else {
g_signal_connect(help_bt, "clicked", G_CALLBACK(topic_cb), (gpointer)HELP_DISPLAY_FILTERS_DIALOG);
}
gtk_tooltips_set_tip (tooltips, help_bt, ("Show topic specific help"), NULL);
gtk_widget_set_tooltip_text(help_bt, "Show topic specific help");
if(ok_bt) {
gtk_widget_grab_default(ok_bt);

View File

@ -126,7 +126,6 @@ find_frame_cb(GtkWidget *w _U_, gpointer d _U_)
*case_cb, *combo_lb, *combo_cb,
*bbox, *ok_bt, *cancel_bt, *help_bt;
GtkTooltips *tooltips;
/* No Apply button, but "OK" not only sets our text widget, it
@ -145,7 +144,6 @@ find_frame_cb(GtkWidget *w _U_, gpointer d _U_)
}
find_frame_w = dlg_window_new("Wireshark: Find Packet");
tooltips = gtk_tooltips_new ();
/* Container for each row of widgets */
main_vb = gtk_vbox_new(FALSE, 3);
@ -183,21 +181,21 @@ find_frame_cb(GtkWidget *w _U_, gpointer d _U_)
filter_rb = gtk_radio_button_new_with_mnemonic_from_widget(NULL, "_Display filter");
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(filter_rb), !cfile.hex && !cfile.string);
gtk_box_pack_start(GTK_BOX(find_type_hb), filter_rb, FALSE, FALSE, 0);
gtk_tooltips_set_tip (tooltips, filter_rb, ("Search for data by display filter syntax.\ne.g. ip.addr==10.1.1.1"), NULL);
gtk_widget_set_tooltip_text(filter_rb, "Search for data by display filter syntax.\ne.g. ip.addr==10.1.1.1");
gtk_widget_show(filter_rb);
/* Hex */
hex_rb = gtk_radio_button_new_with_mnemonic_from_widget(GTK_RADIO_BUTTON(filter_rb), "_Hex value");
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(hex_rb), cfile.hex);
gtk_box_pack_start(GTK_BOX(find_type_hb), hex_rb, FALSE, FALSE, 0);
gtk_tooltips_set_tip (tooltips, hex_rb, ("Search for data by hex string.\ne.g. fffffda5"), NULL);
gtk_widget_set_tooltip_text(hex_rb, "Search for data by hex string.\ne.g. fffffda5");
gtk_widget_show(hex_rb);
/* ASCII Search */
string_rb = gtk_radio_button_new_with_mnemonic_from_widget(GTK_RADIO_BUTTON(filter_rb), "_String");
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(string_rb), cfile.string);
gtk_box_pack_start(GTK_BOX(find_type_hb), string_rb, FALSE, FALSE, 0);
gtk_tooltips_set_tip (tooltips, string_rb, ("Search for data by string value.\ne.g. My String"), NULL);
gtk_widget_set_tooltip_text(string_rb, "Search for data by string value.\ne.g. My String");
gtk_widget_show(string_rb);
/* Filter row */
@ -210,7 +208,7 @@ find_frame_cb(GtkWidget *w _U_, gpointer d _U_)
g_signal_connect(filter_bt, "destroy", G_CALLBACK(filter_button_destroy_cb), NULL);
g_object_set_data(G_OBJECT(filter_bt), E_FILT_TE_BUTTON_KEY, filter_bt);
gtk_box_pack_start(GTK_BOX(filter_hb), filter_bt, FALSE, TRUE, 0);
gtk_tooltips_set_tip (tooltips, filter_bt, ("Click on the filter button to select a display filter,\nor enter your search criteria into the text box"), NULL);
gtk_widget_set_tooltip_text(filter_bt, "Click on the filter button to select a display filter,\nor enter your search criteria into the text box");
gtk_widget_show(filter_bt);
filter_text_box = gtk_entry_new();
@ -246,21 +244,21 @@ find_frame_cb(GtkWidget *w _U_, gpointer d _U_)
summary_data_rb = gtk_radio_button_new_with_mnemonic_from_widget(NULL, "Packet list");
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(summary_data_rb), summary_data);
gtk_box_pack_start(GTK_BOX(data_vb), summary_data_rb, TRUE, TRUE, 0);
gtk_tooltips_set_tip (tooltips, summary_data_rb, ("Search for string in the Info column of the packet summary (summary pane)"), NULL);
gtk_widget_set_tooltip_text(summary_data_rb, "Search for string in the Info column of the packet summary (summary pane)");
gtk_widget_show(summary_data_rb);
/* Packet details */
decode_data_rb = gtk_radio_button_new_with_mnemonic_from_widget(GTK_RADIO_BUTTON(summary_data_rb), "Packet details");
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(decode_data_rb), decode_data);
gtk_box_pack_start(GTK_BOX(data_vb), decode_data_rb, TRUE, TRUE, 0);
gtk_tooltips_set_tip (tooltips, decode_data_rb, ("Search for string among the decoded packet display labels (tree view pane)"), NULL);
gtk_widget_set_tooltip_text(decode_data_rb, "Search for string among the decoded packet display labels (tree view pane)");
gtk_widget_show(decode_data_rb);
/* Packet bytes */
packet_data_rb = gtk_radio_button_new_with_mnemonic_from_widget(GTK_RADIO_BUTTON(summary_data_rb), "Packet bytes");
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(packet_data_rb), packet_data);
gtk_box_pack_start(GTK_BOX(data_vb), packet_data_rb, TRUE, TRUE, 0);
gtk_tooltips_set_tip (tooltips, packet_data_rb, ("Search for string in the ASCII-converted packet data (hex view pane)"), NULL);
gtk_widget_set_tooltip_text(packet_data_rb, "Search for string in the ASCII-converted packet data (hex view pane)");
gtk_widget_show(packet_data_rb);
/* string options frame */
@ -276,7 +274,7 @@ find_frame_cb(GtkWidget *w _U_, gpointer d _U_)
case_cb = gtk_check_button_new_with_mnemonic("Case sensitive");
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(case_cb), !case_type);
gtk_container_add(GTK_CONTAINER(string_opt_vb), case_cb);
gtk_tooltips_set_tip (tooltips, case_cb, ("Search by mixed upper/lower case?"), NULL);
gtk_widget_set_tooltip_text(case_cb, "Search by mixed upper/lower case?");
gtk_widget_show(case_cb);
combo_lb = gtk_label_new("Character set:");

View File

@ -890,10 +890,10 @@ my %deprecatedGtkFunctions = (
'gtk_tooltips_enable', 'E',
'gtk_tooltips_force_window', 'E',
'gtk_tooltips_get_info_from_tip_window', 'E',
'gtk_tooltips_new', 'W',
'gtk_tooltips_new', 'E',
'gtk_tooltips_set_delay', 'E',
'gtk_tooltips_set_tip', 'W',
'gtk_tool_item_set_tooltip', 'W', # gtk_tool_item_set_tooltip_text() (avail since 2.12)
'gtk_tooltips_set_tip', 'E',
'gtk_tool_item_set_tooltip', 'E', # gtk_tool_item_set_tooltip_text() (avail since 2.12)
##
## Deprecated as of GTK+ 2.16 but to be replaced only when Wireshark requires GTK+ 2.16 or later
## (or: use conditional code based upon the GTK version).
@ -914,7 +914,7 @@ my %deprecatedGtkFunctions = (
'GTK_WIDGET_APP_PAINTABLE', 'E', # gtk_widget_get_app_paintable() (avail since 2.18)
'GTK_WIDGET_CAN_DEFAULT', 'E', # gtk_widget_getcan_default() (avail since 2.18)
'GTK_WIDGET_CAN_FOCUS', 'E', # gtk_widget_getcan_focus() (avail since 2.18)
'GTK_WIDGET_COMPOSITE_CHILD', 'E', # gtk_widget_getcomposite_child() (avail since 2.18)
'GTK_WIDGET_COMPOSITE_CHILD', 'E', # gtk_widget_getcomposite_child() (avail since 2.18)
'GTK_WIDGET_DOUBLE_BUFFERED', 'E', # gtk_widget_getdouble_buffered() (avail since 2.18)
'GTK_WIDGET_DRAWABLE', 'E', # gtk_widget_getdrawable() (avail since 2.18)
'GTK_WIDGET_FLAGS', 'E', # gtk_widget_getflags() (avail since 2.18)
@ -945,7 +945,7 @@ my %deprecatedGtkFunctions = (
'gtk_item_toggle', 'E', #
'gtk_recent_manager_get_limit', 'E', # Use GtkRecentChooser
'gtk_recent_manager_set_limit', 'E', #
##
## Deprecated as of GTK+ 2.24 but to be replaced only when Wireshark requires GTK+ 2.24 or later
## (or: use conditional code based upon the GTK version).
'gtk_combo_box_new_text', 'W', # gtk_combo_box_text_new()