improve code formatting

This commit is contained in:
Andrzej Rybczak
2008-12-15 20:29:45 +01:00
parent 77e8cd0145
commit 2cc5528014

View File

@@ -2759,11 +2759,20 @@ int main(int argc, char *argv[])
} }
else if (Keypressed(input, Key.AddSelected)) else if (Keypressed(input, Key.AddSelected))
{ {
if (wCurrent == mPlaylist || wCurrent == mBrowser || wCurrent == mSearcher || wCurrent == mLibSongs || wCurrent == mPlaylistEditor) if (wCurrent != mPlaylist
{ && wCurrent != mBrowser
&& wCurrent != mSearcher
&& wCurrent != mLibSongs
&& wCurrent != mPlaylistEditor)
continue;
List *mList = reinterpret_cast<Menu<Song> *>(wCurrent); List *mList = reinterpret_cast<Menu<Song> *>(wCurrent);
if (mList->hasSelected()) if (!mList->hasSelected())
{ {
ShowMessage("No selected items!");
continue;
}
vector<size_t> list; vector<size_t> list;
mList->GetSelected(list); mList->GetSelected(list);
SongList result; SongList result;
@@ -2906,7 +2915,6 @@ int main(int argc, char *argv[])
Mpd->CommitQueue(); Mpd->CommitQueue();
ShowMessage("Selected items added to playlist '%s'!", playlist.c_str()); ShowMessage("Selected items added to playlist '%s'!", playlist.c_str());
} }
} }
else if (id > 1 && id < mDialog->Size()-1) else if (id > 1 && id < mDialog->Size()-1)
{ {
@@ -2928,10 +2936,6 @@ int main(int argc, char *argv[])
delete mDialog; delete mDialog;
FreeSongList(result); FreeSongList(result);
} }
else
ShowMessage("No selected items!");
}
}
else if (Keypressed(input, Key.Crop)) else if (Keypressed(input, Key.Crop))
{ {
if (mPlaylist->hasSelected()) if (mPlaylist->hasSelected())