Refactor cRecMenuSearchTimerNothingFound

This commit is contained in:
kamel5 2019-11-09 14:34:46 +01:00
parent 66659a865d
commit 95fd68a6be

View File

@ -1070,17 +1070,15 @@ const cEvent *cRecMenuSearchTimerResults::GetEvent(void) {
}
// --- cRecMenuSearchTimerNothingFound ---------------------------------------------------------
cRecMenuSearchTimerNothingFound::cRecMenuSearchTimerNothingFound(std::string searchString) {
cRecMenuSearchTimerNothingFound::cRecMenuSearchTimerNothingFound(std::string searchString) { // OK
SetWidthPercent(50);
cString message = tr("Nothing found for Search String");
cString text;
text = cString::sprintf("%s\n\"%s\"",
*message,
searchString.c_str());
cRecMenuItemInfo *infoItem = new cRecMenuItemInfo(*text);
infoItem->CalculateHeight(width - 2 * border);
AddMenuItem(infoItem);
AddMenuItem(new cRecMenuItemButton(tr("OK"), rmsClose, true, true));
const cString line1 = tr("Nothing found for Search String");
const cString line2 = cString::sprintf("\"%s\"", searchString.c_str());
AddHeader(new cRecMenuItemInfo(*line1, 2, *line2, "", "", width - 2 * border));
AddFooter(new cRecMenuItemButton(tr("OK"), rmsClose, true, true));
CalculateHeight();
CreatePixmap();
Arrange();