summaryrefslogtreecommitdiff
path: root/channels.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2004-05-16 10:35:36 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2004-05-16 10:35:36 +0200
commit5d99df7b7760c4a2b497c737a15b609008f6d56d (patch)
treea342f2f7465a73fe2bd63848d87566af8d646dd3 /channels.c
parent7aab06d8b1c6de59d06756d44c631984acd299b3 (diff)
downloadvdr-5d99df7b7760c4a2b497c737a15b609008f6d56d.tar.gz
vdr-5d99df7b7760c4a2b497c737a15b609008f6d56d.tar.bz2
Implemented 'skins' and 'themes'
Diffstat (limited to 'channels.c')
-rw-r--r--channels.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/channels.c b/channels.c
index 3b0b6161..021b6174 100644
--- a/channels.c
+++ b/channels.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: channels.c 1.24 2004/02/13 15:37:42 kls Exp $
+ * $Id: channels.c 1.25 2004/04/03 13:42:06 kls Exp $
*/
#include "channels.h"
@@ -888,3 +888,19 @@ cChannel *cChannels::NewChannel(const cChannel *Transponder, const char *Name, i
}
return NULL;
}
+
+const char *ChannelString(const cChannel *Channel, int Number)
+{
+ static char buffer[256];
+ if (Channel) {
+ if (Channel->GroupSep())
+ snprintf(buffer, sizeof(buffer), "%s", Channel->Name());
+ else
+ snprintf(buffer, sizeof(buffer), "%d%s %s", Channel->Number(), Number ? "-" : "", Channel->Name());
+ }
+ else if (Number)
+ snprintf(buffer, sizeof(buffer), "%d-", Number);
+ else
+ snprintf(buffer, sizeof(buffer), "%s", tr("*** Invalid Channel ***"));
+ return buffer;
+}