Minor tweaks.

This commit is contained in:
Birunthan Mohanathas
2011-07-14 10:12:02 +00:00
parent fdad6fb036
commit 0be7eb3f79
6 changed files with 31 additions and 28 deletions

View File

@ -445,7 +445,14 @@ void ExecuteBang(LPCTSTR bang, UINT id)
ParentMeasure* parent = child->parent;
CPlayer* player = parent->player;
if (_wcsicmp(bang, L"Pause") == 0)
if (!player->IsInitialized())
{
if (_wcsicmp(bang, L"ClosePlayer") == 0 || _wcsicmp(bang, L"TogglePlayer") == 0)
{
player->OpenPlayer(parent->playerPath);
}
}
else if (_wcsicmp(bang, L"Pause") == 0)
{
player->Pause();
}
@ -469,13 +476,7 @@ void ExecuteBang(LPCTSTR bang, UINT id)
{
player->Previous();
}
else if (_wcsicmp(bang, L"OpenPlayer") == 0 ||
(!player->IsInitialized() && _wcsicmp(bang, L"TogglePlayer") == 0))
{
player->OpenPlayer(parent->playerPath);
}
else if (_wcsicmp(bang, L"ClosePlayer") == 0 ||
(player->IsInitialized() && _wcsicmp(bang, L"TogglePlayer") == 0))
else if (_wcsicmp(bang, L"OpenPlayer") == 0 || _wcsicmp(bang, L"TogglePlayer") == 0)
{
player->ClosePlayer();
}