mirror of
https://projects.vdr-developer.org/git/vdr-plugin-tvguide.git
synced 2023-10-05 13:01:48 +00:00
Compare commits
23 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
9044e092f8 | ||
|
b96f800240 | ||
|
5d9ed1439a | ||
|
66a0c15aea | ||
|
8db88c2556 | ||
|
509b64d78f | ||
|
15b7074b4e | ||
|
3fee6ab13f | ||
|
ffd3e2c79f | ||
|
c77f74321f | ||
|
efe06b8e98 | ||
|
6540e21444 | ||
|
2e4a43133e | ||
|
bcf2ce757c | ||
|
263a734a0d | ||
|
7300fdf91c | ||
|
89e9086943 | ||
|
e236d9e571 | ||
|
8794891599 | ||
|
cd62a9bd6b | ||
|
3f0bd75011 | ||
|
a711aed160 | ||
|
cdb5a46145 |
34
HISTORY
34
HISTORY
@@ -222,3 +222,37 @@ Version 1.2.12
|
||||
- Fixed updating current time
|
||||
- Fixed updating current TimeBase
|
||||
- Diplay the current TimeBase throughout the whole timeline
|
||||
|
||||
Version 1.2.13
|
||||
|
||||
- Revert "Diplay the current TimeBase throughout the whole timeline"
|
||||
|
||||
Version 1.2.14
|
||||
|
||||
- Diplay the current TimeBase throughout the whole timeline
|
||||
- Can switch off and optimize diplay time in epggrid "displayMode == Vertical"
|
||||
- Fixed a error while changing a Theme
|
||||
|
||||
Version 1.2.15
|
||||
|
||||
- Workaround for HWAccelerated OSD
|
||||
|
||||
Version 1.2.16
|
||||
|
||||
- Fixed a timer changed message
|
||||
- Extend keys kFastRew, kFastFwd, kPrev, kNext for TimeJump
|
||||
(if you use the numeric keys for "Jump to specific channel",
|
||||
you can now use the keys kFastRew, kFastFwd, kPrev, kNext for TimeJump.
|
||||
Note: if you use the permashift-plugin then the key kFastRew doesnt work for TimeJump)
|
||||
- Fixed a possible deadlook in cEPGView::cEPGView
|
||||
- Refactor Timeline
|
||||
- Refactor CutText in horizontal epgview
|
||||
- Optimize display "REC" sign in epgview
|
||||
- Separate "displayTime" for horizontal and vertical view
|
||||
- RecMenu "Timer Timeline" displays now sorted active timer
|
||||
|
||||
Version 1.2.17
|
||||
|
||||
- Final fix for utf8 CutText
|
||||
- Fixed a remote timer problem
|
||||
- Add episode to manual timer
|
||||
|
@@ -130,9 +130,11 @@ int cChannelEpg::getY() {
|
||||
return geoManager.statusHeaderHeight + geoManager.timeLineHeight + num*geoManager.rowHeight;
|
||||
}
|
||||
|
||||
cGridElement *cChannelEpg::getActive() {
|
||||
cGridElement *cChannelEpg::getActive(bool last) {
|
||||
cTimeManager t;
|
||||
t.Now();
|
||||
if (last)
|
||||
return grids.Last();
|
||||
for (cGridElement *grid = grids.First(); grid; grid = grids.Next(grid)) {
|
||||
if (grid->Match(t.Get()))
|
||||
return grid;
|
||||
|
@@ -42,7 +42,7 @@ public:
|
||||
int Stop() { return timeManager->GetEnd(); };
|
||||
const char* Name() { return channel->Name(); };
|
||||
const cChannel *getChannel() {return channel;}
|
||||
cGridElement *getActive();
|
||||
cGridElement *getActive(bool last = false);
|
||||
cGridElement *getNext(cGridElement *activeGrid);
|
||||
cGridElement *getPrev(cGridElement *activeGrid);
|
||||
cGridElement *getNeighbor(cGridElement *activeGrid);
|
||||
|
17
config.c
17
config.c
@@ -2,6 +2,7 @@
|
||||
#include "config.h"
|
||||
|
||||
cTVGuideConfig::cTVGuideConfig() {
|
||||
useHWAccel = false;
|
||||
debugImageLoading = 0;
|
||||
showMainMenuEntry = 1;
|
||||
replaceOriginalSchedule = 0;
|
||||
@@ -9,8 +10,8 @@ cTVGuideConfig::cTVGuideConfig() {
|
||||
showTimeInGrid = 1;
|
||||
channelCols = 5;
|
||||
channelRows = 10;
|
||||
displayTime = 160;
|
||||
displayHorizontalTime = 160;
|
||||
displayTime = 180;
|
||||
displayHorizontalTime = 180;
|
||||
displayStatusHeader = 1;
|
||||
displayChannelGroups = 1;
|
||||
displayTimeBase = 1;
|
||||
@@ -27,10 +28,13 @@ cTVGuideConfig::cTVGuideConfig() {
|
||||
footerHeightPercent = 7;
|
||||
stepMinutes = 30;
|
||||
bigStepHours = 3;
|
||||
bigStepHoursHorizontal = 3;
|
||||
hugeStepHours = 24;
|
||||
hugeStepHoursHorizontal = 24;
|
||||
channelJumpMode = eNumJump;
|
||||
jumpChannels = 0;
|
||||
blueKeyMode = 2;
|
||||
addSubtitleToTimer = 1;
|
||||
closeOnSwitch = 1;
|
||||
numkeyMode = 0;
|
||||
useRemoteTimers = 0;
|
||||
@@ -95,6 +99,7 @@ cTVGuideConfig::cTVGuideConfig() {
|
||||
FontRecMenuItemLargeDelta = 0;
|
||||
timeFormat = 1;
|
||||
useNopacityTheme = 1;
|
||||
useNopacityThemeCurrent = -1;
|
||||
themeIndex = -1;
|
||||
themeIndexCurrent = -1;
|
||||
themeName = "";
|
||||
@@ -124,13 +129,14 @@ bool cTVGuideConfig::LoadTheme() {
|
||||
//is correct theme already loaded?
|
||||
if (nOpacityTheme.size() == 0)
|
||||
nOpacityTheme = Setup.OSDTheme;
|
||||
if ((themeIndex > -1) && (themeIndex == themeIndexCurrent)) {
|
||||
if ((themeIndex > -1) && (themeIndex == themeIndexCurrent) && (useNopacityTheme == useNopacityThemeCurrent)) {
|
||||
if (!nOpacityTheme.compare(Setup.OSDTheme)) {
|
||||
return false;
|
||||
} else {
|
||||
nOpacityTheme = Setup.OSDTheme;
|
||||
}
|
||||
}
|
||||
esyslog("tvguide: loading new Theme");
|
||||
//Load available Themes
|
||||
cThemes themes;
|
||||
themes.Load(*cString("tvguide"));
|
||||
@@ -167,6 +173,7 @@ bool cTVGuideConfig::LoadTheme() {
|
||||
themeIndex = 0;
|
||||
|
||||
themeIndexCurrent = themeIndex;
|
||||
useNopacityThemeCurrent = useNopacityTheme;
|
||||
|
||||
const char *themePath = themes.FileName(themeIndex);
|
||||
if (access(themePath, F_OK) == 0) {
|
||||
@@ -240,6 +247,7 @@ cString cTVGuideConfig::checkSlashAtEnd(std::string path) {
|
||||
bool cTVGuideConfig::SetupParse(const char *Name, const char *Value) {
|
||||
if (strcmp(Name, "timeFormat") == 0) timeFormat = atoi(Value);
|
||||
else if (strcmp(Name, "debugImageLoading") == 0) debugImageLoading = atoi(Value);
|
||||
else if (strcmp(Name, "useHWAccel") == 0) useHWAccel = atoi(Value);
|
||||
else if (strcmp(Name, "showMainMenuEntry") == 0) showMainMenuEntry = atoi(Value);
|
||||
else if (strcmp(Name, "replaceOriginalSchedule") == 0) replaceOriginalSchedule = atoi(Value);
|
||||
else if (strcmp(Name, "useNopacityTheme") == 0) useNopacityTheme = atoi(Value);
|
||||
@@ -264,7 +272,9 @@ bool cTVGuideConfig::SetupParse(const char *Name, const char *Value) {
|
||||
else if (strcmp(Name, "logoWidthRatio") == 0) logoWidthRatio = atoi(Value);
|
||||
else if (strcmp(Name, "logoHeightRatio") == 0) logoHeightRatio = atoi(Value);
|
||||
else if (strcmp(Name, "bigStepHours") == 0) bigStepHours = atoi(Value);
|
||||
else if (strcmp(Name, "bigStepHoursHorizontal") == 0) bigStepHoursHorizontal = atoi(Value);
|
||||
else if (strcmp(Name, "hugeStepHours") == 0) hugeStepHours = atoi(Value);
|
||||
else if (strcmp(Name, "hugeStepHoursHorizontal") == 0) hugeStepHoursHorizontal = atoi(Value);
|
||||
else if (strcmp(Name, "channelJumpMode") == 0) channelJumpMode = atoi(Value);
|
||||
else if (strcmp(Name, "blueKeyMode") == 0) blueKeyMode = atoi(Value);
|
||||
else if (strcmp(Name, "numkeyMode") == 0) numkeyMode = atoi(Value);
|
||||
@@ -286,6 +296,7 @@ bool cTVGuideConfig::SetupParse(const char *Name, const char *Value) {
|
||||
else if (strcmp(Name, "footerHeightPercent") == 0) footerHeightPercent = atoi(Value);
|
||||
else if (strcmp(Name, "instRecFolderMode") == 0) instRecFolderMode = atoi(Value);
|
||||
else if (strcmp(Name, "instRecFixedFolder") == 0) instRecFixedFolder = Value;
|
||||
else if (strcmp(Name, "addSubtitleToTimer") == 0) addSubtitleToTimer = atoi(Value);
|
||||
else if (strcmp(Name, "favWhatsOnNow") == 0) favWhatsOnNow = atoi(Value);
|
||||
else if (strcmp(Name, "favWhatsOnNext") == 0) favWhatsOnNext = atoi(Value);
|
||||
else if (strcmp(Name, "favUseTime1") == 0) favUseTime1 = atoi(Value);
|
||||
|
13
config.h
13
config.h
@@ -8,7 +8,7 @@
|
||||
#include "fontmanager.h"
|
||||
#include "imagecache.h"
|
||||
|
||||
enum {
|
||||
enum eTimeFormat {
|
||||
e12Hours,
|
||||
e24Hours
|
||||
};
|
||||
@@ -43,12 +43,19 @@ enum eInstRecFolderMode {
|
||||
eFolderFixed
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
addSubtitleNever = 0,
|
||||
addSubtitleSmart,
|
||||
addSubtitleAlways
|
||||
} addSubtitleToTimerMode;
|
||||
|
||||
class cTVGuideConfig {
|
||||
private:
|
||||
cString checkSlashAtEnd(std::string path);
|
||||
public:
|
||||
cTVGuideConfig();
|
||||
~cTVGuideConfig();
|
||||
int useHWAccel;
|
||||
int debugImageLoading;
|
||||
int showMainMenuEntry;
|
||||
int replaceOriginalSchedule;
|
||||
@@ -75,10 +82,13 @@ class cTVGuideConfig {
|
||||
int footerHeightPercent;
|
||||
int stepMinutes;
|
||||
int bigStepHours;
|
||||
int bigStepHoursHorizontal;
|
||||
int hugeStepHours;
|
||||
int hugeStepHoursHorizontal;
|
||||
int channelJumpMode;
|
||||
int jumpChannels;
|
||||
int blueKeyMode;
|
||||
int addSubtitleToTimer;
|
||||
int closeOnSwitch;
|
||||
int numkeyMode;
|
||||
int useRemoteTimers;
|
||||
@@ -149,6 +159,7 @@ class cTVGuideConfig {
|
||||
int FontRecMenuItemLargeDelta;
|
||||
int timeFormat;
|
||||
int useNopacityTheme;
|
||||
int useNopacityThemeCurrent;
|
||||
int themeIndex;
|
||||
int themeIndexCurrent;
|
||||
cString themeName;
|
||||
|
67
epggrid.c
67
epggrid.c
@@ -92,53 +92,52 @@ void cEpgGrid::SetSwitchTimer() {
|
||||
|
||||
void cEpgGrid::setText() {
|
||||
if (config.displayMode == eVertical) {
|
||||
cString strText;
|
||||
strText = cString::sprintf("%s - %s:\n%s", *(event->GetTimeString()), *(event->GetEndTimeString()), event->Title());
|
||||
text->Set(*(strText), fontManager.FontGrid, geoManager.colWidth-2*borderWidth);
|
||||
extText->Set(event->ShortText(), fontManager.FontGridSmall, geoManager.colWidth-2*borderWidth);
|
||||
} else if (config.displayMode == eHorizontal) {
|
||||
timeString = cString::sprintf("%s - %s", *(event->GetTimeString()), *(event->GetEndTimeString()));
|
||||
text->Set(event->Title(), fontManager.FontGrid, geoManager.colWidth - 2 * borderWidth);
|
||||
extText->Set(event->ShortText(), fontManager.FontGridSmall, geoManager.colWidth - 2 * borderWidth);
|
||||
}
|
||||
if (config.showTimeInGrid) {
|
||||
timeString = cString::sprintf("%s - %s:", *(event->GetTimeString()), *(event->GetEndTimeString()));
|
||||
}
|
||||
}
|
||||
|
||||
void cEpgGrid::drawText() {
|
||||
tColor colorText = (active)?theme.Color(clrFontActive):theme.Color(clrFont);
|
||||
tColor colorText = (active) ? theme.Color(clrFontActive) : theme.Color(clrFont);
|
||||
tColor colorTextBack;
|
||||
if (config.style == eStyleFlat)
|
||||
colorTextBack = color;
|
||||
else if (config.style == eStyleGraphical)
|
||||
colorTextBack = (active)?theme.Color(clrGridActiveFontBack):theme.Color(clrGridFontBack);
|
||||
colorTextBack = (active) ? theme.Color(clrGridActiveFontBack) : theme.Color(clrGridFontBack);
|
||||
else
|
||||
colorTextBack = clrTransparent;
|
||||
if (config.displayMode == eVertical) {
|
||||
if (Height()/geoManager.minutePixel < 6)
|
||||
if (Height() / geoManager.minutePixel < 6)
|
||||
return;
|
||||
int textHeight = fontManager.FontGrid->Height();
|
||||
int textHeightSmall = fontManager.FontGridSmall->Height();
|
||||
int textLines = text->Lines();
|
||||
for (int i=0; i<textLines; i++) {
|
||||
pixmap->DrawText(cPoint(borderWidth, borderWidth + i*textHeight), text->GetLine(i), colorText, colorTextBack, fontManager.FontGrid);
|
||||
int titleY = borderWidth;
|
||||
if (config.showTimeInGrid) { // mit Zeitangabe im Grid
|
||||
pixmap->DrawText(cPoint(borderWidth, borderWidth), *timeString, colorText, colorTextBack, fontManager.FontGridSmall);
|
||||
titleY += textHeightSmall;
|
||||
}
|
||||
for (int i = 0; i < textLines; i++) {
|
||||
pixmap->DrawText(cPoint(borderWidth, titleY + i * textHeight), text->GetLine(i), colorText, colorTextBack, fontManager.FontGrid);
|
||||
}
|
||||
int extTextLines = extText->Lines();
|
||||
int offset = (textLines+1)*textHeight - 0.5*textHeight;
|
||||
textHeight = fontManager.FontGridSmall->Height();
|
||||
if ((Height()-textHeight-10) > offset) {
|
||||
for (int i=0; i<extTextLines; i++) {
|
||||
pixmap->DrawText(cPoint(borderWidth, borderWidth + offset + i*textHeight), extText->GetLine(i), colorText, colorTextBack, fontManager.FontGridSmall);
|
||||
int offset = titleY + (textLines + 0.5) * textHeight;
|
||||
if ((Height() - textHeightSmall - 10) > offset) {
|
||||
for (int i = 0; i < extTextLines; i++) {
|
||||
pixmap->DrawText(cPoint(borderWidth, offset + i * textHeightSmall), extText->GetLine(i), colorText, colorTextBack, fontManager.FontGridSmall);
|
||||
}
|
||||
}
|
||||
} else if (config.displayMode == eHorizontal) {
|
||||
if (Width()/geoManager.minutePixel < 10) {
|
||||
int titleY = (geoManager.rowHeight - fontManager.FontGridHorizontal->Height())/2;
|
||||
pixmap->DrawText(cPoint(borderWidth - 2, titleY), "...", colorText, colorTextBack, fontManager.FontGridHorizontal);
|
||||
return;
|
||||
}
|
||||
cString strTitle = CutText(event->Title(), viewportHeight, fontManager.FontGridHorizontal).c_str();
|
||||
cString strTitle = CutText(event->Title(), viewportHeight - borderWidth, fontManager.FontGridHorizontal).c_str();
|
||||
int titleY = 0;
|
||||
if (config.showTimeInGrid) {
|
||||
if (config.showTimeInGrid) { // mit Zeitangabe im Grid
|
||||
pixmap->DrawText(cPoint(borderWidth, borderWidth), *timeString, colorText, colorTextBack, fontManager.FontGridHorizontalSmall);
|
||||
titleY = fontManager.FontGridHorizontalSmall->Height() + (geoManager.rowHeight - fontManager.FontGridHorizontalSmall->Height() - fontManager.FontGridHorizontal->Height())/2;
|
||||
titleY = fontManager.FontGridHorizontalSmall->Height() + (geoManager.rowHeight - fontManager.FontGridHorizontalSmall->Height() - fontManager.FontGridHorizontal->Height()) / 2;
|
||||
} else {
|
||||
titleY = (geoManager.rowHeight - fontManager.FontGridHorizontal->Height())/2;
|
||||
titleY = (geoManager.rowHeight - fontManager.FontGridHorizontal->Height()) / 2;
|
||||
}
|
||||
pixmap->DrawText(cPoint(borderWidth, titleY), *strTitle, colorText, colorTextBack, fontManager.FontGridHorizontal);
|
||||
}
|
||||
@@ -170,13 +169,17 @@ void cEpgGrid::drawText() {
|
||||
|
||||
void cEpgGrid::drawIcon(cString iconText, tColor color) {
|
||||
|
||||
const cFont *font = (config.displayMode == eVertical)
|
||||
?fontManager.FontGrid
|
||||
:fontManager.FontGridHorizontalSmall;
|
||||
int textWidth = font->Width(*iconText)+2*borderWidth;
|
||||
int textHeight = font->Height()+10;
|
||||
pixmap->DrawRectangle( cRect(Width() - textWidth - borderWidth, Height() - textHeight - borderWidth, textWidth, textHeight), color);
|
||||
pixmap->DrawText(cPoint(Width() - textWidth, Height() - textHeight - borderWidth/2), *iconText, theme.Color(clrFont), color, font);
|
||||
const cFont *font = (config.displayMode == eVertical) ? fontManager.FontGrid : fontManager.FontGridHorizontalSmall;
|
||||
int textWidth = font->Width(*iconText) + 2 * borderWidth;
|
||||
int textHeight = font->Height() + 10;
|
||||
if ((config.displayMode == eHorizontal) && ((Width() - 2 * textWidth) < 0))
|
||||
pixmap->DrawEllipse( cRect(Width() - textHeight / 2 - borderWidth, Height() - textHeight - borderWidth, textHeight / 2, textHeight / 2), color);
|
||||
else if ((config.displayMode == eVertical) && ((Height() - 2 * textHeight) < 0))
|
||||
pixmap->DrawEllipse( cRect(Width() - textHeight / 2 - borderWidth, borderWidth, textHeight / 2, textHeight / 2), color);
|
||||
else {
|
||||
pixmap->DrawEllipse( cRect(Width() - textWidth - borderWidth, Height() - textHeight - borderWidth, textWidth, textHeight), color);
|
||||
pixmap->DrawText(cPoint(Width() - textWidth, Height() - textHeight - borderWidth / 2), *iconText, theme.Color(clrFont), clrTransparent, font);
|
||||
}
|
||||
}
|
||||
|
||||
cString cEpgGrid::getTimeString(void) {
|
||||
|
@@ -35,7 +35,7 @@ bool cGeometryManager::SetGeometry(int osdWidth, int osdHeight, bool force) {
|
||||
if (config.displayMode == eVertical) {
|
||||
colWidth = (osdWidth - timeLineWidth) / config.channelCols;
|
||||
rowHeight = 0;
|
||||
minutePixel = (osdHeight - statusHeaderHeight - channelGroupsHeight - channelHeaderHeight - footerHeight) / config.displayTime;
|
||||
minutePixel = (double)(osdHeight - statusHeaderHeight - channelGroupsHeight - channelHeaderHeight - footerHeight) / (double)config.displayTime;
|
||||
channelLogoWidth = colWidth;
|
||||
channelLogoHeight = channelHeaderHeight;
|
||||
logoWidth = channelLogoWidth / 2 - 15;
|
||||
@@ -49,7 +49,7 @@ bool cGeometryManager::SetGeometry(int osdWidth, int osdHeight, bool force) {
|
||||
} else if (config.displayMode == eHorizontal) {
|
||||
colWidth = 0;
|
||||
rowHeight = (osdHeight - statusHeaderHeight - timeLineHeight - footerHeight) / config.channelRows;
|
||||
minutePixel = (osdWidth - channelHeaderWidth - channelGroupsWidth) / config.displayHorizontalTime;
|
||||
minutePixel = (double)(osdWidth - channelHeaderWidth - channelGroupsWidth) / (double)config.displayHorizontalTime;
|
||||
channelLogoWidth = channelHeaderWidth;
|
||||
channelLogoHeight = rowHeight;
|
||||
logoWidth = channelLogoHeight * config.logoWidthRatio / config.logoHeightRatio;
|
||||
|
@@ -24,7 +24,7 @@ public:
|
||||
//Content
|
||||
int colWidth;
|
||||
int rowHeight;
|
||||
int minutePixel;
|
||||
double minutePixel;
|
||||
int channelLogoWidth;
|
||||
int channelLogoHeight;
|
||||
//Timeline
|
||||
|
35
po/ca_ES.po
35
po/ca_ES.po
@@ -3,7 +3,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: vdr-tvguide 0.0.1\n"
|
||||
"Report-Msgid-Bugs-To: <see README>\n"
|
||||
"POT-Creation-Date: 2019-04-22 14:34+0200\n"
|
||||
"POT-Creation-Date: 2020-02-17 14:30+0100\n"
|
||||
"PO-Revision-Date: 2013-09-21 17:49+0200\n"
|
||||
"Last-Translator: My friend <Sampep> Thanks David <Gabychan> <gbonich@gmail.com>\n"
|
||||
"Language-Team: \n"
|
||||
@@ -57,6 +57,9 @@ msgstr ""
|
||||
msgid "images"
|
||||
msgstr ""
|
||||
|
||||
msgid "tvguide: RemoteTimerModifications failed"
|
||||
msgstr ""
|
||||
|
||||
msgid "root video folder"
|
||||
msgstr "Directori principal per a vídeo"
|
||||
|
||||
@@ -99,12 +102,6 @@ msgstr ""
|
||||
msgid "recordings done"
|
||||
msgstr ""
|
||||
|
||||
msgid "What's on now"
|
||||
msgstr ""
|
||||
|
||||
msgid "What's on next"
|
||||
msgstr ""
|
||||
|
||||
msgid "Instant Record"
|
||||
msgstr "Enregistra a l'instant"
|
||||
|
||||
@@ -144,6 +141,9 @@ msgstr "Cerca a les gravacions"
|
||||
msgid "Set Folder for"
|
||||
msgstr "Programa carpeta per"
|
||||
|
||||
msgid "Timer changed"
|
||||
msgstr ""
|
||||
|
||||
msgid "Timer created"
|
||||
msgstr "Temporitzador creat"
|
||||
|
||||
@@ -567,6 +567,12 @@ msgstr "No s'han trobat gravacions per"
|
||||
msgid "No Favorites available"
|
||||
msgstr ""
|
||||
|
||||
msgid "What's on now"
|
||||
msgstr ""
|
||||
|
||||
msgid "What's on next"
|
||||
msgstr ""
|
||||
|
||||
msgid "whole term must appear"
|
||||
msgstr "expressió completa"
|
||||
|
||||
@@ -675,6 +681,9 @@ msgstr "si existeix"
|
||||
msgid "always"
|
||||
msgstr "sempre"
|
||||
|
||||
msgid "Use workaround for HWAccelerated OSD"
|
||||
msgstr ""
|
||||
|
||||
msgid "Show Main Menu Entry"
|
||||
msgstr "Mostra entrada del menú principal"
|
||||
|
||||
@@ -882,15 +891,27 @@ msgstr ""
|
||||
msgid "Use fixed folder"
|
||||
msgstr ""
|
||||
|
||||
msgid "smart"
|
||||
msgstr ""
|
||||
|
||||
msgid "Instant recording:"
|
||||
msgstr ""
|
||||
|
||||
msgid "Folder for instant Recordings"
|
||||
msgstr ""
|
||||
|
||||
msgid "Folder"
|
||||
msgstr ""
|
||||
|
||||
msgid "Add episode to manual timers"
|
||||
msgstr ""
|
||||
|
||||
msgid "Use Remotetimers"
|
||||
msgstr "Utilitza temporitzadors remots"
|
||||
|
||||
msgid "Favorites:"
|
||||
msgstr ""
|
||||
|
||||
msgid "Limit channels in favorites"
|
||||
msgstr ""
|
||||
|
||||
|
35
po/de_DE.po
35
po/de_DE.po
@@ -3,7 +3,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: vdr-tvguide 0.0.1\n"
|
||||
"Report-Msgid-Bugs-To: <see README>\n"
|
||||
"POT-Creation-Date: 2019-04-22 14:34+0200\n"
|
||||
"POT-Creation-Date: 2020-02-17 14:30+0100\n"
|
||||
"PO-Revision-Date: 2012-08-25 17:49+0200\n"
|
||||
"Last-Translator: Horst\n"
|
||||
"Language-Team: \n"
|
||||
@@ -54,6 +54,9 @@ msgstr "Favoriten"
|
||||
msgid "images"
|
||||
msgstr "Bilder"
|
||||
|
||||
msgid "tvguide: RemoteTimerModifications failed"
|
||||
msgstr ""
|
||||
|
||||
msgid "root video folder"
|
||||
msgstr "Video Hauptverzeichnis"
|
||||
|
||||
@@ -96,12 +99,6 @@ msgstr "aktive Timer"
|
||||
msgid "recordings done"
|
||||
msgstr "erledigte Aufnahmen"
|
||||
|
||||
msgid "What's on now"
|
||||
msgstr "Was läuft jetzt?"
|
||||
|
||||
msgid "What's on next"
|
||||
msgstr "Was läuft als nächstes?"
|
||||
|
||||
msgid "Instant Record"
|
||||
msgstr "Aufnahme"
|
||||
|
||||
@@ -141,6 +138,9 @@ msgstr "In Aufnahmen suchen"
|
||||
msgid "Set Folder for"
|
||||
msgstr "Verzeichnis festlegen für"
|
||||
|
||||
msgid "Timer changed"
|
||||
msgstr "Timer geändert"
|
||||
|
||||
msgid "Timer created"
|
||||
msgstr "Timer angelegt"
|
||||
|
||||
@@ -564,6 +564,12 @@ msgstr "Keine Aufnahmen gefunden für"
|
||||
msgid "No Favorites available"
|
||||
msgstr "Keine Favoriten verfügbar"
|
||||
|
||||
msgid "What's on now"
|
||||
msgstr "Was läuft jetzt?"
|
||||
|
||||
msgid "What's on next"
|
||||
msgstr "Was läuft als nächstes?"
|
||||
|
||||
msgid "whole term must appear"
|
||||
msgstr "vollständiger Ausdruck"
|
||||
|
||||
@@ -672,6 +678,9 @@ msgstr "falls vorhanden"
|
||||
msgid "always"
|
||||
msgstr "immer"
|
||||
|
||||
msgid "Use workaround for HWAccelerated OSD"
|
||||
msgstr ""
|
||||
|
||||
msgid "Show Main Menu Entry"
|
||||
msgstr "Hauptmenüeintrag anzeigen"
|
||||
|
||||
@@ -879,15 +888,27 @@ msgstr "Verzeichnis aus Liste auswählen"
|
||||
msgid "Use fixed folder"
|
||||
msgstr "Festes Verzeichnis benutzen"
|
||||
|
||||
msgid "smart"
|
||||
msgstr "intelligent"
|
||||
|
||||
msgid "Instant recording:"
|
||||
msgstr "Sofortaufnahmen:"
|
||||
|
||||
msgid "Folder for instant Recordings"
|
||||
msgstr "Verzeichnis für Sofortaufnahmen"
|
||||
|
||||
msgid "Folder"
|
||||
msgstr "Verzeichnis"
|
||||
|
||||
msgid "Add episode to manual timers"
|
||||
msgstr "Untertitel in manuellen Timern"
|
||||
|
||||
msgid "Use Remotetimers"
|
||||
msgstr "RemoteTimers benutzen"
|
||||
|
||||
msgid "Favorites:"
|
||||
msgstr "Favoriten:"
|
||||
|
||||
msgid "Limit channels in favorites"
|
||||
msgstr "Kanäle in Favoriten beschränken"
|
||||
|
||||
|
35
po/it_IT.po
35
po/it_IT.po
@@ -3,7 +3,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: vdr-tvguide 0.0.1\n"
|
||||
"Report-Msgid-Bugs-To: <see README>\n"
|
||||
"POT-Creation-Date: 2019-04-22 14:34+0200\n"
|
||||
"POT-Creation-Date: 2020-02-17 14:30+0100\n"
|
||||
"PO-Revision-Date: 2012-08-25 17:49+0200\n"
|
||||
"Last-Translator: fiveten_59\n"
|
||||
"Language-Team: \n"
|
||||
@@ -54,6 +54,9 @@ msgstr "Favoriti"
|
||||
msgid "images"
|
||||
msgstr "Immagini"
|
||||
|
||||
msgid "tvguide: RemoteTimerModifications failed"
|
||||
msgstr ""
|
||||
|
||||
msgid "root video folder"
|
||||
msgstr "cartella video di root"
|
||||
|
||||
@@ -96,12 +99,6 @@ msgstr "Timers attivi"
|
||||
msgid "recordings done"
|
||||
msgstr "registrazione eseguita"
|
||||
|
||||
msgid "What's on now"
|
||||
msgstr "Was läuft jetzt?"
|
||||
|
||||
msgid "What's on next"
|
||||
msgstr "Was läuft als nächstes?"
|
||||
|
||||
msgid "Instant Record"
|
||||
msgstr "Registrazione immediata"
|
||||
|
||||
@@ -141,6 +138,9 @@ msgstr "Cerca nelle registrazioni"
|
||||
msgid "Set Folder for"
|
||||
msgstr "Crea cartella per"
|
||||
|
||||
msgid "Timer changed"
|
||||
msgstr ""
|
||||
|
||||
msgid "Timer created"
|
||||
msgstr "Timer creato"
|
||||
|
||||
@@ -564,6 +564,12 @@ msgstr "Nessuna registrazione trovata per"
|
||||
msgid "No Favorites available"
|
||||
msgstr "Nessun Favoriti disponibile"
|
||||
|
||||
msgid "What's on now"
|
||||
msgstr "Was läuft jetzt?"
|
||||
|
||||
msgid "What's on next"
|
||||
msgstr "Was läuft als nächstes?"
|
||||
|
||||
msgid "whole term must appear"
|
||||
msgstr "vollständiger Ausdruck"
|
||||
|
||||
@@ -672,6 +678,9 @@ msgstr "se esiste"
|
||||
msgid "always"
|
||||
msgstr "sempre"
|
||||
|
||||
msgid "Use workaround for HWAccelerated OSD"
|
||||
msgstr ""
|
||||
|
||||
msgid "Show Main Menu Entry"
|
||||
msgstr "Hauptmenüeintrag anzeigen"
|
||||
|
||||
@@ -879,15 +888,27 @@ msgstr "Scegli dall'elenco cartelle"
|
||||
msgid "Use fixed folder"
|
||||
msgstr "Usa cartella fissa"
|
||||
|
||||
msgid "smart"
|
||||
msgstr "intelligente"
|
||||
|
||||
msgid "Instant recording:"
|
||||
msgstr ""
|
||||
|
||||
msgid "Folder for instant Recordings"
|
||||
msgstr "Cartella per la registrazione immediata"
|
||||
|
||||
msgid "Folder"
|
||||
msgstr "Cartella"
|
||||
|
||||
msgid "Add episode to manual timers"
|
||||
msgstr "Aggiungi episodi ai timer manuali"
|
||||
|
||||
msgid "Use Remotetimers"
|
||||
msgstr "Usa Remotetimers"
|
||||
|
||||
msgid "Favorites:"
|
||||
msgstr ""
|
||||
|
||||
msgid "Limit channels in favorites"
|
||||
msgstr "Limite dei canali nei favoriti"
|
||||
|
||||
|
35
po/ru_RU.po
35
po/ru_RU.po
@@ -3,7 +3,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: vdr-tvguide 1.0.0\n"
|
||||
"Report-Msgid-Bugs-To: <see README>\n"
|
||||
"POT-Creation-Date: 2019-04-22 14:34+0200\n"
|
||||
"POT-Creation-Date: 2020-02-17 14:30+0100\n"
|
||||
"PO-Revision-Date: 2013-09-25 17:49+0400\n"
|
||||
"Last-Translator: AmiD, ilya\n"
|
||||
"Language-Team: Russia-Cherepovets(wm.amid@gmail.com)\n"
|
||||
@@ -54,6 +54,9 @@ msgstr ""
|
||||
msgid "images"
|
||||
msgstr ""
|
||||
|
||||
msgid "tvguide: RemoteTimerModifications failed"
|
||||
msgstr ""
|
||||
|
||||
msgid "root video folder"
|
||||
msgstr "Главная видео директория"
|
||||
|
||||
@@ -96,12 +99,6 @@ msgstr ""
|
||||
msgid "recordings done"
|
||||
msgstr ""
|
||||
|
||||
msgid "What's on now"
|
||||
msgstr ""
|
||||
|
||||
msgid "What's on next"
|
||||
msgstr ""
|
||||
|
||||
msgid "Instant Record"
|
||||
msgstr "Записать"
|
||||
|
||||
@@ -141,6 +138,9 @@ msgstr "Искать в записях"
|
||||
msgid "Set Folder for"
|
||||
msgstr "Укажите каталог для"
|
||||
|
||||
msgid "Timer changed"
|
||||
msgstr ""
|
||||
|
||||
msgid "Timer created"
|
||||
msgstr "Таймер создан"
|
||||
|
||||
@@ -564,6 +564,12 @@ msgstr "Не найдено записей:"
|
||||
msgid "No Favorites available"
|
||||
msgstr ""
|
||||
|
||||
msgid "What's on now"
|
||||
msgstr ""
|
||||
|
||||
msgid "What's on next"
|
||||
msgstr ""
|
||||
|
||||
msgid "whole term must appear"
|
||||
msgstr "фраза"
|
||||
|
||||
@@ -672,6 +678,9 @@ msgstr "если существует"
|
||||
msgid "always"
|
||||
msgstr "всегда"
|
||||
|
||||
msgid "Use workaround for HWAccelerated OSD"
|
||||
msgstr ""
|
||||
|
||||
msgid "Show Main Menu Entry"
|
||||
msgstr "Показывать пункт в главном меню"
|
||||
|
||||
@@ -879,15 +888,27 @@ msgstr ""
|
||||
msgid "Use fixed folder"
|
||||
msgstr ""
|
||||
|
||||
msgid "smart"
|
||||
msgstr ""
|
||||
|
||||
msgid "Instant recording:"
|
||||
msgstr ""
|
||||
|
||||
msgid "Folder for instant Recordings"
|
||||
msgstr ""
|
||||
|
||||
msgid "Folder"
|
||||
msgstr ""
|
||||
|
||||
msgid "Add episode to manual timers"
|
||||
msgstr ""
|
||||
|
||||
msgid "Use Remotetimers"
|
||||
msgstr "RemoteTimers benutzen"
|
||||
|
||||
msgid "Favorites:"
|
||||
msgstr ""
|
||||
|
||||
msgid "Limit channels in favorites"
|
||||
msgstr ""
|
||||
|
||||
|
35
po/sk_SK.po
35
po/sk_SK.po
@@ -3,7 +3,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: vdr-tvguide 1.1.0\n"
|
||||
"Report-Msgid-Bugs-To: <see README>\n"
|
||||
"POT-Creation-Date: 2019-04-22 14:34+0200\n"
|
||||
"POT-Creation-Date: 2020-02-17 14:30+0100\n"
|
||||
"PO-Revision-Date: 2013-09-15 00:12+0100\n"
|
||||
"Last-Translator: Milan Hrala <hrala.milan@gmail.com>\n"
|
||||
"Language-Team: \n"
|
||||
@@ -54,6 +54,9 @@ msgstr ""
|
||||
msgid "images"
|
||||
msgstr ""
|
||||
|
||||
msgid "tvguide: RemoteTimerModifications failed"
|
||||
msgstr ""
|
||||
|
||||
msgid "root video folder"
|
||||
msgstr "Hlavn<76> video adres<65>r"
|
||||
|
||||
@@ -96,12 +99,6 @@ msgstr ""
|
||||
msgid "recordings done"
|
||||
msgstr ""
|
||||
|
||||
msgid "What's on now"
|
||||
msgstr ""
|
||||
|
||||
msgid "What's on next"
|
||||
msgstr ""
|
||||
|
||||
msgid "Instant Record"
|
||||
msgstr "Okam<61>ite nahra<72>"
|
||||
|
||||
@@ -141,6 +138,9 @@ msgstr "Vyh
|
||||
msgid "Set Folder for"
|
||||
msgstr "Nastavi<76> adres<65>r pre"
|
||||
|
||||
msgid "Timer changed"
|
||||
msgstr ""
|
||||
|
||||
msgid "Timer created"
|
||||
msgstr "Pl<50>n vytvoren<65>"
|
||||
|
||||
@@ -564,6 +564,12 @@ msgstr "Nena
|
||||
msgid "No Favorites available"
|
||||
msgstr ""
|
||||
|
||||
msgid "What's on now"
|
||||
msgstr ""
|
||||
|
||||
msgid "What's on next"
|
||||
msgstr ""
|
||||
|
||||
msgid "whole term must appear"
|
||||
msgstr "kompletn<74> v<>raz"
|
||||
|
||||
@@ -672,6 +678,9 @@ msgstr "ak s
|
||||
msgid "always"
|
||||
msgstr "v<>dy"
|
||||
|
||||
msgid "Use workaround for HWAccelerated OSD"
|
||||
msgstr ""
|
||||
|
||||
msgid "Show Main Menu Entry"
|
||||
msgstr "Zobrazi<7A> v hlavnom menu"
|
||||
|
||||
@@ -879,15 +888,27 @@ msgstr ""
|
||||
msgid "Use fixed folder"
|
||||
msgstr ""
|
||||
|
||||
msgid "smart"
|
||||
msgstr "chytr<74>"
|
||||
|
||||
msgid "Instant recording:"
|
||||
msgstr ""
|
||||
|
||||
msgid "Folder for instant Recordings"
|
||||
msgstr ""
|
||||
|
||||
msgid "Folder"
|
||||
msgstr ""
|
||||
|
||||
msgid "Add episode to manual timers"
|
||||
msgstr "Prida<64> epiz<69>dy do ru<72>n<EFBFBD>ho <20>asova<76>a"
|
||||
|
||||
msgid "Use Remotetimers"
|
||||
msgstr "Pou<6F>i<EFBFBD> vzdialen<65> pl<70>nova<76>"
|
||||
|
||||
msgid "Favorites:"
|
||||
msgstr ""
|
||||
|
||||
msgid "Limit channels in favorites"
|
||||
msgstr ""
|
||||
|
||||
|
99
recmanager.c
99
recmanager.c
@@ -96,10 +96,11 @@ cTimer *cRecManager::createTimer(const cEvent *event, std::string path) {
|
||||
cTimer *cRecManager::createLocalTimer(const cEvent *event, std::string path) {
|
||||
cTimer *timer = new cTimer(event);
|
||||
#if VDRVERSNUM >= 20301
|
||||
if (Setup.SVDRPPeering && *Setup.SVDRPDefaultHost)
|
||||
((cTimer*)timer)->SetRemote(Setup.SVDRPDefaultHost);
|
||||
LOCK_TIMERS_WRITE;
|
||||
cTimers* timers = Timers;
|
||||
timers->SetExplicitModify();
|
||||
if (Setup.SVDRPPeering && *Setup.SVDRPDefaultHost)
|
||||
timer->SetRemote(Setup.SVDRPDefaultHost);
|
||||
#else
|
||||
cTimers* timers = &Timers;
|
||||
#endif
|
||||
@@ -115,11 +116,20 @@ cTimer *cRecManager::createLocalTimer(const cEvent *event, std::string path) {
|
||||
timer = t;
|
||||
isyslog("timer %s reactivated", *t->ToDescr());
|
||||
} else {
|
||||
SetTimerPath(timer, event, path);
|
||||
timers->Add(timer);
|
||||
timers->SetModified();
|
||||
#if VDRVERSNUM >= 20301
|
||||
if (!HandleRemoteTimerModifications(timer)) {
|
||||
timers->Del(timer);
|
||||
esyslog(tr("tvguide: RemoteTimerModifications failed"));
|
||||
} else {
|
||||
isyslog("timer %s added (active)", *timer->ToDescr());
|
||||
}
|
||||
#else
|
||||
isyslog("timer %s added (active)", *timer->ToDescr());
|
||||
#endif
|
||||
}
|
||||
SetTimerPath(timer, event, path);
|
||||
timers->SetModified();
|
||||
return timer;
|
||||
}
|
||||
|
||||
@@ -165,31 +175,29 @@ void cRecManager::SetTimerPath(cTimer *timer, const cEvent *event, std::string p
|
||||
return;
|
||||
}
|
||||
//Set choosen path
|
||||
bool addSubtitle = false;
|
||||
if (!isempty(event->ShortText())) { // add subtitle if present
|
||||
addSubtitle = (config.addSubtitleToTimer != addSubtitleNever);
|
||||
if (config.addSubtitleToTimer == addSubtitleSmart)
|
||||
if (event->Duration() > 80 * 60)
|
||||
addSubtitle = false;
|
||||
}
|
||||
cString newFileName;
|
||||
if (path.size() > 0) {
|
||||
std::replace(path.begin(), path.end(), '/', '~');
|
||||
newFileName = cString::sprintf("%s~%s", path.c_str(), timer->File());
|
||||
if (addSubtitle)
|
||||
newFileName = cString::sprintf("%s~%s~%s", path.c_str(), event->Title(), event->ShortText());
|
||||
else
|
||||
newFileName = cString::sprintf("%s~%s", path.c_str(), timer->File());
|
||||
} else {
|
||||
newFileName = event->Title();
|
||||
if (addSubtitle)
|
||||
newFileName = cString::sprintf("%s~%s", event->Title(), event->ShortText());
|
||||
else
|
||||
newFileName = event->Title();
|
||||
}
|
||||
timer->SetFile(*newFileName);
|
||||
}
|
||||
|
||||
void cRecManager::DeleteTimer(int timerID) {
|
||||
const cTimer *t;
|
||||
#if VDRVERSNUM >= 20301
|
||||
{
|
||||
LOCK_TIMERS_READ;
|
||||
t = Timers->Get(timerID);
|
||||
}
|
||||
#else
|
||||
t = Timers.Get(timerID);
|
||||
#endif
|
||||
if (!t)
|
||||
return;
|
||||
DeleteTimer(t);
|
||||
}
|
||||
|
||||
void cRecManager::DeleteTimer(const cEvent *event) {
|
||||
if (!event)
|
||||
return;
|
||||
@@ -219,6 +227,12 @@ void cRecManager::DeleteTimer(const cTimer *timer) {
|
||||
#if VDRVERSNUM >= 20301
|
||||
LOCK_TIMERS_WRITE;
|
||||
cTimers* timers = Timers;
|
||||
if (timer && timer->Remote() && !timer->Recording()) {
|
||||
if (HandleRemoteTimerModifications(NULL, (cTimer*)timer)) {
|
||||
timers->Del((cTimer*)timer);
|
||||
}
|
||||
timers->SetModified();
|
||||
}
|
||||
cTimer* t = timers->GetTimer(timer);
|
||||
#else
|
||||
cTimers* timers = &Timers;
|
||||
@@ -253,24 +267,33 @@ void cRecManager::DeleteRemoteTimer(const cEvent *event) {
|
||||
}
|
||||
}
|
||||
|
||||
void cRecManager::SaveTimer(const cTimer *t, cTimer newTimerSettings) {
|
||||
void cRecManager::SaveTimer(const cTimer *t, cTimer *newTimerSettings) {
|
||||
if (!t)
|
||||
return;
|
||||
|
||||
#if VDRVERSNUM >= 20301
|
||||
LOCK_TIMERS_WRITE;
|
||||
cTimer *timer = Timers->GetTimer(t);
|
||||
cTimers* timers = Timers;
|
||||
timers->SetExplicitModify();
|
||||
if (t && t->Remote()) {
|
||||
if (!HandleRemoteTimerModifications(newTimerSettings, (cTimer *)t)) {
|
||||
esyslog(tr("tvguide: RemoteTimerModifications failed"));
|
||||
}
|
||||
}
|
||||
#else
|
||||
cTimer *timer = Timers.GetTimer((cTimer*)t);
|
||||
cTimers* timers = &Timers;
|
||||
#endif
|
||||
|
||||
bool active = newTimerSettings.HasFlags(tfActive);
|
||||
int prio = newTimerSettings.Priority();
|
||||
int lifetime = newTimerSettings.Lifetime();
|
||||
time_t day = newTimerSettings.Day();
|
||||
int start = newTimerSettings.Start();
|
||||
int stop = newTimerSettings.Stop();
|
||||
std::string fileName = newTimerSettings.File();
|
||||
cTimer *timer = timers->GetTimer(t);
|
||||
if (!timer) {
|
||||
return;
|
||||
}
|
||||
bool active = newTimerSettings->HasFlags(tfActive);
|
||||
int prio = newTimerSettings->Priority();
|
||||
int lifetime = newTimerSettings->Lifetime();
|
||||
time_t day = newTimerSettings->Day();
|
||||
int start = newTimerSettings->Start();
|
||||
int stop = newTimerSettings->Stop();
|
||||
std::string fileName = newTimerSettings->File();
|
||||
|
||||
timer->SetDay(day);
|
||||
timer->SetStart(start);
|
||||
@@ -279,10 +302,10 @@ void cRecManager::SaveTimer(const cTimer *t, cTimer newTimerSettings) {
|
||||
timer->SetLifetime(lifetime);
|
||||
timer->SetFile(fileName.c_str());
|
||||
|
||||
if (timer->HasFlags(tfActive) && !active)
|
||||
timer->ClrFlags(tfActive);
|
||||
else if (!timer->HasFlags(tfActive) && active)
|
||||
timer->SetFlags(tfActive);
|
||||
if (active)
|
||||
timer->SetFlags(tfActive);
|
||||
else
|
||||
timer->ClrFlags(tfActive);
|
||||
|
||||
#if VDRVERSNUM < 20300
|
||||
timer->SetEventFromSchedule();
|
||||
@@ -295,9 +318,9 @@ void cRecManager::SaveTimer(const cTimer *t, cTimer newTimerSettings) {
|
||||
RefreshRemoteTimers();
|
||||
} else {
|
||||
#if VDRVERSNUM >= 20301
|
||||
Timers->SetModified();
|
||||
timers->SetModified();
|
||||
#else
|
||||
Timers.SetModified();
|
||||
timers.SetModified();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@@ -34,11 +34,10 @@ public:
|
||||
cTimer *createRemoteTimer(const cEvent *event, std::string path);
|
||||
void SetTimerPath(cTimer *timer, const cEvent *event, std::string path);
|
||||
void DeleteTimer(const cTimer *timer);
|
||||
void DeleteTimer(int timerID);
|
||||
void DeleteTimer(const cEvent *event);
|
||||
void DeleteLocalTimer(const cEvent *event);
|
||||
void DeleteRemoteTimer(const cEvent *event);
|
||||
void SaveTimer(const cTimer *timer, cTimer newTimerSettings);
|
||||
void SaveTimer(const cTimer *timer, cTimer *newTimerSettings);
|
||||
bool IsRecorded(const cEvent *event);
|
||||
cTVGuideTimerConflicts *CheckTimerConflict(void);
|
||||
void CreateSeriesTimer(cTimer *seriesTimer);
|
||||
|
44
recmenus.c
44
recmenus.c
@@ -103,7 +103,7 @@ std::string cRecMenuAskFolder::GetFolder(void) {
|
||||
}
|
||||
|
||||
// --- cRecMenuConfirmTimer ---------------------------------------------------------
|
||||
cRecMenuConfirmTimer::cRecMenuConfirmTimer(const cEvent *event) {
|
||||
cRecMenuConfirmTimer::cRecMenuConfirmTimer(const cEvent *event, bool timerChanged) {
|
||||
SetWidthPercent(50);
|
||||
#if VDRVERSNUM >= 20301
|
||||
LOCK_CHANNELS_READ;
|
||||
@@ -111,7 +111,6 @@ cRecMenuConfirmTimer::cRecMenuConfirmTimer(const cEvent *event) {
|
||||
#else
|
||||
const cString channelName = Channels.GetByChannelID(event->ChannelID())->Name();
|
||||
#endif
|
||||
cString message;
|
||||
bool eventHasTimer = false;
|
||||
if (config.useRemoteTimers && pRemoteTimers) {
|
||||
RemoteTimers_GetMatch_v1_0 rtMatch;
|
||||
@@ -123,11 +122,9 @@ cRecMenuConfirmTimer::cRecMenuConfirmTimer(const cEvent *event) {
|
||||
} else {
|
||||
eventHasTimer = event->HasTimer();
|
||||
}
|
||||
if (eventHasTimer) {
|
||||
message = tr("Timer created");
|
||||
} else {
|
||||
message = tr("Timer NOT created");
|
||||
}
|
||||
const cString message = (eventHasTimer) ? (timerChanged) ? tr("Timer changed")
|
||||
: tr("Timer created")
|
||||
: tr("Timer NOT created");
|
||||
cString text = cString::sprintf("%s\n%s\n%s %s - %s\n%s",
|
||||
*message,
|
||||
*channelName,
|
||||
@@ -470,17 +467,17 @@ const cTimer *cRecMenuEditTimer::GetOriginalTimer(void) {
|
||||
return originalTimer;
|
||||
}
|
||||
|
||||
cTimer cRecMenuEditTimer::GetTimer(void) {
|
||||
cTimer t;
|
||||
cTimer *cRecMenuEditTimer::GetTimer(void) {
|
||||
cTimer *t = (cTimer *)originalTimer;
|
||||
if (timerActive)
|
||||
t.SetFlags(tfActive);
|
||||
t->SetFlags(tfActive);
|
||||
else
|
||||
t.SetFlags(tfNone);
|
||||
t.SetDay(day);
|
||||
t.SetStart(start);
|
||||
t.SetStop(stop);
|
||||
t.SetPriority(prio);
|
||||
t.SetLifetime(lifetime);
|
||||
t->ClrFlags(tfActive);
|
||||
t->SetDay(day);
|
||||
t->SetStart(start);
|
||||
t->SetStop(stop);
|
||||
t->SetPriority(prio);
|
||||
t->SetLifetime(lifetime);
|
||||
std::string newFolder(folder);
|
||||
std::string newFile = originalTimer->File();
|
||||
size_t found = newFile.find_last_of('~');
|
||||
@@ -495,7 +492,7 @@ cTimer cRecMenuEditTimer::GetTimer(void) {
|
||||
newFile = *cString::sprintf("%s~%s", newFolder.c_str(), newFile.c_str());
|
||||
}
|
||||
std::replace(newFile.begin(), newFile.end(), '/', '~');
|
||||
t.SetFile(newFile.c_str());
|
||||
t->SetFile(newFile.c_str());
|
||||
return t;
|
||||
}
|
||||
|
||||
@@ -1434,14 +1431,19 @@ void cRecMenuTimeline::GetTimersForDay(void) {
|
||||
timersToday.clear();
|
||||
#if VDRVERSNUM >= 20301
|
||||
LOCK_TIMERS_READ;
|
||||
// const cTimers* timers = Timers;
|
||||
for (const cTimer *t = Timers->First(); t; t = Timers->Next(t)) {
|
||||
const cTimers* timers = Timers;
|
||||
#else
|
||||
for (const cTimer *t = Timers.First(); t; t = Timers.Next(t)) {
|
||||
const cTimers* timers = &Timers;
|
||||
#endif
|
||||
cSortedTimers SortedTimers(timers);
|
||||
int i = 0;
|
||||
while (i < SortedTimers.Size()) {
|
||||
const cTimer *t = SortedTimers[i];
|
||||
if (((t->StartTime() > timeStart) && (t->StartTime() <= timeStop)) || ((t->StopTime() > timeStart) && (t->StopTime() <= timeStop))) {
|
||||
timersToday.push_back(t);
|
||||
if (t->HasFlags(tfActive))
|
||||
timersToday.push_back(t);
|
||||
}
|
||||
i++;
|
||||
}
|
||||
numTimersToday = timersToday.size();
|
||||
}
|
||||
|
@@ -47,7 +47,7 @@ public:
|
||||
// --- cRecMenuConfirmTimer ---------------------------------------------------------
|
||||
class cRecMenuConfirmTimer: public cRecMenu {
|
||||
public:
|
||||
cRecMenuConfirmTimer(const cEvent *event);
|
||||
cRecMenuConfirmTimer(const cEvent *event, bool timerChanged = false);
|
||||
virtual ~cRecMenuConfirmTimer(void) {};
|
||||
};
|
||||
|
||||
@@ -136,7 +136,7 @@ public:
|
||||
cRecMenuEditTimer(const cTimer *timer, eRecMenuState nextState);
|
||||
const cTimer *GetOriginalTimer(void);
|
||||
virtual ~cRecMenuEditTimer(void) {};
|
||||
cTimer GetTimer(void);
|
||||
cTimer *GetTimer(void);
|
||||
};
|
||||
|
||||
/******************************************************************************************
|
||||
|
@@ -206,7 +206,7 @@ eOSState cRecMenuView::StateMachine(eRecMenuState nextState) {
|
||||
case rmsSaveTimer: {
|
||||
//caller: cRecMenuEditTimer
|
||||
//save timer for active event
|
||||
cTimer timerModified;
|
||||
cTimer *timerModified;
|
||||
const cTimer *originalTimer;
|
||||
if (cRecMenuEditTimer *menu = dynamic_cast<cRecMenuEditTimer*>(activeMenu)) {
|
||||
timerModified = menu->GetTimer();
|
||||
@@ -234,7 +234,7 @@ eOSState cRecMenuView::StateMachine(eRecMenuState nextState) {
|
||||
LOCK_TIMERS_READ;
|
||||
const cTimer *t = Timers->Get(timerID);
|
||||
#else
|
||||
cTimer *t = Timers.Get(timerID);
|
||||
const cTimer *t = Timers.Get(timerID);
|
||||
#endif
|
||||
if (t) {
|
||||
const cEvent *ev = t->Event();
|
||||
@@ -251,10 +251,19 @@ eOSState cRecMenuView::StateMachine(eRecMenuState nextState) {
|
||||
timerIndex = menu->GetTimerConflictIndex();
|
||||
} else break;
|
||||
int timerID = timerConflicts->GetCurrentConflictTimerID(timerIndex);
|
||||
recManager->DeleteTimer(timerID);
|
||||
const cTimers* timers;
|
||||
#if VDRVERSNUM >= 20301
|
||||
{
|
||||
LOCK_TIMERS_READ;
|
||||
timers = Timers;
|
||||
}
|
||||
#else
|
||||
timers = &Timers;
|
||||
#endif
|
||||
recManager->DeleteTimer(timers->Get(timerID)->Event());
|
||||
delete activeMenu;
|
||||
if (!DisplayTimerConflict(timerID)) {
|
||||
activeMenu = new cRecMenuConfirmTimer(event);
|
||||
activeMenu = new cRecMenuConfirmTimer(timers->Get(timerID)->Event());
|
||||
activeMenu->Display();
|
||||
}
|
||||
break; }
|
||||
@@ -281,7 +290,7 @@ eOSState cRecMenuView::StateMachine(eRecMenuState nextState) {
|
||||
case rmsSaveTimerConflictMenu: {
|
||||
//caller: cRecMenuEditTimer
|
||||
//save timer from current timer conflict
|
||||
cTimer timerModified;
|
||||
cTimer *timerModified;
|
||||
const cTimer *originalTimer;
|
||||
if (cRecMenuEditTimer *menu = dynamic_cast<cRecMenuEditTimer*>(activeMenu)) {
|
||||
timerModified = menu->GetTimer();
|
||||
@@ -290,7 +299,7 @@ eOSState cRecMenuView::StateMachine(eRecMenuState nextState) {
|
||||
recManager->SaveTimer(originalTimer, timerModified);
|
||||
delete activeMenu;
|
||||
if (!DisplayTimerConflict(originalTimer)) {
|
||||
activeMenu = new cRecMenuConfirmTimer(event);
|
||||
activeMenu = new cRecMenuConfirmTimer(originalTimer->Event(), true);
|
||||
activeMenu->Display();
|
||||
}
|
||||
break; }
|
||||
@@ -740,7 +749,7 @@ eOSState cRecMenuView::StateMachine(eRecMenuState nextState) {
|
||||
}
|
||||
break;}
|
||||
case rmsTimelineTimerSave: {
|
||||
cTimer timerModified;
|
||||
cTimer *timerModified;
|
||||
const cTimer *originalTimer;
|
||||
if (cRecMenuEditTimer *menu = dynamic_cast<cRecMenuEditTimer*>(activeMenu)) {
|
||||
timerModified = menu->GetTimer();
|
||||
|
25
setup.c
25
setup.c
@@ -60,6 +60,7 @@ void cTvguideSetup::Store(void) {
|
||||
SetupStore("debugImageLoading", config.debugImageLoading);
|
||||
SetupStore("useNopacityTheme", config.useNopacityTheme);
|
||||
SetupStore("themeIndex", config.themeIndex);
|
||||
SetupStore("useHWAccel", config.useHWAccel);
|
||||
SetupStore("showMainMenuEntry", config.showMainMenuEntry);
|
||||
SetupStore("replaceOriginalSchedule", config.replaceOriginalSchedule);
|
||||
SetupStore("displayMode", config.displayMode);
|
||||
@@ -79,7 +80,9 @@ void cTvguideSetup::Store(void) {
|
||||
SetupStore("displayTime", config.displayTime);
|
||||
SetupStore("displayHorizontalTime", config.displayHorizontalTime);
|
||||
SetupStore("bigStepHours", config.bigStepHours);
|
||||
SetupStore("bigStepHoursHorizontal", config.bigStepHoursHorizontal);
|
||||
SetupStore("hugeStepHours", config.hugeStepHours);
|
||||
SetupStore("hugeStepHoursHorizontal", config.hugeStepHoursHorizontal);
|
||||
SetupStore("channelJumpMode", config.channelJumpMode);
|
||||
SetupStore("blueKeyMode", config.blueKeyMode);
|
||||
SetupStore("numkeyMode", config.numkeyMode);
|
||||
@@ -105,6 +108,7 @@ void cTvguideSetup::Store(void) {
|
||||
SetupStore("footerHeightPercent", config.footerHeightPercent);
|
||||
SetupStore("instRecFolderMode", config.instRecFolderMode);
|
||||
SetupStore("instRecFixedFolder", config.instRecFixedFolder.c_str());
|
||||
SetupStore("AddSubtitleToTimerMode", config.addSubtitleToTimer);
|
||||
SetupStore("favWhatsOnNow", config.favWhatsOnNow);
|
||||
SetupStore("favWhatsOnNext", config.favWhatsOnNext);
|
||||
SetupStore("favUseTime1", config.favUseTime1);
|
||||
@@ -203,6 +207,7 @@ cMenuSetupGeneral::cMenuSetupGeneral(cTVGuideConfig* data) : cMenuSetupSubMenu(
|
||||
void cMenuSetupGeneral::Set(void) {
|
||||
int currentItem = Current();
|
||||
Clear();
|
||||
Add(new cMenuEditBoolItem(tr("Use workaround for HWAccelerated OSD"), &tmpConfig->useHWAccel));
|
||||
Add(new cMenuEditBoolItem(tr("Show Main Menu Entry"), &tmpConfig->showMainMenuEntry));
|
||||
Add(new cMenuEditBoolItem(tr("Replace VDR Schedules Menu"), &tmpConfig->replaceOriginalSchedule));
|
||||
Add(new cMenuEditBoolItem(tr("Use appropriate nOpacity Theme"), &tmpConfig->useNopacityTheme));
|
||||
@@ -222,8 +227,13 @@ void cMenuSetupGeneral::Set(void) {
|
||||
Add(new cMenuEditBoolItem(tr("Close TVGuide after channel switch"), &tmpConfig->closeOnSwitch));
|
||||
Add(new cMenuEditStraItem(tr("Functionality of numeric Keys"), &tmpConfig->numkeyMode, 2, numMode));
|
||||
Add(new cMenuEditBoolItem(tr("Hide last Channel Group"), &tmpConfig->hideLastGroup));
|
||||
Add(new cMenuEditIntItem(tr("Big Step (Keys 1 / 3) in hours"), &tmpConfig->bigStepHours, 1, 12));
|
||||
Add(new cMenuEditIntItem(tr("Huge Step (Keys 4 / 6) in hours"), &tmpConfig->hugeStepHours, 13, 48));
|
||||
if (tmpConfig->displayMode == eVertical) {
|
||||
Add(new cMenuEditIntItem(tr("Big Step (Keys 1 / 3) in hours"), &tmpConfig->bigStepHours, 1, 12));
|
||||
Add(new cMenuEditIntItem(tr("Huge Step (Keys 4 / 6) in hours"), &tmpConfig->hugeStepHours, 13, 48));
|
||||
} else if (tmpConfig->displayMode == eHorizontal) {
|
||||
Add(new cMenuEditIntItem(tr("Big Step (Keys 1 / 3) in hours"), &tmpConfig->bigStepHoursHorizontal, 1, 12));
|
||||
Add(new cMenuEditIntItem(tr("Huge Step (Keys 4 / 6) in hours"), &tmpConfig->hugeStepHoursHorizontal, 13, 48));
|
||||
}
|
||||
Add(new cMenuEditStraItem(tr("Time Format (12h/24h)"), &tmpConfig->timeFormat, 2, timeFormatItems));
|
||||
Add(new cMenuEditIntItem(tr("EPG Window Text Scrolling Speed"), &tmpConfig->detailedViewScrollStep, 1, 30));
|
||||
Add(new cMenuEditBoolItem(tr("Display Reruns in detailed EPG View"), &tmpConfig->displayRerunsDetailEPGView));
|
||||
@@ -275,8 +285,8 @@ void cMenuSetupScreenLayout::Set(void) {
|
||||
Add(new cMenuEditIntItem(*cString::sprintf("%s%s", *indent, tr("Width of Channel Header (Perc. of osd width)")), &tmpConfig->channelHeaderWidthPercent, 5, 30));
|
||||
Add(new cMenuEditIntItem(*cString::sprintf("%s%s", *indent, tr("Height of Timeline (Perc. of osd height)")), &tmpConfig->timeLineHeightPercent, 5, 30));
|
||||
Add(new cMenuEditIntItem(*cString::sprintf("%s%s", *indent, tr("Number of Channels to display")), &tmpConfig->channelRows, 3, 12));
|
||||
Add(new cMenuEditBoolItem(*cString::sprintf("%s%s", *indent, tr("Display time in EPG Grids")), &tmpConfig->showTimeInGrid));
|
||||
}
|
||||
Add(new cMenuEditBoolItem(tr("Display time in EPG Grids"), &tmpConfig->showTimeInGrid));
|
||||
Add(new cMenuEditIntItem(tr("Height of Headers (Status Header and EPG View, Perc. of osd height)"), &tmpConfig->headerHeightPercent, 10, 50));
|
||||
Add(new cMenuEditIntItem(tr("Height of Footer (Perc. of osd height)"), &tmpConfig->footerHeightPercent, 3, 20));
|
||||
|
||||
@@ -401,6 +411,9 @@ cMenuSetupFavorites::cMenuSetupFavorites(cTVGuideConfig* data) : cMenuSetupSubM
|
||||
recFolderMode[1] = tr("Select from folder list");
|
||||
recFolderMode[2] = tr("Use fixed folder");
|
||||
strn0cpy(fixedFolder, data->instRecFixedFolder.c_str(), sizeof(fixedFolder));
|
||||
addSubtitleMode[0] = tr("never");
|
||||
addSubtitleMode[1] = tr("smart");
|
||||
addSubtitleMode[2] = tr("always");
|
||||
switchModeItems[0] = (tr("switch"));
|
||||
switchModeItems[1] = (tr("announce only"));
|
||||
switchModeItems[2] = (tr("ask for switch"));
|
||||
@@ -411,13 +424,15 @@ void cMenuSetupFavorites::Set(void) {
|
||||
int currentItem = Current();
|
||||
Clear();
|
||||
|
||||
Add(new cMenuEditStraItem(tr("Folder for instant Recordings"), &tmpConfig->instRecFolderMode, 3, recFolderMode));
|
||||
Add(new cOsdItem(tr("Instant recording:"), osUnknown, false));
|
||||
Add(new cMenuEditStraItem(tr("Folder for instant Recordings"), &tmpConfig->instRecFolderMode, 3, recFolderMode));
|
||||
if (tmpConfig->instRecFolderMode == eFolderFixed) {
|
||||
Add(new cMenuEditStrItem(cString::sprintf("%s%s", *indent, tr("Folder")), fixedFolder, sizeof(fixedFolder), trVDR(FileNameChars)));
|
||||
}
|
||||
Add(new cMenuEditStraItem(tr("Add episode to manual timers"), &tmpConfig->addSubtitleToTimer, 3, addSubtitleMode));
|
||||
if (pRemoteTimers)
|
||||
Add(new cMenuEditBoolItem(tr("Use Remotetimers"), &tmpConfig->useRemoteTimers));
|
||||
|
||||
Add(new cOsdItem(tr("Favorites:"), osUnknown, false));
|
||||
Add(new cMenuEditBoolItem(tr("Limit channels in favorites"), &tmpConfig->favLimitChannels));
|
||||
if (tmpConfig->favLimitChannels) {
|
||||
Add(new cMenuEditChanItem(tr("Start Channel"), &tmpConfig->favStartChannel));
|
||||
|
1
setup.h
1
setup.h
@@ -70,6 +70,7 @@ class cMenuSetupFavorites : public cMenuSetupSubMenu {
|
||||
char description3[256];
|
||||
char description4[256];
|
||||
const char * recFolderMode[3];
|
||||
const char * addSubtitleMode[3];
|
||||
const char * switchModeItems[3];
|
||||
char fixedFolder[256];
|
||||
void Set(void);
|
||||
|
159
timeline.c
159
timeline.c
@@ -4,57 +4,45 @@
|
||||
cTimeLine::cTimeLine(cTimeManager *timeManager) {
|
||||
this->timeManager = timeManager;
|
||||
lastClock = "";
|
||||
timeBase = NULL;
|
||||
int x11, x21, y11, y21, x12, x22, y12, y22;
|
||||
if (config.displayMode == eVertical) {
|
||||
dateViewer = new cStyledPixmap(osdManager.requestPixmap(1, cRect(0,
|
||||
geoManager.statusHeaderHeight + geoManager.clockHeight,
|
||||
geoManager.dateVieverWidth,
|
||||
geoManager.dateVieverHeight)));
|
||||
timeline = osdManager.requestPixmap(2, cRect(0,
|
||||
geoManager.statusHeaderHeight + geoManager.channelHeaderHeight + geoManager.channelGroupsHeight,
|
||||
geoManager.timeLineWidth,
|
||||
geoManager.osdHeight - geoManager.statusHeaderHeight - geoManager.channelHeaderHeight - geoManager.channelGroupsHeight - geoManager.footerHeight)
|
||||
, cRect(0,
|
||||
0,
|
||||
geoManager.timeLineWidth,
|
||||
1440 * geoManager.minutePixel));
|
||||
x11 = 0;
|
||||
x21 = geoManager.dateVieverWidth;
|
||||
y11 = geoManager.statusHeaderHeight + geoManager.clockHeight;
|
||||
y21 = geoManager.dateVieverHeight;
|
||||
x12 = 0;
|
||||
x22 = geoManager.timeLineWidth;
|
||||
y12 = geoManager.statusHeaderHeight + geoManager.channelHeaderHeight + geoManager.channelGroupsHeight;
|
||||
y22 = geoManager.osdHeight - geoManager.statusHeaderHeight - geoManager.channelHeaderHeight - geoManager.channelGroupsHeight - geoManager.footerHeight;
|
||||
} else if (config.displayMode == eHorizontal) {
|
||||
dateViewer = new cStyledPixmap(osdManager.requestPixmap(1, cRect(geoManager.clockWidth,
|
||||
geoManager.statusHeaderHeight,
|
||||
geoManager.dateVieverWidth,
|
||||
geoManager.dateVieverHeight)));
|
||||
timeline = osdManager.requestPixmap(2, cRect(geoManager.channelHeaderWidth + geoManager.channelGroupsWidth,
|
||||
geoManager.statusHeaderHeight,
|
||||
geoManager.osdWidth - geoManager.channelHeaderWidth - geoManager.channelGroupsWidth,
|
||||
geoManager.timeLineHeight)
|
||||
, cRect(0,
|
||||
0,
|
||||
1440 * geoManager.minutePixel,
|
||||
geoManager.timeLineHeight));
|
||||
x11 = geoManager.clockWidth;
|
||||
x21 = geoManager.dateVieverWidth;
|
||||
y11 = geoManager.statusHeaderHeight;
|
||||
y21 = geoManager.dateVieverHeight;
|
||||
x12 = geoManager.channelHeaderWidth + geoManager.channelGroupsWidth;
|
||||
x22 = geoManager.osdWidth - geoManager.channelHeaderWidth - geoManager.channelGroupsWidth;
|
||||
y12 = geoManager.statusHeaderHeight;
|
||||
y22 = geoManager.timeLineHeight;
|
||||
}
|
||||
int clockY;
|
||||
int clockX;
|
||||
if (config.displayMode == eVertical) {
|
||||
clockY = geoManager.statusHeaderHeight;
|
||||
clockX = 0;
|
||||
}
|
||||
else {
|
||||
clockY = geoManager.statusHeaderHeight;
|
||||
clockX = 0;
|
||||
}
|
||||
clock = new cStyledPixmap(osdManager.requestPixmap(3, cRect(clockX,
|
||||
clockY,
|
||||
dateViewer = new cStyledPixmap(osdManager.requestPixmap(1, cRect(x11, y11, x21, y21)));
|
||||
timeline = osdManager.requestPixmap(2, cRect(x12, y12, x22, y22));
|
||||
clock = new cStyledPixmap(osdManager.requestPixmap(3, cRect(0,
|
||||
geoManager.statusHeaderHeight,
|
||||
geoManager.clockWidth,
|
||||
geoManager.clockHeight)));
|
||||
}
|
||||
|
||||
cTimeLine::~cTimeLine(void) {
|
||||
delete dateViewer;
|
||||
osdManager.releasePixmap(timeline);
|
||||
if (clock)
|
||||
delete clock;
|
||||
osdManager.releasePixmap(timeBase);
|
||||
osdManager.releasePixmap(timeline);
|
||||
if (dateViewer)
|
||||
delete dateViewer;
|
||||
}
|
||||
|
||||
void cTimeLine::drawDateViewer() {
|
||||
void cTimeLine::DrawDateViewer(void) {
|
||||
cString weekDay = timeManager->GetWeekday();
|
||||
cString date = timeManager->GetDate();
|
||||
if (config.style != eStyleGraphical) {
|
||||
@@ -88,8 +76,8 @@ void cTimeLine::drawDateViewer() {
|
||||
}
|
||||
}
|
||||
|
||||
void cTimeLine::drawTimeline() {
|
||||
timeline->SetTile(true);
|
||||
void cTimeLine::DrawTimeline(void) {
|
||||
// timeline->SetTile(true);
|
||||
timeline->Fill(clrTransparent);
|
||||
tColor colorFont, colorBackground;
|
||||
|
||||
@@ -101,8 +89,8 @@ void cTimeLine::drawTimeline() {
|
||||
img1 = imgCache.GetOsdElement(oeTimeline1);
|
||||
img2 = imgCache.GetOsdElement(oeTimeline2);
|
||||
} else {
|
||||
img1 = createBackgroundImage(imgWidth, imgHeight, theme.Color(clrTimeline1), theme.Color(clrTimeline1Blending));
|
||||
img2 = createBackgroundImage(imgWidth, imgHeight, theme.Color(clrTimeline2), theme.Color(clrTimeline2Blending));
|
||||
img1 = CreateBackgroundImage(imgWidth, imgHeight, theme.Color(clrTimeline1), theme.Color(clrTimeline1Blending));
|
||||
img2 = CreateBackgroundImage(imgWidth, imgHeight, theme.Color(clrTimeline2), theme.Color(clrTimeline2Blending));
|
||||
}
|
||||
const cImage *img = NULL;
|
||||
if (!img1 || !img2)
|
||||
@@ -110,8 +98,19 @@ void cTimeLine::drawTimeline() {
|
||||
int textWidth, posX, posY;
|
||||
char timetext[10];
|
||||
|
||||
for (int i=0; i<48; i++) {
|
||||
if (i%2==0) {
|
||||
int halfHours;
|
||||
if (config.displayMode == eVertical)
|
||||
halfHours = config.displayTime / 30 + 1;
|
||||
else
|
||||
halfHours = config.displayHorizontalTime / 30 + 1;
|
||||
|
||||
time_t tStart = timeManager->GetStart();
|
||||
tm *t = localtime ( &tStart );
|
||||
|
||||
int x = 2 * t->tm_hour + ((t->tm_min == 0) ? 0 : 1);
|
||||
for (int j = x; j < (x + halfHours); j++) {
|
||||
int i = (j >= 48) ? (j - 48) : j;
|
||||
if (i % 2 == 0) {
|
||||
img = img1;
|
||||
colorFont = theme.Color(clrTimeline2);
|
||||
colorBackground = (config.style == eStyleFlat)?theme.Color(clrTimeline1):clrTransparent;
|
||||
@@ -119,11 +118,11 @@ void cTimeLine::drawTimeline() {
|
||||
if (i == 0)
|
||||
sprintf(timetext, "12:00 PM");
|
||||
else if (i/2 < 13)
|
||||
sprintf(timetext, "%d:00 AM", i/2);
|
||||
sprintf(timetext, "%d:00 AM", i / 2);
|
||||
else
|
||||
sprintf(timetext, "%d:00 PM", i/2-12);
|
||||
sprintf(timetext, "%d:00 PM", i / 2 - 12);
|
||||
} else {
|
||||
sprintf(timetext, "%d:00", i/2);
|
||||
sprintf(timetext, "%d:00", i / 2);
|
||||
}
|
||||
} else {
|
||||
img = img2;
|
||||
@@ -133,38 +132,38 @@ void cTimeLine::drawTimeline() {
|
||||
if (i == 1)
|
||||
sprintf(timetext, "12:30 PM");
|
||||
else if (i/2 < 13)
|
||||
sprintf(timetext, "%d:30 AM", i/2);
|
||||
sprintf(timetext, "%d:30 AM", i / 2);
|
||||
else
|
||||
sprintf(timetext, "%d:30 PM", i/2-12);
|
||||
sprintf(timetext, "%d:30 PM", i / 2 - 12);
|
||||
} else {
|
||||
sprintf(timetext, "%d:30", i/2);
|
||||
sprintf(timetext, "%d:30", i / 2);
|
||||
}
|
||||
}
|
||||
if (config.displayMode == eVertical) {
|
||||
posY = i*geoManager.minutePixel*30;
|
||||
posY = (j - x) * geoManager.minutePixel * 30;
|
||||
timeline->DrawImage(cPoint(0, posY), *img);
|
||||
if (config.style != eStyleGraphical) {
|
||||
decorateTile(0, posY, imgWidth+2, imgHeight);
|
||||
DecorateTile(0, posY, imgWidth + 2, imgHeight);
|
||||
}
|
||||
textWidth = fontManager.FontTimeLineTime->Width(timetext);
|
||||
timeline->DrawText(cPoint((geoManager.timeLineWidth-textWidth)/2, posY + 5), timetext, colorFont, colorBackground, fontManager.FontTimeLineTime);
|
||||
timeline->DrawText(cPoint((geoManager.timeLineWidth-textWidth) / 2, posY + 5), timetext, colorFont, colorBackground, fontManager.FontTimeLineTime);
|
||||
} else if (config.displayMode == eHorizontal) {
|
||||
posX = i*geoManager.minutePixel*30;
|
||||
posX = (j - x) * geoManager.minutePixel * 30;
|
||||
timeline->DrawImage(cPoint(posX, 0), *img);
|
||||
if (config.style != eStyleGraphical) {
|
||||
decorateTile(posX, 0, imgWidth, imgHeight+2);
|
||||
DecorateTile(posX, 0, imgWidth, imgHeight + 2);
|
||||
}
|
||||
timeline->DrawText(cPoint(posX + 15, (dateViewer->Height() - fontManager.FontTimeLineTimeHorizontal->Height())/2), timetext, colorFont, colorBackground, fontManager.FontTimeLineTimeHorizontal);
|
||||
timeline->DrawText(cPoint(posX + 15, (dateViewer->Height() - fontManager.FontTimeLineTimeHorizontal->Height()) / 2), timetext, colorFont, colorBackground, fontManager.FontTimeLineTimeHorizontal);
|
||||
}
|
||||
}
|
||||
setTimeline();
|
||||
DrawTimeIndicator();
|
||||
if (config.style != eStyleGraphical) {
|
||||
delete img1;
|
||||
delete img2;
|
||||
}
|
||||
}
|
||||
|
||||
void cTimeLine::decorateTile(int posX, int posY, int tileWidth, int tileHeight) {
|
||||
void cTimeLine::DecorateTile(int posX, int posY, int tileWidth, int tileHeight) {
|
||||
timeline->DrawRectangle(cRect(posX,posY,tileWidth,2), clrTransparent); //top
|
||||
timeline->DrawRectangle(cRect(posX,posY,2,tileHeight), clrTransparent); //left
|
||||
timeline->DrawRectangle(cRect(posX,posY + tileHeight-2,tileWidth,2), clrTransparent); //bottom
|
||||
@@ -177,11 +176,11 @@ void cTimeLine::decorateTile(int posX, int posY, int tileWidth, int tileHeight)
|
||||
|
||||
if (config.roundedCorners) {
|
||||
int borderRadius = 12;
|
||||
drawRoundedCorners(posX, posY, tileWidth, tileHeight, borderRadius);
|
||||
DrawRoundedCorners(posX, posY, tileWidth, tileHeight, borderRadius);
|
||||
}
|
||||
}
|
||||
|
||||
void cTimeLine::drawRoundedCorners(int posX, int posY, int width, int height, int radius) {
|
||||
void cTimeLine::DrawRoundedCorners(int posX, int posY, int width, int height, int radius) {
|
||||
timeline->DrawEllipse(cRect(posX+2,posY+2,radius,radius), theme.Color(clrBorder), -2);
|
||||
timeline->DrawEllipse(cRect(posX+1,posY+1,radius,radius), clrTransparent, -2);
|
||||
|
||||
@@ -197,13 +196,16 @@ void cTimeLine::drawRoundedCorners(int posX, int posY, int width, int height, in
|
||||
}
|
||||
}
|
||||
|
||||
void cTimeLine::drawCurrentTimeBase(void) {
|
||||
bool nowVisible = timeManager->NowVisible();
|
||||
if (timeBase)
|
||||
osdManager.releasePixmap(timeBase);
|
||||
if (!nowVisible)
|
||||
void cTimeLine::DrawTimeIndicator(void) {
|
||||
if (!config.displayTimeBase)
|
||||
return;
|
||||
int deltaTime = (timeManager->GetNow() - timeManager->GetStart()) / 60 * geoManager.minutePixel;
|
||||
if (!timeManager->NowVisible()) {
|
||||
if (timeBase)
|
||||
timeBase->Fill(clrTransparent);
|
||||
return;
|
||||
}
|
||||
int deltaTime = (time(0) - timeManager->GetStart()) / 60 * geoManager.minutePixel;
|
||||
osdManager.releasePixmap(timeBase);
|
||||
int x1, x2, y1, y2;
|
||||
if (config.displayMode == eVertical) {
|
||||
x1 = 0;
|
||||
@@ -221,7 +223,7 @@ void cTimeLine::drawCurrentTimeBase(void) {
|
||||
timeBase->DrawRectangle(cRect(0, 0, timeBase->ViewPort().Width(), timeBase->ViewPort().Height()), theme.Color(clrTimeBase));
|
||||
}
|
||||
|
||||
cImage *cTimeLine::createBackgroundImage(int width, int height, tColor clrBgr, tColor clrBlend) {
|
||||
cImage *cTimeLine::CreateBackgroundImage(int width, int height, tColor clrBgr, tColor clrBlend) {
|
||||
cImage *image = NULL;
|
||||
if (config.style == eStyleBlendingDefault) {
|
||||
image = new cImage(cSize(width, height));
|
||||
@@ -250,26 +252,10 @@ cImage *cTimeLine::createBackgroundImage(int width, int height, tColor clrBgr, t
|
||||
return image;
|
||||
}
|
||||
|
||||
void cTimeLine::setTimeline() {
|
||||
int offset = timeManager->GetTimelineOffset();
|
||||
int xNew, yNew;
|
||||
if (config.displayMode == eVertical) {
|
||||
xNew = 0;
|
||||
yNew = -offset*geoManager.minutePixel;
|
||||
} else if (config.displayMode == eHorizontal) {
|
||||
xNew = -offset*geoManager.minutePixel;
|
||||
yNew = 0;
|
||||
}
|
||||
timeline->SetDrawPortPoint(cPoint(xNew, yNew));
|
||||
if (config.displayTimeBase)
|
||||
drawCurrentTimeBase();
|
||||
}
|
||||
|
||||
bool cTimeLine::drawClock() {
|
||||
bool cTimeLine::DrawClock(void) {
|
||||
cString currentTime = timeManager->GetCurrentTime();
|
||||
if (strcmp(currentTime, lastClock)) {
|
||||
if (config.displayMode == eVertical)
|
||||
clock->Fill(clrTransparent);
|
||||
clock->Fill(clrTransparent);
|
||||
const cFont *font = (config.displayMode == eVertical) ? fontManager.FontTimeLineTime : fontManager.FontTimeLineTimeHorizontal;
|
||||
int textHeight = font->Height();
|
||||
int clockTextWidth = font->Width(*currentTime);
|
||||
@@ -283,6 +269,7 @@ bool cTimeLine::drawClock() {
|
||||
}
|
||||
clock->DrawText(cPoint((geoManager.clockWidth - clockTextWidth) / 2, (geoManager.clockHeight - textHeight) / 2), *currentTime, theme.Color(clrFont), colorFontBack, font);
|
||||
lastClock = currentTime;
|
||||
DrawTimeIndicator();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
15
timeline.h
15
timeline.h
@@ -14,17 +14,16 @@ private:
|
||||
cStyledPixmap *clock;
|
||||
cPixmap *timeBase;
|
||||
cString lastClock;
|
||||
void decorateTile(int posX, int posY, int tileWidth, int tileHeight);
|
||||
void drawRoundedCorners(int posX, int posY, int width, int height, int radius);
|
||||
cImage *createBackgroundImage(int width, int height, tColor clrBgr, tColor clrBlend);
|
||||
void DecorateTile(int posX, int posY, int tileWidth, int tileHeight);
|
||||
void DrawRoundedCorners(int posX, int posY, int width, int height, int radius);
|
||||
cImage *CreateBackgroundImage(int width, int height, tColor clrBgr, tColor clrBlend);
|
||||
public:
|
||||
cTimeLine(cTimeManager *timeManager);
|
||||
virtual ~cTimeLine(void);
|
||||
void setTimeline(void);
|
||||
void drawDateViewer(void);
|
||||
void drawTimeline(void);
|
||||
void drawCurrentTimeBase(void);
|
||||
bool drawClock();
|
||||
void DrawDateViewer(void);
|
||||
void DrawTimeline(void);
|
||||
void DrawTimeIndicator(void);
|
||||
bool DrawClock(void);
|
||||
};
|
||||
|
||||
#endif //__TVGUIDE_TIMELINE_H
|
||||
|
@@ -3,13 +3,21 @@
|
||||
#include "config.h"
|
||||
#include "timemanager.h"
|
||||
|
||||
cTimeManager::cTimeManager(void) {
|
||||
if (config.displayMode == eVertical) {
|
||||
displaySeconds = (geoManager.osdHeight - geoManager.statusHeaderHeight - geoManager.channelHeaderHeight - geoManager.channelGroupsHeight - geoManager.footerHeight) / geoManager.minutePixel * 60;
|
||||
} else if (config.displayMode == eHorizontal) {
|
||||
displaySeconds = (geoManager.osdWidth - geoManager.channelHeaderWidth - geoManager.channelGroupsWidth) / geoManager.minutePixel * 60;
|
||||
}
|
||||
}
|
||||
|
||||
cTimeManager::~cTimeManager(void) {
|
||||
}
|
||||
|
||||
cString cTimeManager::printTime(time_t displayTime) {
|
||||
struct tm *ts;
|
||||
ts = localtime(&displayTime);
|
||||
cString strTime = cString::sprintf("%d.%d-%d:%d.%d", ts->tm_mday, ts->tm_mon + 1, ts->tm_hour, ts->tm_min, ts->tm_sec);
|
||||
cString strTime = cString::sprintf("%d.%d-%d:%d.%d", ts->tm_mday, ts->tm_mon+1, ts->tm_hour, ts->tm_min, ts->tm_sec);
|
||||
return strTime;
|
||||
}
|
||||
|
||||
@@ -18,34 +26,26 @@ void cTimeManager::Now() {
|
||||
t = time(0);
|
||||
tStart = t;
|
||||
tStart = GetRounded();
|
||||
if (config.displayMode == eVertical) {
|
||||
tEnd = tStart + (geoManager.osdHeight - geoManager.statusHeaderHeight - geoManager.channelHeaderHeight - geoManager.channelGroupsHeight - geoManager.footerHeight) / geoManager.minutePixel * 60;
|
||||
} else if (config.displayMode == eHorizontal) {
|
||||
tEnd = tStart + (geoManager.osdWidth - geoManager.channelHeaderWidth - geoManager.channelGroupsWidth) / geoManager.minutePixel * 60;
|
||||
}
|
||||
tEnd = tStart + displaySeconds;
|
||||
}
|
||||
|
||||
void cTimeManager::AddStep(int step) {
|
||||
tStart += step * 60;
|
||||
tEnd += step * 60;
|
||||
tEnd = tStart + displaySeconds;
|
||||
}
|
||||
|
||||
bool cTimeManager::DelStep(int step) {
|
||||
void cTimeManager::DelStep(int step) {
|
||||
if ((tStart - step * 60) + 30 * 60 < t) {
|
||||
return true;
|
||||
Now();
|
||||
} else {
|
||||
tStart -= step * 60;
|
||||
tEnd = tStart + displaySeconds;
|
||||
}
|
||||
tStart -= step * 60;
|
||||
tEnd -= step * 60;
|
||||
return false;
|
||||
}
|
||||
|
||||
void cTimeManager::SetTime(time_t newTime) {
|
||||
tStart = newTime;
|
||||
if (config.displayMode == eVertical) {
|
||||
tEnd = tStart + (geoManager.osdHeight - geoManager.statusHeaderHeight - geoManager.channelHeaderHeight - geoManager.channelGroupsHeight - geoManager.footerHeight) / geoManager.minutePixel * 60;
|
||||
} else if (config.displayMode == eHorizontal) {
|
||||
tEnd = tStart + (geoManager.osdWidth - geoManager.channelHeaderWidth - geoManager.channelGroupsWidth) / geoManager.minutePixel * 60;
|
||||
}
|
||||
tEnd = tStart + displaySeconds;
|
||||
}
|
||||
|
||||
time_t cTimeManager::getPrevPrimetime(time_t current) {
|
||||
@@ -55,7 +55,7 @@ time_t cTimeManager::getPrevPrimetime(time_t current) {
|
||||
st = localtime(¤t);
|
||||
}
|
||||
st->tm_hour = 20;
|
||||
st->tm_min = 0;
|
||||
st->tm_min = 0;
|
||||
time_t primeTime = mktime(st);
|
||||
return primeTime;
|
||||
}
|
||||
@@ -67,7 +67,7 @@ time_t cTimeManager::getNextPrimetime(time_t current){
|
||||
st = localtime(¤t);
|
||||
}
|
||||
st->tm_hour = 20;
|
||||
st->tm_min = 0;
|
||||
st->tm_min = 0;
|
||||
time_t primeTime = mktime(st);
|
||||
return primeTime;
|
||||
}
|
||||
@@ -105,7 +105,7 @@ cString cTimeManager::GetWeekday() {
|
||||
|
||||
int cTimeManager::GetTimelineOffset() {
|
||||
tm *st = localtime(&tStart);
|
||||
int offset = st->tm_hour * 60;
|
||||
int offset = st->tm_hour*60;
|
||||
offset += st->tm_min;
|
||||
return offset;
|
||||
}
|
||||
@@ -126,6 +126,7 @@ bool cTimeManager::NowVisible(void) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
void cTimeManager::debug() {
|
||||
esyslog("t: %s, tStart: %s, tEnd: %s", *TimeString(t), *TimeString(tStart), *TimeString(tEnd));
|
||||
}
|
||||
|
@@ -2,6 +2,7 @@
|
||||
#define __TVGUIDE_TIMEMANAGER_H
|
||||
|
||||
#include <vdr/tools.h>
|
||||
#include "config.h"
|
||||
|
||||
// --- cTimeManager -------------------------------------------------------------
|
||||
|
||||
@@ -10,14 +11,16 @@ class cTimeManager {
|
||||
time_t t;
|
||||
time_t tStart;
|
||||
time_t tEnd;
|
||||
int displaySeconds;
|
||||
eTimeFormat timeFormat;
|
||||
public:
|
||||
cTimeManager(){};
|
||||
cTimeManager();
|
||||
virtual ~cTimeManager(void);
|
||||
static cString printTime(time_t displayTime);
|
||||
void Now();
|
||||
time_t GetNow() { return t; };
|
||||
void AddStep(int step);
|
||||
bool DelStep(int step);
|
||||
void DelStep(int step);
|
||||
void SetTime(time_t newTime);
|
||||
time_t Get() {return t;};
|
||||
time_t GetStart() {return tStart;};
|
||||
@@ -31,6 +34,7 @@ class cTimeManager {
|
||||
int GetTimelineOffset();
|
||||
time_t GetRounded();
|
||||
bool NowVisible(void);
|
||||
int GetDisplaySeconds(void) { return displaySeconds; };
|
||||
void debug();
|
||||
};
|
||||
|
||||
|
68
tools.c
68
tools.c
@@ -23,32 +23,49 @@ cPlugin *GetScraperPlugin(void) {
|
||||
/****************************************************************************************
|
||||
* CUTTEXT
|
||||
****************************************************************************************/
|
||||
std::string CutText(std::string text, int width, const cFont *font) {
|
||||
if (width <= font->Size())
|
||||
return text.c_str();
|
||||
if (font->Width(text.c_str()) < width)
|
||||
return text.c_str();
|
||||
cTextWrapper twText;
|
||||
twText.Set(text.c_str(), font, width);
|
||||
std::string cuttedTextNative = twText.GetLine(0);
|
||||
std::stringstream sstrText;
|
||||
sstrText << cuttedTextNative << "...";
|
||||
std::string cuttedText = sstrText.str();
|
||||
int actWidth = font->Width(cuttedText.c_str());
|
||||
if (actWidth > width) {
|
||||
int overlap = actWidth - width;
|
||||
int charWidth = font->Width(".");
|
||||
if (charWidth == 0)
|
||||
charWidth = 1;
|
||||
int cutChars = overlap / charWidth;
|
||||
if (cutChars > 0) {
|
||||
cuttedTextNative = cuttedTextNative.substr(0, cuttedTextNative.length() - cutChars);
|
||||
std::stringstream sstrText2;
|
||||
sstrText2 << cuttedTextNative << "...";
|
||||
cuttedText = sstrText2.str();
|
||||
}
|
||||
std::string utf8_substr(const std::string& str, unsigned int start, long unsigned int leng) {
|
||||
if (leng==0) { return ""; }
|
||||
unsigned int c, i, ix, q;
|
||||
long unsigned int min=std::string::npos, max=std::string::npos;
|
||||
for (q=0, i=0, ix=str.length(); i < ix; i++, q++) {
|
||||
if (q==start){ min=i; }
|
||||
if (q<=start+leng || leng==std::string::npos){ max=i; }
|
||||
|
||||
c = (unsigned char) str[i];
|
||||
if (c>=0 && c<=127) i+=0;
|
||||
else if ((c & 0xE0) == 0xC0) i+=1;
|
||||
else if ((c & 0xF0) == 0xE0) i+=2;
|
||||
else if ((c & 0xF8) == 0xF0) i+=3;
|
||||
//else if (($c & 0xFC) == 0xF8) i+=4; // 111110bb //byte 5, unnecessary in 4 byte UTF-8
|
||||
//else if (($c & 0xFE) == 0xFC) i+=5; // 1111110b //byte 6, unnecessary in 4 byte UTF-8
|
||||
else return "";//invalid utf8
|
||||
}
|
||||
if (q<=start+leng || leng==std::string::npos){ max=i; }
|
||||
if (min==std::string::npos || max==std::string::npos) { return ""; }
|
||||
return str.substr(min,max);
|
||||
}
|
||||
|
||||
std::string CutText(std::string text, int width, const cFont *font) {
|
||||
int actWidth = font->Width(text.c_str());
|
||||
if (actWidth <= width) {
|
||||
return text.c_str();
|
||||
} else {
|
||||
int i = std::max(width / font->Size(), 1) - 1;
|
||||
std::string cuttext, oldtext;
|
||||
cuttext = utf8_substr(text, 0, i);
|
||||
do {
|
||||
oldtext = cuttext;
|
||||
i++;
|
||||
cuttext = utf8_substr(text, 0, i);
|
||||
std::stringstream sstrText;
|
||||
sstrText << cuttext << "...";
|
||||
actWidth = font->Width(sstrText.str().c_str());
|
||||
}
|
||||
while (actWidth < width);
|
||||
std::stringstream sstrText2;
|
||||
sstrText2 << oldtext << "...";
|
||||
return sstrText2.str();
|
||||
}
|
||||
return cuttedText;
|
||||
}
|
||||
|
||||
/****************************************************************************************
|
||||
@@ -113,7 +130,6 @@ void ReadRecordingDirectories(std::vector<std::string> *folders, cList<cNestedIt
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************************************
|
||||
* DrawRoundedCorners
|
||||
****************************************************************************************/
|
||||
|
1
tools.h
1
tools.h
@@ -9,6 +9,7 @@
|
||||
|
||||
cPlugin *GetScraperPlugin(void);
|
||||
|
||||
std::string utf8_substr(const std::string& str, unsigned int start=0, long unsigned int leng=std::string::npos);
|
||||
std::string CutText(std::string text, int width, const cFont *font);
|
||||
std::string StrToLowerCase(std::string str);
|
||||
std::string GetDirectoryFromTimer(std::string file);
|
||||
|
@@ -27,7 +27,7 @@
|
||||
#error "VDR-2.0.0 API version or greater is required!"
|
||||
#endif
|
||||
|
||||
static const char *VERSION = "1.2.12";
|
||||
static const char *VERSION = "1.2.17";
|
||||
static const char *DESCRIPTION = tr("A fancy 2d EPG Viewer");
|
||||
static const char *MAINMENUENTRY = "Tvguide";
|
||||
|
||||
|
93
tvguideosd.c
93
tvguideosd.c
@@ -112,9 +112,9 @@ void cTvGuideOsd::drawOsd() {
|
||||
statusHeader->ScaleVideo();
|
||||
}
|
||||
timeLine = new cTimeLine(timeManager);
|
||||
timeLine->drawDateViewer();
|
||||
timeLine->drawTimeline();
|
||||
timeLine->drawClock();
|
||||
timeLine->DrawDateViewer();
|
||||
timeLine->DrawTimeline();
|
||||
timeLine->DrawClock();
|
||||
channelGroups = new cChannelGroups();
|
||||
channelGroups->ReadChannelGroups();
|
||||
footer = new cFooter(channelGroups);
|
||||
@@ -195,7 +195,7 @@ void cTvGuideOsd::drawGridsChannelJump(int offset) {
|
||||
}
|
||||
}
|
||||
|
||||
void cTvGuideOsd::drawGridsTimeJump() {
|
||||
void cTvGuideOsd::drawGridsTimeJump(bool last) {
|
||||
if (columns.Count() == 0)
|
||||
return;
|
||||
cChannelEpg *colActive = NULL;
|
||||
@@ -209,7 +209,7 @@ void cTvGuideOsd::drawGridsTimeJump() {
|
||||
column->readGrids();
|
||||
column->drawGrids();
|
||||
}
|
||||
activeGrid = colActive->getActive();
|
||||
activeGrid = colActive->getActive(last);
|
||||
if (activeGrid) {
|
||||
activeGrid->SetActive();
|
||||
activeGrid->Draw();
|
||||
@@ -372,12 +372,19 @@ void cTvGuideOsd::timeForward() {
|
||||
|
||||
void cTvGuideOsd::ScrollForward() {
|
||||
timeManager->AddStep(config.stepMinutes);
|
||||
timeLine->drawDateViewer();
|
||||
timeLine->setTimeline();
|
||||
for (cChannelEpg *column = columns.First(); column; column = columns.Next(column)) {
|
||||
column->AddNewGridsAtEnd();
|
||||
column->ClearOutdatedStart();
|
||||
column->drawGrids();
|
||||
if (config.useHWAccel) {
|
||||
drawGridsTimeJump(true);
|
||||
timeLine->DrawDateViewer();
|
||||
timeLine->DrawClock();
|
||||
timeLine->DrawTimeline();
|
||||
} else {
|
||||
timeLine->DrawDateViewer();
|
||||
timeLine->DrawTimeline();
|
||||
for (cChannelEpg *column = columns.First(); column; column = columns.Next(column)) {
|
||||
column->AddNewGridsAtEnd();
|
||||
column->ClearOutdatedStart();
|
||||
column->drawGrids();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -403,15 +410,20 @@ void cTvGuideOsd::timeBack() {
|
||||
}
|
||||
|
||||
void cTvGuideOsd::ScrollBack() {
|
||||
bool tooFarInPast = timeManager->DelStep(config.stepMinutes);
|
||||
if (tooFarInPast)
|
||||
return;
|
||||
timeLine->drawDateViewer();
|
||||
timeLine->setTimeline();
|
||||
for (cChannelEpg *column = columns.First(); column; column = columns.Next(column)) {
|
||||
column->AddNewGridsAtStart();
|
||||
column->ClearOutdatedEnd();
|
||||
column->drawGrids();
|
||||
timeManager->DelStep(config.stepMinutes);
|
||||
if (config.useHWAccel) {
|
||||
drawGridsTimeJump();
|
||||
timeLine->DrawDateViewer();
|
||||
timeLine->DrawClock();
|
||||
timeLine->DrawTimeline();
|
||||
} else {
|
||||
timeLine->DrawDateViewer();
|
||||
timeLine->DrawTimeline();
|
||||
for (cChannelEpg *column = columns.First(); column; column = columns.Next(column)) {
|
||||
column->AddNewGridsAtStart();
|
||||
column->ClearOutdatedEnd();
|
||||
column->drawGrids();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -626,24 +638,20 @@ void cTvGuideOsd::processNumKey(int numKey) {
|
||||
void cTvGuideOsd::TimeJump(int mode) {
|
||||
switch (mode) {
|
||||
case 1: {
|
||||
bool tooFarInPast = timeManager->DelStep(config.bigStepHours*60);
|
||||
if (tooFarInPast)
|
||||
return;
|
||||
}
|
||||
timeManager->DelStep(((config.displayMode == eVertical) ? config.bigStepHours : config.bigStepHoursHorizontal) * 60);
|
||||
}
|
||||
break;
|
||||
case 3: {
|
||||
timeManager->AddStep(config.bigStepHours*60);
|
||||
}
|
||||
timeManager->AddStep(((config.displayMode == eVertical) ? config.bigStepHours : config.bigStepHoursHorizontal) * 60);
|
||||
}
|
||||
break;
|
||||
case 4: {
|
||||
bool tooFarInPast = timeManager->DelStep(config.hugeStepHours*60);
|
||||
if (tooFarInPast)
|
||||
return;
|
||||
}
|
||||
timeManager->DelStep(((config.displayMode == eVertical) ? config.hugeStepHours : config.hugeStepHoursHorizontal) * 60);
|
||||
}
|
||||
break;
|
||||
case 6: {
|
||||
timeManager->AddStep(config.hugeStepHours*60);
|
||||
}
|
||||
timeManager->AddStep(((config.displayMode == eVertical) ? config.hugeStepHours : config.hugeStepHoursHorizontal) * 60);
|
||||
}
|
||||
break;
|
||||
case 7: {
|
||||
cTimeManager primeChecker;
|
||||
@@ -652,21 +660,21 @@ void cTvGuideOsd::TimeJump(int mode) {
|
||||
if (primeChecker.tooFarInPast(prevPrime))
|
||||
return;
|
||||
timeManager->SetTime(prevPrime);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 9: {
|
||||
cTimeManager primeChecker;
|
||||
time_t nextPrime = primeChecker.getNextPrimetime(timeManager->GetStart());
|
||||
timeManager->SetTime(nextPrime);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
drawGridsTimeJump();
|
||||
timeLine->drawDateViewer();
|
||||
timeLine->drawClock();
|
||||
timeLine->setTimeline();
|
||||
timeLine->DrawDateViewer();
|
||||
timeLine->DrawClock();
|
||||
timeLine->DrawTimeline();
|
||||
osdManager.flush();
|
||||
}
|
||||
|
||||
@@ -769,15 +777,18 @@ eOSState cTvGuideOsd::ProcessKey(eKeys Key) {
|
||||
case kYellow: processKeyYellow(); break;
|
||||
case kBlue: state = processKeyBlue(&alreadyUnlocked); break;
|
||||
case kOk: state = processKeyOk(&alreadyUnlocked); break;
|
||||
case kBack: state=osEnd; break;
|
||||
case kBack: state = osEnd; break;
|
||||
case k0 ... k9: processNumKey(Key - k0); break;
|
||||
case kFastRew: TimeJump(1); break; // Doesnt work, if used from timeshiftmode
|
||||
case kFastFwd: TimeJump(3); break;
|
||||
case kPrev: TimeJump(4); break;
|
||||
case kNext: TimeJump(6); break;
|
||||
case kNone: if (channelJumper) CheckTimeout(); break;
|
||||
default: break;
|
||||
}
|
||||
if (timeLine->drawClock()) {
|
||||
timeLine->drawCurrentTimeBase();
|
||||
if (timeLine->DrawClock()) {
|
||||
osdManager.flush();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!alreadyUnlocked) {
|
||||
cPixmap::Unlock();
|
||||
|
@@ -31,7 +31,7 @@ private:
|
||||
void drawOsd();
|
||||
void readChannels(const cChannel *channelStart);
|
||||
void drawGridsChannelJump(int offset = 0);
|
||||
void drawGridsTimeJump();
|
||||
void drawGridsTimeJump(bool last = false);
|
||||
void processKeyUp();
|
||||
void processKeyDown();
|
||||
void processKeyLeft();
|
||||
|
4
view.c
4
view.c
@@ -116,7 +116,7 @@ void cView::DrawHeader(void) {
|
||||
int yDateTime = border / 2;
|
||||
int yTitle = (headerHeight - fontHeaderLarge->Height()) / 2;
|
||||
int ySubtitle = headerHeight - fontHeader->Height() - border / 3;
|
||||
int textWidthMax = headerWidth - xText;
|
||||
int textWidthMax = headerWidth - xText - border / 2;
|
||||
pixmapHeader->DrawText(cPoint(xText, yDateTime), CutText(dateTime, textWidthMax, fontHeader).c_str(), theme.Color(clrFont), theme.Color(clrStatusHeader), fontHeader);
|
||||
pixmapHeader->DrawText(cPoint(xText, yTitle), CutText(title, textWidthMax, fontHeaderLarge).c_str(), theme.Color(clrFont), theme.Color(clrStatusHeader), fontHeaderLarge);
|
||||
pixmapHeader->DrawText(cPoint(xText, ySubtitle), CutText(subTitle, textWidthMax, fontHeader).c_str(), theme.Color(clrFont), theme.Color(clrStatusHeader), fontHeader);
|
||||
@@ -522,7 +522,7 @@ cEPGView::cEPGView(void) : cView() {
|
||||
}
|
||||
|
||||
cEPGView::~cEPGView(void) {
|
||||
Cancel(-1);
|
||||
Cancel(2);
|
||||
while (Active())
|
||||
cCondWait::SleepMs(10);
|
||||
}
|
||||
|
Reference in New Issue
Block a user