Fixed ".." label when leaving a subdirectory.

Made the hidden and system files invisible when browsing the SD card.
This commit is contained in:
bubnikv 2016-06-20 13:46:37 +02:00
parent d9da3c4c7f
commit 08bf6acf1b
8 changed files with 48 additions and 46 deletions

View file

@ -99,6 +99,8 @@ void CardReader::lsDive(const char *prepend, SdFile parent, const char * const m
if (lf0 == '.' || lf0 == '_') continue; if (lf0 == '.' || lf0 == '_') continue;
if (!DIR_IS_FILE_OR_SUBDIR(&p)) continue; if (!DIR_IS_FILE_OR_SUBDIR(&p)) continue;
// Ignore the files and directories with hidden or system attribute.
if ((p.attributes & (DIR_ATT_HIDDEN | DIR_ATT_SYSTEM)) != 0) continue;
filenameIsDir=DIR_IS_SUBDIR(&p); filenameIsDir=DIR_IS_SUBDIR(&p);

View file

@ -2215,11 +2215,11 @@ const char * const MSG_RECTRACT_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_RECTRACT_PL MSG_RECTRACT_PL
}; };
const char MSG_REFRESH_EN[] PROGMEM = "Refresh"; const char MSG_REFRESH_EN[] PROGMEM = "\xF8" "Refresh";
const char MSG_REFRESH_CZ[] PROGMEM = "Obnovit"; const char MSG_REFRESH_CZ[] PROGMEM = "\xF8" "Obnovit";
const char MSG_REFRESH_IT[] PROGMEM = "Refresh"; const char MSG_REFRESH_IT[] PROGMEM = "\xF8" "Refresh";
const char MSG_REFRESH_ES[] PROGMEM = "Refresh"; const char MSG_REFRESH_ES[] PROGMEM = "\xF8" "Refresh";
const char MSG_REFRESH_PL[] PROGMEM = "Obnovit"; const char MSG_REFRESH_PL[] PROGMEM = "\xF8" "Obnovit";
const char * const MSG_REFRESH_LANG_TABLE[LANG_NUM] PROGMEM = { const char * const MSG_REFRESH_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_REFRESH_EN, MSG_REFRESH_EN,
MSG_REFRESH_CZ, MSG_REFRESH_CZ,

View file

@ -95,7 +95,7 @@
#define MSG_STORE_EPROM "Store memory" #define MSG_STORE_EPROM "Store memory"
#define MSG_LOAD_EPROM "Ulozit pamet" #define MSG_LOAD_EPROM "Ulozit pamet"
#define MSG_RESTORE_FAILSAFE "Obnovit vychozi" #define MSG_RESTORE_FAILSAFE "Obnovit vychozi"
#define MSG_REFRESH "Obnovit" #define MSG_REFRESH "\xF8" "Obnovit"
#define MSG_WATCH "Informace" #define MSG_WATCH "Informace"
#define MSG_PREPARE "Priprava" #define MSG_PREPARE "Priprava"
#define MSG_TUNE "Ladit" #define MSG_TUNE "Ladit"

View file

@ -95,7 +95,7 @@
#define MSG_STORE_EPROM "Store memory" #define MSG_STORE_EPROM "Store memory"
#define MSG_LOAD_EPROM "Load memory" #define MSG_LOAD_EPROM "Load memory"
#define MSG_RESTORE_FAILSAFE "Restore failsafe" #define MSG_RESTORE_FAILSAFE "Restore failsafe"
#define MSG_REFRESH "Refresh" #define MSG_REFRESH "\xF8" "Refresh"
#define MSG_WATCH "Info screen" #define MSG_WATCH "Info screen"
#define MSG_PREPARE "Prepare" #define MSG_PREPARE "Prepare"
#define MSG_TUNE "Tune" #define MSG_TUNE "Tune"

View file

@ -217,7 +217,7 @@
#define MSG_STORE_EPROM "Store memory" #define MSG_STORE_EPROM "Store memory"
#define MSG_LOAD_EPROM "Load memory" #define MSG_LOAD_EPROM "Load memory"
#define MSG_RESTORE_FAILSAFE "Restore failsafe" #define MSG_RESTORE_FAILSAFE "Restore failsafe"
#define MSG_REFRESH "Refresh" #define MSG_REFRESH "\xF8" "Refresh"
#define MSG_PREPARE "Prepare" #define MSG_PREPARE "Prepare"
#define MSG_CONTROL_RETRACT "Retract mm" #define MSG_CONTROL_RETRACT "Retract mm"
#define MSG_CONTROL_RETRACT_SWAP "Swap Re.mm" #define MSG_CONTROL_RETRACT_SWAP "Swap Re.mm"

View file

@ -216,7 +216,7 @@
#define MSG_STORE_EPROM "Store memory" #define MSG_STORE_EPROM "Store memory"
#define MSG_LOAD_EPROM "Load memory" #define MSG_LOAD_EPROM "Load memory"
#define MSG_RESTORE_FAILSAFE "Restore failsafe" #define MSG_RESTORE_FAILSAFE "Restore failsafe"
#define MSG_REFRESH "Refresh" #define MSG_REFRESH "\xF8" "Refresh"
#define MSG_PREPARE "Prepare" #define MSG_PREPARE "Prepare"
#define MSG_CONTROL_RETRACT "Retract mm" #define MSG_CONTROL_RETRACT "Retract mm"
#define MSG_CONTROL_RETRACT_SWAP "Swap Re.mm" #define MSG_CONTROL_RETRACT_SWAP "Swap Re.mm"

View file

@ -228,7 +228,7 @@
#define MSG_STORE_EPROM "Store memory" #define MSG_STORE_EPROM "Store memory"
#define MSG_LOAD_EPROM "Ulozit pamet" #define MSG_LOAD_EPROM "Ulozit pamet"
#define MSG_RESTORE_FAILSAFE "Obnovit vychozi" #define MSG_RESTORE_FAILSAFE "Obnovit vychozi"
#define MSG_REFRESH "Obnovit" #define MSG_REFRESH "\xF8" "Obnovit"
#define MSG_PREPARE "Priprava" #define MSG_PREPARE "Priprava"

View file

@ -2036,10 +2036,10 @@ void lcd_sdcard_menu()
if (card.filename[0] == '/') if (card.filename[0] == '/')
{ {
#if SDCARDDETECT == -1 #if SDCARDDETECT == -1
MENU_ITEM(function, LCD_STR_REFRESH MSG_REFRESH, lcd_sd_refresh); MENU_ITEM(function, MSG_REFRESH, lcd_sd_refresh);
#endif #endif
} else { } else {
MENU_ITEM(function, LCD_STR_FOLDER "..", lcd_sd_updir); MENU_ITEM(function, PSTR(LCD_STR_FOLDER ".."), lcd_sd_updir);
} }
for (uint16_t i = 0; i < fileCnt; i++) for (uint16_t i = 0; i < fileCnt; i++)