diff options
author | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2019-11-09 14:34:46 +0100 |
---|---|---|
committer | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2022-06-18 17:03:15 +0200 |
commit | 95fd68a6be267e98943f8ab906a10bcc74606f07 (patch) | |
tree | dc4ac8c5181e3738c9737eda9e013034ef2d429b /recmenus.c | |
parent | 66659a865d626711ef3ae9d8f182c9cd3f93dc5a (diff) | |
download | vdr-plugin-tvguide-95fd68a6be267e98943f8ab906a10bcc74606f07.tar.gz vdr-plugin-tvguide-95fd68a6be267e98943f8ab906a10bcc74606f07.tar.bz2 |
Refactor cRecMenuSearchTimerNothingFound
Diffstat (limited to 'recmenus.c')
-rw-r--r-- | recmenus.c | 18 |
1 files changed, 8 insertions, 10 deletions
@@ -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(); |