mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-22 22:24:01 -06:00
Merge remote-tracking branch 'remote/master' into feature/merge_upstream
# Conflicts: # bbl/i18n/OrcaSlicer.pot # bbl/i18n/de/OrcaSlicer_de.po # bbl/i18n/en/OrcaSlicer_en.po # bbl/i18n/es/OrcaSlicer_es.po # bbl/i18n/fr/OrcaSlicer_fr.po # bbl/i18n/hu/OrcaSlicer_hu.po # bbl/i18n/it/OrcaSlicer_it.po # bbl/i18n/ja/OrcaSlicer_ja.po # bbl/i18n/nl/OrcaSlicer_nl.po # bbl/i18n/sv/OrcaSlicer_sv.po # bbl/i18n/zh_cn/OrcaSlicer_zh_CN.po # resources/config.json # resources/i18n/de/BambuStudio.mo # resources/i18n/en/BambuStudio.mo # resources/i18n/es/BambuStudio.mo # resources/i18n/fr/BambuStudio.mo # resources/i18n/hu/BambuStudio.mo # resources/i18n/it/BambuStudio.mo # resources/i18n/ja/OrcaSlicer.mo # resources/i18n/nl/BambuStudio.mo # resources/i18n/sv/BambuStudio.mo # resources/i18n/zh_cn/BambuStudio.mo # resources/images/ams_humidity_2.svg # resources/images/ams_humidity_3.svg # resources/images/ams_humidity_4.svg # resources/images/ams_humidity_tips.svg # resources/images/monitor_state_on.svg # resources/images/sdcard_state_normal.svg # resources/profiles/BBL.json # resources/profiles/BBL/filament/Bambu PETG-CF @base.json # resources/profiles/BBL/filament/Generic PETG-CF @base.json # resources/profiles/BBL/machine/Bambu Lab P1P 0.4 nozzle.json # resources/web/data/text.js # resources/web/guide/3/index.html # resources/web/guide/31/index.html # src/BambuStudio.cpp # src/libslic3r/AABBTreeLines.hpp # src/libslic3r/Brim.cpp # src/libslic3r/CMakeLists.txt # src/libslic3r/ExPolygon.hpp # src/libslic3r/Fill/FillBase.hpp # src/libslic3r/Format/bbs_3mf.cpp # src/libslic3r/GCodeWriter.cpp # src/libslic3r/Line.hpp # src/libslic3r/PerimeterGenerator.cpp # src/libslic3r/Preset.cpp # src/libslic3r/Print.cpp # src/libslic3r/Print.hpp # src/libslic3r/PrintConfig.cpp # src/libslic3r/PrintConfig.hpp # src/libslic3r/TreeSupport.cpp # src/slic3r/GUI/AmsMappingPopup.cpp # src/slic3r/GUI/BackgroundSlicingProcess.cpp # src/slic3r/GUI/ConfigManipulation.cpp # src/slic3r/GUI/GCodeViewer.cpp # src/slic3r/GUI/GCodeViewer.hpp # src/slic3r/GUI/GLCanvas3D.cpp # src/slic3r/GUI/GUI_App.cpp # src/slic3r/GUI/MainFrame.cpp # src/slic3r/GUI/PartPlate.cpp # src/slic3r/GUI/Plater.cpp # src/slic3r/GUI/Preferences.cpp # src/slic3r/GUI/SelectMachine.cpp # src/slic3r/GUI/Widgets/AMSControl.cpp # src/slic3r/GUI/wxMediaCtrl2.cpp # src/slic3r/Utils/Process.cpp # version.inc
This commit is contained in:
commit
9f598046d1
658 changed files with 70312 additions and 4877 deletions
|
@ -31,9 +31,9 @@ MediaFilePanel::MediaFilePanel(wxWindow * parent)
|
|||
m_button_year = new ::Button(m_time_panel, _L("Year"), "", wxBORDER_NONE);
|
||||
m_button_month = new ::Button(m_time_panel, _L("Month"), "", wxBORDER_NONE);
|
||||
m_button_all = new ::Button(m_time_panel, _L("All Files"), "", wxBORDER_NONE);
|
||||
m_button_year->SetToolTip(L("Group files by year, recent first."));
|
||||
m_button_month->SetToolTip(L("Group files by month, recent first."));
|
||||
m_button_all->SetToolTip(L("Show all files, recent first."));
|
||||
m_button_year->SetToolTip(_L("Group files by year, recent first."));
|
||||
m_button_month->SetToolTip(_L("Group files by month, recent first."));
|
||||
m_button_all->SetToolTip(_L("Show all files, recent first."));
|
||||
m_button_all->SetFont(Label::Head_14); // sync with m_last_mode
|
||||
for (auto b : {m_button_year, m_button_month, m_button_all}) {
|
||||
b->SetBackgroundColor(StateColor());
|
||||
|
@ -228,14 +228,15 @@ void MediaFilePanel::SetMachineObject(MachineObject* obj)
|
|||
m_button_download->Enable(e.GetInt() > 0);
|
||||
});
|
||||
fs->Bind(EVT_MODE_CHANGED, &MediaFilePanel::modeChanged, this);
|
||||
fs->Bind(EVT_STATUS_CHANGED, [this, wfs = boost::weak_ptr(fs)](auto &e) {
|
||||
fs->Bind(EVT_STATUS_CHANGED, [this, wfs = boost::weak_ptr(fs)](auto& e) {
|
||||
e.Skip();
|
||||
boost::shared_ptr fs(wfs.lock());
|
||||
if (m_image_grid->GetFileSystem() != fs) // canceled
|
||||
return;
|
||||
ScalableBitmap icon;
|
||||
wxString msg;
|
||||
switch (e.GetInt()) {
|
||||
int status = e.GetInt();
|
||||
switch (status) {
|
||||
case PrinterFileSystem::Initializing: icon = m_bmp_loading; msg = _L("Initializing..."); break;
|
||||
case PrinterFileSystem::Connecting: icon = m_bmp_loading; msg = _L("Connecting..."); break;
|
||||
case PrinterFileSystem::Failed: icon = m_bmp_failed; msg = _L("Connect failed [%d]!"); break;
|
||||
|
@ -246,6 +247,53 @@ void MediaFilePanel::SetMachineObject(MachineObject* obj)
|
|||
m_image_grid->SetStatus(icon, msg);
|
||||
if (e.GetInt() == PrinterFileSystem::Initializing)
|
||||
fetchUrl(boost::weak_ptr(fs));
|
||||
|
||||
if (status == PrinterFileSystem::Failed
|
||||
|| status == PrinterFileSystem::ListReady) {
|
||||
json j;
|
||||
j["code"] = fs->GetLastError();
|
||||
j["dev_id"] = m_machine;
|
||||
j["dev_ip"] = m_lan_ip;
|
||||
NetworkAgent* agent = wxGetApp().getAgent();
|
||||
if (status == PrinterFileSystem::Failed) {
|
||||
j["result"] = "failed";
|
||||
if (agent)
|
||||
agent->track_event("download_video_conn", j.dump());
|
||||
} else if (status == PrinterFileSystem::ListReady) {
|
||||
j["result"] = "success";
|
||||
if (agent)
|
||||
agent->track_event("download_video_conn", j.dump());
|
||||
}
|
||||
}
|
||||
});
|
||||
fs->Bind(EVT_DOWNLOAD, [this, wfs = boost::weak_ptr(fs)](auto& e) {
|
||||
e.Skip();
|
||||
boost::shared_ptr fs(wfs.lock());
|
||||
if (m_image_grid->GetFileSystem() != fs) // canceled
|
||||
return;
|
||||
|
||||
int result = e.GetExtraLong();
|
||||
NetworkAgent* agent = wxGetApp().getAgent();
|
||||
if (result > 1 || result == 0) {
|
||||
json j;
|
||||
j["code"] = result;
|
||||
j["dev_id"] = m_machine;
|
||||
j["dev_ip"] = m_lan_ip;
|
||||
if (result > 1) {
|
||||
// download failed
|
||||
j["result"] = "failed";
|
||||
if (agent) {
|
||||
agent->track_event("download_video", j.dump());
|
||||
}
|
||||
} else if (result == 0) {
|
||||
// download success
|
||||
j["result"] = "success";
|
||||
if (agent) {
|
||||
agent->track_event("download_video", j.dump());
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
});
|
||||
if (IsShown()) fs->Start();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue