gui: Remove unused/incomplete panels/dialogs

Also rearrange the CMakeLists.txt slightly so things are easier to find
and to remove a duplicate entry.
This commit is contained in:
Jonathan Li 2017-03-17 01:08:13 +00:00
parent fb174b482f
commit 1837d43d96
11 changed files with 3 additions and 220 deletions

View File

@ -258,9 +258,6 @@ set(pcsx2GuiSources
gui/Dialogs/AboutBoxDialog.cpp
gui/Dialogs/AppConfigDialog.cpp
gui/Dialogs/AssertionDialog.cpp
gui/Panels/BaseApplicableConfigPanel.cpp
gui/Panels/MemoryCardListView.cpp
gui/Panels/ThemeSelectorPanel.cpp
gui/Dialogs/BaseConfigurationDialog.cpp
gui/Dialogs/ConfirmationDialogs.cpp
gui/Dialogs/ConvertMemoryCardDialog.cpp
@ -288,11 +285,9 @@ set(pcsx2GuiSources
gui/MainMenuClicks.cpp
gui/MemoryCardFile.cpp
gui/MemoryCardFolder.cpp
gui/Panels/BaseApplicableConfigPanel.cpp
gui/Panels/MemoryCardListPanel.cpp
gui/MessageBoxes.cpp
gui/MSWstuff.cpp
gui/Panels/AudioPanel.cpp
gui/Panels/BaseApplicableConfigPanel.cpp
gui/Panels/BiosSelectorPanel.cpp
gui/Panels/CpuPanel.cpp
gui/Panels/DirPickerPanel.cpp
@ -300,6 +295,8 @@ set(pcsx2GuiSources
gui/Panels/GameFixesPanel.cpp
gui/Panels/GSWindowPanel.cpp
gui/Panels/LogOptionsPanels.cpp
gui/Panels/MemoryCardListPanel.cpp
gui/Panels/MemoryCardListView.cpp
gui/Panels/MiscPanelStuff.cpp
gui/Panels/PathsPanel.cpp
gui/Panels/PluginSelectorPanel.cpp

View File

@ -112,21 +112,6 @@ namespace Dialogs
void UpdateGuiForPreset ( int presetIndex, bool presetsEnabled );
};
// --------------------------------------------------------------------------------------
// InterfaceConfigDialog
// --------------------------------------------------------------------------------------
class InterfaceConfigDialog : public BaseConfigurationDialog
{
public:
virtual ~InterfaceConfigDialog() throw() {}
InterfaceConfigDialog(wxWindow* parent=NULL);
static wxString GetNameStatic() { return L"InterfaceConfig"; }
wxString GetDialogName() const { return GetNameStatic(); }
protected:
virtual wxString& GetConfSettingsTabName() const { return g_Conf->AppSettingsTabName; }
};
// --------------------------------------------------------------------------------------
// InterfaceLanguageDialog
// --------------------------------------------------------------------------------------

View File

@ -256,24 +256,6 @@ Dialogs::ComponentsConfigDialog::ComponentsConfigDialog(wxWindow* parent)
wxGetApp().PostMethod( CheckPluginsOverrides );
}
// FIXME: Purge? It's unused and does nothing.
Dialogs::InterfaceConfigDialog::InterfaceConfigDialog(wxWindow *parent)
: BaseConfigurationDialog( parent, AddAppName(_("Appearance/Themes - %s")), 400 )
{
ScopedBusyCursor busy( Cursor_ReallyBusy );
CreateListbook( wxGetApp().GetImgList_Config() );
const AppImageIds::ConfigIds& cfgid( wxGetApp().GetImgId().Config );
AddPage<AppearanceThemesPanel> ( pxL("Appearance"), cfgid.Appearance );
AddListbook();
AddOkCancel();
//*this += new Panels::LanguageSelectionPanel( this ) | pxCenter;
//wxDialogWithHelpers::AddOkCancel( NULL, false );
}
Dialogs::InterfaceLanguageDialog::InterfaceLanguageDialog(wxWindow* parent)
: BaseConfigurationDialog(parent, _("Language Selector"), 400)
{
@ -289,26 +271,4 @@ Dialogs::InterfaceLanguageDialog::InterfaceLanguageDialog(wxWindow* parent)
SetSizerAndFit(GetSizer());
}
// ------------------------------------------------------------------------
Panels::AppearanceThemesPanel::AppearanceThemesPanel( wxWindow* parent )
: BaseApplicableConfigPanel( parent )
{
}
AppearanceThemesPanel::~AppearanceThemesPanel() throw()
{
}
void AppearanceThemesPanel::Apply()
{
}
void AppearanceThemesPanel::AppStatusEvent_OnSettingsApplied()
{
}
bool g_ConfigPanelChanged = false;

View File

@ -227,8 +227,6 @@ void MainEmuFrame::ConnectMenus()
Bind(wxEVT_MENU, &MainEmuFrame::Menu_MultitapToggle_Click, this, MenuId_Config_Multitap0Toggle);
Bind(wxEVT_MENU, &MainEmuFrame::Menu_MultitapToggle_Click, this, MenuId_Config_Multitap1Toggle);
Bind(wxEVT_MENU, &MainEmuFrame::Menu_ResetAllSettings_Click, this, MenuId_Config_ResetAll);
// For "appearance" even though it's hinting at language. No menu item exists either.
//Bind(wxEVT_MENU, &MainEmuFrame::Menu_Language_Click, this, MenuId_Config_Language);
// Misc
Bind(wxEVT_MENU, &MainEmuFrame::Menu_ShowConsole, this, MenuId_Console);

View File

@ -165,7 +165,6 @@ protected:
void Menu_WindowSettings_Click(wxCommandEvent &event);
void Menu_GSSettings_Click(wxCommandEvent &event);
void Menu_SelectPluginsBios_Click(wxCommandEvent &event);
void Menu_Language_Click(wxCommandEvent &event);
void Menu_ResetAllSettings_Click(wxCommandEvent &event);
void Menu_IsoBrowse_Click(wxCommandEvent &event);

View File

@ -67,12 +67,6 @@ void MainEmuFrame::Menu_SelectPluginsBios_Click(wxCommandEvent &event)
AppOpenDialog<ComponentsConfigDialog>( this );
}
void MainEmuFrame::Menu_Language_Click(wxCommandEvent &event)
{
//AppOpenDialog<InterfaceConfigDialog>( this );
InterfaceConfigDialog(this).ShowModal();
}
void MainEmuFrame::Menu_ChangeLang(wxCommandEvent &event) // Always in English
{
AppOpenDialog<InterfaceLanguageDialog>(this);

View File

@ -1,16 +0,0 @@
/* PCSX2 - PS2 Emulator for PCs
* Copyright (C) 2002-2010 PCSX2 Dev Team
*
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with PCSX2.
* If not, see <http://www.gnu.org/licenses/>.
*/
#include "PrecompiledHeader.h"

View File

@ -439,21 +439,6 @@ namespace Panels
StandardPathsPanel( wxWindow* parent );
};
// --------------------------------------------------------------------------------------
// AppearanceThemesPanel
// --------------------------------------------------------------------------------------
class AppearanceThemesPanel : public BaseApplicableConfigPanel
{
typedef BaseApplicableConfigPanel _parent;
public:
virtual ~AppearanceThemesPanel() throw();
AppearanceThemesPanel( wxWindow* parent );
void Apply();
void AppStatusEvent_OnSettingsApplied();
};
// --------------------------------------------------------------------------------------
// BaseSelectorPanel
// --------------------------------------------------------------------------------------

