summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.c4
-rw-r--r--config.h2
-rw-r--r--displaymenu.c10
-rw-r--r--po/de_DE.po8
-rw-r--r--setup.c8
5 files changed, 29 insertions, 3 deletions
diff --git a/config.c b/config.c
index 26c5d0e1..0599981b 100644
--- a/config.c
+++ b/config.c
@@ -80,6 +80,8 @@ cFlatConfig::cFlatConfig(void) {
MainMenuWidgetDVBDevicesShow = true;
MainMenuWidgetDVBDevicesPosition = 2;
+ MainMenuWidgetDVBDevicesDiscardUnknown = true;
+ MainMenuWidgetDVBDevicesDiscardNotUsed = false;
MainMenuWidgetActiveTimerShow = true;
MainMenuWidgetActiveTimerPosition = 3;
@@ -348,6 +350,8 @@ bool cFlatConfig::SetupParse(const char *Name, const char *Value) {
else if (strcmp(Name, "WeatherFontSize") == 0) WeatherFontSize = atod(Value);
else if (strcmp(Name, "TVScraperReplayInfoShowPoster") == 0) TVScraperReplayInfoShowPoster = atoi(Value);
else if (strcmp(Name, "TVScraperReplayInfoPosterSize") == 0) TVScraperReplayInfoPosterSize = atod(Value);
+ else if (strcmp(Name, "MainMenuWidgetDVBDevicesDiscardUnknown") == 0) MainMenuWidgetDVBDevicesDiscardUnknown = atoi(Value);
+ else if (strcmp(Name, "MainMenuWidgetDVBDevicesDiscardNotUsed") == 0) MainMenuWidgetDVBDevicesDiscardNotUsed = atoi(Value);
else return false;
diff --git a/config.h b/config.h
index edb4403f..197b73f7 100644
--- a/config.h
+++ b/config.h
@@ -258,6 +258,8 @@ class cFlatConfig
int MainMenuWidgetDVBDevicesShow;
int MainMenuWidgetDVBDevicesPosition;
+ int MainMenuWidgetDVBDevicesDiscardUnknown;
+ int MainMenuWidgetDVBDevicesDiscardNotUsed;
int MainMenuWidgetActiveTimerShow;
int MainMenuWidgetActiveTimerPosition;
diff --git a/displaymenu.c b/displaymenu.c
index 88994831..10734b20 100644
--- a/displaymenu.c
+++ b/displaymenu.c
@@ -4048,10 +4048,16 @@ int cFlatDisplayMenu::DrawMainMenuWidgetDVBDevices(int wLeft, int wWidth, int Co
cString chanName = channel->Name();
if( !strcmp(*chanName, "") )
strDevice << tr("not used");
- else
+ else {
+ if( Config.MainMenuWidgetDVBDevicesDiscardUnknown )
+ continue;
strDevice << tr("Unknown") << " (" << *chanName << ")";
- } else
+ }
+ } else {
+ if( Config.MainMenuWidgetDVBDevicesDiscardNotUsed )
+ continue;
strDevice << tr("not used");
+ }
}
contentWidget.AddText(strDevice.str().c_str(), false, cRect(marginItem, ContentTop, wWidth - marginItem*2, fontSmlHeight),
diff --git a/po/de_DE.po b/po/de_DE.po
index 88533c35..27102df2 100644
--- a/po/de_DE.po
+++ b/po/de_DE.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: vdr-skinflat 0.4.3\n"
"Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2014-11-17 20:05+0100\n"
+"POT-Creation-Date: 2014-11-17 20:22+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -786,6 +786,12 @@ msgstr "DVB Geräte-Widget: Anzeigen"
msgid "Widget DVB devices: position"
msgstr "DVB Geräte-Widget: Position"
+msgid "Widget DVB devices: don't show unknown"
+msgstr "DVB Geräte-Widget: unbekannt ausblenden"
+
+msgid "Widget DVB devices: don't show not used"
+msgstr "DVB Geräte-Widget: Nicht verw. ausblenden"
+
msgid "Widget active timer: enable"
msgstr "Aktive Timer-Widget: Anzeigen"
diff --git a/setup.c b/setup.c
index 26f013c7..76807601 100644
--- a/setup.c
+++ b/setup.c
@@ -313,6 +313,8 @@ void cFlatSetup::Store(void) {
SetupStore("WeatherFontSize", dtoa(Config.WeatherFontSize));
SetupStore("TVScraperReplayInfoShowPoster", Config.TVScraperReplayInfoShowPoster);
SetupStore("TVScraperReplayInfoPosterSize", dtoa(Config.TVScraperReplayInfoPosterSize));
+ SetupStore("MainMenuWidgetDVBDevicesDiscardUnknown", Config.MainMenuWidgetDVBDevicesDiscardUnknown);
+ SetupStore("MainMenuWidgetDVBDevicesDiscardNotUsed", Config.MainMenuWidgetDVBDevicesDiscardNotUsed);
Config.Init();
}
@@ -491,6 +493,8 @@ bool cFlatSetupGeneral::SetupParse(const char *Name, const char *Value) {
else if (strcmp(Name, "WeatherFontSize") == 0) SetupConfig->WeatherFontSize = atod(Value);
else if (strcmp(Name, "TVScraperReplayInfoShowPoster") == 0) SetupConfig->TVScraperReplayInfoShowPoster = atoi(Value);
else if (strcmp(Name, "TVScraperReplayInfoPosterSize") == 0) SetupConfig->TVScraperReplayInfoPosterSize = atod(Value);
+ else if (strcmp(Name, "MainMenuWidgetDVBDevicesDiscardUnknown") == 0) SetupConfig->MainMenuWidgetDVBDevicesDiscardUnknown = atoi(Value);
+ else if (strcmp(Name, "MainMenuWidgetDVBDevicesDiscardNotUsed") == 0) SetupConfig->MainMenuWidgetDVBDevicesDiscardNotUsed = atoi(Value);
else return false;
return true;
@@ -651,6 +655,8 @@ void cFlatSetupGeneral::SaveCurrentSettings(void) {
Config.Store("WeatherFontSize", dtoa(Config.WeatherFontSize), *Filename);
Config.Store("TVScraperReplayInfoShowPoster", SetupConfig->TVScraperReplayInfoShowPoster, *Filename);
Config.Store("TVScraperReplayInfoPosterSize", dtoa(Config.TVScraperReplayInfoPosterSize), *Filename);
+ Config.Store("MainMenuWidgetDVBDevicesDiscardUnknown", SetupConfig->MainMenuWidgetDVBDevicesDiscardUnknown, *Filename);
+ Config.Store("MainMenuWidgetDVBDevicesDiscardNotUsed", SetupConfig->MainMenuWidgetDVBDevicesDiscardNotUsed, *Filename);
cString msg = cString::sprintf("%s %s", tr("saved settings in file:"), *File);
Skins.Message(mtInfo, msg);
@@ -1253,6 +1259,8 @@ void cFlatSetupMMWidget::Setup(void) {
Add(new cMenuEditBoolItem(tr("Widget DVB devices: enable"), &SetupConfig->MainMenuWidgetDVBDevicesShow));
if( SetupConfig->MainMenuWidgetDVBDevicesShow ) {
Add(new cMenuEditIntItem(tr("Widget DVB devices: position"), &SetupConfig->MainMenuWidgetDVBDevicesPosition));
+ Add(new cMenuEditBoolItem(tr("Widget DVB devices: don't show unknown"), &SetupConfig->MainMenuWidgetDVBDevicesDiscardUnknown));
+ Add(new cMenuEditBoolItem(tr("Widget DVB devices: don't show not used"), &SetupConfig->MainMenuWidgetDVBDevicesDiscardNotUsed));
}
Add(new cOsdItem("Widget active timer", osUnknown, false));