mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-05-03 07:18:04 +03:00
Linux build fix.
Also move the primary translation pot file to the external repository to facilitate updating translations when strings in the code are changed. Now the only time the primary dolphin repository needs to be changed for translations is when a new language is added. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7438 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
b6222a5b61
commit
d5c4976532
5 changed files with 53 additions and 4819 deletions
|
@ -58,9 +58,57 @@ SettingRadioButton::SettingRadioButton(wxWindow* parent, const wxString& label,
|
|||
_connect_macro_(this, SettingRadioButton::UpdateValue, wxEVT_COMMAND_RADIOBUTTON_SELECTED, this);
|
||||
}
|
||||
|
||||
// partial specialization (SettingChoice template)
|
||||
template<>
|
||||
void StringSettingChoice::UpdateValue(wxCommandEvent& ev)
|
||||
{
|
||||
m_setting = ev.GetString().mb_str();
|
||||
if (_type == allow_3State)
|
||||
{
|
||||
if (m_index != 0) // Choice ctrl with 3RD option
|
||||
{
|
||||
// changing state value should be done here, never outside this block
|
||||
if (ev.GetInt() == 0)
|
||||
{
|
||||
UpdateUIState(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
UpdateUIState(true);
|
||||
if (ev.GetInt() == 1) m_setting.clear();
|
||||
}
|
||||
}
|
||||
else // Choice ctrl without 3RD option
|
||||
{
|
||||
if (m_uistate)
|
||||
if (!*m_uistate) *d_setting = m_setting;
|
||||
}
|
||||
}
|
||||
ev.Skip();
|
||||
}
|
||||
|
||||
template<>
|
||||
wxClassInfo IntSettingChoice::ms_classInfo(wxT("IntSettingChoice"),
|
||||
&wxChoice::ms_classInfo, NULL, (int)sizeof(IntSettingChoice),
|
||||
(wxObjectConstructorFn) NULL);
|
||||
|
||||
template<>
|
||||
wxClassInfo *IntSettingChoice::GetClassInfo() const
|
||||
{
|
||||
return &IntSettingChoice::ms_classInfo;
|
||||
}
|
||||
|
||||
template<>
|
||||
wxClassInfo StringSettingChoice::ms_classInfo(wxT("StringSettingChoice"),
|
||||
&wxChoice::ms_classInfo, NULL, (int)sizeof(StringSettingChoice),
|
||||
(wxObjectConstructorFn) NULL);
|
||||
|
||||
template<>
|
||||
wxClassInfo *StringSettingChoice::GetClassInfo() const
|
||||
{
|
||||
return &StringSettingChoice::ms_classInfo;
|
||||
}
|
||||
|
||||
IMPLEMENT_CLASS(IntSettingChoice, wxChoice)
|
||||
IMPLEMENT_CLASS(StringSettingChoice, wxChoice)
|
||||
template <typename V>
|
||||
SettingChoice<V>::SettingChoice(wxWindow* parent, V &setting, V &def_setting, bool &state, int &cur_index, const wxString& tooltip, int num, const wxString choices[], long style)
|
||||
: _pattern(&state, allow_3State)
|
||||
|
|
|
@ -192,34 +192,6 @@ private:
|
|||
int &m_index;
|
||||
};
|
||||
|
||||
// partial specialization (SettingChoice template)
|
||||
void SettingChoice<std::string>::UpdateValue(wxCommandEvent& ev)
|
||||
{
|
||||
m_setting = ev.GetString().mb_str();
|
||||
if (_type == allow_3State)
|
||||
{
|
||||
if (m_index != 0) // Choice ctrl with 3RD option
|
||||
{
|
||||
// changing state value should be done here, never outside this block
|
||||
if (ev.GetInt() == 0)
|
||||
{
|
||||
UpdateUIState(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
UpdateUIState(true);
|
||||
if (ev.GetInt() == 1) m_setting.clear();
|
||||
}
|
||||
}
|
||||
else // Choice ctrl without 3RD option
|
||||
{
|
||||
if (m_uistate)
|
||||
if (!*m_uistate) *d_setting = m_setting;
|
||||
}
|
||||
}
|
||||
ev.Skip();
|
||||
}
|
||||
|
||||
typedef SettingChoice<int> IntSettingChoice;
|
||||
typedef SettingChoice<std::string> StringSettingChoice;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue