aboutsummaryrefslogtreecommitdiffstats
path: root/color_filters.c
diff options
context:
space:
mode:
authorsake <sake@f5534014-38df-0310-8fa8-9805f1628bb7>2007-11-25 14:17:56 +0000
committersake <sake@f5534014-38df-0310-8fa8-9805f1628bb7>2007-11-25 14:17:56 +0000
commite073cd9370b01951513776828fc8a50e63f9d21b (patch)
treefd1314301a382355b2472f4177127c41892aa047 /color_filters.c
parentf1bce0727068af70ad526692ee60bfb8aa23639a (diff)
Reset the temporary coloring filters to defaults instead of doing it
implicitly by calling "color_filters_init()". This should probably fix the crashes experienced when pressing ctrl-space a couple of times git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@23583 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'color_filters.c')
-rw-r--r--color_filters.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/color_filters.c b/color_filters.c
index 24dee0aab9..634e1012bf 100644
--- a/color_filters.c
+++ b/color_filters.c
@@ -141,7 +141,7 @@ color_filters_find_by_name_cb(gconstpointer arg1, gconstpointer arg2)
/* Set the filter off a temporary colorfilters and enable it */
void
-color_filters_set_tmp(guint8 filt_nr, gchar *filter)
+color_filters_set_tmp(guint8 filt_nr, gchar *filter, gboolean disabled)
{
gchar *name = NULL;
GSList *cfl;
@@ -164,13 +164,25 @@ color_filters_set_tmp(guint8 filt_nr, gchar *filter)
dfilter_free(colorf->c_colorfilter);
colorf->filter_text = g_strdup(filter);
colorf->c_colorfilter = compiled_filter;
- colorf->disabled = FALSE;
+ colorf->disabled = disabled;
}
}
g_free(name);
return;
}
+/* Reset the temporary colorfilters */
+void
+color_filters_reset_tmp()
+{
+ guint8 i;
+
+ for ( i=1 ; i<=10 ; i++ ) {
+ color_filters_set_tmp(i, "frame", TRUE);
+ }
+ return;
+}
+
/* delete the specified filter */
void
color_filter_delete(color_filter_t *colorf)