mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Displaying as much as possible of the current/next info (dropping characters that would display only partially)
This commit is contained in:
parent
38626b1210
commit
1c9122ae03
2
HISTORY
2
HISTORY
@ -216,3 +216,5 @@ Video Disk Recorder Revision History
|
|||||||
title.
|
title.
|
||||||
- The 'Recordings' menu now displays a '*' to indicate new recordings.
|
- The 'Recordings' menu now displays a '*' to indicate new recordings.
|
||||||
- Added the description of the timers.conf file to the FORMATS file.
|
- Added the description of the timers.conf file to the FORMATS file.
|
||||||
|
- Displaying as much as possible of the current/next info (dropping characters
|
||||||
|
that would display only partially).
|
||||||
|
4
dvbapi.c
4
dvbapi.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: dvbapi.c 1.29 2000/10/03 11:25:57 kls Exp $
|
* $Id: dvbapi.c 1.30 2000/10/03 13:26:16 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "dvbapi.h"
|
#include "dvbapi.h"
|
||||||
@ -1583,7 +1583,7 @@ void cDvbApi::Text(int x, int y, const char *s, eDvbColor colorFg, eDvbColor col
|
|||||||
#ifdef DEBUG_OSD
|
#ifdef DEBUG_OSD
|
||||||
SetColor(colorFg, colorBg);
|
SetColor(colorFg, colorBg);
|
||||||
wmove(window, y, x); // ncurses wants 'y' before 'x'!
|
wmove(window, y, x); // ncurses wants 'y' before 'x'!
|
||||||
waddstr(window, s);
|
waddnstr(window, s, cols - x);
|
||||||
#else
|
#else
|
||||||
osd->Text(x * charWidth, y * lineHeight, s, colorFg, colorBg);
|
osd->Text(x * charWidth, y * lineHeight, s, colorFg, colorBg);
|
||||||
#endif
|
#endif
|
||||||
|
4
dvbosd.c
4
dvbosd.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: dvbosd.c 1.1 2000/10/03 10:10:28 kls Exp $
|
* $Id: dvbosd.c 1.2 2000/10/03 13:34:13 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "dvbosd.h"
|
#include "dvbosd.h"
|
||||||
@ -81,6 +81,8 @@ void cBitmap::Text(int x, int y, const char *s, eDvbColor ColorFg, eDvbColor Col
|
|||||||
int h = font->Height(s);
|
int h = font->Height(s);
|
||||||
while (s && *s) {
|
while (s && *s) {
|
||||||
const cFont::tCharData *CharData = font->CharData(*s++);
|
const cFont::tCharData *CharData = font->CharData(*s++);
|
||||||
|
if (int(x + CharData->width) > width)
|
||||||
|
break;
|
||||||
for (int row = 0; row < h; row++) {
|
for (int row = 0; row < h; row++) {
|
||||||
cFont::tPixelData PixelData = CharData->lines[row];
|
cFont::tPixelData PixelData = CharData->lines[row];
|
||||||
for (int col = CharData->width; col-- > 0; ) {
|
for (int col = CharData->width; col-- > 0; ) {
|
||||||
|
11
interface.c
11
interface.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: interface.c 1.20 2000/10/02 16:23:53 kls Exp $
|
* $Id: interface.c 1.21 2000/10/03 13:28:02 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "interface.h"
|
#include "interface.h"
|
||||||
@ -355,25 +355,24 @@ eKeys cInterface::DisplayChannel(int Number, const char *Name, bool WithInfo)
|
|||||||
}
|
}
|
||||||
if (Lines > 0) {
|
if (Lines > 0) {
|
||||||
const int t = 6;
|
const int t = 6;
|
||||||
int w = MenuColumns - t;
|
|
||||||
int l = 1;
|
int l = 1;
|
||||||
cDvbApi::PrimaryDvbApi->Fill(0, 1, MenuColumns, Lines, clrBackground);
|
cDvbApi::PrimaryDvbApi->Fill(0, 1, MenuColumns, Lines, clrBackground);
|
||||||
if (*RunningTitle) {
|
if (*RunningTitle) {
|
||||||
Write(0, l, EIT.GetRunningTime(), clrYellow, clrBackground);
|
Write(0, l, EIT.GetRunningTime(), clrYellow, clrBackground);
|
||||||
snprintf(buffer, BufSize, "%.*s", w, RunningTitle); Write(t, l, buffer, clrCyan, clrBackground);
|
Write(t, l, RunningTitle, clrCyan, clrBackground);
|
||||||
l++;
|
l++;
|
||||||
}
|
}
|
||||||
if (*RunningSubtitle) {
|
if (*RunningSubtitle) {
|
||||||
snprintf(buffer, BufSize, "%.*s", w, RunningSubtitle); Write(t, l, buffer, clrCyan, clrBackground);
|
Write(t, l, RunningSubtitle, clrCyan, clrBackground);
|
||||||
l++;
|
l++;
|
||||||
}
|
}
|
||||||
if (*NextTitle) {
|
if (*NextTitle) {
|
||||||
Write(0, l, EIT.GetNextTime(), clrYellow, clrBackground);
|
Write(0, l, EIT.GetNextTime(), clrYellow, clrBackground);
|
||||||
snprintf(buffer, BufSize, "%.*s", w, NextTitle); Write(t, l, buffer, clrCyan, clrBackground);
|
Write(t, l, NextTitle, clrCyan, clrBackground);
|
||||||
l++;
|
l++;
|
||||||
}
|
}
|
||||||
if (*NextSubtitle) {
|
if (*NextSubtitle) {
|
||||||
snprintf(buffer, BufSize, "%.*s", w, NextSubtitle); Write(t, l, buffer, clrCyan, clrBackground);
|
Write(t, l, NextSubtitle, clrCyan, clrBackground);
|
||||||
}
|
}
|
||||||
cDvbApi::PrimaryDvbApi->Flush();
|
cDvbApi::PrimaryDvbApi->Flush();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user