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"
@ -273,4 +273,4 @@
#define MSG_USB_PRINTING "Impresion de USB " #define MSG_USB_PRINTING "Impresion de USB "
#endif // LANGUAGE_EN_H #endif // LANGUAGE_EN_H

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"
@ -253,39 +253,39 @@
#define MSG_RECTRACT "Rectract" #define MSG_RECTRACT "Rectract"
#define MSG_HOMEYZ "Kalibruj Z" #define MSG_HOMEYZ "Kalibruj Z"
#define MSG_HOMEYZ_PROGRESS "Kalibruje Z" #define MSG_HOMEYZ_PROGRESS "Kalibruje Z"
#define MSG_HOMEYZ_DONE "Kalibracja OK" #define MSG_HOMEYZ_DONE "Kalibracja OK"
#define MSG_SELFTEST_ERROR "Selftest error !" #define MSG_SELFTEST_ERROR "Selftest error !"
#define MSG_SELFTEST_PLEASECHECK "Skontroluj :" #define MSG_SELFTEST_PLEASECHECK "Skontroluj :"
#define MSG_SELFTEST_NOTCONNECTED "Nie podlaczono " #define MSG_SELFTEST_NOTCONNECTED "Nie podlaczono "
#define MSG_SELFTEST_HEATERTHERMISTOR "Heater/Thermistor" #define MSG_SELFTEST_HEATERTHERMISTOR "Heater/Thermistor"
#define MSG_SELFTEST_BEDHEATER "Bed / Heater" #define MSG_SELFTEST_BEDHEATER "Bed / Heater"
#define MSG_SELFTEST_WIRINGERROR "Blad polaczenia" #define MSG_SELFTEST_WIRINGERROR "Blad polaczenia"
#define MSG_SELFTEST_ENDSTOPS "Endstops" #define MSG_SELFTEST_ENDSTOPS "Endstops"
#define MSG_SELFTEST_MOTOR "Silnik" #define MSG_SELFTEST_MOTOR "Silnik"
#define MSG_SELFTEST_ENDSTOP "Endstop" #define MSG_SELFTEST_ENDSTOP "Endstop"
#define MSG_SELFTEST_ENDSTOP_NOTHIT "Endstop not hit" #define MSG_SELFTEST_ENDSTOP_NOTHIT "Endstop not hit"
#define MSG_SELFTEST_OK "Self test OK" #define MSG_SELFTEST_OK "Self test OK"
#define MSG_STATS_TOTALFILAMENT "Filament lacznie :" #define MSG_STATS_TOTALFILAMENT "Filament lacznie :"
#define MSG_STATS_TOTALPRINTTIME "Czas calkowity :" #define MSG_STATS_TOTALPRINTTIME "Czas calkowity :"
#define MSG_STATS_FILAMENTUSED "Filament : " #define MSG_STATS_FILAMENTUSED "Filament : "
#define MSG_STATS_PRINTTIME "Czas druku : " #define MSG_STATS_PRINTTIME "Czas druku : "
#define MSG_SELFTEST_START "Self test start " #define MSG_SELFTEST_START "Self test start "
#define MSG_SELFTEST_CHECK_ENDSTOPS "Kontrola endstops" #define MSG_SELFTEST_CHECK_ENDSTOPS "Kontrola endstops"
#define MSG_SELFTEST_CHECK_HOTEND "Kontrola hotend " #define MSG_SELFTEST_CHECK_HOTEND "Kontrola hotend "
#define MSG_SELFTEST_CHECK_X "Kontrola X axis " #define MSG_SELFTEST_CHECK_X "Kontrola X axis "
#define MSG_SELFTEST_CHECK_Y "Kontrola Y axis " #define MSG_SELFTEST_CHECK_Y "Kontrola Y axis "
#define MSG_SELFTEST_CHECK_Z "Kontrola Z axis " #define MSG_SELFTEST_CHECK_Z "Kontrola Z axis "
#define MSG_SELFTEST_CHECK_BED "Kontrola bed " #define MSG_SELFTEST_CHECK_BED "Kontrola bed "
#define MSG_SELFTEST_CHECK_ALLCORRECT "Wszystko OK " #define MSG_SELFTEST_CHECK_ALLCORRECT "Wszystko OK "
#define MSG_SELFTEST "Selftest " #define MSG_SELFTEST "Selftest "
#define MSG_SELFTEST_FAILED "Selftest nieudany" #define MSG_SELFTEST_FAILED "Selftest nieudany"
#define MSG_STATISTICS "Statystyka " #define MSG_STATISTICS "Statystyka "
#define MSG_USB_PRINTING "Druk z USB " #define MSG_USB_PRINTING "Druk z USB "

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++)