parent
fb16948f96
commit
baf0396650
|
@ -219,10 +219,6 @@ welcome_button(const gchar *stock_item,
|
|||
{
|
||||
GtkWidget *eb, *w, *item_hb, *text_vb;
|
||||
gchar *formatted_text;
|
||||
GtkTooltips *tooltips;
|
||||
|
||||
|
||||
tooltips = gtk_tooltips_new();
|
||||
|
||||
item_hb = gtk_hbox_new(FALSE, 1);
|
||||
|
||||
|
@ -231,7 +227,7 @@ welcome_button(const gchar *stock_item,
|
|||
gtk_container_add(GTK_CONTAINER(eb), item_hb);
|
||||
gtk_widget_modify_bg(eb, GTK_STATE_NORMAL, &topic_item_idle_bg);
|
||||
if(tooltip != NULL) {
|
||||
gtk_tooltips_set_tip(tooltips, eb, tooltip, "");
|
||||
gtk_widget_set_tooltip_text(eb, tooltip);
|
||||
}
|
||||
|
||||
g_signal_connect(eb, "enter-notify-event", G_CALLBACK(welcome_item_enter_cb), NULL);
|
||||
|
@ -450,12 +446,8 @@ welcome_filename_link_new(const gchar *filename, GtkWidget **label)
|
|||
const glong max = 60;
|
||||
int err;
|
||||
ws_statb64 stat_buf;
|
||||
GtkTooltips *tooltips;
|
||||
|
||||
|
||||
tooltips = gtk_tooltips_new();
|
||||
|
||||
/* filename */
|
||||
/* filename */
|
||||
str = g_string_new(filename);
|
||||
uni_len = g_utf8_strlen(str->str, str->len);
|
||||
|
||||
|
@ -507,8 +499,8 @@ welcome_filename_link_new(const gchar *filename, GtkWidget **label)
|
|||
/* event box */
|
||||
eb = gtk_event_box_new();
|
||||
gtk_container_add(GTK_CONTAINER(eb), w);
|
||||
gtk_tooltips_set_tip(tooltips, eb, filename, "");
|
||||
if(err != 0) {
|
||||
gtk_widget_set_tooltip_text(eb, filename);
|
||||
if(err != 0) {
|
||||
gtk_widget_set_sensitive(w, FALSE);
|
||||
}
|
||||
|
||||
|
|
|
@ -325,8 +325,6 @@ col_details_edit_dlg (gint col_id, GtkTreeViewColumn *col)
|
|||
char custom_occurrence_str[8];
|
||||
gint cur_fmt, i;
|
||||
|
||||
GtkTooltips *tooltips = gtk_tooltips_new();
|
||||
|
||||
win = dlg_window_new("Wireshark: Edit Column Details");
|
||||
|
||||
gtk_window_set_resizable(GTK_WINDOW(win),FALSE);
|
||||
|
@ -344,19 +342,18 @@ col_details_edit_dlg (gint col_id, GtkTreeViewColumn *col)
|
|||
label = gtk_label_new(ep_strdup_printf("Title:"));
|
||||
gtk_table_attach_defaults(GTK_TABLE(main_tb), label, 0, 1, 0, 1);
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 1.0f, 0.5f);
|
||||
gtk_tooltips_set_tip (tooltips, label, "Packet list column title.", NULL);
|
||||
gtk_widget_set_tooltip_text(label, "Packet list column title.");
|
||||
|
||||
title_te = gtk_entry_new();
|
||||
gtk_table_attach_defaults(GTK_TABLE(main_tb), title_te, 1, 2, 0, 1);
|
||||
gtk_entry_set_text(GTK_ENTRY(title_te), unescaped_title);
|
||||
g_free(unescaped_title);
|
||||
gtk_tooltips_set_tip (tooltips, title_te, "Packet list column title.", NULL);
|
||||
gtk_widget_set_tooltip_text(title_te, "Packet list column title.");
|
||||
|
||||
label = gtk_label_new(ep_strdup_printf("Field type:"));
|
||||
gtk_table_attach_defaults(GTK_TABLE(main_tb), label, 0, 1, 1, 2);
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 1.0f, 0.5f);
|
||||
gtk_tooltips_set_tip (tooltips, label,
|
||||
"Select which packet information to present in the column.", NULL);
|
||||
gtk_widget_set_tooltip_text(label, "Select which packet information to present in the column.");
|
||||
|
||||
format_cmb = gtk_combo_box_new_text();
|
||||
for (i = 0; i < NUM_COL_FMTS; i++) {
|
||||
|
@ -364,38 +361,37 @@ col_details_edit_dlg (gint col_id, GtkTreeViewColumn *col)
|
|||
}
|
||||
g_signal_connect(format_cmb, "changed", G_CALLBACK(col_details_format_changed_cb), NULL);
|
||||
gtk_table_attach_defaults(GTK_TABLE(main_tb), format_cmb, 1, 2, 1, 2);
|
||||
gtk_tooltips_set_tip (tooltips, format_cmb,
|
||||
"Select which packet information to present in the column.", NULL);
|
||||
gtk_widget_set_tooltip_text(format_cmb, "Select which packet information to present in the column.");
|
||||
|
||||
field_lb = gtk_label_new(ep_strdup_printf("Field name:"));
|
||||
gtk_table_attach_defaults(GTK_TABLE(main_tb), field_lb, 0, 1, 2, 3);
|
||||
gtk_misc_set_alignment(GTK_MISC(field_lb), 1.0f, 0.5f);
|
||||
gtk_tooltips_set_tip (tooltips, field_lb,
|
||||
gtk_widget_set_tooltip_text(field_lb,
|
||||
"Field name used when field type is \"Custom\". "
|
||||
"This string has the same syntax as a display filter string.", NULL);
|
||||
"This string has the same syntax as a display filter string.");
|
||||
field_te = gtk_entry_new();
|
||||
gtk_table_attach_defaults(GTK_TABLE(main_tb), field_te, 1, 2, 2, 3);
|
||||
g_object_set_data (G_OBJECT(field_te), E_FILT_FIELD_NAME_ONLY_KEY, "");
|
||||
g_signal_connect(field_te, "changed", G_CALLBACK(filter_te_syntax_check_cb), NULL);
|
||||
g_signal_connect(field_te, "key-press-event", G_CALLBACK (filter_string_te_key_pressed_cb), NULL);
|
||||
g_signal_connect(win, "key-press-event", G_CALLBACK (filter_parent_dlg_key_pressed_cb), NULL);
|
||||
gtk_tooltips_set_tip (tooltips, field_te,
|
||||
gtk_widget_set_tooltip_text(field_te,
|
||||
"Field name used when field type is \"Custom\". "
|
||||
"This string has the same syntax as a display filter string.", NULL);
|
||||
"This string has the same syntax as a display filter string.");
|
||||
|
||||
occurrence_lb = gtk_label_new(ep_strdup_printf("Occurrence:"));
|
||||
gtk_table_attach_defaults(GTK_TABLE(main_tb), occurrence_lb, 0, 1, 3, 4);
|
||||
gtk_misc_set_alignment(GTK_MISC(occurrence_lb), 1.0f, 0.5f);
|
||||
gtk_tooltips_set_tip (tooltips, occurrence_lb,
|
||||
gtk_widget_set_tooltip_text (occurrence_lb,
|
||||
"Field occurence to use. "
|
||||
"0=all (default), 1=first, 2=second, ..., -1=last.", NULL);
|
||||
"0=all (default), 1=first, 2=second, ..., -1=last.");
|
||||
|
||||
occurrence_te = gtk_entry_new();
|
||||
gtk_entry_set_max_length (GTK_ENTRY(occurrence_te), 4);
|
||||
gtk_table_attach_defaults(GTK_TABLE(main_tb), occurrence_te, 1, 2, 3, 4);
|
||||
gtk_tooltips_set_tip (tooltips, occurrence_te,
|
||||
gtk_widget_set_tooltip_text (occurrence_te,
|
||||
"Field occurence to use. "
|
||||
"0=all (default), 1=first, 2=second, ..., -1=last.", NULL);
|
||||
"0=all (default), 1=first, 2=second, ..., -1=last.");
|
||||
|
||||
bbox = dlg_button_row_new(GTK_STOCK_CANCEL,GTK_STOCK_OK, NULL);
|
||||
gtk_box_pack_end(GTK_BOX(main_vb), bbox, FALSE, FALSE, 0);
|
||||
|
@ -731,7 +727,6 @@ create_view_and_model(void)
|
|||
header_field_info *hfi;
|
||||
gint col_min_width;
|
||||
gchar *escaped_title;
|
||||
GtkTooltips *tooltips = gtk_tooltips_new ();
|
||||
|
||||
packetlist = new_packet_list_new();
|
||||
|
||||
|
@ -836,7 +831,7 @@ create_view_and_model(void)
|
|||
/* XXX Breaks the GTK+ API, but this is the only way to attach a signal to
|
||||
* a GtkTreeView column header. See GTK bug #141937.
|
||||
*/
|
||||
gtk_tooltips_set_tip(tooltips, col->button, tooltip_text, NULL);
|
||||
gtk_widget_set_tooltip_text(col->button, tooltip_text);
|
||||
g_free(tooltip_text);
|
||||
g_signal_connect(col->button, "button_press_event",
|
||||
G_CALLBACK(new_packet_list_column_button_pressed_cb), col);
|
||||
|
|
|
@ -119,8 +119,6 @@ column_prefs_show(GtkWidget *prefs_window) {
|
|||
GtkTreeIter first_iter;
|
||||
gint first_row = TRUE;
|
||||
|
||||
GtkTooltips *tooltips = gtk_tooltips_new();
|
||||
|
||||
/* Container for each row of widgets */
|
||||
main_vb = gtk_vbox_new(FALSE, 5);
|
||||
gtk_container_set_border_width(GTK_CONTAINER(main_vb), 5);
|
||||
|
@ -150,8 +148,7 @@ column_prefs_show(GtkWidget *prefs_window) {
|
|||
gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(column_l), TRUE);
|
||||
gtk_tree_view_set_headers_clickable(GTK_TREE_VIEW(column_l), FALSE);
|
||||
gtk_tree_view_set_reorderable(GTK_TREE_VIEW(column_l), TRUE);
|
||||
gtk_tooltips_set_tip (tooltips, column_l,
|
||||
"Click on a title to change its name.\nDrag an item to change its order.", NULL);
|
||||
gtk_widget_set_tooltip_text(column_l, "Click on a title to change its name.\nDrag an item to change its order.");
|
||||
|
||||
renderer = gtk_cell_renderer_toggle_new();
|
||||
g_signal_connect(renderer, "toggled", G_CALLBACK(visible_toggled), store);
|
||||
|
@ -225,16 +222,14 @@ column_prefs_show(GtkWidget *prefs_window) {
|
|||
add_bt = gtk_button_new_from_stock(GTK_STOCK_ADD);
|
||||
g_signal_connect(add_bt, "clicked", G_CALLBACK(column_list_new_cb), column_l);
|
||||
gtk_box_pack_start (GTK_BOX (add_remove_vb), add_bt, FALSE, FALSE, 0);
|
||||
gtk_tooltips_set_tip (tooltips, add_bt,
|
||||
"Add a new column at the end of the list.", NULL);
|
||||
gtk_widget_set_tooltip_text(add_bt, "Add a new column at the end of the list.");
|
||||
gtk_widget_show(add_bt);
|
||||
|
||||
remove_bt = gtk_button_new_from_stock(GTK_STOCK_REMOVE);
|
||||
gtk_widget_set_sensitive(remove_bt, FALSE);
|
||||
g_signal_connect(remove_bt, "clicked", G_CALLBACK(column_list_delete_cb), column_l);
|
||||
gtk_box_pack_start (GTK_BOX (add_remove_vb), remove_bt, FALSE, FALSE, 0);
|
||||
gtk_tooltips_set_tip (tooltips, remove_bt,
|
||||
"Remove the selected column.", NULL);
|
||||
gtk_widget_set_tooltip_text(remove_bt, "Remove the selected column.");
|
||||
gtk_widget_show(remove_bt);
|
||||
|
||||
/* properties frame */
|
||||
|
@ -253,23 +248,21 @@ column_prefs_show(GtkWidget *prefs_window) {
|
|||
lb = gtk_label_new("Field type:");
|
||||
gtk_misc_set_alignment(GTK_MISC(lb), 0.0f, 0.5f);
|
||||
gtk_table_attach_defaults(GTK_TABLE(tb), lb, 0, 1, 0, 1);
|
||||
gtk_tooltips_set_tip (tooltips, lb,
|
||||
"Select which packet information to present in the column.", NULL);
|
||||
gtk_widget_set_tooltip_text(lb, "Select which packet information to present in the column.");
|
||||
gtk_widget_show(lb);
|
||||
|
||||
props_hb = gtk_hbox_new(FALSE, 5);
|
||||
gtk_table_attach(GTK_TABLE(tb), props_hb, 1, 2, 0, 1, GTK_FILL, GTK_SHRINK, 0, 0);
|
||||
gtk_tooltips_set_tip (tooltips, props_hb,
|
||||
"Select which packet information to present in the column.", NULL);
|
||||
gtk_widget_set_tooltip_text(props_hb, "Select which packet information to present in the column.");
|
||||
gtk_widget_show(props_hb);
|
||||
|
||||
field_lb = gtk_label_new("Field name:");
|
||||
gtk_misc_set_alignment(GTK_MISC(field_lb), 0.0f, 0.5f);
|
||||
gtk_table_attach_defaults(GTK_TABLE(tb), field_lb, 0, 1, 1, 2);
|
||||
gtk_widget_set_sensitive(field_lb, FALSE);
|
||||
gtk_tooltips_set_tip (tooltips, field_lb,
|
||||
gtk_widget_set_tooltip_text(field_lb,
|
||||
"Field name used when field type is \"Custom\". "
|
||||
"This string has the same syntax as a display filter string.", NULL);
|
||||
"This string has the same syntax as a display filter string.");
|
||||
gtk_widget_show(field_lb);
|
||||
|
||||
field_te = gtk_entry_new();
|
||||
|
@ -288,18 +281,18 @@ column_prefs_show(GtkWidget *prefs_window) {
|
|||
colorize_filter_te_as_empty(field_te);
|
||||
gtk_table_attach_defaults(GTK_TABLE(tb), field_te, 1, 2, 1, 2);
|
||||
gtk_widget_set_sensitive(field_te, FALSE);
|
||||
gtk_tooltips_set_tip (tooltips, field_te,
|
||||
gtk_widget_set_tooltip_text(field_te,
|
||||
"Field name used when field type is \"Custom\". "
|
||||
"This string has the same syntax as a display filter string.", NULL);
|
||||
"This string has the same syntax as a display filter string.");
|
||||
gtk_widget_show(field_te);
|
||||
|
||||
occurrence_lb = gtk_label_new("Field occurrence:");
|
||||
gtk_misc_set_alignment(GTK_MISC(occurrence_lb), 0.0f, 0.5f);
|
||||
gtk_table_attach_defaults(GTK_TABLE(tb), occurrence_lb, 2, 3, 1, 2);
|
||||
gtk_widget_set_sensitive(occurrence_lb, FALSE);
|
||||
gtk_tooltips_set_tip (tooltips, occurrence_lb,
|
||||
gtk_widget_set_tooltip_text(occurrence_lb,
|
||||
"Field occurence to use. "
|
||||
"0=all (default), 1=first, 2=second, ..., -1=last.", NULL);
|
||||
"0=all (default), 1=first, 2=second, ..., -1=last.");
|
||||
gtk_widget_show(occurrence_lb);
|
||||
|
||||
occurrence_te = gtk_entry_new();
|
||||
|
@ -313,9 +306,9 @@ column_prefs_show(GtkWidget *prefs_window) {
|
|||
|
||||
gtk_table_attach_defaults(GTK_TABLE(tb), occurrence_te, 3, 4, 1, 2);
|
||||
gtk_widget_set_sensitive(occurrence_te, FALSE);
|
||||
gtk_tooltips_set_tip (tooltips, occurrence_te,
|
||||
gtk_widget_set_tooltip_text(occurrence_te,
|
||||
"Field occurence to use. "
|
||||
"0=all (default), 1=first, 2=second, ..., -1=last.", NULL);
|
||||
"0=all (default), 1=first, 2=second, ..., -1=last.");
|
||||
gtk_widget_show(occurrence_te);
|
||||
|
||||
fmt_cmb = gtk_combo_box_new_text();
|
||||
|
|
|
@ -522,15 +522,9 @@ open_print_dialog(const char *title, output_action_e action, print_args_t *args)
|
|||
|
||||
GtkWidget *bbox, *ok_bt, *cancel_bt, *help_bt;
|
||||
|
||||
GtkTooltips *tooltips;
|
||||
|
||||
|
||||
/* dialog window */
|
||||
main_win = dlg_window_new(title);
|
||||
|
||||
/* Enable tooltips */
|
||||
tooltips = gtk_tooltips_new();
|
||||
|
||||
/* Vertical enclosing container for each row of widgets */
|
||||
main_vb = gtk_vbox_new(FALSE, 5);
|
||||
gtk_container_set_border_width(GTK_CONTAINER(main_vb), 5);
|
||||
|
@ -552,7 +546,7 @@ open_print_dialog(const char *title, output_action_e action, print_args_t *args)
|
|||
text_rb = gtk_radio_button_new_with_mnemonic_from_widget(NULL, "Plain _text");
|
||||
if (args->format == PR_FMT_TEXT)
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(text_rb), TRUE);
|
||||
gtk_tooltips_set_tip (tooltips, text_rb, "Print output in ascii \"plain text\" format. If you're unsure, use this format.", NULL);
|
||||
gtk_widget_set_tooltip_text(text_rb, "Print output in ascii \"plain text\" format. If you're unsure, use this format.");
|
||||
gtk_box_pack_start(GTK_BOX(printer_vb), text_rb, FALSE, FALSE, 0);
|
||||
if(action == output_action_print)
|
||||
gtk_widget_show(text_rb);
|
||||
|
@ -560,7 +554,7 @@ open_print_dialog(const char *title, output_action_e action, print_args_t *args)
|
|||
ps_rb = gtk_radio_button_new_with_mnemonic_from_widget(GTK_RADIO_BUTTON(text_rb), "_PostScript");
|
||||
if (args->format == PR_FMT_PS)
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(ps_rb), TRUE);
|
||||
gtk_tooltips_set_tip (tooltips, ps_rb, "Print output in \"postscript\" format, for postscript capable printers or print servers.", NULL);
|
||||
gtk_widget_set_tooltip_text(ps_rb, "Print output in \"postscript\" format, for postscript capable printers or print servers.");
|
||||
gtk_box_pack_start(GTK_BOX(printer_vb), ps_rb, FALSE, FALSE, 0);
|
||||
if(action == output_action_print)
|
||||
gtk_widget_show(ps_rb);
|
||||
|
@ -568,40 +562,40 @@ open_print_dialog(const char *title, output_action_e action, print_args_t *args)
|
|||
pdml_rb = gtk_radio_button_new_with_mnemonic_from_widget(GTK_RADIO_BUTTON(text_rb), "PDM_L (XML: Packet Details Markup Language)");
|
||||
if (action == output_action_export_pdml)
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pdml_rb), TRUE);
|
||||
gtk_tooltips_set_tip (tooltips, pdml_rb,
|
||||
gtk_widget_set_tooltip_text(pdml_rb,
|
||||
"Print output in \"PDML\" (Packet Details Markup Language), "
|
||||
"an XML based packet data interchange format. "
|
||||
"Usually used in combination with the \"Output to file\" option to export packet data into an XML file.", NULL);
|
||||
"Usually used in combination with the \"Output to file\" option to export packet data into an XML file.");
|
||||
gtk_box_pack_start(GTK_BOX(printer_vb), pdml_rb, FALSE, FALSE, 0);
|
||||
/* gtk_widget_show(pdml_rb); */
|
||||
|
||||
psml_rb = gtk_radio_button_new_with_mnemonic_from_widget(GTK_RADIO_BUTTON(text_rb), "PSML (XML: Packet Summary Markup Language)");
|
||||
if (action == output_action_export_psml)
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(psml_rb), TRUE);
|
||||
gtk_tooltips_set_tip (tooltips, psml_rb,
|
||||
gtk_widget_set_tooltip_text(psml_rb,
|
||||
"Print output in \"PSML\" (Packet Summary Markup Language), "
|
||||
"an XML based packet summary interchange format. "
|
||||
"Usually used in combination with the \"Output to file\" option to export packet data into an XML file.", NULL);
|
||||
"Usually used in combination with the \"Output to file\" option to export packet data into an XML file.");
|
||||
gtk_box_pack_start(GTK_BOX(printer_vb), psml_rb, FALSE, FALSE, 0);
|
||||
/* gtk_widget_show(psml_rb); */
|
||||
|
||||
csv_rb = gtk_radio_button_new_with_mnemonic_from_widget(GTK_RADIO_BUTTON(text_rb), "_CSV");
|
||||
if (action == output_action_export_csv)
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(csv_rb), TRUE);
|
||||
gtk_tooltips_set_tip (tooltips, csv_rb,
|
||||
gtk_widget_set_tooltip_text(csv_rb,
|
||||
"Print output in \"Comma Separated Values\" (CSV) format, "
|
||||
"a text format compatible with OpenOffice and Excel. "
|
||||
"One row for each packet, with its timestamp and size.", NULL);
|
||||
"One row for each packet, with its timestamp and size.");
|
||||
gtk_box_pack_start(GTK_BOX(printer_vb), csv_rb, FALSE, FALSE, 0);
|
||||
/* gtk_widget_show(csv_rb); */
|
||||
|
||||
carrays_rb = gtk_radio_button_new_with_mnemonic_from_widget(GTK_RADIO_BUTTON(text_rb), "C Arrays");
|
||||
if (action == output_action_export_carrays)
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(carrays_rb), TRUE);
|
||||
gtk_tooltips_set_tip (tooltips, carrays_rb,
|
||||
gtk_widget_set_tooltip_text(carrays_rb,
|
||||
"Print output in C Arrays format, "
|
||||
"a text file suitable for use in C/C++ programs. "
|
||||
"One char[] for each packet.", NULL);
|
||||
"One char[] for each packet.");
|
||||
gtk_box_pack_start(GTK_BOX(printer_vb), carrays_rb, FALSE, FALSE, 0);
|
||||
/* gtk_widget_show(carrays_rb); */
|
||||
|
||||
|
@ -621,7 +615,7 @@ open_print_dialog(const char *title, output_action_e action, print_args_t *args)
|
|||
dest_cb = gtk_check_button_new_with_mnemonic("Output to _file:");
|
||||
if (args->to_file)
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dest_cb), TRUE);
|
||||
gtk_tooltips_set_tip (tooltips, dest_cb, "Output to file instead of printer", NULL);
|
||||
gtk_widget_set_tooltip_text(dest_cb, "Output to file instead of printer");
|
||||
gtk_table_attach_defaults(GTK_TABLE(printer_tb), dest_cb, 0, 1, 0, 1);
|
||||
if(action == output_action_print)
|
||||
gtk_widget_show(dest_cb);
|
||||
|
@ -629,7 +623,7 @@ open_print_dialog(const char *title, output_action_e action, print_args_t *args)
|
|||
/* File text entry */
|
||||
file_te = gtk_entry_new();
|
||||
g_object_set_data(G_OBJECT(dest_cb), PRINT_FILE_TE_KEY, file_te);
|
||||
gtk_tooltips_set_tip (tooltips, file_te, "Enter Output filename", NULL);
|
||||
gtk_widget_set_tooltip_text(file_te, "Enter Output filename");
|
||||
gtk_entry_set_text(GTK_ENTRY(file_te), args->file);
|
||||
gtk_table_attach_defaults(GTK_TABLE(printer_tb), file_te, 1, 2, 0, 1);
|
||||
gtk_widget_set_sensitive(file_te, args->to_file);
|
||||
|
@ -641,7 +635,7 @@ open_print_dialog(const char *title, output_action_e action, print_args_t *args)
|
|||
file_bt = gtk_button_new_from_stock(WIRESHARK_STOCK_BROWSE);
|
||||
g_object_set_data(G_OBJECT(dest_cb), PRINT_FILE_BT_KEY, file_bt);
|
||||
g_object_set_data(G_OBJECT(file_bt), PRINT_TE_PTR_KEY, file_te);
|
||||
gtk_tooltips_set_tip (tooltips, file_bt, "Browse output filename in filesystem", NULL);
|
||||
gtk_widget_set_tooltip_text(file_bt, "Browse output filename in filesystem");
|
||||
gtk_table_attach_defaults(GTK_TABLE(printer_tb), file_bt, 2, 3, 0, 1);
|
||||
gtk_widget_set_sensitive(file_bt, args->to_file);
|
||||
gtk_widget_show(file_bt);
|
||||
|
@ -658,7 +652,7 @@ open_print_dialog(const char *title, output_action_e action, print_args_t *args)
|
|||
|
||||
cmd_te = gtk_entry_new();
|
||||
g_object_set_data(G_OBJECT(dest_cb), PRINT_CMD_TE_KEY, cmd_te);
|
||||
gtk_tooltips_set_tip (tooltips, cmd_te, "Enter print command", NULL);
|
||||
gtk_widget_set_tooltip_text(cmd_te, "Enter print command");
|
||||
gtk_entry_set_text(GTK_ENTRY(cmd_te), args->cmd);
|
||||
gtk_table_attach_defaults(GTK_TABLE(printer_tb), cmd_te, 1, 2, 1, 2);
|
||||
gtk_widget_set_sensitive(cmd_te, !args->to_file);
|
||||
|
@ -709,7 +703,7 @@ open_print_dialog(const char *title, output_action_e action, print_args_t *args)
|
|||
summary_cb = gtk_check_button_new_with_mnemonic("Packet summary line");
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(summary_cb), args->print_summary);
|
||||
g_signal_connect(summary_cb, "clicked", G_CALLBACK(print_cmd_toggle_detail), main_win);
|
||||
gtk_tooltips_set_tip (tooltips, summary_cb, "Output of a packet summary line, like in the packet list", NULL);
|
||||
gtk_widget_set_tooltip_text(summary_cb, "Output of a packet summary line, like in the packet list");
|
||||
gtk_container_add(GTK_CONTAINER(format_vb), summary_cb);
|
||||
gtk_widget_show(summary_cb);
|
||||
|
||||
|
@ -718,7 +712,7 @@ open_print_dialog(const char *title, output_action_e action, print_args_t *args)
|
|||
details_cb = gtk_check_button_new_with_mnemonic("Packet details:");
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(details_cb), args->print_dissections != print_dissections_none);
|
||||
g_signal_connect(details_cb, "clicked", G_CALLBACK(print_cmd_toggle_detail), main_win);
|
||||
gtk_tooltips_set_tip (tooltips, details_cb, "Output format of the selected packet details (protocol tree).", NULL);
|
||||
gtk_widget_set_tooltip_text(details_cb, "Output format of the selected packet details (protocol tree).");
|
||||
gtk_container_add(GTK_CONTAINER(format_vb), details_cb);
|
||||
gtk_widget_show(details_cb);
|
||||
|
||||
|
@ -741,19 +735,19 @@ open_print_dialog(const char *title, output_action_e action, print_args_t *args)
|
|||
/* "All collapsed"/"As displayed"/"All Expanded" radio buttons */
|
||||
collapse_all_rb = gtk_radio_button_new_with_mnemonic_from_widget(NULL, "All co_llapsed");
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(collapse_all_rb), args->print_dissections == print_dissections_collapsed);
|
||||
gtk_tooltips_set_tip (tooltips, collapse_all_rb, "Output of the packet details tree \"collapsed\"", NULL);
|
||||
gtk_widget_set_tooltip_text(collapse_all_rb, "Output of the packet details tree \"collapsed\"");
|
||||
gtk_container_add(GTK_CONTAINER(details_vb), collapse_all_rb);
|
||||
gtk_widget_show(collapse_all_rb);
|
||||
|
||||
as_displayed_rb = gtk_radio_button_new_with_mnemonic_from_widget(GTK_RADIO_BUTTON(collapse_all_rb), "As displa_yed");
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(as_displayed_rb), args->print_dissections == print_dissections_as_displayed);
|
||||
gtk_tooltips_set_tip (tooltips, as_displayed_rb, "Output of the packet details tree \"as displayed\"", NULL);
|
||||
gtk_widget_set_tooltip_text(as_displayed_rb, "Output of the packet details tree \"as displayed\"");
|
||||
gtk_container_add(GTK_CONTAINER(details_vb), as_displayed_rb);
|
||||
gtk_widget_show(as_displayed_rb);
|
||||
|
||||
expand_all_rb = gtk_radio_button_new_with_mnemonic_from_widget(GTK_RADIO_BUTTON(collapse_all_rb), "All e_xpanded");
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(expand_all_rb), args->print_dissections == print_dissections_expanded);
|
||||
gtk_tooltips_set_tip (tooltips, expand_all_rb, "Output of the packet details tree \"expanded\"", NULL);
|
||||
gtk_widget_set_tooltip_text(expand_all_rb, "Output of the packet details tree \"expanded\"");
|
||||
gtk_container_add(GTK_CONTAINER(details_vb), expand_all_rb);
|
||||
gtk_widget_show(expand_all_rb);
|
||||
|
||||
|
@ -761,7 +755,7 @@ open_print_dialog(const char *title, output_action_e action, print_args_t *args)
|
|||
hex_cb = gtk_check_button_new_with_mnemonic("Packet bytes");
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(hex_cb), args->print_hex);
|
||||
g_signal_connect(hex_cb, "clicked", G_CALLBACK(print_cmd_toggle_detail), main_win);
|
||||
gtk_tooltips_set_tip (tooltips, hex_cb, "Add a hexdump of the packet data", NULL);
|
||||
gtk_widget_set_tooltip_text(hex_cb, "Add a hexdump of the packet data");
|
||||
gtk_container_add(GTK_CONTAINER(format_vb), hex_cb);
|
||||
gtk_widget_show(hex_cb);
|
||||
|
||||
|
@ -773,8 +767,8 @@ open_print_dialog(const char *title, output_action_e action, print_args_t *args)
|
|||
/* "Each packet on a new page" check button. */
|
||||
formfeed_cb = gtk_check_button_new_with_mnemonic("Each packet on a new page");
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(formfeed_cb), args->print_formfeed);
|
||||
gtk_tooltips_set_tip (tooltips, formfeed_cb, "When checked, a new page will be used for each packet. "
|
||||
"This is done by adding a formfeed (or similar) between the packet outputs.", NULL);
|
||||
gtk_widget_set_tooltip_text (formfeed_cb, "When checked, a new page will be used for each packet. "
|
||||
"This is done by adding a formfeed (or similar) between the packet outputs.");
|
||||
gtk_container_add(GTK_CONTAINER(format_vb), formfeed_cb);
|
||||
gtk_widget_show(formfeed_cb);
|
||||
|
||||
|
@ -819,11 +813,11 @@ open_print_dialog(const char *title, output_action_e action, print_args_t *args)
|
|||
g_object_set_data(G_OBJECT(ok_bt), PRINT_HEX_CB_KEY, hex_cb);
|
||||
g_object_set_data(G_OBJECT(ok_bt), PRINT_FORMFEED_CB_KEY, formfeed_cb);
|
||||
g_signal_connect(ok_bt, "clicked", G_CALLBACK(print_ok_cb), main_win);
|
||||
gtk_tooltips_set_tip (tooltips, ok_bt, "Start output", NULL);
|
||||
gtk_widget_set_tooltip_text (ok_bt, "Start output");
|
||||
|
||||
cancel_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CANCEL);
|
||||
window_set_cancel_button(main_win, cancel_bt, window_cancel_button_cb);
|
||||
gtk_tooltips_set_tip (tooltips, cancel_bt, "Cancel and exit dialog", NULL);
|
||||
gtk_widget_set_tooltip_text (cancel_bt, "Cancel and exit dialog");
|
||||
|
||||
if(action == output_action_print) {
|
||||
help_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_HELP);
|
||||
|
|
|
@ -777,7 +777,6 @@ profile_dialog_new(void)
|
|||
*profile_fr,
|
||||
*edit_fr,
|
||||
*props_fr;
|
||||
GtkTooltips *tooltips;
|
||||
GtkListStore *store;
|
||||
GtkCellRenderer *renderer;
|
||||
GtkTreeViewColumn *column;
|
||||
|
@ -789,8 +788,6 @@ profile_dialog_new(void)
|
|||
which we're working, so we can pass that pointer to callback
|
||||
routines. */
|
||||
|
||||
tooltips = gtk_tooltips_new ();
|
||||
|
||||
main_w = dlg_conf_window_new("Wireshark: Configuration Profiles");
|
||||
gtk_window_set_default_size(GTK_WINDOW(main_w), 400, 400);
|
||||
|
||||
|
@ -823,15 +820,13 @@ profile_dialog_new(void)
|
|||
g_signal_connect(new_bt, "clicked", G_CALLBACK(profile_new_bt_clicked_cb), NULL);
|
||||
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 profile (with default properties)", NULL);
|
||||
gtk_widget_set_tooltip_text (new_bt, "Create a new profile (with default properties)");
|
||||
|
||||
copy_bt = gtk_button_new_from_stock(GTK_STOCK_COPY);
|
||||
g_signal_connect(copy_bt, "clicked", G_CALLBACK(profile_copy_bt_clicked_cb), NULL);
|
||||
gtk_widget_show(copy_bt);
|
||||
gtk_box_pack_start (GTK_BOX (list_bb), copy_bt, FALSE, FALSE, 0);
|
||||
gtk_tooltips_set_tip (tooltips, copy_bt,
|
||||
"Copy the selected profile", NULL);
|
||||
gtk_widget_set_tooltip_text (copy_bt, "Copy the selected profile");
|
||||
|
||||
del_bt = gtk_button_new_from_stock(GTK_STOCK_DELETE);
|
||||
gtk_widget_set_sensitive(del_bt, FALSE);
|
||||
|
@ -839,7 +834,7 @@ profile_dialog_new(void)
|
|||
g_object_set_data(G_OBJECT(main_w), E_PROF_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 profile", NULL);
|
||||
gtk_widget_set_tooltip_text (del_bt, "Delete the selected profile");
|
||||
|
||||
profile_fr = gtk_frame_new("Configuration Profiles");
|
||||
gtk_box_pack_start(GTK_BOX(top_hb), profile_fr, TRUE, TRUE, 0);
|
||||
|
@ -867,7 +862,7 @@ profile_dialog_new(void)
|
|||
renderer = gtk_cell_renderer_toggle_new();
|
||||
column = gtk_tree_view_column_new_with_attributes("Global", renderer, "active", GLOBAL_COLUMN, NULL);
|
||||
gtk_tree_view_append_column(GTK_TREE_VIEW(profile_l), column);
|
||||
gtk_tooltips_set_tip(tooltips, column->button, "Global profiles will be copied to users profiles when used", NULL);
|
||||
gtk_widget_set_tooltip_text(column->button, "Global profiles will be copied to users profiles when used");
|
||||
gtk_tree_view_column_set_visible(column, has_global);
|
||||
|
||||
sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(profile_l));
|
||||
|
@ -907,9 +902,9 @@ profile_dialog_new(void)
|
|||
g_object_set_data(G_OBJECT(main_w), E_PROF_NAME_TE_KEY, name_te);
|
||||
g_signal_connect(name_te, "changed", G_CALLBACK(profile_name_te_changed_cb), NULL);
|
||||
#ifdef _WIN32
|
||||
gtk_tooltips_set_tip (tooltips, name_te, "A profile name cannot start or end with a period (.), and cannot contain any of the following characters:\n \\ / : * ? \" < > |", NULL);
|
||||
gtk_widget_set_tooltip_text (name_te, "A profile name cannot start or end with a period (.), and cannot contain any of the following characters:\n \\ / : * ? \" < > |");
|
||||
#else
|
||||
gtk_tooltips_set_tip (tooltips, name_te, "A profile name cannot contain the '/' character", NULL);
|
||||
gtk_widget_set_tooltip_text (name_te, "A profile name cannot contain the '/' character");
|
||||
#endif
|
||||
gtk_widget_show(name_te);
|
||||
|
||||
|
@ -920,7 +915,7 @@ profile_dialog_new(void)
|
|||
|
||||
ok_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_OK);
|
||||
g_signal_connect(ok_bt, "clicked", G_CALLBACK(profile_dlg_ok_cb), NULL);
|
||||
gtk_tooltips_set_tip (tooltips, ok_bt, "Apply the profiles and close this dialog", NULL);
|
||||
gtk_widget_set_tooltip_text (ok_bt, "Apply the profiles and close this dialog");
|
||||
|
||||
/* Catch the "activate" signal on the profile name and profile
|
||||
list entries, so that if the user types Return
|
||||
|
@ -931,16 +926,16 @@ profile_dialog_new(void)
|
|||
|
||||
apply_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_APPLY);
|
||||
g_signal_connect(apply_bt, "clicked", G_CALLBACK(profile_dlg_apply_cb), NULL);
|
||||
gtk_tooltips_set_tip (tooltips, apply_bt, "Apply the profiles and keep this dialog open", NULL);
|
||||
gtk_widget_set_tooltip_text (apply_bt, "Apply the profiles 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(profile_dlg_cancel_cb), NULL);
|
||||
window_set_cancel_button(main_w, cancel_bt, NULL);
|
||||
|
||||
help_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_HELP);
|
||||
g_signal_connect(help_bt, "clicked", G_CALLBACK(topic_cb), (gpointer)HELP_CONFIG_PROFILES_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);
|
||||
|
@ -1199,10 +1194,8 @@ profile_name_edit_dlg (gint operation)
|
|||
GtkTreeIter iter, parent;
|
||||
gchar *window_title=NULL;
|
||||
const gchar *profile_name, *profiles_dir, *name;
|
||||
GtkTooltips *tooltips;
|
||||
gboolean has_global = has_global_profiles();
|
||||
|
||||
tooltips = gtk_tooltips_new();
|
||||
profile_name = get_profile_name();
|
||||
|
||||
switch (operation) {
|
||||
|
@ -1233,13 +1226,13 @@ profile_name_edit_dlg (gint operation)
|
|||
|
||||
if (operation == PROF_OPERATION_NEW) {
|
||||
label = gtk_label_new("Create from:");
|
||||
gtk_tooltips_set_tip (tooltips, label, "All configuration files will be copied from this profile", NULL);
|
||||
gtk_widget_set_tooltip_text (label, "All configuration files will be copied from this profile");
|
||||
gtk_table_attach_defaults(GTK_TABLE(main_tb), label, 0, 1, 0, 1);
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 1.0f, 0.5f);
|
||||
|
||||
store = gtk_tree_store_new(3, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN);
|
||||
combo_box = gtk_combo_box_new_with_model(GTK_TREE_MODEL (store));
|
||||
gtk_tooltips_set_tip (tooltips, combo_box, "All configuration files will be copied from this profile", NULL);
|
||||
gtk_widget_set_tooltip_text (combo_box, "All configuration files will be copied from this profile");
|
||||
|
||||
cell = gtk_cell_renderer_text_new();
|
||||
gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(combo_box), cell, TRUE);
|
||||
|
@ -1306,9 +1299,9 @@ profile_name_edit_dlg (gint operation)
|
|||
break;
|
||||
}
|
||||
#ifdef _WIN32
|
||||
gtk_tooltips_set_tip (tooltips, entry, "A profile name cannot start or end with a period (.), and cannot contain any of the following characters:\n \\ / : * ? \" < > |", NULL);
|
||||
gtk_widget_set_tooltip_text (entry, "A profile name cannot start or end with a period (.), and cannot contain any of the following characters:\n \\ / : * ? \" < > |");
|
||||
#else
|
||||
gtk_tooltips_set_tip (tooltips, entry, "A profile name cannot contain the '/' character", NULL);
|
||||
gtk_widget_set_tooltip_text (entry, "A profile name cannot contain the '/' character");
|
||||
#endif
|
||||
|
||||
bbox = dlg_button_row_new(GTK_STOCK_CANCEL,GTK_STOCK_OK, NULL);
|
||||
|
|
Loading…
Reference in New Issue