diff -ur mc-4.8.8.orig/src/filemanager/cmd.c mc-4.8.8/src/filemanager/cmd.c
old
|
new
|
|
320 | 320 | data2 = mmap (0, size, PROT_READ, MAP_FILE | MAP_PRIVATE, file2, 0); |
321 | 321 | if (data2 != (char *) -1) |
322 | 322 | { |
323 | | rotate_dash (); |
| 323 | rotate_dash (TRUE); |
324 | 324 | result = memcmp (data1, data2, size); |
325 | 325 | munmap (data2, size); |
326 | 326 | } |
… |
… |
|
330 | 330 | /* Don't have mmap() :( Even more ugly :) */ |
331 | 331 | char buf1[BUFSIZ], buf2[BUFSIZ]; |
332 | 332 | int n1, n2; |
333 | | rotate_dash (); |
| 333 | rotate_dash (TRUE); |
334 | 334 | do |
335 | 335 | { |
336 | 336 | while ((n1 = read (file1, buf1, BUFSIZ)) == -1 && errno == EINTR); |
… |
… |
|
343 | 343 | } |
344 | 344 | close (file1); |
345 | 345 | } |
| 346 | rotate_dash (FALSE); |
346 | 347 | return result; |
347 | 348 | } |
348 | 349 | |
diff -ur mc-4.8.8.orig/src/filemanager/dir.c mc-4.8.8/src/filemanager/dir.c
old
|
new
|
|
599 | 599 | next_free++; |
600 | 600 | |
601 | 601 | if ((next_free & 31) == 0) |
602 | | rotate_dash (); |
| 602 | rotate_dash (TRUE); |
603 | 603 | } |
604 | 604 | |
605 | 605 | if (next_free != 0) |
… |
… |
|
608 | 608 | ret: |
609 | 609 | mc_closedir (dirp); |
610 | 610 | tree_store_end_check (); |
| 611 | rotate_dash (FALSE); |
611 | 612 | return next_free; |
612 | 613 | } |
613 | 614 | |
… |
… |
|
738 | 739 | list->list[next_free].second_sort_key = NULL; |
739 | 740 | next_free++; |
740 | 741 | if (!(next_free % 16)) |
741 | | rotate_dash (); |
| 742 | rotate_dash (TRUE); |
742 | 743 | } |
743 | 744 | mc_closedir (dirp); |
744 | 745 | tree_store_end_check (); |
… |
… |
|
748 | 749 | do_sort (list, sort, next_free - 1, lc_reverse, lc_case_sensitive, exec_ff); |
749 | 750 | } |
750 | 751 | clean_dir (&dir_copy, count); |
| 752 | rotate_dash (FALSE); |
751 | 753 | return next_free; |
752 | 754 | } |
753 | 755 | |
diff -ur mc-4.8.8.orig/src/filemanager/file.c mc-4.8.8/src/filemanager/file.c
old
|
new
|
|
828 | 828 | long dt; |
829 | 829 | |
830 | 830 | /* 1. Update rotating dash after some time */ |
831 | | rotate_dash (); |
| 831 | rotate_dash (TRUE); |
832 | 832 | |
833 | 833 | /* 3. Compute ETA */ |
834 | 834 | dt = (tv_current.tv_sec - tv_transfer_start.tv_sec); |
… |
… |
|
1922 | 1922 | dst_status = DEST_FULL; /* copy successful, don't remove target file */ |
1923 | 1923 | |
1924 | 1924 | ret: |
| 1925 | rotate_dash (FALSE); |
1925 | 1926 | while (src_desc != -1 && mc_close (src_desc) < 0 && !ctx->skip_all) |
1926 | 1927 | { |
1927 | 1928 | temp_status = file_error (_("Cannot close source file \"%s\"\n%s"), src_path); |
diff -ur mc-4.8.8.orig/src/filemanager/find.c mc-4.8.8/src/filemanager/find.c
old
|
new
|
|
1185 | 1185 | /* --------------------------------------------------------------------------------------------- */ |
1186 | 1186 | |
1187 | 1187 | static void |
1188 | | find_rotate_dash (const WDialog * h, gboolean finish) |
| 1188 | find_rotate_dash (const WDialog * h, gboolean show) |
1189 | 1189 | { |
1190 | 1190 | static const char rotating_dash[] = "|/-\\"; |
1191 | 1191 | static unsigned int pos = 0; |
… |
… |
|
1197 | 1197 | pos = (pos + 1) % 4; |
1198 | 1198 | tty_setcolor (h->color[DLG_COLOR_NORMAL]); |
1199 | 1199 | widget_move (h, w->lines - 7, w->cols - 4); |
1200 | | tty_print_char (finish ? ' ' : rotating_dash[pos]); |
| 1200 | tty_print_char (show ? rotating_dash[pos] : ' '); |
1201 | 1201 | mc_refresh (); |
1202 | 1202 | } |
1203 | 1203 | } |
… |
… |
|
1261 | 1261 | ignore_count), ignore_count); |
1262 | 1262 | status_update (msg); |
1263 | 1263 | } |
1264 | | find_rotate_dash (h, TRUE); |
| 1264 | find_rotate_dash (h, FALSE); |
1265 | 1265 | stop_idle (h); |
1266 | 1266 | return 0; |
1267 | 1267 | } |
… |
… |
|
1360 | 1360 | ; |
1361 | 1361 | } /* for */ |
1362 | 1362 | |
1363 | | find_rotate_dash (h, FALSE); |
| 1363 | find_rotate_dash (h, TRUE); |
1364 | 1364 | |
1365 | 1365 | return 1; |
1366 | 1366 | } |
… |
… |
|
1770 | 1770 | next_free++; |
1771 | 1771 | g_free (name); |
1772 | 1772 | if (!(next_free & 15)) |
1773 | | rotate_dash (); |
| 1773 | rotate_dash (TRUE); |
1774 | 1774 | } |
1775 | 1775 | |
1776 | 1776 | if (next_free) |
… |
… |
|
1796 | 1796 | do_search (NULL); /* force do_search to release resources */ |
1797 | 1797 | g_free (old_dir); |
1798 | 1798 | old_dir = NULL; |
| 1799 | rotate_dash (FALSE); |
1799 | 1800 | |
1800 | 1801 | return return_value; |
1801 | 1802 | } |
diff -ur mc-4.8.8.orig/src/filemanager/layout.c mc-4.8.8/src/filemanager/layout.c
old
|
new
|
|
863 | 863 | /* --------------------------------------------------------------------------------------------- */ |
864 | 864 | |
865 | 865 | void |
866 | | rotate_dash (void) |
| 866 | rotate_dash (gboolean show) |
867 | 867 | { |
868 | 868 | static const char rotating_dash[] = "|/-\\"; |
869 | 869 | static size_t pos = 0; |
… |
… |
|
871 | 871 | if (!nice_rotating_dash || (ok_to_refresh <= 0)) |
872 | 872 | return; |
873 | 873 | |
| 874 | if (!show) { |
| 875 | tty_gotoyx (0, COLS - 1); |
| 876 | if (menubar_visible) { |
| 877 | tty_setcolor (MENU_INACTIVE_COLOR); |
| 878 | tty_print_char (' '); |
| 879 | } else { |
| 880 | tty_setcolor (NORMAL_COLOR); |
| 881 | tty_print_alt_char (ACS_URCORNER, FALSE); |
| 882 | } |
| 883 | mc_refresh (); |
| 884 | return; |
| 885 | } |
| 886 | |
874 | 887 | if (pos >= sizeof (rotating_dash) - 1) |
875 | 888 | pos = 0; |
876 | 889 | tty_gotoyx (0, COLS - 1); |
diff -ur mc-4.8.8.orig/src/filemanager/layout.h mc-4.8.8/src/filemanager/layout.h
old
|
new
|
|
79 | 79 | |
80 | 80 | /* Rotating dash routines */ |
81 | 81 | void use_dash (gboolean flag); /* Disable/Enable rotate_dash routines */ |
82 | | void rotate_dash (void); |
| 82 | void rotate_dash (gboolean show); |
83 | 83 | |
84 | 84 | #ifdef ENABLE_SUBSHELL |
85 | 85 | gboolean do_load_prompt (void); |
diff -ur mc-4.8.8.orig/src/filemanager/panelize.c mc-4.8.8/src/filemanager/panelize.c
old
|
new
|
|
368 | 368 | list->list[next_free].second_sort_key = NULL; |
369 | 369 | next_free++; |
370 | 370 | if (!(next_free & 32)) |
371 | | rotate_dash (); |
| 371 | rotate_dash (TRUE); |
372 | 372 | } |
373 | 373 | |
374 | 374 | current_panel->is_panelized = TRUE; |
… |
… |
|
392 | 392 | close_error_pipe (D_NORMAL, NULL); |
393 | 393 | try_to_select (current_panel, NULL); |
394 | 394 | panel_re_sort (current_panel); |
| 395 | rotate_dash (FALSE); |
395 | 396 | } |
396 | 397 | |
397 | 398 | /* --------------------------------------------------------------------------------------------- */ |