Added a DVD menu to main frame and small code move.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1631 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
omegadox 2008-12-23 08:24:30 +00:00
parent 34a7e75906
commit 5464f2274a
2 changed files with 8 additions and 4 deletions

View File

@ -223,10 +223,8 @@ void SetDiscInside(bool _DiscInside)
}
void SwapDisc(const char * fileName)
{
SetLidOpen(true);
VolumeHandler::SetVolumeName(fileName);
DVDInterface::SetDiscInside(VolumeHandler::IsValid());
SetLidOpen(false);
}
void SetLidOpen(bool _bOpen)
{

View File

@ -242,6 +242,12 @@ void CFrame::CreateMenu()
#endif
m_pMenuBar->Append(pOptionsMenu, _T("&Options"));
//DVD menu
wxMenu* dvdMenu = new wxMenu;
dvdMenu->Append(IDM_SWAPDISC, _T("S&wap Disc"));
dvdMenu->Append(IDM_TOGGLECOVER, _T("Toggle \"DVD co&ver is open\""));
m_pMenuBar->Append(dvdMenu, _T("&DVD"));
// misc menu
wxMenu* miscMenu = new wxMenu;
miscMenu->AppendCheckItem(IDM_TOGGLE_TOOLBAR, _T("View &toolbar"));
@ -251,8 +257,6 @@ void CFrame::CreateMenu()
miscMenu->AppendSeparator();
miscMenu->Append(IDM_MEMCARD, _T("&Memcard manager"));
miscMenu->Append(IDM_CHEATS, _T("Action &Replay Manager"));
miscMenu->Append(IDM_SWAPDISC, _T("S&wap Disc"));
//miscMenu->Append(IDM_TOGGLECOVER, _T("Toggle DVD co&ver is open"));
m_pMenuBar->Append(miscMenu, _T("&Misc"));
// help menu
@ -689,6 +693,7 @@ void CFrame::OnSwapDisc(wxCommandEvent& event)
{
case IDM_SWAPDISC:
{
SetLidOpen(true);
wxString path = wxFileSelector(
_T("Select the Disc to swap"),
wxEmptyString, wxEmptyString, wxEmptyString,
@ -701,6 +706,7 @@ void CFrame::OnSwapDisc(wxCommandEvent& event)
wxFD_OPEN | wxFD_PREVIEW | wxFD_FILE_MUST_EXIST,
this);
SwapDisc(path.mb_str());
SetLidOpen(false);
break;
}
default: