Changed message about copying another configuration folder.

Added headline to RitchTextDialog.
This commit is contained in:
David Kocik 2021-12-09 18:45:45 +01:00
parent f1429f026c
commit ea796aaa68
3 changed files with 22 additions and 20 deletions

View file

@ -949,25 +949,23 @@ bool GUI_App::check_older_app_config(Semver current_version, bool backup)
BOOST_LOG_TRIVIAL(info) << "last app config file used: " << m_older_data_dir_path; BOOST_LOG_TRIVIAL(info) << "last app config file used: " << m_older_data_dir_path;
// ask about using older data folder // ask about using older data folder
RichMessageDialog msg(nullptr, backup ? RichMessageDialog msg(nullptr, backup ?
wxString::Format(_L("PrusaSlicer detected another configuration folder at %s." wxString::Format(_L(
"\nIts version is %s." "Current configuration folder: %s"
"\nLast version you used in current configuration folder is %s." "\n\n%s found another configuration for version %s."
"\nPlease note that PrusaSlicer uses different folders to save configuration of alpha, beta and full release versions." "\nIt is found at %s."
"\nWould you like to copy found configuration to your current configuration folder?" "\n\nDo you wish to copy and use the configuration file for version %s (overwriting any file with the same name)? A backup of your current configuration will be created."
"\nIf you select no, you will continue with the configuration file for version %s (may not be fully compatible).")
"\n\nIf you select yes, PrusaSlicer will copy all profiles and other files from found folder to the current one. Overwriting any existing file with matching name." , current_version.to_string(), SLIC3R_APP_NAME, last_semver.to_string(), m_older_data_dir_path, last_semver.to_string(), current_version.to_string())
"\nIf you select no, you will continue with current configuration.") : wxString::Format(_L(
, m_older_data_dir_path, last_semver.to_string(), current_version.to_string()) "%s found another configuration for version %s."
: wxString::Format(_L("PrusaSlicer detected another configuration folder at %s." "\nIt is found at %s."
"\nIts version is %s."
"\nThere is no configuration file in current configuration folder." "\nThere is no configuration file in current configuration folder."
"\nPlease note that PrusaSlicer uses different folders to save configuration of alpha, beta and full release versions." "\n\nDo you wish to copy and use the configuration file for version %s?"
"\nWould you like to copy found configuration to your current configuration folder?"
"\n\nIf you select yes, PrusaSlicer will copy all profiles and other files from found folder to the current one."
"\nIf you select no, you will start with clean installation with configuration wizard.") "\nIf you select no, you will start with clean installation with configuration wizard.")
, m_older_data_dir_path, last_semver.to_string()) , SLIC3R_APP_NAME, last_semver.to_string(), m_older_data_dir_path, last_semver.to_string())
, _L("PrusaSlicer"), /*wxICON_QUESTION | */wxYES_NO); , _L("PrusaSlicer")
, wxYES_NO
, wxString::Format(_L("Load configuration from version %s?"), last_semver.to_string()));
if (msg.ShowModal() == wxID_YES) { if (msg.ShowModal() == wxID_YES) {
std::string snapshot_id; std::string snapshot_id;
if (backup) { if (backup) {

View file

@ -215,8 +215,10 @@ MessageDialog::MessageDialog(wxWindow* parent,
RichMessageDialog::RichMessageDialog(wxWindow* parent, RichMessageDialog::RichMessageDialog(wxWindow* parent,
const wxString& message, const wxString& message,
const wxString& caption/* = wxEmptyString*/, const wxString& caption/* = wxEmptyString*/,
long style/* = wxOK*/) long style/* = wxOK*/,
: MsgDialog(parent, caption.IsEmpty() ? wxString::Format(_L("%s info"), SLIC3R_APP_NAME) : caption, wxEmptyString, style) const wxString& headline/* = wxEmptyString*/
)
: MsgDialog(parent, caption.IsEmpty() ? wxString::Format(_L("%s info"), SLIC3R_APP_NAME) : caption, headline, style)
{ {
add_msg_content(this, content_sizer, message); add_msg_content(this, content_sizer, message);

View file

@ -133,7 +133,9 @@ public:
RichMessageDialog( wxWindow *parent, RichMessageDialog( wxWindow *parent,
const wxString& message, const wxString& message,
const wxString& caption = wxEmptyString, const wxString& caption = wxEmptyString,
long style = wxOK); long style = wxOK,
const wxString& headline = wxEmptyString
);
RichMessageDialog(RichMessageDialog&&) = delete; RichMessageDialog(RichMessageDialog&&) = delete;
RichMessageDialog(const RichMessageDialog&) = delete; RichMessageDialog(const RichMessageDialog&) = delete;
RichMessageDialog &operator=(RichMessageDialog&&) = delete; RichMessageDialog &operator=(RichMessageDialog&&) = delete;