Ask before overwriting existing file

Closes #1399
pull/1408/head
vthriller 2023-08-26 17:08:32 +03:00 committed by Paul Kahler
parent 36ecb85bb3
commit beb473b94d
1 changed files with 6 additions and 0 deletions

View File

@ -1398,6 +1398,9 @@ public:
gtkDialog.add_button(isSave ? C_("button", "_Save")
: C_("button", "_Open"), Gtk::RESPONSE_OK);
gtkDialog.set_default_response(Gtk::RESPONSE_OK);
if(isSave) {
gtkDialog.set_do_overwrite_confirmation(true);
}
InitFileChooser(gtkDialog);
}
@ -1431,6 +1434,9 @@ public:
isSave ? C_("button", "_Save")
: C_("button", "_Open"),
C_("button", "_Cancel"));
if(isSave) {
gtkNative->set_do_overwrite_confirmation(true);
}
// Seriously, GTK?!
InitFileChooser(*gtkNative.operator->());
}