diff --git a/src/slic3r/GUI/WebUserLoginDialog.cpp b/src/slic3r/GUI/WebUserLoginDialog.cpp index ebef41f7b..3c0e5e430 100644 --- a/src/slic3r/GUI/WebUserLoginDialog.cpp +++ b/src/slic3r/GUI/WebUserLoginDialog.cpp @@ -18,6 +18,7 @@ #include #include +#include #include #include "MainFrame.hpp" @@ -201,6 +202,7 @@ void ZUserLogin::OnIdle(wxIdleEvent &WXUNUSED(evt)) void ZUserLogin::OnNavigationRequest(wxWebViewEvent &evt) { //wxLogMessage("%s", "Navigation request to '" + evt.GetURL() + "'(target='" + evt.GetTarget() + "')"); + BOOST_LOG_TRIVIAL(trace) << __FUNCTION__ << ": " << evt.GetURL().ToUTF8().data(); UpdateState(); } @@ -211,6 +213,8 @@ void ZUserLogin::OnNavigationRequest(wxWebViewEvent &evt) void ZUserLogin::OnNavigationComplete(wxWebViewEvent &evt) { // wxLogMessage("%s", "Navigation complete; url='" + evt.GetURL() + "'"); + BOOST_LOG_TRIVIAL(trace) << __FUNCTION__ << ": " << evt.GetURL().ToUTF8().data(); + m_browser->Show(); Layout(); UpdateState(); @@ -221,6 +225,8 @@ void ZUserLogin::OnNavigationComplete(wxWebViewEvent &evt) */ void ZUserLogin::OnDocumentLoaded(wxWebViewEvent &evt) { + BOOST_LOG_TRIVIAL(trace) << __FUNCTION__ << ": " << evt.GetURL().ToUTF8().data(); + // Only notify if the document is the main frame, not a subframe wxString tmpUrl = evt.GetURL(); NetworkAgent* agent = wxGetApp().getAgent(); @@ -239,6 +245,8 @@ void ZUserLogin::OnDocumentLoaded(wxWebViewEvent &evt) */ void ZUserLogin::OnNewWindow(wxWebViewEvent &evt) { + BOOST_LOG_TRIVIAL(trace) << __FUNCTION__ << ": " << evt.GetURL().ToUTF8().data(); + wxString flag = " (other)"; if (evt.GetNavigationAction() == wxWEBVIEW_NAV_ACTION_USER) { flag = " (user)"; } @@ -380,6 +388,7 @@ void ZUserLogin::OnError(wxWebViewEvent &evt) ShowErrorPage(); } + BOOST_LOG_TRIVIAL(trace) << __FUNCTION__ << ": " << evt.GetURL().ToUTF8().data(); // wxLogMessage("%s", "Error; url='" + evt.GetURL() + "', error='" + // category + " (" + evt.GetString() + ")'"); @@ -413,6 +422,7 @@ bool ZUserLogin::ShowErrorPage() std::string ZUserLogin::GetStudioLanguage() { std::string strLanguage = wxGetApp().app_config->get("language"); + boost::trim(strLanguage); if (strLanguage.empty()) strLanguage = "en"; return strLanguage; diff --git a/src/slic3r/GUI/WebViewDialog.cpp b/src/slic3r/GUI/WebViewDialog.cpp index d22ffc13b..b1067b73e 100644 --- a/src/slic3r/GUI/WebViewDialog.cpp +++ b/src/slic3r/GUI/WebViewDialog.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include #include @@ -1931,7 +1932,8 @@ void WebViewPanel::SetWebviewShow(wxString name, bool show) std::string WebViewPanel::GetStudioLanguage() { - std::string strLanguage=wxGetApp().app_config->get("language"); + std::string strLanguage = wxGetApp().app_config->get("language"); + boost::trim(strLanguage); if (strLanguage.empty()) strLanguage = "en"; return strLanguage;