+ /* except if the OK button of the parent window has been clicked */
+ /* so don't use g_assert_not_reached() but check the filters again */
+ }
+}
+
+static void
+color_filter_validate_cb(gpointer filter_arg, gpointer unused _U_)
+{
+ color_filter_t *colorf = filter_arg;
+
+ g_assert(colorf->c_colorfilter == NULL);
+ if (!dfilter_compile(colorf->filter_text, &colorf->c_colorfilter)) {
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
+ "Removing color filter name: \"%s\" text: \"%s\".\n%s",
+ colorf->filter_name, colorf->filter_text, dfilter_error_msg);
+ /* Delete the color filter from the list of color filters. */
+ color_filter_valid_list = g_slist_remove(color_filter_valid_list, colorf);
+ color_filter_delete(colorf);