diff --git a/src/filemanager/dir.c b/src/filemanager/dir.c
index 2188d1983..cddd7f264 100644
a
|
b
|
dir_list_load (dir_list * list, const vfs_path_t * vpath, GCompareFunc sort, |
661 | 661 | if (!dir_list_append (list, dp->d_name, &st, link_to_dir != 0, stale_link != 0)) |
662 | 662 | goto ret; |
663 | 663 | |
664 | | if ((list->len & 31) == 0) |
665 | | rotate_dash (TRUE); |
| 664 | rotate_dash (TRUE); |
666 | 665 | } |
667 | 666 | |
668 | 667 | dir_list_sort (list, sort, sort_op); |
… |
… |
dir_list_reload (dir_list * list, const vfs_path_t * vpath, GCompareFunc sort, |
803 | 802 | marked_cnt--; |
804 | 803 | } |
805 | 804 | |
806 | | if ((list->len & 15) == 0) |
807 | | rotate_dash (TRUE); |
| 805 | rotate_dash (TRUE); |
808 | 806 | } |
809 | 807 | mc_closedir (dirp); |
810 | 808 | tree_store_end_check (); |
diff --git a/src/filemanager/find.c b/src/filemanager/find.c
index 01b0a4bf7..8c27aa409 100644
a
|
b
|
find_ignore_dir_search (const char *dir) |
1240 | 1240 | |
1241 | 1241 | /* --------------------------------------------------------------------------------------------- */ |
1242 | 1242 | |
| 1243 | /* Keep in sync with layout.c rotate_dash(). TODO: refactor to avoid this duplication. */ |
1243 | 1244 | static void |
1244 | 1245 | find_rotate_dash (const WDialog * h, gboolean show) |
1245 | 1246 | { |
1246 | | static size_t pos = 0; |
1247 | | static const char rotating_dash[4] = "|/-\\"; |
1248 | 1247 | const Widget *w = CONST_WIDGET (h); |
| 1248 | static guint64 last_timestamp = 0; |
| 1249 | guint64 timestamp; |
1249 | 1250 | |
1250 | 1251 | if (!verbose) |
1251 | 1252 | return; |
1252 | 1253 | |
1253 | | tty_setcolor (h->color[DLG_COLOR_NORMAL]); |
| 1254 | if (!show) |
| 1255 | last_timestamp = 0; |
| 1256 | else |
| 1257 | { |
| 1258 | timestamp = g_get_monotonic_time (); |
| 1259 | /* Save on screen updates, see ticket 3859. */ |
| 1260 | if (timestamp - last_timestamp < 125000) |
| 1261 | return; |
| 1262 | last_timestamp = timestamp; |
| 1263 | } |
| 1264 | |
1254 | 1265 | widget_move (h, w->lines - 7, w->cols - 4); |
1255 | | tty_print_char (show ? rotating_dash[pos] : ' '); |
1256 | | pos = (pos + 1) % sizeof (rotating_dash); |
| 1266 | tty_setcolor (h->color[DLG_COLOR_NORMAL]); |
| 1267 | |
| 1268 | if (!show) |
| 1269 | tty_print_char (' '); |
| 1270 | else |
| 1271 | { |
| 1272 | static const char rotating_dash[4] = "|/-\\"; |
| 1273 | static size_t pos = 0; |
| 1274 | |
| 1275 | tty_print_char (rotating_dash[pos]); |
| 1276 | pos = (pos + 1) % sizeof (rotating_dash); |
| 1277 | } |
| 1278 | |
1257 | 1279 | mc_refresh (); |
1258 | 1280 | } |
1259 | 1281 | |
… |
… |
do_search (WDialog * h) |
1399 | 1421 | /* skip invalid filenames */ |
1400 | 1422 | while ((dp = mc_readdir (dirp)) != NULL && !str_is_valid_string (dp->d_name)) |
1401 | 1423 | ; |
1402 | | } /* for */ |
1403 | 1424 | |
1404 | | find_rotate_dash (h, TRUE); |
| 1425 | find_rotate_dash (h, TRUE); |
| 1426 | } /* for */ |
1405 | 1427 | |
1406 | 1428 | return 1; |
1407 | 1429 | } |
… |
… |
do_find (const char *start_dir, ssize_t start_dir_len, const char *ignore_dirs, |
1815 | 1837 | list->list[list->len].second_sort_key = NULL; |
1816 | 1838 | list->len++; |
1817 | 1839 | g_free (name); |
1818 | | if ((list->len & 15) == 0) |
1819 | | rotate_dash (TRUE); |
| 1840 | rotate_dash (TRUE); |
1820 | 1841 | } |
1821 | 1842 | |
1822 | 1843 | current_panel->is_panelized = TRUE; |
diff --git a/src/filemanager/layout.c b/src/filemanager/layout.c
index 10f06643c..62b15406c 100644
a
|
b
|
set_hintbar (const char *str) |
914 | 914 | |
915 | 915 | /* --------------------------------------------------------------------------------------------- */ |
916 | 916 | |
| 917 | /* Keep in sync with find.c find_rotate_dash(). TODO: refactor to avoid this duplication. */ |
917 | 918 | void |
918 | 919 | rotate_dash (gboolean show) |
919 | 920 | { |
920 | 921 | Widget *w = WIDGET (midnight_dlg); |
| 922 | static guint64 last_timestamp = 0; |
| 923 | guint64 timestamp; |
921 | 924 | |
922 | 925 | if (!nice_rotating_dash || (ok_to_refresh <= 0)) |
923 | 926 | return; |
924 | 927 | |
| 928 | if (!show) |
| 929 | last_timestamp = 0; |
| 930 | else |
| 931 | { |
| 932 | timestamp = g_get_monotonic_time (); |
| 933 | /* Save on screen updates, see ticket 3859. */ |
| 934 | if (timestamp - last_timestamp < 125000) |
| 935 | return; |
| 936 | last_timestamp = timestamp; |
| 937 | } |
| 938 | |
925 | 939 | widget_move (w, (menubar_visible != 0) ? 1 : 0, w->cols - 1); |
926 | 940 | tty_setcolor (NORMAL_COLOR); |
927 | 941 | |
diff --git a/src/filemanager/panelize.c b/src/filemanager/panelize.c
index 4808840bc..a95fae9fb 100644
a
|
b
|
do_external_panelize (char *command) |
350 | 350 | |
351 | 351 | file_mark (current_panel, list->len - 1, 0); |
352 | 352 | |
353 | | if ((list->len & 31) == 0) |
354 | | rotate_dash (TRUE); |
| 353 | rotate_dash (TRUE); |
355 | 354 | } |
356 | 355 | |
357 | 356 | current_panel->is_panelized = TRUE; |