diff options
-rw-r--r-- | config.c | 4 | ||||
-rw-r--r-- | config.h | 2 | ||||
-rw-r--r-- | displaymenu.c | 22 | ||||
-rw-r--r-- | displaymenuview.c | 5 | ||||
-rw-r--r-- | imageloader.c | 32 | ||||
-rw-r--r-- | po/de_DE.po | 18 | ||||
-rw-r--r-- | setup.c | 4 |
7 files changed, 54 insertions, 33 deletions
@@ -62,6 +62,8 @@ cNopacityConfig::cNopacityConfig() { menuScrollDelay = 1000; menuScrollSpeed = 2; menuWidthRightItems = 12; + showDiscUsage = 1; + showTimers = 1; headerHeight = 7; footerHeight = 7; numDefaultMenuItems = 16; @@ -213,6 +215,8 @@ bool cNopacityConfig::SetupParse(const char *Name, const char *Value) { else if (strcmp(Name, "useSubtitleRerun") == 0) useSubtitleRerun = atoi(Value); else if (strcmp(Name, "menuWidthNarrow") == 0) menuWidthNarrow = atoi(Value); else if (strcmp(Name, "menuWidthRightItems") == 0) menuWidthRightItems = atoi(Value); + else if (strcmp(Name, "showDiscUsage") == 0) showDiscUsage = atoi(Value); + else if (strcmp(Name, "showTimers") == 0) showTimers = atoi(Value); else if (strcmp(Name, "headerHeight") == 0) headerHeight = atoi(Value); else if (strcmp(Name, "footerHeight") == 0) footerHeight = atoi(Value); else if (strcmp(Name, "numDefaultMenuItems") == 0) numDefaultMenuItems = atoi(Value); @@ -87,6 +87,8 @@ class cNopacityConfig { int menuScrollFrameTime;
int menuWidthNarrow;
int menuWidthRightItems;
+ int showDiscUsage;
+ int showTimers;
int headerHeight;
int footerHeight;
int numDefaultMenuItems;
diff --git a/displaymenu.c b/displaymenu.c index 8e3ea24..9ecec20 100644 --- a/displaymenu.c +++ b/displaymenu.c @@ -146,12 +146,16 @@ void cNopacityDisplayMenu::SetMenuCategory(eMenuCategory MenuCategory) { menuCategoryLast = this->MenuCategory(); cSkinDisplayMenu::SetMenuCategory(MenuCategory); if ((menuCategoryLast == mcMain) && (MenuCategory != mcMain)) { - menuView->ShowDiskUsage(false); - for (cNopacityTimer *t = timers.First(); t; t = timers.Next(t)) { - t->SetLayer(-1); - } - diskUsageDrawn = false; - timersDrawn = false; + if (config.showDiscUsage) { + menuView->ShowDiskUsage(false); + diskUsageDrawn = false; + } + if (config.showTimers) { + for (cNopacityTimer *t = timers.First(); t; t = timers.Next(t)) { + t->SetLayer(-1); + } + timersDrawn = false; + } } } @@ -476,8 +480,10 @@ void cNopacityDisplayMenu::SetText(const char *Text, bool FixedFont) { void cNopacityDisplayMenu::Flush(void) { menuView->DrawDate(initial); if (MenuCategory() == mcMain) { - DrawDisk(); - DrawTimers(); + if (config.showDiscUsage) + DrawDisk(); + if (config.showTimers) + DrawTimers(); } if (initial) { if (config.menuFadeTime) diff --git a/displaymenuview.c b/displaymenuview.c index 70ae27c..ce8e7cc 100644 --- a/displaymenuview.c +++ b/displaymenuview.c @@ -495,7 +495,10 @@ void cNopacityDisplayMenuView::ClearButton(int num) { } int cNopacityDisplayMenuView::GetTimersInitHeight(void) { - return headerHeight + diskUsageHeight + 2*spaceMenu; + int initHeight = headerHeight + 2*spaceMenu; + if (config.showDiscUsage) + initHeight += diskUsageHeight; + return initHeight; } int cNopacityDisplayMenuView::GetTimersMaxHeight(void) { diff --git a/imageloader.c b/imageloader.c index 8b937fa..6ff417a 100644 --- a/imageloader.c +++ b/imageloader.c @@ -94,15 +94,15 @@ bool cImageLoader::LoadRecordingImage(cString Path) { int height = config.epgImageHeight; if ((width == 0)||(height==0)) return false; - cString recImage(""); - if (FirstImageInFolder(Path, "jpg", &recImage)) { - recImage = cString::sprintf("/%s", *recImage); + cString recImage(""); + if (FirstImageInFolder(Path, "jpg", &recImage)) { + recImage = cString::sprintf("/%s", *recImage); if (!LoadImage(*recImage, Path, "jpg")) return false; - buffer.sample( Geometry(width, height)); + buffer.sample( Geometry(width, height)); return true; - } - return false; + } + return false; } void cImageLoader::DrawBackground(tColor back, tColor blend, int width, int height) { @@ -179,15 +179,15 @@ bool cImageLoader::FirstImageInFolder(cString Path, cString Extension, cString * struct dirent *file; folder = opendir(Path); while (file = readdir(folder)) { - if (endswith(file->d_name, *Extension)) { - std::string fileName = file->d_name; - if (fileName.length() > 4) - fileName = fileName.substr(0, fileName.length() - 4); - else - return false; - *recImage = fileName.c_str(); - return true; - } + if (endswith(file->d_name, *Extension)) { + std::string fileName = file->d_name; + if (fileName.length() > 4) + fileName = fileName.substr(0, fileName.length() - 4); + else + return false; + *recImage = fileName.c_str(); + return true; + } } - return false; + return false; }
\ No newline at end of file diff --git a/po/de_DE.po b/po/de_DE.po index 4df2a68..af9841a 100644 --- a/po/de_DE.po +++ b/po/de_DE.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: skinnopacity 0.0.1\n" "Report-Msgid-Bugs-To: <see README>\n" -"POT-Creation-Date: 2012-12-15 12:57+0100\n" +"POT-Creation-Date: 2012-12-19 19:25+0100\n" "PO-Revision-Date: 2012-11-11 17:49+0200\n" "Last-Translator: louis\n" "Language-Team: \n" @@ -83,23 +83,27 @@ msgstr "Untertitel für Wiederholungssuche nutzen" msgid "Width of narrow Menu Bar (Percent of OSD Width)" msgstr "Breite der schmalen Menüleiste (Proz. der OSD Breite)" +msgid "Display Disk Usage" +msgstr "Festplattenstatus anzeigen" + +msgid "Display Timers" +msgstr "Timer anzeigen" + msgid "Width of Disc Usage and Timers Display (Percent of OSD Width)" msgstr "Breite der Anzeige der Timer (Proz. der OSD Breite)" msgid "Header Height (Percent of OSD Height)" -msgstr "Header Höhe (in Prozent der OSD Höhe" +msgstr "Header Höhe (in Prozent der OSD Höhe)" msgid "Footer Height (Percent of OSD Height)" -msgstr "Footer Höhe (in Prozent der OSD Höhe" +msgstr "Footer Höhe (in Prozent der OSD Höhe)" msgid "Number of Default Menu Entries per Page" msgstr "Anzahl der Default-Menüelemente pro Seite" -#, fuzzy msgid "Icon Size (Square Main Menu Icons)" -msgstr "Größe der quadratischen Hauptmenü Icons)" +msgstr "Größe der quadratischen Hauptmenü Icons" -#, fuzzy msgid "Header Icon Size (Square Header Menu Icons)" msgstr "Größe der quadratischen Headericons" @@ -208,7 +212,6 @@ msgstr "Schriftgröße anpassen - Anzeigetext" msgid "Width of Tracks Display (Percent of OSD Width)" msgstr "Breite der Audio Tracks Anzeige (Proz. der OSD Breite)" -#, fuzzy msgid "Hight of Tracks Display (Percent of OSD Height)" msgstr "Höhe der Wiedergabe Anzeige (Proz. der OSD Höhe)" @@ -239,7 +242,6 @@ msgstr "Lautstärke Anzeige" msgid "Width of Volume Display (Percent of OSD Height)" msgstr "Breite der Lautstärken Anzeige (Proz. der OSD Breite)" -#, fuzzy msgid "Hight of Volume Display (Percent of OSD Height)" msgstr "Breite der Lautstärken Anzeige (Proz. der OSD Breite)" @@ -100,6 +100,8 @@ void cNopacitySetup::Store(void) { SetupStore("menuScrollSpeed", config.menuScrollSpeed); SetupStore("menuWidthNarrow", config.menuWidthNarrow); SetupStore("menuWidthRightItems", config.menuWidthRightItems); + SetupStore("showDiscUsage", config.showDiscUsage); + SetupStore("showTimers", config.showTimers); SetupStore("headerHeight", config.headerHeight); SetupStore("footerHeight", config.footerHeight); SetupStore("numDefaultMenuItems", config.numDefaultMenuItems); @@ -179,6 +181,8 @@ void cNopacitySetupMenuDisplay::Set(void) { Add(new cMenuEditIntItem(tr("Number of reruns to display"), &tmpNopacityConfig->numReruns, 1, 10)); Add(new cMenuEditStraItem(tr("Use Subtitle for reruns"), &tmpNopacityConfig->useSubtitleRerun, 3, useSubtitleRerunTexts)); Add(new cMenuEditIntItem(tr("Width of narrow Menu Bar (Percent of OSD Width)"), &tmpNopacityConfig->menuWidthNarrow, 10, 100)); + Add(new cMenuEditBoolItem(tr("Display Disk Usage"), &tmpNopacityConfig->showDiscUsage)); + Add(new cMenuEditBoolItem(tr("Display Timers"), &tmpNopacityConfig->showTimers)); Add(new cMenuEditIntItem(tr("Width of Disc Usage and Timers Display (Percent of OSD Width)"), &tmpNopacityConfig->menuWidthRightItems, 10, 100)); Add(new cMenuEditIntItem(tr("Header Height (Percent of OSD Height)"), &tmpNopacityConfig->headerHeight, 0, 30)); Add(new cMenuEditIntItem(tr("Footer Height (Percent of OSD Height)"), &tmpNopacityConfig->footerHeight, 0, 30)); |