diff options
author | Ulf Lamping <ulf.lamping@web.de> | 2006-10-03 18:39:36 +0000 |
---|---|---|
committer | Ulf Lamping <ulf.lamping@web.de> | 2006-10-03 18:39:36 +0000 |
commit | 9e6c7b11ae8eac1bcf50fc904e2e426f7c9d28f3 (patch) | |
tree | 86a986e5c1b0f3d2da15956d765319d0d2715579 /file.c | |
parent | 8f737d258725dcdd12010d8ee45d42bd5dd7c29f (diff) |
Implement a real "Cancel" button for the coloring rules dialog - this was a hard one! It seems to be working without bugs and as designed now.
As this was a huge internal change, new bugs are very probable - please report.
The implementation isn't still perfect, a new dialog internal list could possibly be removed again.
However, I want to check in at this condition, just in case I make things worse - again.
svn path=/trunk/; revision=19413
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -818,6 +818,7 @@ add_packet_to_packet_list(frame_data *fdata, capture_file *cf, if (cf->dfcode != NULL && refilter) { epan_dissect_prime_dfilter(edt, cf->dfcode); } + /* prepare color filters */ if (color_filters_used()) { color_filters_prime_edt(edt); } @@ -3066,6 +3067,17 @@ cf_select_packet(capture_file *cf, int row) } /* We don't need the columns here. */ cf->edt = epan_dissect_new(TRUE, TRUE); + + /* colorize packet: coloring rules might be changed (removed) since last run, + recalculate now. + if packet is marked, use preferences, otherwise try to apply color filters */ + if (fdata->flags.marked) { + fdata->color_filter = NULL; + packet_list_set_colors(row, &prefs.gui_marked_fg, &prefs.gui_marked_bg); + } else { + fdata->color_filter = color_filters_colorize_packet(row, cf->edt); + } + epan_dissect_run(cf->edt, &cf->pseudo_header, cf->pd, cf->current_frame, NULL); |