Skip to content

Commit

Permalink
Fixed the position of the menu item when deleting a file. Version 1.5.2.
Browse files Browse the repository at this point in the history
  • Loading branch information
ua0lnj committed Jan 13, 2024
1 parent 8d3bf1d commit e282b07
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
19 changes: 17 additions & 2 deletions filebrowser.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ eOSState cMpvFilebrowser::ProcessKey(eKeys Key)
{
int res;
res = PlayListCreate(newPath, NULL);
ShowDirectory(currentDir);
if (res != -1)
{
Skins.Message(mtError, tr("Not empty directory, can't remove!"));
Expand All @@ -281,22 +282,36 @@ eOSState cMpvFilebrowser::ProcessKey(eKeys Key)
if (res)
{
Skins.Message(mtError, tr("Unable to remove directory!"));
ShowDirectory(currentDir);
}
else
{
State = cOsdMenu::ProcessKey(kUp);
item = (cMpvFilebrowserMenuItem *) Get(Current());
if (!item) break;
currentItem = item->Text();
ShowDirectory(currentDir);
return State;
}
}
}
ShowDirectory(currentDir);
}
else
{
if (Skins.Message(mtWarning, tr("Remove file?"), 5) == kOk)
{
int res;
res = remove(newPath.c_str());
ShowDirectory(currentDir);
if (res)
{
Skins.Message(mtError, tr("Unable to remove file!"));
}
ShowDirectory(currentDir);
else
{
State = cOsdMenu::ProcessKey(kUp);
return State;
}
}
}
return osContinue;
Expand Down
2 changes: 1 addition & 1 deletion mpv.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "menu_options.h"
#include "mpv_service.h"

static const char *VERSION = "1.5.1"
static const char *VERSION = "1.5.2"
#ifdef GIT_REV
"-GIT" GIT_REV
#endif
Expand Down

0 comments on commit e282b07

Please sign in to comment.