diff options
author | Stephen Fisher <steve@stephen-fisher.com> | 2009-07-20 06:21:35 +0000 |
---|---|---|
committer | Stephen Fisher <steve@stephen-fisher.com> | 2009-07-20 06:21:35 +0000 |
commit | edc8ae64f1b53aa87783cf067a7a7472d937f3ee (patch) | |
tree | cd4ac89962b19320a37704b37feb2ca2d9e15699 /color_filters.c | |
parent | 96be1a38dacd9dc24539251a01931b3dcb2167eb (diff) |
Introduce packet list coloring for the NEW_PACKET_LIST. One caveat: when
enabling/disabling the coloring of the packet list from the menus, the user
has to drag the mouse cursor over each displayed row to take away/add the
coloring. Dragging the scroll bar up or down will also take care of this as
only the displayed rows are colored.
svn path=/trunk/; revision=29142
Diffstat (limited to 'color_filters.c')
-rw-r--r-- | color_filters.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/color_filters.c b/color_filters.c index 4076e22203..25761a7388 100644 --- a/color_filters.c +++ b/color_filters.c @@ -408,7 +408,11 @@ tmp_color_filters_used(void) void color_filters_enable(gboolean enable) { +#ifdef NEW_PACKET_LIST + new_packet_list_enable_color(enable); +#else filters_enabled = enable; +#endif } @@ -431,10 +435,11 @@ color_filters_prime_edt(epan_dissect_t *edt) g_slist_foreach(color_filter_list, prime_edt, edt); } -#ifndef NEW_PACKET_LIST -/* Colorize a single packet of the packet list */ +/* Colorize a single packet of the packet list (old packet list) + * (row is only _U_ for the NEW_PACKET_LIST case + * Return the color_t for later use (new packet list) */ color_filter_t * -color_filters_colorize_packet(gint row, epan_dissect_t *edt) +color_filters_colorize_packet(gint row _U_, epan_dissect_t *edt) { GSList *curr; color_filter_t *colorf; @@ -450,6 +455,7 @@ color_filters_colorize_packet(gint row, epan_dissect_t *edt) dfilter_apply_edt(colorf->c_colorfilter, edt)) { /* this is the filter to use, apply it to the packet list */ #ifndef NEW_PACKET_LIST + /* We'll do this in the column cell function instead. */ packet_list_set_colors(row, &(colorf->fg_color), &(colorf->bg_color)); #endif return colorf; @@ -460,7 +466,6 @@ color_filters_colorize_packet(gint row, epan_dissect_t *edt) return NULL; } -#endif /* NEW_PACKET_LIST */ /* read filters from the given file */ /* XXX - Would it make more sense to use GStrings here instead of reallocing |