diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2017-04-03 12:49:56 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2017-04-03 12:49:56 +0200 |
commit | e622854789ff8a521dc837379147b6e851d52875 (patch) | |
tree | d71cfde84e762e40d3413576e94b073afff5e2b3 | |
parent | 792b9dc45fd68f6f0f0db4073982303171dbfb08 (diff) | |
download | vdr-e622854789ff8a521dc837379147b6e851d52875.tar.gz vdr-e622854789ff8a521dc837379147b6e851d52875.tar.bz2 |
cOsdMenu::Display() now checks whether the OSD size has changed and if so calls SetDisplayMenu()
-rw-r--r-- | HISTORY | 2 | ||||
-rw-r--r-- | menu.c | 7 | ||||
-rw-r--r-- | osdbase.c | 9 | ||||
-rw-r--r-- | osdbase.h | 3 | ||||
-rw-r--r-- | vdr.c | 7 |
5 files changed, 19 insertions, 9 deletions
@@ -8951,3 +8951,5 @@ Video Disk Recorder Revision History - Added a note to the "Pausing live video" section of the MANUAL, stating that the timer for paused live video will always record on the local VDR, even if an "SVDRP default host" has been set for normal timer recordings. +- cOsdMenu::Display() now checks whether the OSD size has changed and if so calls + SetDisplayMenu(). @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: menu.c 4.23 2017/03/30 15:15:03 kls Exp $ + * $Id: menu.c 4.24 2017/04/03 12:26:23 kls Exp $ */ #include "menu.h" @@ -3347,10 +3347,8 @@ eOSState cMenuSetupOSD::ProcessKey(eKeys Key) int oldOsdLanguageIndex = osdLanguageIndex; eOSState state = cMenuSetupBase::ProcessKey(Key); - if (ModifiedAppearance) { + if (ModifiedAppearance) cOsdProvider::UpdateOsdSize(true); - SetDisplayMenu(); - } if (osdLanguageIndex != oldOsdLanguageIndex || skinIndex != oldSkinIndex) { strn0cpy(data.OSDLanguage, I18nLocale(osdLanguageIndex), sizeof(data.OSDLanguage)); @@ -4107,7 +4105,6 @@ eOSState cMenuSetupPlugins::ProcessKey(eKeys Key) Store(); // Reinitialize OSD and skin, in case any plugin setup change has an influence on these: cOsdProvider::UpdateOsdSize(true); - SetDisplayMenu(); Display(); } } @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: osdbase.c 4.1 2015/09/10 11:23:07 kls Exp $ + * $Id: osdbase.c 4.2 2017/04/03 12:30:52 kls Exp $ */ #include "osdbase.h" @@ -77,6 +77,7 @@ void cOsdObject::Show(void) cSkinDisplayMenu *cOsdMenu::displayMenu = NULL; int cOsdMenu::displayMenuCount = 0; +int cOsdMenu::osdState = 0; cOsdMenu::cOsdMenu(const char *Title, int c0, int c1, int c2, int c3, int c4) { @@ -96,8 +97,10 @@ cOsdMenu::cOsdMenu(const char *Title, int c0, int c1, int c2, int c3, int c4) helpRed = helpGreen = helpYellow = helpBlue = NULL; helpDisplayed = false; status = NULL; - if (!displayMenuCount++) + if (!displayMenuCount++) { + cOsdProvider::OsdSizeChanged(osdState); // to get the current state SetDisplayMenu(); + } } cOsdMenu::~cOsdMenu() @@ -226,6 +229,8 @@ void cOsdMenu::Display(void) subMenu->Display(); return; } + if (cOsdProvider::OsdSizeChanged(osdState)) + SetDisplayMenu(); displayMenu->SetMessage(mtStatus, NULL); displayMenu->Clear(); cStatus::MsgOsdClear(); @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: osdbase.h 4.1 2015/09/10 11:17:52 kls Exp $ + * $Id: osdbase.h 4.2 2017/04/03 12:02:16 kls Exp $ */ #ifndef __OSDBASE_H @@ -87,6 +87,7 @@ class cOsdMenu : public cOsdObject, public cList<cOsdItem> { private: static cSkinDisplayMenu *displayMenu; static int displayMenuCount; + static int osdState; int displayMenuItems; char *title; int cols[cSkinDisplayMenu::MaxTabs]; @@ -22,7 +22,7 @@ * * The project's page is at http://www.tvdr.de * - * $Id: vdr.c 4.11 2017/03/25 14:20:30 kls Exp $ + * $Id: vdr.c 4.12 2017/04/03 12:35:37 kls Exp $ */ #include <getopt.h> @@ -986,6 +986,11 @@ int main(int argc, char *argv[]) static time_t lastOsdSizeUpdate = 0; if (Now != lastOsdSizeUpdate) { // once per second cOsdProvider::UpdateOsdSize(); + static int OsdState = 0; + if (cOsdProvider::OsdSizeChanged(OsdState)) { + if (cOsdMenu *OsdMenu = dynamic_cast<cOsdMenu *>(Menu)) + OsdMenu->Display(); + } lastOsdSizeUpdate = Now; } } |