diff options
-rw-r--r-- | HISTORY | 2 | ||||
-rw-r--r-- | config.c | 8 | ||||
-rw-r--r-- | config.h | 4 | ||||
-rw-r--r-- | displaymenu.c | 42 | ||||
-rw-r--r-- | displaymenu.h | 2 | ||||
-rw-r--r-- | displaymenuview.c | 34 | ||||
-rw-r--r-- | displaymenuview.h | 4 | ||||
-rw-r--r-- | helpers.c | 3 | ||||
-rw-r--r-- | icons/timerActive.png | bin | 0 -> 35529 bytes | |||
-rw-r--r-- | icons/timerInactive.png | bin | 0 -> 52583 bytes | |||
-rw-r--r-- | icons/timerRecording.png | bin | 0 -> 7320 bytes | |||
-rw-r--r-- | menuitem.c | 141 | ||||
-rw-r--r-- | menuitem.h | 20 | ||||
-rw-r--r-- | po/de_DE.po | 14 | ||||
-rw-r--r-- | setup.c | 10 |
15 files changed, 275 insertions, 9 deletions
@@ -127,3 +127,5 @@ Version 0.0.7: - Usage of narrow menus (main, schedule, channel, recordings, settings) configurable via plugin setup. If option is set to "no", the "normal" style for this menu will be used. +- Introduced narrow display of timers menu (Usage of narrow timer menu + and width also configurable) @@ -57,6 +57,7 @@ cNopacityConfig::cNopacityConfig() { narrowMainMenu = 1; narrowScheduleMenu = 1; narrowChannelMenu = 1; + narrowTimerMenu = 1; narrowRecordingMenu = 1; narrowSetupMenu = 1; displayRerunsDetailEPGView = 1; @@ -69,6 +70,7 @@ cNopacityConfig::cNopacityConfig() { menuWidthMain = 30; menuWidthSchedules = 30; menuWidthChannels = 30; + menuWidthTimers = 30; menuWidthRecordings = 30; menuHeightInfoWindow = 20; menuScrollDelay = 1; @@ -108,6 +110,8 @@ cNopacityConfig::cNopacityConfig() { fontMenuitemChannelSmall = 0; fontMenuitemRecordings = 0; fontMenuitemRecordingsSmall = 0; + fontMenuitemTimers = 0; + fontMenuitemTimersSmall = 0; fontMenuitemDefault = 0; fontDiskUsage = 0; fontDiskUsagePercent = 0; @@ -234,6 +238,7 @@ bool cNopacityConfig::SetupParse(const char *Name, const char *Value) { else if (strcmp(Name, "narrowMainMenu") == 0) narrowMainMenu = atoi(Value); else if (strcmp(Name, "narrowScheduleMenu") == 0) narrowScheduleMenu = atoi(Value); else if (strcmp(Name, "narrowChannelMenu") == 0) narrowChannelMenu = atoi(Value); + else if (strcmp(Name, "narrowTimerMenu") == 0) narrowTimerMenu = atoi(Value); else if (strcmp(Name, "narrowRecordingMenu") == 0) narrowRecordingMenu = atoi(Value); else if (strcmp(Name, "narrowSetupMenu") == 0) narrowSetupMenu = atoi(Value); else if (strcmp(Name, "displayRerunsDetailEPGView") == 0) displayRerunsDetailEPGView = atoi(Value); @@ -244,6 +249,7 @@ bool cNopacityConfig::SetupParse(const char *Name, const char *Value) { else if (strcmp(Name, "menuWidthMain") == 0) menuWidthMain = atoi(Value); else if (strcmp(Name, "menuWidthSchedules") == 0) menuWidthSchedules = atoi(Value); else if (strcmp(Name, "menuWidthChannels") == 0) menuWidthChannels = atoi(Value); + else if (strcmp(Name, "menuWidthTimers") == 0) menuWidthTimers = atoi(Value); else if (strcmp(Name, "menuWidthRecordings") == 0) menuWidthRecordings = atoi(Value); else if (strcmp(Name, "menuWidthRightItems") == 0) menuWidthRightItems = atoi(Value); else if (strcmp(Name, "menuSizeDiskUsage") == 0) menuSizeDiskUsage = atoi(Value); @@ -278,6 +284,8 @@ bool cNopacityConfig::SetupParse(const char *Name, const char *Value) { else if (strcmp(Name, "fontMenuitemChannelSmall") == 0) fontMenuitemChannelSmall = atoi(Value); else if (strcmp(Name, "fontMenuitemRecordings") == 0) fontMenuitemRecordings = atoi(Value); else if (strcmp(Name, "fontMenuitemRecordingsSmall") == 0) fontMenuitemRecordingsSmall = atoi(Value); + else if (strcmp(Name, "fontMenuitemTimers") == 0) fontMenuitemTimers = atoi(Value); + else if (strcmp(Name, "fontMenuitemTimersSmall") == 0) fontMenuitemTimersSmall = atoi(Value); else if (strcmp(Name, "fontMenuitemDefault") == 0) fontMenuitemDefault = atoi(Value); else if (strcmp(Name, "fontDiskUsage") == 0) fontDiskUsage = atoi(Value); else if (strcmp(Name, "fontDiskUsagePercent") == 0) fontDiskUsagePercent = atoi(Value); @@ -79,6 +79,7 @@ class cNopacityConfig { int narrowMainMenu;
int narrowScheduleMenu;
int narrowChannelMenu;
+ int narrowTimerMenu;
int narrowRecordingMenu;
int narrowSetupMenu;
int displayRerunsDetailEPGView;
@@ -100,6 +101,7 @@ class cNopacityConfig { int menuWidthMain;
int menuWidthSchedules;
int menuWidthChannels;
+ int menuWidthTimers;
int menuWidthRecordings;
int menuHeightInfoWindow;
int menuWidthRightItems;
@@ -134,6 +136,8 @@ class cNopacityConfig { int fontMenuitemChannelSmall;
int fontMenuitemRecordings;
int fontMenuitemRecordingsSmall;
+ int fontMenuitemTimers;
+ int fontMenuitemTimersSmall;
int fontMenuitemDefault;
int fontDiskUsage;
int fontDiskUsagePercent;
diff --git a/displaymenu.c b/displaymenu.c index 7f28f1d..9085187 100644 --- a/displaymenu.c +++ b/displaymenu.c @@ -37,7 +37,7 @@ cNopacityDisplayMenu::~cNopacityDisplayMenu() { delete detailView; } timers.Clear(); - for (int i=0; i<10; i++) + for (int i=0; i<12; i++) cOsdProvider::DropImage(handleBackgrounds[i]); for (int i=0; i<4; i++) cOsdProvider::DropImage(handleButtons[i]); @@ -163,6 +163,12 @@ int cNopacityDisplayMenu::MaxItems(void) { else maxItems = config.numDefaultMenuItems; break; + case mcTimer: + if (config.narrowTimerMenu) + maxItems = menuView->GetMaxItems(MenuCategory()); + else + maxItems = config.numDefaultMenuItems; + break; case mcRecording: if (config.narrowRecordingMenu) maxItems = menuView->GetMaxItems(MenuCategory()); @@ -363,7 +369,39 @@ bool cNopacityDisplayMenu::SetItemEvent(const cEvent *Event, int Index, bool Cur } bool cNopacityDisplayMenu::SetItemTimer(const cTimer *Timer, int Index, bool Current, bool Selectable) { - return false; + if (!config.narrowTimerMenu) + return false; + if ((initMenu)&&(Index > menuItemIndexLast)) { + cNopacityMenuItem *item = new cNopacityTimerMenuItem(osd, Timer, Selectable); + cPoint itemSize; + menuView->GetMenuItemSize(MenuCategory(), &itemSize); + item->SetFont(menuView->GetMenuItemFont(mcTimer)); + item->SetFontSmall(menuView->GetMenuItemFontSmall(mcTimer)); + int spaceTop = menuView->GetMenuTop(currentNumItems, itemSize.Y()); + item->SetGeometry(Index, spaceTop, menuView->spaceMenu, itemSize.X(), itemSize.Y()); + item->SetCurrent(Current); + item->SetBackgrounds(handleBackgrounds); + item->CreateText(); + int textWidth = item->CheckScrollable(true); + item->CreatePixmap(); + item->CreatePixmapIcon(); + item->CreatePixmapTextScroller(textWidth); + menuItems.Add(item); + item->Render(); + menuItemIndexLast = Index; + if (initial) { + if (FadeTime) { + item->SetAlpha(0); + item->SetAlphaIcon(0); + item->SetAlphaText(0); + } + } + } else { + cNopacityMenuItem *item = menuItems.Get(Index); + item->SetCurrent(Current); + item->Render(); + } + return true; } bool cNopacityDisplayMenu::SetItemChannel(const cChannel *Channel, int Index, bool Current, bool Selectable, bool WithProvider) { diff --git a/displaymenu.h b/displaymenu.h index 6dc74f5..8752cfa 100644 --- a/displaymenu.h +++ b/displaymenu.h @@ -19,7 +19,7 @@ private: int currentNumItems; cList<cNopacityTimer> timers; cList<cNopacityMenuItem> menuItems; - int handleBackgrounds[10]; + int handleBackgrounds[12]; int handleButtons[4]; int positionButtons[4]; cRect videoWindowRect; diff --git a/displaymenuview.c b/displaymenuview.c index deba02e..26975ab 100644 --- a/displaymenuview.c +++ b/displaymenuview.c @@ -29,6 +29,8 @@ cNopacityDisplayMenuView::~cNopacityDisplayMenuView(void) { delete fontMenuitemChannelSmall; delete fontMenuitemRecordings; delete fontMenuitemRecordingsSmall; + delete fontMenuitemTimers; + delete fontMenuitemTimersSmall; delete fontMenuitemDefault; delete fontDiskUsage; delete fontDiskUsagePercent; @@ -58,12 +60,14 @@ void cNopacityDisplayMenuView::SetGeometry(void) { contentWidthMain = osdWidth * config.menuWidthMain / 100; contentWidthSchedules = osdWidth * config.menuWidthSchedules / 100; contentWidthChannels = osdWidth * config.menuWidthChannels / 100; + contentWidthTimers = osdWidth * config.menuWidthTimers / 100; contentWidthRecordings = osdWidth * config.menuWidthRecordings / 100; contentWidthFull = osdWidth - widthScrollbar - spaceMenu; menuItemWidthDefault = contentWidthFull - 4 * spaceMenu; menuItemWidthMain = contentWidthMain - 4*spaceMenu; menuItemWidthSchedule = contentWidthSchedules - 4*spaceMenu; menuItemWidthChannel = contentWidthChannels - 4*spaceMenu; + menuItemWidthTimer = contentWidthTimers - 4*spaceMenu; menuItemWidthRecording = contentWidthRecordings - 4*spaceMenu; menuItemHeightMain = config.iconHeight + 2; menuItemHeightSchedule = config.menuItemLogoHeight + 2; @@ -126,6 +130,11 @@ int cNopacityDisplayMenuView::GetContentWidth(eMenuCategory menuCat) { return contentWidthChannels; else return contentWidthFull; + case mcTimer: + if (config.narrowTimerMenu) + return contentWidthTimers; + else + return contentWidthFull; case mcRecording: if (config.narrowRecordingMenu) return contentWidthRecordings; @@ -147,7 +156,8 @@ void cNopacityDisplayMenuView::CreatePixmaps(void) { int drawPortWidth = osdWidth + contentWidthFull - Minimum(contentWidthMain, contentWidthSchedules, - contentWidthChannels, + contentWidthChannels, + contentWidthTimers, contentWidthRecordings); pixmapContent = osd->CreatePixmap(1, cRect(0, headerHeight, osdWidth, contentHeight), cRect(0, 0, drawPortWidth, contentHeight)); @@ -198,6 +208,8 @@ void cNopacityDisplayMenuView::CreateFonts(void) { fontMenuitemChannelSmall = cFont::CreateFont(config.fontName, menuItemHeightSchedule / 5 - 2 + config.fontMenuitemChannelSmall); fontMenuitemRecordings = cFont::CreateFont(config.fontName, menuItemHeightRecordings / 2 - 14 + config.fontMenuitemRecordings); fontMenuitemRecordingsSmall = cFont::CreateFont(config.fontName, menuItemHeightRecordings / 4 - 3 + config.fontMenuitemRecordingsSmall); + fontMenuitemTimers = cFont::CreateFont(config.fontName, menuItemHeightSchedule / 3 + config.fontMenuitemTimers); + fontMenuitemTimersSmall = cFont::CreateFont(config.fontName, menuItemHeightSchedule / 4 - 3 + config.fontMenuitemTimersSmall); fontMenuitemDefault = cFont::CreateFont(config.fontName, menuItemHeightDefault * 2 / 3 + config.fontMenuitemDefault); fontDiskUsage = cFont::CreateFont(config.fontName, diskUsageHeight/6 - 2 + config.fontDiskUsage); fontDiskUsagePercent = cFont::CreateFont(config.fontName, diskUsageHeight/5 - 4 + config.fontDiskUsagePercent); @@ -219,6 +231,8 @@ cFont *cNopacityDisplayMenuView::GetMenuItemFont(eMenuCategory menuCat) { return fontMenuitemSchedule; case mcChannel: return fontMenuitemChannel; + case mcTimer: + return fontMenuitemTimers; case mcRecording: return fontMenuitemRecordings; default: @@ -233,8 +247,10 @@ cFont *cNopacityDisplayMenuView::GetMenuItemFontSmall(eMenuCategory menuCat) { return fontMenuitemScheduleSmall; case mcChannel: return fontMenuitemChannelSmall; + case mcTimer: + return fontMenuitemTimersSmall; case mcRecording: - return fontMenuitemRecordingsSmall; + return fontMenuitemTimersSmall; default: return fontMenuitemScheduleSmall; } @@ -268,6 +284,10 @@ void cNopacityDisplayMenuView::GetMenuItemSize(eMenuCategory menuCat, cPoint *it itemWidth = menuItemWidthChannel; itemHeight = menuItemHeightSchedule; break; + case mcTimer: + itemWidth = menuItemWidthTimer; + itemHeight = menuItemHeightSchedule; + break; case mcRecording: itemWidth = menuItemWidthRecording; itemHeight = menuItemHeightRecordings; @@ -291,6 +311,7 @@ int cNopacityDisplayMenuView::GetMaxItems(eMenuCategory menuCat) { case mcScheduleNow: case mcScheduleNext: case mcChannel: + case mcTimer: maxItems = contentHeight / (menuItemHeightSchedule + spaceMenu); break; case mcRecording: @@ -369,6 +390,12 @@ void cNopacityDisplayMenuView::CreateBackgroundImages(int *handleBackgrounds, in handleBackgrounds[8] = cOsdProvider::StoreImage(imgLoader.GetImage()); imgLoader.DrawBackground(Theme.Color(clrMenuItemHigh), Theme.Color(clrMenuItemHighBlend), itemSize.X()-2, itemSize.Y()-2); handleBackgrounds[9] = cOsdProvider::StoreImage(imgLoader.GetImage()); + //Timers Menu + GetMenuItemSize(mcTimer, &itemSize); + imgLoader.DrawBackground(Theme.Color(clrMenuItem), Theme.Color(clrMenuItemBlend), itemSize.X()-2, itemSize.Y()-2); + handleBackgrounds[10] = cOsdProvider::StoreImage(imgLoader.GetImage()); + imgLoader.DrawBackground(Theme.Color(clrMenuItemHigh), Theme.Color(clrMenuItemHighBlend), itemSize.X()-2, itemSize.Y()-2); + handleBackgrounds[11] = cOsdProvider::StoreImage(imgLoader.GetImage()); imgLoader.DrawBackground(Theme.Color(clrMenuBack), Theme.Color(clrButtonRed), buttonWidth-4, buttonHeight-4); handleButtons[0] = cOsdProvider::StoreImage(imgLoader.GetImage()); @@ -390,7 +417,8 @@ void cNopacityDisplayMenuView::DrawBorderDecoration() { int radius = 10; int minContentWidth = Minimum(contentWidthMain, contentWidthSchedules, - contentWidthChannels, + contentWidthChannels, + contentWidthTimers, contentWidthRecordings); pixmapContent->Fill(clrTransparent); pixmapContent->DrawRectangle(cRect(0, 0, contentWidthFull-radius, contentHeight), Theme.Color(clrMenuBack)); diff --git a/displaymenuview.h b/displaymenuview.h index e3d0b6d..6dfc962 100644 --- a/displaymenuview.h +++ b/displaymenuview.h @@ -29,6 +29,8 @@ class cNopacityDisplayMenuView { cFont *fontMenuitemChannelSmall; cFont *fontMenuitemRecordings; cFont *fontMenuitemRecordingsSmall; + cFont *fontMenuitemTimers; + cFont *fontMenuitemTimersSmall; cFont *fontMenuitemDefault; cFont *fontDiskUsage; cFont *fontDiskUsagePercent; @@ -46,11 +48,13 @@ class cNopacityDisplayMenuView { int contentWidthMain; int contentWidthSchedules; int contentWidthChannels; + int contentWidthTimers; int contentWidthRecordings; int menuItemWidthDefault, menuItemHeightDefault; int menuItemWidthMain, menuItemHeightMain; int menuItemWidthSchedule, menuItemHeightSchedule; int menuItemWidthChannel; + int menuItemWidthTimer; int menuItemWidthRecording, menuItemHeightRecordings; int diskUsageWidth, diskUsageHeight; int timersWidth; @@ -37,10 +37,11 @@ static void DrawBlendedBackground(cPixmap *pixmap, tColor color, tColor colorBle } } -static int Minimum(int a, int b, int c, int d) { +static int Minimum(int a, int b, int c, int d, int e) { int min = a; if (b < min) min = b; if (c < min) min = c; if (d < min) min = d; + if (e < min) min = e; return min; }
\ No newline at end of file diff --git a/icons/timerActive.png b/icons/timerActive.png Binary files differnew file mode 100644 index 0000000..ec30010 --- /dev/null +++ b/icons/timerActive.png diff --git a/icons/timerInactive.png b/icons/timerInactive.png Binary files differnew file mode 100644 index 0000000..3630d29 --- /dev/null +++ b/icons/timerInactive.png diff --git a/icons/timerRecording.png b/icons/timerRecording.png Binary files differnew file mode 100644 index 0000000..3f253fb --- /dev/null +++ b/icons/timerRecording.png @@ -594,6 +594,147 @@ void cNopacityChannelMenuItem::Render() { } } +// cNopacityTimerMenuItem ------------- + +cNopacityTimerMenuItem::cNopacityTimerMenuItem(cOsd *osd, const cTimer *Timer, bool sel) : cNopacityMenuItem (osd, "", sel) { + this->Timer = Timer; +} + +cNopacityTimerMenuItem::~cNopacityTimerMenuItem(void) { +} + +void cNopacityTimerMenuItem::CreatePixmapTextScroller(int totalWidth) { + int pixmapLeft = left + config.menuItemLogoWidth + 10; + int pixmapWidth = width - config.menuItemLogoWidth - 10; + int drawPortWidth = totalWidth + 10; + pixmapTextScroller = osd->CreatePixmap(4, cRect(pixmapLeft, top + index * (height + left), pixmapWidth, height), cRect(0, 0, drawPortWidth, height)); + pixmapTextScroller->Fill(clrTransparent); +} + +void cNopacityTimerMenuItem::CreateText() { + const char *File = Setup.FoldersInTimerMenu ? NULL : strrchr(Timer->File(), FOLDERDELIMCHAR); + if (File && strcmp(File + 1, TIMERMACRO_TITLE) && strcmp(File + 1, TIMERMACRO_EPISODE)) + File++; + else + File = Timer->File(); + strEntry = File; + strDateTime = CreateDate(); +} + +std::string cNopacityTimerMenuItem::CreateDate(void) { + cString day, dayName(""); + if (Timer->WeekDays()) + day = Timer->PrintDay(0, Timer->WeekDays(), false); + else if (Timer->Day() - time(NULL) < 28 * SECSINDAY) { + day = itoa(Timer->GetMDay(Timer->Day())); + dayName = WeekDayName(Timer->Day()); + } else { + struct tm tm_r; + time_t Day = Timer->Day(); + localtime_r(&Day, &tm_r); + char buffer[16]; + strftime(buffer, sizeof(buffer), "%Y%m%d", &tm_r); + day = buffer; + } + return *cString::sprintf("%s%s%s (%02d:%02d-%02d:%02d)", *dayName, *dayName && **dayName ? " " : "", *day, Timer->Start() / 100, Timer->Start() % 100, Timer->Stop() / 100, Timer->Stop() % 100); +} + +int cNopacityTimerMenuItem::CheckScrollable(bool hasIcon) { + int spaceLeft = left; + if (hasIcon) + spaceLeft += config.menuItemLogoWidth; + int totalTextWidth = width - spaceLeft; + if (font->Width(strEntry.c_str()) > (width - spaceLeft)) { + scrollable = true; + totalTextWidth = max(font->Width(strEntry.c_str()), totalTextWidth); + strEntryFull = strEntry.c_str(); + strEntry = CutText(&strEntry, width - spaceLeft, font); + } + return totalTextWidth; +} + +void cNopacityTimerMenuItem::SetTextFull(void) { + tColor clrFont = (current)?Theme.Color(clrMenuFontMenuItemHigh):Theme.Color(clrMenuFontMenuItem); + pixmapTextScroller->Fill(clrTransparent); + pixmapTextScroller->DrawText(cPoint(0, height/2 + (height/2 - font->Height())/2), strEntryFull.c_str(), clrFont, clrTransparent, font); +} + +void cNopacityTimerMenuItem::SetTextShort(void) { + tColor clrFont = (current)?Theme.Color(clrMenuFontMenuItemHigh):Theme.Color(clrMenuFontMenuItem); + pixmapTextScroller->Fill(clrTransparent); + pixmapTextScroller->DrawText(cPoint(0, height/2 + (height/2 - font->Height())/2), strEntry.c_str(), clrFont, clrTransparent, font); +} + +void cNopacityTimerMenuItem::DrawBackground(int handleBackground, int textLeft) { + pixmap->Fill(Theme.Color(clrMenuBorder)); + pixmap->DrawImage(cPoint(1, 1), handleBackground); + int iconSize = height/2; + cString iconName(""); + bool firstDay = false; + if (!(Timer->HasFlags(tfActive))) + iconName = "timerInactive"; + else if (Timer->FirstDay()) { + iconName = "timerActive"; + firstDay = true; + } else if (Timer->Recording()) + iconName = "timerRecording"; + else + iconName = "timerActive"; + + cImageLoader imgLoader; + if (imgLoader.LoadIcon(iconName, iconSize)) { + pixmapIcon->DrawImage(cPoint(textLeft, 0), imgLoader.GetImage()); + } + cString dateTime(""); + if (firstDay) + dateTime = cString::sprintf("! %s", strDateTime.c_str()); + else + dateTime = strDateTime.c_str(); + pixmap->DrawText(cPoint(textLeft + iconSize, (height/2 - fontSmall->Height())/2), *dateTime, Theme.Color(clrMenuFontMenuItem), clrTransparent, fontSmall); +} + +void cNopacityTimerMenuItem::Render() { + int handleBgrd = (current)?handleBackgrounds[11]:handleBackgrounds[10]; + textLeft = config.menuItemLogoWidth + 10; + if (selectable) { + DrawBackground(handleBgrd, textLeft); + int logoWidth = config.menuItemLogoWidth; + int logoHeight = config.menuItemLogoHeight; + if (!drawn) { + DrawLogo(logoWidth, logoHeight); + drawn = true; + } + if (!Running()) + SetTextShort(); + if (current && scrollable && !Running() && config.menuScrollSpeed) { + Start(); + } + if (wasCurrent && !current && scrollable && Running()) { + pixmapTextScroller->SetDrawPortPoint(cPoint(0, 0)); + SetTextShort(); + Cancel(-1); + } + } +} + +void cNopacityTimerMenuItem::DrawLogo(int logoWidth, int logoHeight) { + if (Timer && Timer->Channel() && Timer->Channel()->Name()) { + cImageLoader imgLoader; + if (imgLoader.LoadLogo(Timer->Channel()->Name(), logoWidth, logoHeight)) { + pixmapIcon->DrawImage(cPoint(1, 1), imgLoader.GetImage()); + } else { + cTextWrapper channel; + channel.Set(Timer->Channel()->Name(), font, logoWidth); + int lines = channel.Lines(); + int lineHeight = height / 3; + int heightChannel = lines * lineHeight; + int y = (heightChannel>height)?0:(height-heightChannel)/2; + for (int line = 0; line < lines; line++) { + pixmapIcon->DrawText(cPoint((logoWidth - font->Width(channel.GetLine(line)))/2, y+lineHeight*line), channel.GetLine(line), Theme.Color(clrMenuFontMenuItemHigh), clrTransparent, font); + } + } + } +} // cNopacityRecordingMenuItem ------------- cNopacityRecordingMenuItem::cNopacityRecordingMenuItem(cOsd *osd, const cRecording *Recording, bool sel, bool isFolder, int Level, int Total, int New) : cNopacityMenuItem (osd, "", sel) { @@ -120,6 +120,26 @@ public: void Render(); }; +class cNopacityTimerMenuItem : public cNopacityMenuItem { +private: + const cTimer *Timer; + std::string strEntry; + std::string strEntryFull; + std::string strDateTime; + void SetTextFull(void); + void SetTextShort(void); + void DrawBackground(int handleBackground, int textLeft); + void DrawLogo(int logoWidth, int logoHeight); + std::string CreateDate(void); +public: + cNopacityTimerMenuItem(cOsd *osd, const cTimer *Timer, bool sel); + ~cNopacityTimerMenuItem(void); + void CreatePixmapTextScroller(int totalWidth); + void CreateText(void); + int CheckScrollable(bool hasIcon); + void Render(); +}; + class cNopacityRecordingMenuItem : public cNopacityMenuItem { private: const cRecording *Recording; diff --git a/po/de_DE.po b/po/de_DE.po index e8107c0..c0cacc8 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: 2013-02-09 14:02+0100\n" +"POT-Creation-Date: 2013-02-12 13:50+0100\n" "PO-Revision-Date: 2012-11-11 17:49+0200\n" "Last-Translator: louis\n" "Language-Team: \n" @@ -116,6 +116,9 @@ msgstr "Schmales Programm Menü verwenden" msgid "Use narrow channel menu" msgstr "Schmales Kanalmenü verwenden" +msgid "Use narrow timer menu" +msgstr "Schmales Timermenü verwenden" + msgid "Use narrow recording menu" msgstr "Schmales Aufzeichnungsmenü verwenden" @@ -179,6 +182,9 @@ msgstr "Breite des Programm Menüs (Proz. der OSD Breite)" msgid "Width of Channels Menu (Percent of OSD Width)" msgstr "Breite des Kanalmenüs (Proz. der OSD Breite)" +msgid "Width of Timers Menu (Percent of OSD Width)" +msgstr "Breite des Timermenüs (Proz. der OSD Breite)" + msgid "Width of Recordings Menu (Percent of OSD Width)" msgstr "Breite des Aufzeichnugsmenüs (Proz. der OSD Breite)" @@ -269,6 +275,12 @@ msgstr "Schriftgröße anpassen - Aufzeichnungen Menübuttons" msgid "Adjust Font Size - Recordings Menu Item Small" msgstr "Schriftgröße anpassen - Aufzeichnungen Menübuttons klein" +msgid "Adjust Font Size - Timers Menu Item" +msgstr "Schriftgröße anpassen - Timer Menübuttons" + +msgid "Adjust Font Size - Timers Menu Item Small" +msgstr "Schriftgröße anpassen - Timer Menübuttons klein" + msgid "Adjust Font Size - Default Menu Item" msgstr "Schriftgröße anpassen - Default Menübuttons" @@ -102,7 +102,8 @@ void cNopacitySetup::Store(void) { SetupStore("narrowMainMenu", config.narrowMainMenu); SetupStore("narrowScheduleMenu", config.narrowScheduleMenu); SetupStore("narrowChannelMenu", config.narrowChannelMenu); - SetupStore("narrowRecordingMenu", config.narrowRecordingMenu); + SetupStore("narrowChannelMenu", config.narrowChannelMenu); + SetupStore("narrowTimerMenu", config.narrowTimerMenu); SetupStore("narrowSetupMenu", config.narrowSetupMenu); SetupStore("displayRerunsDetailEPGView", config.displayRerunsDetailEPGView); SetupStore("numReruns", config.numReruns); @@ -115,6 +116,7 @@ void cNopacitySetup::Store(void) { SetupStore("menuWidthMain", config.menuWidthMain); SetupStore("menuWidthSchedules", config.menuWidthSchedules); SetupStore("menuWidthChannels", config.menuWidthChannels); + SetupStore("menuWidthTimers", config.menuWidthTimers); SetupStore("menuWidthRecordings", config.menuWidthRecordings); SetupStore("menuWidthRightItems", config.menuWidthRightItems); SetupStore("menuSizeDiskUsage", config.menuSizeDiskUsage); @@ -153,6 +155,8 @@ void cNopacitySetup::Store(void) { SetupStore("fontMenuitemChannelSmall", config.fontMenuitemChannelSmall); SetupStore("fontMenuitemRecordings", config.fontMenuitemRecordings); SetupStore("fontMenuitemRecordingsSmall", config.fontMenuitemRecordingsSmall); + SetupStore("fontMenuitemTimers", config.fontMenuitemTimers); + SetupStore("fontMenuitemTimersSmall", config.fontMenuitemTimersSmall); SetupStore("fontMenuitemDefault", config.fontMenuitemDefault); SetupStore("fontDiskUsage", config.fontDiskUsage); SetupStore("fontDiskUsagePercent", config.fontDiskUsagePercent); @@ -212,6 +216,7 @@ void cNopacitySetupMenuDisplay::Set(void) { Add(new cMenuEditBoolItem(tr("Use narrow main menu"), &tmpNopacityConfig->narrowMainMenu)); Add(new cMenuEditBoolItem(tr("Use narrow schedules menu"), &tmpNopacityConfig->narrowScheduleMenu)); Add(new cMenuEditBoolItem(tr("Use narrow channel menu"), &tmpNopacityConfig->narrowChannelMenu)); + Add(new cMenuEditBoolItem(tr("Use narrow timer menu"), &tmpNopacityConfig->narrowTimerMenu)); Add(new cMenuEditBoolItem(tr("Use narrow recording menu"), &tmpNopacityConfig->narrowRecordingMenu)); Add(new cMenuEditBoolItem(tr("Use narrow setup menu"), &tmpNopacityConfig->narrowSetupMenu)); Add(new cMenuEditBoolItem(tr("Scale Video size to fit into menu window"), &tmpNopacityConfig->scalePicture)); @@ -247,6 +252,7 @@ void cNopacitySetupMenuDisplayGeometry::Set(void) { Add(new cMenuEditIntItem(tr("Width of Main and Setup Menu (Percent of OSD Width)"), &tmpNopacityConfig->menuWidthMain, 10, 100)); Add(new cMenuEditIntItem(tr("Width of Schedules Menu (Percent of OSD Width)"), &tmpNopacityConfig->menuWidthSchedules, 10, 100)); Add(new cMenuEditIntItem(tr("Width of Channels Menu (Percent of OSD Width)"), &tmpNopacityConfig->menuWidthChannels, 10, 100)); + Add(new cMenuEditIntItem(tr("Width of Timers Menu (Percent of OSD Width)"), &tmpNopacityConfig->menuWidthTimers, 10, 100)); Add(new cMenuEditIntItem(tr("Width of Recordings Menu (Percent of OSD Width)"), &tmpNopacityConfig->menuWidthRecordings, 10, 100)); Add(new cMenuEditIntItem(tr("Size of Disc Usage (square, Percent of OSD Width)"), &tmpNopacityConfig->menuSizeDiskUsage, 2, 100)); Add(new cMenuEditIntItem(tr("Width of Timers Display (Percent of OSD Width)"), &tmpNopacityConfig->menuWidthRightItems, 5, 100)); @@ -290,6 +296,8 @@ void cNopacitySetupMenuDisplayFonts::Set(void) { Add(new cMenuEditIntItem(tr("Adjust Font Size - Channels Menu Item Small"), &tmpNopacityConfig->fontMenuitemChannelSmall, -20, 20)); Add(new cMenuEditIntItem(tr("Adjust Font Size - Recordings Menu Item"), &tmpNopacityConfig->fontMenuitemRecordings, -20, 20)); Add(new cMenuEditIntItem(tr("Adjust Font Size - Recordings Menu Item Small"), &tmpNopacityConfig->fontMenuitemRecordingsSmall, -20, 20)); + Add(new cMenuEditIntItem(tr("Adjust Font Size - Timers Menu Item"), &tmpNopacityConfig->fontMenuitemTimers, -20, 20)); + Add(new cMenuEditIntItem(tr("Adjust Font Size - Timers Menu Item Small"), &tmpNopacityConfig->fontMenuitemTimersSmall, -20, 20)); Add(new cMenuEditIntItem(tr("Adjust Font Size - Default Menu Item"), &tmpNopacityConfig->fontMenuitemDefault, -20, 20)); Add(new cMenuEditIntItem(tr("Adjust Font Size - Disc Usage (free)"), &tmpNopacityConfig->fontDiskUsage, -20, 20)); Add(new cMenuEditIntItem(tr("Adjust Font Size - Disc Usage (percent)"), &tmpNopacityConfig->fontDiskUsagePercent, -20, 20)); |