Skip to content

Commit

Permalink
Mgr: Fix code to restore lost support for <title> tag under <attach_t…
Browse files Browse the repository at this point in the history
…o_account_manager> tag in skin, so that the Attach to Project Wizard and Attach to Account Manager Wizard dialogs can have different titles
  • Loading branch information
Charlie Fenton committed Jul 4, 2018
1 parent 7ff75fc commit 0266fae
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
5 changes: 5 additions & 0 deletions clientgui/SkinManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -756,6 +756,7 @@ CSkinWizardATAM::~CSkinWizardATAM() {


void CSkinWizardATAM::Clear() {
m_strTitle = wxEmptyString;
m_strAccountInfoMessage = wxEmptyString;
}

Expand All @@ -770,6 +771,10 @@ int CSkinWizardATAM::Parse(MIOFILE& in) {
m_strAccountInfoMessage = wxString(strBuffer.c_str(), wxConvUTF8);
continue;
}
else if (parse_str(buf, "<title>", strBuffer)) {
m_strTitle = wxString(strBuffer.c_str(), wxConvUTF8);
continue;
}
}

InitializeDelayedValidation();
Expand Down
3 changes: 3 additions & 0 deletions clientgui/SkinManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,11 @@ class CSkinWizardATAM : public CSkinItem

wxString GetAccountInfoMessage() { return m_strAccountInfoMessage; }

wxString GetWizardTitle() { return m_strTitle; }

private:
wxString m_strAccountInfoMessage;
wxString m_strTitle;
};


Expand Down
17 changes: 16 additions & 1 deletion clientgui/WizardAttach.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,11 +309,26 @@ bool CWizardAttach::SyncToAccountManager() {
ACCT_MGR_INFO ami;
CMainDocument* pDoc = wxGetApp().GetDocument();

wxASSERT(pDoc);
CSkinAdvanced* pSkinAdvanced = wxGetApp().GetSkinManager()->GetAdvanced();
CSkinWizardATAM* pSkinWizardATAM = wxGetApp().GetSkinManager()->GetWizards()->GetWizardATAM();

wxASSERT(pDoc);
wxASSERT(wxDynamicCast(pDoc, CMainDocument));
wxASSERT(pSkinAdvanced);
wxASSERT(pSkinWizardATAM);
wxASSERT(wxDynamicCast(pSkinAdvanced, CSkinAdvanced));
wxASSERT(wxDynamicCast(pSkinWizardATAM, CSkinWizardATAM));


if (!pSkinWizardATAM->GetWizardTitle().IsEmpty()) {
SetTitle(pSkinWizardATAM->GetWizardTitle());
} else {
SetTitle(pSkinAdvanced->GetApplicationName());
}

IsAttachToProjectWizard = false;
IsAccountManagerWizard = true;


pDoc->rpc.acct_mgr_info(ami);

Expand Down

0 comments on commit 0266fae

Please sign in to comment.