diff -NaurpBb mc-4.7.0-pre1/src/main.c mc-4.7.0-pre1-orig/src/main.c
old
|
new
|
int confirm_view_dir = 0; |
239 | 239 | /* This flag indicates if the pull down menus by default drop down */ |
240 | 240 | int drop_menus = 0; |
241 | 241 | |
242 | | /* if auto_fix_codeset = 0 show warning about system and display codeset is different |
243 | | if auto_fix_codeset = 1 don't show warning, don't fix it automatically |
244 | | if auto_fix_codeset = 2 don't show warning, fix it automatically */ |
245 | | int auto_fix_codeset = 0; |
| 242 | /* if skip_check_codeset = 1 do not show warning about |
| 243 | * system and display codeset is different |
| 244 | */ |
| 245 | int skip_check_codeset = 0; |
246 | 246 | |
247 | 247 | /* The dialog handle for the main program */ |
248 | 248 | Dlg_head *midnight_dlg = NULL; |
… |
… |
static void check_codeset() |
1462 | 1462 | const char *_source_codepage = NULL; |
1463 | 1463 | const char *_display_codepage = NULL; |
1464 | 1464 | int profile_changed = 0; |
1465 | | int dont_ask_again = 0; |
1466 | | int st = 0; |
1467 | 1465 | |
1468 | 1466 | #define CONFY 16 |
1469 | 1467 | #define CONFX 54 |
1470 | 1468 | |
1471 | | if ( auto_fix_codeset != 1 ) { |
| 1469 | if ( !skip_check_codeset ) { |
1472 | 1470 | |
1473 | 1471 | QuickWidget ecs_widgets [] = { |
1474 | 1472 | { quick_button, 4, 6, 13, CONFY, N_("&Skip"), |
… |
… |
static void check_codeset() |
1476 | 1474 | { quick_button, 1, 11, 13, CONFY, N_("&Fix it"), |
1477 | 1475 | 0, B_ENTER, 0, 0, NULL , NULL, NULL}, |
1478 | 1476 | { quick_checkbox, 1, 13, 11, CONFY, N_("don't ask again"), |
1479 | | 11, 0, &dont_ask_again, NULL, NULL , NULL, NULL}, |
| 1477 | 11, 0, &skip_check_codeset, NULL, NULL , NULL, NULL}, |
1480 | 1478 | { quick_label, 2, 30, 3, CONFY, N_("Chosen display charset (Settings->Display bits)\n" |
1481 | 1479 | "or source codeset (in mcedit ctrl-t) \n" |
1482 | 1480 | "does not match one set via locale. \n" |
… |
… |
static void check_codeset() |
1500 | 1498 | |
1501 | 1499 | if ( (strcmp (_system_codepage, _display_codepage)) || |
1502 | 1500 | (strcmp (_system_codepage, _source_codepage)) ) { |
1503 | | if (!auto_fix_codeset) |
1504 | | { |
1505 | | st = quick_dialog (&ecs); |
1506 | | if (dont_ask_again) |
1507 | | { |
1508 | | auto_fix_codeset = st == B_ENTER ? 2 : 1; |
1509 | | mc_config_set_int(mc_main_config, "Midnight-Commander", "auto_fix_codeset", auto_fix_codeset); |
1510 | | profile_changed = 1; |
1511 | | } |
1512 | | } |
1513 | | if (auto_fix_codeset == 2 || st == B_ENTER) { |
| 1501 | if (quick_dialog (&ecs) == B_ENTER){ |
1514 | 1502 | display_codepage = get_codepage_index (_system_codepage); |
1515 | 1503 | cp_display = get_codepage_id (display_codepage); |
1516 | 1504 | if ( !strcmp (cp_display, _system_codepage)) { |
… |
… |
static void check_codeset() |
1522 | 1510 | cp_source = cp_display; |
1523 | 1511 | profile_changed = 1; |
1524 | 1512 | } |
| 1513 | } else { |
| 1514 | if ( skip_check_codeset ) { |
| 1515 | mc_config_set_int(mc_main_config, "Midnight-Commander", "skip_check_codeset", 1); |
| 1516 | profile_changed = 1; |
| 1517 | } |
1525 | 1518 | } |
1526 | 1519 | } |
1527 | 1520 | if ( profile_changed ) |
diff -NaurpBb mc-4.7.0-pre1/src/main.h mc-4.7.0-pre1-orig/src/main.h
old
|
new
|
extern int midnight_shutdown; |
79 | 79 | extern char cmd_buf [512]; |
80 | 80 | extern const char *shell; |
81 | 81 | extern int auto_fill_mkdir_name; |
82 | | extern int auto_fix_codeset; |
| 82 | extern int skip_check_codeset; |
83 | 83 | /* Ugly hack in order to distinguish between left and right panel in menubar */ |
84 | 84 | extern int is_right; /* If the selected menu was the right */ |
85 | 85 | #define MENU_PANEL (is_right ? right_panel : left_panel) |
diff -NaurpBb mc-4.7.0-pre1/src/setup.c mc-4.7.0-pre1-orig/src/setup.c
old
|
new
|
static const struct { |
194 | 194 | { "xtree_mode", &xtree_mode }, |
195 | 195 | { "num_history_items_recorded", &num_history_items_recorded }, |
196 | 196 | { "file_op_compute_totals", &file_op_compute_totals }, |
197 | | { "auto_fix_codeset", &auto_fix_codeset }, |
| 197 | { "skip_check_codeset", &skip_check_codeset }, |
198 | 198 | #ifdef USE_VFS |
199 | 199 | { "vfs_timeout", &vfs_timeout }, |
200 | 200 | #ifdef USE_NETCODE |