Skip to content

Commit

Permalink
ENH: modify diff for github
Browse files Browse the repository at this point in the history
Change-Id: I3a441dbfa3167de3cee9fdafe62f7860fcb6891c
Signed-off-by: Stone Li <[email protected]>
  • Loading branch information
StoneLiBambulab authored and lanewei120 committed Dec 15, 2022
1 parent 65ff906 commit 00dfd1e
Show file tree
Hide file tree
Showing 13 changed files with 48 additions and 37 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ add_custom_target(gettext_make_pot
COMMAND xgettext --keyword=L --keyword=_L --keyword=_u8L --keyword=L_CONTEXT:1,2c --keyword=_L_PLURAL:1,2 --add-comments=TRN --from-code=UTF-8 --no-location --debug --boost
-f "${BBL_L18N_DIR}/list.txt"
-o "${BBL_L18N_DIR}/BambuStudio.pot"
COMMAND hintsToPot ${SLIC3R_RESOURCES_DIR} ${BBL_L18N_DIR}
COMMAND hintsToPot ${SLIC3R_RESOURCES_DIR} ${BBL_L18N_DIR}
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
COMMENT "Generate pot file from strings in the source tree"
)
Expand Down
1 change: 1 addition & 0 deletions localazy.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
},
"download": {
"folder": "bbl/i18n",
"includeSourceLang" : "true",
"files": {
"output": "${lang}/BambuStudio_${lang}.po"
}
Expand Down
4 changes: 2 additions & 2 deletions src/libslic3r/Fill/Fill.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,8 @@ std::vector<SurfaceFill> group_fills(const Layer &layer)
surface_fills.back().region_id = surface_fills[i].region_id;
surface_fills.back().surface.surface_type = stInternalSolid;
surface_fills.back().surface.thickness = surface_fills[i].surface.thickness;
surface_fills.back().region_id_group = surface_fills[i].region_id_group;
surface_fills.back().no_overlap_expolygons = surface_fills[i].no_overlap_expolygons;
surface_fills.back().region_id_group = surface_fills[i].region_id_group;
surface_fills.back().no_overlap_expolygons = surface_fills[i].no_overlap_expolygons;
for (size_t j = 0; j < narrow_expolygons_index.size(); j++) {
// BBS: move the narrow expolygons to new surface_fills.back();
surface_fills.back().expolygons.emplace_back(std::move(surface_fills[i].expolygons[narrow_expolygons_index[j]]));
Expand Down
3 changes: 2 additions & 1 deletion src/libslic3r/Preset.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -300,10 +300,11 @@ class Preset
std::string get_filament_type(std::string &display_filament_type);
std::string get_printer_type(PresetBundle *preset_bundle); // get edited preset type
std::string get_current_printer_type(PresetBundle *preset_bundle); // get current preset type
bool is_custom_defined();

bool is_bbl_vendor_preset(PresetBundle *preset_bundle);

bool is_custom_defined();


static const std::vector<std::string>& print_options();
static const std::vector<std::string>& filament_options();
Expand Down
4 changes: 3 additions & 1 deletion src/slic3r/GUI/BBLTopbar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,9 @@ void BBLTopbar::OnPublishClicked(wxAuiToolBarEvent& event)

//no more check
//if (GUI::wxGetApp().plater()->model().objects.empty()) return;
if (!wxGetApp().is_user_login()) return;

if (!wxGetApp().check_login())
return;

#ifdef ENABLE_PUBLISHING
wxGetApp().plater()->show_publish_dialog();
Expand Down
3 changes: 2 additions & 1 deletion src/slic3r/GUI/ConfigManipulation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ void ConfigManipulation::check_bed_temperature_difference(int bed_type, DynamicP
}

if (first_layer_bed_temp > vitrification || bed_temp > vitrification) {
const wxString msg_text = wxString::Format(_L("Bed temperature is higher than vitrification temperature of this filament.\nThis may cause nozzle blocked and printing failure\nPlease keep the printer open during the printing process to ensure air circulation or reduce the temperature of the hot bed"));
const wxString msg_text = wxString::Format(
_L("Bed temperature is higher than vitrification temperature of this filament.\nThis may cause nozzle blocked and printing failure\nPlease keep the printer open during the printing process to ensure air circulation or reduce the temperature of the hot bed"));
MessageDialog dialog(m_msg_dlg_parent, msg_text, "", wxICON_WARNING | wxOK);
is_msg_dlg_already_exist = true;
dialog.ShowModal();
Expand Down
18 changes: 13 additions & 5 deletions src/slic3r/GUI/DeviceManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1319,6 +1319,19 @@ int MachineObject::command_upgrade_firmware(FirmwareInfo info)
return this->publish_json(j.dump());
}

int MachineObject::command_upgrade_module(std::string url, std::string module_type, std::string version)
{
json j;
j["upgrade"]["command"] = "start";
j["upgrade"]["sequence_id"] = std::to_string(MachineObject::m_sequence_id++);
j["upgrade"]["url"] = url;
j["upgrade"]["module"] = module_type;
j["upgrade"]["version"] = version;
j["upgrade"]["src_id"] = 1;

return this->publish_json(j.dump());
}

int MachineObject::command_xyz_abs()
{
return this->publish_gcode("G90 \n");
Expand Down Expand Up @@ -2040,11 +2053,6 @@ int MachineObject::parse_json(std::string payload)
std::chrono::system_clock::time_point clock_start = std::chrono::system_clock::now();
this->set_online_state(true);

std::chrono::system_clock::time_point curr_time = std::chrono::system_clock::now();
auto diff1 = std::chrono::duration_cast<std::chrono::microseconds>(curr_time - last_update_time);

BOOST_LOG_TRIVIAL(info) << "interval = " << diff1.count();

/* update last received time */
last_update_time = std::chrono::system_clock::now();

Expand Down
1 change: 1 addition & 0 deletions src/slic3r/GUI/DeviceManager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,7 @@ class MachineObject
int command_upgrade_confirm();
int command_consistency_upgrade_confirm();
int command_upgrade_firmware(FirmwareInfo info);
int command_upgrade_module(std::string url, std::string module_type, std::string version);

/* control apis */
int command_xyz_abs();
Expand Down
7 changes: 4 additions & 3 deletions src/slic3r/GUI/GUI_App.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2722,8 +2722,9 @@ void GUI_App::UpdateDarkUI(wxWindow* window, bool highlited/* = false*/, bool ju
return;
}

if (m_is_dark_mode != dark_mode())
if (m_is_dark_mode != dark_mode() )
m_is_dark_mode = dark_mode();


if (m_is_dark_mode) {
auto original_col = window->GetBackgroundColour();
Expand Down Expand Up @@ -4372,15 +4373,15 @@ bool GUI_App::load_language(wxString language, bool initial)
else if (initial) {
// bbs supported languages
//TODO: use a global one with Preference
wxLanguage supported_languages[] {
wxLanguage supported_languages[]{
wxLANGUAGE_ENGLISH,
wxLANGUAGE_CHINESE_SIMPLIFIED,
wxLANGUAGE_GERMAN,
wxLANGUAGE_FRENCH,
wxLANGUAGE_SPANISH,
wxLANGUAGE_SWEDISH,
wxLANGUAGE_DUTCH,
wxLANGUAGE_HUNGARIAN };
wxLANGUAGE_HUNGARIAN};
std::string cur_language = app_config->get("language");
if (cur_language != "") {
//cleanup the language wrongly set before
Expand Down
30 changes: 16 additions & 14 deletions src/slic3r/GUI/MainFrame.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,19 +187,6 @@ class MainFrame : public DPIFrame
#endif

public:
MainFrame();
~MainFrame() = default;

//BBS GUI refactor
enum TabPosition
{
tpHome = 0,
tp3DEditor = 1,
//tpSettings = 1,
tpPreview = 2,
tpMonitor = 3,
tpProject = 4,
};

//BBS GUI refactor
enum PrintSelectType
Expand All @@ -215,6 +202,21 @@ class MainFrame : public DPIFrame
eExportAllSlicedFile = 8
};

MainFrame();
~MainFrame() = default;

//BBS GUI refactor
enum TabPosition
{
tpHome = 0,
tp3DEditor = 1,
//tpSettings = 1,
tpPreview = 2,
tpMonitor = 3,
tpProject = 4,
toDebugTool = 5,
};

//BBS: add slice&&print status update logic
enum SlicePrintEventType
{
Expand All @@ -240,7 +242,7 @@ class MainFrame : public DPIFrame

void update_title_colour_after_set_title();
void show_option(bool show);
void init_tabpanel();
void init_tabpanel();
void create_preset_tabs();
//BBS: GUI refactor
void add_created_tab(Tab* panel, const std::string& bmp_name = "");
Expand Down
1 change: 1 addition & 0 deletions src/slic3r/GUI/MediaPlayCtrl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ void MediaPlayCtrl::SetMachineObject(MachineObject* obj)
return;
}
m_machine = machine;
BOOST_LOG_TRIVIAL(info) << "MediaPlayCtrl switch machine: " << m_machine;
m_failed_retry = 0;
std::string stream_url;
if (get_stream_url(&stream_url)) {
Expand Down
9 changes: 1 addition & 8 deletions src/slic3r/GUI/ParamsPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,14 +249,7 @@ ParamsPanel::ParamsPanel( wxWindow* parent, wxWindowID id, const wxPoint& pos, c
});
}

//m_staticline_filament = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
////m_staticline_print = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
//m_staticline_print_object = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
//m_staticline_print_part = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
//m_staticline_printer = new wxStaticLine(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL);
// BBS: new layout
//m_staticline_buttons = new wxStaticLine(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL);
//m_staticline_middle = new wxStaticLine(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL);


//m_export_to_file = new Button( this, wxT("Export To File"), "");
//m_import_from_file = new Button( this, wxT("Import From File") );
Expand Down
2 changes: 1 addition & 1 deletion src/slic3r/Utils/bambu_networking.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ namespace BBL {
#define BAMBU_NETWORK_ERR_FTP_LOGIN_DENIED -25
#define BAMBU_NETWORK_ERR_GET_MODEL_PUBLISH_PAGE -26
#define BAMBU_NETWORK_ERR_GET_MODEL_MALL_HOME_PAGE -27
#define BAMBU_NETWORK_ERR_GET_USER_INFO -28


#define BAMBU_NETWORK_LIBRARY "bambu_networking"
#define BAMBU_NETWORK_AGENT_NAME "bambu_network_agent"

#define BAMBU_NETWORK_AGENT_VERSION "01.04.00.12"


Expand Down

0 comments on commit 00dfd1e

Please sign in to comment.