summaryrefslogtreecommitdiff
path: root/osdbase.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2007-06-10 13:02:43 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2007-06-10 13:02:43 +0200
commitc6f8a149574f4e5196f802439e7439406ca82e71 (patch)
tree0b04b012f87d7033abb37aeb986385672b85da18 /osdbase.c
parent32dd727d057a1ba22d403f48306adae10285ac77 (diff)
downloadvdr-c6f8a149574f4e5196f802439e7439406ca82e71.tar.gz
vdr-c6f8a149574f4e5196f802439e7439406ca82e71.tar.bz2
Freetype font support; full UTF-8 support; dropped pixel fonts
Diffstat (limited to 'osdbase.c')
-rw-r--r--osdbase.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/osdbase.c b/osdbase.c
index 343ed395..17373496 100644
--- a/osdbase.c
+++ b/osdbase.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: osdbase.c 1.30 2007/01/07 14:41:16 kls Exp $
+ * $Id: osdbase.c 1.31 2007/06/09 10:07:46 kls Exp $
*/
#include "osdbase.h"
@@ -86,10 +86,8 @@ cOsdMenu::cOsdMenu(const char *Title, int c0, int c1, int c2, int c3, int c4)
subMenu = NULL;
helpRed = helpGreen = helpYellow = helpBlue = NULL;
status = NULL;
- if (!displayMenuCount++) {
- displayMenu = Skins.Current()->DisplayMenu();
- displayMenuItems = displayMenu->MaxItems();
- }
+ if (!displayMenuCount++)
+ SetDisplayMenu();
}
cOsdMenu::~cOsdMenu()
@@ -103,15 +101,25 @@ cOsdMenu::~cOsdMenu()
DELETENULL(displayMenu);
}
+void cOsdMenu::SetDisplayMenu(void)
+{
+ if (displayMenu) {
+ displayMenu->Clear();
+ delete displayMenu;
+ }
+ displayMenu = Skins.Current()->DisplayMenu();
+ displayMenuItems = displayMenu->MaxItems();
+}
+
const char *cOsdMenu::hk(const char *s)
{
- static char buffer[64];
+ static cString buffer;
if (s && hasHotkeys) {
if (digit == 0 && '1' <= *s && *s <= '9' && *(s + 1) == ' ')
digit = -1; // prevents automatic hotkeys - input already has them
if (digit >= 0) {
digit++;
- snprintf(buffer, sizeof(buffer), " %c %s", (digit < 10) ? '0' + digit : ' ' , s);
+ buffer = cString::sprintf(" %c %s", (digit < 10) ? '0' + digit : ' ' , s);
s = buffer;
}
}