For the builds with a label assigned (no commit after the label),
show just the label in the application title. For Win32, add the " 32 bit" indicator, so that we may see clearly if somebody is running a 32bit build on 64bit windows by a mistake.
This commit is contained in:
parent
a430ff546e
commit
34588f365d
@ -145,8 +145,6 @@ DPIFrame(NULL, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_S
|
|||||||
update_ui_from_settings(); // FIXME (?)
|
update_ui_from_settings(); // FIXME (?)
|
||||||
}
|
}
|
||||||
|
|
||||||
MainFrame::~MainFrame() = default;
|
|
||||||
|
|
||||||
void MainFrame::update_title()
|
void MainFrame::update_title()
|
||||||
{
|
{
|
||||||
wxString title = wxEmptyString;
|
wxString title = wxEmptyString;
|
||||||
@ -158,7 +156,22 @@ void MainFrame::update_title()
|
|||||||
if (!project.empty())
|
if (!project.empty())
|
||||||
title += (project + " - ");
|
title += (project + " - ");
|
||||||
}
|
}
|
||||||
title += (wxString(SLIC3R_BUILD_ID) + " " + _(L("based on Slic3r")));
|
|
||||||
|
std::string build_id = SLIC3R_BUILD_ID;
|
||||||
|
size_t idx_plus = build_id.find('+');
|
||||||
|
if (idx_plus != build_id.npos) {
|
||||||
|
// Parse what is behind the '+'. If there is a number, then it is a build number after the label, and full build ID is shown.
|
||||||
|
int commit_after_label;
|
||||||
|
if (! boost::starts_with(build_id.data() + idx_plus + 1, "UNKNOWN") && sscanf(build_id.data() + idx_plus + 1, "%d-", &commit_after_label) == 0) {
|
||||||
|
// It is a release build.
|
||||||
|
build_id.erase(build_id.begin() + idx_plus, build_id.end());
|
||||||
|
#if defined(_WIN32) && ! defined(_WIN64)
|
||||||
|
// People are using 32bit slicer on a 64bit machine by mistake. Make it explicit.
|
||||||
|
build_id += " 32 bit"
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
title += (wxString(build_id) + " " + _(L("based on Slic3r")));
|
||||||
|
|
||||||
SetTitle(title);
|
SetTitle(title);
|
||||||
}
|
}
|
||||||
|
@ -96,7 +96,7 @@ protected:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
MainFrame();
|
MainFrame();
|
||||||
~MainFrame();
|
~MainFrame() = default;
|
||||||
|
|
||||||
Plater* plater() { return m_plater; }
|
Plater* plater() { return m_plater; }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user