mirror of https://github.com/PCSX2/pcsx2.git
CDVD plugin submenu disable: code cleanup to allow easier future modifications.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4580 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
8858a5c57c
commit
39c8fe121a
|
@ -65,7 +65,7 @@ void MainEmuFrame::UpdateIsoSrcSelection()
|
||||||
sMenuBar.Check( cdsrc, true );
|
sMenuBar.Check( cdsrc, true );
|
||||||
m_statusbar.SetStatusText( CDVD_SourceLabels[g_Conf->CdvdSource], 1 );
|
m_statusbar.SetStatusText( CDVD_SourceLabels[g_Conf->CdvdSource], 1 );
|
||||||
|
|
||||||
m_menuCDVD.Enable( GetPluginMenuId_Settings(PluginId_CDVD), cdsrc == MenuId_Src_Plugin );
|
EnableCdvdPluginSubmenu( cdsrc == MenuId_Src_Plugin );
|
||||||
|
|
||||||
//sMenuBar.SetLabel( MenuId_Src_Iso, wxsFormat( L"%s -> %s", _("Iso"),
|
//sMenuBar.SetLabel( MenuId_Src_Iso, wxsFormat( L"%s -> %s", _("Iso"),
|
||||||
// exists ? Path::GetFilename(g_Conf->CurrentIso).c_str() : _("Empty") ) );
|
// exists ? Path::GetFilename(g_Conf->CurrentIso).c_str() : _("Empty") ) );
|
||||||
|
|
|
@ -144,7 +144,7 @@ public:
|
||||||
void UpdateIsoSrcSelection();
|
void UpdateIsoSrcSelection();
|
||||||
void RemoveCdvdMenu();
|
void RemoveCdvdMenu();
|
||||||
void EnableMenuItem( int id, bool enable );
|
void EnableMenuItem( int id, bool enable );
|
||||||
int GetCdvdPluginSubmenuItemId();
|
void EnableCdvdPluginSubmenu(bool isEnable = true);
|
||||||
|
|
||||||
bool Destroy();
|
bool Destroy();
|
||||||
|
|
||||||
|
|
|
@ -168,7 +168,7 @@ wxWindowID SwapOrReset_Iso( wxWindow* owner, IScopedCoreThread& core_control, co
|
||||||
core_control.AllowResume();
|
core_control.AllowResume();
|
||||||
}
|
}
|
||||||
|
|
||||||
GetMainFrame().EnableMenuItem( GetMainFrame().GetCdvdPluginSubmenuItemId(), g_Conf->CdvdSource == CDVDsrc_Plugin );
|
GetMainFrame().EnableCdvdPluginSubmenu( g_Conf->CdvdSource == CDVDsrc_Plugin );
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -217,7 +217,7 @@ wxWindowID SwapOrReset_CdvdSrc( wxWindow* owner, CDVD_SourceType newsrc )
|
||||||
sApp.SysExecute( g_Conf->CdvdSource );
|
sApp.SysExecute( g_Conf->CdvdSource );
|
||||||
}
|
}
|
||||||
|
|
||||||
GetMainFrame().EnableMenuItem( GetMainFrame().GetCdvdPluginSubmenuItemId(), g_Conf->CdvdSource == CDVDsrc_Plugin );
|
GetMainFrame().EnableCdvdPluginSubmenu( g_Conf->CdvdSource == CDVDsrc_Plugin );
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -353,9 +353,9 @@ void MainEmuFrame::_DoBootCdvd()
|
||||||
sApp.SysExecute( g_Conf->CdvdSource );
|
sApp.SysExecute( g_Conf->CdvdSource );
|
||||||
}
|
}
|
||||||
|
|
||||||
int MainEmuFrame::GetCdvdPluginSubmenuItemId()
|
void MainEmuFrame::EnableCdvdPluginSubmenu(bool isEnable)
|
||||||
{
|
{
|
||||||
return GetPluginMenuId_Settings(PluginId_CDVD);
|
EnableMenuItem( GetPluginMenuId_Settings(PluginId_CDVD), isEnable );
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainEmuFrame::Menu_CdvdSource_Click( wxCommandEvent &event )
|
void MainEmuFrame::Menu_CdvdSource_Click( wxCommandEvent &event )
|
||||||
|
|
Loading…
Reference in New Issue