From e7253945f906344c08ca6cedce0667e112661589 Mon Sep 17 00:00:00 2001
From: Nate Edel <nate.edel@gmail.com>
Date: Wed, 12 Aug 2015 13:52:44 -0700
Subject: [PATCH] Skip confirmation on same files, as I have a lot of symlinks
---
src/filemanager/boxes.c | 2 ++
src/filemanager/file.c | 1 +
src/setup.c | 3 +++
src/setup.h | 1 +
4 files changed, 7 insertions(+)
diff --git a/src/filemanager/boxes.c b/src/filemanager/boxes.c
index e153e5f..56f6dad 100644
a
|
b
|
confirm_box (void) |
930 | 930 | &confirm_directory_hotlist_delete, NULL), |
931 | 931 | QUICK_CHECKBOX (Q_("Confirmation|&History cleanup"), |
932 | 932 | &mc_global.widget.confirm_history_cleanup, NULL), |
| 933 | QUICK_CHECKBOX (Q_("Confirmation|Skip &same file"), |
| 934 | &confirm_skip_same_file, NULL), |
933 | 935 | QUICK_BUTTONS_OK_CANCEL, |
934 | 936 | QUICK_END |
935 | 937 | /* *INDENT-ON* */ |
diff --git a/src/filemanager/file.c b/src/filemanager/file.c
index 0bacc54..58bc1f2 100644
a
|
b
|
real_warn_same_file (enum OperationMode mode, const char *fmt, const char *a, co |
645 | 645 | static FileProgressStatus |
646 | 646 | warn_same_file (const char *fmt, const char *a, const char *b) |
647 | 647 | { |
| 648 | if (!confirm_skip_same_file) return FILE_SKIP; |
648 | 649 | #ifdef ENABLE_BACKGROUND |
649 | 650 | /* *INDENT-OFF* */ |
650 | 651 | union |
diff --git a/src/setup.c b/src/setup.c
index 5cd32ab..65c195d 100644
a
|
b
|
gboolean confirm_overwrite = TRUE; |
101 | 101 | gboolean confirm_execute = FALSE; |
102 | 102 | /* Asks for confirmation before leaving the program */ |
103 | 103 | gboolean confirm_exit = FALSE; |
| 104 | /* Shows skip/abort message when copying over the same file/inode */ |
| 105 | gboolean confirm_skip_same_file = 0; |
104 | 106 | |
105 | 107 | /* If true, at startup the user-menu is invoked */ |
106 | 108 | gboolean auto_menu = FALSE; |
… |
… |
static const struct |
289 | 291 | { "confirm_history_cleanup", &mc_global.widget.confirm_history_cleanup }, |
290 | 292 | { "confirm_exit", &confirm_exit }, |
291 | 293 | { "confirm_directory_hotlist_delete", &confirm_directory_hotlist_delete }, |
| 294 | { "confirm_skip_same_file", &confirm_skip_same_file }, |
292 | 295 | { "confirm_view_dir", &confirm_view_dir }, |
293 | 296 | { "safe_delete", &safe_delete }, |
294 | 297 | #ifndef HAVE_CHARSET |
{ "eight_bit_clean", &mc_global.eight_bit_clean },
{ "full_eight_bits", &mc_global.full_eight_bits },
diff --git a/src/setup.h b/src/setup.h
index 203ca30..d41ba5f 100644
a
|
b
|
extern int confirm_execute; |
80 | 80 | extern gboolean confirm_exit; |
81 | 81 | extern gboolean confirm_overwrite; |
82 | 82 | extern gboolean confirm_view_dir; |
| 83 | extern gboolean confirm_skip_same_file; |
83 | 84 | extern gboolean safe_delete; |
84 | 85 | extern gboolean clear_before_exec; |
85 | 86 | extern gboolean auto_menu; |