--- ./channels.c	2012/04/01 09:27:08	2.22
+++ ./channels.c	2012/06/17 11:53:10
@@ -112,10 +112,34 @@
   provider = strcpyrealloc(provider, Channel.provider);
   portalName = strcpyrealloc(portalName, Channel.portalName);
   memcpy(&__BeginData__, &Channel.__BeginData__, (char *)&Channel.__EndData__ - (char *)&Channel.__BeginData__);
+  nameSource = NULL; // these will be recalculated automatically
+  shortNameSource = NULL;
   parameters = Channel.parameters;
   return *this;
 }
 
+const char *cChannel::Name(void) const
+{
+  if (Setup.ShowChannelNamesWithSource) {
+     if (isempty(nameSource))
+        nameSource = cString::sprintf("%s (%c)", name, cSource::ToChar(source));
+     return nameSource;
+     }
+  return name;
+}
+
+const char *cChannel::ShortName(bool OrName) const
+{
+  if (OrName && isempty(shortName))
+     return Name();
+  if (Setup.ShowChannelNamesWithSource) {
+     if (isempty(shortNameSource))
+        shortNameSource = cString::sprintf("%s (%c)", shortName, cSource::ToChar(source));
+     return shortNameSource;
+     }
+  return shortName;
+}
+
 int cChannel::Transponder(int Frequency, char Polarization)
 {
   // some satellites have transponders at the same frequency, just with different polarization:
@@ -233,10 +257,14 @@
            modification |= CHANNELMOD_NAME;
            Channels.SetModified();
            }
-        if (nn)
+        if (nn) {
            name = strcpyrealloc(name, Name);
-        if (ns)
+           nameSource = NULL;
+           }
+        if (ns) {
            shortName = strcpyrealloc(shortName, ShortName);
+           shortNameSource = NULL;
+           }
         if (np)
            provider = strcpyrealloc(provider, Provider);
         }
@@ -721,6 +749,8 @@
         free(tpidbuf);
         free(caidbuf);
         free(namebuf);
+        nameSource = NULL;
+        shortNameSource = NULL;
         if (!GetChannelID().Valid()) {
            esyslog("ERROR: channel data results in invalid ID!");
            return false;
--- ./channels.h	2012/03/11 11:46:39	2.15
+++ ./channels.h	2012/06/17 11:21:33
@@ -123,6 +123,8 @@
   int number;    // Sequence number assigned on load
   bool groupSep;
   int __EndData__;
+  mutable cString nameSource;
+  mutable cString shortNameSource;
   cString parameters;
   int modification;
   mutable const cSchedule *schedule;
@@ -137,8 +139,8 @@
   cString ToText(void) const;
   bool Parse(const char *s);
   bool Save(FILE *f);
-  const char *Name(void) const { return name; }
-  const char *ShortName(bool OrName = false) const { return (OrName && isempty(shortName)) ? name : shortName; }
+  const char *Name(void) const;
+  const char *ShortName(bool OrName = false) const;
   const char *Provider(void) const { return provider; }
   const char *PortalName(void) const { return portalName; }
   int Frequency(void) const { return frequency; } ///< Returns the actual frequency, as given in 'channels.conf'
--- ./config.c	2012/06/13 09:12:53	2.25
+++ ./config.c	2012/06/17 11:15:03
@@ -462,6 +462,7 @@
   DeviceBondings = "";
   InitialVolume = -1;
   ChannelsWrap = 0;
+  ShowChannelNamesWithSource = 0;
   EmergencyExit = 1;
 }
 
--- ./config.h	2012/06/03 13:04:49	2.48
+++ ./config.h	2012/06/17 11:14:50
@@ -323,6 +323,7 @@
   int CurrentDolby;
   int InitialVolume;
   int ChannelsWrap;
+  int ShowChannelNamesWithSource;
   int EmergencyExit;
   int __EndData__;
   cString InitialChannel;
--- ./menu.c	2012/06/13 13:03:26	2.57
+++ ./menu.c	2012/06/17 11:12:25
@@ -3158,6 +3158,7 @@
   Add(new cMenuEditChanItem(tr("Setup.Miscellaneous$Initial channel"),            &data.InitialChannel, tr("Setup.Miscellaneous$as before")));
   Add(new cMenuEditIntItem( tr("Setup.Miscellaneous$Initial volume"),             &data.InitialVolume, -1, 255, tr("Setup.Miscellaneous$as before")));
   Add(new cMenuEditBoolItem(tr("Setup.Miscellaneous$Channels wrap"),              &data.ChannelsWrap));
+  Add(new cMenuEditBoolItem(tr("Setup.Miscellaneous$Show channel names with source"), &data.ShowChannelNamesWithSource));
   Add(new cMenuEditBoolItem(tr("Setup.Miscellaneous$Emergency exit"),             &data.EmergencyExit));
 }
 
--- ./sources.h	2010/03/07 13:53:11	2.3
+++ ./sources.h	2012/06/17 11:19:23
@@ -33,6 +33,7 @@
   int Code(void) const { return code; }
   const char *Description(void) const { return description; }
   bool Parse(const char *s);
+  static char ToChar(int Code) { return (Code & st_Mask) >> 24; }
   static cString ToString(int Code);
   static int FromString(const char *s);
   static int FromData(eSourceType SourceType, int Position = 0, bool East = false);
