Don't discard unknown coloring rules.
authorGerald Combs <gerald@wireshark.org>
Mon, 25 Jul 2016 17:49:30 +0000 (10:49 -0700)
committerMichael Mann <mmann78@netscape.net>
Fri, 29 Jul 2016 03:57:41 +0000 (03:57 +0000)
When processing the colorfilters file, keep and disable unknown coloring
rules instead of skipping over and discarding them. This should
hopefully keep people from losing the standard "Checksum Errors" rule
(and it's less rude in general).

Change-Id: I21796c25045d9dbf7612238ce3d27b613f1ec75f
Reviewed-on: https://code.wireshark.org/review/16673
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
epan/color_filters.c
ui/qt/coloring_rules_dialog.cpp

index d3e329b94cd44f7a1c87505a2ba10be2aaaccbb4..ee99ea0a622810c7638bffa93430b7a14ae718e0 100644 (file)
@@ -627,8 +627,8 @@ read_filters_file(FILE *f, gpointer user_data, color_filter_add_cb_func add_cb)
                 g_free(local_err_msg);
                 prefs.unknown_colorfilters = TRUE;
 
-                skip_end_of_line = TRUE;
-                continue;
+                /* skip_end_of_line = TRUE; */
+                disabled = TRUE;
             }
 
             fg_color.red = fg_r;
index c0ef340dde1f93675eccf965b4706c513e605795..671a9c075d4393707d4abfbd089a540aa7b3bfad 100644 (file)
@@ -360,7 +360,7 @@ void ColoringRulesDialog::on_buttonBox_accepted()
         QMessageBox mb;
         mb.setText(tr("Your coloring rules file contains unknown rules"));
         mb.setInformativeText(tr("Wireshark doesn't recognize one or more of your coloring rules. "
-                                 "Saving will discard them."));
+                                 "Saving will disable them."));
         mb.setStandardButtons(QMessageBox::Save | QMessageBox::Cancel);
         mb.setDefaultButton(QMessageBox::Save);