Refactor cRecMenuRecordingSearchNotFound

This commit is contained in:
kamel5 2019-11-09 15:38:48 +01:00
parent b804b63353
commit bb7d03c7ed

View File

@ -1482,16 +1482,15 @@ int cRecMenuRecordingSearchResults::GetTotalNumMenuItems(void) {
} }
// --- cRecMenuRecordingSearchNotFound --------------------------------------------------------- // --- cRecMenuRecordingSearchNotFound ---------------------------------------------------------
cRecMenuRecordingSearchNotFound::cRecMenuRecordingSearchNotFound(std::string searchString) { cRecMenuRecordingSearchNotFound::cRecMenuRecordingSearchNotFound(std::string searchString) { // OK
SetWidthPercent(50); SetWidthPercent(50);
cString message = tr("No recordings found for");
cString text = cString::sprintf("%s\n\"%s\"", const cString line1 = cString::sprintf("%s", tr("No recordings found for"));
*message, const cString line2 = cString::sprintf("\"%s\"", searchString.c_str());
searchString.c_str());
cRecMenuItemInfo *infoItem = new cRecMenuItemInfo(*text); AddHeader(new cRecMenuItemInfo(tr("No recordings found for"), 2, *line2, "", "", width - 2 * border));
infoItem->CalculateHeight(width - 2 * border); AddFooter(new cRecMenuItemButton(tr("OK"), rmsClose, true, true));
AddMenuItem(infoItem);
AddMenuItem(new cRecMenuItemButton(tr("OK"), rmsClose, true, true));
CalculateHeight(); CalculateHeight();
CreatePixmap(); CreatePixmap();
Arrange(); Arrange();