Path: blob/main/cad/OrcaSlicer/files/patch-src_slic3r_GUI_GUI__App.cpp
46591 views
--- src/slic3r/GUI/GUI_App.cpp.orig 2026-03-22 17:56:38 UTC1+++ src/slic3r/GUI/GUI_App.cpp2@@ -473,7 +473,7 @@ class SplashScreen : public wxSplashScreen (private)3m_constant_text;4};56-#ifdef __linux__7+#if defined(__linux__) || defined(__FreeBSD__)8static void migrate_flatpak_legacy_datadir(const boost::filesystem::path &data_dir_path)9{10if(!boost::filesystem::exists("/.flatpak-info"))11@@ -927,6 +927,7 @@ void GUI_App::post_init()12}13else {14BOOST_LOG_TRIVIAL(warning) << __FUNCTION__ << "Found glcontext not ready, postpone the init";15+ plater_->canvas3D()->enable_render(true);16}17//#endif18if (is_editor())19@@ -2319,7 +2320,7 @@ bool GUI_App::init_opengl()2021bool GUI_App::init_opengl()22{23-#ifdef __linux__24+#if defined(__linux__) || defined(__FreeBSD__)25bool status = m_opengl_mgr.init_gl();26m_opengl_initialized = true;27return status;28@@ -2761,7 +2762,7 @@ bool GUI_App::on_init_inner()29wxCHECK_MSG(wxDirExists(resources_dir), false,30wxString::Format(_L("Resources path does not exist or is not a directory: %s"), resources_dir));3132-#ifdef __linux__33+#if defined(__linux__) || defined(__FreeBSD__)34if (! check_old_linux_datadir(GetAppName())) {35std::cerr << "Quitting, user chose to move their data to new location." << std::endl;36return false;37@@ -2907,7 +2908,7 @@ bool GUI_App::on_init_inner()3839BOOST_LOG_TRIVIAL(info) << "begin to show the splash screen...";40//BBS use BBL splashScreen41- scrn = new SplashScreen(bmp, wxSPLASH_CENTRE_ON_SCREEN | wxSPLASH_TIMEOUT, 1500, splashscreen_pos);42+ scrn = new SplashScreen(bmp, wxSPLASH_CENTRE_ON_SCREEN, 0, splashscreen_pos);43wxYield();44scrn->SetText(_L("Loading configuration")+ dots);45}46@@ -3143,6 +3144,11 @@ bool GUI_App::on_init_inner()47mainframe->Show(true);48BOOST_LOG_TRIVIAL(info) << "main frame firstly shown";4950+ if (scrn) {51+ scrn->Close();52+ scrn = nullptr;53+ }54+55//#if BBL_HAS_FIRST_PAGE56//BBS: set tp3DEditor firstly57/*plater_->canvas3D()->enable_render(false);58@@ -5000,7 +5006,7 @@ void GUI_App::check_new_version(bool show_tips, int by59#ifdef __APPLE__60platform = "macos";61#endif62-#ifdef __LINUX__63+#if defined(__linux__) || defined(__FreeBSD__)64platform = "linux";65#endif66std::string query_params = (boost::format("?name=slicer&version=%1%&guide_version=%2%")67@@ -5083,7 +5089,7 @@ std::string detect_updater_os()68return "win";69#elif defined(__APPLE__)70return "macos";71-#elif defined(__linux__) || defined(__LINUX__)72+#elif defined(__linux__) || defined(__LINUX__) || defined(__FreeBSD__)73return "linux";74#else75return "unknown";76@@ -6151,7 +6157,7 @@ bool GUI_App::switch_language()77}78}7980-#ifdef __linux__81+#if defined(__linux__) || defined(__FreeBSD__)82static const wxLanguageInfo* linux_get_existing_locale_language(const wxLanguageInfo* language,83const wxLanguageInfo* system_language)84{85@@ -6359,7 +6365,7 @@ bool GUI_App::load_language(wxString language, bool in86m_language_info_best->CanonicalName.ToUTF8().data();87app_config->set("language", m_language_info_best->CanonicalName.ToUTF8().data());88}89-#ifdef __linux__90+#if defined(__linux__) || defined(__FreeBSD__)91wxString lc_all;92if (wxGetEnv("LC_ALL", &lc_all) && !lc_all.IsEmpty()) {93// Best language returned by wxWidgets on Linux apparently does not respect LC_ALL.94@@ -6417,7 +6423,7 @@ bool GUI_App::load_language(wxString language, bool in95BOOST_LOG_TRIVIAL(info) << "Using Czech dictionaries for Slovak language";96}9798-#ifdef __linux__99+#if defined(__linux__) || defined(__FreeBSD__)100// If we can't find this locale , try to use different one for the language101// instead of just reporting that it is impossible to switch.102if (!wxLocale::IsAvailable(locale_language_info->Language) && m_language_info_system) {103@@ -7599,7 +7605,7 @@ void GUI_App::show_desktop_integration_dialog()104105void GUI_App::show_desktop_integration_dialog()106{107-#ifdef __linux__108+#if defined(__linux__) || defined(__FreeBSD__)109//wxCHECK_MSG(mainframe != nullptr, false, "Internal error: Main frame not created / null");110DesktopIntegrationDialog dialog(mainframe);111dialog.ShowModal();112@@ -7985,7 +7991,7 @@ void GUI_App::associate_url(std::wstring url_prefix)113key_full.Create(false);114}115key_full = key_string;116-#elif defined(__linux__) && defined(SLIC3R_DESKTOP_INTEGRATION)117+#elif (defined(__linux__) || defined(__FreeBSD__)) && defined(SLIC3R_DESKTOP_INTEGRATION)118DesktopIntegrationDialog::perform_downloader_desktop_integration(into_u8(url_prefix));119#endif // WIN32120}121122123