mirror of https://github.com/PCSX2/pcsx2.git
UI: change language: more standard dialog and better Apply button
The Apply button was part of the language panel, now it's part of the dialog. Also, The Apply button is now enabled/disabled correctly.
This commit is contained in:
parent
2b567e51ff
commit
10040f82e0
|
@ -278,9 +278,9 @@ Dialogs::InterfaceLanguageDialog::InterfaceLanguageDialog(wxWindow* parent)
|
|||
// Keep this in English - same as the menu item.
|
||||
*this += Heading(L"New language will affect newly opened windows.\n");
|
||||
*this += Heading(L"Full change will happen after restarting PCSX2.");
|
||||
*this += new Panels::LanguageSelectionPanel(this) | StdCenter();
|
||||
*this += new Panels::LanguageSelectionPanel(this, false) | StdCenter();
|
||||
|
||||
wxDialogWithHelpers::AddOkCancel();
|
||||
AddOkCancel();
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
|
|
|
@ -109,7 +109,7 @@ namespace Panels
|
|||
|
||||
public:
|
||||
virtual ~LanguageSelectionPanel() throw() { }
|
||||
LanguageSelectionPanel( wxWindow* parent );
|
||||
LanguageSelectionPanel( wxWindow* parent, bool showApply = true );
|
||||
|
||||
void Apply();
|
||||
void AppStatusEvent_OnSettingsApplied();
|
||||
|
|
|
@ -100,7 +100,7 @@ void Panels::DocsFolderPickerPanel::OnRadioChanged( wxCommandEvent& evt )
|
|||
// --------------------------------------------------------------------------------------
|
||||
// LanguageSelectionPanel
|
||||
// --------------------------------------------------------------------------------------
|
||||
Panels::LanguageSelectionPanel::LanguageSelectionPanel( wxWindow* parent )
|
||||
Panels::LanguageSelectionPanel::LanguageSelectionPanel( wxWindow* parent, bool showApply )
|
||||
: BaseApplicableConfigPanel( parent, wxHORIZONTAL )
|
||||
{
|
||||
m_picker = NULL;
|
||||
|
@ -115,14 +115,18 @@ Panels::LanguageSelectionPanel::LanguageSelectionPanel( wxWindow* parent )
|
|||
m_picker = new wxComboBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize,
|
||||
size, compiled.GetPtr(), wxCB_READONLY | wxCB_SORT );
|
||||
|
||||
wxButton* applyButton = new wxButton( this, pxID_RestartWizard, _("Apply") );
|
||||
applyButton->SetToolTip(_("Make this language my default right now!"));
|
||||
|
||||
*this += 5;
|
||||
*this += m_picker | pxSizerFlags::StdSpace();
|
||||
*this += 5;
|
||||
|
||||
if (showApply)
|
||||
{
|
||||
wxButton* applyButton = new wxButton( this, pxID_RestartWizard, _("Apply") );
|
||||
applyButton->SetToolTip(_("Make this language my default right now!"));
|
||||
|
||||
*this += applyButton | pxSizerFlags::StdSpace();
|
||||
*this += 5;
|
||||
}
|
||||
|
||||
Connect( pxID_RestartWizard, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LanguageSelectionPanel::OnApplyLanguage_Clicked ) );
|
||||
|
||||
|
|
Loading…
Reference in New Issue