Add a NEW text column each time this is called.
| 1123 | |
| 1124 | // Add a NEW text column each time this is called. |
| 1125 | void ProgressDialog::AddMessageAsColumn(wxBoxSizer * pSizer, |
| 1126 | const MessageColumn & column, |
| 1127 | bool bFirstColumn) { |
| 1128 | |
| 1129 | // Assuming that we don't want empty columns, bail out if there is no text. |
| 1130 | if (column.empty()) |
| 1131 | return; |
| 1132 | |
| 1133 | // Join strings |
| 1134 | auto sText = column[0]; |
| 1135 | std::for_each( column.begin() + 1, column.end(), |
| 1136 | [&](const TranslatableString &text) |
| 1137 | { sText.Join( text, wxT("\n") ); }); |
| 1138 | |
| 1139 | // Create a statictext object and add to the sizer |
| 1140 | wxStaticText* oText = safenew wxStaticText(this, |
| 1141 | wxID_ANY, |
| 1142 | sText.Translation(), |
| 1143 | wxDefaultPosition, |
| 1144 | wxDefaultSize, |
| 1145 | wxALIGN_LEFT); |
| 1146 | oText->SetName(sText.Translation()); // fix for bug 577 (NVDA/Narrator screen readers do not read static text in dialogs) |
| 1147 | |
| 1148 | // If this is the first column then set the mMessage pointer so non-TimerRecord usages |
| 1149 | // will still work correctly in SetMessage() |
| 1150 | if (bFirstColumn) { |
| 1151 | mMessage = oText; |
| 1152 | } |
| 1153 | |
| 1154 | pSizer->Add(oText, 1, wxEXPAND | wxALL, 5); |
| 1155 | } |
| 1156 | |
| 1157 | bool ProgressDialog::Create(const TranslatableString & title, |
| 1158 | const TranslatableString & message /* = {} */, |
nothing calls this directly
no test coverage detected