summaryrefslogtreecommitdiff
path: root/menuitems.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2002-05-18 14:03:22 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2002-05-18 14:03:22 +0200
commitbdccbbe93e9729944787d3158bee7a755d3bf286 (patch)
tree17073d49ff0d2d94672c7301a7771f0b2724e42e /menuitems.c
parent3e5b31af5e88bc4e43971a70b5add6f67cebb701 (diff)
downloadvdr-bdccbbe93e9729944787d3158bee7a755d3bf286.tar.gz
vdr-bdccbbe93e9729944787d3158bee7a755d3bf286.tar.bz2
Completely moved OSD handling out of the cDvbApi class, into the new cOsd
Diffstat (limited to 'menuitems.c')
-rw-r--r--menuitems.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/menuitems.c b/menuitems.c
index 4702bcfa..58a57c03 100644
--- a/menuitems.c
+++ b/menuitems.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: menuitems.c 1.3 2002/05/18 08:53:59 kls Exp $
+ * $Id: menuitems.c 1.4 2002/05/18 13:09:04 kls Exp $
*/
#include "menuitems.h"
@@ -186,18 +186,18 @@ void cMenuEditStrItem::Set(void)
strncpy(buf, value, pos);
snprintf(buf + pos, sizeof(buf) - pos - 2, fmt, *(value + pos), value + pos + 1);
int width = Interface->Width() - Interface->GetCols()[0];
- if (cDvbApi::PrimaryDvbApi->WidthInCells(buf) <= width) {
+ if (cOsd::WidthInCells(buf) <= width) {
// the whole buffer fits on the screen
SetValue(buf);
return;
}
- width *= cDvbApi::PrimaryDvbApi->CellWidth();
- width -= cDvbApi::PrimaryDvbApi->Width('>'); // assuming '<' and '>' have the same with
+ width *= cOsd::CellWidth();
+ width -= cOsd::Width('>'); // assuming '<' and '>' have the same with
int w = 0;
int i = 0;
int l = strlen(buf);
while (i < l && w <= width)
- w += cDvbApi::PrimaryDvbApi->Width(buf[i++]);
+ w += cOsd::Width(buf[i++]);
if (i >= pos + 4) {
// the cursor fits on the screen
buf[i - 1] = '>';
@@ -214,7 +214,7 @@ void cMenuEditStrItem::Set(void)
else
i--;
while (i >= 0 && w <= width)
- w += cDvbApi::PrimaryDvbApi->Width(buf[i--]);
+ w += cOsd::Width(buf[i--]);
buf[++i] = '<';
SetValue(buf + i);
}