mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-24 04:09:15 +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
@ -404,11 +404,20 @@ string CMenu::_FolderExplorer(void)
|
|||||||
if(folderName.find_last_of("/") == string::npos)
|
if(folderName.find_last_of("/") == string::npos)
|
||||||
folderName = "";
|
folderName = "";
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
if(folderName.find_first_of("/") != folderName.find_last_of("/"))
|
||||||
{
|
{
|
||||||
folderName = folderName.erase(folderName.find_last_of("/"));
|
folderName = folderName.erase(folderName.find_last_of("/"));
|
||||||
//if its more than just device and :/ then erase up to last foldername
|
while(folderName.length() > 32)
|
||||||
if(folderName.find_last_of("/") != string::npos)
|
{
|
||||||
folderName = folderName.erase(0, folderName.find_last_of("/")+1);
|
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 we removed device then clear path completely
|
||||||
if(strchr(dir, '/') == NULL)
|
if(strchr(dir, '/') == NULL)
|
||||||
@ -438,10 +447,18 @@ string CMenu::_FolderExplorer(void)
|
|||||||
else if(!fsop_FileExist(fmt("%s%s", dir, entries_char[i-2])))
|
else if(!fsop_FileExist(fmt("%s%s", dir, entries_char[i-2])))
|
||||||
{
|
{
|
||||||
strcat(dir, entries_char[i-2]);
|
strcat(dir, entries_char[i-2]);
|
||||||
folderName = entries_char[i-2];
|
folderName = dir;
|
||||||
/* otherwise it fails */
|
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, "/");
|
strcat(dir, "/");
|
||||||
//gprintf("Directory path =%s\n", dir);
|
|
||||||
_refreshFolderExplorer();
|
_refreshFolderExplorer();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user