View File

@ -1,115 +0,0 @@
/* PCSX2 - PS2 Emulator for PCs
* Copyright (C) 2002-2010 PCSX2 Dev Team
*
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with PCSX2.
* If not, see <http://www.gnu.org/licenses/>.
*/
#include "PrecompiledHeader.h"
#include "App.h"
#include "ConfigurationPanels.h"
#include <wx/dir.h>
#include <wx/filepicker.h>
#include <wx/listbox.h>
#include <wx/zipstrm.h>
#include <memory>
using namespace pxSizerFlags;
// =====================================================================================================
// ThemeSelectorPanel
// =====================================================================================================
Panels::ThemeSelectorPanel::ThemeSelectorPanel( wxWindow* parent )
: _parent( parent )
{
SetMinWidth( 480 );
m_ComboBox = new wxListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_SINGLE | wxLB_SORT | wxLB_NEEDED_SB );
m_FolderPicker = new DirPickerPanel( this, FolderId_Themes,
_("Themes Search Path:"), // static box label
_("Select folder containing PCSX2 visual themes") // dir picker popup label
);
m_ComboBox->SetFont( pxGetFixedFont( m_ComboBox->GetFont().GetPointSize()+1 ) );
m_ComboBox->SetMinSize( wxSize( wxDefaultCoord, std::max( m_ComboBox->GetMinSize().GetHeight(), 96 ) ) );
if (InstallationMode != InstallMode_Portable)
m_FolderPicker->SetStaticDesc( _("Click the Browse button to select a different folder containing PCSX2 visual themes.") );
wxButton* refreshButton = new wxButton( this, wxID_ANY, _("Refresh list") );
*this += Label(_("Select a visual theme:"));
*this += m_ComboBox | StdExpand();
*this += refreshButton | pxBorder(wxLEFT, StdPadding);
*this += 8;
*this += m_FolderPicker | StdExpand();
Bind(wxEVT_BUTTON, &ThemeSelectorPanel::OnRefreshSelections, this, refreshButton->GetId());
}
Panels::ThemeSelectorPanel::~ThemeSelectorPanel() throw ()
{
}
void Panels::ThemeSelectorPanel::Apply()
{
}
void Panels::ThemeSelectorPanel::AppStatusEvent_OnSettingsApplied()
{
}
bool Panels::ThemeSelectorPanel::ValidateEnumerationStatus()
{
bool validated = true;
// Impl Note: unique_ptr used so that resources get cleaned up if an exception
// occurs during file enumeration.
std::unique_ptr<wxArrayString> themelist(new wxArrayString());
if( m_FolderPicker->GetPath().Exists() )
{
wxDir::GetAllFiles(m_FolderPicker->GetPath().ToString(), themelist.get(), L"*.zip;*.p2ui", wxDIR_FILES);
wxDir::GetAllFiles(m_FolderPicker->GetPath().ToString(), themelist.get(), L"*.*", wxDIR_DIRS);
}
if( !m_ThemeList || (*themelist != *m_ThemeList) )
validated = false;
m_ThemeList.swap(themelist);
return validated;
}
void Panels::ThemeSelectorPanel::DoRefresh()
{
if( !m_ThemeList ) return;
m_ComboBox->Clear();
const wxFileName right( g_Conf->FullpathToBios() );
for( size_t i=0; i<m_ThemeList->GetCount(); ++i )
{
wxString description;
//if( !IsBIOS((*m_BiosList)[i], description) ) continue;
//wxZipInputStream woot;
int sel = m_ComboBox->Append( description, (void*)i );
if( wxFileName((*m_ThemeList)[i] ) == right )
m_ComboBox->SetSelection( sel );
}
}

View File

@ -382,7 +382,6 @@
<ClCompile Include="..\..\gui\Dialogs\LogOptionsDialog.cpp" />
<ClCompile Include="..\..\gui\Dialogs\PickUserModeDialog.cpp" />
<ClCompile Include="..\..\gui\Dialogs\SysConfigDialog.cpp" />
<ClCompile Include="..\..\gui\Panels\AudioPanel.cpp" />
<ClCompile Include="..\..\gui\Panels\BaseApplicableConfigPanel.cpp" />
<ClCompile Include="..\..\gui\Panels\BiosSelectorPanel.cpp" />
<ClCompile Include="..\..\gui\Panels\CpuPanel.cpp" />

View File

@ -680,9 +680,6 @@
<ClCompile Include="..\..\gui\Dialogs\SysConfigDialog.cpp">
<Filter>AppHost\Dialogs</Filter>
</ClCompile>
<ClCompile Include="..\..\gui\Panels\AudioPanel.cpp">
<Filter>AppHost\Panels</Filter>
</ClCompile>
<ClCompile Include="..\..\gui\Panels\BaseApplicableConfigPanel.cpp">
<Filter>AppHost\Panels</Filter>
</ClCompile>