From 8911f696d60eaffe877c63788ee66beb70826ab9 Mon Sep 17 00:00:00 2001 From: alves Date: Tue, 30 Dec 2025 14:23:17 +0800 Subject: [PATCH] feature remove not work code. --- src/slic3r/GUI/GUI_App.cpp | 21 --------------------- src/slic3r/GUI/GUI_App.hpp | 1 - src/slic3r/GUI/UpdateDialogs.cpp | 1 - src/slic3r/GUI/WebSMUserLoginDialog.cpp | 1 - src/slic3r/GUI/WebUserLoginDialog.cpp | 1 - 5 files changed, 25 deletions(-) diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index 810d1f1cb1..8f297823d0 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -4295,27 +4295,6 @@ std::string GUI_App::handle_web_request(std::string cmd) return ""; } -void GUI_App::handle_script_message(std::string msg) -{ - try { - json j = json::parse(msg); - if (j.contains("command")) { - wxString cmd = j["command"]; - if (cmd == "user_login") { - if (m_agent) { - m_agent->change_user(j.dump()); - if (m_agent->is_user_login()) { - request_user_login(1); - } - } - } - } - } - catch (...) { - ; - } -} - void GUI_App::request_model_download(wxString url) { if (plater_) { diff --git a/src/slic3r/GUI/GUI_App.hpp b/src/slic3r/GUI/GUI_App.hpp index ebc867febb..ec2a8922fd 100644 --- a/src/slic3r/GUI/GUI_App.hpp +++ b/src/slic3r/GUI/GUI_App.hpp @@ -561,7 +561,6 @@ private: void request_user_logout(); int request_user_unbind(std::string dev_id); std::string handle_web_request(std::string cmd); - void handle_script_message(std::string msg); void request_model_download(wxString url); void download_project(std::string project_id); void request_project_download(std::string project_id); diff --git a/src/slic3r/GUI/UpdateDialogs.cpp b/src/slic3r/GUI/UpdateDialogs.cpp index 780329523d..9a9f2eafd1 100644 --- a/src/slic3r/GUI/UpdateDialogs.cpp +++ b/src/slic3r/GUI/UpdateDialogs.cpp @@ -121,7 +121,6 @@ MsgUpdateConfig::MsgUpdateConfig(const std::vector &updates, bool force_ wxBoxSizer *m_sizer_right = new wxBoxSizer(wxVERTICAL); - auto m_text_up_info = new wxStaticText(this, wxID_ANY, _L("A new configuration package is available. Do you want to install it?"), wxDefaultPosition, wxDefaultSize, 0); m_text_up_info->SetFont(::Label::Head_14); m_text_up_info->SetForegroundColour(wxColour(0x26, 0x2E, 0x30)); diff --git a/src/slic3r/GUI/WebSMUserLoginDialog.cpp b/src/slic3r/GUI/WebSMUserLoginDialog.cpp index 5292c4cd67..a886588cac 100644 --- a/src/slic3r/GUI/WebSMUserLoginDialog.cpp +++ b/src/slic3r/GUI/WebSMUserLoginDialog.cpp @@ -305,7 +305,6 @@ void SMUserLogin::OnScriptMessage(wxWebViewEvent &evt) } if (strCmd == "user_login") { j["data"]["autotest_token"] = m_AutotestToken; - wxGetApp().handle_script_message(j.dump()); Close(); } else if (strCmd == "get_localhost_url") { diff --git a/src/slic3r/GUI/WebUserLoginDialog.cpp b/src/slic3r/GUI/WebUserLoginDialog.cpp index 5afc43568a..48f90920df 100644 --- a/src/slic3r/GUI/WebUserLoginDialog.cpp +++ b/src/slic3r/GUI/WebUserLoginDialog.cpp @@ -279,7 +279,6 @@ void ZUserLogin::OnScriptMessage(wxWebViewEvent &evt) } if (strCmd == "user_login") { j["data"]["autotest_token"] = m_AutotestToken; - wxGetApp().handle_script_message(j.dump()); Close(); } else if (strCmd == "get_localhost_url") {