Merge branch 'main' into dev/h2d-2

# Conflicts:
#	localization/i18n/list.txt
#	src/slic3r/GUI/CalibrationWizardPresetPage.cpp
#	src/slic3r/GUI/DeviceManager.cpp
#	src/slic3r/GUI/DeviceManager.hpp
#	src/slic3r/GUI/Printer/PrinterFileSystem.cpp
#	src/slic3r/GUI/Printer/PrinterFileSystem.h
#	src/slic3r/GUI/SelectMachine.hpp
#	src/slic3r/GUI/SendToPrinter.cpp
#	src/slic3r/GUI/SendToPrinter.hpp
#	src/slic3r/GUI/StatusPanel.hpp
#	src/slic3r/GUI/Widgets/AnimaController.cpp
This commit is contained in:
Noisyfox
2025-10-24 09:44:41 +08:00
36 changed files with 3565 additions and 80 deletions

View File

@@ -22,6 +22,7 @@ wxDECLARE_EVENT(EVT_FILE_CHANGED, wxCommandEvent);
wxDECLARE_EVENT(EVT_SELECT_CHANGED, wxCommandEvent);
wxDECLARE_EVENT(EVT_THUMBNAIL, wxCommandEvent);
wxDECLARE_EVENT(EVT_DOWNLOAD, wxCommandEvent);
wxDECLARE_EVENT(EVT_RAMDOWNLOAD, wxCommandEvent);
wxDECLARE_EVENT(EVT_MEDIA_ABILITY_CHANGED, wxCommandEvent);
wxDECLARE_EVENT(EVT_UPLOADING, wxCommandEvent);
wxDECLARE_EVENT(EVT_UPLOAD_CHANGED, wxCommandEvent);
@@ -183,6 +184,17 @@ public:
void DownloadFiles(size_t index, std::string const &path);
void GetPickImage(int id, const std::string &local_path, const std::string &path);
void GetPickImages(const std::vector<std::string> &local_paths, const std::vector<std::string> &targetpaths);
void DownloadRamFile(int index, const std::string &local_path, const std::string &param);
void SendExistedFile();
void SendConnectFail();
void DownloadCheckFiles(std::string const &path);
bool DownloadCheckFile(size_t index);
@@ -275,7 +287,7 @@ private:
typedef std::function<int(std::string &msg)> callback_t3;
template<typename T> boost::uint32_t SendRequest(int type, json const &req, Translator<T> const &translator, Callback<T> const &callback)
template<typename T> boost::uint32_t SendRequest(int type, json const &req, Translator<T> const &translator, Callback<T> const &callback, const std::string &param = "")
{
auto c = [translator, callback, this](int result, json const &resp, unsigned char const *data) -> int
{
@@ -292,7 +304,7 @@ private:
PostCallback<T>(callback, result, t);
return result;
};
return SendRequest(type, req, c);
return SendRequest(type, req, c, param);
}
template<typename T> using Applier = std::function<void(T const &)>;
@@ -322,7 +334,7 @@ private:
InstallNotify(type, c);
}
boost::uint32_t SendRequest(int type, json const &req, callback_t2 const &callback);
boost::uint32_t SendRequest(int type, json const &req, callback_t2 const &callback, const std::string &param = "");
void InstallNotify(int type, callback_t2 const &callback);
@@ -365,6 +377,8 @@ private:
size_t m_lock_end = 0;
int m_task_flags = 0;
std::vector<bool> m_download_states;
private:
struct Session
{