if 0 login dialog

This commit is contained in:
David Kocik 2024-04-11 17:25:41 +02:00
parent f49b85ab68
commit fd4e2a19f9
3 changed files with 14 additions and 3 deletions

View File

@ -3132,7 +3132,7 @@ bool GUI_App::may_switch_to_SLA_preset(const wxString& caption)
bool GUI_App::run_wizard(ConfigWizard::RunReason reason, ConfigWizard::StartPage start_page) bool GUI_App::run_wizard(ConfigWizard::RunReason reason, ConfigWizard::StartPage start_page)
{ {
wxCHECK_MSG(mainframe != nullptr, false, "Internal error: Main frame not created / null"); wxCHECK_MSG(mainframe != nullptr, false, "Internal error: Main frame not created / null");
#if 0
if (!plater()->get_user_account()->is_logged()) { if (!plater()->get_user_account()->is_logged()) {
m_login_dialog = std::make_unique<LoginDialog>(mainframe, plater()->get_user_account()); m_login_dialog = std::make_unique<LoginDialog>(mainframe, plater()->get_user_account());
m_login_dialog->ShowModal(); m_login_dialog->ShowModal();
@ -3141,7 +3141,7 @@ bool GUI_App::run_wizard(ConfigWizard::RunReason reason, ConfigWizard::StartPage
// Destructor does not call Destroy // Destructor does not call Destroy
m_login_dialog.reset(); m_login_dialog.reset();
} }
#endif // 0
if (reason == ConfigWizard::RR_USER) { if (reason == ConfigWizard::RR_USER) {
// Cancel sync before starting wizard to prevent two downloads at same time // Cancel sync before starting wizard to prevent two downloads at same time
preset_updater->cancel_sync(); preset_updater->cancel_sync();
@ -3171,6 +3171,7 @@ bool GUI_App::run_wizard(ConfigWizard::RunReason reason, ConfigWizard::StartPage
return res; return res;
} }
#if 0
void GUI_App::update_login_dialog() void GUI_App::update_login_dialog()
{ {
if (!m_login_dialog) { if (!m_login_dialog) {
@ -3178,6 +3179,7 @@ void GUI_App::update_login_dialog()
} }
m_login_dialog->update_account(); m_login_dialog->update_account();
} }
#endif // 0
void GUI_App::show_desktop_integration_dialog() void GUI_App::show_desktop_integration_dialog()
{ {

View File

@ -371,7 +371,9 @@ public:
void open_web_page_localized(const std::string &http_address); void open_web_page_localized(const std::string &http_address);
bool may_switch_to_SLA_preset(const wxString& caption); bool may_switch_to_SLA_preset(const wxString& caption);
bool run_wizard(ConfigWizard::RunReason reason, ConfigWizard::StartPage start_page = ConfigWizard::SP_WELCOME); bool run_wizard(ConfigWizard::RunReason reason, ConfigWizard::StartPage start_page = ConfigWizard::SP_WELCOME);
#if 0
void update_login_dialog(); void update_login_dialog();
#endif // 0
void show_desktop_integration_dialog(); void show_desktop_integration_dialog();
void show_downloader_registration_dialog(); void show_downloader_registration_dialog();
@ -446,8 +448,9 @@ private:
// change to vector of items when adding more items that require update // change to vector of items when adding more items that require update
//wxMenuItem* m_login_config_menu_item { nullptr }; //wxMenuItem* m_login_config_menu_item { nullptr };
std::map< ConfigMenuIDs, wxMenuItem*> m_config_menu_updatable_items; std::map< ConfigMenuIDs, wxMenuItem*> m_config_menu_updatable_items;
#if 0
std::unique_ptr<LoginDialog> m_login_dialog; std::unique_ptr<LoginDialog> m_login_dialog;
#endif // 0
}; };
DECLARE_APP(GUI_App) DECLARE_APP(GUI_App)

View File

@ -887,7 +887,9 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame)
this->main_frame->refresh_account_menu(true); this->main_frame->refresh_account_menu(true);
// Update sidebar printer status // Update sidebar printer status
sidebar->update_printer_presets_combobox(); sidebar->update_printer_presets_combobox();
#if 0
wxGetApp().update_login_dialog(); wxGetApp().update_login_dialog();
#endif // 0
this->show_action_buttons(this->ready_to_slice); this->show_action_buttons(this->ready_to_slice);
}); });
@ -902,7 +904,9 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame)
this->main_frame->add_connect_webview_tab(); this->main_frame->add_connect_webview_tab();
// Update User name in TopBar // Update User name in TopBar
this->main_frame->refresh_account_menu(); this->main_frame->refresh_account_menu();
#if 0
wxGetApp().update_login_dialog(); wxGetApp().update_login_dialog();
#endif // 0
this->show_action_buttons(this->ready_to_slice); this->show_action_buttons(this->ready_to_slice);
} else { } else {
// data were corrupt and username was not retrieved // data were corrupt and username was not retrieved
@ -953,7 +957,9 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame)
fwrite(evt.data.c_str(), 1, evt.data.size(), file); fwrite(evt.data.c_str(), 1, evt.data.size(), file);
fclose(file); fclose(file);
this->main_frame->refresh_account_menu(true); this->main_frame->refresh_account_menu(true);
#if 0
wxGetApp().update_login_dialog(); wxGetApp().update_login_dialog();
#endif // 0
}); });
wxGetApp().other_instance_message_handler()->init(this->q); wxGetApp().other_instance_message_handler()->init(this->q);