mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-12-25 03:11:58 +01:00
- When switching nands now the whole path is shown at the top not just the current folder name. If it's too long the first folder(s) get truncated off the display.
This commit is contained in:
parent
bc759934cb
commit
eceea9a423
@ -405,10 +405,19 @@ string CMenu::_FolderExplorer(void)
|
||||
folderName = "";
|
||||
else
|
||||
{
|
||||
folderName = folderName.erase(folderName.find_last_of("/"));
|
||||
//if its more than just device and :/ then erase up to last foldername
|
||||
if(folderName.find_last_of("/") != string::npos)
|
||||
folderName = folderName.erase(0, folderName.find_last_of("/")+1);
|
||||
if(folderName.find_first_of("/") != folderName.find_last_of("/"))
|
||||
{
|
||||
folderName = folderName.erase(folderName.find_last_of("/"));
|
||||
while(folderName.length() > 32)
|
||||
{
|
||||
if(folderName.find_first_of("/") == string::npos)
|
||||
break;
|
||||
folderName = folderName.erase(0, folderName.find_first_of("/")+1);
|
||||
}
|
||||
if(folderName.find_first_of(":") == string::npos)
|
||||
folderName = "/"+folderName;
|
||||
folderName = folderName+"/";
|
||||
}
|
||||
}
|
||||
//if we removed device then clear path completely
|
||||
if(strchr(dir, '/') == NULL)
|
||||
@ -438,10 +447,18 @@ string CMenu::_FolderExplorer(void)
|
||||
else if(!fsop_FileExist(fmt("%s%s", dir, entries_char[i-2])))
|
||||
{
|
||||
strcat(dir, entries_char[i-2]);
|
||||
folderName = entries_char[i-2];
|
||||
/* otherwise it fails */
|
||||
folderName = dir;
|
||||
while(folderName.length() > 32)
|
||||
{
|
||||
//this if won't happen the first time
|
||||
if(folderName.find_first_of("/") == string::npos)
|
||||
break;
|
||||
folderName = folderName.erase(0, folderName.find_first_of("/")+1);
|
||||
}
|
||||
if(folderName.find_first_of(":") == string::npos)
|
||||
folderName = "/"+folderName;
|
||||
folderName = folderName+"/";
|
||||
strcat(dir, "/");
|
||||
//gprintf("Directory path =%s\n", dir);
|
||||
_refreshFolderExplorer();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user