GNOME Bugzilla – Bug 380283
Last criteria in Advanced Search is not removable
Last modified: 2009-01-08 16:17:31 UTC
Forwarding this from a downstream bug report: http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=212116 The Advanced Search dialog does not allow the last criteria to be removed. Clicking its "Remove" button has no effect. This applies to both the Mail and Contacts components. It also applies to the "Edit Rule" dialog in the Mail component. I've traced the reason for this behavior to the "Remove" button's callback function in filter/filter-rule.c: static void less_parts (GtkWidget *button, struct _rule_data *data) { FilterPart *part; GtkWidget *rule; if (g_list_length (data->fr->parts) < 2) return; rule = g_object_get_data ((GObject *) button, "rule"); part = g_object_get_data ((GObject *) rule, "part"); /* remove the part from the list */ filter_rule_remove_part (data->fr, part); g_object_unref (part); /* and from the display */ gtk_container_remove (GTK_CONTAINER (data->parts), rule); gtk_container_remove (GTK_CONTAINER (data->parts), button); } The "if" statement is preventing the last criteria from being removed. I could maybe see an argument that you have to have at least one criteria in an advanced search or filter rule. But in that case, the "Remove" button for the last criteria should be disabled. Furthermore, the Contacts component's "Advanced Search" dialog initially has no criteria at all. So as soon as you add a criteria, you can't put the dialog back in it's initial state. That seems bizarre to me. Personally I think a better approach is to disable the "OK" button when the "Advanced Search" or "Edit Rule" dialog is missing required criteria. The user may then add the required criteria or click "Cancel". I'd like to get a second opinion on this from one of the upstream guys.
Bumping version to a stable release.
I don’t experience this bug in version 2.22.3.1. It’s probably been fixed.
You've right, Philipp. *** This bug has been marked as a duplicate of 263207 ***