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