file-conflict-dialog: Don't change action when unchecking

The "Apply this action to all files and folders" checkbox works only
with the "Replace" action, not the "Rename" action. Indeed, if the
rename field is expanded, the checkbox is greyed out.

However, if the checkbox is checked, when unchecking it changes the
main action to Rename, despite the rename field being obviously
hidden (otherwise the checkbox wouldn't be checked). That's wrong.
It's a regression from 15d59cd18d

When the checkbox is unchecked, the action is already "Replace", so
there is no need to change it.

Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/1889
This commit is contained in:
António Fernandes 2021-07-24 20:00:14 +01:00 committed by Ondrej Holy
parent 8aabca16fd
commit bc3edaa0b2

View file

@ -253,17 +253,6 @@ checkbox_toggled_cb (GtkToggleButton *t,
NautilusFileConflictDialog *dialog)
{
gtk_widget_set_sensitive (dialog->expander, !gtk_toggle_button_get_active (t));
if (!gtk_toggle_button_get_active (t))
{
gtk_widget_hide (dialog->replace_button);
gtk_widget_show (dialog->rename_button);
}
else
{
gtk_widget_hide (dialog->rename_button);
gtk_widget_show (dialog->replace_button);
}
}
static void