add overwrite confirmation to file dialogs
This commit is contained in:
parent
74783f312a
commit
f04418376c
@ -399,6 +399,8 @@ static void save_mapping_clicked(GtkWidget *button, gpointer user_data)
|
||||
|
||||
dialog = gtk_file_chooser_dialog_new("Save Mapping File", GTK_WINDOW(user_data), GTK_FILE_CHOOSER_ACTION_SAVE,
|
||||
"Cancel", GTK_RESPONSE_CANCEL, "Save Mapping", GTK_RESPONSE_ACCEPT, NULL);
|
||||
gtk_file_chooser_set_do_overwrite_confirmation(GTK_FILE_CHOOSER(dialog), TRUE);
|
||||
|
||||
res = gtk_dialog_run(GTK_DIALOG(dialog));
|
||||
if (res == GTK_RESPONSE_ACCEPT) {
|
||||
file_name = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
|
||||
|
@ -260,6 +260,8 @@ static void on_convert_clicked(gpointer button, gpointer user)
|
||||
}
|
||||
gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog), filter);
|
||||
|
||||
gtk_file_chooser_set_do_overwrite_confirmation(GTK_FILE_CHOOSER(dialog), TRUE);
|
||||
|
||||
res = gtk_dialog_run(GTK_DIALOG(dialog));
|
||||
if (res == GTK_RESPONSE_ACCEPT) {
|
||||
file_name = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
|
||||
|
Loading…
Reference in New Issue
Block a user