diff options
author | bubnikv <bubnikv@gmail.com> | 2019-08-29 15:07:45 +0300 |
---|---|---|
committer | bubnikv <bubnikv@gmail.com> | 2019-08-29 15:07:45 +0300 |
commit | 468abfefbc6ef2b25271deb012f3109d191eb226 (patch) | |
tree | 61c4c9c271c4fb0762ddf69678a185063c399124 /src/slic3r/GUI/GUI_App.hpp | |
parent | d60480ca7c0f4eb8a038617a7c9a25057bbb7919 (diff) |
Reworked selection of locales and translation dictionaries.
Slicer now tries to heed user's locales, also it tries to switch
to the language recommended by the operating system (Windows & OSX
specific).
Diffstat (limited to 'src/slic3r/GUI/GUI_App.hpp')
-rw-r--r-- | src/slic3r/GUI/GUI_App.hpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/slic3r/GUI/GUI_App.hpp b/src/slic3r/GUI/GUI_App.hpp index 52c2a7a26..83017f176 100644 --- a/src/slic3r/GUI/GUI_App.hpp +++ b/src/slic3r/GUI/GUI_App.hpp @@ -88,7 +88,7 @@ class GUI_App : public wxApp size_t m_em_unit; // width of a "m"-symbol in pixels for current system font // Note: for 100% Scale m_em_unit = 10 -> it's a good enough coefficient for a size setting of controls - wxLocale* m_wxLocale{ nullptr }; + std::unique_ptr<wxLocale> m_wxLocale; std::unique_ptr<ImGuiWrapper> m_imgui; std::unique_ptr<PrintHostJobQueue> m_printhost_job_queue; @@ -132,7 +132,7 @@ public: void update_ui_from_settings(); bool switch_language(); - bool load_language(wxString language); + bool load_language(wxString language, bool initial); Tab* get_tab(Preset::Type type); ConfigOptionMode get_mode(); @@ -144,7 +144,7 @@ public: bool checked_tab(Tab* tab); void load_current_presets(); - wxString current_language_code() const { assert(m_wxLocale != nullptr); return m_wxLocale->GetCanonicalName(); } + wxString current_language_code() const { return m_wxLocale->GetCanonicalName(); } // Translate the language code to a code, for which Prusa Research maintains translations. Defaults to "en_US". wxString current_language_code_safe() const; @@ -187,7 +187,6 @@ private: void window_pos_restore(wxTopLevelWindow* window, const std::string &name, bool default_maximized = false); void window_pos_sanitize(wxTopLevelWindow* window); bool select_language(); - std::vector<const wxLanguageInfo*> get_installed_languages(); #ifdef __WXMSW__ void associate_3mf_files(); #endif // __WXMSW__ |