aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com>2009-09-06 06:07:53 +0000
committerKovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com>2009-09-06 06:07:53 +0000
commit5c51aacb2165e8154c318d0cae70c50a86ffe59d (patch)
tree3ec72a3bd7c7b8a290e9e2a064d99e8b2cbbf470
parent2ab0685d8a7de5b310ddc5a3146abd48948ff721 (diff)
Add NEW_PACKET_LIST guard to color_filters_colorize_packet()
svn path=/trunk/; revision=29729
-rw-r--r--color_filters.c8
-rw-r--r--color_filters.h34
-rw-r--r--gtk/packet_list_store.c2
3 files changed, 25 insertions, 19 deletions
diff --git a/color_filters.c b/color_filters.c
index eee30e172c..28297e198b 100644
--- a/color_filters.c
+++ b/color_filters.c
@@ -439,10 +439,14 @@ color_filters_prime_edt(epan_dissect_t *edt)
}
/* 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 _U_, epan_dissect_t *edt)
+#ifdef NEW_PACKET_LIST
+color_filters_colorize_packet(epan_dissect_t *edt)
+#else
+color_filters_colorize_packet(gint row, epan_dissect_t *edt)
+#endif
{
GSList *curr;
color_filter_t *colorf;
diff --git a/color_filters.h b/color_filters.h
index a38e17c906..07050041a8 100644
--- a/color_filters.h
+++ b/color_filters.h
@@ -31,19 +31,19 @@
/* Data for a color filter. */
typedef struct _color_filter {
- gchar *filter_name; /* name of the filter */
- gchar *filter_text; /* text of the filter expression */
- color_t bg_color; /* background color for packets that match */
- color_t fg_color; /* foreground color for packets that match */
- gboolean disabled; /* set if the filter is disabled */
- gboolean selected; /* set if the filter is selected in the color dialog box */
-
- /* only used inside of color_filters.c */
- dfilter_t *c_colorfilter; /* compiled filter expression */
-
- /* only used outside of color_filters.c (beside init) */
- void *edit_dialog; /* if filter is being edited, dialog
- * box for it */
+ gchar *filter_name; /* name of the filter */
+ gchar *filter_text; /* text of the filter expression */
+ color_t bg_color; /* background color for packets that match */
+ color_t fg_color; /* foreground color for packets that match */
+ gboolean disabled; /* set if the filter is disabled */
+ gboolean selected; /* set if the filter is selected in the color dialog box */
+
+ /* only used inside of color_filters.c */
+ dfilter_t *c_colorfilter; /* compiled filter expression */
+
+ /* only used outside of color_filters.c (beside init) */
+ void *edit_dialog; /* if filter is being edited, dialog
+ * box for it */
} color_filter_t;
@@ -91,7 +91,7 @@ void
color_filters_reset_tmp(void);
/* Prime the epan_dissect_t with all the compiler
- * color filters of the current filter list.
+ * color filters of the current filter list.
*
* @param the epan dissector details
*/
@@ -104,9 +104,11 @@ void color_filters_prime_edt(epan_dissect_t *edt);
* @return the matching color filter or NULL
*/
color_filter_t *
+#ifdef NEW_PACKET_LIST
+color_filters_colorize_packet(epan_dissect_t *edt);
+#else
color_filters_colorize_packet(gint row, epan_dissect_t *edt);
-
-
+#endif
/** Clone the currently active filter list.
*
diff --git a/gtk/packet_list_store.c b/gtk/packet_list_store.c
index e5d52a88f5..b5551d8dd1 100644
--- a/gtk/packet_list_store.c
+++ b/gtk/packet_list_store.c
@@ -989,7 +989,7 @@ packet_list_dissect_and_cache_by_record(PacketList *packet_list, PacketListRecor
epan_dissect_run(&edt, &cfile.pseudo_header, cfile.pd, fdata, cinfo);
if (dissect_color)
- fdata->color_filter = color_filters_colorize_packet(0 /* row - unused */, &edt);
+ fdata->color_filter = color_filters_colorize_packet(&edt);
if (dissect_columns) {
/* "Stringify" non frame_data vals */