summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2002-03-29 10:50:20 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2002-03-29 10:50:20 +0100
commitd9b623619146914472123a635125933ca56555fe (patch)
tree6b50483fa9656925fabbdbaaacc9a95e5eba49fe
parent2625c46232837afc8ec52fdeb0ad79ac0f60bc4c (diff)
downloadvdr-d9b623619146914472123a635125933ca56555fe.tar.gz
vdr-d9b623619146914472123a635125933ca56555fe.tar.bz2
Adjusting column width for channel numbers in case there are more than 999 channels
-rw-r--r--HISTORY4
-rw-r--r--menu.c10
2 files changed, 9 insertions, 5 deletions
diff --git a/HISTORY b/HISTORY
index 9415959c..2e0aa032 100644
--- a/HISTORY
+++ b/HISTORY
@@ -1120,7 +1120,7 @@ Video Disk Recorder Revision History
exits. The 'runvdr' script can be used for this purpose.
- Refined texts of the "Setup" menu.
-2002-03-24: Version 1.0.0pre5
+2002-03-29: Version 1.0.0pre5
- Fixed restoring CICAM setup values for a fourth DVB card.
- Completed internationalization of OSD texts (thanks to Hannu Savolainen,
@@ -1139,3 +1139,5 @@ Video Disk Recorder Revision History
delimiter (thanks to Bernd Zierath for helping to debug this one).
- Added a manual page vdr(1).
- New command command line option '-V' to display the VDR version.
+- Adjusting column width for channel numbers in case there are more than 999
+ channels.
diff --git a/menu.c b/menu.c
index 474ef18c..e87b0ce7 100644
--- a/menu.c
+++ b/menu.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: menu.c 1.175 2002/03/23 15:17:14 kls Exp $
+ * $Id: menu.c 1.176 2002/03/29 10:49:22 kls Exp $
*/
#include "menu.h"
@@ -21,6 +21,8 @@
#define MAXWAIT4EPGINFO 10 // seconds
#define MODETIMEOUT 3 // seconds
+#define CHNUMWIDTH (Channels.Count() > 999 ? 5 : 4) // there are people with more than 999 channels...
+
const char *FileNameChars = " aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ0123456789-.#~^";
// --- cMenuEditItem ---------------------------------------------------------
@@ -780,7 +782,7 @@ public:
};
cMenuChannels::cMenuChannels(void)
-:cOsdMenu(tr("Channels"), 4)
+:cOsdMenu(tr("Channels"), CHNUMWIDTH)
{
//TODO
int i = 0;
@@ -1186,7 +1188,7 @@ public:
};
cMenuTimers::cMenuTimers(void)
-:cOsdMenu(tr("Timers"), 2, 4, 10, 6, 6)
+:cOsdMenu(tr("Timers"), 2, CHNUMWIDTH, 10, 6, 6)
{
int i = 0;
cTimer *timer;
@@ -1412,7 +1414,7 @@ static int CompareEventChannel(const void *p1, const void *p2)
}
cMenuWhatsOn::cMenuWhatsOn(const cSchedules *Schedules, bool Now, int CurrentChannelNr)
-:cOsdMenu(Now ? tr("What's on now?") : tr("What's on next?"), 4, 7, 6)
+:cOsdMenu(Now ? tr("What's on now?") : tr("What's on next?"), CHNUMWIDTH, 7, 6)
{
const cSchedule *Schedule = Schedules->First();
const cEventInfo **pArray = NULL;