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
/* 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;
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)
*
* @param filt_nr a number 1-10 pointing to a temporary color
* @param filter the new filter-string
+ * @param disabled whether the filter-rule should be disabled
*/
void
-color_filters_set_tmp(guint8 filt_nr, gchar *filter);
+color_filters_set_tmp(guint8 filt_nr, gchar *filter, gboolean disabled);
+
+/** Reset the temporary color filters
+ *
+ */
+void
+color_filters_reset_tmp();
/* Prime the epan_dissect_t with all the compiler
* color filters of the current filter list.
color_display_with_filter(filter);
} else {
if (filt_nr==255) {
- color_filters_init();
+ color_filters_reset_tmp();
} else {
- color_filters_set_tmp(filt_nr,filter);
+ color_filters_set_tmp(filt_nr,filter, FALSE);
}
cf_colorize_packets(&cfile);
}
gchar *filter = NULL;
if( (action>>8) == 255 ) {
- color_filters_init();
+ color_filters_reset_tmp();
cf_colorize_packets(&cfile);
} else {
if( (action&0xff) == 0 ) {
color_display_with_filter(filter);
} else {
/* Set one of the temporary coloring filters */
- color_filters_set_tmp((guint8)(action>>8),filter);
+ color_filters_set_tmp((guint8)(action>>8),filter,FALSE);
cf_colorize_packets(&cfile);
}