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::cRecMenuSearchTimerNothingFound(std::string searchString) { cRecMenuSearchTimerNothingFound::cRecMenuSearchTimerNothingFound(std::string searchString) { // OK
SetWidthPercent(50); SetWidthPercent(50);
cString message = tr("Nothing found for Search String");
cString text; const cString line1 = tr("Nothing found for Search String");
text = cString::sprintf("%s\n\"%s\"", const cString line2 = cString::sprintf("\"%s\"", searchString.c_str());
*message,
searchString.c_str()); AddHeader(new cRecMenuItemInfo(*line1, 2, *line2, "", "", width - 2 * border));
cRecMenuItemInfo *infoItem = new cRecMenuItemInfo(*text); AddFooter(new cRecMenuItemButton(tr("OK"), rmsClose, true, true));
infoItem->CalculateHeight(width - 2 * border);
AddMenuItem(infoItem);
AddMenuItem(new cRecMenuItemButton(tr("OK"), rmsClose, true, true));
CalculateHeight(); CalculateHeight();
CreatePixmap(); CreatePixmap();
Arrange(); Arrange();