another fix for 450bf1b6

This commit is contained in:
Andrzej Rybczak
2009-06-28 05:23:23 +02:00
parent 7116c11a8a
commit 72cddfe77d

View File

@@ -532,13 +532,14 @@ int main(int argc, char *argv[])
{ {
Mpd->DeletePlaylist(locale_to_utf_cpy(name)); Mpd->DeletePlaylist(locale_to_utf_cpy(name));
ShowMessage("Playlist \"%s\" deleted!", name.c_str()); ShowMessage("Playlist \"%s\" deleted!", name.c_str());
if (!Config.local_browser) if (!Config.local_browser && myBrowser->Main())
myBrowser->GetDirectory("/"); myBrowser->GetDirectory("/");
} }
else else
ShowMessage("Aborted!"); ShowMessage("Aborted!");
curs_set(0); curs_set(0);
myPlaylistEditor->Playlists->Clear(0); // make playlists list update itself if (myPlaylistEditor->Main()) // check if initialized
myPlaylistEditor->Playlists->Clear(0); // make playlists list update itself
UnlockStatusbar(); UnlockStatusbar();
} }
else if (myScreen == myBrowser && !myBrowser->Main()->Empty() && myBrowser->Main()->Current().type != itPlaylist) else if (myScreen == myBrowser && !myBrowser->Main()->Empty() && myBrowser->Main()->Current().type != itPlaylist)
@@ -666,7 +667,8 @@ int main(int argc, char *argv[])
if (Mpd->SavePlaylist(real_playlist_name)) if (Mpd->SavePlaylist(real_playlist_name))
{ {
ShowMessage("Playlist saved as: %s", playlist_name.c_str()); ShowMessage("Playlist saved as: %s", playlist_name.c_str());
myPlaylistEditor->Playlists->Clear(0); // make playlist's list update itself if (myPlaylistEditor->Main()) // check if initialized
myPlaylistEditor->Playlists->Clear(0); // make playlist's list update itself
} }
else else
{ {
@@ -691,13 +693,17 @@ int main(int argc, char *argv[])
else else
ShowMessage("Aborted!"); ShowMessage("Aborted!");
curs_set(0); curs_set(0);
myPlaylistEditor->Playlists->Clear(0); // make playlist's list update itself if (myPlaylistEditor->Main()) // check if initialized
myPlaylistEditor->Playlists->Clear(0); // make playlist's list update itself
UnlockStatusbar(); UnlockStatusbar();
if (myScreen == myPlaylist) if (myScreen == myPlaylist)
myPlaylist->EnableHighlighting(); myPlaylist->EnableHighlighting();
} }
} }
if (!Config.local_browser && myBrowser->CurrentDir() == "/" && !myBrowser->Main()->Empty()) if (!Config.local_browser
&& myBrowser->Main()
&& myBrowser->CurrentDir() == "/"
&& !myBrowser->Main()->Empty())
myBrowser->GetDirectory(myBrowser->CurrentDir()); myBrowser->GetDirectory(myBrowser->CurrentDir());
} }
else if (Keypressed(input, Key.Stop)) else if (Keypressed(input, Key.Stop))