diff --git a/src/slic3r/GUI/BBLTopbar.cpp b/src/slic3r/GUI/BBLTopbar.cpp index abf752ad8..f01e1d76d 100644 --- a/src/slic3r/GUI/BBLTopbar.cpp +++ b/src/slic3r/GUI/BBLTopbar.cpp @@ -254,7 +254,7 @@ void BBLTopbar::Init(wxFrame* parent) m_publish_item = this->AddTool(ID_PUBLISH, "", m_publish_bitmap); m_publish_disable_bitmap = create_scaled_bitmap("topbar_publish_disable", nullptr, TOPBAR_ICON_SIZE); m_publish_item->SetDisabledBitmap(m_publish_disable_bitmap); - this->EnableTool(m_publish_item->GetId(), false); + this->EnableTool(m_publish_item->GetId(), true); this->AddSpacer(FromDIP(4)); /*wxBitmap model_store_bitmap = create_scaled_bitmap("topbar_store", nullptr, TOPBAR_ICON_SIZE); @@ -317,12 +317,6 @@ BBLTopbar::~BBLTopbar() m_file_menu = nullptr; } -void BBLTopbar::show_publish_button(bool show) -{ - this->EnableTool(m_publish_item->GetId(), show); - Refresh(); -} - void BBLTopbar::OnOpenProject(wxAuiToolBarEvent& event) { MainFrame* main_frame = dynamic_cast(m_frame); diff --git a/src/slic3r/GUI/BBLTopbar.hpp b/src/slic3r/GUI/BBLTopbar.hpp index c825c7913..42af5d5db 100644 --- a/src/slic3r/GUI/BBLTopbar.hpp +++ b/src/slic3r/GUI/BBLTopbar.hpp @@ -16,7 +16,6 @@ public: BBLTopbar(wxFrame* parent); void Init(wxFrame *parent); ~BBLTopbar(); - void show_publish_button(bool show); void UpdateToolbarWidth(int width); void Rescale(); void OnIconize(wxAuiToolBarEvent& event); diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index 288f3bfdd..c7d274596 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -1383,10 +1383,10 @@ std::string GUI_App::get_model_http_url(std::string country_code) { std::string url; if (country_code == "US") { - url = "https://makerhub.bambu-lab.com/"; + url = "https://makerworld.com/"; } else if (country_code == "CN") { - url = "https://makerhub.bambu-lab.com/zh/"; + url = "https://makerworld.com/"; } else if (country_code == "ENV_CN_DEV") { url = "https://makerhub-dev.bambu-lab.com/"; @@ -3279,21 +3279,6 @@ void GUI_App::recreate_GUI(const wxString& msg_name) // config_wizard_startup(true); // }); - //show publish button - if (m_agent && m_agent->is_user_login() && mainframe) { - int identifier; - int result = m_agent->get_user_info(&identifier); - auto publish_identifier = identifier & 1; - -#ifdef __WINDOWS__ - if (result == 0 && publish_identifier >= 0) { - mainframe->m_topbar->show_publish_button(publish_identifier == 0 ? false : true); - } -#else - mainframe->show_publish_button(publish_identifier == 0 ? false : true); -#endif - } - m_is_recreating_gui = false; BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << "recreate_GUI exit"; @@ -3621,12 +3606,6 @@ void GUI_App::request_user_logout() m_device_manager->clean_user_info(); GUI::wxGetApp().sidebar().load_ams_list({}, {}); GUI::wxGetApp().stop_sync_user_preset(); - -#ifdef __WINDOWS__ - wxGetApp().mainframe->topbar()->show_publish_button(false); -#else - wxGetApp().mainframe->show_publish_button(false); -#endif } } @@ -3971,20 +3950,6 @@ void GUI_App::on_user_login_handle(wxCommandEvent &evt) } else { enable_user_preset_folder(false); } - //show publish button - if (m_agent->is_user_login() && mainframe) { - int identifier; - int result = m_agent->get_user_info(&identifier); - auto publish_identifier = identifier & 1; - -#ifdef __WINDOWS__ - if (result == 0 && publish_identifier >= 0) { - mainframe->m_topbar->show_publish_button(publish_identifier == 0 ? false : true); - } -#else - mainframe->show_publish_button(publish_identifier == 0 ? false : true); -#endif - } } void GUI_App::check_track_enable() @@ -5729,6 +5694,7 @@ void GUI_App::open_publish_page_dialog() wxString language_code = this->current_language_code().BeforeFirst('_'); model_url += (language_code.ToStdString() + "/my/models/publish"); +#if 0 if (getAgent() && mainframe) { //login already @@ -5741,6 +5707,7 @@ void GUI_App::open_publish_page_dialog() } } } +#endif if (result < 0) { link_url = host_url + model_url; diff --git a/src/slic3r/GUI/MainFrame.cpp b/src/slic3r/GUI/MainFrame.cpp index 06a5f3f6e..6f38d2122 100644 --- a/src/slic3r/GUI/MainFrame.cpp +++ b/src/slic3r/GUI/MainFrame.cpp @@ -2573,18 +2573,6 @@ void MainFrame::init_menubar_as_editor() #endif // __APPLE__ } -void MainFrame::show_publish_button(bool show) -{ - if (!m_menubar) return; - - if (show){ - m_menubar->Insert(4, publishMenu, wxString::Format("&%s", _L("3D Models"))); - } - else { - m_menubar->Remove(4); - } -} - void MainFrame::set_max_recent_count(int max) { max = max < 0 ? 0 : max > 10000 ? 10000 : max; diff --git a/src/slic3r/GUI/MainFrame.hpp b/src/slic3r/GUI/MainFrame.hpp index 437a9079c..3e382bdb5 100644 --- a/src/slic3r/GUI/MainFrame.hpp +++ b/src/slic3r/GUI/MainFrame.hpp @@ -244,7 +244,6 @@ public: BBLTopbar* topbar() { return m_topbar; } void update_title(); - void show_publish_button(bool show); void set_max_recent_count(int max); void update_title_colour_after_set_title();