diff options
| author | Glenn Rice <glennricster@gmail.com> | 2011-04-06 13:58:03 +0000 |
|---|---|---|
| committer | Glenn Rice <glennricster@gmail.com> | 2011-04-06 13:58:03 +0000 |
| commit | d5c4976532fc22f8d2e09e1d06cadb12336df17c (patch) | |
| tree | 0cb76f6b30b20a1dd7141168cc31fa3d4105caea /Source/Core | |
| parent | b6222a5b611432c614c47853782e0048da073596 (diff) | |
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
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/DolphinWX/Src/VideoConfigDiag.cpp | 52 | ||||
| -rw-r--r-- | Source/Core/DolphinWX/Src/VideoConfigDiag.h | 28 |
2 files changed, 50 insertions, 30 deletions
diff --git a/Source/Core/DolphinWX/Src/VideoConfigDiag.cpp b/Source/Core/DolphinWX/Src/VideoConfigDiag.cpp index 199daddb37..23c27fb4e2 100644 --- a/Source/Core/DolphinWX/Src/VideoConfigDiag.cpp +++ b/Source/Core/DolphinWX/Src/VideoConfigDiag.cpp @@ -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) diff --git a/Source/Core/DolphinWX/Src/VideoConfigDiag.h b/Source/Core/DolphinWX/Src/VideoConfigDiag.h index 7dd036dce0..2a0b24aef5 100644 --- a/Source/Core/DolphinWX/Src/VideoConfigDiag.h +++ b/Source/Core/DolphinWX/Src/VideoConfigDiag.h @@ -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; |
