Compare commits

..

No commits in common. "master" and "v1.2.6" have entirely different histories.

73 changed files with 9848 additions and 10968 deletions

120
HISTORY
View File

@ -181,123 +181,3 @@ Version 1.2.6
- Channelgroup in cRecMenuSearchTimerEdit - Channelgroup in cRecMenuSearchTimerEdit
(Create and modify of channelgroups isn't yet possible, should be done in epgsearch) (Create and modify of channelgroups isn't yet possible, should be done in epgsearch)
- Change channel icon size in cRecMenuSearchTimerEdit - Change channel icon size in cRecMenuSearchTimerEdit
Version 1.2.7
- Eliminate a "invalid lock sequence report" in tvguideosd.c
- Optical changes in favorites and searchtimer menu
- Changes in README
Version 1.2.8
- Some refactoring
- Update i18n
- Add almost all search timer options to cRecMenuSearchTimerEdit,
only one is missing: "Use content descriptor"
(Create and modify of channelgroups and blacklists isn't possible,
because the epgsearch service interface doesn't support that,
should be done in epgsearch)
Version 1.2.9
- Correct plugin options in README and CommandLineHelp
- Change locking in cTVGuideSearchTimer::cTVGuideSearchTimer
- Fixed a dayOfWeek error in RecMenuSearchTimerEdit
Version 1.2.10
- Update remotetimers.h
- Simplify cRecMenuSearchTimerEdit::GetSearchTimer
- Fixed cRecMenuItemSelectDirectory::DrawValue
- Some rework
Version 1.2.11
- Fixed a segfault with graphicsmagick > 1.3.31
- Fixed a possible deadlock in detailview
- Optical changes in cMenuSetupImageCache
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
Version 1.3.0
- last version with <VDR-2.3.1 compatibility
- Fixed a possible seqfault in DisplayTimerConflict
- Show numTimersToday in timeline
- Fixed stopIndex in cRecMenu::JumpBegin
- Fixed horizontal alignment in timeline
- Fixed messages in DisplayTimerConflict
Version 1.3.1
- Fixes for <VDR-2.3.1 compatibility
- Fixed a segfault while starting tvguide
Version 1.3.2
- Fixed display groupname in cChannelGroupGrid::DrawHorizontal
- Center some channel logos
- Add "Timer On/Off" to recmenu
- Wrap title in detailview header
- Optional deactivation of the timer confirmation messages
Version 1.3.3
- Bugfix
Version 1.3.4
- Fix for gcc11
Version 1.3.5
- Fix for VDR-2.5.4
- Update iceblue theme
Version 1.3.6
- Fix segfault when tvscraper returns "call->type = tNone"
- In menu "Search Recordins" get ChannelName from 'RecInfo'
- Display errors in search recordings
- Fixed possible segfault when showing scrollbar in search result lists
- Adapt epgsearch "allow empty" for searchtimer
- some rework
- optical optimization

View File

@ -60,7 +60,7 @@ endif
### The object files (add further files here): ### The object files (add further files here):
OBJS = $(PLUGIN).o channelepg.o channelgroup.o channelgroups.o channeljump.o config.o detailview.o dummygrid.o epggrid.o fontmanager.o footer.o geometrymanager.o gridelement.o headergrid.o imagecache.o imageloader.o imagemagickwrapper.o imagescaler.o osdmanager.o recmanager.o recmenu.o recmenuitem.o recmenuview.o recmenus.o searchtimer.o setup.o statusheader.o styledpixmap.o switchtimer.o timeline.o timemanager.o timerconflict.o tools.o tvguideosd.o view.o OBJS = $(PLUGIN).o channelcolumn.o channelgroup.o channelgroups.o channeljump.o config.o detailview.o dummygrid.o epggrid.o fontmanager.o footer.o geometrymanager.o grid.o headergrid.o imagecache.o imageloader.o imagemagickwrapper.o imagescaler.o osdmanager.o recmanager.o recmenu.o recmenuitem.o recmenumanager.o recmenus.o searchtimer.o setup.o statusheader.o styledpixmap.o switchtimer.o timeline.o timer.o timerconflict.o tools.o tvguideosd.o view.o
### The main target: ### The main target:

16
README
View File

@ -1,14 +1,10 @@
This is a "plugin" for the Video Disk Recorder (VDR). This is a "plugin" for the Video Disk Recorder (VDR).
TVGuide on GitLab: https://gitlab.com/kamel5/tvguide Written by: Louis Braun <louis DOT braun AT gmx DOT de>
Original Written by: Louis Braun <louis DOT braun AT gmx DOT de> Project's homepage: http://projects.vdr-developer.org/projects/plg-tvguide
Original Project's homepage: http://projects.vdr-developer.org/projects/plg-tvguide Latest version available at: http://projects.vdr-developer.org/projects/plg-tvguide/files
Latest version available at: https://gitlab.com/kamel5/tvguide
Original version available at: http://projects.vdr-developer.org/projects/plg-tvguide/files
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -44,13 +40,13 @@ After "normal" Plugin installation you have to care about the paths for the
used Icons, the channel logos and epg images. The following paths can be set used Icons, the channel logos and epg images. The following paths can be set
at startup: at startup:
-l path, --logopath=path -l path, --logodir=path
Path to the logos (Default: <ResourceDirectory>/plugins/tvguide/channellogos/). Path to the logos (Default: <ResourceDirectory>/plugins/tvguide/channellogos/).
-e path, --epgimages=path -e path, --epgimages=path
Path to the epgimages (Default: <CacheDirectory>/plugins/tvguide/epgimages/). Path to the epgimages (Default: <CacheDirectory>/plugins/tvguide/epgimages/).
-i path, --iconpath=path -i path, --icons=path
Path to the icons directory (Default: <ResourceDirectory>/plugins/tvguide/epgimages/). Path to the icons directory (Default: <ResourceDirectory>/plugins/tvguide/epgimages/).
<ResourceDirectory> and <CacheDirectory> is taken from your VDR configuration <ResourceDirectory> and <CacheDirectory> is taken from your VDR configuration
@ -278,4 +274,4 @@ Setup Options
- Maximal number of logos to cache - Maximal number of logos to cache
- Number of logos to cache at start: number of logos to pre cache at plugin startup - Number of logos to cache at start: number of logos to pre cache at plugin startup
(a too large number causes a slower VDR start) (a too large number causes a slower VDR start)
- Information about image cache sizes - Information about image cache sizes

View File

@ -1,10 +1,10 @@
#include "channelepg.h" #include "channelcolumn.h"
#include "dummygrid.h" #include "dummygrid.h"
cChannelEpg::cChannelEpg(int num, const cChannel *channel, cTimeManager *timeManager) { cChannelColumn::cChannelColumn(int num, const cChannel *channel, cMyTime *myTime) {
this->channel = channel; this->channel = channel;
this->num = num; this->num = num;
this->timeManager = timeManager; this->myTime = myTime;
#if VDRVERSNUM < 20301 #if VDRVERSNUM < 20301
hasTimer = channel->HasTimer(); hasTimer = channel->HasTimer();
#endif #endif
@ -15,7 +15,7 @@ cChannelEpg::cChannelEpg(int num, const cChannel *channel, cTimeManager *timeMan
header = NULL; header = NULL;
} }
cChannelEpg::~cChannelEpg(void) { cChannelColumn::~cChannelColumn(void) {
if (header) if (header)
delete header; delete header;
grids.Clear(); grids.Clear();
@ -24,21 +24,21 @@ cChannelEpg::~cChannelEpg(void) {
#endif #endif
} }
void cChannelEpg::clearGrids() { void cChannelColumn::clearGrids() {
grids.Clear(); grids.Clear();
} }
void cChannelEpg::createHeader() { void cChannelColumn::createHeader() {
header = new cHeaderGrid(); header = new cHeaderGrid();
header->createBackground(num); header->createBackground(num);
header->drawChannel(channel); header->drawChannel(channel);
} }
void cChannelEpg::drawHeader() { void cChannelColumn::drawHeader() {
header->setPosition(num); header->setPosition(num);
} }
bool cChannelEpg::readGrids() { bool cChannelColumn::readGrids() {
#if VDRVERSNUM >= 20301 #if VDRVERSNUM >= 20301
const cSchedules* schedules; const cSchedules* schedules;
{ {
@ -51,17 +51,17 @@ bool cChannelEpg::readGrids() {
const cSchedule *Schedule = NULL; const cSchedule *Schedule = NULL;
Schedule = schedules->GetSchedule(channel); Schedule = schedules->GetSchedule(channel);
if (!Schedule) { if (!Schedule) {
addDummyGrid(timeManager->GetStart(), timeManager->GetEnd(), NULL, false); addDummyGrid(myTime->GetStart(), myTime->GetEnd(), NULL, false);
return true; return true;
} }
bool eventFound = false; bool eventFound = false;
bool dummyAtStart = false; bool dummyAtStart = false;
const cEvent *startEvent = Schedule->GetEventAround(timeManager->GetStart()); const cEvent *startEvent = Schedule->GetEventAround(myTime->GetStart());
if (startEvent != NULL) { if (startEvent != NULL) {
eventFound = true; eventFound = true;
} else { } else {
for (int i=1; i<6; i++) { for (int i=1; i<6; i++) {
startEvent = Schedule->GetEventAround(timeManager->GetStart()+i*5*60); startEvent = Schedule->GetEventAround(myTime->GetStart()+i*5*60);
if (startEvent) { if (startEvent) {
eventFound = true; eventFound = true;
dummyAtStart = true; dummyAtStart = true;
@ -72,20 +72,20 @@ bool cChannelEpg::readGrids() {
if (eventFound) { if (eventFound) {
bool col = true; bool col = true;
if (dummyAtStart) { if (dummyAtStart) {
addDummyGrid(timeManager->GetStart(), startEvent->StartTime(), NULL, col); addDummyGrid(myTime->GetStart(), startEvent->StartTime(), NULL, col);
col = !col; col = !col;
} }
bool dummyNeeded = true; bool dummyNeeded = true;
bool toFarInFuture = false; bool toFarInFuture = false;
time_t endLast = timeManager->GetStart(); time_t endLast = myTime->GetStart();
const cEvent *event = startEvent; const cEvent *event = startEvent;
const cEvent *eventLast = NULL; const cEvent *eventLast = NULL;
for (; event; event = Schedule->Events()->Next(event)) { for (; event; event = Schedule->Events()->Next(event)) {
if (endLast < event->StartTime()) { if (endLast < event->StartTime()) {
//gap, dummy needed //gap, dummy needed
time_t endTime = event->StartTime(); time_t endTime = event->StartTime();
if (endTime > timeManager->GetEnd()) { if (endTime > myTime->GetEnd()) {
endTime = timeManager->GetEnd(); endTime = myTime->GetEnd();
toFarInFuture = true; toFarInFuture = true;
} }
addDummyGrid(endLast, endTime, NULL, col); addDummyGrid(endLast, endTime, NULL, col);
@ -97,76 +97,74 @@ bool cChannelEpg::readGrids() {
addEpgGrid(event, NULL, col); addEpgGrid(event, NULL, col);
col = !col; col = !col;
endLast = event->EndTime(); endLast = event->EndTime();
if (event->EndTime() > timeManager->GetEnd()) { if (event->EndTime() > myTime->GetEnd()) {
dummyNeeded = false; dummyNeeded = false;
break; break;
} }
eventLast = event; eventLast = event;
} }
if (dummyNeeded) { if (dummyNeeded) {
addDummyGrid(eventLast->EndTime(), timeManager->GetEnd(), NULL, col); addDummyGrid(eventLast->EndTime(), myTime->GetEnd(), NULL, col);
} }
return true; return true;
} else { } else {
addDummyGrid(timeManager->GetStart(), timeManager->GetEnd(), NULL, false); addDummyGrid(myTime->GetStart(), myTime->GetEnd(), NULL, false);
return true; return true;
} }
return false; return false;
} }
void cChannelEpg::drawGrids() { void cChannelColumn::drawGrids() {
for (cGridElement *grid = grids.First(); grid; grid = grids.Next(grid)) { for (cGrid *grid = grids.First(); grid; grid = grids.Next(grid)) {
grid->SetViewportHeight(); grid->SetViewportHeight();
grid->PositionPixmap(); grid->PositionPixmap();
grid->Draw(); grid->Draw();
} }
} }
int cChannelEpg::getX() { int cChannelColumn::getX() {
return geoManager.timeLineWidth + num*geoManager.colWidth; return geoManager.timeLineWidth + num*geoManager.colWidth;
} }
int cChannelEpg::getY() { int cChannelColumn::getY() {
return geoManager.statusHeaderHeight + geoManager.timeLineHeight + num*geoManager.rowHeight; return geoManager.statusHeaderHeight + geoManager.timeLineHeight + num*geoManager.rowHeight;
} }
cGridElement *cChannelEpg::getActive(bool last) { cGrid * cChannelColumn::getActive() {
cTimeManager t; cMyTime t;
t.Now(); t.Now();
if (last) for (cGrid *grid = grids.First(); grid; grid = grids.Next(grid)) {
return grids.Last();
for (cGridElement *grid = grids.First(); grid; grid = grids.Next(grid)) {
if (grid->Match(t.Get())) if (grid->Match(t.Get()))
return grid; return grid;
} }
return grids.First(); return grids.First();
} }
cGridElement *cChannelEpg::getNext(cGridElement *activeGrid) { cGrid * cChannelColumn::getNext(cGrid *activeGrid) {
if (activeGrid == NULL) if (activeGrid == NULL)
return NULL; return NULL;
cGridElement *next = grids.Next(activeGrid); cGrid *next = grids.Next(activeGrid);
if (next) if (next)
return next; return next;
return NULL; return NULL;
} }
cGridElement *cChannelEpg::getPrev(cGridElement *activeGrid) { cGrid * cChannelColumn::getPrev(cGrid *activeGrid) {
if (activeGrid == NULL) if (activeGrid == NULL)
return NULL; return NULL;
cGridElement *prev = grids.Prev(activeGrid); cGrid *prev = grids.Prev(activeGrid);
if (prev) if (prev)
return prev; return prev;
return NULL; return NULL;
} }
cGridElement *cChannelEpg::getNeighbor(cGridElement *activeGrid) { cGrid * cChannelColumn::getNeighbor(cGrid *activeGrid) {
if (!activeGrid) if (!activeGrid)
return NULL; return NULL;
cGridElement *neighbor = NULL; cGrid *neighbor = NULL;
int overlap = 0; int overlap = 0;
int overlapNew = 0; int overlapNew = 0;
cGridElement *grid = NULL; cGrid *grid = NULL;
grid = grids.First(); grid = grids.First();
if (grid) { if (grid) {
for (; grid; grid = grids.Next(grid)) { for (; grid; grid = grids.Next(grid)) {
@ -186,19 +184,19 @@ cGridElement *cChannelEpg::getNeighbor(cGridElement *activeGrid) {
return neighbor; return neighbor;
} }
bool cChannelEpg::isFirst(cGridElement *grid) { bool cChannelColumn::isFirst(cGrid *grid) {
if (grid == grids.First()) if (grid == grids.First())
return true; return true;
return false; return false;
} }
void cChannelEpg::AddNewGridsAtStart() { void cChannelColumn::AddNewGridsAtStart() {
cGridElement *firstGrid = NULL; cGrid *firstGrid = NULL;
firstGrid = grids.First(); firstGrid = grids.First();
if (firstGrid == NULL) if (firstGrid == NULL)
return; return;
//if first event is long enough, nothing to do. //if first event is long enough, nothing to do.
if (firstGrid->StartTime() <= timeManager->GetStart()) { if (firstGrid->StartTime() <= myTime->GetStart()) {
return; return;
} }
//if not, i have to add new ones to the list //if not, i have to add new ones to the list
@ -214,9 +212,9 @@ void cChannelEpg::AddNewGridsAtStart() {
const cSchedule *Schedule = NULL; const cSchedule *Schedule = NULL;
Schedule = schedules->GetSchedule(channel); Schedule = schedules->GetSchedule(channel);
if (!Schedule) { if (!Schedule) {
if (firstGrid->IsDummy()) { if (firstGrid->isDummy()) {
firstGrid->SetStartTime(timeManager->GetStart()); firstGrid->SetStartTime(myTime->GetStart());
firstGrid->SetEndTime(timeManager->GetEnd()); firstGrid->SetEndTime(myTime->GetEnd());
} }
return; return;
} }
@ -225,36 +223,36 @@ void cChannelEpg::AddNewGridsAtStart() {
for (const cEvent *event = Schedule->GetEventAround(firstGrid->StartTime()-60); event; event = Schedule->Events()->Prev(event)) { for (const cEvent *event = Schedule->GetEventAround(firstGrid->StartTime()-60); event; event = Schedule->Events()->Prev(event)) {
if (!event) if (!event)
break; break;
if (event->EndTime() < timeManager->GetStart()) { if (event->EndTime() < myTime->GetStart()) {
break; break;
} }
cGridElement *grid = addEpgGrid(event, firstGrid, col); cGrid *grid = addEpgGrid(event, firstGrid, col);
col = !col; col = !col;
firstGrid = grid; firstGrid = grid;
if (event->StartTime() <= timeManager->GetStart()) { if (event->StartTime() <= myTime->GetStart()) {
dummyNeeded = false; dummyNeeded = false;
break; break;
} }
} }
if (dummyNeeded) { if (dummyNeeded) {
firstGrid = grids.First(); firstGrid = grids.First();
if (firstGrid->IsDummy()) { if (firstGrid->isDummy()) {
firstGrid->SetStartTime(timeManager->GetStart()); firstGrid->SetStartTime(myTime->GetStart());
if (firstGrid->EndTime() >= timeManager->GetEnd()) if (firstGrid->EndTime() >= myTime->GetEnd())
firstGrid->SetEndTime(timeManager->GetEnd()); firstGrid->SetEndTime(myTime->GetEnd());
} else { } else {
addDummyGrid(timeManager->GetStart(), firstGrid->StartTime(), firstGrid, col); addDummyGrid(myTime->GetStart(), firstGrid->StartTime(), firstGrid, col);
} }
} }
} }
void cChannelEpg::AddNewGridsAtEnd() { void cChannelColumn::AddNewGridsAtEnd() {
cGridElement *lastGrid = NULL; cGrid *lastGrid = NULL;
lastGrid = grids.Last(); lastGrid = grids.Last();
if (lastGrid == NULL) if (lastGrid == NULL)
return; return;
//if last event is long enough, nothing to do. //if last event is long enough, nothing to do.
if (lastGrid->EndTime() >= timeManager->GetEnd()) { if (lastGrid->EndTime() >= myTime->GetEnd()) {
return; return;
} }
//if not, i have to add new ones to the list //if not, i have to add new ones to the list
@ -270,9 +268,9 @@ void cChannelEpg::AddNewGridsAtEnd() {
const cSchedule *Schedule = NULL; const cSchedule *Schedule = NULL;
Schedule = schedules->GetSchedule(channel); Schedule = schedules->GetSchedule(channel);
if (!Schedule) { if (!Schedule) {
if (lastGrid->IsDummy()) { if (lastGrid->isDummy()) {
lastGrid->SetStartTime(timeManager->GetStart()); lastGrid->SetStartTime(myTime->GetStart());
lastGrid->SetEndTime(timeManager->GetEnd()); lastGrid->SetEndTime(myTime->GetEnd());
} }
return; return;
} }
@ -281,45 +279,45 @@ void cChannelEpg::AddNewGridsAtEnd() {
for (const cEvent *event = Schedule->GetEventAround(lastGrid->EndTime()+60); event; event = Schedule->Events()->Next(event)) { for (const cEvent *event = Schedule->GetEventAround(lastGrid->EndTime()+60); event; event = Schedule->Events()->Next(event)) {
if (!event) if (!event)
break; break;
if (event->StartTime() > timeManager->GetEnd()) { if (event->StartTime() > myTime->GetEnd()) {
break; break;
} }
addEpgGrid(event, NULL, col); addEpgGrid(event, NULL, col);
col = !col; col = !col;
if (event->EndTime() > timeManager->GetEnd()) { if (event->EndTime() > myTime->GetEnd()) {
dummyNeeded = false; dummyNeeded = false;
break; break;
} }
} }
if (dummyNeeded) { if (dummyNeeded) {
lastGrid = grids.Last(); lastGrid = grids.Last();
if (lastGrid->IsDummy()) { if (lastGrid->isDummy()) {
lastGrid->SetEndTime(timeManager->GetEnd()); lastGrid->SetEndTime(myTime->GetEnd());
if (lastGrid->StartTime() <= timeManager->GetStart()) if (lastGrid->StartTime() <= myTime->GetStart())
lastGrid->SetStartTime(timeManager->GetStart()); lastGrid->SetStartTime(myTime->GetStart());
} else { } else {
addDummyGrid(lastGrid->EndTime(), timeManager->GetEnd(), NULL, col); addDummyGrid(lastGrid->EndTime(), myTime->GetEnd(), NULL, col);
} }
} }
} }
void cChannelEpg::ClearOutdatedStart() { void cChannelColumn::ClearOutdatedStart() {
cGridElement *firstGrid = NULL; cGrid *firstGrid = NULL;
while (true) { while (true) {
firstGrid = grids.First(); firstGrid = grids.First();
if (!firstGrid) if (!firstGrid)
break; break;
if (firstGrid->EndTime() <= timeManager->GetStart()) { if (firstGrid->EndTime() <= myTime->GetStart()) {
grids.Del(firstGrid); grids.Del(firstGrid);
firstGrid = NULL; firstGrid = NULL;
} else { } else {
if (firstGrid->IsDummy()) { if (firstGrid->isDummy()) {
firstGrid->SetStartTime(timeManager->GetStart()); firstGrid->SetStartTime(myTime->GetStart());
cGridElement *next = getNext(firstGrid); cGrid *next = getNext(firstGrid);
if (next) { if (next) {
firstGrid->SetEndTime(next->StartTime()); firstGrid->SetEndTime(next->StartTime());
} else { } else {
firstGrid->SetEndTime(timeManager->GetEnd()); firstGrid->SetEndTime(myTime->GetEnd());
} }
} }
break; break;
@ -327,23 +325,23 @@ void cChannelEpg::ClearOutdatedStart() {
} }
} }
void cChannelEpg::ClearOutdatedEnd() { void cChannelColumn::ClearOutdatedEnd() {
cGridElement *lastGrid = NULL; cGrid *lastGrid = NULL;
while (true) { while (true) {
lastGrid = grids.Last(); lastGrid = grids.Last();
if (!lastGrid) if (!lastGrid)
break; break;
if (lastGrid->StartTime() >= timeManager->GetEnd()) { if (lastGrid->StartTime() >= myTime->GetEnd()) {
grids.Del(lastGrid); grids.Del(lastGrid);
lastGrid = NULL; lastGrid = NULL;
} else { } else {
if (lastGrid->IsDummy()) { if (lastGrid->isDummy()) {
lastGrid->SetEndTime(timeManager->GetEnd()); lastGrid->SetEndTime(myTime->GetEnd());
cGridElement *prev = getPrev(lastGrid); cGrid *prev = getPrev(lastGrid);
if (prev) { if (prev) {
lastGrid->SetStartTime(prev->EndTime()); lastGrid->SetStartTime(prev->EndTime());
} else { } else {
lastGrid->SetStartTime(timeManager->GetStart()); lastGrid->SetStartTime(myTime->GetStart());
} }
} }
break; break;
@ -351,8 +349,8 @@ void cChannelEpg::ClearOutdatedEnd() {
} }
} }
cGridElement *cChannelEpg::addEpgGrid(const cEvent *event, cGridElement *firstGrid, bool color) { cGrid *cChannelColumn::addEpgGrid(const cEvent *event, cGrid *firstGrid, bool color) {
cGridElement *grid = new cEpgGrid(this, event); cGrid *grid = new cEpgGrid(this, event);
grid->setText(); grid->setText();
grid->SetColor(color); grid->SetColor(color);
if (!firstGrid) if (!firstGrid)
@ -362,8 +360,8 @@ cGridElement *cChannelEpg::addEpgGrid(const cEvent *event, cGridElement *firstGr
return grid; return grid;
} }
cGridElement *cChannelEpg::addDummyGrid(time_t start, time_t end, cGridElement *firstGrid, bool color) { cGrid *cChannelColumn::addDummyGrid(time_t start, time_t end, cGrid *firstGrid, bool color) {
cGridElement *dummy = new cDummyGrid(this, start, end); cGrid *dummy = new cDummyGrid(this, start, end);
dummy->setText(); dummy->setText();
dummy->SetColor(color); dummy->SetColor(color);
if (!firstGrid) if (!firstGrid)
@ -373,12 +371,12 @@ cGridElement *cChannelEpg::addDummyGrid(time_t start, time_t end, cGridElement *
return dummy; return dummy;
} }
void cChannelEpg::SetTimers() { void cChannelColumn::SetTimers() {
#if VDRVERSNUM < 20301 #if VDRVERSNUM < 20301
hasTimer = channel->HasTimer(); hasTimer = channel->HasTimer();
#endif #endif
hasSwitchTimer = SwitchTimers.ChannelInSwitchList(channel); hasSwitchTimer = SwitchTimers.ChannelInSwitchList(channel);
for (cGridElement *grid = grids.First(); grid; grid = grids.Next(grid)) { for (cGrid *grid = grids.First(); grid; grid = grids.Next(grid)) {
bool gridHadTimer = grid->HasTimer(); bool gridHadTimer = grid->HasTimer();
grid->SetTimer(); grid->SetTimer();
if (gridHadTimer || gridHadTimer != grid->HasTimer()) if (gridHadTimer || gridHadTimer != grid->HasTimer())
@ -391,11 +389,11 @@ void cChannelEpg::SetTimers() {
} }
} }
void cChannelEpg::dumpGrids() { void cChannelColumn::dumpGrids() {
esyslog("tvguide: ------Channel %s %d: %d entires ---------", channel->Name(), num, grids.Count()); esyslog("tvguide: ------Channel %s %d: %d entires ---------", channel->Name(), num, grids.Count());
int i=1; int i=1;
for (cGridElement *grid = grids.First(); grid; grid = grids.Next(grid)) { for (cGrid *grid = grids.First(); grid; grid = grids.Next(grid)) {
esyslog("tvguide: grid %d: start: %s, stop: %s", i, *cTimeManager::printTime(grid->StartTime()), *cTimeManager::printTime(grid->EndTime())); esyslog("tvguide: grid %d: start: %s, stop: %s", i, *cMyTime::printTime(grid->StartTime()), *cMyTime::printTime(grid->EndTime()));
i++; i++;
} }
} }

View File

@ -1,25 +1,25 @@
#ifndef __TVGUIDE_CHANNELEPG_H #ifndef __TVGUIDE_CHANNELCOLUMN_H
#define __TVGUIDE_CHANNELEPG_H #define __TVGUIDE_CHANNELCOLUMN_H
#include <vdr/tools.h> #include <vdr/tools.h>
#include "gridelement.h" #include "grid.h"
#include "epggrid.h" #include "epggrid.h"
#include "headergrid.h" #include "headergrid.h"
#include "switchtimer.h" #include "switchtimer.h"
class cGridElement; class cGrid;
class cEpgGrid; class cEpgGrid;
class cHeaderGrid; class cHeaderGrid;
// --- cChannelEpg ------------------------------------------------------------- // --- cChannelColumn -------------------------------------------------------------
class cChannelEpg : public cListObject, public cStyledPixmap { class cChannelColumn : public cListObject, public cStyledPixmap {
private: private:
cTimeManager *timeManager; cMyTime *myTime;
int num; int num;
const cChannel *channel; const cChannel *channel;
cHeaderGrid *header; cHeaderGrid *header;
cList<cGridElement> grids; cList<cGrid> grids;
#if VDRVERSNUM >= 20301 #if VDRVERSNUM >= 20301
#else #else
cSchedulesLock *schedulesLock; cSchedulesLock *schedulesLock;
@ -27,26 +27,26 @@ private:
const cSchedules *schedules; const cSchedules *schedules;
bool hasTimer; bool hasTimer;
bool hasSwitchTimer; bool hasSwitchTimer;
cGridElement *addEpgGrid(const cEvent *event, cGridElement *firstGrid, bool color); cGrid *addEpgGrid(const cEvent *event, cGrid *firstGrid, bool color);
cGridElement *addDummyGrid(time_t start, time_t end, cGridElement *firstGrid, bool color); cGrid *addDummyGrid(time_t start, time_t end, cGrid *firstGrid, bool color);
public: public:
cChannelEpg(int num, const cChannel *channel, cTimeManager *timeManager); cChannelColumn(int num, const cChannel *channel, cMyTime *myTime);
virtual ~cChannelEpg(void); virtual ~cChannelColumn(void);
void createHeader(); void createHeader();
void drawHeader(); void drawHeader();
bool readGrids(); bool readGrids();
void drawGrids(); void drawGrids();
int getX(); int getX();
int getY(); int getY();
int Start() { return timeManager->GetStart(); }; int Start() { return myTime->GetStart(); };
int Stop() { return timeManager->GetEnd(); }; int Stop() { return myTime->GetEnd(); };
const char* Name() { return channel->Name(); }; const char* Name() { return channel->Name(); };
const cChannel *getChannel() {return channel;} const cChannel * getChannel() {return channel;}
cGridElement *getActive(bool last = false); cGrid * getActive();
cGridElement *getNext(cGridElement *activeGrid); cGrid * getNext(cGrid *activeGrid);
cGridElement *getPrev(cGridElement *activeGrid); cGrid * getPrev(cGrid *activeGrid);
cGridElement *getNeighbor(cGridElement *activeGrid); cGrid * getNeighbor(cGrid *activeGrid);
bool isFirst(cGridElement *grid); bool isFirst(cGrid *grid);
void AddNewGridsAtStart(); void AddNewGridsAtStart();
void AddNewGridsAtEnd(); void AddNewGridsAtEnd();
void ClearOutdatedStart(); void ClearOutdatedStart();
@ -66,4 +66,4 @@ public:
void dumpGrids(); void dumpGrids();
}; };
#endif //__TVGUIDE_CHANNELEPG_H #endif //__TVGUIDE_CHANNELCOLUMN_H

View File

@ -1,97 +1,98 @@
#include <algorithm> #include <algorithm>
#include "channelgroup.h" #include "channelgroup.h"
#include "tools.h" #include "tools.h"
cChannelGroup::cChannelGroup(const char *name) { cChannelGroup::cChannelGroup(const char *name) {
channelStart = 0; channelStart = 0;
channelStop = 0; channelStop = 0;
this->name = name; this->name = name;
} }
cChannelGroup::~cChannelGroup(void) { cChannelGroup::~cChannelGroup(void) {
} }
void cChannelGroup::Dump(void) { void cChannelGroup::Dump(void) {
esyslog("tvguide: Group %s, startChannel %d, stopChannel %d", name, channelStart, channelStop); esyslog("tvguide: Group %s, startChannel %d, stopChannel %d", name, channelStart, channelStop);
} }
// --- cChannelGroupGrid ------------------------------------------------------------- // --- cChannelGroupGrid -------------------------------------------------------------
cChannelGroupGrid::cChannelGroupGrid(const char *name) { cChannelGroupGrid::cChannelGroupGrid(const char *name) {
this->name = name; this->name = name;
} }
cChannelGroupGrid::~cChannelGroupGrid(void) { cChannelGroupGrid::~cChannelGroupGrid(void) {
} }
void cChannelGroupGrid::SetBackground() { void cChannelGroupGrid::SetBackground() {
if (isColor1) { if (isColor1) {
color = theme.Color(clrGrid1); color = theme.Color(clrGrid1);
colorBlending = theme.Color(clrGrid1Blending); colorBlending = theme.Color(clrGrid1Blending);
} else { } else {
color = theme.Color(clrGrid2); color = theme.Color(clrGrid2);
colorBlending = theme.Color(clrGrid2Blending); colorBlending = theme.Color(clrGrid2Blending);
} }
} }
void cChannelGroupGrid::SetGeometry(int start, int end) { void cChannelGroupGrid::SetGeometry(int start, int end) {
int x, y, width, height; int x, y, width, height;
if (config.displayMode == eVertical) { if (tvguideConfig.displayMode == eVertical) {
x = geoManager.timeLineWidth + start*geoManager.colWidth; x = geoManager.timeLineWidth + start*geoManager.colWidth;
y = geoManager.statusHeaderHeight; y = geoManager.statusHeaderHeight;
width = (end - start + 1) * geoManager.colWidth; width = (end - start + 1) * geoManager.colWidth;
height = geoManager.channelGroupsHeight; height = geoManager.channelGroupsHeight;
} else if (config.displayMode == eHorizontal) { } else if (tvguideConfig.displayMode == eHorizontal) {
x = 0; x = 0;
y = geoManager.statusHeaderHeight + geoManager.timeLineHeight + start*geoManager.rowHeight; y = geoManager.statusHeaderHeight + geoManager.timeLineHeight + start*geoManager.rowHeight;
width = geoManager.channelGroupsWidth; width = geoManager.channelGroupsWidth;
height = (end - start + 1) * geoManager.rowHeight; height = (end - start + 1) * geoManager.rowHeight;
} }
pixmap = osdManager.CreatePixmap(1, cRect(x, y, width, height)); pixmap = osdManager.requestPixmap(1, cRect(x, y, width, height));
} }
void cChannelGroupGrid::Draw(void) { void cChannelGroupGrid::Draw(void) {
if (config.style == eStyleGraphical) { if (tvguideConfig.style == eStyleGraphical) {
drawBackgroundGraphical(bgChannelGroup); drawBackgroundGraphical(bgChannelGroup);
} else { } else {
drawBackground(); drawBackground();
drawBorder(); drawBorder();
} }
tColor colorText = theme.Color(clrFont); tColor colorText = theme.Color(clrFont);
tColor colorTextBack = (config.style == eStyleFlat)?color:clrTransparent; tColor colorTextBack = (tvguideConfig.style == eStyleFlat)?color:clrTransparent;
if (config.displayMode == eVertical) { if (tvguideConfig.displayMode == eVertical) {
DrawVertical(colorText, colorTextBack); DrawVertical(colorText, colorTextBack);
} else if (config.displayMode == eHorizontal) { } else if (tvguideConfig.displayMode == eHorizontal) {
DrawHorizontal(colorText, colorTextBack); DrawHorizontal(colorText, colorTextBack);
} }
} }
void cChannelGroupGrid::DrawVertical(tColor colorText, tColor colorTextBack) { void cChannelGroupGrid::DrawVertical(tColor colorText, tColor colorTextBack) {
int textY = (Height() - fontManager.FontChannelGroups->Height()) / 2; int textY = (Height() - fontManager.FontChannelGroups->Height()) / 2;
cString text = cString::sprintf("%s", CutText(name, Width() - 4, fontManager.FontChannelGroups).c_str()); cString text = CutText(name, Width() - 4, fontManager.FontChannelGroups).c_str();
int textWidth = fontManager.FontChannelGroups->Width(*text); int textWidth = fontManager.FontChannelGroups->Width(*text);
int x = (Width() - textWidth) / 2; int x = (Width() - textWidth) / 2;
pixmap->DrawText(cPoint(x, textY), *text, colorText, colorTextBack, fontManager.FontChannelGroups); pixmap->DrawText(cPoint(x, textY), *text, colorText, colorTextBack, fontManager.FontChannelGroups);
} }
void cChannelGroupGrid::DrawHorizontal(tColor colorText, tColor colorTextBack) { void cChannelGroupGrid::DrawHorizontal(tColor colorText, tColor colorTextBack) {
std::string groupName = name; std::string nameUpper = name;
int numChars = groupName.length(); std::transform(nameUpper.begin(), nameUpper.end(),nameUpper.begin(), ::toupper);
int charHeight = fontManager.FontChannelGroupsHorizontal->Height(); int numChars = nameUpper.length();
int textHeight = numChars * charHeight; int charHeight = fontManager.FontChannelGroupsHorizontal->Height();
int y = 5; int textHeight = numChars * charHeight;
if ((textHeight + 5) < Height()) { int y = 5;
y = (Height() - textHeight) / 2; if ((textHeight +5) < Height()) {
} y = (Height() - textHeight) / 2;
for (int i = 0; i < numChars; i++) { }
if (((y + 2 * charHeight) > Height()) && ((i + 1) < numChars)) { for (int i=0; i < numChars; i++) {
int x = (Width() - fontManager.FontChannelGroupsHorizontal->Width("...")) / 2; if (((y + 2*charHeight) > Height()) && ((i+1)<numChars)) {
pixmap->DrawText(cPoint(x, y), "...", colorText, colorTextBack, fontManager.FontChannelGroupsHorizontal); int x = (Width() - fontManager.FontChannelGroupsHorizontal->Width("...")) / 2;
break; pixmap->DrawText(cPoint(x, y), "...", colorText, colorTextBack, fontManager.FontChannelGroupsHorizontal);
} break;
cString currentChar = cString::sprintf("%s", utf8_substr(groupName.c_str(), i, 1).c_str()); }
int x = (Width() - fontManager.FontChannelGroupsHorizontal->Width(*currentChar)) / 2; cString currentChar = cString::sprintf("%c", nameUpper.at(i));
pixmap->DrawText(cPoint(x, y), *currentChar, colorText, colorTextBack, fontManager.FontChannelGroupsHorizontal); int x = (Width() - fontManager.FontChannelGroupsHorizontal->Width(*currentChar)) / 2;
y += fontManager.FontChannelGroupsHorizontal->Height(); pixmap->DrawText(cPoint(x, y), *currentChar, colorText, colorTextBack, fontManager.FontChannelGroupsHorizontal);
} y += fontManager.FontChannelGroupsHorizontal->Height();
} }
}

View File

@ -1,44 +1,44 @@
#ifndef __TVGUIDE_CHANNELGROUP_H #ifndef __TVGUIDE_CHANNELGROUP_H
#define __TVGUIDE_CHANNELGROUP_H #define __TVGUIDE_CHANNELGROUP_H
#include <vdr/tools.h> #include <vdr/tools.h>
#include "styledpixmap.h" #include "styledpixmap.h"
// --- cChannelGroup ------------------------------------------------------------- // --- cChannelGroup -------------------------------------------------------------
class cChannelGroup { class cChannelGroup {
private: private:
int channelStart; int channelStart;
int channelStop; int channelStop;
const char *name; const char *name;
public: public:
cChannelGroup(const char *name); cChannelGroup(const char *name);
virtual ~cChannelGroup(void); virtual ~cChannelGroup(void);
void SetChannelStart(int start) { channelStart = start; }; void SetChannelStart(int start) { channelStart = start; };
int StartChannel(void) { return channelStart; }; int StartChannel(void) { return channelStart; };
void SetChannelStop(int stop) { channelStop = stop; }; void SetChannelStop(int stop) { channelStop = stop; };
int StopChannel(void) { return channelStop; }; int StopChannel(void) { return channelStop; };
const char* GetName(void) { return name; }; const char* GetName(void) { return name; };
void Dump(void); void Dump(void);
}; };
// --- cChannelGroupGrid ------------------------------------------------------------- // --- cChannelGroupGrid -------------------------------------------------------------
class cChannelGroupGrid : public cListObject, public cStyledPixmap { class cChannelGroupGrid : public cListObject, public cStyledPixmap {
private: private:
const char *name; const char *name;
bool isColor1; bool isColor1;
void DrawHorizontal(tColor colorText, tColor colorTextBack); void DrawHorizontal(tColor colorText, tColor colorTextBack);
void DrawVertical(tColor colorText, tColor colorTextBack); void DrawVertical(tColor colorText, tColor colorTextBack);
public: public:
cChannelGroupGrid(const char *name); cChannelGroupGrid(const char *name);
virtual ~cChannelGroupGrid(void); virtual ~cChannelGroupGrid(void);
void SetColor(bool color) {isColor1 = color;}; void SetColor(bool color) {isColor1 = color;};
void SetBackground(void); void SetBackground(void);
void SetGeometry(int start, int end); void SetGeometry(int start, int end);
void Draw(void); void Draw(void);
}; };
#endif //__TVGUIDE_CHANNELGROUP_H #endif //__TVGUIDE_CHANNELGROUP_H

View File

@ -1,5 +1,4 @@
#include <vector> #include <vector>
#include "config.h"
#include "channelgroups.h" #include "channelgroups.h"
cChannelGroups::cChannelGroups(void) { cChannelGroups::cChannelGroups(void) {
@ -13,23 +12,26 @@ void cChannelGroups::ReadChannelGroups(void) {
int lastChannelNumber = 0; int lastChannelNumber = 0;
#if VDRVERSNUM >= 20301 #if VDRVERSNUM >= 20301
LOCK_CHANNELS_READ; LOCK_CHANNELS_READ;
const cChannels *channels = Channels; const cChannel *first = Channels->First();
#else #else
const cChannels *channels = &Channels; const cChannel *first = Channels.First();
#endif #endif
const cChannel *first = channels->First();
if (!first->GroupSep()) { if (!first->GroupSep()) {
channelGroups.push_back(cChannelGroup(tr("Main Program"))); channelGroups.push_back(cChannelGroup(tr("Main Program")));
setStart = true; setStart = true;
} }
for (const cChannel *channel = channels->First(); channel; channel = channels->Next(channel)) { #if VDRVERSNUM >= 20301
for (const cChannel *channel = Channels->First(); channel; channel = Channels->Next(channel)) {
#else
for (const cChannel *channel = Channels.First(); channel; channel = Channels.Next(channel)) {
#endif
if (setStart && (channelGroups.size() > 0)) { if (setStart && (channelGroups.size() > 0)) {
channelGroups[channelGroups.size() - 1].SetChannelStart(channel->Number()); channelGroups[channelGroups.size()-1].SetChannelStart(channel->Number());
setStart = false; setStart = false;
} }
if (channel->GroupSep()) { if (channel->GroupSep()) {
if (channelGroups.size() > 0) { if (channelGroups.size() > 0) {
channelGroups[channelGroups.size() - 1].SetChannelStop(lastChannelNumber); channelGroups[channelGroups.size()-1].SetChannelStop(lastChannelNumber);
} }
channelGroups.push_back(cChannelGroup(channel->Name())); channelGroups.push_back(cChannelGroup(channel->Name()));
setStart = true; setStart = true;
@ -38,8 +40,8 @@ void cChannelGroups::ReadChannelGroups(void) {
} }
} }
if (channelGroups.size() > 0) { if (channelGroups.size() > 0) {
channelGroups[channelGroups.size() - 1].SetChannelStop(lastChannelNumber); channelGroups[channelGroups.size()-1].SetChannelStop(lastChannelNumber);
if ((config.hideLastGroup) && (channelGroups.size() > 1)) { if ((tvguideConfig.hideLastGroup)&&(channelGroups.size() > 1)) {
channelGroups.pop_back(); channelGroups.pop_back();
} }
} }
@ -94,7 +96,7 @@ int cChannelGroups::GetNextGroupChannelNumber(const cChannel *channel) {
} }
bool cChannelGroups::IsInLastGroup(const cChannel *channel) { bool cChannelGroups::IsInLastGroup(const cChannel *channel) {
if (!config.hideLastGroup) if (!tvguideConfig.hideLastGroup)
return false; return false;
if (channelGroups.size() > 0) { if (channelGroups.size() > 0) {
if (channel->Number() > channelGroups[channelGroups.size()-1].StopChannel()) { if (channel->Number() > channelGroups[channelGroups.size()-1].StopChannel()) {
@ -143,15 +145,9 @@ void cChannelGroups::CreateGroupGrid(const char *name, int number, int start, in
} }
int cChannelGroups::GetLastValidChannel(void) { int cChannelGroups::GetLastValidChannel(void) {
if (config.hideLastGroup && channelGroups.size() > 0) { if (channelGroups.size() > 0)
return channelGroups[channelGroups.size() - 1].StopChannel(); return channelGroups[channelGroups.size()-1].StopChannel();
} return 0;
#if VDRVERSNUM >= 20301
LOCK_CHANNELS_READ;
return Channels->MaxNumber();
#else
return Channels.MaxNumber();
#endif
} }
void cChannelGroups::DumpGroups(void) { void cChannelGroups::DumpGroups(void) {

View File

@ -3,7 +3,6 @@
#include <vector> #include <vector>
#include <vdr/channels.h> #include <vdr/channels.h>
#include "config.h"
#include "channelgroup.h" #include "channelgroup.h"
// --- cChannelGroups ------------------------------------------------------------- // --- cChannelGroups -------------------------------------------------------------

View File

@ -1,86 +1,95 @@
#include <vdr/channels.h> #include <vdr/channels.h>
#include "config.h" #include "config.h"
#include "geometrymanager.h" #include "geometrymanager.h"
#include "osdmanager.h" #include "osdmanager.h"
#include "fontmanager.h" #include "fontmanager.h"
#include "channelgroups.h" #include "channelgroups.h"
#include "channeljump.h" #include "channeljump.h"
cChannelJump::cChannelJump(cChannelGroups *channelGroups, int lastValidChannel) { cChannelJump::cChannelJump(cChannelGroups *channelGroups) {
this->channelGroups = channelGroups; this->channelGroups = channelGroups;
pixmapText = NULL; pixmapText = NULL;
channel = 0; channel = 0;
maxChannels = lastValidChannel; if (!tvguideConfig.hideLastGroup) {
timeout = Setup.ChannelEntryTimeout; #if VDRVERSNUM >= 20301
startTime = 0; LOCK_CHANNELS_READ;
SetPixmaps(); maxChannels = Channels->MaxNumber();
Draw(); #else
} maxChannels = Channels.MaxNumber();
#endif
cChannelJump::~cChannelJump(void) { } else {
osdManager.DestroyPixmap(pixmapBack); maxChannels = channelGroups->GetLastValidChannel();
osdManager.DestroyPixmap(pixmapText); }
} timeout = Setup.ChannelEntryTimeout;
startTime = cTimeMs::Now();
void cChannelJump::SetPixmaps(void) { SetPixmaps();
int x = (geoManager.osdWidth - geoManager.channelJumpWidth)/2; Draw();
int y = (geoManager.osdHeight - geoManager.channelJumpHeight)/2; }
pixmapBack = osdManager.CreatePixmap(4, cRect(x, y, geoManager.channelJumpWidth, geoManager.channelJumpHeight)); cChannelJump::~cChannelJump(void) {
pixmap = osdManager.CreatePixmap(5, cRect(x, y, geoManager.channelJumpWidth, geoManager.channelJumpHeight)); osdManager.releasePixmap(pixmapBack);
pixmapText = osdManager.CreatePixmap(6, cRect(x, y, geoManager.channelJumpWidth, geoManager.channelJumpHeight)); osdManager.releasePixmap(pixmapText);
} }
void cChannelJump::Draw(void) { void cChannelJump::SetPixmaps(void) {
if (config.style == eStyleGraphical) { int x = (geoManager.osdWidth - geoManager.channelJumpWidth)/2;
drawBackgroundGraphical(bgChannelJump); int y = (geoManager.osdHeight - geoManager.channelJumpHeight)/2;
} else {
pixmap->Fill(theme.Color(clrBackground)); pixmapBack = osdManager.requestPixmap(4, cRect(x, y, geoManager.channelJumpWidth, geoManager.channelJumpHeight));
drawBorder(); pixmap = osdManager.requestPixmap(5, cRect(x, y, geoManager.channelJumpWidth, geoManager.channelJumpHeight));
} pixmapText = osdManager.requestPixmap(6, cRect(x, y, geoManager.channelJumpWidth, geoManager.channelJumpHeight));
pixmapBack->Fill(clrTransparent); }
pixmapBack->DrawRectangle(cRect(5, Height()/2, Width()-10, Height()-3), theme.Color(clrBackground));
} void cChannelJump::Draw(void) {
if (tvguideConfig.style == eStyleGraphical) {
void cChannelJump::DrawText(void) { drawBackgroundGraphical(bgChannelJump);
pixmapText->Fill(clrTransparent); } else {
pixmap->Fill(theme.Color(clrBackground));
cString header = cString::sprintf("%s:", tr("Channel")); drawBorder();
}
const cFont *font = fontManager.FontMessageBox; pixmapBack->Fill(clrTransparent);
const cFont *fontHeader = fontManager.FontMessageBoxLarge; pixmapBack->DrawRectangle(cRect(5, Height()/2, Width()-10, Height()-3), theme.Color(clrBackground));
}
int xHeader = (Width() - fontHeader->Width(*header)) / 2;
int yHeader = (Height()/2 - fontHeader->Height()) / 2; void cChannelJump::DrawText(void) {
pixmapText->DrawText(cPoint(xHeader, yHeader), *header, theme.Color(clrFont), clrTransparent, fontHeader); pixmapText->Fill(clrTransparent);
cString strChannel = BuildChannelString(); cString header = cString::sprintf("%s:", tr("Channel"));
int xChannel = (Width() - font->Width(*strChannel)) / 2;
int yChannel = Height()/2 + (Height()/2 - font->Height()) / 2; const cFont *font = fontManager.FontMessageBox;
pixmapText->DrawText(cPoint(xChannel, yChannel), *strChannel, theme.Color(clrFont), clrTransparent, font); const cFont *fontHeader = fontManager.FontMessageBoxLarge;
} int xHeader = (Width() - fontHeader->Width(*header)) / 2;
int yHeader = (Height()/2 - fontHeader->Height()) / 2;
void cChannelJump::Set(int num) { pixmapText->DrawText(cPoint(xHeader, yHeader), *header, theme.Color(clrFont), clrTransparent, fontHeader);
startTime = cTimeMs::Now();
if (channel == 0) { cString strChannel = BuildChannelString();
channel = num; int xChannel = (Width() - font->Width(*strChannel)) / 2;
return; int yChannel = Height()/2 + (Height()/2 - font->Height()) / 2;
} pixmapText->DrawText(cPoint(xChannel, yChannel), *strChannel, theme.Color(clrFont), clrTransparent, font);
int newChannel = channel * 10 + num;
if (newChannel <= maxChannels) }
channel = newChannel;
} void cChannelJump::Set(int num) {
startTime = cTimeMs::Now();
cString cChannelJump::BuildChannelString(void) { if (channel == 0) {
if (channel*10 <= maxChannels) channel = num;
return cString::sprintf("%d-", channel); return;
else }
return cString::sprintf("%d", channel); int newChannel = channel * 10 + num;
} if (newChannel <= maxChannels)
channel = newChannel;
bool cChannelJump::TimeOut(void) { }
if ((cTimeMs::Now() - startTime) > timeout)
return true; cString cChannelJump::BuildChannelString(void) {
return false; if (channel*10 <= maxChannels)
} return cString::sprintf("%d-", channel);
else
return cString::sprintf("%d", channel);
}
bool cChannelJump::TimeOut(void) {
if ((cTimeMs::Now() - startTime) > timeout)
return true;
return false;
}

View File

@ -1,29 +1,29 @@
#ifndef __TVGUIDE_CHANNELJUMP_H #ifndef __TVGUIDE_CHANNELJUMP_H
#define __TVGUIDE_CHANNELJUMP_H #define __TVGUIDE_CHANNELJUMP_H
#include "styledpixmap.h" #include "styledpixmap.h"
// --- cChannelJump ------------------------------------------------------------- // --- cChannelJump -------------------------------------------------------------
class cChannelJump : public cStyledPixmap { class cChannelJump : public cStyledPixmap {
private: private:
int channel; int channel;
cChannelGroups *channelGroups; cChannelGroups *channelGroups;
int maxChannels; int maxChannels;
long unsigned int startTime; long unsigned int startTime;
long unsigned int timeout; long unsigned int timeout;
cPixmap *pixmapBack; cPixmap *pixmapBack;
cPixmap *pixmapText; cPixmap *pixmapText;
void SetPixmaps(void); void SetPixmaps(void);
void Draw(void); void Draw(void);
cString BuildChannelString(void); cString BuildChannelString(void);
public: public:
cChannelJump(cChannelGroups *channelGroups, int lastValidChannel); cChannelJump(cChannelGroups *channelGroups);
virtual ~cChannelJump(void); virtual ~cChannelJump(void);
void Set(int num); void Set(int num);
void DrawText(void); void DrawText(void);
bool TimeOut(void); bool TimeOut(void);
int GetChannel(void) { return channel; }; int GetChannel(void) { return channel; };
}; };
#endif //__TVGUIDE_CHANNELJUMP_H #endif //__TVGUIDE_CHANNELJUMP_H

693
config.c
View File

@ -1,353 +1,340 @@
#include <string> #include <string>
#include "config.h" #include "config.h"
cTVGuideConfig::cTVGuideConfig() { cTvguideConfig::cTvguideConfig() {
useHWAccel = false; debugImageLoading = 0;
debugImageLoading = 0; showMainMenuEntry = 1;
showMainMenuEntry = 1; replaceOriginalSchedule = 0;
replaceOriginalSchedule = 0; displayMode = eHorizontal;
displayMode = eHorizontal; showTimeInGrid = 1;
showTimeInGrid = 1; channelCols = 5;
channelCols = 5; channelRows = 10;
channelRows = 10; displayTime = 160;
displayTime = 180; displayHorizontalTime = 160;
displayHorizontalTime = 180; displayStatusHeader = 1;
displayStatusHeader = 1; displayChannelGroups = 1;
displayChannelGroups = 1; displayTimeBase = 1;
displayTimeBase = 1; headerHeightPercent = 20;
headerHeightPercent = 20; channelGroupsPercent = 5;
channelGroupsPercent = 5; epgViewBorder = 50;
epgViewBorder = 50; scaleVideo = 1;
scaleVideo = 1; decorateVideo = 1;
decorateVideo = 1; timeLineWidthPercent = 8;
timeLineWidthPercent = 8; timeLineHeightPercent = 4;
timeLineHeightPercent = 4; displayChannelName = 1;
displayChannelName = 1; channelHeaderWidthPercent = 20;
channelHeaderWidthPercent = 20; channelHeaderHeightPercent = 15;
channelHeaderHeightPercent = 15; footerHeightPercent = 7;
footerHeightPercent = 7; stepMinutes = 30;
stepMinutes = 30; bigStepHours = 3;
bigStepHours = 3; hugeStepHours = 24;
bigStepHoursHorizontal = 3; channelJumpMode = eNumJump;
hugeStepHours = 24; jumpChannels = 0;
hugeStepHoursHorizontal = 24; blueKeyMode = 2;
channelJumpMode = eNumJump; closeOnSwitch = 1;
jumpChannels = 0; numkeyMode = 0;
blueKeyMode = 2; useRemoteTimers = 0;
addSubtitleToTimer = 1; hideLastGroup = 0;
timerMessage = 1; hideChannelLogos = 0;
closeOnSwitch = 1; logoWidthRatio = 13;
numkeyMode = 0; logoHeightRatio = 10;
useRemoteTimers = 0; logoExtension = 0;
hideLastGroup = 0; hideEpgImages = 0;
hideChannelLogos = 0; epgImageWidth = 315;
logoWidthRatio = 13; epgImageHeight = 240;
logoHeightRatio = 10; numAdditionalEPGPictures = 9;
logoExtension = 0; epgImageWidthLarge = 525;
hideEpgImages = 0; epgImageHeightLarge = 400;
epgImageWidth = 315; detailedViewScrollStep = 5;
epgImageHeight = 240; instRecFolderMode = eFolderRoot;
numAdditionalEPGPictures = 9; instRecFixedFolder = "";
epgImageWidthLarge = 525; favWhatsOnNow = 1;
epgImageHeightLarge = 400; favWhatsOnNext = 1;
detailedViewScrollStep = 5; favUseTime1 = 0;
instRecFolderMode = eFolderRoot; favUseTime2 = 0;
instRecFixedFolder = ""; favUseTime3 = 0;
favWhatsOnNow = 1; favUseTime4 = 0;
favWhatsOnNext = 1; favTime1 = 0;
favUseTime1 = 0; favTime2 = 0;
favUseTime2 = 0; favTime3 = 0;
favUseTime3 = 0; favTime4 = 0;
favUseTime4 = 0; descUser1 = "";
favTime1 = 0; descUser2 = "";
favTime2 = 0; descUser3 = "";
favTime3 = 0; descUser4 = "";
favTime4 = 0; favLimitChannels = 0;
descUser1 = ""; favStartChannel = 0;
descUser2 = ""; favStopChannel = 0;
descUser3 = ""; switchMode = 0;
descUser4 = ""; switchMinsBefore = 2;
favLimitChannels = 0; fontIndex = 0;
favStartChannel = 0; fontNameDefault = "VDRSymbols Sans:Book";
favStopChannel = 0; FontButtonDelta = 0;
switchMode = 0; FontDetailViewDelta = 0;
switchMinsBefore = 2; FontDetailViewSmallDelta = 0;
fontIndex = 0; FontDetailHeaderDelta = 0;
fontNameDefault = "VDRSymbols Sans:Book"; FontMessageBoxDelta = 0;
FontButtonDelta = 0; FontMessageBoxLargeDelta = 0;
FontDetailViewDelta = 0; FontStatusHeaderDelta = 0;
FontDetailViewSmallDelta = 0; FontStatusHeaderLargeDelta = 0;
FontDetailHeaderDelta = 0; FontChannelHeaderDelta = 0;
FontMessageBoxDelta = 0; FontChannelGroupsDelta = 0;
FontMessageBoxLargeDelta = 0; FontGridDelta = 0;
FontStatusHeaderDelta = 0; FontGridSmallDelta = 0;
FontStatusHeaderLargeDelta = 0; FontTimeLineWeekdayDelta = 0;
FontChannelHeaderDelta = 0; FontTimeLineDateDelta = 0;
FontChannelGroupsDelta = 0; FontTimeLineTimeDelta = 0;
FontGridDelta = 0; FontChannelHeaderHorizontalDelta = 0;
FontGridSmallDelta = 0; FontChannelGroupsHorizontalDelta = 0;
FontTimeLineWeekdayDelta = 0; FontGridHorizontalDelta = 0;
FontTimeLineDateDelta = 0; FontGridHorizontalSmallDelta = 0;
FontTimeLineTimeDelta = 0; FontTimeLineDateHorizontalDelta = 0;
FontChannelHeaderHorizontalDelta = 0; FontTimeLineTimeHorizontalDelta = 0;
FontChannelGroupsHorizontalDelta = 0; FontRecMenuItemDelta = 0;
FontGridHorizontalDelta = 0; FontRecMenuItemSmallDelta = 0;
FontGridHorizontalSmallDelta = 0; FontRecMenuItemLargeDelta = 0;
FontTimeLineDateHorizontalDelta = 0; timeFormat = 1;
FontTimeLineTimeHorizontalDelta = 0; useNopacityTheme = 1;
FontRecMenuItemDelta = 0; themeIndex = -1;
FontRecMenuItemSmallDelta = 0; themeIndexCurrent = -1;
FontRecMenuItemLargeDelta = 0; themeName = "";
timeFormat = 1; nOpacityTheme = "";
useNopacityTheme = 1; style = eStyleBlendingDefault;
useNopacityThemeCurrent = -1; roundedCorners = 0;
themeIndex = -1; displayRerunsDetailEPGView = 1;
themeIndexCurrent = -1; numReruns = 5;
themeName = ""; useSubtitleRerun = 1;
nOpacityTheme = ""; numLogosInitial = 30;
style = eStyleBlendingDefault; numLogosMax = 50;
roundedCorners = 0; limitLogoCache = 1;
displayRerunsDetailEPGView = 1; logoPathSet = false;
numReruns = 5; imagesPathSet = false;
useSubtitleRerun = 1; iconsPathSet = false;
numLogosInitial = 30; }
numLogosMax = 50;
limitLogoCache = 1; cTvguideConfig::~cTvguideConfig() {
logoPathSet = false; }
imagesPathSet = false;
iconsPathSet = false; void cTvguideConfig::setDynamicValues() {
} numGrids = (displayMode == eVertical)?channelCols:channelRows;
jumpChannels = numGrids;
cTVGuideConfig::~cTVGuideConfig() { }
}
bool cTvguideConfig::LoadTheme() {
void cTVGuideConfig::setDynamicValues() { //is correct theme already loaded?
numGrids = (displayMode == eVertical)?channelCols:channelRows; if (nOpacityTheme.size() == 0)
jumpChannels = numGrids; nOpacityTheme = Setup.OSDTheme;
} if ((themeIndex > -1) && (themeIndex == themeIndexCurrent)) {
if (!nOpacityTheme.compare(Setup.OSDTheme)) {
bool cTVGuideConfig::LoadTheme() { return false;
//is correct theme already loaded? } else {
if (nOpacityTheme.size() == 0) nOpacityTheme = Setup.OSDTheme;
nOpacityTheme = Setup.OSDTheme; }
if ((themeIndex > -1) && (themeIndex == themeIndexCurrent) && (useNopacityTheme == useNopacityThemeCurrent)) { }
if (!nOpacityTheme.compare(Setup.OSDTheme)) { //Load available Themes
return false; cThemes themes;
} else { themes.Load(*cString("tvguide"));
nOpacityTheme = Setup.OSDTheme; int numThemesAvailable = themes.NumThemes();
}
} //Check for nOpacity Theme
esyslog("tvguide: loading new Theme"); if (useNopacityTheme) {
//Load available Themes std::string nOpacity = "nOpacity";
cThemes themes; std::string currentSkin = Setup.OSDSkin;
themes.Load(*cString("tvguide")); std::string currentSkinTheme = Setup.OSDTheme;
int numThemesAvailable = themes.NumThemes(); if (!currentSkin.compare(nOpacity)) {
for (int curThemeIndex = 0; curThemeIndex < numThemesAvailable; curThemeIndex++) {
//Check for nOpacity Theme std::string curThemeName = themes.Name(curThemeIndex);
if (useNopacityTheme) { if (!curThemeName.compare(currentSkinTheme)) {
std::string nOpacity = "nOpacity"; themeIndex = curThemeIndex;
std::string currentSkin = Setup.OSDSkin; break;
std::string currentSkinTheme = Setup.OSDTheme; }
if (!currentSkin.compare(nOpacity)) { }
for (int curThemeIndex = 0; curThemeIndex < numThemesAvailable; curThemeIndex++) { }
std::string curThemeName = themes.Name(curThemeIndex); }
if (!curThemeName.compare(currentSkinTheme)) {
themeIndex = curThemeIndex; if (themeIndex == -1) {
break; for (int curThemeIndex = 0; curThemeIndex < numThemesAvailable; curThemeIndex++) {
} std::string curThemeName = themes.Name(curThemeIndex);
} if (!curThemeName.compare("default")) {
} themeIndex = curThemeIndex;
} break;
}
if (themeIndex == -1) { }
for (int curThemeIndex = 0; curThemeIndex < numThemesAvailable; curThemeIndex++) {
std::string curThemeName = themes.Name(curThemeIndex); }
if (!curThemeName.compare("default")) {
themeIndex = curThemeIndex; if (themeIndex == -1)
break; themeIndex = 0;
}
} themeIndexCurrent = themeIndex;
} const char *themePath = themes.FileName(themeIndex);
if (access(themePath, F_OK) == 0) {
if (themeIndex == -1) ::theme.Load(themePath);
themeIndex = 0; themeName = themes.Name(themeIndex);
}
themeIndexCurrent = themeIndex; esyslog("tvguide: set Theme to %s", *themeName);
useNopacityThemeCurrent = useNopacityTheme; return true;
}
const char *themePath = themes.FileName(themeIndex);
if (access(themePath, F_OK) == 0) {
::theme.Load(themePath); void cTvguideConfig::SetStyle(void) {
themeName = themes.Name(themeIndex); if (theme.Color(clrStyle) == CLR_STYLE_FLAT) {
} style = eStyleFlat;
esyslog("tvguide: set Theme to %s", *themeName); esyslog("tvguide: set flat style");
return true; } else if (theme.Color(clrStyle) == CLR_STYLE_BLENDING_DEFAULT) {
} style = eStyleBlendingDefault;
esyslog("tvguide: set blending style");
} else if (theme.Color(clrStyle) == CLR_STYLE_GRAPHICAL) {
void cTVGuideConfig::SetStyle(void) { style = eStyleGraphical;
if (theme.Color(clrStyle) == CLR_STYLE_FLAT) { esyslog("tvguide: set graphical style");
style = eStyleFlat; } else {
esyslog("tvguide: set flat style"); style = eStyleBlendingMagick;
} else if (theme.Color(clrStyle) == CLR_STYLE_BLENDING_DEFAULT) { esyslog("tvguide: set magick blending style");
style = eStyleBlendingDefault; }
esyslog("tvguide: set blending style");
} else if (theme.Color(clrStyle) == CLR_STYLE_GRAPHICAL) { }
style = eStyleGraphical;
esyslog("tvguide: set graphical style"); void cTvguideConfig::SetLogoPath(cString path) {
} else { logoPath = checkSlashAtEnd(*path);
style = eStyleBlendingMagick; logoPathSet = true;
esyslog("tvguide: set magick blending style"); esyslog("tvguide: Logo Path set to %s", *logoPath);
} }
} void cTvguideConfig::SetImagesPath(cString path) {
epgImagePath = checkSlashAtEnd(*path);
void cTVGuideConfig::SetLogoPath(cString path) { imagesPathSet = true;
logoPath = checkSlashAtEnd(*path); esyslog("tvguide: EPG Image Path set to %s", *epgImagePath);
logoPathSet = true; }
esyslog("tvguide: Logo Path set to %s", *logoPath);
} void cTvguideConfig::SetIconsPath(cString path) {
iconPath = checkSlashAtEnd(*path);
void cTVGuideConfig::SetImagesPath(cString path) { iconsPathSet = true;
epgImagePath = checkSlashAtEnd(*path); esyslog("tvguide: Icon Path set to %s", *iconPath);
imagesPathSet = true; }
esyslog("tvguide: EPG Image Path set to %s", *epgImagePath);
} void cTvguideConfig::SetDefaultPathes(void) {
logoPathDefault = cString::sprintf("%s/logos/", cPlugin::ResourceDirectory(PLUGIN_NAME_I18N));
void cTVGuideConfig::SetIconsPath(cString path) { iconPathDefault = cString::sprintf("%s/icons/", cPlugin::ResourceDirectory(PLUGIN_NAME_I18N));
iconPath = checkSlashAtEnd(*path); epgImagePathDefault = cString::sprintf("%s/epgimages/", cPlugin::CacheDirectory(PLUGIN_NAME_I18N));
iconsPathSet = true;
esyslog("tvguide: Icon Path set to %s", *iconPath); if (!logoPathSet) {
} logoPath = logoPathDefault;
}
void cTVGuideConfig::SetDefaultPathes(void) { if (!imagesPathSet) {
logoPathDefault = cString::sprintf("%s/logos/", cPlugin::ResourceDirectory(PLUGIN_NAME_I18N)); epgImagePath = epgImagePathDefault;
iconPathDefault = cString::sprintf("%s/icons/", cPlugin::ResourceDirectory(PLUGIN_NAME_I18N)); }
epgImagePathDefault = cString::sprintf("%s/epgimages/", cPlugin::CacheDirectory(PLUGIN_NAME_I18N)); if (!iconsPathSet) {
iconPath = iconPathDefault;
if (!logoPathSet) { }
logoPath = logoPathDefault; }
}
if (!imagesPathSet) { cString cTvguideConfig::checkSlashAtEnd(std::string path) {
epgImagePath = epgImagePathDefault; try {
} if (!(path.at(path.size()-1) == '/'))
if (!iconsPathSet) { return cString::sprintf("%s/", path.c_str());
iconPath = iconPathDefault; } catch (...) {return path.c_str();}
} return path.c_str();
} }
cString cTVGuideConfig::checkSlashAtEnd(std::string path) { bool cTvguideConfig::SetupParse(const char *Name, const char *Value) {
try { if (strcmp(Name, "timeFormat") == 0) timeFormat = atoi(Value);
if (!(path.at(path.size()-1) == '/')) else if (strcmp(Name, "debugImageLoading") == 0) debugImageLoading = atoi(Value);
return cString::sprintf("%s/", path.c_str()); else if (strcmp(Name, "showMainMenuEntry") == 0) showMainMenuEntry = atoi(Value);
} catch (...) {return path.c_str();} else if (strcmp(Name, "replaceOriginalSchedule") == 0) replaceOriginalSchedule = atoi(Value);
return path.c_str(); else if (strcmp(Name, "useNopacityTheme") == 0) useNopacityTheme = atoi(Value);
} else if (strcmp(Name, "themeIndex") == 0) themeIndex = atoi(Value);
else if (strcmp(Name, "displayMode") == 0) displayMode = atoi(Value);
bool cTVGuideConfig::SetupParse(const char *Name, const char *Value) { else if (strcmp(Name, "showTimeInGrid") == 0) showTimeInGrid = atoi(Value);
if (strcmp(Name, "timeFormat") == 0) timeFormat = atoi(Value); else if (strcmp(Name, "displayStatusHeader") == 0) displayStatusHeader = atoi(Value);
else if (strcmp(Name, "debugImageLoading") == 0) debugImageLoading = atoi(Value); else if (strcmp(Name, "displayChannelGroups") == 0) displayChannelGroups = atoi(Value);
else if (strcmp(Name, "useHWAccel") == 0) useHWAccel = atoi(Value); else if (strcmp(Name, "displayTimeBase") == 0) displayTimeBase = atoi(Value);
else if (strcmp(Name, "showMainMenuEntry") == 0) showMainMenuEntry = atoi(Value); else if (strcmp(Name, "headerHeightPercent") == 0) headerHeightPercent = atoi(Value);
else if (strcmp(Name, "replaceOriginalSchedule") == 0) replaceOriginalSchedule = atoi(Value); else if (strcmp(Name, "channelGroupsPercent") == 0) channelGroupsPercent = atoi(Value);
else if (strcmp(Name, "useNopacityTheme") == 0) useNopacityTheme = atoi(Value); else if (strcmp(Name, "epgViewBorder") == 0) epgViewBorder = atoi(Value);
else if (strcmp(Name, "themeIndex") == 0) themeIndex = atoi(Value); else if (strcmp(Name, "scaleVideo") == 0) scaleVideo = atoi(Value);
else if (strcmp(Name, "displayMode") == 0) displayMode = atoi(Value); else if (strcmp(Name, "decorateVideo") == 0) decorateVideo = atoi(Value);
else if (strcmp(Name, "showTimeInGrid") == 0) showTimeInGrid = atoi(Value); else if (strcmp(Name, "roundedCorners") == 0) roundedCorners = atoi(Value);
else if (strcmp(Name, "displayStatusHeader") == 0) displayStatusHeader = atoi(Value); else if (strcmp(Name, "channelCols") == 0) channelCols = atoi(Value);
else if (strcmp(Name, "displayChannelGroups") == 0) displayChannelGroups = atoi(Value); else if (strcmp(Name, "channelRows") == 0) channelRows = atoi(Value);
else if (strcmp(Name, "displayTimeBase") == 0) displayTimeBase = atoi(Value); else if (strcmp(Name, "displayTime") == 0) displayTime = atoi(Value);
else if (strcmp(Name, "headerHeightPercent") == 0) headerHeightPercent = atoi(Value); else if (strcmp(Name, "displayHorizontalTime") == 0) displayHorizontalTime = atoi(Value);
else if (strcmp(Name, "channelGroupsPercent") == 0) channelGroupsPercent = atoi(Value); else if (strcmp(Name, "hideChannelLogos") == 0) hideChannelLogos = atoi(Value);
else if (strcmp(Name, "epgViewBorder") == 0) epgViewBorder = atoi(Value); else if (strcmp(Name, "logoExtension") == 0) logoExtension = atoi(Value);
else if (strcmp(Name, "scaleVideo") == 0) scaleVideo = atoi(Value); else if (strcmp(Name, "logoWidthRatio") == 0) logoWidthRatio = atoi(Value);
else if (strcmp(Name, "decorateVideo") == 0) decorateVideo = atoi(Value); else if (strcmp(Name, "logoHeightRatio") == 0) logoHeightRatio = atoi(Value);
else if (strcmp(Name, "roundedCorners") == 0) roundedCorners = atoi(Value); else if (strcmp(Name, "bigStepHours") == 0) bigStepHours = atoi(Value);
else if (strcmp(Name, "channelCols") == 0) channelCols = atoi(Value); else if (strcmp(Name, "hugeStepHours") == 0) hugeStepHours = atoi(Value);
else if (strcmp(Name, "channelRows") == 0) channelRows = atoi(Value); else if (strcmp(Name, "channelJumpMode") == 0) channelJumpMode = atoi(Value);
else if (strcmp(Name, "displayTime") == 0) displayTime = atoi(Value); else if (strcmp(Name, "blueKeyMode") == 0) blueKeyMode = atoi(Value);
else if (strcmp(Name, "displayHorizontalTime") == 0) displayHorizontalTime = atoi(Value); else if (strcmp(Name, "numkeyMode") == 0) numkeyMode = atoi(Value);
else if (strcmp(Name, "hideChannelLogos") == 0) hideChannelLogos = atoi(Value); else if (strcmp(Name, "closeOnSwitch") == 0) closeOnSwitch = atoi(Value);
else if (strcmp(Name, "logoExtension") == 0) logoExtension = atoi(Value); else if (strcmp(Name, "useRemoteTimers") == 0) useRemoteTimers = atoi(Value);
else if (strcmp(Name, "logoWidthRatio") == 0) logoWidthRatio = atoi(Value); else if (strcmp(Name, "hideLastGroup") == 0) hideLastGroup = atoi(Value);
else if (strcmp(Name, "logoHeightRatio") == 0) logoHeightRatio = atoi(Value); else if (strcmp(Name, "hideEpgImages") == 0) hideEpgImages = atoi(Value);
else if (strcmp(Name, "bigStepHours") == 0) bigStepHours = atoi(Value); else if (strcmp(Name, "epgImageWidth") == 0) epgImageWidth = atoi(Value);
else if (strcmp(Name, "bigStepHoursHorizontal") == 0) bigStepHoursHorizontal = atoi(Value); else if (strcmp(Name, "epgImageHeight") == 0) epgImageHeight = atoi(Value);
else if (strcmp(Name, "hugeStepHours") == 0) hugeStepHours = atoi(Value); else if (strcmp(Name, "numAdditionalEPGPictures") == 0) numAdditionalEPGPictures = atoi(Value);
else if (strcmp(Name, "hugeStepHoursHorizontal") == 0) hugeStepHoursHorizontal = atoi(Value); else if (strcmp(Name, "epgImageWidthLarge") == 0) epgImageWidthLarge = atoi(Value);
else if (strcmp(Name, "channelJumpMode") == 0) channelJumpMode = atoi(Value); else if (strcmp(Name, "epgImageHeightLarge") == 0) epgImageHeightLarge = atoi(Value);
else if (strcmp(Name, "blueKeyMode") == 0) blueKeyMode = atoi(Value); else if (strcmp(Name, "detailedViewScrollStep") == 0) detailedViewScrollStep = atoi(Value);
else if (strcmp(Name, "numkeyMode") == 0) numkeyMode = atoi(Value); else if (strcmp(Name, "timeLineWidthPercent") == 0) timeLineWidthPercent = atoi(Value);
else if (strcmp(Name, "closeOnSwitch") == 0) closeOnSwitch = atoi(Value); else if (strcmp(Name, "timeLineHeightPercent") == 0) timeLineHeightPercent = atoi(Value);
else if (strcmp(Name, "useRemoteTimers") == 0) useRemoteTimers = atoi(Value); else if (strcmp(Name, "displayChannelName") == 0) displayChannelName = atoi(Value);
else if (strcmp(Name, "hideLastGroup") == 0) hideLastGroup = atoi(Value); else if (strcmp(Name, "channelHeaderWidthPercent") == 0) channelHeaderWidthPercent = atoi(Value);
else if (strcmp(Name, "hideEpgImages") == 0) hideEpgImages = atoi(Value); else if (strcmp(Name, "channelHeaderHeightPercent") == 0) channelHeaderHeightPercent = atoi(Value);
else if (strcmp(Name, "epgImageWidth") == 0) epgImageWidth = atoi(Value); else if (strcmp(Name, "footerHeightPercent") == 0) footerHeightPercent = atoi(Value);
else if (strcmp(Name, "epgImageHeight") == 0) epgImageHeight = atoi(Value); else if (strcmp(Name, "instRecFolderMode") == 0) instRecFolderMode = atoi(Value);
else if (strcmp(Name, "numAdditionalEPGPictures") == 0) numAdditionalEPGPictures = atoi(Value); else if (strcmp(Name, "instRecFixedFolder") == 0) instRecFixedFolder = Value;
else if (strcmp(Name, "epgImageWidthLarge") == 0) epgImageWidthLarge = atoi(Value); else if (strcmp(Name, "favWhatsOnNow") == 0) favWhatsOnNow = atoi(Value);
else if (strcmp(Name, "epgImageHeightLarge") == 0) epgImageHeightLarge = atoi(Value); else if (strcmp(Name, "favWhatsOnNext") == 0) favWhatsOnNext = atoi(Value);
else if (strcmp(Name, "detailedViewScrollStep") == 0) detailedViewScrollStep = atoi(Value); else if (strcmp(Name, "favUseTime1") == 0) favUseTime1 = atoi(Value);
else if (strcmp(Name, "timeLineWidthPercent") == 0) timeLineWidthPercent = atoi(Value); else if (strcmp(Name, "favUseTime2") == 0) favUseTime2 = atoi(Value);
else if (strcmp(Name, "timeLineHeightPercent") == 0) timeLineHeightPercent = atoi(Value); else if (strcmp(Name, "favUseTime3") == 0) favUseTime3 = atoi(Value);
else if (strcmp(Name, "displayChannelName") == 0) displayChannelName = atoi(Value); else if (strcmp(Name, "favUseTime4") == 0) favUseTime4 = atoi(Value);
else if (strcmp(Name, "channelHeaderWidthPercent") == 0) channelHeaderWidthPercent = atoi(Value); else if (strcmp(Name, "favTime1") == 0) favTime1 = atoi(Value);
else if (strcmp(Name, "channelHeaderHeightPercent") == 0) channelHeaderHeightPercent = atoi(Value); else if (strcmp(Name, "favTime2") == 0) favTime2 = atoi(Value);
else if (strcmp(Name, "footerHeightPercent") == 0) footerHeightPercent = atoi(Value); else if (strcmp(Name, "favTime3") == 0) favTime3 = atoi(Value);
else if (strcmp(Name, "instRecFolderMode") == 0) instRecFolderMode = atoi(Value); else if (strcmp(Name, "favTime4") == 0) favTime4 = atoi(Value);
else if (strcmp(Name, "instRecFixedFolder") == 0) instRecFixedFolder = Value; else if (strcmp(Name, "descUser1") == 0) descUser1 = Value;
else if (strcmp(Name, "addSubtitleToTimer") == 0) addSubtitleToTimer = atoi(Value); else if (strcmp(Name, "descUser2") == 0) descUser2 = Value;
else if (strcmp(Name, "timerMessage") == 0) timerMessage = atoi(Value); else if (strcmp(Name, "descUser3") == 0) descUser3 = Value;
else if (strcmp(Name, "favWhatsOnNow") == 0) favWhatsOnNow = atoi(Value); else if (strcmp(Name, "descUser4") == 0) descUser4 = Value;
else if (strcmp(Name, "favWhatsOnNext") == 0) favWhatsOnNext = atoi(Value); else if (strcmp(Name, "favLimitChannels") == 0) favLimitChannels = atoi(Value);
else if (strcmp(Name, "favUseTime1") == 0) favUseTime1 = atoi(Value); else if (strcmp(Name, "favStartChannel") == 0) favStartChannel = atoi(Value);
else if (strcmp(Name, "favUseTime2") == 0) favUseTime2 = atoi(Value); else if (strcmp(Name, "favStopChannel") == 0) favStopChannel = atoi(Value);
else if (strcmp(Name, "favUseTime3") == 0) favUseTime3 = atoi(Value); else if (strcmp(Name, "switchMode") == 0) switchMode = atoi(Value);
else if (strcmp(Name, "favUseTime4") == 0) favUseTime4 = atoi(Value); else if (strcmp(Name, "switchMinsBefore") == 0) switchMinsBefore = atoi(Value);
else if (strcmp(Name, "favTime1") == 0) favTime1 = atoi(Value); else if (strcmp(Name, "fontIndex") == 0) fontIndex = atoi(Value);
else if (strcmp(Name, "favTime2") == 0) favTime2 = atoi(Value); else if (strcmp(Name, "FontButtonDelta") == 0) FontButtonDelta = atoi(Value);
else if (strcmp(Name, "favTime3") == 0) favTime3 = atoi(Value); else if (strcmp(Name, "FontDetailViewDelta") == 0) FontDetailViewDelta = atoi(Value);
else if (strcmp(Name, "favTime4") == 0) favTime4 = atoi(Value); else if (strcmp(Name, "FontDetailHeaderDelta") == 0) FontDetailHeaderDelta = atoi(Value);
else if (strcmp(Name, "descUser1") == 0) descUser1 = Value; else if (strcmp(Name, "FontMessageBoxDelta") == 0) FontMessageBoxDelta = atoi(Value);
else if (strcmp(Name, "descUser2") == 0) descUser2 = Value; else if (strcmp(Name, "FontMessageBoxLargeDelta") == 0) FontMessageBoxLargeDelta = atoi(Value);
else if (strcmp(Name, "descUser3") == 0) descUser3 = Value; else if (strcmp(Name, "FontStatusHeaderDelta") == 0) FontStatusHeaderDelta = atoi(Value);
else if (strcmp(Name, "descUser4") == 0) descUser4 = Value; else if (strcmp(Name, "FontStatusHeaderLargeDelta") == 0) FontStatusHeaderLargeDelta = atoi(Value);
else if (strcmp(Name, "favLimitChannels") == 0) favLimitChannels = atoi(Value); else if (strcmp(Name, "FontChannelHeaderDelta") == 0) FontChannelHeaderDelta = atoi(Value);
else if (strcmp(Name, "favStartChannel") == 0) favStartChannel = atoi(Value); else if (strcmp(Name, "FontChannelGroupsDelta") == 0) FontChannelGroupsDelta = atoi(Value);
else if (strcmp(Name, "favStopChannel") == 0) favStopChannel = atoi(Value); else if (strcmp(Name, "FontGridDelta") == 0) FontGridDelta = atoi(Value);
else if (strcmp(Name, "switchMode") == 0) switchMode = atoi(Value); else if (strcmp(Name, "FontGridSmallDelta") == 0) FontGridSmallDelta = atoi(Value);
else if (strcmp(Name, "switchMinsBefore") == 0) switchMinsBefore = atoi(Value); else if (strcmp(Name, "FontTimeLineWeekdayDelta") == 0) FontTimeLineWeekdayDelta = atoi(Value);
else if (strcmp(Name, "fontIndex") == 0) fontIndex = atoi(Value); else if (strcmp(Name, "FontTimeLineDateDelta") == 0) FontTimeLineDateDelta = atoi(Value);
else if (strcmp(Name, "FontButtonDelta") == 0) FontButtonDelta = atoi(Value); else if (strcmp(Name, "FontTimeLineTimeDelta") == 0) FontTimeLineTimeDelta = atoi(Value);
else if (strcmp(Name, "FontDetailViewDelta") == 0) FontDetailViewDelta = atoi(Value); else if (strcmp(Name, "FontChannelHeaderHorizontalDelta") == 0) FontChannelHeaderHorizontalDelta = atoi(Value);
else if (strcmp(Name, "FontDetailHeaderDelta") == 0) FontDetailHeaderDelta = atoi(Value); else if (strcmp(Name, "FontChannelGroupsHorizontalDelta") == 0) FontChannelGroupsHorizontalDelta = atoi(Value);
else if (strcmp(Name, "FontMessageBoxDelta") == 0) FontMessageBoxDelta = atoi(Value); else if (strcmp(Name, "FontGridHorizontalDelta") == 0) FontGridHorizontalDelta = atoi(Value);
else if (strcmp(Name, "FontMessageBoxLargeDelta") == 0) FontMessageBoxLargeDelta = atoi(Value); else if (strcmp(Name, "FontGridHorizontalSmallDelta") == 0) FontGridHorizontalSmallDelta = atoi(Value);
else if (strcmp(Name, "FontStatusHeaderDelta") == 0) FontStatusHeaderDelta = atoi(Value); else if (strcmp(Name, "FontTimeLineDateHorizontalDelta") == 0) FontTimeLineDateHorizontalDelta = atoi(Value);
else if (strcmp(Name, "FontStatusHeaderLargeDelta") == 0) FontStatusHeaderLargeDelta = atoi(Value); else if (strcmp(Name, "FontTimeLineTimeHorizontalDelta") == 0) FontTimeLineTimeHorizontalDelta = atoi(Value);
else if (strcmp(Name, "FontChannelHeaderDelta") == 0) FontChannelHeaderDelta = atoi(Value); else if (strcmp(Name, "FontRecMenuItemDelta") == 0) FontRecMenuItemDelta = atoi(Value);
else if (strcmp(Name, "FontChannelGroupsDelta") == 0) FontChannelGroupsDelta = atoi(Value); else if (strcmp(Name, "FontRecMenuItemSmallDelta") == 0) FontRecMenuItemSmallDelta = atoi(Value);
else if (strcmp(Name, "FontGridDelta") == 0) FontGridDelta = atoi(Value); else if (strcmp(Name, "FontRecMenuItemLargeDelta") == 0) FontRecMenuItemLargeDelta = atoi(Value);
else if (strcmp(Name, "FontGridSmallDelta") == 0) FontGridSmallDelta = atoi(Value); else if (strcmp(Name, "displayRerunsDetailEPGView") == 0) displayRerunsDetailEPGView = atoi(Value);
else if (strcmp(Name, "FontTimeLineWeekdayDelta") == 0) FontTimeLineWeekdayDelta = atoi(Value); else if (strcmp(Name, "numReruns") == 0) numReruns = atoi(Value);
else if (strcmp(Name, "FontTimeLineDateDelta") == 0) FontTimeLineDateDelta = atoi(Value); else if (strcmp(Name, "useSubtitleRerun") == 0) useSubtitleRerun = atoi(Value);
else if (strcmp(Name, "FontTimeLineTimeDelta") == 0) FontTimeLineTimeDelta = atoi(Value); else if (strcmp(Name, "numLogosInitial") == 0) numLogosInitial = atoi(Value);
else if (strcmp(Name, "FontChannelHeaderHorizontalDelta") == 0) FontChannelHeaderHorizontalDelta = atoi(Value); else if (strcmp(Name, "numLogosMax") == 0) numLogosMax = atoi(Value);
else if (strcmp(Name, "FontChannelGroupsHorizontalDelta") == 0) FontChannelGroupsHorizontalDelta = atoi(Value); else if (strcmp(Name, "limitLogoCache") == 0) limitLogoCache = atoi(Value);
else if (strcmp(Name, "FontGridHorizontalDelta") == 0) FontGridHorizontalDelta = atoi(Value); else return false;
else if (strcmp(Name, "FontGridHorizontalSmallDelta") == 0) FontGridHorizontalSmallDelta = atoi(Value); return true;
else if (strcmp(Name, "FontTimeLineDateHorizontalDelta") == 0) FontTimeLineDateHorizontalDelta = atoi(Value); }
else if (strcmp(Name, "FontTimeLineTimeHorizontalDelta") == 0) FontTimeLineTimeHorizontalDelta = atoi(Value);
else if (strcmp(Name, "FontRecMenuItemDelta") == 0) FontRecMenuItemDelta = atoi(Value);
else if (strcmp(Name, "FontRecMenuItemSmallDelta") == 0) FontRecMenuItemSmallDelta = atoi(Value);
else if (strcmp(Name, "FontRecMenuItemLargeDelta") == 0) FontRecMenuItemLargeDelta = atoi(Value);
else if (strcmp(Name, "displayRerunsDetailEPGView") == 0) displayRerunsDetailEPGView = atoi(Value);
else if (strcmp(Name, "numReruns") == 0) numReruns = atoi(Value);
else if (strcmp(Name, "useSubtitleRerun") == 0) useSubtitleRerun = atoi(Value);
else if (strcmp(Name, "numLogosInitial") == 0) numLogosInitial = atoi(Value);
else if (strcmp(Name, "numLogosMax") == 0) numLogosMax = atoi(Value);
else if (strcmp(Name, "limitLogoCache") == 0) limitLogoCache = atoi(Value);
else return false;
return true;
}

528
config.h
View File

@ -1,270 +1,258 @@
#ifndef __TVGUIDE_CONFIG_H #ifndef __TVGUIDE_CONFIG_H
#define __TVGUIDE_CONFIG_H #define __TVGUIDE_CONFIG_H
#include <vdr/themes.h> #include <vdr/themes.h>
#include <vdr/plugin.h> #include <vdr/plugin.h>
#include "osdmanager.h" #include "osdmanager.h"
#include "geometrymanager.h" #include "geometrymanager.h"
#include "fontmanager.h" #include "fontmanager.h"
#include "imagecache.h" #include "imagecache.h"
enum eTimeFormat { enum {
e12Hours, e12Hours,
e24Hours e24Hours
}; };
enum { enum {
eVertical, eVertical,
eHorizontal eHorizontal
}; };
enum { enum {
eNumJump, eNumJump,
eGroupJump eGroupJump
}; };
enum { enum {
eStyleGraphical, eStyleGraphical,
eStyleBlendingMagick, eStyleBlendingMagick,
eStyleBlendingDefault, eStyleBlendingDefault,
eStyleFlat eStyleFlat
}; };
enum eBlueKeyMode { enum eBlueKeyMode {
eBlueKeySwitch = 0, eBlueKeySwitch = 0,
eBlueKeyEPG, eBlueKeyEPG,
eBlueKeyFavorites eBlueKeyFavorites
}; };
enum eInstRecFolderMode { enum eInstRecFolderMode {
eFolderRoot = 0, eFolderRoot = 0,
eFolderSelect, eFolderSelect,
eFolderFixed eFolderFixed
}; };
typedef enum { class cTvguideConfig {
addSubtitleNever = 0, private:
addSubtitleSmart, cString checkSlashAtEnd(std::string path);
addSubtitleAlways public:
} addSubtitleToTimerMode; cTvguideConfig();
~cTvguideConfig();
class cTVGuideConfig { int debugImageLoading;
private: int showMainMenuEntry;
cString checkSlashAtEnd(std::string path); int replaceOriginalSchedule;
public: int displayMode;
cTVGuideConfig(); int showTimeInGrid;
~cTVGuideConfig(); int channelCols;
int useHWAccel; int channelRows;
int debugImageLoading; int numGrids;
int showMainMenuEntry; int displayTime;
int replaceOriginalSchedule; int displayHorizontalTime;
int displayMode; int displayStatusHeader;
int showTimeInGrid; int displayChannelGroups;
int channelCols; int displayTimeBase;
int channelRows; int headerHeightPercent;
int numGrids; int channelGroupsPercent;
int displayTime; int epgViewBorder;
int displayHorizontalTime; int scaleVideo;
int displayStatusHeader; int decorateVideo;
int displayChannelGroups; int timeLineWidthPercent;
int displayTimeBase; int timeLineHeightPercent;
int headerHeightPercent; int displayChannelName;
int channelGroupsPercent; int channelHeaderWidthPercent;
int epgViewBorder; int channelHeaderHeightPercent;
int scaleVideo; int footerHeightPercent;
int decorateVideo; int stepMinutes;
int timeLineWidthPercent; int bigStepHours;
int timeLineHeightPercent; int hugeStepHours;
int displayChannelName; int channelJumpMode;
int channelHeaderWidthPercent; int jumpChannels;
int channelHeaderHeightPercent; int blueKeyMode;
int footerHeightPercent; int closeOnSwitch;
int stepMinutes; int numkeyMode;
int bigStepHours; int useRemoteTimers;
int bigStepHoursHorizontal; int hideLastGroup;
int hugeStepHours; int hideChannelLogos;
int hugeStepHoursHorizontal; int logoWidthRatio;
int channelJumpMode; int logoHeightRatio;
int jumpChannels; cString logoPath;
int blueKeyMode; int logoExtension;
int timerMessage; int hideEpgImages;
int addSubtitleToTimer; int epgImageWidth;
int closeOnSwitch; int epgImageHeight;
int numkeyMode; int numAdditionalEPGPictures;
int useRemoteTimers; int epgImageWidthLarge;
int hideLastGroup; int epgImageHeightLarge;
int hideChannelLogos; int detailedViewScrollStep;
int logoWidthRatio; cString epgImagePath;
int logoHeightRatio; cString iconPath;
cString logoPath; cString logoPathDefault;
int logoExtension; cString iconPathDefault;
int hideEpgImages; cString epgImagePathDefault;
int epgImageWidth; int instRecFolderMode;
int epgImageHeight; std::string instRecFixedFolder;
int numAdditionalEPGPictures; int favWhatsOnNow;
int epgImageWidthLarge; int favWhatsOnNext;
int epgImageHeightLarge; int favUseTime1;
int detailedViewScrollStep; int favUseTime2;
cString epgImagePath; int favUseTime3;
cString iconPath; int favUseTime4;
cString logoPathDefault; int favTime1;
cString iconPathDefault; int favTime2;
cString epgImagePathDefault; int favTime3;
int instRecFolderMode; int favTime4;
std::string instRecFixedFolder; std::string descUser1;
int favWhatsOnNow; std::string descUser2;
int favWhatsOnNext; std::string descUser3;
int favUseTime1; std::string descUser4;
int favUseTime2; int favLimitChannels;
int favUseTime3; int favStartChannel;
int favUseTime4; int favStopChannel;
int favTime1; int switchMode;
int favTime2; int switchMinsBefore;
int favTime3; int fontIndex;
int favTime4; const char *fontNameDefault;
std::string descUser1; int FontButtonDelta;
std::string descUser2; int FontDetailViewDelta;
std::string descUser3; int FontDetailViewSmallDelta;
std::string descUser4; int FontDetailHeaderDelta;
int favLimitChannels; int FontMessageBoxDelta;
int favStartChannel; int FontMessageBoxLargeDelta;
int favStopChannel; int FontStatusHeaderDelta;
int switchMode; int FontStatusHeaderLargeDelta;
int switchMinsBefore; int FontChannelHeaderDelta;
int fontIndex; int FontChannelGroupsDelta;
const char *fontNameDefault; int FontGridDelta;
int FontButtonDelta; int FontGridSmallDelta;
int FontDetailViewDelta; int FontTimeLineWeekdayDelta;
int FontDetailViewSmallDelta; int FontTimeLineDateDelta;
int FontDetailHeaderDelta; int FontTimeLineTimeDelta;
int FontMessageBoxDelta; int FontChannelHeaderHorizontalDelta;
int FontMessageBoxLargeDelta; int FontChannelGroupsHorizontalDelta;
int FontStatusHeaderDelta; int FontGridHorizontalDelta;
int FontStatusHeaderLargeDelta; int FontGridHorizontalSmallDelta;
int FontChannelHeaderDelta; int FontTimeLineDateHorizontalDelta;
int FontChannelGroupsDelta; int FontTimeLineTimeHorizontalDelta;
int FontGridDelta; int FontRecMenuItemDelta;
int FontGridSmallDelta; int FontRecMenuItemSmallDelta;
int FontTimeLineWeekdayDelta; int FontRecMenuItemLargeDelta;
int FontTimeLineDateDelta; int timeFormat;
int FontTimeLineTimeDelta; int useNopacityTheme;
int FontChannelHeaderHorizontalDelta; int themeIndex;
int FontChannelGroupsHorizontalDelta; int themeIndexCurrent;
int FontGridHorizontalDelta; cString themeName;
int FontGridHorizontalSmallDelta; std::string nOpacityTheme;
int FontTimeLineDateHorizontalDelta; int style;
int FontTimeLineTimeHorizontalDelta; int roundedCorners;
int FontRecMenuItemDelta; int displayRerunsDetailEPGView;
int FontRecMenuItemSmallDelta; int numReruns;
int FontRecMenuItemLargeDelta; int useSubtitleRerun;
int timeFormat; int numLogosInitial;
int useNopacityTheme; int numLogosMax;
int useNopacityThemeCurrent; int limitLogoCache;
int themeIndex; bool logoPathSet;
int themeIndexCurrent; bool imagesPathSet;
cString themeName; bool iconsPathSet;
std::string nOpacityTheme; bool LoadTheme();
int style; void SetStyle(void);
int roundedCorners; void setDynamicValues(void);
int displayRerunsDetailEPGView; void SetLogoPath(cString path);
int numReruns; void SetImagesPath(cString path);
int useSubtitleRerun; void SetIconsPath(cString path);
int numLogosInitial; void SetDefaultPathes(void);
int numLogosMax; bool SetupParse(const char *Name, const char *Value);
int limitLogoCache; };
bool logoPathSet;
bool imagesPathSet; #ifdef DEFINE_CONFIG
bool iconsPathSet; cTvguideConfig tvguideConfig;
bool LoadTheme(); cOsdManager osdManager;
void SetStyle(void); cGeometryManager geoManager;
void setDynamicValues(void); cFontManager fontManager;
void SetLogoPath(cString path); cImageCache imgCache;
void SetImagesPath(cString path); cTheme theme;
void SetIconsPath(cString path); cPlugin* pRemoteTimers = NULL;
void SetDefaultPathes(void); #else
bool SetupParse(const char *Name, const char *Value); extern cTvguideConfig tvguideConfig;
}; extern cOsdManager osdManager;
extern cGeometryManager geoManager;
#ifdef DEFINE_CONFIG extern cFontManager fontManager;
cTVGuideConfig config; extern cImageCache imgCache;
cOsdManager osdManager; extern cTheme theme;
cGeometryManager geoManager; extern cPlugin* pRemoteTimers;
cFontManager fontManager; #endif
cImageCache imgCache;
cTheme theme;
cPlugin* pRemoteTimers = NULL; // --- Theme -------------------------------------------------------------
#else //Style SETUP
extern cTVGuideConfig config; #define CLR_STYLE_BLENDING_MAGICK 0xFFFFFFFF
extern cOsdManager osdManager; #define CLR_STYLE_BLENDING_DEFAULT 0xAAAAAAAA
extern cGeometryManager geoManager; #define CLR_STYLE_GRAPHICAL 0x66666666
extern cFontManager fontManager; #define CLR_STYLE_FLAT 0x00000000
extern cImageCache imgCache;
extern cTheme theme; THEME_CLR(theme, clrStyle, CLR_STYLE_BLENDING_DEFAULT);
extern cPlugin* pRemoteTimers; THEME_CLR(theme, clrBackgroundOSD, 0xB012273f);
#endif THEME_CLR(theme, clrBackground, 0xFF12273f);
THEME_CLR(theme, clrGrid1, 0x00000000);
THEME_CLR(theme, clrGrid1Blending, 0x00000000);
// --- Theme ------------------------------------------------------------- THEME_CLR(theme, clrGrid2, 0x00000000);
//Style SETUP THEME_CLR(theme, clrGrid2Blending, 0x00000000);
#define CLR_STYLE_BLENDING_MAGICK 0xFFFFFFFF THEME_CLR(theme, clrHighlight, 0xAA3A3A55);
#define CLR_STYLE_BLENDING_DEFAULT 0xAAAAAAAA THEME_CLR(theme, clrHighlightBlending, 0xDD000000);
#define CLR_STYLE_GRAPHICAL 0x66666666 THEME_CLR(theme, clrGridFontBack, clrTransparent);
#define CLR_STYLE_FLAT 0x00000000 THEME_CLR(theme, clrGridActiveFontBack, 0xFFAFD533);
THEME_CLR(theme, clrFont, clrWhite);
THEME_CLR(theme, clrStyle, CLR_STYLE_BLENDING_DEFAULT); THEME_CLR(theme, clrFontActive, 0xFF363636);
THEME_CLR(theme, clrBackgroundOSD, 0xB012273f); THEME_CLR(theme, clrFontHeader, 0xFF363636);
THEME_CLR(theme, clrBackground, 0xFF12273f); THEME_CLR(theme, clrFontButtons, clrWhite);
THEME_CLR(theme, clrGrid1, 0x00000000); THEME_CLR(theme, clrStatusHeader, 0x00000000);
THEME_CLR(theme, clrGrid1Blending, 0x00000000); THEME_CLR(theme, clrStatusHeaderBlending, 0x00000000);
THEME_CLR(theme, clrGrid2, 0x00000000); THEME_CLR(theme, clrHeader, 0x00000000);
THEME_CLR(theme, clrGrid2Blending, 0x00000000); THEME_CLR(theme, clrHeaderBlending, 0x00000000);
THEME_CLR(theme, clrHighlight, 0xAA3A3A55); THEME_CLR(theme, clrBorder, 0x00000000);
THEME_CLR(theme, clrHighlightBlending, 0xDD000000); THEME_CLR(theme, clrTimeline1, clrWhite);
THEME_CLR(theme, clrGridFontBack, clrTransparent); THEME_CLR(theme, clrTimeline1Blending, 0xFF828282);
THEME_CLR(theme, clrGridActiveFontBack, 0xFFAFD533); THEME_CLR(theme, clrTimeline2, clrBlack);
THEME_CLR(theme, clrFont, clrWhite); THEME_CLR(theme, clrTimeline2Blending, 0xFF3F3F3F);
THEME_CLR(theme, clrFontActive, 0xFF363636); THEME_CLR(theme, clrTimeBase, 0xA0FF0000);
THEME_CLR(theme, clrFontHeader, 0xFF363636); THEME_CLR(theme, clrTabInactive, 0xA01F3D7A);
THEME_CLR(theme, clrFontButtons, clrWhite); THEME_CLR(theme, clrButtonRed, 0xFFFF0000);
THEME_CLR(theme, clrStatusHeader, 0x00000000); THEME_CLR(theme, clrButtonRedBorder, 0x00000000);
THEME_CLR(theme, clrStatusHeaderBlending, 0x00000000); THEME_CLR(theme, clrButtonGreen, 0x00000000);
THEME_CLR(theme, clrHeader, 0x00000000); THEME_CLR(theme, clrButtonGreenBorder, 0x00000000);
THEME_CLR(theme, clrHeaderBlending, 0x00000000); THEME_CLR(theme, clrButtonYellow, 0x00000000);
THEME_CLR(theme, clrBorder, 0x00000000); THEME_CLR(theme, clrButtonYellowBorder, 0x00000000);
THEME_CLR(theme, clrTimeline1, clrWhite); THEME_CLR(theme, clrButtonBlue, 0x00000000);
THEME_CLR(theme, clrTimeline1Blending, 0xFF828282); THEME_CLR(theme, clrButtonBlueBorder, 0x00000000);
THEME_CLR(theme, clrTimeline2, clrBlack); THEME_CLR(theme, clrButtonBlend, 0xDD000000);
THEME_CLR(theme, clrTimeline2Blending, 0xFF3F3F3F); THEME_CLR(theme, clrRecMenuBackground, 0xAA000000);
THEME_CLR(theme, clrTimeBase, 0xA0FF0000); THEME_CLR(theme, clrRecMenuTimerConflictBackground, 0xFFCCCCCC);
THEME_CLR(theme, clrTabInactive, 0xA01F3D7A); THEME_CLR(theme, clrRecMenuTimerConflictBar, 0xFF222222);
THEME_CLR(theme, clrButtonRed, 0xFFFF0000); THEME_CLR(theme, clrRecMenuTimerConflictOverlap, 0xAAFF0000);
THEME_CLR(theme, clrButtonRedBorder, 0x00000000); THEME_CLR(theme, clrRecMenuDayActive, 0xFF00FF00);
THEME_CLR(theme, clrButtonGreen, 0x00000000); THEME_CLR(theme, clrRecMenuDayInactive, 0xFFFF0000);
THEME_CLR(theme, clrButtonGreenBorder, 0x00000000); THEME_CLR(theme, clrRecMenuDayHighlight, 0x44FFFFFF);
THEME_CLR(theme, clrButtonYellow, 0x00000000); THEME_CLR(theme, clrRecMenuTextBack, 0xFF000000);
THEME_CLR(theme, clrButtonYellowBorder, 0x00000000); THEME_CLR(theme, clrRecMenuTextActiveBack, 0xFF939376);
THEME_CLR(theme, clrButtonBlue, 0x00000000); THEME_CLR(theme, clrRecMenuKeyboardBack, 0xFF000000);
THEME_CLR(theme, clrButtonBlueBorder, 0x00000000); THEME_CLR(theme, clrRecMenuKeyboardBorder, clrWhite);
THEME_CLR(theme, clrButtonBlend, 0xDD000000); THEME_CLR(theme, clrRecMenuKeyboardHigh, 0x40BB0000);
THEME_CLR(theme, clrRecMenuBackground, 0xAA000000); THEME_CLR(theme, clrButtonRedKeyboard, 0xFFBB0000);
THEME_CLR(theme, clrRecMenuTimerConflictBackground, 0xFFCCCCCC); THEME_CLR(theme, clrButtonGreenKeyboard, 0xFF00BB00);
THEME_CLR(theme, clrRecMenuTimerConflictBar, 0xFF222222); THEME_CLR(theme, clrButtonYellowKeyboard, 0xFFBBBB00);
THEME_CLR(theme, clrRecMenuTimerConflictOverlap, 0xAAFF0000); THEME_CLR(theme, clrRecMenuTimelineTimer, 0xB012273f);
THEME_CLR(theme, clrRecMenuDayActive, 0xFF00FF00); THEME_CLR(theme, clrRecMenuTimelineBack, 0xFF828282);
THEME_CLR(theme, clrRecMenuDayInactive, 0xFFFF0000); THEME_CLR(theme, clrRecMenuTimelineActive, 0xFF3F3F3F);
THEME_CLR(theme, clrRecMenuDayHighlight, 0x44FFFFFF); THEME_CLR(theme, clrRecMenuTimelineConflict, 0x30FF0000);
THEME_CLR(theme, clrRecMenuTextBack, 0xFF000000); THEME_CLR(theme, clrRecMenuTimelineConflictOverlap, 0x90FF0000);
THEME_CLR(theme, clrRecMenuTextActiveBack, 0xFF939376); #endif //__TVGUIDE_CONFIG_H
THEME_CLR(theme, clrRecMenuKeyboardBack, 0xFF000000);
THEME_CLR(theme, clrRecMenuKeyboardBorder, clrWhite);
THEME_CLR(theme, clrRecMenuKeyboardHigh, 0x40BB0000);
THEME_CLR(theme, clrButtonRedKeyboard, 0xFFBB0000);
THEME_CLR(theme, clrButtonGreenKeyboard, 0xFF00BB00);
THEME_CLR(theme, clrButtonYellowKeyboard, 0xFFBBBB00);
THEME_CLR(theme, clrRecMenuTimelineTimer, 0xB012273f);
THEME_CLR(theme, clrRecMenuTimelineBack, 0xFF828282);
THEME_CLR(theme, clrRecMenuTimelineActive, 0xFF3F3F3F);
THEME_CLR(theme, clrRecMenuTimelineConflict, 0x30FF0000);
THEME_CLR(theme, clrRecMenuTimelineConflictOverlap, 0x90FF0000);
#endif //__TVGUIDE_CONFIG_H

View File

@ -1,12 +1,12 @@
#include "detailview.h" #include "detailview.h"
cDetailView::cDetailView(const cEvent *event, cFooter *footer) : cThread("DetailView") { cDetailView::cDetailView(const cEvent *event, cFooter *footer) {
this->event = event; this->event = event;
this->footer = footer; this->footer = footer;
} }
cDetailView::~cDetailView(void){ cDetailView::~cDetailView(void){
Cancel(3); Cancel(-1);
while (Active()) while (Active())
cCondWait::SleepMs(10); cCondWait::SleepMs(10);
#if VDRVERSNUM >= 20301 #if VDRVERSNUM >= 20301
@ -32,8 +32,6 @@ void cDetailView::InitiateView(void) {
view = new cMovieView(call.movieId); view = new cMovieView(call.movieId);
} else if (call.type == tSeries) { } else if (call.type == tSeries) {
view = new cSeriesView(call.seriesId, call.episodeId); view = new cSeriesView(call.seriesId, call.episodeId);
} else {
view = new cEPGView();
} }
} else { } else {
view = new cEPGView(); view = new cEPGView();
@ -76,8 +74,8 @@ std::string cDetailView::LoadReruns(void) {
Epgsearch_searchresults_v1_0 data; Epgsearch_searchresults_v1_0 data;
std::string strQuery = event->Title(); std::string strQuery = event->Title();
if (config.displayRerunsDetailEPGView > 0) { if (tvguideConfig.displayRerunsDetailEPGView > 0) {
if (config.useSubtitleRerun == 2 && !isempty(event->ShortText())) { if (tvguideConfig.useSubtitleRerun == 2 && !isempty(event->ShortText())) {
strQuery += "~"; strQuery += "~";
strQuery += event->ShortText(); strQuery += event->ShortText();
} }
@ -97,7 +95,7 @@ std::string cDetailView::LoadReruns(void) {
if (list && (list->Count() > 1)) { if (list && (list->Count() > 1)) {
foundRerun = true; foundRerun = true;
int i = 0; int i = 0;
for (Epgsearch_searchresults_v1_0::cServiceSearchResult *r = list->First(); r && i < config.numReruns; r = list->Next(r)) { for (Epgsearch_searchresults_v1_0::cServiceSearchResult *r = list->First(); r && i < tvguideConfig.numReruns; r = list->Next(r)) {
if ((event->ChannelID() == r->event->ChannelID()) && (event->StartTime() == r->event->StartTime())) if ((event->ChannelID() == r->event->ChannelID()) && (event->StartTime() == r->event->StartTime()))
continue; continue;
i++; i++;
@ -149,14 +147,14 @@ eOSState cDetailView::ProcessKey(eKeys Key) {
bool scrolled = view->KeyUp(); bool scrolled = view->KeyUp();
if (scrolled) { if (scrolled) {
view->DrawScrollbar(); view->DrawScrollbar();
osdManager.Flush(); osdManager.flush();
} }
break; } break; }
case kDown: { case kDown: {
bool scrolled = view->KeyDown(); bool scrolled = view->KeyDown();
if (scrolled) { if (scrolled) {
view->DrawScrollbar(); view->DrawScrollbar();
osdManager.Flush(); osdManager.flush();
} }
break; } break; }
case kLeft: case kLeft:
@ -173,4 +171,4 @@ eOSState cDetailView::ProcessKey(eKeys Key) {
break; break;
} }
return state; return state;
} }

View File

@ -25,4 +25,4 @@ public:
eOSState ProcessKey(eKeys Key); eOSState ProcessKey(eKeys Key);
}; };
#endif //__TVGUIDE_DETAILVIEW_H #endif //__TVGUIDE_DETAILVIEW_H

View File

@ -1,6 +1,6 @@
#include "dummygrid.h" #include "dummygrid.h"
cDummyGrid::cDummyGrid(cChannelEpg *c, time_t start, time_t end) : cGridElement(c) { cDummyGrid::cDummyGrid(cChannelColumn *c, time_t start, time_t end) : cGrid(c) {
this->start = start; this->start = start;
this->end = end; this->end = end;
strText = tr("No EPG Information available"); strText = tr("No EPG Information available");
@ -27,31 +27,31 @@ void cDummyGrid::SetViewportHeight() {
void cDummyGrid::PositionPixmap() { void cDummyGrid::PositionPixmap() {
int x0, y0; int x0, y0;
if (config.displayMode == eVertical) { if (tvguideConfig.displayMode == eVertical) {
x0 = column->getX(); x0 = column->getX();
y0 = geoManager.statusHeaderHeight + geoManager.channelHeaderHeight + geoManager.channelGroupsHeight; y0 = geoManager.statusHeaderHeight + geoManager.channelHeaderHeight + geoManager.channelGroupsHeight;
if ( column->Start() < StartTime() ) { if ( column->Start() < StartTime() ) {
y0 += (StartTime() - column->Start())/60*geoManager.minutePixel; y0 += (StartTime() - column->Start())/60*geoManager.minutePixel;
} }
if (!pixmap) { if (!pixmap) {
pixmap = osdManager.CreatePixmap(-1, cRect(x0, y0, geoManager.colWidth, viewportHeight)); pixmap = osdManager.requestPixmap(-1, cRect(x0, y0, geoManager.colWidth, viewportHeight));
} else if (dirty) { } else if (dirty) {
osdManager.DestroyPixmap(pixmap); osdManager.releasePixmap(pixmap);
pixmap = osdManager.CreatePixmap(-1, cRect(x0, y0, geoManager.colWidth, viewportHeight)); pixmap = osdManager.requestPixmap(-1, cRect(x0, y0, geoManager.colWidth, viewportHeight));
} else { } else {
pixmap->SetViewPort(cRect(x0, y0, geoManager.colWidth, viewportHeight)); pixmap->SetViewPort(cRect(x0, y0, geoManager.colWidth, viewportHeight));
} }
} else if (config.displayMode == eHorizontal) { } else if (tvguideConfig.displayMode == eHorizontal) {
x0 = geoManager.channelHeaderWidth + geoManager.channelGroupsWidth; x0 = geoManager.channelHeaderWidth + geoManager.channelGroupsWidth;
y0 = column->getY(); y0 = column->getY();
if ( column->Start() < StartTime() ) { if ( column->Start() < StartTime() ) {
x0 += (StartTime() - column->Start())/60*geoManager.minutePixel; x0 += (StartTime() - column->Start())/60*geoManager.minutePixel;
} }
if (!pixmap) { if (!pixmap) {
pixmap = osdManager.CreatePixmap(-1, cRect(x0, y0, viewportHeight, geoManager.rowHeight)); pixmap = osdManager.requestPixmap(-1, cRect(x0, y0, viewportHeight, geoManager.rowHeight));
} else if (dirty) { } else if (dirty) {
osdManager.DestroyPixmap(pixmap); osdManager.releasePixmap(pixmap);
pixmap = osdManager.CreatePixmap(-1, cRect(x0, y0, viewportHeight, geoManager.rowHeight)); pixmap = osdManager.requestPixmap(-1, cRect(x0, y0, viewportHeight, geoManager.rowHeight));
} else { } else {
pixmap->SetViewPort(cRect(x0, y0, viewportHeight, geoManager.rowHeight)); pixmap->SetViewPort(cRect(x0, y0, viewportHeight, geoManager.rowHeight));
} }
@ -59,7 +59,7 @@ void cDummyGrid::PositionPixmap() {
} }
void cDummyGrid::setText() { void cDummyGrid::setText() {
if (config.displayMode == eVertical) { if (tvguideConfig.displayMode == eVertical) {
text->Set(*strText, fontManager.FontGrid, geoManager.colWidth-2*borderWidth); text->Set(*strText, fontManager.FontGrid, geoManager.colWidth-2*borderWidth);
} }
} }
@ -67,13 +67,13 @@ void cDummyGrid::setText() {
void cDummyGrid::drawText() { void cDummyGrid::drawText() {
tColor colorText = (active)?theme.Color(clrFontActive):theme.Color(clrFont); tColor colorText = (active)?theme.Color(clrFontActive):theme.Color(clrFont);
tColor colorTextBack; tColor colorTextBack;
if (config.style == eStyleFlat) if (tvguideConfig.style == eStyleFlat)
colorTextBack = color; colorTextBack = color;
else if (config.style == eStyleGraphical) else if (tvguideConfig.style == eStyleGraphical)
colorTextBack = (active)?theme.Color(clrGridActiveFontBack):theme.Color(clrGridFontBack); colorTextBack = (active)?theme.Color(clrGridActiveFontBack):theme.Color(clrGridFontBack);
else else
colorTextBack = clrTransparent; colorTextBack = clrTransparent;
if (config.displayMode == eVertical) { if (tvguideConfig.displayMode == eVertical) {
if (Height()/geoManager.minutePixel < 6) if (Height()/geoManager.minutePixel < 6)
return; return;
int textHeight = fontManager.FontGrid->Height(); int textHeight = fontManager.FontGrid->Height();
@ -82,7 +82,7 @@ void cDummyGrid::drawText() {
pixmap->DrawText(cPoint(borderWidth, borderWidth + i*textHeight), text->GetLine(i), colorText, colorTextBack, fontManager.FontGrid); pixmap->DrawText(cPoint(borderWidth, borderWidth + i*textHeight), text->GetLine(i), colorText, colorTextBack, fontManager.FontGrid);
} }
} else if (config.displayMode == eHorizontal) { } else if (tvguideConfig.displayMode == eHorizontal) {
if (Width()/geoManager.minutePixel < 10) { if (Width()/geoManager.minutePixel < 10) {
int titleY = (geoManager.rowHeight - fontManager.FontGridHorizontal->Height())/2; int titleY = (geoManager.rowHeight - fontManager.FontGridHorizontal->Height())/2;
pixmap->DrawText(cPoint(borderWidth - 2, titleY), "...", colorText, colorTextBack, fontManager.FontGridHorizontal); pixmap->DrawText(cPoint(borderWidth - 2, titleY), "...", colorText, colorTextBack, fontManager.FontGridHorizontal);
@ -103,9 +103,9 @@ cString cDummyGrid::getTimeString(void) {
void cDummyGrid::debug() { void cDummyGrid::debug() {
esyslog("tvguide dummygrid: %s: %s, %s, viewportHeight: %d px, Duration: %ld min, active: %d", esyslog("tvguide dummygrid: %s: %s, %s, viewportHeight: %d px, Duration: %ld min, active: %d",
column->Name(), column->Name(),
*cTimeManager::printTime(start), *cMyTime::printTime(start),
*cTimeManager::printTime(end), *cMyTime::printTime(end),
viewportHeight, viewportHeight,
Duration()/60, Duration()/60,
active); active);
} }

View File

@ -1,12 +1,12 @@
#ifndef __TVGUIDE_DUMMYGRID_H #ifndef __TVGUIDE_DUMMYGRID_H
#define __TVGUIDE_DUMMYGRID_H #define __TVGUIDE_DUMMYGRID_H
#include "gridelement.h" #include "grid.h"
#include "channelepg.h" #include "channelcolumn.h"
// --- cDummyGrid ------------------------------------------------------------- // --- cDummyGrid -------------------------------------------------------------
class cDummyGrid : public cGridElement { class cDummyGrid : public cGrid {
private: private:
time_t start; time_t start;
time_t end; time_t end;
@ -14,7 +14,7 @@ private:
void drawText(); void drawText();
time_t Duration(void); time_t Duration(void);
public: public:
cDummyGrid(cChannelEpg *c, time_t start, time_t end); cDummyGrid(cChannelColumn *c, time_t start, time_t end);
virtual ~cDummyGrid(void); virtual ~cDummyGrid(void);
void SetViewportHeight(); void SetViewportHeight();
void PositionPixmap(); void PositionPixmap();
@ -24,11 +24,11 @@ public:
time_t EndTime() { return end; }; time_t EndTime() { return end; };
void SetStartTime(time_t start) { this->start = start; }; void SetStartTime(time_t start) { this->start = start; };
void SetEndTime(time_t end) { this->end = end; }; void SetEndTime(time_t end) { this->end = end; };
int calcOverlap(cGridElement *neighbor); int calcOverlap(cGrid *neighbor);
void setTimer() {}; void setTimer() {};
cString getText(void); cString getText(void);
cString getTimeString(void); cString getTimeString(void);
void debug(); void debug();
}; };
#endif //__TVGUIDE_DUMMYGRID_H #endif //__TVGUIDE_DUMMYGRID_H

391
epggrid.c
View File

@ -1,197 +1,194 @@
#include "services/remotetimers.h" #include "services/remotetimers.h"
#include "channelepg.h" #include "channelcolumn.h"
#include "tools.h" #include "tools.h"
#include "epggrid.h" #include "epggrid.h"
cEpgGrid::cEpgGrid(cChannelEpg *c, const cEvent *event) : cGridElement(c) { cEpgGrid::cEpgGrid(cChannelColumn *c, const cEvent *event) : cGrid(c) {
this->event = event; this->event = event;
extText = new cTextWrapper(); extText = new cTextWrapper();
hasTimer = false; hasTimer = false;
SetTimer(); SetTimer();
hasSwitchTimer = false; hasSwitchTimer = false;
SetSwitchTimer(); SetSwitchTimer();
dummy = false; dummy = false;
} }
cEpgGrid::~cEpgGrid(void) { cEpgGrid::~cEpgGrid(void) {
delete extText; delete extText;
} }
void cEpgGrid::SetViewportHeight() { void cEpgGrid::SetViewportHeight() {
int viewportHeightOld = viewportHeight; int viewportHeightOld = viewportHeight;
if ( column->Start() > StartTime() ) { if ( column->Start() > StartTime() ) {
viewportHeight = (std::min((int)EndTime(), column->Stop()) - column->Start()) / 60; viewportHeight = (min((int)EndTime(), column->Stop()) - column->Start()) /60;
} else if ( column->Stop() < EndTime() ) { } else if ( column->Stop() < EndTime() ) {
viewportHeight = (column->Stop() - StartTime()) / 60; viewportHeight = (column->Stop() - StartTime()) /60;
if (viewportHeight < 0) viewportHeight = 0; if (viewportHeight < 0) viewportHeight = 0;
} else { } else {
viewportHeight = Duration() / 60; viewportHeight = Duration() / 60;
} }
viewportHeight *= geoManager.minutePixel; viewportHeight *= geoManager.minutePixel;
if (viewportHeight != viewportHeightOld) if (viewportHeight != viewportHeightOld)
dirty = true; dirty = true;
} }
void cEpgGrid::PositionPixmap() { void cEpgGrid::PositionPixmap() {
if (config.displayMode == eVertical) { if (tvguideConfig.displayMode == eVertical) {
int x0 = column->getX(); int x0 = column->getX();
int y0 = geoManager.statusHeaderHeight + geoManager.channelHeaderHeight + geoManager.channelGroupsHeight; int y0 = geoManager.statusHeaderHeight + geoManager.channelHeaderHeight + geoManager.channelGroupsHeight;
if ( column->Start() < StartTime() ) { if ( column->Start() < StartTime() ) {
y0 += (StartTime() - column->Start()) / 60 * geoManager.minutePixel; y0 += (StartTime() - column->Start())/60*geoManager.minutePixel;
} }
if (!pixmap) { if (!pixmap) {
pixmap = osdManager.CreatePixmap(-1, cRect(x0, y0, geoManager.colWidth, viewportHeight), pixmap = osdManager.requestPixmap(-1, cRect(x0, y0, geoManager.colWidth, viewportHeight),
cRect(0, 0, geoManager.colWidth, Duration() / 60 * geoManager.minutePixel)); cRect(0, 0, geoManager.colWidth, Duration()/60*geoManager.minutePixel));
} else { } else {
pixmap->SetViewPort(cRect(x0, y0, geoManager.colWidth, viewportHeight)); pixmap->SetViewPort(cRect(x0, y0, geoManager.colWidth, viewportHeight));
} }
} else if (config.displayMode == eHorizontal) { } else if (tvguideConfig.displayMode == eHorizontal) {
int x0 = geoManager.channelHeaderWidth + geoManager.channelGroupsWidth; int x0 = geoManager.channelHeaderWidth + geoManager.channelGroupsWidth;
int y0 = column->getY(); int y0 = column->getY();
if ( column->Start() < StartTime() ) { if ( column->Start() < StartTime() ) {
x0 += (StartTime() - column->Start()) / 60 * geoManager.minutePixel; x0 += (StartTime() - column->Start())/60*geoManager.minutePixel;
} }
if (!pixmap) { if (!pixmap) {
pixmap = osdManager.CreatePixmap(-1, cRect(x0, y0, viewportHeight, geoManager.rowHeight), pixmap = osdManager.requestPixmap(-1, cRect(x0, y0, viewportHeight, geoManager.rowHeight),
cRect(0, 0, Duration() / 60 * geoManager.minutePixel, geoManager.rowHeight)); cRect(0, 0, Duration()/60*geoManager.minutePixel, geoManager.rowHeight));
} else { } else {
pixmap->SetViewPort(cRect(x0, y0, viewportHeight, geoManager.rowHeight )); pixmap->SetViewPort(cRect(x0, y0, viewportHeight, geoManager.rowHeight ));
} }
} }
} }
void cEpgGrid::SetTimer() { void cEpgGrid::SetTimer() {
hasTimer = false; hasTimer = false;
if (config.useRemoteTimers && pRemoteTimers) { if (tvguideConfig.useRemoteTimers && pRemoteTimers) {
RemoteTimers_Event_v1_0 rt; RemoteTimers_Event_v1_0 rt;
rt.event = event; rt.event = event;
if (pRemoteTimers->Service("RemoteTimers::GetTimerByEvent-v1.0", &rt)) if (pRemoteTimers->Service("RemoteTimers::GetTimerByEvent-v1.0", &rt))
hasTimer = true; hasTimer = true;
#if VDRVERSNUM >= 20301 #if VDRVERSNUM >= 20301
} else { } else {
eTimerMatch TimerMatch = tmNone; eTimerMatch TimerMatch = tmNone;
LOCK_TIMERS_READ; LOCK_TIMERS_READ;
const cTimers *timers = Timers; const cTimers *timers = Timers;
if (timers->GetMatch(event, &TimerMatch) && (TimerMatch == tmFull)) if (timers->GetMatch(event, &TimerMatch) && (TimerMatch == tmFull))
hasTimer = true; hasTimer = true;
#else #else
} else if (column->HasTimer()) { } else if (column->HasTimer()) {
hasTimer = event->HasTimer(); hasTimer = event->HasTimer();
#endif #endif
} }
} }
void cEpgGrid::SetSwitchTimer() { void cEpgGrid::SetSwitchTimer() {
if (column->HasSwitchTimer()) { if (column->HasSwitchTimer()) {
hasSwitchTimer = SwitchTimers.EventInSwitchList(event); hasSwitchTimer = SwitchTimers.EventInSwitchList(event);
} else { } else {
hasSwitchTimer = false; hasSwitchTimer = false;
} }
} }
void cEpgGrid::setText() { void cEpgGrid::setText() {
if (config.displayMode == eVertical) { if (tvguideConfig.displayMode == eVertical) {
text->Set(event->Title(), fontManager.FontGrid, geoManager.colWidth - 2 * borderWidth); cString strText;
extText->Set(event->ShortText(), fontManager.FontGridSmall, geoManager.colWidth - 2 * borderWidth); strText = cString::sprintf("%s - %s:\n%s", *(event->GetTimeString()), *(event->GetEndTimeString()), event->Title());
} text->Set(*(strText), fontManager.FontGrid, geoManager.colWidth-2*borderWidth);
if (config.showTimeInGrid) { extText->Set(event->ShortText(), fontManager.FontGridSmall, geoManager.colWidth-2*borderWidth);
timeString = cString::sprintf("%s - %s:", *(event->GetTimeString()), *(event->GetEndTimeString())); } else if (tvguideConfig.displayMode == eHorizontal) {
} timeString = cString::sprintf("%s - %s", *(event->GetTimeString()), *(event->GetEndTimeString()));
} }
}
void cEpgGrid::drawText() {
tColor colorText = (active) ? theme.Color(clrFontActive) : theme.Color(clrFont); void cEpgGrid::drawText() {
tColor colorTextBack; tColor colorText = (active)?theme.Color(clrFontActive):theme.Color(clrFont);
if (config.style == eStyleFlat) tColor colorTextBack;
colorTextBack = color; if (tvguideConfig.style == eStyleFlat)
else if (config.style == eStyleGraphical) colorTextBack = color;
colorTextBack = (active) ? theme.Color(clrGridActiveFontBack) : theme.Color(clrGridFontBack); else if (tvguideConfig.style == eStyleGraphical)
else colorTextBack = (active)?theme.Color(clrGridActiveFontBack):theme.Color(clrGridFontBack);
colorTextBack = clrTransparent; else
if (config.displayMode == eVertical) { colorTextBack = clrTransparent;
if (Height() / geoManager.minutePixel < 6) if (tvguideConfig.displayMode == eVertical) {
return; if (Height()/geoManager.minutePixel < 6)
int textHeight = fontManager.FontGrid->Height(); return;
int textHeightSmall = fontManager.FontGridSmall->Height(); int textHeight = fontManager.FontGrid->Height();
int textLines = text->Lines(); int textLines = text->Lines();
int titleY = borderWidth; for (int i=0; i<textLines; i++) {
if (config.showTimeInGrid) { // mit Zeitangabe im Grid pixmap->DrawText(cPoint(borderWidth, borderWidth + i*textHeight), text->GetLine(i), colorText, colorTextBack, fontManager.FontGrid);
pixmap->DrawText(cPoint(borderWidth, borderWidth), *timeString, colorText, colorTextBack, fontManager.FontGridSmall); }
titleY += textHeightSmall; int extTextLines = extText->Lines();
} int offset = (textLines+1)*textHeight - 0.5*textHeight;
for (int i = 0; i < textLines; i++) { textHeight = fontManager.FontGridSmall->Height();
pixmap->DrawText(cPoint(borderWidth, titleY + i * textHeight), text->GetLine(i), colorText, colorTextBack, fontManager.FontGrid); if ((Height()-textHeight-10) > offset) {
} for (int i=0; i<extTextLines; i++) {
int extTextLines = extText->Lines(); 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++) { } else if (tvguideConfig.displayMode == eHorizontal) {
pixmap->DrawText(cPoint(borderWidth, offset + i * textHeightSmall), extText->GetLine(i), colorText, colorTextBack, fontManager.FontGridSmall); if (Width()/geoManager.minutePixel < 10) {
} int titleY = (geoManager.rowHeight - fontManager.FontGridHorizontal->Height())/2;
} pixmap->DrawText(cPoint(borderWidth - 2, titleY), "...", colorText, colorTextBack, fontManager.FontGridHorizontal);
} else if (config.displayMode == eHorizontal) { return;
cString strTitle = CutText(event->Title(), viewportHeight - borderWidth, fontManager.FontGridHorizontal).c_str(); }
int titleY = 0; cString strTitle = CutText(event->Title(), viewportHeight, fontManager.FontGridHorizontal).c_str();
if (config.showTimeInGrid) { // mit Zeitangabe im Grid int titleY = 0;
pixmap->DrawText(cPoint(borderWidth, borderWidth), *timeString, colorText, colorTextBack, fontManager.FontGridHorizontalSmall); if (tvguideConfig.showTimeInGrid) {
titleY = fontManager.FontGridHorizontalSmall->Height() + (geoManager.rowHeight - fontManager.FontGridHorizontalSmall->Height() - fontManager.FontGridHorizontal->Height()) / 2; pixmap->DrawText(cPoint(borderWidth, borderWidth), *timeString, colorText, colorTextBack, fontManager.FontGridHorizontalSmall);
} else { titleY = fontManager.FontGridHorizontalSmall->Height() + (geoManager.rowHeight - fontManager.FontGridHorizontalSmall->Height() - fontManager.FontGridHorizontal->Height())/2;
titleY = (geoManager.rowHeight - fontManager.FontGridHorizontal->Height()) / 2; } else {
} titleY = (geoManager.rowHeight - fontManager.FontGridHorizontal->Height())/2;
pixmap->DrawText(cPoint(borderWidth, titleY), *strTitle, colorText, colorTextBack, fontManager.FontGridHorizontal); }
} pixmap->DrawText(cPoint(borderWidth, titleY), *strTitle, colorText, colorTextBack, fontManager.FontGridHorizontal);
if (hasSwitchTimer) }
drawIcon("Switch", theme.Color(clrButtonYellow)); if (hasSwitchTimer)
if (hasTimer) { drawIcon("Switch", theme.Color(clrButtonYellow));
const cTimer *timer = NULL; if (hasTimer) {
#if VDRVERSNUM >= 20301 const cTimer *timer = NULL;
{ #if VDRVERSNUM >= 20301
LOCK_TIMERS_READ; {
timer = Timers->GetMatch(event); LOCK_TIMERS_READ;
} timer = Timers->GetMatch(event);
#else }
timer = Timers.GetMatch(event); #else
#endif timer = Timers.GetMatch(event);
if (timer) #endif
#ifdef SWITCHONLYPATCH if (timer)
if (timer->HasFlags(tfSwitchOnly)) #ifdef SWITCHONLYPATCH
drawIcon("Switch", theme.Color(clrButtonYellow)); if (timer->HasFlags(tfSwitchOnly))
else if (timer->HasFlags(tfActive)) drawIcon("Switch", theme.Color(clrButtonYellow));
#else /* SWITCHONLY */ else if (timer->HasFlags(tfActive))
if (timer->HasFlags(tfActive)) #else /* SWITCHONLY */
#endif /* SWITCHONLY */ if (timer->HasFlags(tfActive))
drawIcon("REC", theme.Color(clrButtonRed)); #endif /* SWITCHONLY */
else drawIcon("REC", theme.Color(clrButtonRed));
drawIcon("REC", theme.Color(clrButtonGreen)); else
} drawIcon("REC", theme.Color(clrButtonGreen));
} }
}
void cEpgGrid::drawIcon(cString iconText, tColor color) {
void cEpgGrid::drawIcon(cString iconText, tColor color) {
const cFont *font = (config.displayMode == eVertical) ? fontManager.FontGrid : fontManager.FontGridHorizontalSmall;
int textWidth = font->Width(*iconText) + 2 * borderWidth; const cFont *font = (tvguideConfig.displayMode == eVertical)
int textHeight = font->Height() + 10; ?fontManager.FontGrid
if ((config.displayMode == eHorizontal) && ((Width() - 2 * textWidth) < 0)) :fontManager.FontGridHorizontalSmall;
pixmap->DrawEllipse( cRect(Width() - textHeight / 2 - borderWidth, Height() - textHeight - borderWidth, textHeight / 2, textHeight / 2), color); int textWidth = font->Width(*iconText)+2*borderWidth;
else if ((config.displayMode == eVertical) && ((Height() - 2 * textHeight) < 0)) int textHeight = font->Height()+10;
pixmap->DrawEllipse( cRect(Width() - textHeight / 2 - borderWidth, borderWidth, textHeight / 2, textHeight / 2), color); pixmap->DrawRectangle( cRect(Width() - textWidth - borderWidth, Height() - textHeight - borderWidth, textWidth, textHeight), color);
else { pixmap->DrawText(cPoint(Width() - textWidth, Height() - textHeight - borderWidth/2), *iconText, theme.Color(clrFont), color, font);
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) {
} return cString::sprintf("%s - %s", *(event->GetTimeString()), *(event->GetEndTimeString()));
}
cString cEpgGrid::getTimeString(void) {
return cString::sprintf("%s - %s", *(event->GetTimeString()), *(event->GetEndTimeString())); void cEpgGrid::debug() {
} esyslog("tvguide epggrid: %s: %s, %s, viewportHeight: %d px, Duration: %d min, active: %d",
column->Name(),
void cEpgGrid::debug() { *(event->GetTimeString()),
esyslog("tvguide epggrid: %s: %s, %s, viewportHeight: %d px, Duration: %d min, active: %d", event->Title(),
column->Name(), viewportHeight,
*(event->GetTimeString()), event->Duration()/60,
event->Title(), active);
viewportHeight, }
event->Duration()/60,
active);
}

View File

@ -1,33 +1,33 @@
#ifndef __TVGUIDE_EPGGRID_H #ifndef __TVGUIDE_EPGGRID_H
#define __TVGUIDE_EPGGRID_H #define __TVGUIDE_EPGGRID_H
#include <vdr/epg.h> #include <vdr/epg.h>
#include "gridelement.h" #include "grid.h"
// --- cEpgGrid ------------------------------------------------------------- // --- cEpgGrid -------------------------------------------------------------
class cEpgGrid : public cGridElement { class cEpgGrid : public cGrid {
private: private:
const cTimer *timer; const cTimer *timer;
const cEvent *event; const cEvent *event;
cTextWrapper *extText; cTextWrapper *extText;
cString timeString; cString timeString;
void drawText(); void drawText();
void drawIcon(cString iconText, tColor color); void drawIcon(cString iconText, tColor color);
time_t Duration(void) { return event->Duration(); }; time_t Duration(void) { return event->Duration(); };
public: public:
cEpgGrid(cChannelEpg *c, const cEvent *event); cEpgGrid(cChannelColumn *c, const cEvent *event);
virtual ~cEpgGrid(void); virtual ~cEpgGrid(void);
void SetViewportHeight(); void SetViewportHeight();
void PositionPixmap(); void PositionPixmap();
void setText(void); void setText(void);
const cEvent *GetEvent() {return event;}; const cEvent *GetEvent() {return event;};
time_t StartTime() { return event->StartTime(); }; time_t StartTime() { return event->StartTime(); };
time_t EndTime() { return event->EndTime(); }; time_t EndTime() { return event->EndTime(); };
void SetTimer(); void SetTimer();
void SetSwitchTimer(); void SetSwitchTimer();
cString getTimeString(void); cString getTimeString(void);
void debug(); void debug();
}; };
#endif //__TVGUIDE_EPGGRID_H #endif //__TVGUIDE_EPGGRID_H

View File

@ -1,96 +1,96 @@
#include "geometrymanager.h" #include "geometrymanager.h"
#include "config.h" #include "config.h"
#include "fontmanager.h" #include "fontmanager.h"
cFontManager::cFontManager() { cFontManager::cFontManager() {
} }
cFontManager::~cFontManager() { cFontManager::~cFontManager() {
DeleteFonts(); DeleteFonts();
} }
void cFontManager::SetFonts() { void cFontManager::SetFonts() {
InitialiseFontType(); InitialiseFontType();
//Common Fonts //Common Fonts
FontButton = CreateFont(geoManager.footerHeight/3 + 4 + config.FontButtonDelta); FontButton = CreateFont(geoManager.footerHeight/3 + 4 + tvguideConfig.FontButtonDelta);
FontDetailView = CreateFont(geoManager.osdHeight/30 + config.FontDetailViewDelta); FontDetailView = CreateFont(geoManager.osdHeight/30 + tvguideConfig.FontDetailViewDelta);
FontDetailViewSmall = CreateFont(geoManager.osdHeight/40 + config.FontDetailViewSmallDelta); FontDetailViewSmall = CreateFont(geoManager.osdHeight/40 + tvguideConfig.FontDetailViewSmallDelta);
FontDetailHeader = CreateFont(geoManager.osdHeight/27 + config.FontDetailHeaderDelta); FontDetailHeader = CreateFont(geoManager.osdHeight/27 + tvguideConfig.FontDetailHeaderDelta);
FontDetailHeaderLarge = CreateFont(geoManager.osdHeight/20 + config.FontDetailHeaderDelta); FontDetailHeaderLarge = CreateFont(geoManager.osdHeight/20 + tvguideConfig.FontDetailHeaderDelta);
FontMessageBox = CreateFont(geoManager.osdHeight/33 + config.FontMessageBoxDelta); FontMessageBox = CreateFont(geoManager.osdHeight/33 + tvguideConfig.FontMessageBoxDelta);
FontMessageBoxLarge = CreateFont(geoManager.osdHeight/30 + config.FontMessageBoxLargeDelta); FontMessageBoxLarge = CreateFont(geoManager.osdHeight/30 + tvguideConfig.FontMessageBoxLargeDelta);
FontStatusHeader = CreateFont(geoManager.statusHeaderHeight/6 - 4 + config.FontStatusHeaderDelta); FontStatusHeader = CreateFont(geoManager.statusHeaderHeight/6 - 4 + tvguideConfig.FontStatusHeaderDelta);
FontStatusHeaderLarge = CreateFont(geoManager.statusHeaderHeight/5 + config.FontStatusHeaderLargeDelta); FontStatusHeaderLarge = CreateFont(geoManager.statusHeaderHeight/5 + tvguideConfig.FontStatusHeaderLargeDelta);
//Fonts for vertical Display //Fonts for vertical Display
FontChannelHeader = CreateFont(geoManager.colWidth/10 + config.FontChannelHeaderDelta); FontChannelHeader = CreateFont(geoManager.colWidth/10 + tvguideConfig.FontChannelHeaderDelta);
FontChannelGroups = CreateFont(geoManager.colWidth/8 + config.FontChannelGroupsDelta); FontChannelGroups = CreateFont(geoManager.colWidth/8 + tvguideConfig.FontChannelGroupsDelta);
FontGrid = CreateFont(geoManager.colWidth/12 + config.FontGridDelta); FontGrid = CreateFont(geoManager.colWidth/12 + tvguideConfig.FontGridDelta);
FontGridSmall = CreateFont(geoManager.colWidth/12 + config.FontGridSmallDelta); FontGridSmall = CreateFont(geoManager.colWidth/12 + tvguideConfig.FontGridSmallDelta);
FontTimeLineWeekday = CreateFont(geoManager.timeLineWidth/3 + config.FontTimeLineWeekdayDelta); FontTimeLineWeekday = CreateFont(geoManager.timeLineWidth/3 + tvguideConfig.FontTimeLineWeekdayDelta);
FontTimeLineDate = CreateFont(geoManager.timeLineWidth/4 + config.FontTimeLineDateDelta); FontTimeLineDate = CreateFont(geoManager.timeLineWidth/4 + tvguideConfig.FontTimeLineDateDelta);
FontTimeLineTime = CreateFont(geoManager.timeLineWidth/4 + config.FontTimeLineTimeDelta); FontTimeLineTime = CreateFont(geoManager.timeLineWidth/4 + tvguideConfig.FontTimeLineTimeDelta);
//Fonts for horizontal Display //Fonts for horizontal Display
FontChannelHeaderHorizontal = CreateFont(geoManager.rowHeight/3 + config.FontChannelHeaderHorizontalDelta); FontChannelHeaderHorizontal = CreateFont(geoManager.rowHeight/3 + tvguideConfig.FontChannelHeaderHorizontalDelta);
FontChannelGroupsHorizontal = CreateFont(geoManager.rowHeight/3 + 5 + config.FontChannelGroupsHorizontalDelta); FontChannelGroupsHorizontal = CreateFont(geoManager.rowHeight/3 + 5 + tvguideConfig.FontChannelGroupsHorizontalDelta);
FontGridHorizontal = CreateFont(geoManager.rowHeight/3 + 5 + config.FontGridHorizontalDelta); FontGridHorizontal = CreateFont(geoManager.rowHeight/3 + 5 + tvguideConfig.FontGridHorizontalDelta);
FontGridHorizontalSmall = CreateFont(geoManager.rowHeight/4 + config.FontGridHorizontalSmallDelta); FontGridHorizontalSmall = CreateFont(geoManager.rowHeight/4 + tvguideConfig.FontGridHorizontalSmallDelta);
FontTimeLineDateHorizontal = CreateFont(geoManager.timeLineHeight/2 + 5 + config.FontTimeLineDateHorizontalDelta); FontTimeLineDateHorizontal = CreateFont(geoManager.timeLineHeight/2 + 5 + tvguideConfig.FontTimeLineDateHorizontalDelta);
FontTimeLineTimeHorizontal = CreateFont(geoManager.timeLineHeight/2 + config.FontTimeLineTimeHorizontalDelta); FontTimeLineTimeHorizontal = CreateFont(geoManager.timeLineHeight/2 + tvguideConfig.FontTimeLineTimeHorizontalDelta);
//Fonts for RecMenu //Fonts for RecMenu
FontRecMenuItem = CreateFont(geoManager.osdHeight/30 + config.FontRecMenuItemDelta); FontRecMenuItem = CreateFont(geoManager.osdHeight/30 + tvguideConfig.FontRecMenuItemDelta);
FontRecMenuItemSmall = CreateFont(geoManager.osdHeight/40 + config.FontRecMenuItemSmallDelta); FontRecMenuItemSmall = CreateFont(geoManager.osdHeight/40 + tvguideConfig.FontRecMenuItemSmallDelta);
FontRecMenuItemLarge = CreateFont(geoManager.osdHeight/25 + config.FontRecMenuItemLargeDelta); FontRecMenuItemLarge = CreateFont(geoManager.osdHeight/25 + tvguideConfig.FontRecMenuItemLargeDelta);
} }
void cFontManager::DeleteFonts() { void cFontManager::DeleteFonts() {
delete FontButton; delete FontButton;
delete FontDetailView; delete FontDetailView;
delete FontDetailViewSmall; delete FontDetailViewSmall;
delete FontDetailHeader; delete FontDetailHeader;
delete FontDetailHeaderLarge; delete FontDetailHeaderLarge;
delete FontMessageBox; delete FontMessageBox;
delete FontMessageBoxLarge; delete FontMessageBoxLarge;
delete FontStatusHeader; delete FontStatusHeader;
delete FontStatusHeaderLarge; delete FontStatusHeaderLarge;
delete FontChannelHeader; delete FontChannelHeader;
delete FontChannelGroups; delete FontChannelGroups;
delete FontGrid; delete FontGrid;
delete FontGridSmall; delete FontGridSmall;
delete FontTimeLineWeekday; delete FontTimeLineWeekday;
delete FontTimeLineDate; delete FontTimeLineDate;
delete FontTimeLineTime; delete FontTimeLineTime;
delete FontChannelHeaderHorizontal; delete FontChannelHeaderHorizontal;
delete FontChannelGroupsHorizontal; delete FontChannelGroupsHorizontal;
delete FontGridHorizontal; delete FontGridHorizontal;
delete FontGridHorizontalSmall; delete FontGridHorizontalSmall;
delete FontTimeLineDateHorizontal; delete FontTimeLineDateHorizontal;
delete FontTimeLineTimeHorizontal; delete FontTimeLineTimeHorizontal;
delete FontRecMenuItem; delete FontRecMenuItem;
delete FontRecMenuItemSmall; delete FontRecMenuItemSmall;
delete FontRecMenuItemLarge; delete FontRecMenuItemLarge;
} }
void cFontManager::InitialiseFontType(void) { void cFontManager::InitialiseFontType(void) {
if (config.fontIndex == 0) { if (tvguideConfig.fontIndex == 0) {
fontName = config.fontNameDefault; fontName = tvguideConfig.fontNameDefault;
} else { } else {
cStringList availableFonts; cStringList availableFonts;
cFont::GetAvailableFontNames(&availableFonts); cFont::GetAvailableFontNames(&availableFonts);
if (availableFonts[config.fontIndex-1]) { if (availableFonts[tvguideConfig.fontIndex-1]) {
fontName = availableFonts[config.fontIndex-1]; fontName = availableFonts[tvguideConfig.fontIndex-1];
} else } else
fontName = config.fontNameDefault; fontName = tvguideConfig.fontNameDefault;
} }
cFont *test = NULL; cFont *test = NULL;
test = cFont::CreateFont(*fontName, 30); test = cFont::CreateFont(*fontName, 30);
if (!test) { if (!test) {
fontName = DefaultFontSml; fontName = DefaultFontSml;
} }
delete test; delete test;
esyslog("tvguide: Set Font to %s", *fontName); esyslog("tvguide: Set Font to %s", *fontName);
} }
cFont *cFontManager::CreateFont(int size) { cFont *cFontManager::CreateFont(int size) {
return cFont::CreateFont(*fontName, size); return cFont::CreateFont(*fontName, size);
} }

View File

@ -1,41 +1,41 @@
#ifndef __TVGUIDE_FONTMANAGER_H #ifndef __TVGUIDE_FONTMANAGER_H
#define __TVGUIDE_FONTMANAGER_H #define __TVGUIDE_FONTMANAGER_H
#include <vdr/skins.h> #include <vdr/skins.h>
class cFontManager { class cFontManager {
cString fontName; cString fontName;
void InitialiseFontType(void); void InitialiseFontType(void);
cFont *CreateFont(int size); cFont *CreateFont(int size);
public: public:
cFontManager(); cFontManager();
~cFontManager(); ~cFontManager();
void SetFonts(void); void SetFonts(void);
void DeleteFonts(void); void DeleteFonts(void);
cFont *FontChannelHeader; cFont *FontChannelHeader;
cFont *FontChannelHeaderHorizontal; cFont *FontChannelHeaderHorizontal;
cFont *FontChannelGroups; cFont *FontChannelGroups;
cFont *FontChannelGroupsHorizontal; cFont *FontChannelGroupsHorizontal;
cFont *FontStatusHeader; cFont *FontStatusHeader;
cFont *FontStatusHeaderLarge; cFont *FontStatusHeaderLarge;
cFont *FontGrid; cFont *FontGrid;
cFont *FontGridSmall; cFont *FontGridSmall;
cFont *FontGridHorizontal; cFont *FontGridHorizontal;
cFont *FontGridHorizontalSmall; cFont *FontGridHorizontalSmall;
cFont *FontTimeLineWeekday; cFont *FontTimeLineWeekday;
cFont *FontTimeLineDate; cFont *FontTimeLineDate;
cFont *FontTimeLineDateHorizontal; cFont *FontTimeLineDateHorizontal;
cFont *FontTimeLineTime; cFont *FontTimeLineTime;
cFont *FontTimeLineTimeHorizontal; cFont *FontTimeLineTimeHorizontal;
cFont *FontButton; cFont *FontButton;
cFont *FontDetailView; cFont *FontDetailView;
cFont *FontDetailViewSmall; cFont *FontDetailViewSmall;
cFont *FontDetailHeader; cFont *FontDetailHeader;
cFont *FontDetailHeaderLarge; cFont *FontDetailHeaderLarge;
cFont *FontMessageBox; cFont *FontMessageBox;
cFont *FontMessageBoxLarge; cFont *FontMessageBoxLarge;
cFont *FontRecMenuItem; cFont *FontRecMenuItem;
cFont *FontRecMenuItemSmall; cFont *FontRecMenuItemSmall;
cFont *FontRecMenuItemLarge; cFont *FontRecMenuItemLarge;
}; };
#endif //__TVGUIDE_FONTMANAGER_H #endif //__TVGUIDE_FONTMANAGER_H

334
footer.c
View File

@ -1,167 +1,167 @@
#include <string> #include <string>
#include "imageloader.h" #include "imageloader.h"
#include "tools.h" #include "tools.h"
#include "footer.h" #include "footer.h"
cFooter::cFooter(cChannelGroups *channelGroups) { cFooter::cFooter(cChannelGroups *channelGroups) {
this->channelGroups = channelGroups; this->channelGroups = channelGroups;
currentGroup = -1; currentGroup = -1;
buttonY = (geoManager.footerHeight - geoManager.buttonHeight)/2; buttonY = (geoManager.footerHeight - geoManager.buttonHeight)/2;
SetButtonPositions(); SetButtonPositions();
footer = osdManager.CreatePixmap(2, cRect( 0, footer = osdManager.requestPixmap(2, cRect( 0,
geoManager.footerY, geoManager.footerY,
geoManager.osdWidth, geoManager.osdWidth,
geoManager.footerHeight), geoManager.footerHeight),
cRect::Null); cRect::Null);
footer->Fill(clrTransparent); footer->Fill(clrTransparent);
} }
cFooter::~cFooter(void) { cFooter::~cFooter(void) {
osdManager.DestroyPixmap(footer); osdManager.releasePixmap(footer);
} }
void cFooter::drawRedButton() { void cFooter::drawRedButton() {
cString text(tr("Search & Rec")); cString text(tr("Search & Rec"));
DrawButton(*text, theme.Color(clrButtonRed), theme.Color(clrButtonRedBorder), oeButtonRed, positionButtons[0]); DrawButton(*text, theme.Color(clrButtonRed), theme.Color(clrButtonRedBorder), oeButtonRed, positionButtons[0]);
} }
void cFooter::drawGreenButton() { void cFooter::drawGreenButton() {
cString text = cString::sprintf("%d %s", config.jumpChannels, tr("Channels back")); cString text = cString::sprintf("%d %s", tvguideConfig.jumpChannels, tr("Channels back"));
DrawButton(*text, theme.Color(clrButtonGreen), theme.Color(clrButtonGreenBorder), oeButtonGreen, positionButtons[1]); DrawButton(*text, theme.Color(clrButtonGreen), theme.Color(clrButtonGreenBorder), oeButtonGreen, positionButtons[1]);
} }
void cFooter::drawGreenButton(const char *text) { void cFooter::drawGreenButton(const char *text) {
std::string cuttedText = CutText(text, geoManager.buttonWidth-6, fontManager.FontButton); std::string cuttedText = CutText(text, geoManager.buttonWidth-6, fontManager.FontButton);
DrawButton(cuttedText.c_str(), theme.Color(clrButtonGreen), theme.Color(clrButtonGreenBorder), oeButtonGreen, positionButtons[1]); DrawButton(cuttedText.c_str(), theme.Color(clrButtonGreen), theme.Color(clrButtonGreenBorder), oeButtonGreen, positionButtons[1]);
} }
void cFooter::drawYellowButton() { void cFooter::drawYellowButton() {
cString text = cString::sprintf("%d %s", config.jumpChannels, tr("Channels forward")); cString text = cString::sprintf("%d %s", tvguideConfig.jumpChannels, tr("Channels forward"));
DrawButton(*text, theme.Color(clrButtonYellow), theme.Color(clrButtonYellowBorder), oeButtonYellow, positionButtons[2]); DrawButton(*text, theme.Color(clrButtonYellow), theme.Color(clrButtonYellowBorder), oeButtonYellow, positionButtons[2]);
} }
void cFooter::drawYellowButton(const char *text) { void cFooter::drawYellowButton(const char *text) {
std::string cuttedText = CutText(text, geoManager.buttonWidth-6, fontManager.FontButton); std::string cuttedText = CutText(text, geoManager.buttonWidth-6, fontManager.FontButton);
DrawButton(cuttedText.c_str(), theme.Color(clrButtonYellow), theme.Color(clrButtonYellowBorder), oeButtonYellow, positionButtons[2]); DrawButton(cuttedText.c_str(), theme.Color(clrButtonYellow), theme.Color(clrButtonYellowBorder), oeButtonYellow, positionButtons[2]);
} }
void cFooter::drawBlueButton(bool detailedEPG) { void cFooter::drawBlueButton(bool detailedEPG) {
cString text; cString text;
if (config.blueKeyMode == eBlueKeySwitch) if (tvguideConfig.blueKeyMode == eBlueKeySwitch)
text = tr("Switch to Channel"); text = tr("Switch to Channel");
else if (config.blueKeyMode == eBlueKeyEPG) { else if (tvguideConfig.blueKeyMode == eBlueKeyEPG) {
if (!detailedEPG) if (!detailedEPG)
text = tr("Detailed EPG"); text = tr("Detailed EPG");
else else
text = tr("Close detailed EPG"); text = tr("Close detailed EPG");
} else if (config.blueKeyMode == eBlueKeyFavorites) { } else if (tvguideConfig.blueKeyMode == eBlueKeyFavorites) {
if (!detailedEPG) if (!detailedEPG)
text = tr("Favorites"); text = tr("Favorites");
else else
text = tr("Switch to Channel"); text = tr("Switch to Channel");
} }
DrawButton(*text, theme.Color(clrButtonBlue), theme.Color(clrButtonBlueBorder), oeButtonBlue, positionButtons[3]); DrawButton(*text, theme.Color(clrButtonBlue), theme.Color(clrButtonBlueBorder), oeButtonBlue, positionButtons[3]);
} }
void cFooter::UpdateGroupButtons(const cChannel *channel, bool force) { void cFooter::UpdateGroupButtons(const cChannel *channel, bool force) {
if (!channel) if (!channel)
return; return;
int group = channelGroups->GetGroup(channel); int group = channelGroups->GetGroup(channel);
if ((group != currentGroup) || force) { if ((group != currentGroup) || force) {
currentGroup = group; currentGroup = group;
drawGreenButton(channelGroups->GetPrev(group)); drawGreenButton(channelGroups->GetPrev(group));
drawYellowButton(channelGroups->GetNext(group)); drawYellowButton(channelGroups->GetNext(group));
} }
} }
void cFooter::SetDetailedViewMode(bool fromRecMenu) { void cFooter::SetDetailedViewMode(bool fromRecMenu) {
ClearButton(positionButtons[1]); ClearButton(positionButtons[1]);
ClearButton(positionButtons[2]); ClearButton(positionButtons[2]);
if (fromRecMenu) { if (fromRecMenu) {
ClearButton(positionButtons[0]); ClearButton(positionButtons[0]);
ClearButton(positionButtons[3]); ClearButton(positionButtons[3]);
} else if (config.blueKeyMode != eBlueKeySwitch) { } else if (tvguideConfig.blueKeyMode != eBlueKeySwitch) {
ClearButton(positionButtons[3]); ClearButton(positionButtons[3]);
drawBlueButton(true); drawBlueButton(true);
} }
} }
void cFooter::LeaveDetailedViewMode(const cChannel *channel) { void cFooter::LeaveDetailedViewMode(const cChannel *channel) {
drawRedButton(); drawRedButton();
drawBlueButton(); drawBlueButton();
if (config.channelJumpMode == eNumJump) { if (tvguideConfig.channelJumpMode == eNumJump) {
drawGreenButton(); drawGreenButton();
drawYellowButton(); drawYellowButton();
} else { } else {
UpdateGroupButtons(channel, true); UpdateGroupButtons(channel, true);
} }
} }
void cFooter::SetButtonPositions(void) { void cFooter::SetButtonPositions(void) {
for (int i=0; i < 4; i++) { for (int i=0; i < 4; i++) {
positionButtons[i] = -1; positionButtons[i] = -1;
} }
/* /*
red button = 0 red button = 0
green button = 1 green button = 1
yellow button = 2 yellow button = 2
blue button = 3 blue button = 3
*/ */
for (int button=0; button<4; button++) { for (int button=0; button<4; button++) {
if (Setup.ColorKey0 == button) { if (Setup.ColorKey0 == button) {
positionButtons[button] = 0; positionButtons[button] = 0;
continue; continue;
} }
if (Setup.ColorKey1 == button) { if (Setup.ColorKey1 == button) {
positionButtons[button] = 1; positionButtons[button] = 1;
continue; continue;
} }
if (Setup.ColorKey2 == button) { if (Setup.ColorKey2 == button) {
positionButtons[button] = 2; positionButtons[button] = 2;
continue; continue;
} }
if (Setup.ColorKey3 == button) { if (Setup.ColorKey3 == button) {
positionButtons[button] = 3; positionButtons[button] = 3;
continue; continue;
} }
} }
} }
void cFooter::DrawButton(const char *text, tColor color, tColor borderColor, eOsdElementType buttonType, int num) { void cFooter::DrawButton(const char *text, tColor color, tColor borderColor, eOsdElementType buttonType, int num) {
tColor colorTextBack = (config.style == eStyleFlat)?color:clrTransparent; tColor colorTextBack = (tvguideConfig.style == eStyleFlat)?color:clrTransparent;
int left = num * geoManager.buttonWidth + (2 * num + 1) * geoManager.buttonBorder; int left = num * geoManager.buttonWidth + (2 * num + 1) * geoManager.buttonBorder;
if ((config.style == eStyleBlendingMagick) || (config.style == eStyleBlendingDefault)) { if ((tvguideConfig.style == eStyleBlendingMagick) || (tvguideConfig.style == eStyleBlendingDefault)) {
cImageLoader imgLoader; cImageLoader imgLoader;
imgLoader.DrawBackground(theme.Color(clrButtonBlend), color, geoManager.buttonWidth-4, geoManager.buttonHeight-4); imgLoader.DrawBackground(theme.Color(clrButtonBlend), color, geoManager.buttonWidth-4, geoManager.buttonHeight-4);
footer->DrawRectangle(cRect(left, buttonY, geoManager.buttonWidth, geoManager.buttonHeight), borderColor); footer->DrawRectangle(cRect(left, buttonY, geoManager.buttonWidth, geoManager.buttonHeight), borderColor);
footer->DrawImage(cPoint(left+2, buttonY+2), imgLoader.GetImage()); footer->DrawImage(cPoint(left+2, buttonY+2), imgLoader.GetImage());
if (config.roundedCorners) { if (tvguideConfig.roundedCorners) {
int borderRadius = 12; int borderRadius = 12;
int borderWidth = 2; int borderWidth = 2;
DrawRoundedCorners(footer, left, buttonY, geoManager.buttonWidth, geoManager.buttonHeight, borderRadius, borderWidth, borderColor); DrawRoundedCorners(footer, left, buttonY, geoManager.buttonWidth, geoManager.buttonHeight, borderRadius, borderWidth, borderColor);
} }
} else if (config.style == eStyleGraphical) { } else if (tvguideConfig.style == eStyleGraphical) {
cImage *button = imgCache.GetOsdElement(buttonType); cImage *button = imgCache.GetOsdElement(buttonType);
if (button) { if (button) {
footer->DrawImage(cPoint(left, buttonY), *button); footer->DrawImage(cPoint(left, buttonY), *button);
} }
} else { } else {
footer->DrawRectangle(cRect(left, buttonY, geoManager.buttonWidth, geoManager.buttonHeight), borderColor); footer->DrawRectangle(cRect(left, buttonY, geoManager.buttonWidth, geoManager.buttonHeight), borderColor);
footer->DrawRectangle(cRect(left+1, buttonY+1, geoManager.buttonWidth-2, geoManager.buttonHeight-2), color); footer->DrawRectangle(cRect(left+1, buttonY+1, geoManager.buttonWidth-2, geoManager.buttonHeight-2), color);
if (config.roundedCorners) { if (tvguideConfig.roundedCorners) {
int borderRadius = 12; int borderRadius = 12;
int borderWidth = 1; int borderWidth = 1;
DrawRoundedCorners(footer, left, buttonY, geoManager.buttonWidth, geoManager.buttonHeight, borderRadius, borderWidth, borderColor); DrawRoundedCorners(footer, left, buttonY, geoManager.buttonWidth, geoManager.buttonHeight, borderRadius, borderWidth, borderColor);
} }
} }
int textWidth = fontManager.FontButton->Width(text); int textWidth = fontManager.FontButton->Width(text);
int textHeight = fontManager.FontButton->Height(); int textHeight = fontManager.FontButton->Height();
footer->DrawText(cPoint(left + (geoManager.buttonWidth-textWidth)/2, buttonY + (geoManager.buttonHeight-textHeight)/2), text, theme.Color(clrFontButtons), colorTextBack, fontManager.FontButton); footer->DrawText(cPoint(left + (geoManager.buttonWidth-textWidth)/2, buttonY + (geoManager.buttonHeight-textHeight)/2), text, theme.Color(clrFontButtons), colorTextBack, fontManager.FontButton);
} }
void cFooter::ClearButton(int num) { void cFooter::ClearButton(int num) {
int left = num * geoManager.buttonWidth + (2 * num + 1) * geoManager.buttonBorder; int left = num * geoManager.buttonWidth + (2 * num + 1) * geoManager.buttonBorder;
footer->DrawRectangle(cRect(left, buttonY, geoManager.buttonWidth, geoManager.buttonHeight), clrTransparent); footer->DrawRectangle(cRect(left, buttonY, geoManager.buttonWidth, geoManager.buttonHeight), clrTransparent);
} }

View File

@ -30,4 +30,4 @@ public:
void LeaveDetailedViewMode(const cChannel *channel); void LeaveDetailedViewMode(const cChannel *channel);
}; };
#endif //__TVGUIDE_FOOTER_H #endif //__TVGUIDE_FOOTER_H

View File

@ -1,76 +1,76 @@
#include <vdr/osd.h> #include <vdr/osd.h>
#include "config.h" #include "config.h"
#include "geometrymanager.h" #include "geometrymanager.h"
cGeometryManager::cGeometryManager() { cGeometryManager::cGeometryManager() {
osdWidth = 0; osdWidth = 0;
osdHeight = 0; osdHeight = 0;
} }
cGeometryManager::~cGeometryManager() { cGeometryManager::~cGeometryManager() {
} }
bool cGeometryManager::SetGeometry(int osdWidth, int osdHeight, bool force) { bool cGeometryManager::SetGeometry(int osdWidth, int osdHeight, bool force) {
if (!force && (this->osdWidth == osdWidth) && (this->osdHeight == osdHeight)) { if (!force && (this->osdWidth == osdWidth) && (this->osdHeight == osdHeight)) {
esyslog("tvgudie: GeoManager SetGeometry nothing to change"); esyslog("tvgudie: GeoManager SetGeometry nothing to change");
return false; return false;
} }
this->osdWidth = osdWidth; this->osdWidth = osdWidth;
this->osdHeight = osdHeight; this->osdHeight = osdHeight;
esyslog("tvguide: Set OSD to %d x %d px", osdWidth, osdHeight); esyslog("tvguide: Set OSD to %d x %d px", osdWidth, osdHeight);
statusHeaderHeight = (config.displayStatusHeader) ? (config.headerHeightPercent * osdHeight / 100) : 0; statusHeaderHeight = (tvguideConfig.displayStatusHeader)?(tvguideConfig.headerHeightPercent * osdHeight / 100):0;
tvFrameWidth = statusHeaderHeight * 16 / 9; tvFrameWidth = statusHeaderHeight * 16 / 9;
headerContentWidth = (config.scaleVideo) ? (osdWidth - tvFrameWidth):osdWidth; headerContentWidth = (tvguideConfig.scaleVideo)?(osdWidth - tvFrameWidth):osdWidth;
channelGroupsWidth = (config.displayChannelGroups) ? (config.channelGroupsPercent * osdWidth / 100) : 0; channelGroupsWidth = (tvguideConfig.displayChannelGroups)?(tvguideConfig.channelGroupsPercent * osdWidth / 100):0;
channelGroupsHeight = (config.displayChannelGroups) ? (config.channelGroupsPercent * osdHeight / 100) : 0; channelGroupsHeight = (tvguideConfig.displayChannelGroups)?(tvguideConfig.channelGroupsPercent * osdHeight / 100):0;
channelHeaderWidth = config.channelHeaderWidthPercent * osdWidth / 100; channelHeaderWidth = tvguideConfig.channelHeaderWidthPercent * osdWidth / 100;
channelHeaderHeight = config.channelHeaderHeightPercent * osdHeight / 100; channelHeaderHeight = tvguideConfig.channelHeaderHeightPercent * osdHeight / 100;
timeLineWidth = config.timeLineWidthPercent * osdWidth / 100; timeLineWidth = tvguideConfig.timeLineWidthPercent * osdWidth / 100;
timeLineHeight = config.timeLineHeightPercent * osdHeight / 100; timeLineHeight = tvguideConfig.timeLineHeightPercent * osdHeight / 100;
footerHeight = config.footerHeightPercent * osdHeight / 100; footerHeight = tvguideConfig.footerHeightPercent * osdHeight / 100;
footerY = osdHeight - footerHeight; footerY = osdHeight - footerHeight;
if (config.displayMode == eVertical) { if (tvguideConfig.displayMode == eVertical) {
colWidth = (osdWidth - timeLineWidth) / config.channelCols; colWidth = (osdWidth - timeLineWidth) / tvguideConfig.channelCols;
rowHeight = 0; rowHeight = 0;
minutePixel = (double)(osdHeight - statusHeaderHeight - channelGroupsHeight - channelHeaderHeight - footerHeight) / (double)config.displayTime; minutePixel = (osdHeight - statusHeaderHeight - channelGroupsHeight - channelHeaderHeight - footerHeight) / tvguideConfig.displayTime;
channelLogoWidth = colWidth; channelLogoWidth = colWidth;
channelLogoHeight = channelHeaderHeight; channelLogoHeight = channelHeaderHeight;
logoWidth = channelLogoWidth / 2 - 15; logoWidth = channelLogoWidth/2 - 15;
logoHeight = logoWidth * config.logoHeightRatio / config.logoWidthRatio; logoHeight = logoWidth * tvguideConfig.logoHeightRatio / tvguideConfig.logoWidthRatio;
timeLineGridWidth = timeLineWidth; timeLineGridWidth = timeLineWidth;
timeLineGridHeight = minutePixel * 30; timeLineGridHeight = minutePixel * 30;
dateVieverWidth = timeLineWidth; dateVieverWidth = timeLineWidth;
dateVieverHeight = (channelHeaderHeight + channelGroupsHeight) * 2 / 3; dateVieverHeight = (channelHeaderHeight + channelGroupsHeight) * 2 / 3;
clockWidth = dateVieverWidth; clockWidth = dateVieverWidth;
clockHeight = (channelHeaderHeight + channelGroupsHeight) - dateVieverHeight; clockHeight = (channelHeaderHeight + channelGroupsHeight) - dateVieverHeight;
} else if (config.displayMode == eHorizontal) { } else if (tvguideConfig.displayMode == eHorizontal) {
colWidth = 0; colWidth = 0;
rowHeight = (osdHeight - statusHeaderHeight - timeLineHeight - footerHeight) / config.channelRows; rowHeight = (osdHeight - statusHeaderHeight - timeLineHeight - footerHeight) / tvguideConfig.channelRows;
minutePixel = (double)(osdWidth - channelHeaderWidth - channelGroupsWidth) / (double)config.displayHorizontalTime; minutePixel = (osdWidth - channelHeaderWidth - channelGroupsWidth) / tvguideConfig.displayHorizontalTime;
channelLogoWidth = channelHeaderWidth; channelLogoWidth = channelHeaderWidth;
channelLogoHeight = rowHeight; channelLogoHeight = rowHeight;
logoWidth = channelLogoHeight * config.logoWidthRatio / config.logoHeightRatio; logoWidth = channelLogoHeight * tvguideConfig.logoWidthRatio / tvguideConfig.logoHeightRatio;
logoHeight = channelLogoHeight; logoHeight = channelLogoHeight;
timeLineGridWidth = geoManager.minutePixel * 30; timeLineGridWidth = geoManager.minutePixel * 30;
timeLineGridHeight = geoManager.timeLineHeight; timeLineGridHeight = geoManager.timeLineHeight;
dateVieverWidth = (channelHeaderWidth + channelGroupsWidth) * 3 / 5; dateVieverWidth = (channelHeaderWidth + channelGroupsWidth) * 3 / 5;
dateVieverHeight = timeLineHeight; dateVieverHeight = timeLineHeight;
clockWidth = (channelHeaderWidth + channelGroupsWidth) - dateVieverWidth; clockWidth = (channelHeaderWidth + channelGroupsWidth) - dateVieverWidth;
clockHeight = timeLineHeight; clockHeight = timeLineHeight;
} }
buttonBorder = footerHeight / 6; buttonBorder = footerHeight / 6;
buttonWidth = osdWidth / 4 - 2 * buttonBorder; buttonWidth = osdWidth / 4 - 2 * buttonBorder;
buttonHeight = footerHeight - 3 * buttonBorder; buttonHeight = footerHeight - 3 * buttonBorder;
epgViewHeaderHeight = config.headerHeightPercent * osdHeight / 100; epgViewHeaderHeight = tvguideConfig.headerHeightPercent * osdHeight / 100;
borderRecMenus = 10; borderRecMenus = 10;
channelJumpWidth = osdWidth * 30 / 100; channelJumpWidth = osdWidth * 30 / 100;
channelJumpHeight = osdHeight * 20 / 100; channelJumpHeight = osdHeight * 20 / 100;
return true; return true;
} }

View File

@ -1,54 +1,54 @@
#ifndef __TVGUIDE_GEOMETRYMANAGER_H #ifndef __TVGUIDE_GEOMETRYMANAGER_H
#define __TVGUIDE_GEOMETRYMANAGER_H #define __TVGUIDE_GEOMETRYMANAGER_H
class cGeometryManager { class cGeometryManager {
private: private:
public: public:
cGeometryManager(void); cGeometryManager(void);
~cGeometryManager(); ~cGeometryManager();
bool SetGeometry(int osdWidth, int osdHeight, bool force = false); bool SetGeometry(int osdWidth, int osdHeight, bool force = false);
//Common //Common
int osdWidth; int osdWidth;
int osdHeight; int osdHeight;
int statusHeaderHeight; int statusHeaderHeight;
int tvFrameWidth; int tvFrameWidth;
int headerContentWidth; int headerContentWidth;
//ChannelGroups //ChannelGroups
int channelGroupsWidth; int channelGroupsWidth;
int channelGroupsHeight; int channelGroupsHeight;
//ContentHeader //ContentHeader
int channelHeaderWidth; int channelHeaderWidth;
int channelHeaderHeight; int channelHeaderHeight;
int logoWidth; int logoWidth;
int logoHeight; int logoHeight;
//Content //Content
int colWidth; int colWidth;
int rowHeight; int rowHeight;
double minutePixel; int minutePixel;
int channelLogoWidth; int channelLogoWidth;
int channelLogoHeight; int channelLogoHeight;
//Timeline //Timeline
int timeLineWidth; int timeLineWidth;
int timeLineHeight; int timeLineHeight;
int timeLineGridWidth; int timeLineGridWidth;
int timeLineGridHeight; int timeLineGridHeight;
int dateVieverWidth; int dateVieverWidth;
int dateVieverHeight; int dateVieverHeight;
int clockWidth; int clockWidth;
int clockHeight; int clockHeight;
//Footer //Footer
int footerY; int footerY;
int footerHeight; int footerHeight;
int buttonWidth; int buttonWidth;
int buttonHeight; int buttonHeight;
int buttonBorder; int buttonBorder;
//Detailed EPG View //Detailed EPG View
int epgViewHeaderHeight; int epgViewHeaderHeight;
//Recording Menus //Recording Menus
int borderRecMenus; int borderRecMenus;
//Channel Jump //Channel Jump
int channelJumpWidth; int channelJumpWidth;
int channelJumpHeight; int channelJumpHeight;
}; };
#endif //__TVGUIDE_GEOMETRYMANAGER_H #endif //__TVGUIDE_GEOMETRYMANAGER_H

View File

@ -1,82 +1,82 @@
#include "channelepg.h" #include "channelcolumn.h"
#include "gridelement.h" #include "grid.h"
cGridElement::cGridElement(cChannelEpg *c) { cGrid::cGrid(cChannelColumn *c) {
this->column = c; this->column = c;
text = new cTextWrapper(); text = new cTextWrapper();
dirty = true; dirty = true;
active = false; active = false;
viewportHeight = 0; viewportHeight = 0;
borderWidth = 10; borderWidth = 10;
} }
cGridElement::~cGridElement(void) { cGrid::~cGrid(void) {
delete text; delete text;
} }
void cGridElement::setBackground() { void cGrid::setBackground() {
if (active) { if (active) {
color = theme.Color(clrHighlight); color = theme.Color(clrHighlight);
colorBlending = theme.Color(clrHighlightBlending); colorBlending = theme.Color(clrHighlightBlending);
} else { } else {
if (isColor1) { if (isColor1) {
color = theme.Color(clrGrid1); color = theme.Color(clrGrid1);
colorBlending = theme.Color(clrGrid1Blending); colorBlending = theme.Color(clrGrid1Blending);
} else { } else {
color = theme.Color(clrGrid2); color = theme.Color(clrGrid2);
colorBlending = theme.Color(clrGrid2Blending); colorBlending = theme.Color(clrGrid2Blending);
} }
} }
} }
void cGridElement::Draw() { void cGrid::Draw() {
if (!pixmap) { if (!pixmap) {
return; return;
} }
if (dirty) { if (dirty) {
if (config.style == eStyleGraphical) { if (tvguideConfig.style == eStyleGraphical) {
drawBackgroundGraphical(bgGrid, active); drawBackgroundGraphical(bgGrid, active);
drawText(); drawText();
} else { } else {
setBackground(); setBackground();
drawBackground(); drawBackground();
drawText(); drawText();
drawBorder(); drawBorder();
} }
pixmap->SetLayer(1); pixmap->SetLayer(1);
dirty = false; dirty = false;
} }
} }
bool cGridElement::isFirst(void) { bool cGrid::isFirst(void) {
if (column->isFirst(this)) if (column->isFirst(this))
return true; return true;
return false; return false;
} }
bool cGridElement::Match(time_t t) { bool cGrid::Match(time_t t) {
if ((StartTime() < t) && (EndTime() > t)) if ((StartTime() < t) && (EndTime() > t))
return true; return true;
else else
return false; return false;
} }
int cGridElement::calcOverlap(cGridElement *neighbor) { int cGrid::calcOverlap(cGrid *neighbor) {
int overlap = 0; int overlap = 0;
if (intersects(neighbor)) { if (intersects(neighbor)) {
if ((StartTime() <= neighbor->StartTime()) && (EndTime() <= neighbor->EndTime())) { if ((StartTime() <= neighbor->StartTime()) && (EndTime() <= neighbor->EndTime())) {
overlap = EndTime() - neighbor->StartTime(); overlap = EndTime() - neighbor->StartTime();
} else if ((StartTime() >= neighbor->StartTime()) && (EndTime() >= neighbor->EndTime())) { } else if ((StartTime() >= neighbor->StartTime()) && (EndTime() >= neighbor->EndTime())) {
overlap = neighbor->EndTime() - StartTime(); overlap = neighbor->EndTime() - StartTime();
} else if ((StartTime() >= neighbor->StartTime()) && (EndTime() <= neighbor->EndTime())) { } else if ((StartTime() >= neighbor->StartTime()) && (EndTime() <= neighbor->EndTime())) {
overlap = Duration(); overlap = Duration();
} else if ((StartTime() <= neighbor->StartTime()) && (EndTime() >= neighbor->EndTime())) { } else if ((StartTime() <= neighbor->StartTime()) && (EndTime() >= neighbor->EndTime())) {
overlap = neighbor->EndTime() - neighbor->StartTime(); overlap = neighbor->EndTime() - neighbor->StartTime();
} }
} }
return overlap; return overlap;
} }
bool cGridElement::intersects(cGridElement *neighbor) { bool cGrid::intersects(cGrid *neighbor) {
return ! ( (neighbor->EndTime() <= StartTime()) || (neighbor->StartTime() >= EndTime()) ); return ! ( (neighbor->EndTime() <= StartTime()) || (neighbor->StartTime() >= EndTime()) );
} }

View File

@ -1,58 +1,58 @@
#ifndef __TVGUIDE_GRID_H #ifndef __TVGUIDE_GRID_H
#define __TVGUIDE_GRID_H #define __TVGUIDE_GRID_H
#include <vdr/tools.h> #include <vdr/tools.h>
#include "styledpixmap.h" #include "styledpixmap.h"
class cChannelEpg; class cChannelColumn;
// --- cEpgGrid ------------------------------------------------------------- // --- cEpgGrid -------------------------------------------------------------
class cGridElement : public cListObject, public cStyledPixmap { class cGrid : public cListObject, public cStyledPixmap {
protected: protected:
cTextWrapper *text; cTextWrapper *text;
int viewportHeight; int viewportHeight;
int borderWidth; int borderWidth;
void setBackground(); void setBackground();
bool isColor1; bool isColor1;
bool active; bool active;
bool dirty; bool dirty;
bool hasTimer; bool hasTimer;
bool hasSwitchTimer; bool hasSwitchTimer;
bool intersects(cGridElement *neighbor); bool intersects(cGrid *neighbor);
virtual time_t Duration(void) { return 0; }; virtual time_t Duration(void) { return 0; };
virtual void drawText(void) {}; virtual void drawText(void) {};
bool dummy; bool dummy;
public: public:
cGridElement(cChannelEpg *c); cGrid(cChannelColumn *c);
virtual ~cGridElement(void); virtual ~cGrid(void);
cChannelEpg *column; cChannelColumn *column;
virtual void SetViewportHeight(void) {}; virtual void SetViewportHeight(void) {};
virtual void PositionPixmap(void) {}; virtual void PositionPixmap(void) {};
virtual void setText(void) {}; virtual void setText(void) {};
void Draw(void); void Draw(void);
void SetDirty(void) {dirty = true;}; void SetDirty(void) {dirty = true;};
void SetActive(void) {dirty = true; active = true;}; void SetActive(void) {dirty = true; active = true;};
void SetInActive(void) {dirty = true; active = false;}; void SetInActive(void) {dirty = true; active = false;};
void SetColor(bool color) {isColor1 = color;}; void SetColor(bool color) {isColor1 = color;};
bool IsColor1(void) {return isColor1;}; bool IsColor1(void) {return isColor1;};
bool isFirst(void); bool isFirst(void);
virtual const cEvent *GetEvent(void) { return NULL; }; virtual const cEvent *GetEvent(void) { return NULL; };
bool Match(time_t t); bool Match(time_t t);
virtual time_t StartTime(void) { return 0; }; virtual time_t StartTime(void) { return 0; };
virtual time_t EndTime(void) { return 0; }; virtual time_t EndTime(void) { return 0; };
virtual void SetStartTime(time_t start) {}; virtual void SetStartTime(time_t start) {};
virtual void SetEndTime(time_t end) {}; virtual void SetEndTime(time_t end) {};
int calcOverlap(cGridElement *neighbor); int calcOverlap(cGrid *neighbor);
virtual void SetTimer(void) {}; virtual void SetTimer(void) {};
virtual void SetSwitchTimer(void) {}; virtual void SetSwitchTimer(void) {};
virtual cString getText(void) { return cString("");}; virtual cString getText(void) { return cString("");};
virtual cString getTimeString(void) { return cString("");}; virtual cString getTimeString(void) { return cString("");};
bool Active(void) { return active; }; bool Active(void) { return active; };
bool HasTimer(void) {return hasTimer;}; bool HasTimer(void) {return hasTimer;};
bool HasSwitchTimer(void) {return hasSwitchTimer;}; bool HasSwitchTimer(void) {return hasSwitchTimer;};
bool IsDummy(void) { return dummy; }; bool isDummy(void) { return dummy; };
virtual void debug() {}; virtual void debug() {};
}; };
#endif //__TVGUIDE_GRID_H #endif //__TVGUIDE_GRID_H

View File

@ -1,136 +1,134 @@
#include "imageloader.h" #include "imageloader.h"
#include "tools.h" #include "tools.h"
#include "headergrid.h" #include "headergrid.h"
cHeaderGrid::cHeaderGrid(void) : cGridElement(NULL) { cHeaderGrid::cHeaderGrid(void) : cGrid(NULL) {
pixmap = NULL; pixmap = NULL;
pixmapLogo = NULL; pixmapLogo = NULL;
} }
cHeaderGrid::~cHeaderGrid(void) { cHeaderGrid::~cHeaderGrid(void) {
osdManager.DestroyPixmap(pixmapLogo); osdManager.releasePixmap(pixmapLogo);
} }
void cHeaderGrid::createBackground(int num) { void cHeaderGrid::createBackground(int num) {
color = theme.Color(clrHeader); color = theme.Color(clrHeader);
colorBlending = theme.Color(clrHeaderBlending); colorBlending = theme.Color(clrHeaderBlending);
int x, y; int x, y;
if (config.displayMode == eVertical) { if (tvguideConfig.displayMode == eVertical) {
x = geoManager.timeLineWidth + num*geoManager.colWidth; x = geoManager.timeLineWidth + num*geoManager.colWidth;
y = geoManager.statusHeaderHeight + geoManager.channelGroupsHeight; y = geoManager.statusHeaderHeight + geoManager.channelGroupsHeight;
} else if (config.displayMode == eHorizontal) { } else if (tvguideConfig.displayMode == eHorizontal) {
x = geoManager.channelGroupsWidth; x = geoManager.channelGroupsWidth;
y = geoManager.statusHeaderHeight + geoManager.timeLineHeight + num*geoManager.rowHeight; y = geoManager.statusHeaderHeight + geoManager.timeLineHeight + num*geoManager.rowHeight;
} }
pixmap = osdManager.CreatePixmap(1, cRect(x, y, geoManager.channelLogoWidth, geoManager.channelLogoHeight)); pixmap = osdManager.requestPixmap(1, cRect(x, y, geoManager.channelLogoWidth, geoManager.channelLogoHeight));
pixmapLogo = osdManager.CreatePixmap(2, cRect(x, y, geoManager.channelLogoWidth, geoManager.channelLogoHeight)); pixmapLogo = osdManager.requestPixmap(2, cRect(x, y, geoManager.channelLogoWidth, geoManager.channelLogoHeight));
if ((!pixmap) || (!pixmapLogo)){ if ((!pixmap) || (!pixmapLogo)){
return; return;
} }
pixmapLogo->Fill(clrTransparent); pixmapLogo->Fill(clrTransparent);
if (config.style == eStyleGraphical) { if (tvguideConfig.style == eStyleGraphical) {
drawBackgroundGraphical(bgChannelHeader); drawBackgroundGraphical(bgChannelHeader);
} else { } else {
drawBackground(); drawBackground();
drawBorder(); drawBorder();
} }
} }
void cHeaderGrid::drawChannel(const cChannel *channel) { void cHeaderGrid::drawChannel(const cChannel *channel) {
if (config.displayMode == eVertical) { if (tvguideConfig.displayMode == eVertical) {
drawChannelVertical(channel); drawChannelVertical(channel);
} else if (config.displayMode == eHorizontal) { } else if (tvguideConfig.displayMode == eHorizontal) {
drawChannelHorizontal(channel); drawChannelHorizontal(channel);
} }
} }
// Draw Channel horizontal view // Draw Channel horizontal view
void cHeaderGrid::drawChannelHorizontal(const cChannel *channel) { void cHeaderGrid::drawChannelHorizontal(const cChannel *channel) {
int logoWidth = geoManager.logoWidth; int logoWidth = geoManager.logoWidth;
int logoX = config.displayChannelName ? 5 : (Width() - logoWidth) / 2; int logoX = tvguideConfig.displayChannelName ? 5 : (Width() - logoWidth) / 2;
int textX = 5; int textX = 5;
int textY = (Height() - fontManager.FontChannelHeaderHorizontal->Height()) / 2; int textY = (Height() - fontManager.FontChannelHeaderHorizontal->Height()) / 2;
bool logoFound = false; bool logoFound = false;
if (!config.hideChannelLogos) { if (!tvguideConfig.hideChannelLogos) {
cImage *logo = imgCache.GetLogo(channel); cImage *logo = imgCache.GetLogo(channel);
if (logo) { if (logo) {
const int logoheight = logo->Height(); const int logoheight = logo->Height();
const int logowidth = logo->Width(); pixmapLogo->DrawImage(cPoint(logoX, (Height() - logoheight) / 2), *logo);
pixmapLogo->DrawImage(cPoint(logoX + ((logoWidth - logowidth) / 2), (Height() - logoheight) / 2), *logo); logoFound = true;
logoFound = true; }
} }
} bool drawText = false;
bool drawText = false; int textWidthMax = Width() - 10;
int textWidthMax = Width() - 10; if (!logoFound) {
if (!logoFound) { drawText = true;
drawText = true; }
} if (tvguideConfig.displayChannelName) {
if (config.displayChannelName) { drawText = true;
drawText = true; textX += logoWidth + 5;
textX += logoWidth + 5; textWidthMax -= textX;
textWidthMax -= textX; }
} if (drawText) {
if (drawText) { tColor colorTextBack = (tvguideConfig.style == eStyleFlat)?color:clrTransparent;
tColor colorTextBack = (config.style == eStyleFlat)?color:clrTransparent; cString strChannel = cString::sprintf("%d %s", channel->Number(), channel->Name());
cString strChannel = cString::sprintf("%d %s", channel->Number(), channel->Name()); strChannel = CutText(*strChannel, textWidthMax, fontManager.FontChannelHeaderHorizontal).c_str();
strChannel = CutText(*strChannel, textWidthMax, fontManager.FontChannelHeaderHorizontal).c_str(); pixmap->DrawText(cPoint(textX, textY), *strChannel, theme.Color(clrFontHeader), colorTextBack, fontManager.FontChannelHeaderHorizontal);
pixmap->DrawText(cPoint(textX, textY), *strChannel, theme.Color(clrFontHeader), colorTextBack, fontManager.FontChannelHeaderHorizontal); }
} }
}
// Draw Channel vertical view
// Draw Channel vertical view
void cHeaderGrid::drawChannelVertical(const cChannel *channel) {
void cHeaderGrid::drawChannelVertical(const cChannel *channel) { int logoWidth = geoManager.logoWidth;
int logoHeight = geoManager.logoHeight; int logoHeight = geoManager.logoHeight;
cTextWrapper tw; cTextWrapper tw;
cString headerText = cString::sprintf("%d - %s", channel->Number(), channel->Name()); cString headerText = cString::sprintf("%d - %s", channel->Number(), channel->Name());
tw.Set(*headerText, fontManager.FontChannelHeader, geoManager.colWidth - 8); tw.Set(*headerText, fontManager.FontChannelHeader, geoManager.colWidth - 8);
int lines = tw.Lines(); int lines = tw.Lines();
int lineHeight = fontManager.FontChannelHeader->Height(); int lineHeight = fontManager.FontChannelHeader->Height();
int yStart = (geoManager.channelHeaderHeight - lines * lineHeight) / 2 + 8; int yStart = (geoManager.channelHeaderHeight - lines * lineHeight) / 2 + 8;
bool logoFound = false; bool logoFound = false;
if (!config.hideChannelLogos) { if (!tvguideConfig.hideChannelLogos) {
cImage *logo = imgCache.GetLogo(channel); cImage *logo = imgCache.GetLogo(channel);
if (logo) { if (logo) {
const int logoheight = logo->Height(); pixmapLogo->DrawImage(cPoint((Width() - logoWidth) / 2, 6), *logo);
const int logowidth = logo->Width(); logoFound = true;
pixmapLogo->DrawImage(cPoint((Width() - logowidth) / 2, (logoHeight - logoheight) / 2), *logo); }
logoFound = true; }
} bool drawText = false;
} if (!logoFound) {
bool drawText = false; drawText = true;
if (!logoFound) { } else if (tvguideConfig.displayChannelName) {
drawText = true; drawText = true;
} else if (config.displayChannelName) { yStart = logoHeight;
drawText = true; }
yStart = logoHeight; if (!drawText)
} return;
if (!drawText) tColor colorTextBack = (tvguideConfig.style == eStyleFlat)?color:clrTransparent;
return; for (int i = 0; i < lines; i++) {
tColor colorTextBack = (config.style == eStyleFlat)?color:clrTransparent; int textWidth = fontManager.FontChannelHeader->Width(tw.GetLine(i));
for (int i = 0; i < lines; i++) { int xText = (geoManager.colWidth - textWidth) / 2;
int textWidth = fontManager.FontChannelHeader->Width(tw.GetLine(i)); if (xText < 0)
int xText = (geoManager.colWidth - textWidth) / 2; xText = 0;
if (xText < 0) pixmap->DrawText(cPoint(xText, yStart + i * lineHeight), tw.GetLine(i), theme.Color(clrFontHeader), colorTextBack, fontManager.FontChannelHeader);
xText = 0; }
pixmap->DrawText(cPoint(xText, yStart + i * lineHeight), tw.GetLine(i), theme.Color(clrFontHeader), colorTextBack, fontManager.FontChannelHeader); }
}
} void cHeaderGrid::setPosition(int num) {
int x, y, width, height;
void cHeaderGrid::setPosition(int num) { if (tvguideConfig.displayMode == eVertical) {
int x, y, width, height; x = geoManager.timeLineWidth + num*geoManager.colWidth;
if (config.displayMode == eVertical) { y = geoManager.statusHeaderHeight + geoManager.channelGroupsHeight;
x = geoManager.timeLineWidth + num*geoManager.colWidth; width = geoManager.colWidth;
y = geoManager.statusHeaderHeight + geoManager.channelGroupsHeight; height = geoManager.channelHeaderHeight;
width = geoManager.colWidth; } else if (tvguideConfig.displayMode == eHorizontal) {
height = geoManager.channelHeaderHeight; x = geoManager.channelGroupsWidth;
} else if (config.displayMode == eHorizontal) { y = geoManager.statusHeaderHeight + geoManager.timeLineHeight + num*geoManager.rowHeight;
x = geoManager.channelGroupsWidth; width = geoManager.channelHeaderWidth;
y = geoManager.statusHeaderHeight + geoManager.timeLineHeight + num*geoManager.rowHeight; height = geoManager.rowHeight;
width = geoManager.channelHeaderWidth; }
height = geoManager.rowHeight; pixmap->SetViewPort(cRect(x, y, width, height));
} pixmapLogo->SetViewPort(cRect(x, y, width, height));
pixmap->SetViewPort(cRect(x, y, width, height)); }
pixmapLogo->SetViewPort(cRect(x, y, width, height));
}

View File

@ -1,21 +1,21 @@
#ifndef __TVGUIDE_HEADERGRID_H #ifndef __TVGUIDE_HEADERGRID_H
#define __TVGUIDE_HEADERGRID_H #define __TVGUIDE_HEADERGRID_H
#include "gridelement.h" #include "grid.h"
// --- cHeaderGrid ------------------------------------------------------------- // --- cHeaderGrid -------------------------------------------------------------
class cHeaderGrid : public cGridElement { class cHeaderGrid : public cGrid {
private: private:
cPixmap *pixmapLogo; cPixmap *pixmapLogo;
void drawChannelHorizontal(const cChannel *channel); void drawChannelHorizontal(const cChannel *channel);
void drawChannelVertical(const cChannel *channel); void drawChannelVertical(const cChannel *channel);
public: public:
cHeaderGrid(void); cHeaderGrid(void);
virtual ~cHeaderGrid(void); virtual ~cHeaderGrid(void);
void createBackground(int num); void createBackground(int num);
void drawChannel(const cChannel *channel); void drawChannel(const cChannel *channel);
void setPosition(int num); void setPosition(int num);
}; };
#endif //__TVGUIDE_HEADERGRID_H #endif //__TVGUIDE_HEADERGRID_H

File diff suppressed because it is too large Load Diff

View File

@ -1,92 +1,92 @@
#ifndef __TVGUIDE_IMAGECACHE_H #ifndef __TVGUIDE_IMAGECACHE_H
#define __TVGUIDE_IMAGECACHE_H #define __TVGUIDE_IMAGECACHE_H
#define X_DISPLAY_MISSING #define X_DISPLAY_MISSING
#include <map> #include <map>
#include <vector> #include <vector>
#include "imagemagickwrapper.h" #include "imagemagickwrapper.h"
enum eCacheType { enum eCacheType {
ctOsdElement = 0, ctOsdElement = 0,
ctGrid, ctGrid,
ctLogo, ctLogo,
ctChannelGroup, ctChannelGroup,
ctIcon, ctIcon,
}; };
enum eOsdElementType { enum eOsdElementType {
oeNone = -1, oeNone = -1,
oeStatusHeaderContentFull, oeStatusHeaderContentFull,
oeStatusHeaderContentWindowed, oeStatusHeaderContentWindowed,
oeStatusHeaderTVFrame, oeStatusHeaderTVFrame,
oeButtonRed, oeButtonRed,
oeButtonGreen, oeButtonGreen,
oeButtonYellow, oeButtonYellow,
oeButtonBlue, oeButtonBlue,
oeLogoBack, oeLogoBack,
oeTimeline1, oeTimeline1,
oeTimeline2, oeTimeline2,
oeDateViewer, oeDateViewer,
oeClock, oeClock,
oeChannelJump, oeChannelJump,
}; };
class cImageCache : public cImageMagickWrapper { class cImageCache : public cImageMagickWrapper {
public: public:
cImageCache(); cImageCache();
~cImageCache(); ~cImageCache();
void CreateCache(void); void CreateCache(void);
cImage *GetOsdElement(eOsdElementType type); cImage *GetOsdElement(eOsdElementType type);
cImage *GetGrid(int width, int height, bool active); cImage *GetGrid(int width, int height, bool active);
cImage *GetChannelGroup(int width, int height); cImage *GetChannelGroup(int width, int height);
cImage *GetLogo(const cChannel *channel); cImage *GetLogo(const cChannel *channel);
cImage *GetIcon(std::string name, int width, int height); cImage *GetIcon(std::string name, int width, int height);
std::string GetCacheSize(eCacheType type); std::string GetCacheSize(eCacheType type);
void Clear(void); void Clear(void);
private: private:
cImage *tempStaticLogo; cImage *tempStaticLogo;
Image bufferGrid; Image bufferGrid;
Image bufferGridActive; Image bufferGridActive;
bool gridsAvailable; bool gridsAvailable;
int cornerWidth; int cornerWidth;
int cornerHeight; int cornerHeight;
cImage *imgLeft; cImage *imgLeft;
cImage *imgLeftActive; cImage *imgLeftActive;
cImage *imgRight; cImage *imgRight;
cImage *imgRightActive; cImage *imgRightActive;
cImage *imgHead; cImage *imgHead;
cImage *imgHeadActive; cImage *imgHeadActive;
cImage *imgBottom; cImage *imgBottom;
cImage *imgBottomActive; cImage *imgBottomActive;
cImage *imgChannelgroupHead; cImage *imgChannelgroupHead;
cImage *imgChannelgroupBottom; cImage *imgChannelgroupBottom;
cImage *groupsHead; cImage *groupsHead;
cImage *groupsBottom; cImage *groupsBottom;
cImage *groupsLeft; cImage *groupsLeft;
cImage *groupsRight; cImage *groupsRight;
std::map<eOsdElementType, cImage*> osdElementCache; std::map<eOsdElementType, cImage*> osdElementCache;
std::map<std::string, cImage*> gridCache; std::map<std::string, cImage*> gridCache;
std::map<std::string, cImage*> groupsCache; std::map<std::string, cImage*> groupsCache;
std::map<std::string, cImage*> logoCache; std::map<std::string, cImage*> logoCache;
std::map<std::string, cImage*> iconCache; std::map<std::string, cImage*> iconCache;
void CreateOsdIconCache(void); void CreateOsdIconCache(void);
void PrepareGridIconCache(void); void PrepareGridIconCache(void);
void CreateGridIconCache(void); void CreateGridIconCache(void);
void CreateChannelGroupCache(void); void CreateChannelGroupCache(void);
void CreateLogoCache(void); void CreateLogoCache(void);
bool LoadIcon(std::string name); bool LoadIcon(std::string name);
void InsertIntoOsdElementCache(eOsdElementType type, int width=0, int height=0); void InsertIntoOsdElementCache(eOsdElementType type, int width=0, int height=0);
void InsertIntoGridCache(std::string name, int width, int height, bool active); void InsertIntoGridCache(std::string name, int width, int height, bool active);
cImage *CreateGrid(int width, int height, bool active); cImage *CreateGrid(int width, int height, bool active);
void AddCornersHorizontal(cImage *img, bool active); void AddCornersHorizontal(cImage *img, bool active);
void AddCornersVertical(cImage *img, bool active); void AddCornersVertical(cImage *img, bool active);
void InsertIntoGroupsCacheHorizontal(int size); void InsertIntoGroupsCacheHorizontal(int size);
void InsertIntoGroupsCacheVertical(int size); void InsertIntoGroupsCacheVertical(int size);
void AddCornersGroupHorizontal(cImage *img); void AddCornersGroupHorizontal(cImage *img);
void AddCornersGroupVertical(cImage *img); void AddCornersGroupVertical(cImage *img);
bool LoadLogo(const cChannel *channel); bool LoadLogo(const cChannel *channel);
void InsertIntoLogoCache(std::string channelID); void InsertIntoLogoCache(std::string channelID);
}; };
#endif //__TVGUIDE_IMAGECACHE_H #endif //__TVGUIDE_IMAGECACHE_H

View File

@ -11,6 +11,7 @@
using namespace Magick; using namespace Magick;
cImageLoader::cImageLoader() { cImageLoader::cImageLoader() {
InitializeMagick(NULL);
} }
cImageLoader::~cImageLoader() { cImageLoader::~cImageLoader() {
@ -22,22 +23,22 @@ bool cImageLoader::LoadLogo(const cChannel *channel, int width, int height) {
std::string channelID = StrToLowerCase(*(channel->GetChannelID().ToString())); std::string channelID = StrToLowerCase(*(channel->GetChannelID().ToString()));
std::string logoLower = StrToLowerCase(channel->Name()); std::string logoLower = StrToLowerCase(channel->Name());
cString extension; cString extension;
if (config.logoExtension == 0) { if (tvguideConfig.logoExtension == 0) {
extension = "png"; extension = "png";
} else if (config.logoExtension == 1) { } else if (tvguideConfig.logoExtension == 1) {
extension = "jpg"; extension = "jpg";
} }
bool success = false; bool success = false;
if (config.logoPathSet) { if (tvguideConfig.logoPathSet) {
success = LoadImage(channelID.c_str(), *config.logoPath, *extension); success = LoadImage(channelID.c_str(), *tvguideConfig.logoPath, *extension);
if (!success) { if (!success) {
success = LoadImage(logoLower.c_str(), *config.logoPath, *extension); success = LoadImage(logoLower.c_str(), *tvguideConfig.logoPath, *extension);
} }
} }
if (!success) if (!success)
success = LoadImage(channelID.c_str(), *config.logoPathDefault, *extension); success = LoadImage(channelID.c_str(), *tvguideConfig.logoPathDefault, *extension);
if (!success) if (!success)
success = LoadImage(logoLower.c_str(), *config.logoPathDefault, *extension); success = LoadImage(logoLower.c_str(), *tvguideConfig.logoPathDefault, *extension);
if (success) if (success)
buffer.sample(Geometry(width, height)); buffer.sample(Geometry(width, height));
return success; return success;
@ -47,9 +48,9 @@ bool cImageLoader::LoadEPGImage(int eventID, int width, int height) {
if ((width == 0)||(height==0)) if ((width == 0)||(height==0))
return false; return false;
bool success = false; bool success = false;
success = LoadImage(*cString::sprintf("%d", eventID), *config.epgImagePath, "jpg"); success = LoadImage(*cString::sprintf("%d", eventID), *tvguideConfig.epgImagePath, "jpg");
if (!success) if (!success)
success = LoadImage(*cString::sprintf("%d_0", eventID), *config.epgImagePath, "jpg"); success = LoadImage(*cString::sprintf("%d_0", eventID), *tvguideConfig.epgImagePath, "jpg");
if (!success) if (!success)
return false; return false;
buffer.sample( Geometry(width, height)); buffer.sample( Geometry(width, height));
@ -57,12 +58,12 @@ bool cImageLoader::LoadEPGImage(int eventID, int width, int height) {
} }
bool cImageLoader::LoadAdditionalEPGImage(cString name) { bool cImageLoader::LoadAdditionalEPGImage(cString name) {
int width = config.epgImageWidthLarge; int width = tvguideConfig.epgImageWidthLarge;
int height = config.epgImageHeightLarge; int height = tvguideConfig.epgImageHeightLarge;
if ((width == 0)||(height==0)) if ((width == 0)||(height==0))
return false; return false;
bool success = false; bool success = false;
success = LoadImage(*name, *config.epgImagePath, "jpg"); success = LoadImage(*name, *tvguideConfig.epgImagePath, "jpg");
if (!success) if (!success)
return false; return false;
if (height != 0 || width != 0) { if (height != 0 || width != 0) {
@ -83,19 +84,19 @@ bool cImageLoader::LoadIcon(const char *cIcon, int size) {
if (size==0) if (size==0)
return false; return false;
bool success = false; bool success = false;
if (config.iconsPathSet) { if (tvguideConfig.iconsPathSet) {
cString iconPathTheme = cString::sprintf("%s%s/recmenuicons/", *config.iconPath, *config.themeName); cString iconPathTheme = cString::sprintf("%s%s/recmenuicons/", *tvguideConfig.iconPath, *tvguideConfig.themeName);
success = LoadImage(cIcon, *iconPathTheme, "png"); success = LoadImage(cIcon, *iconPathTheme, "png");
if (!success) { if (!success) {
cString iconPath = cString::sprintf("%srecmenuicons/", *config.iconPath); cString iconPath = cString::sprintf("%srecmenuicons/", *tvguideConfig.iconPath);
success = LoadImage(cIcon, *iconPath, "png"); success = LoadImage(cIcon, *iconPath, "png");
} }
} }
if (!success) { if (!success) {
cString iconPathTheme = cString::sprintf("%s%s/recmenuicons/", *config.iconPathDefault, *config.themeName); cString iconPathTheme = cString::sprintf("%s%s/recmenuicons/", *tvguideConfig.iconPathDefault, *tvguideConfig.themeName);
success = LoadImage(cIcon, *iconPathTheme, "png"); success = LoadImage(cIcon, *iconPathTheme, "png");
if (!success) { if (!success) {
cString iconPath = cString::sprintf("%srecmenuicons/", *config.iconPathDefault); cString iconPath = cString::sprintf("%srecmenuicons/", *tvguideConfig.iconPathDefault);
success = LoadImage(cIcon, *iconPath, "png"); success = LoadImage(cIcon, *iconPath, "png");
} }
} }
@ -109,20 +110,20 @@ bool cImageLoader::LoadOsdElement(cString name, int width, int height) {
if ((width == 0)||(height==0)) if ((width == 0)||(height==0))
return false; return false;
bool success = false; bool success = false;
if (config.iconsPathSet) { if (tvguideConfig.iconsPathSet) {
cString path = cString::sprintf("%s%s%s", *config.iconPath, *config.themeName, "/osdElements/"); cString path = cString::sprintf("%s%s%s", *tvguideConfig.iconPath, *tvguideConfig.themeName, "/osdElements/");
success = LoadImage(*name, *path, "png"); success = LoadImage(*name, *path, "png");
if (!success) { if (!success) {
path = cString::sprintf("%s%s", *config.iconPath, "/osdElements/"); path = cString::sprintf("%s%s", *tvguideConfig.iconPath, "/osdElements/");
success = LoadImage(*name, *path, "png"); success = LoadImage(*name, *path, "png");
} }
} }
if (!success) { if (!success) {
cString path = cString::sprintf("%s%s%s", *config.iconPathDefault, *config.themeName, "/osdElements/"); cString path = cString::sprintf("%s%s%s", *tvguideConfig.iconPathDefault, *tvguideConfig.themeName, "/osdElements/");
success = LoadImage(*name, *path, "png"); success = LoadImage(*name, *path, "png");
} }
if (!success) { if (!success) {
cString path = cString::sprintf("%s%s", *config.iconPathDefault, "/osdElements/"); cString path = cString::sprintf("%s%s", *tvguideConfig.iconPathDefault, "/osdElements/");
success = LoadImage(*name, *path, "png"); success = LoadImage(*name, *path, "png");
} }
if (!success) if (!success)

View File

@ -5,6 +5,7 @@
#include "imagescaler.h" #include "imagescaler.h"
cImageMagickWrapper::cImageMagickWrapper() { cImageMagickWrapper::cImageMagickWrapper() {
InitializeMagick(NULL);
} }
cImageMagickWrapper::~cImageMagickWrapper() { cImageMagickWrapper::~cImageMagickWrapper() {
@ -76,21 +77,21 @@ bool cImageMagickWrapper::LoadImage(std::string FileName, std::string Path, std:
std::stringstream sstrImgFile; std::stringstream sstrImgFile;
sstrImgFile << Path << FileName << "." << Extension; sstrImgFile << Path << FileName << "." << Extension;
std::string imgFile = sstrImgFile.str(); std::string imgFile = sstrImgFile.str();
if (config.debugImageLoading) if (tvguideConfig.debugImageLoading)
esyslog("tvguide: trying to load: %s", imgFile.c_str()); esyslog("tvguide: trying to load: %s", imgFile.c_str());
buffer.read(imgFile.c_str()); buffer.read(imgFile.c_str());
if (config.debugImageLoading) if (tvguideConfig.debugImageLoading)
esyslog("tvguide: %s sucessfully loaded", imgFile.c_str()); esyslog("tvguide: %s sucessfully loaded", imgFile.c_str());
} catch( Magick::Warning &warning ) { } catch( Magick::Warning &warning ) {
if (config.debugImageLoading) if (tvguideConfig.debugImageLoading)
esyslog("tvguide: Magick Warning: %s", warning.what()); esyslog("tvguide: Magick Warning: %s", warning.what());
return true; return true;
} catch( Magick::Error &error ) { } catch( Magick::Error &error ) {
if (config.debugImageLoading) if (tvguideConfig.debugImageLoading)
esyslog("tvguide: Magick Error: %s", error.what()); esyslog("tvguide: Magick Error: %s", error.what());
return false; return false;
} catch(...) { } catch(...) {
if (config.debugImageLoading) if (tvguideConfig.debugImageLoading)
esyslog("tvguide: an unknown Magick error occured during image loading"); esyslog("tvguide: an unknown Magick error occured during image loading");
return false; return false;
} }
@ -101,21 +102,21 @@ bool cImageMagickWrapper::LoadImage(const char *fullpath) {
if ((fullpath == NULL) || (strlen(fullpath) < 5)) if ((fullpath == NULL) || (strlen(fullpath) < 5))
return false; return false;
try { try {
if (config.debugImageLoading) if (tvguideConfig.debugImageLoading)
esyslog("tvguide: trying to load: %s", fullpath); esyslog("tvguide: trying to load: %s", fullpath);
buffer.read(fullpath); buffer.read(fullpath);
if (config.debugImageLoading) if (tvguideConfig.debugImageLoading)
esyslog("tvguide: %s sucessfully loaded", fullpath); esyslog("tvguide: %s sucessfully loaded", fullpath);
} catch( Magick::Warning &warning ) { } catch( Magick::Warning &warning ) {
if (config.debugImageLoading) if (tvguideConfig.debugImageLoading)
esyslog("tvguide: Magick Warning: %s", warning.what()); esyslog("tvguide: Magick Warning: %s", warning.what());
return true; return true;
} catch( Magick::Error &error ) { } catch( Magick::Error &error ) {
if (config.debugImageLoading) if (tvguideConfig.debugImageLoading)
esyslog("tvguide: Magick Error: %s", error.what()); esyslog("tvguide: Magick Error: %s", error.what());
return false; return false;
} catch(...) { } catch(...) {
if (config.debugImageLoading) if (tvguideConfig.debugImageLoading)
esyslog("tvguide: an unknown Magick error occured during image loading"); esyslog("tvguide: an unknown Magick error occured during image loading");
return false; return false;
} }

View File

@ -1,62 +1,38 @@
#include "config.h" #include "config.h"
#include "osdmanager.h" #include "osdmanager.h"
cOsdManager::cOsdManager(void) { cOsdManager::cOsdManager(void) {
osd = NULL; }
}
bool cOsdManager::setOsd() {
void cOsdManager::Lock(void) { osd = cOsdProvider::NewOsd(cOsd::OsdLeft(), cOsd::OsdTop());
mutex.Lock(); if (osd) {
} tArea Area = { 0, 0, cOsd::OsdWidth(), cOsd::OsdHeight(), 32 };
if (osd->SetAreas(&Area, 1) == oeOk) {
void cOsdManager::Unlock(void) { return true;
mutex.Unlock(); }
} }
return false;
bool cOsdManager::CreateOsd(void) { }
osd = cOsdProvider::NewOsd(cOsd::OsdLeft(), cOsd::OsdTop());
if (osd) { void cOsdManager::setBackground() {
tArea Area = { 0, 0, cOsd::OsdWidth() - 1, cOsd::OsdHeight() - 1, 32 };
if (osd->SetAreas(&Area, 1) == oeOk) { if (tvguideConfig.displayStatusHeader && tvguideConfig.scaleVideo) {
return true; int widthStatus = cOsd::OsdWidth() - geoManager.statusHeaderHeight * 16 / 9;
} osd->DrawRectangle(0, 0, widthStatus, geoManager.statusHeaderHeight, theme.Color(clrBackgroundOSD));
} osd->DrawRectangle(0, geoManager.statusHeaderHeight, Width(), Height(), theme.Color(clrBackgroundOSD));
return false; }
} else
osd->DrawRectangle(0, 0, Width(), Height(), theme.Color(clrBackgroundOSD));
void cOsdManager::DeleteOsd(void) {
Lock(); }
delete osd;
osd = NULL; cPixmap *cOsdManager::requestPixmap(int Layer, const cRect &ViewPort, const cRect &DrawPort) {
Unlock(); return osd->CreatePixmap(Layer, ViewPort, DrawPort);
} }
void cOsdManager::SetBackground(void) { void cOsdManager::releasePixmap(cPixmap *pixmap) {
if (!pixmap)
if (config.displayStatusHeader && config.scaleVideo) { return;
int widthStatus = cOsd::OsdWidth() - geoManager.statusHeaderHeight * 16 / 9; osd->DestroyPixmap(pixmap);
osd->DrawRectangle(0, 0, widthStatus, geoManager.statusHeaderHeight, theme.Color(clrBackgroundOSD)); }
osd->DrawRectangle(0, geoManager.statusHeaderHeight, Width(), Height(), theme.Color(clrBackgroundOSD));
}
else
osd->DrawRectangle(0, 0, Width(), Height(), theme.Color(clrBackgroundOSD));
}
cPixmap *cOsdManager::CreatePixmap(int Layer, const cRect &ViewPort, const cRect &DrawPort) {
if (osd)
return osd->CreatePixmap(Layer, ViewPort, DrawPort);
return NULL;
}
void cOsdManager::DestroyPixmap(cPixmap *pixmap) {
if (!osd || !pixmap)
return;
osd->DestroyPixmap(pixmap);
}
void cOsdManager::Flush(void) {
if (osd) {
osd->Flush();
}
}

View File

@ -1,26 +1,23 @@
#ifndef __TVGUIDE_OSDMANAGER_H #ifndef __TVGUIDE_OSDMANAGER_H
#define __TVGUIDE_OSDMANAGER_H #define __TVGUIDE_OSDMANAGER_H
#include <vdr/osd.h> #include <vdr/osd.h>
class cOsdManager { class cOsdManager {
private: private:
cOsd *osd; cOsd *osd;
cMutex mutex; public:
public: cOsdManager(void);
cOsdManager(void); bool setOsd();
void Lock(void); void setBackground();
void Unlock(void); void flush() {osd->Flush();};
bool CreateOsd(void); cPixmap *requestPixmap(int Layer, const cRect &ViewPort, const cRect &DrawPort = cRect::Null);
void DeleteOsd(void); void releasePixmap(cPixmap *pixmap);
void SetBackground(void); void deleteOsd() {delete osd;};
cPixmap *CreatePixmap(int Layer, const cRect &ViewPort, const cRect &DrawPort = cRect::Null); int Width() { return osd->Width(); };
void DestroyPixmap(cPixmap *pixmap); int Height() { return osd->Height(); };
void Flush(void); int Top() { return osd->Top(); };
int Width(void) { return osd->Width(); }; int Left() { return osd->Left(); };
int Height(void) { return osd->Height(); }; };
int Top(void) { return osd->Top(); };
int Left(void) { return osd->Left(); }; #endif //__TVGUIDE_OSDMANAGER_H
};
#endif //__TVGUIDE_OSDMANAGER_H

View File

@ -3,7 +3,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: vdr-tvguide 0.0.1\n" "Project-Id-Version: vdr-tvguide 0.0.1\n"
"Report-Msgid-Bugs-To: <see README>\n" "Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2022-04-29 16:05+0200\n" "POT-Creation-Date: 2019-04-12 14:35+0200\n"
"PO-Revision-Date: 2013-09-21 17:49+0200\n" "PO-Revision-Date: 2013-09-21 17:49+0200\n"
"Last-Translator: My friend <Sampep> Thanks David <Gabychan> <gbonich@gmail.com>\n" "Last-Translator: My friend <Sampep> Thanks David <Gabychan> <gbonich@gmail.com>\n"
"Language-Team: \n" "Language-Team: \n"
@ -25,7 +25,7 @@ msgid "min"
msgstr "min" msgstr "min"
msgid "Reruns of " msgid "Reruns of "
msgstr "Reemissions " msgstr ""
msgid "No reruns found" msgid "No reruns found"
msgstr "" msgstr ""
@ -57,9 +57,6 @@ msgstr ""
msgid "images" msgid "images"
msgstr "" msgstr ""
msgid "tvguide: RemoteTimerModifications failed"
msgstr ""
msgid "root video folder" msgid "root video folder"
msgstr "Directori principal per a vídeo" msgstr "Directori principal per a vídeo"
@ -75,15 +72,6 @@ msgstr "tots els canals"
msgid "unknown channel" msgid "unknown channel"
msgstr "canal desconegut" msgstr "canal desconegut"
msgid "with"
msgstr ""
msgid "errors"
msgstr ""
msgid "error"
msgstr ""
msgid "Duration" msgid "Duration"
msgstr "Durada" msgstr "Durada"
@ -111,18 +99,21 @@ msgstr ""
msgid "recordings done" msgid "recordings done"
msgstr "" msgstr ""
msgid "What's on now"
msgstr ""
msgid "What's on next"
msgstr ""
msgid "Instant Record" msgid "Instant Record"
msgstr "Enregistra a l'instant" msgstr "Enregistra a l'instant"
msgid "Timer On/Off" msgid "Delete Timer"
msgstr "Temporitzador On/Off" msgstr "Esborra temporitzador"
msgid "Edit Timer" msgid "Edit Timer"
msgstr "Edita temporitzador" msgstr "Edita temporitzador"
msgid "Delete Timer"
msgstr "Esborra temporitzador"
msgid "Timer Timeline" msgid "Timer Timeline"
msgstr "" msgstr ""
@ -153,9 +144,6 @@ msgstr "Cerca a les gravacions"
msgid "Set Folder for" msgid "Set Folder for"
msgstr "Programa carpeta per" msgstr "Programa carpeta per"
msgid "Timer changed"
msgstr ""
msgid "Timer created" msgid "Timer created"
msgstr "Temporitzador creat" msgstr "Temporitzador creat"
@ -180,14 +168,14 @@ msgstr "Sí"
msgid "No" msgid "No"
msgstr "No" msgstr "No"
msgid "Timer Conflicts" msgid "One"
msgstr "Conflicte al temporitzador" msgstr "Un"
msgid "detected" msgid "detected"
msgstr "detectat" msgstr "detectat"
msgid "Ignore Conflicts" msgid "Timer Conflicts"
msgstr "Ignora conflictes" msgstr "Conflicte al temporitzador"
msgid "Show conflict" msgid "Show conflict"
msgstr "Mostra conflicte" msgstr "Mostra conflicte"
@ -195,6 +183,9 @@ msgstr "Mostra conflicte"
msgid "timers involved" msgid "timers involved"
msgstr "temporitzadors involucrats" msgstr "temporitzadors involucrats"
msgid "Ignore Conflicts"
msgstr "Ignora conflictes"
msgid "Ignore Conflict" msgid "Ignore Conflict"
msgstr "Ignora conflicte" msgstr "Ignora conflicte"
@ -225,12 +216,6 @@ msgstr ""
msgid "replaced by rerun" msgid "replaced by rerun"
msgstr "" msgstr ""
msgid "Save"
msgstr "Desa"
msgid "Cancel"
msgstr "Cancel·la"
msgid "Timer Active" msgid "Timer Active"
msgstr "Temporitzador actiu" msgstr "Temporitzador actiu"
@ -255,11 +240,14 @@ msgstr ""
msgid "New Folder" msgid "New Folder"
msgstr "" msgstr ""
msgid "Create Series Timer based on:" msgid "Save"
msgstr "Programa enregistrament de Sèries segons:" msgstr "Desa"
msgid "Create Timer" msgid "Cancel"
msgstr "Crea temporitzador" msgstr "Cancel·la"
msgid "Create Series Timer based on"
msgstr "Programa enregistrament de Sèries segons"
msgid "Series Timer start time" msgid "Series Timer start time"
msgstr "Inici temporitzador Sèries" msgstr "Inici temporitzador Sèries"
@ -273,6 +261,9 @@ msgstr "Dies a enregistrar"
msgid "Day to start" msgid "Day to start"
msgstr "Dia d'inici" msgstr "Dia d'inici"
msgid "Create Timer"
msgstr "Crea temporitzador"
msgid "Series Timer created" msgid "Series Timer created"
msgstr "Sèrie programada" msgstr "Sèrie programada"
@ -282,17 +273,17 @@ msgstr "Inici"
msgid "Stop" msgid "Stop"
msgstr "Final" msgstr "Final"
msgid "Configure Search Timer based on:" msgid "Configure Search Timer based on"
msgstr "Configura cerca de temporitzadors segons:" msgstr "Configura cerca de temporitzadors segons"
msgid "Continue"
msgstr "Continua"
msgid "Search Expression:" msgid "Search Expression:"
msgstr "Cerca expressió:" msgstr "Cerca expressió:"
msgid "Configure Search Timer for Search String:" msgid "Continue"
msgstr "Configura cerca de temporitzadors amb text:" msgstr "Continua"
msgid "Configure Search Timer for Search String"
msgstr "Configura cerca de temporitzadors amb text"
msgid "Manually configure Options" msgid "Manually configure Options"
msgstr "Opcions de configuració manual" msgstr "Opcions de configuració manual"
@ -312,44 +303,71 @@ msgstr ""
msgid "Save Search Timer" msgid "Save Search Timer"
msgstr "" msgstr ""
msgid "Search term" msgid "Search String"
msgstr "" msgstr ""
msgid "Active" msgid "Active"
msgstr "" msgstr ""
msgid "Search mode" msgid "Search Mode"
msgstr "" msgstr "Mode de cerca"
msgid "Tolerance" msgid "Use Title"
msgstr ""
msgid "Match case"
msgstr ""
msgid "Use title"
msgstr "Utilitza títol" msgstr "Utilitza títol"
msgid "Use subtitle" msgid "Use Subtitle"
msgstr "Utilitza subtítol" msgstr "Utilitza subtítol"
msgid "Use description" msgid "Use Description"
msgstr "Utilitza descripció" msgstr "Utilitza descripció"
msgid "Use channel" msgid "Limit Channels"
msgstr "Canals restringits" msgstr "Canals restringits"
msgid "from channel" msgid "Use Time"
msgstr "Inicia canal" msgstr "Utilitza temps"
msgid "to channel" msgid "Display advanced Options"
msgstr "Atura canal"
msgid "Channel group"
msgstr "" msgstr ""
msgid "Use time" msgid "Limit Days of the Week"
msgstr "Utilitza temps" msgstr ""
msgid "Time margin for start in minutes"
msgstr ""
msgid "Time margin for stop in minutes"
msgstr ""
msgid "Series Recording"
msgstr ""
msgid "Folder"
msgstr ""
msgid "Use VPS"
msgstr ""
msgid "Avoid Repeats"
msgstr ""
msgid "Use in Favorites"
msgstr ""
msgid "Hide advanced Options"
msgstr ""
msgid "Display Results for Search Timer"
msgstr "Mostra resultats de la cerca"
msgid "Start Channel"
msgstr "Inicia canal"
msgid "Stop Channel"
msgstr "Atura canal"
msgid "Channel Group"
msgstr ""
msgid "Start after" msgid "Start after"
msgstr "Comença després" msgstr "Comença després"
@ -357,61 +375,10 @@ msgstr "Comença després"
msgid "Start before" msgid "Start before"
msgstr "Comença abans" msgstr "Comença abans"
msgid "Use duration" msgid "Select Days"
msgstr "Utilitza Durada"
msgid "Min. duration"
msgstr "" msgstr ""
msgid "Max. duration" msgid "Number of allowed repeats"
msgstr ""
msgid "Use day of week"
msgstr ""
msgid "Day of week"
msgstr ""
msgid "Use in Favorites"
msgstr ""
msgid "Use as search timer"
msgstr ""
msgid "Action"
msgstr ""
msgid "Switch ... minutes before start"
msgstr ""
msgid "Unmute sound"
msgstr ""
msgid "Ask ... minutes before start"
msgstr ""
msgid "Series Recording"
msgstr ""
msgid "Directory"
msgstr ""
msgid "Delete recordings after ... days"
msgstr ""
msgid "Keep ... recordings"
msgstr ""
msgid "Pause when ... recordings exist"
msgstr ""
msgid "Avoid Repeats"
msgstr ""
msgid "Allowed repeats"
msgstr ""
msgid "Only repeats within ... days"
msgstr "" msgstr ""
msgid "Compare Title" msgid "Compare Title"
@ -423,33 +390,6 @@ msgstr ""
msgid "Compare Description" msgid "Compare Description"
msgstr "" msgstr ""
msgid "Min. match in %"
msgstr ""
msgid "Compare date"
msgstr ""
msgid "Time margin for start in minutes"
msgstr ""
msgid "Time margin for stop in minutes"
msgstr ""
msgid "Use VPS"
msgstr ""
msgid "Auto delete"
msgstr ""
msgid "after ... recordings"
msgstr ""
msgid "after ... days after first rec."
msgstr ""
msgid "Display Results for Search Timer"
msgstr "Mostra resultats de la cerca"
msgid "Really delete Search Timer" msgid "Really delete Search Timer"
msgstr "" msgstr ""
@ -459,7 +399,7 @@ msgstr ""
msgid "Delete Search Timer and created Timers" msgid "Delete Search Timer and created Timers"
msgstr "" msgstr ""
msgid "Search Timer sucessfully created" msgid "Search Timer sucessfully created."
msgstr "S'ha creat cerca de temporitzador" msgstr "S'ha creat cerca de temporitzador"
msgid "Search Timer update initialised" msgid "Search Timer update initialised"
@ -483,12 +423,12 @@ msgstr "Utilitza una altra plantilla"
msgid "search results for Favorite" msgid "search results for Favorite"
msgstr "" msgstr ""
msgid "search results for Search Timer"
msgstr "cerca resultats per temporitzador"
msgid "search result for Favorite" msgid "search result for Favorite"
msgstr "" msgstr ""
msgid "search results for Search Timer"
msgstr "cerca resultats per temporitzador"
msgid "search result for Search Timer" msgid "search result for Search Timer"
msgstr "cerca resultat per temporitzador" msgstr "cerca resultat per temporitzador"
@ -498,8 +438,8 @@ msgstr "No s'ha trobat la cadena de text"
msgid "Configure Options for Switchtimer" msgid "Configure Options for Switchtimer"
msgstr "Opcions de configuració de canvi de temporitzador" msgstr "Opcions de configuració de canvi de temporitzador"
msgid "Create" msgid "Minutes before switching"
msgstr "Crea" msgstr "Minuts abans del canvi"
msgid "switch" msgid "switch"
msgstr "canvia" msgstr "canvia"
@ -510,12 +450,12 @@ msgstr "només anunci"
msgid "ask for switch" msgid "ask for switch"
msgstr "pregunta pel canvi" msgstr "pregunta pel canvi"
msgid "Minutes before switching"
msgstr "Minuts abans del canvi"
msgid "Switch Mode" msgid "Switch Mode"
msgstr "Mode de canvi" msgstr "Mode de canvi"
msgid "Create"
msgstr "Crea"
msgid "Switch Timer sucessfully created" msgid "Switch Timer sucessfully created"
msgstr "Canvi de temporitzador creat" msgstr "Canvi de temporitzador creat"
@ -525,12 +465,6 @@ msgstr "No s'ha creat el canvi de temporitzador"
msgid "Switch Timer deleted" msgid "Switch Timer deleted"
msgstr "Canvi de temporitzador esborrat" msgstr "Canvi de temporitzador esborrat"
msgid "Perform Search"
msgstr "Realitza la cerca"
msgid "Search Mode"
msgstr "Mode de cerca"
msgid "Channel to Search" msgid "Channel to Search"
msgstr "Canal a cercar" msgstr "Canal a cercar"
@ -546,6 +480,9 @@ msgstr "Cerca a la descripció"
msgid "Show Search Options" msgid "Show Search Options"
msgstr "Mostra opcions de cerca" msgstr "Mostra opcions de cerca"
msgid "Perform Search"
msgstr "Realitza la cerca"
msgid "search results for" msgid "search results for"
msgstr "resultats de cerca per" msgstr "resultats de cerca per"
@ -561,12 +498,12 @@ msgstr ""
msgid "Found" msgid "Found"
msgstr "Trobada" msgstr "Trobada"
msgid "recordings"
msgstr "gravacions"
msgid "recording" msgid "recording"
msgstr "gravació" msgstr "gravació"
msgid "recordings"
msgstr "gravacions"
msgid "for" msgid "for"
msgstr "per" msgstr "per"
@ -576,12 +513,6 @@ msgstr "No s'han trobat gravacions per"
msgid "No Favorites available" msgid "No Favorites available"
msgstr "" msgstr ""
msgid "What's on now"
msgstr ""
msgid "What's on next"
msgstr ""
msgid "whole term must appear" msgid "whole term must appear"
msgstr "expressió completa" msgstr "expressió completa"
@ -597,57 +528,12 @@ msgstr "coincidència exacta"
msgid "regular expression" msgid "regular expression"
msgstr "expressió regular" msgstr "expressió regular"
msgid "fuzzy"
msgstr ""
msgid "allow empty"
msgstr ""
msgid "Interval" msgid "Interval"
msgstr "" msgstr ""
msgid "Channel Group"
msgstr ""
msgid "only FTA" msgid "only FTA"
msgstr "" msgstr ""
msgid "same day"
msgstr ""
msgid "same week"
msgstr ""
msgid "same month"
msgstr ""
msgid "Record"
msgstr ""
msgid "Announce by OSD"
msgstr ""
msgid "Switch only"
msgstr ""
msgid "Announce and switch"
msgstr ""
msgid "Announce by mail"
msgstr ""
msgid "Inactive record"
msgstr ""
msgid "no"
msgstr ""
msgid "count recordings"
msgstr ""
msgid "count days"
msgstr ""
msgid "General Settings" msgid "General Settings"
msgstr "Preferències" msgstr "Preferències"
@ -693,9 +579,6 @@ msgstr "si existeix"
msgid "always" msgid "always"
msgstr "sempre" msgstr "sempre"
msgid "Use workaround for HWAccelerated OSD"
msgstr ""
msgid "Show Main Menu Entry" msgid "Show Main Menu Entry"
msgstr "Mostra entrada del menú principal" msgstr "Mostra entrada del menú principal"
@ -772,7 +655,7 @@ msgid "Display time in EPG Grids"
msgstr "Mostra el temps a l'EPG" msgstr "Mostra el temps a l'EPG"
msgid "Height of Headers (Status Header and EPG View, Perc. of osd height)" msgid "Height of Headers (Status Header and EPG View, Perc. of osd height)"
msgstr "Alçada capçalera d'estat (% alçada OSD)" msgstr ""
msgid "Height of Footer (Perc. of osd height)" msgid "Height of Footer (Perc. of osd height)"
msgstr "" msgstr ""
@ -903,39 +786,15 @@ msgstr ""
msgid "Use fixed folder" msgid "Use fixed folder"
msgstr "" msgstr ""
msgid "smart"
msgstr ""
msgid "Instant recording:"
msgstr ""
msgid "Folder for instant Recordings" msgid "Folder for instant Recordings"
msgstr "Utilitza carpetes per gravacions a l'instant"
msgid "Folder"
msgstr ""
msgid "Add episode to manual timers"
msgstr "" msgstr ""
msgid "Use Remotetimers" msgid "Use Remotetimers"
msgstr "Utilitza temporitzadors remots" msgstr "Utilitza temporitzadors remots"
msgid "Show timer confirmation messages"
msgstr ""
msgid "Favorites:"
msgstr ""
msgid "Limit channels in favorites" msgid "Limit channels in favorites"
msgstr "" msgstr ""
msgid "Start Channel"
msgstr "Inicia canal"
msgid "Stop Channel"
msgstr "Atura canal"
msgid "Use \"What's on now\" in favorites" msgid "Use \"What's on now\" in favorites"
msgstr "" msgstr ""
@ -1012,7 +871,7 @@ msgid "EPG Info"
msgstr "" msgstr ""
msgid "Reruns" msgid "Reruns"
msgstr "Reemissions" msgstr ""
msgid "Recording Information" msgid "Recording Information"
msgstr "" msgstr ""
@ -1071,6 +930,9 @@ msgstr ""
msgid "yes" msgid "yes"
msgstr "" msgstr ""
msgid "no"
msgstr ""
msgid "Adult" msgid "Adult"
msgstr "" msgstr ""

View File

@ -3,7 +3,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: vdr-tvguide 0.0.1\n" "Project-Id-Version: vdr-tvguide 0.0.1\n"
"Report-Msgid-Bugs-To: <see README>\n" "Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2022-04-29 16:05+0200\n" "POT-Creation-Date: 2019-04-12 14:35+0200\n"
"PO-Revision-Date: 2012-08-25 17:49+0200\n" "PO-Revision-Date: 2012-08-25 17:49+0200\n"
"Last-Translator: Horst\n" "Last-Translator: Horst\n"
"Language-Team: \n" "Language-Team: \n"
@ -54,9 +54,6 @@ msgstr "Favoriten"
msgid "images" msgid "images"
msgstr "Bilder" msgstr "Bilder"
msgid "tvguide: RemoteTimerModifications failed"
msgstr ""
msgid "root video folder" msgid "root video folder"
msgstr "Video Hauptverzeichnis" msgstr "Video Hauptverzeichnis"
@ -72,15 +69,6 @@ msgstr "alle Kanäle"
msgid "unknown channel" msgid "unknown channel"
msgstr "unbekannter Kanal" msgstr "unbekannter Kanal"
msgid "with"
msgstr "mit"
msgid "errors"
msgstr "Fehler"
msgid "error"
msgstr "Fehler"
msgid "Duration" msgid "Duration"
msgstr "Dauer" msgstr "Dauer"
@ -108,18 +96,21 @@ msgstr "aktive Timer"
msgid "recordings done" msgid "recordings done"
msgstr "erledigte Aufnahmen" 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" msgid "Instant Record"
msgstr "Aufnahme" msgstr "Aufnahme"
msgid "Timer On/Off" msgid "Delete Timer"
msgstr "Timer Ein/Aus" msgstr "Timer löschen"
msgid "Edit Timer" msgid "Edit Timer"
msgstr "Timer bearbeiten" msgstr "Timer bearbeiten"
msgid "Delete Timer"
msgstr "Timer löschen"
msgid "Timer Timeline" msgid "Timer Timeline"
msgstr "Timer Tagesübersicht" msgstr "Timer Tagesübersicht"
@ -150,9 +141,6 @@ msgstr "In Aufnahmen suchen"
msgid "Set Folder for" msgid "Set Folder for"
msgstr "Verzeichnis festlegen für" msgstr "Verzeichnis festlegen für"
msgid "Timer changed"
msgstr "Timer geändert"
msgid "Timer created" msgid "Timer created"
msgstr "Timer angelegt" msgstr "Timer angelegt"
@ -177,14 +165,14 @@ msgstr "Ja"
msgid "No" msgid "No"
msgstr "Nein" msgstr "Nein"
msgid "Timer Conflicts" msgid "One"
msgstr "Timerkonflikte" msgstr "Ein"
msgid "detected" msgid "detected"
msgstr "gefunden" msgstr "gefunden"
msgid "Ignore Conflicts" msgid "Timer Conflicts"
msgstr "Konflikte ignorieren" msgstr "Timerkonflikte"
msgid "Show conflict" msgid "Show conflict"
msgstr "Konflikt zeigen" msgstr "Konflikt zeigen"
@ -192,6 +180,9 @@ msgstr "Konflikt zeigen"
msgid "timers involved" msgid "timers involved"
msgstr "Timer beteiligt" msgstr "Timer beteiligt"
msgid "Ignore Conflicts"
msgstr "Konflikte ignorieren"
msgid "Ignore Conflict" msgid "Ignore Conflict"
msgstr "Konflikt ignorieren" msgstr "Konflikt ignorieren"
@ -222,12 +213,6 @@ msgstr "Timer für"
msgid "replaced by rerun" msgid "replaced by rerun"
msgstr "ersetzt durch Wiederholung" msgstr "ersetzt durch Wiederholung"
msgid "Save"
msgstr "Speichern"
msgid "Cancel"
msgstr "Abbrechen"
msgid "Timer Active" msgid "Timer Active"
msgstr "Timer aktiv" msgstr "Timer aktiv"
@ -252,11 +237,14 @@ msgstr "Timer Datei"
msgid "New Folder" msgid "New Folder"
msgstr "Neues Verzeichnis" msgstr "Neues Verzeichnis"
msgid "Create Series Timer based on:" msgid "Save"
msgstr "Serientimer anlegen basierend auf:" msgstr "Speichern"
msgid "Create Timer" msgid "Cancel"
msgstr "Timer anlegen" msgstr "Abbrechen"
msgid "Create Series Timer based on"
msgstr "Serientimer anlegen basierend auf"
msgid "Series Timer start time" msgid "Series Timer start time"
msgstr "Serientimer Start Zeit" msgstr "Serientimer Start Zeit"
@ -270,6 +258,9 @@ msgstr "Tage"
msgid "Day to start" msgid "Day to start"
msgstr "Beginnen am" msgstr "Beginnen am"
msgid "Create Timer"
msgstr "Timer anlegen"
msgid "Series Timer created" msgid "Series Timer created"
msgstr "Serientimer angelegt" msgstr "Serientimer angelegt"
@ -279,17 +270,17 @@ msgstr "Start"
msgid "Stop" msgid "Stop"
msgstr "Stop" msgstr "Stop"
msgid "Configure Search Timer based on:" msgid "Configure Search Timer based on"
msgstr "Suchtimer konfigurieren basierend auf:" msgstr "Suchtimer konfigurieren basierend auf"
msgid "Continue"
msgstr "Weiter"
msgid "Search Expression:" msgid "Search Expression:"
msgstr "Suchausdruck:" msgstr "Suchausdruck:"
msgid "Configure Search Timer for Search String:" msgid "Continue"
msgstr "Suchtimer konfigurieren für Suchbegriff:" msgstr "Weiter"
msgid "Configure Search Timer for Search String"
msgstr "Suchtimer konfigurieren für Suchbegriff"
msgid "Manually configure Options" msgid "Manually configure Options"
msgstr "Optionen manuell konfigurieren" msgstr "Optionen manuell konfigurieren"
@ -309,143 +300,92 @@ msgstr "Suchtimer konfigurieren"
msgid "Save Search Timer" msgid "Save Search Timer"
msgstr "Suchtimer speichern" msgstr "Suchtimer speichern"
msgid "Search term" msgid "Search String"
msgstr "Suchbegriff" msgstr "Suchbegriff"
msgid "Active" msgid "Active"
msgstr "Aktiv" msgstr "Aktiv"
msgid "Search mode" msgid "Search Mode"
msgstr "Suchmodus" msgstr "Suchmodus"
msgid "Tolerance" msgid "Use Title"
msgstr "Toleranz" msgstr "Titel benutzen"
msgid "Match case" msgid "Use Subtitle"
msgstr "Groß/klein" msgstr "Untertitel benutzen"
msgid "Use title" msgid "Use Description"
msgstr "Verwende Titel" msgstr "Beschreibung benutzen"
msgid "Use subtitle" msgid "Limit Channels"
msgstr "Verwende Untertitel" msgstr "Kanäle einschränken"
msgid "Use description" msgid "Use Time"
msgstr "Verwende Beschreibung" msgstr "Zeit benutzen"
msgid "Use channel" msgid "Display advanced Options"
msgstr "Verwende Kanal" msgstr "Erweiterte Optionen anzeigen"
msgid "from channel" msgid "Limit Days of the Week"
msgstr "von Kanal" msgstr "Wochentage beschränken"
msgid "to channel" msgid "Time margin for start in minutes"
msgstr "bis Kanal" msgstr "Zeit vor Start in Minuten"
msgid "Channel group" msgid "Time margin for stop in minutes"
msgstr "Zeit nach Ende in Minuten"
msgid "Series Recording"
msgstr "Serienaufnahme"
msgid "Folder"
msgstr "Verzeichnis"
msgid "Use VPS"
msgstr "VPS benutzen"
msgid "Avoid Repeats"
msgstr "Wiederholungen vermeiden"
msgid "Use in Favorites"
msgstr "Als Favorit benutzen"
msgid "Hide advanced Options"
msgstr "Erweiterte Optionen ausblenden"
msgid "Display Results for Search Timer"
msgstr "Ergebnisse für Suchtimer anzeigen"
msgid "Start Channel"
msgstr "Startkanal"
msgid "Stop Channel"
msgstr "Stopkanal"
msgid "Channel Group"
msgstr "Kanalgruppe" msgstr "Kanalgruppe"
msgid "Use time"
msgstr "Verwende Uhrzeit"
msgid "Start after" msgid "Start after"
msgstr "Beginn nach" msgstr "Beginn nach"
msgid "Start before" msgid "Start before"
msgstr "Beginn vor" msgstr "Beginn vor"
msgid "Use duration" msgid "Select Days"
msgstr "Verwende Dauer" msgstr "Tage bestimmen"
msgid "Min. duration" msgid "Number of allowed repeats"
msgstr "Min. Dauer" msgstr "Anzahl erlaubter Wiederholungen"
msgid "Max. duration"
msgstr "Max. Dauer"
msgid "Use day of week"
msgstr "Verwende Wochentag"
msgid "Day of week"
msgstr "Wochentag"
msgid "Use in Favorites"
msgstr "Als Favorit benutzen"
msgid "Use as search timer"
msgstr "Als Suchtimer verwenden"
msgid "Action"
msgstr "Aktion"
msgid "Switch ... minutes before start"
msgstr "Umschalten ... Minuten vor Start"
msgid "Unmute sound"
msgstr "Ton anschalten"
msgid "Ask ... minutes before start"
msgstr "Nachfrage ... Minuten vor Start"
msgid "Series Recording"
msgstr "Serienaufnahme"
msgid "Directory"
msgstr "Verzeichnis"
msgid "Delete recordings after ... days"
msgstr "Aufn. nach ... Tagen löschen"
msgid "Keep ... recordings"
msgstr "Behalte ... Aufnahmen"
msgid "Pause when ... recordings exist"
msgstr "Pause, wenn ... Aufnahmen exist."
msgid "Avoid Repeats"
msgstr "Vermeide Wiederholung"
msgid "Allowed repeats"
msgstr "Erlaubte Wiederholungen"
msgid "Only repeats within ... days"
msgstr "Nur Wiederh. innerhalb von ... Tagen"
msgid "Compare Title" msgid "Compare Title"
msgstr "Vergleiche Titel" msgstr "Titel vergleichen"
msgid "Compare Subtitle" msgid "Compare Subtitle"
msgstr "Vergleiche Untertitel" msgstr "Untertitel vergleichen"
msgid "Compare Description" msgid "Compare Description"
msgstr "Vergleiche Beschreibung" msgstr "Beschreibung vergleichen"
msgid "Min. match in %"
msgstr "Min. Übereinstimmung in %"
msgid "Compare date"
msgstr "Vergleiche Zeitpunkt"
msgid "Time margin for start in minutes"
msgstr "Vorlauf zum Timer-Beginn (min)"
msgid "Time margin for stop in minutes"
msgstr "Nachlauf zum Timer-Ende (min)"
msgid "Use VPS"
msgstr "Verwende VPS"
msgid "Auto delete"
msgstr "automatisch löschen"
msgid "after ... recordings"
msgstr "nach ... Aufnahmen"
msgid "after ... days after first rec."
msgstr "nach ... Tagen nach erster Aufn."
msgid "Display Results for Search Timer"
msgstr "Ergebnisse für Suchtimer anzeigen"
msgid "Really delete Search Timer" msgid "Really delete Search Timer"
msgstr "Suchtimer wirklich löschen" msgstr "Suchtimer wirklich löschen"
@ -456,7 +396,7 @@ msgstr "Nur Suchtimer löschen"
msgid "Delete Search Timer and created Timers" msgid "Delete Search Timer and created Timers"
msgstr "Suchtimer und erzeugte Timer löschen" msgstr "Suchtimer und erzeugte Timer löschen"
msgid "Search Timer sucessfully created" msgid "Search Timer sucessfully created."
msgstr "Suchtimer erfolgreich angelegt" msgstr "Suchtimer erfolgreich angelegt"
msgid "Search Timer update initialised" msgid "Search Timer update initialised"
@ -480,12 +420,12 @@ msgstr "Anderes Template benutzen"
msgid "search results for Favorite" msgid "search results for Favorite"
msgstr "Suchergebnisse für Favorit" msgstr "Suchergebnisse für Favorit"
msgid "search results for Search Timer"
msgstr "Treffer für Suchtimer"
msgid "search result for Favorite" msgid "search result for Favorite"
msgstr "Suchergebnis für Favorit" msgstr "Suchergebnis für Favorit"
msgid "search results for Search Timer"
msgstr "Treffer für Suchtimer"
msgid "search result for Search Timer" msgid "search result for Search Timer"
msgstr "Treffer für Suchtimer" msgstr "Treffer für Suchtimer"
@ -495,8 +435,8 @@ msgstr "Keine Treffer für Suchbegriff"
msgid "Configure Options for Switchtimer" msgid "Configure Options for Switchtimer"
msgstr "Optionen für Umschalttimer konfigurieren" msgstr "Optionen für Umschalttimer konfigurieren"
msgid "Create" msgid "Minutes before switching"
msgstr "Anlegen" msgstr "Minuten vor umschalten"
msgid "switch" msgid "switch"
msgstr "umschalten" msgstr "umschalten"
@ -507,12 +447,12 @@ msgstr "nur ankündigen"
msgid "ask for switch" msgid "ask for switch"
msgstr "vor umschalten fragen" msgstr "vor umschalten fragen"
msgid "Minutes before switching"
msgstr "Minuten vor umschalten"
msgid "Switch Mode" msgid "Switch Mode"
msgstr "Umschaltmodus" msgstr "Umschaltmodus"
msgid "Create"
msgstr "Anlegen"
msgid "Switch Timer sucessfully created" msgid "Switch Timer sucessfully created"
msgstr "Umschalttimer erfolgreich angelegt" msgstr "Umschalttimer erfolgreich angelegt"
@ -522,12 +462,6 @@ msgstr "Umschalttimer NICHT erfolgreich angelegt"
msgid "Switch Timer deleted" msgid "Switch Timer deleted"
msgstr "Umschalttimer gelöscht" msgstr "Umschalttimer gelöscht"
msgid "Perform Search"
msgstr "Suche ausführen"
msgid "Search Mode"
msgstr "Suchmodus"
msgid "Channel to Search" msgid "Channel to Search"
msgstr "Suche auf Kanal" msgstr "Suche auf Kanal"
@ -543,6 +477,9 @@ msgstr "In Beschreibung suchen"
msgid "Show Search Options" msgid "Show Search Options"
msgstr "Suchoptionen anzeigen" msgstr "Suchoptionen anzeigen"
msgid "Perform Search"
msgstr "Suche ausführen"
msgid "search results for" msgid "search results for"
msgstr "Suchergebnisse für" msgstr "Suchergebnisse für"
@ -558,12 +495,12 @@ msgstr "Suchausdruck muss mindestens drei Zeichen haben"
msgid "Found" msgid "Found"
msgstr " " msgstr " "
msgid "recordings"
msgstr "Aufnahmen gefunden"
msgid "recording" msgid "recording"
msgstr "Aufnahme gefunden" msgstr "Aufnahme gefunden"
msgid "recordings"
msgstr "Aufnahmen gefunden"
msgid "for" msgid "for"
msgstr "für" msgstr "für"
@ -573,12 +510,6 @@ msgstr "Keine Aufnahmen gefunden für"
msgid "No Favorites available" msgid "No Favorites available"
msgstr "Keine Favoriten verfügbar" 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" msgid "whole term must appear"
msgstr "vollständiger Ausdruck" msgstr "vollständiger Ausdruck"
@ -594,57 +525,12 @@ msgstr "exakt"
msgid "regular expression" msgid "regular expression"
msgstr "Regulärer Ausdruck" msgstr "Regulärer Ausdruck"
msgid "fuzzy"
msgstr "unscharf"
msgid "allow empty"
msgstr "erlaube leere"
msgid "Interval" msgid "Interval"
msgstr "Bereich" msgstr "Bereich"
msgid "Channel Group"
msgstr "Kanalgruppe"
msgid "only FTA" msgid "only FTA"
msgstr "ohne PayTV" msgstr "ohne PayTV"
msgid "same day"
msgstr "gleicher Tag"
msgid "same week"
msgstr "gleiche Woche"
msgid "same month"
msgstr "gleicher Monat"
msgid "Record"
msgstr "Aufnehmen"
msgid "Announce by OSD"
msgstr "per OSD ankündigen"
msgid "Switch only"
msgstr "Nur umschalten"
msgid "Announce and switch"
msgstr "Ankündigen und Umschalten"
msgid "Announce by mail"
msgstr "per Mail ankündigen"
msgid "Inactive record"
msgstr "inaktive Aufnahme"
msgid "no"
msgstr "Nein"
msgid "count recordings"
msgstr "Anzahl Aufnahmen"
msgid "count days"
msgstr "Anzahl Tage"
msgid "General Settings" msgid "General Settings"
msgstr "Allgemeine Einstellungen" msgstr "Allgemeine Einstellungen"
@ -690,9 +576,6 @@ msgstr "falls vorhanden"
msgid "always" msgid "always"
msgstr "immer" msgstr "immer"
msgid "Use workaround for HWAccelerated OSD"
msgstr ""
msgid "Show Main Menu Entry" msgid "Show Main Menu Entry"
msgstr "Hauptmenüeintrag anzeigen" msgstr "Hauptmenüeintrag anzeigen"
@ -900,39 +783,15 @@ msgstr "Verzeichnis aus Liste auswählen"
msgid "Use fixed folder" msgid "Use fixed folder"
msgstr "Festes Verzeichnis benutzen" msgstr "Festes Verzeichnis benutzen"
msgid "smart"
msgstr "intelligent"
msgid "Instant recording:"
msgstr "Sofortaufnahmen:"
msgid "Folder for instant Recordings" msgid "Folder for instant Recordings"
msgstr "Verzeichnis für Sofortaufnahmen" msgstr "Verzeichnis für Sofortaufnahmen"
msgid "Folder"
msgstr "Verzeichnis"
msgid "Add episode to manual timers"
msgstr "Untertitel in manuellen Timern"
msgid "Use Remotetimers" msgid "Use Remotetimers"
msgstr "RemoteTimers benutzen" msgstr "RemoteTimers benutzen"
msgid "Show timer confirmation messages"
msgstr "Timer Bestätigungsmeldungen anzeigen"
msgid "Favorites:"
msgstr "Favoriten:"
msgid "Limit channels in favorites" msgid "Limit channels in favorites"
msgstr "Kanäle in Favoriten beschränken" msgstr "Kanäle in Favoriten beschränken"
msgid "Start Channel"
msgstr "von Kanal"
msgid "Stop Channel"
msgstr "bis Kanal"
msgid "Use \"What's on now\" in favorites" msgid "Use \"What's on now\" in favorites"
msgstr "\"Was läuft jetzt\" in Favoriten benutzen" msgstr "\"Was läuft jetzt\" in Favoriten benutzen"
@ -970,7 +829,7 @@ msgid "Create Log Messages for image loading"
msgstr "Log Nachrichten für das Laden der Bilder erzeugen" msgstr "Log Nachrichten für das Laden der Bilder erzeugen"
msgid "Limit Logo Cache" msgid "Limit Logo Cache"
msgstr "Logo Cache beschränken" msgstr "Logo Cash beschränken"
msgid "Maximal number of logos to cache" msgid "Maximal number of logos to cache"
msgstr "Maximale Anzahl Logos" msgstr "Maximale Anzahl Logos"
@ -1012,7 +871,7 @@ msgid "Reruns"
msgstr "Wiederholungen" msgstr "Wiederholungen"
msgid "Recording Information" msgid "Recording Information"
msgstr "Aufnahme Information" msgstr ""
msgid "Image Galery" msgid "Image Galery"
msgstr "Bildergalerie" msgstr "Bildergalerie"
@ -1068,6 +927,9 @@ msgstr "Überblick"
msgid "yes" msgid "yes"
msgstr "Ja" msgstr "Ja"
msgid "no"
msgstr "Nein"
msgid "Adult" msgid "Adult"
msgstr "Nur für Erwachsene" msgstr "Nur für Erwachsene"
@ -1097,9 +959,3 @@ msgstr "TheMovieDB Popularität"
msgid "TheMovieDB Vote Average" msgid "TheMovieDB Vote Average"
msgstr "TheMovieDB durchschnittliche Bewertung" msgstr "TheMovieDB durchschnittliche Bewertung"
#~ msgid "Display advanced Options"
#~ msgstr "Erweiterte Optionen anzeigen"
#~ msgid "Hide advanced Options"
#~ msgstr "Erweiterte Optionen ausblenden"

View File

@ -3,7 +3,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: vdr-tvguide 0.0.1\n" "Project-Id-Version: vdr-tvguide 0.0.1\n"
"Report-Msgid-Bugs-To: <see README>\n" "Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2022-04-29 16:05+0200\n" "POT-Creation-Date: 2019-04-12 14:35+0200\n"
"PO-Revision-Date: 2012-08-25 17:49+0200\n" "PO-Revision-Date: 2012-08-25 17:49+0200\n"
"Last-Translator: fiveten_59\n" "Last-Translator: fiveten_59\n"
"Language-Team: \n" "Language-Team: \n"
@ -54,9 +54,6 @@ msgstr "Favoriti"
msgid "images" msgid "images"
msgstr "Immagini" msgstr "Immagini"
msgid "tvguide: RemoteTimerModifications failed"
msgstr ""
msgid "root video folder" msgid "root video folder"
msgstr "cartella video di root" msgstr "cartella video di root"
@ -72,15 +69,6 @@ msgstr "Tutti i Canali"
msgid "unknown channel" msgid "unknown channel"
msgstr "Canale sconosciuto" msgstr "Canale sconosciuto"
msgid "with"
msgstr ""
msgid "errors"
msgstr ""
msgid "error"
msgstr ""
msgid "Duration" msgid "Duration"
msgstr "Durata" msgstr "Durata"
@ -108,18 +96,21 @@ msgstr "Timers attivi"
msgid "recordings done" msgid "recordings done"
msgstr "registrazione eseguita" 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" msgid "Instant Record"
msgstr "Registrazione immediata" msgstr "Registrazione immediata"
msgid "Timer On/Off" msgid "Delete Timer"
msgstr "Timer On/Off" msgstr "Cancella il Timer"
msgid "Edit Timer" msgid "Edit Timer"
msgstr "Edita il Timer" msgstr "Edita il Timer"
msgid "Delete Timer"
msgstr "Cancella il Timer"
msgid "Timer Timeline" msgid "Timer Timeline"
msgstr "Scadenza del Timer" msgstr "Scadenza del Timer"
@ -150,9 +141,6 @@ msgstr "Cerca nelle registrazioni"
msgid "Set Folder for" msgid "Set Folder for"
msgstr "Crea cartella per" msgstr "Crea cartella per"
msgid "Timer changed"
msgstr ""
msgid "Timer created" msgid "Timer created"
msgstr "Timer creato" msgstr "Timer creato"
@ -177,14 +165,14 @@ msgstr "Si"
msgid "No" msgid "No"
msgstr "No" msgstr "No"
msgid "Timer Conflicts" msgid "One"
msgstr "Conflitti del Timer" msgstr "Uno"
msgid "detected" msgid "detected"
msgstr "rilevato" msgstr "rilevato"
msgid "Ignore Conflicts" msgid "Timer Conflicts"
msgstr "Ignora conflitti" msgstr "Conflitti del Timer"
msgid "Show conflict" msgid "Show conflict"
msgstr "Mostra conflitto" msgstr "Mostra conflitto"
@ -192,6 +180,9 @@ msgstr "Mostra conflitto"
msgid "timers involved" msgid "timers involved"
msgstr "Timers impegnati" msgstr "Timers impegnati"
msgid "Ignore Conflicts"
msgstr "Ignora conflitti"
msgid "Ignore Conflict" msgid "Ignore Conflict"
msgstr "Ignora conflitto" msgstr "Ignora conflitto"
@ -222,12 +213,6 @@ msgstr "Timer per"
msgid "replaced by rerun" msgid "replaced by rerun"
msgstr "rimosso dal riavvio" msgstr "rimosso dal riavvio"
msgid "Save"
msgstr "Salva"
msgid "Cancel"
msgstr "Cancella"
msgid "Timer Active" msgid "Timer Active"
msgstr "Timer attivo" msgstr "Timer attivo"
@ -252,11 +237,14 @@ msgstr "File del Timer"
msgid "New Folder" msgid "New Folder"
msgstr "Nuova cartella" msgstr "Nuova cartella"
msgid "Create Series Timer based on:" msgid "Save"
msgstr "Crea il Series Timer basato su:" msgstr "Salva"
msgid "Create Timer" msgid "Cancel"
msgstr "Crea il Timer" msgstr "Cancella"
msgid "Create Series Timer based on"
msgstr "Crea il Series Timer basato su"
msgid "Series Timer start time" msgid "Series Timer start time"
msgstr "Ora d'avvio del Series Timer" msgstr "Ora d'avvio del Series Timer"
@ -270,6 +258,9 @@ msgstr "Giorni da registrare"
msgid "Day to start" msgid "Day to start"
msgstr "Giorno d'inizio" msgstr "Giorno d'inizio"
msgid "Create Timer"
msgstr "Crea il Timer"
msgid "Series Timer created" msgid "Series Timer created"
msgstr "Series Timer creato" msgstr "Series Timer creato"
@ -279,17 +270,17 @@ msgstr "Avvio"
msgid "Stop" msgid "Stop"
msgstr "Ferma" msgstr "Ferma"
msgid "Configure Search Timer based on:" msgid "Configure Search Timer based on"
msgstr "Configura il Search Timer in serie basato su:" msgstr "Configura il Search Timer in serie basato su"
msgid "Continue"
msgstr "Continua"
msgid "Search Expression:" msgid "Search Expression:"
msgstr "Cerca espressione:" msgstr "Cerca espressione:"
msgid "Configure Search Timer for Search String:" msgid "Continue"
msgstr "Configura il Search Timer basato su Search String:" msgstr "Continua"
msgid "Configure Search Timer for Search String"
msgstr "Configura il Search Timer basato su Search String"
msgid "Manually configure Options" msgid "Manually configure Options"
msgstr "Configura manualmente le Opzioni" msgstr "Configura manualmente le Opzioni"
@ -309,107 +300,83 @@ msgstr "Configura le opzione del Search Timer"
msgid "Save Search Timer" msgid "Save Search Timer"
msgstr "Salva il Search Timer" msgstr "Salva il Search Timer"
msgid "Search term" msgid "Search String"
msgstr "" msgstr "Suchbegriff"
msgid "Active" msgid "Active"
msgstr "Attivo" msgstr "Attivo"
msgid "Search mode" msgid "Search Mode"
msgstr "Modalità di ricerca" msgstr "Modalità di ricerca"
msgid "Tolerance" msgid "Use Title"
msgstr ""
msgid "Match case"
msgstr ""
msgid "Use title"
msgstr "Usa Titolo" msgstr "Usa Titolo"
msgid "Use subtitle" msgid "Use Subtitle"
msgstr "Usa Sottotitolo" msgstr "Usa Sottotitolo"
msgid "Use description" msgid "Use Description"
msgstr "Usa Descrizione" msgstr "Usa Descrizione"
msgid "Use channel" msgid "Limit Channels"
msgstr "Limite Canale" msgstr "Limite Canale"
msgid "from channel" msgid "Use Time"
msgstr "Utilizza Time"
msgid "Display advanced Options"
msgstr "Mostra Opzioni avanzate"
msgid "Limit Days of the Week"
msgstr "Limite dei giorni della settimana"
msgid "Time margin for start in minutes"
msgstr "Margine di tempo per l'avvio in minuti"
msgid "Time margin for stop in minutes"
msgstr "Margine di tempo per lo stop in minuti"
msgid "Series Recording"
msgstr "Serie di registrazioni"
msgid "Folder"
msgstr "Cartella"
msgid "Use VPS"
msgstr "Utilizza VPS"
msgid "Avoid Repeats"
msgstr "Evita ripetizioni"
msgid "Use in Favorites"
msgstr "Utilizza nei favoriti"
msgid "Hide advanced Options"
msgstr "Nascondi Opzioni avanzate"
msgid "Display Results for Search Timer"
msgstr "Mostra risultati per il Search Timer"
msgid "Start Channel"
msgstr "Avvia il Canale" msgstr "Avvia il Canale"
msgid "to channel" msgid "Stop Channel"
msgstr "Ferma il Canale" msgstr "Ferma il Canale"
msgid "Channel group" msgid "Channel Group"
msgstr "" msgstr ""
msgid "Use time"
msgstr "Utilizza Time"
msgid "Start after" msgid "Start after"
msgstr "Avvia dopo" msgstr "Avvia dopo"
msgid "Start before" msgid "Start before"
msgstr "Avvia prima" msgstr "Avvia prima"
msgid "Use duration" msgid "Select Days"
msgstr ""
msgid "Min. duration"
msgstr ""
msgid "Max. duration"
msgstr ""
msgid "Use day of week"
msgstr "Usa giorno feriale"
msgid "Day of week"
msgstr "Seleziona i giorni" msgstr "Seleziona i giorni"
msgid "Use in Favorites" msgid "Number of allowed repeats"
msgstr "Utilizza nei favoriti" msgstr "Numero di ripetizioni permesse"
msgid "Use as search timer"
msgstr ""
msgid "Action"
msgstr ""
msgid "Switch ... minutes before start"
msgstr ""
msgid "Unmute sound"
msgstr ""
msgid "Ask ... minutes before start"
msgstr ""
msgid "Series Recording"
msgstr "Serie di registrazioni"
msgid "Directory"
msgstr ""
msgid "Delete recordings after ... days"
msgstr ""
msgid "Keep ... recordings"
msgstr ""
msgid "Pause when ... recordings exist"
msgstr ""
msgid "Avoid Repeats"
msgstr "Evita ripetizioni"
msgid "Allowed repeats"
msgstr ""
msgid "Only repeats within ... days"
msgstr ""
msgid "Compare Title" msgid "Compare Title"
msgstr "Confonta Titolo" msgstr "Confonta Titolo"
@ -420,33 +387,6 @@ msgstr "Confonta Sottotitolo"
msgid "Compare Description" msgid "Compare Description"
msgstr "Confonta Descrizione" msgstr "Confonta Descrizione"
msgid "Min. match in %"
msgstr ""
msgid "Compare date"
msgstr ""
msgid "Time margin for start in minutes"
msgstr "Margine di tempo per l'avvio in minuti"
msgid "Time margin for stop in minutes"
msgstr "Margine di tempo per lo stop in minuti"
msgid "Use VPS"
msgstr "Utilizza VPS"
msgid "Auto delete"
msgstr ""
msgid "after ... recordings"
msgstr ""
msgid "after ... days after first rec."
msgstr ""
msgid "Display Results for Search Timer"
msgstr "Mostra risultati per il Search Timer"
msgid "Really delete Search Timer" msgid "Really delete Search Timer"
msgstr "Veramente eliminare il Search Timer" msgstr "Veramente eliminare il Search Timer"
@ -456,7 +396,7 @@ msgstr "Elimina solo il Search Timer"
msgid "Delete Search Timer and created Timers" msgid "Delete Search Timer and created Timers"
msgstr "Elimina il Search Timer e Timers creati" msgstr "Elimina il Search Timer e Timers creati"
msgid "Search Timer sucessfully created" msgid "Search Timer sucessfully created."
msgstr "Search Timer creato con successo" msgstr "Search Timer creato con successo"
msgid "Search Timer update initialised" msgid "Search Timer update initialised"
@ -480,12 +420,12 @@ msgstr "Anderes Template benutzen"
msgid "search results for Favorite" msgid "search results for Favorite"
msgstr "Suchergebnisse für Favorit" msgstr "Suchergebnisse für Favorit"
msgid "search results for Search Timer"
msgstr "Treffer für Suchtimer"
msgid "search result for Favorite" msgid "search result for Favorite"
msgstr "Suchergebnis für Favorit" msgstr "Suchergebnis für Favorit"
msgid "search results for Search Timer"
msgstr "Treffer für Suchtimer"
msgid "search result for Search Timer" msgid "search result for Search Timer"
msgstr "Treffer für Suchtimer" msgstr "Treffer für Suchtimer"
@ -495,8 +435,8 @@ msgstr "Keine Treffer für Suchbegriff"
msgid "Configure Options for Switchtimer" msgid "Configure Options for Switchtimer"
msgstr "Optionen für Umschalttimer konfigurieren" msgstr "Optionen für Umschalttimer konfigurieren"
msgid "Create" msgid "Minutes before switching"
msgstr "Creare" msgstr "Minuten vor umschalten"
msgid "switch" msgid "switch"
msgstr "cambio" msgstr "cambio"
@ -507,12 +447,12 @@ msgstr "Segnala solamente"
msgid "ask for switch" msgid "ask for switch"
msgstr "chiedi per cambiare" msgstr "chiedi per cambiare"
msgid "Minutes before switching"
msgstr "Minuten vor umschalten"
msgid "Switch Mode" msgid "Switch Mode"
msgstr "Modalità Switch" msgstr "Modalità Switch"
msgid "Create"
msgstr "Creare"
msgid "Switch Timer sucessfully created" msgid "Switch Timer sucessfully created"
msgstr "Switch Timer creato con successo" msgstr "Switch Timer creato con successo"
@ -522,12 +462,6 @@ msgstr "Switch Timer NON creato"
msgid "Switch Timer deleted" msgid "Switch Timer deleted"
msgstr "Switch Timer eliminato" msgstr "Switch Timer eliminato"
msgid "Perform Search"
msgstr "Fai una ricerca"
msgid "Search Mode"
msgstr "Modalità di ricerca"
msgid "Channel to Search" msgid "Channel to Search"
msgstr "Canale da cercare" msgstr "Canale da cercare"
@ -543,6 +477,9 @@ msgstr "Cerca nella descrizione"
msgid "Show Search Options" msgid "Show Search Options"
msgstr "Mostra opzioni di ricerca" msgstr "Mostra opzioni di ricerca"
msgid "Perform Search"
msgstr "Fai una ricerca"
msgid "search results for" msgid "search results for"
msgstr "cerca risultati per" msgstr "cerca risultati per"
@ -558,12 +495,12 @@ msgstr "Search String deve avere almeno tre lettere"
msgid "Found" msgid "Found"
msgstr "Trovato" msgstr "Trovato"
msgid "recordings"
msgstr "registrazioni"
msgid "recording" msgid "recording"
msgstr "registrazione" msgstr "registrazione"
msgid "recordings"
msgstr "registrazioni"
msgid "for" msgid "for"
msgstr "per" msgstr "per"
@ -573,12 +510,6 @@ msgstr "Nessuna registrazione trovata per"
msgid "No Favorites available" msgid "No Favorites available"
msgstr "Nessun Favoriti disponibile" 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" msgid "whole term must appear"
msgstr "vollständiger Ausdruck" msgstr "vollständiger Ausdruck"
@ -594,57 +525,12 @@ msgstr "exakt"
msgid "regular expression" msgid "regular expression"
msgstr "Regulärer Ausdruck" msgstr "Regulärer Ausdruck"
msgid "fuzzy"
msgstr ""
msgid "allow empty"
msgstr ""
msgid "Interval" msgid "Interval"
msgstr "" msgstr ""
msgid "Channel Group"
msgstr ""
msgid "only FTA" msgid "only FTA"
msgstr "" msgstr ""
msgid "same day"
msgstr ""
msgid "same week"
msgstr ""
msgid "same month"
msgstr ""
msgid "Record"
msgstr ""
msgid "Announce by OSD"
msgstr ""
msgid "Switch only"
msgstr ""
msgid "Announce and switch"
msgstr ""
msgid "Announce by mail"
msgstr ""
msgid "Inactive record"
msgstr ""
msgid "no"
msgstr "No"
msgid "count recordings"
msgstr ""
msgid "count days"
msgstr ""
msgid "General Settings" msgid "General Settings"
msgstr "Allgemeine Einstellungen" msgstr "Allgemeine Einstellungen"
@ -690,9 +576,6 @@ msgstr "se esiste"
msgid "always" msgid "always"
msgstr "sempre" msgstr "sempre"
msgid "Use workaround for HWAccelerated OSD"
msgstr ""
msgid "Show Main Menu Entry" msgid "Show Main Menu Entry"
msgstr "Hauptmenüeintrag anzeigen" msgstr "Hauptmenüeintrag anzeigen"
@ -900,39 +783,15 @@ msgstr "Scegli dall'elenco cartelle"
msgid "Use fixed folder" msgid "Use fixed folder"
msgstr "Usa cartella fissa" msgstr "Usa cartella fissa"
msgid "smart"
msgstr "intelligente"
msgid "Instant recording:"
msgstr ""
msgid "Folder for instant Recordings" msgid "Folder for instant Recordings"
msgstr "Cartella per la registrazione immediata" 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" msgid "Use Remotetimers"
msgstr "Usa Remotetimers" msgstr "Usa Remotetimers"
msgid "Show timer confirmation messages"
msgstr ""
msgid "Favorites:"
msgstr ""
msgid "Limit channels in favorites" msgid "Limit channels in favorites"
msgstr "Limite dei canali nei favoriti" msgstr "Limite dei canali nei favoriti"
msgid "Start Channel"
msgstr "Avvia il Canale"
msgid "Stop Channel"
msgstr "Ferma il Canale"
msgid "Use \"What's on now\" in favorites" msgid "Use \"What's on now\" in favorites"
msgstr "Usa \"In programma ora\" nei favoriti" msgstr "Usa \"In programma ora\" nei favoriti"
@ -1068,6 +927,9 @@ msgstr "Überblick"
msgid "yes" msgid "yes"
msgstr "Si" msgstr "Si"
msgid "no"
msgstr "No"
msgid "Adult" msgid "Adult"
msgstr "Per adulti" msgstr "Per adulti"
@ -1097,12 +959,3 @@ msgstr "TheMovieDB Popularità"
msgid "TheMovieDB Vote Average" msgid "TheMovieDB Vote Average"
msgstr "Voto medio di TheMovieDB" msgstr "Voto medio di TheMovieDB"
#~ msgid "Number of allowed repeats"
#~ msgstr "Numero di ripetizioni permesse"
#~ msgid "Display advanced Options"
#~ msgstr "Mostra Opzioni avanzate"
#~ msgid "Hide advanced Options"
#~ msgstr "Nascondi Opzioni avanzate"

View File

@ -3,7 +3,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: vdr-tvguide 1.0.0\n" "Project-Id-Version: vdr-tvguide 1.0.0\n"
"Report-Msgid-Bugs-To: <see README>\n" "Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2022-04-29 16:05+0200\n" "POT-Creation-Date: 2019-04-12 14:35+0200\n"
"PO-Revision-Date: 2013-09-25 17:49+0400\n" "PO-Revision-Date: 2013-09-25 17:49+0400\n"
"Last-Translator: AmiD, ilya\n" "Last-Translator: AmiD, ilya\n"
"Language-Team: Russia-Cherepovets(wm.amid@gmail.com)\n" "Language-Team: Russia-Cherepovets(wm.amid@gmail.com)\n"
@ -22,7 +22,7 @@ msgid "min"
msgstr "мин" msgstr "мин"
msgid "Reruns of " msgid "Reruns of "
msgstr "ПОВТОРЫ ЭТОЙ " msgstr ""
msgid "No reruns found" msgid "No reruns found"
msgstr "" msgstr ""
@ -54,9 +54,6 @@ msgstr ""
msgid "images" msgid "images"
msgstr "" msgstr ""
msgid "tvguide: RemoteTimerModifications failed"
msgstr ""
msgid "root video folder" msgid "root video folder"
msgstr "Главная видео директория" msgstr "Главная видео директория"
@ -72,15 +69,6 @@ msgstr "все каналы"
msgid "unknown channel" msgid "unknown channel"
msgstr "неизвестный канал" msgstr "неизвестный канал"
msgid "with"
msgstr ""
msgid "errors"
msgstr ""
msgid "error"
msgstr ""
msgid "Duration" msgid "Duration"
msgstr "Продолжительность" msgstr "Продолжительность"
@ -108,18 +96,21 @@ msgstr ""
msgid "recordings done" msgid "recordings done"
msgstr "" msgstr ""
msgid "What's on now"
msgstr ""
msgid "What's on next"
msgstr ""
msgid "Instant Record" msgid "Instant Record"
msgstr "Записать" msgstr "Записать"
msgid "Timer On/Off" msgid "Delete Timer"
msgstr "таймер Вкл/Выкл" msgstr "Удалить таймер"
msgid "Edit Timer" msgid "Edit Timer"
msgstr "Редактировать таймер" msgstr "Редактировать таймер"
msgid "Delete Timer"
msgstr "Удалить таймер"
msgid "Timer Timeline" msgid "Timer Timeline"
msgstr "" msgstr ""
@ -150,9 +141,6 @@ msgstr "Искать в записях"
msgid "Set Folder for" msgid "Set Folder for"
msgstr "Укажите каталог для" msgstr "Укажите каталог для"
msgid "Timer changed"
msgstr ""
msgid "Timer created" msgid "Timer created"
msgstr "Таймер создан" msgstr "Таймер создан"
@ -177,14 +165,14 @@ msgstr "Да"
msgid "No" msgid "No"
msgstr "Нет" msgstr "Нет"
msgid "Timer Conflicts" msgid "One"
msgstr "Таймер-конфликты" msgstr "Один"
msgid "detected" msgid "detected"
msgstr "обнаружен" msgstr "обнаружен"
msgid "Ignore Conflicts" msgid "Timer Conflicts"
msgstr "Игнорировать конфликты" msgstr "Таймер-конфликты"
msgid "Show conflict" msgid "Show conflict"
msgstr "Показать конфликты" msgstr "Показать конфликты"
@ -192,6 +180,9 @@ msgstr "Показать конфликты"
msgid "timers involved" msgid "timers involved"
msgstr "Таймер" msgstr "Таймер"
msgid "Ignore Conflicts"
msgstr "Игнорировать конфликты"
msgid "Ignore Conflict" msgid "Ignore Conflict"
msgstr "Игнорировать конфликт" msgstr "Игнорировать конфликт"
@ -222,12 +213,6 @@ msgstr ""
msgid "replaced by rerun" msgid "replaced by rerun"
msgstr "" msgstr ""
msgid "Save"
msgstr "Сохранить"
msgid "Cancel"
msgstr "Отменить"
msgid "Timer Active" msgid "Timer Active"
msgstr "Таймер активен" msgstr "Таймер активен"
@ -252,11 +237,14 @@ msgstr ""
msgid "New Folder" msgid "New Folder"
msgstr "" msgstr ""
msgid "Create Series Timer based on:" msgid "Save"
msgstr "Настроить циклический таймер:" msgstr "Сохранить"
msgid "Create Timer" msgid "Cancel"
msgstr "Создать" msgstr "Отменить"
msgid "Create Series Timer based on"
msgstr "Настроить циклический таймер"
msgid "Series Timer start time" msgid "Series Timer start time"
msgstr "Время с" msgstr "Время с"
@ -270,6 +258,9 @@ msgstr "Дни недели"
msgid "Day to start" msgid "Day to start"
msgstr "Начиная с" msgstr "Начиная с"
msgid "Create Timer"
msgstr "Создать"
msgid "Series Timer created" msgid "Series Timer created"
msgstr "Циклический таймер создан" msgstr "Циклический таймер создан"
@ -279,17 +270,17 @@ msgstr "Старт"
msgid "Stop" msgid "Stop"
msgstr "Стоп" msgstr "Стоп"
msgid "Configure Search Timer based on:" msgid "Configure Search Timer based on"
msgstr "Настроить поисковый таймер:" msgstr "Настроить поисковый таймер"
msgid "Continue"
msgstr "Продолжить"
msgid "Search Expression:" msgid "Search Expression:"
msgstr "Искать выражение:" msgstr "Искать выражение:"
msgid "Configure Search Timer for Search String:" msgid "Continue"
msgstr "Настройка таймера поиска по ключевым словам:" msgstr "Продолжить"
msgid "Configure Search Timer for Search String"
msgstr "Настройка таймера поиска по ключевым словам"
msgid "Manually configure Options" msgid "Manually configure Options"
msgstr "Ручная настройка параметров" msgstr "Ручная настройка параметров"
@ -304,111 +295,87 @@ msgid "No Search Timers Configured"
msgstr "" msgstr ""
msgid "Configure Search Timer Options" msgid "Configure Search Timer Options"
msgstr "Настроить параметры таймера" msgstr ""
msgid "Save Search Timer" msgid "Save Search Timer"
msgstr "" msgstr ""
msgid "Search term" msgid "Search String"
msgstr "" msgstr ""
msgid "Active" msgid "Active"
msgstr "" msgstr ""
msgid "Search mode" msgid "Search Mode"
msgstr "" msgstr "Режим поиска"
msgid "Tolerance" msgid "Use Title"
msgstr ""
msgid "Match case"
msgstr ""
msgid "Use title"
msgstr "Искать в названиях" msgstr "Искать в названиях"
msgid "Use subtitle" msgid "Use Subtitle"
msgstr "Искать в эпизодах" msgstr "Искать в эпизодах"
msgid "Use description" msgid "Use Description"
msgstr "Искать в описаниях" msgstr "Искать в описаниях"
msgid "Use channel" msgid "Limit Channels"
msgstr "Ограничить список каналов" msgstr "Ограничить список каналов"
msgid "from channel" msgid "Use Time"
msgstr ""
msgid "to channel"
msgstr ""
msgid "Channel group"
msgstr ""
msgid "Use time"
msgstr "Время" msgstr "Время"
msgid "Display advanced Options"
msgstr ""
msgid "Limit Days of the Week"
msgstr ""
msgid "Time margin for start in minutes"
msgstr ""
msgid "Time margin for stop in minutes"
msgstr ""
msgid "Series Recording"
msgstr ""
msgid "Folder"
msgstr ""
msgid "Use VPS"
msgstr ""
msgid "Avoid Repeats"
msgstr ""
msgid "Use in Favorites"
msgstr ""
msgid "Hide advanced Options"
msgstr ""
msgid "Display Results for Search Timer"
msgstr "Тест"
msgid "Start Channel"
msgstr "С канала"
msgid "Stop Channel"
msgstr "По канал"
msgid "Channel Group"
msgstr ""
msgid "Start after" msgid "Start after"
msgstr "С" msgstr "С"
msgid "Start before" msgid "Start before"
msgstr "До" msgstr "До"
msgid "Use duration" msgid "Select Days"
msgstr "" msgstr ""
msgid "Min. duration" msgid "Number of allowed repeats"
msgstr ""
msgid "Max. duration"
msgstr ""
msgid "Use day of week"
msgstr ""
msgid "Day of week"
msgstr ""
msgid "Use in Favorites"
msgstr ""
msgid "Use as search timer"
msgstr ""
msgid "Action"
msgstr ""
msgid "Switch ... minutes before start"
msgstr ""
msgid "Unmute sound"
msgstr ""
msgid "Ask ... minutes before start"
msgstr ""
msgid "Series Recording"
msgstr ""
msgid "Directory"
msgstr ""
msgid "Delete recordings after ... days"
msgstr ""
msgid "Keep ... recordings"
msgstr ""
msgid "Pause when ... recordings exist"
msgstr ""
msgid "Avoid Repeats"
msgstr ""
msgid "Allowed repeats"
msgstr ""
msgid "Only repeats within ... days"
msgstr "" msgstr ""
msgid "Compare Title" msgid "Compare Title"
@ -420,33 +387,6 @@ msgstr ""
msgid "Compare Description" msgid "Compare Description"
msgstr "" msgstr ""
msgid "Min. match in %"
msgstr ""
msgid "Compare date"
msgstr ""
msgid "Time margin for start in minutes"
msgstr ""
msgid "Time margin for stop in minutes"
msgstr ""
msgid "Use VPS"
msgstr ""
msgid "Auto delete"
msgstr ""
msgid "after ... recordings"
msgstr ""
msgid "after ... days after first rec."
msgstr ""
msgid "Display Results for Search Timer"
msgstr "Тест"
msgid "Really delete Search Timer" msgid "Really delete Search Timer"
msgstr "" msgstr ""
@ -456,7 +396,7 @@ msgstr ""
msgid "Delete Search Timer and created Timers" msgid "Delete Search Timer and created Timers"
msgstr "" msgstr ""
msgid "Search Timer sucessfully created" msgid "Search Timer sucessfully created."
msgstr "Поисковый таймер создан" msgstr "Поисковый таймер создан"
msgid "Search Timer update initialised" msgid "Search Timer update initialised"
@ -480,12 +420,12 @@ msgstr "Использовать другие шаблоны"
msgid "search results for Favorite" msgid "search results for Favorite"
msgstr "" msgstr ""
msgid "search results for Search Timer"
msgstr "Совпадений найдено"
msgid "search result for Favorite" msgid "search result for Favorite"
msgstr "" msgstr ""
msgid "search results for Search Timer"
msgstr "Совпадений найдено"
msgid "search result for Search Timer" msgid "search result for Search Timer"
msgstr "Совпадение найдено" msgstr "Совпадение найдено"
@ -495,8 +435,8 @@ msgstr "Совпадений НЕ найдено"
msgid "Configure Options for Switchtimer" msgid "Configure Options for Switchtimer"
msgstr "Настройка таймера переключения" msgstr "Настройка таймера переключения"
msgid "Create" msgid "Minutes before switching"
msgstr "Создать" msgstr "Минут до события"
msgid "switch" msgid "switch"
msgstr "Переключить" msgstr "Переключить"
@ -507,12 +447,12 @@ msgstr "Только предупредить"
msgid "ask for switch" msgid "ask for switch"
msgstr "Спросить о переключении" msgstr "Спросить о переключении"
msgid "Minutes before switching"
msgstr "Минут до события"
msgid "Switch Mode" msgid "Switch Mode"
msgstr "Режим переключения" msgstr "Режим переключения"
msgid "Create"
msgstr "Создать"
msgid "Switch Timer sucessfully created" msgid "Switch Timer sucessfully created"
msgstr "Таймер переключения создан" msgstr "Таймер переключения создан"
@ -522,12 +462,6 @@ msgstr "Таймер переключения НЕ был создан!"
msgid "Switch Timer deleted" msgid "Switch Timer deleted"
msgstr "Таймер переключения удален" msgstr "Таймер переключения удален"
msgid "Perform Search"
msgstr "Найти"
msgid "Search Mode"
msgstr "Режим поиска"
msgid "Channel to Search" msgid "Channel to Search"
msgstr "Канал для поиска" msgstr "Канал для поиска"
@ -543,6 +477,9 @@ msgstr "Искать в описаниях"
msgid "Show Search Options" msgid "Show Search Options"
msgstr "Показать параметры поиска" msgstr "Показать параметры поиска"
msgid "Perform Search"
msgstr "Найти"
msgid "search results for" msgid "search results for"
msgstr "Найдено по запросу" msgstr "Найдено по запросу"
@ -558,12 +495,12 @@ msgstr ""
msgid "Found" msgid "Found"
msgstr "Найдено" msgstr "Найдено"
msgid "recordings"
msgstr "записей"
msgid "recording" msgid "recording"
msgstr "запись" msgstr "запись"
msgid "recordings"
msgstr "записей"
msgid "for" msgid "for"
msgstr "для" msgstr "для"
@ -573,12 +510,6 @@ msgstr "Не найдено записей:"
msgid "No Favorites available" msgid "No Favorites available"
msgstr "" msgstr ""
msgid "What's on now"
msgstr ""
msgid "What's on next"
msgstr ""
msgid "whole term must appear" msgid "whole term must appear"
msgstr "фраза" msgstr "фраза"
@ -594,57 +525,12 @@ msgstr "точное совпадение"
msgid "regular expression" msgid "regular expression"
msgstr "регулярные выражения" msgstr "регулярные выражения"
msgid "fuzzy"
msgstr ""
msgid "allow empty"
msgstr ""
msgid "Interval" msgid "Interval"
msgstr "" msgstr ""
msgid "Channel Group"
msgstr ""
msgid "only FTA" msgid "only FTA"
msgstr "" msgstr ""
msgid "same day"
msgstr ""
msgid "same week"
msgstr ""
msgid "same month"
msgstr ""
msgid "Record"
msgstr ""
msgid "Announce by OSD"
msgstr ""
msgid "Switch only"
msgstr ""
msgid "Announce and switch"
msgstr ""
msgid "Announce by mail"
msgstr ""
msgid "Inactive record"
msgstr ""
msgid "no"
msgstr ""
msgid "count recordings"
msgstr ""
msgid "count days"
msgstr ""
msgid "General Settings" msgid "General Settings"
msgstr "Основные настройки" msgstr "Основные настройки"
@ -690,9 +576,6 @@ msgstr "если существует"
msgid "always" msgid "always"
msgstr "всегда" msgstr "всегда"
msgid "Use workaround for HWAccelerated OSD"
msgstr ""
msgid "Show Main Menu Entry" msgid "Show Main Menu Entry"
msgstr "Показывать пункт в главном меню" msgstr "Показывать пункт в главном меню"
@ -769,7 +652,7 @@ msgid "Display time in EPG Grids"
msgstr "Показывать время в сетке EPG" msgstr "Показывать время в сетке EPG"
msgid "Height of Headers (Status Header and EPG View, Perc. of osd height)" msgid "Height of Headers (Status Header and EPG View, Perc. of osd height)"
msgstr "Высота верхней панели (% от высоты OSD)" msgstr ""
msgid "Height of Footer (Perc. of osd height)" msgid "Height of Footer (Perc. of osd height)"
msgstr "" msgstr ""
@ -900,39 +783,15 @@ msgstr ""
msgid "Use fixed folder" msgid "Use fixed folder"
msgstr "" msgstr ""
msgid "smart"
msgstr ""
msgid "Instant recording:"
msgstr ""
msgid "Folder for instant Recordings" msgid "Folder for instant Recordings"
msgstr "Использовать директории для быстрой записи"
msgid "Folder"
msgstr ""
msgid "Add episode to manual timers"
msgstr "" msgstr ""
msgid "Use Remotetimers" msgid "Use Remotetimers"
msgstr "RemoteTimers benutzen" msgstr "RemoteTimers benutzen"
msgid "Show timer confirmation messages"
msgstr ""
msgid "Favorites:"
msgstr ""
msgid "Limit channels in favorites" msgid "Limit channels in favorites"
msgstr "" msgstr ""
msgid "Start Channel"
msgstr "С канала"
msgid "Stop Channel"
msgstr "По канал"
msgid "Use \"What's on now\" in favorites" msgid "Use \"What's on now\" in favorites"
msgstr "" msgstr ""
@ -1009,7 +868,7 @@ msgid "EPG Info"
msgstr "" msgstr ""
msgid "Reruns" msgid "Reruns"
msgstr "ПОВТОРЫ" msgstr ""
msgid "Recording Information" msgid "Recording Information"
msgstr "" msgstr ""
@ -1068,6 +927,9 @@ msgstr ""
msgid "yes" msgid "yes"
msgstr "" msgstr ""
msgid "no"
msgstr ""
msgid "Adult" msgid "Adult"
msgstr "" msgstr ""

View File

@ -3,7 +3,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: vdr-tvguide 1.1.0\n" "Project-Id-Version: vdr-tvguide 1.1.0\n"
"Report-Msgid-Bugs-To: <see README>\n" "Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2022-04-29 16:05+0200\n" "POT-Creation-Date: 2019-04-12 14:35+0200\n"
"PO-Revision-Date: 2013-09-15 00:12+0100\n" "PO-Revision-Date: 2013-09-15 00:12+0100\n"
"Last-Translator: Milan Hrala <hrala.milan@gmail.com>\n" "Last-Translator: Milan Hrala <hrala.milan@gmail.com>\n"
"Language-Team: \n" "Language-Team: \n"
@ -22,7 +22,7 @@ msgid "min"
msgstr "min" msgstr "min"
msgid "Reruns of " msgid "Reruns of "
msgstr "Repríza tohto " msgstr ""
msgid "No reruns found" msgid "No reruns found"
msgstr "" msgstr ""
@ -54,9 +54,6 @@ msgstr ""
msgid "images" msgid "images"
msgstr "" msgstr ""
msgid "tvguide: RemoteTimerModifications failed"
msgstr ""
msgid "root video folder" msgid "root video folder"
msgstr "Hlavný video adresár" msgstr "Hlavný video adresár"
@ -72,15 +69,6 @@ msgstr "v
msgid "unknown channel" msgid "unknown channel"
msgstr "neznámy Kanal" msgstr "neznámy Kanal"
msgid "with"
msgstr ""
msgid "errors"
msgstr ""
msgid "error"
msgstr ""
msgid "Duration" msgid "Duration"
msgstr "Då¾ka" msgstr "Då¾ka"
@ -108,18 +96,21 @@ msgstr ""
msgid "recordings done" msgid "recordings done"
msgstr "" msgstr ""
msgid "What's on now"
msgstr ""
msgid "What's on next"
msgstr ""
msgid "Instant Record" msgid "Instant Record"
msgstr "Okam¾ite nahra»" msgstr "Okam¾ite nahra»"
msgid "Timer On/Off" msgid "Delete Timer"
msgstr "Zap./Vyp. plán nahrávania" msgstr "Vymaza» plán nahrávania"
msgid "Edit Timer" msgid "Edit Timer"
msgstr "Upravi» plán nahrávania" msgstr "Upravi» plán nahrávania"
msgid "Delete Timer"
msgstr "Vymaza» plán nahrávania"
msgid "Timer Timeline" msgid "Timer Timeline"
msgstr "" msgstr ""
@ -150,9 +141,6 @@ msgstr "Vyh
msgid "Set Folder for" msgid "Set Folder for"
msgstr "Nastavi» adresár pre" msgstr "Nastavi» adresár pre"
msgid "Timer changed"
msgstr ""
msgid "Timer created" msgid "Timer created"
msgstr "Plán vytvorený" msgstr "Plán vytvorený"
@ -177,14 +165,14 @@ msgstr "
msgid "No" msgid "No"
msgstr "Nie" msgstr "Nie"
msgid "Timer Conflicts" msgid "One"
msgstr "Konflikty plánov" msgstr "Jeden"
msgid "detected" msgid "detected"
msgstr "nájdených" msgstr "nájdených"
msgid "Ignore Conflicts" msgid "Timer Conflicts"
msgstr "Ignorova» konflikty" msgstr "Konflikty plánov"
msgid "Show conflict" msgid "Show conflict"
msgstr "Zobrazi» konflikt" msgstr "Zobrazi» konflikt"
@ -192,6 +180,9 @@ msgstr "Zobrazi
msgid "timers involved" msgid "timers involved"
msgstr "plány komplikované" msgstr "plány komplikované"
msgid "Ignore Conflicts"
msgstr "Ignorova» konflikty"
msgid "Ignore Conflict" msgid "Ignore Conflict"
msgstr "Ignorova» konflikt" msgstr "Ignorova» konflikt"
@ -222,12 +213,6 @@ msgstr ""
msgid "replaced by rerun" msgid "replaced by rerun"
msgstr "" msgstr ""
msgid "Save"
msgstr "Ulo¾i»"
msgid "Cancel"
msgstr "Zru¹i»"
msgid "Timer Active" msgid "Timer Active"
msgstr "Plán aktívny" msgstr "Plán aktívny"
@ -252,11 +237,14 @@ msgstr ""
msgid "New Folder" msgid "New Folder"
msgstr "" msgstr ""
msgid "Create Series Timer based on:" msgid "Save"
msgstr "Vytvorenie plánu na základe série:" msgstr "Ulo¾i»"
msgid "Create Timer" msgid "Cancel"
msgstr "Vytvori» plán" msgstr "Zru¹i»"
msgid "Create Series Timer based on"
msgstr "Vytvorenie plánu na základe série"
msgid "Series Timer start time" msgid "Series Timer start time"
msgstr "Sériový plán zaèína" msgstr "Sériový plán zaèína"
@ -270,6 +258,9 @@ msgstr "Dni"
msgid "Day to start" msgid "Day to start"
msgstr "Zaèína dòa" msgstr "Zaèína dòa"
msgid "Create Timer"
msgstr "Vytvori» plán"
msgid "Series Timer created" msgid "Series Timer created"
msgstr "Vytvorený sériový plán" msgstr "Vytvorený sériový plán"
@ -279,17 +270,17 @@ msgstr "
msgid "Stop" msgid "Stop"
msgstr "Stop" msgstr "Stop"
msgid "Configure Search Timer based on:" msgid "Configure Search Timer based on"
msgstr "Vyhµadávanie plánu nastavi» na základe:" msgstr "Vyhµadávanie plánu nastavi» na základe"
msgid "Continue"
msgstr "Ïal¹ie"
msgid "Search Expression:" msgid "Search Expression:"
msgstr "Hµadaný výraz:" msgstr "Hµadaný výraz:"
msgid "Configure Search Timer for Search String:" msgid "Continue"
msgstr "Konfigurácia vyhµadávania plánu pre hµadané kµúèové slovo:" msgstr "Ïal¹ie"
msgid "Configure Search Timer for Search String"
msgstr "Konfigurácia vyhµadávania plánu pre hµadané kµúèové slovo "
msgid "Manually configure Options" msgid "Manually configure Options"
msgstr "Ruène konfigurova» mo¾nosti" msgstr "Ruène konfigurova» mo¾nosti"
@ -309,106 +300,82 @@ msgstr ""
msgid "Save Search Timer" msgid "Save Search Timer"
msgstr "" msgstr ""
msgid "Search term" msgid "Search String"
msgstr "" msgstr ""
msgid "Active" msgid "Active"
msgstr "" msgstr ""
msgid "Search mode" msgid "Search Mode"
msgstr "" msgstr "Re¾im vyhµadávania"
msgid "Tolerance" msgid "Use Title"
msgstr ""
msgid "Match case"
msgstr ""
msgid "Use title"
msgstr "Pou¾i» názov" msgstr "Pou¾i» názov"
msgid "Use subtitle" msgid "Use Subtitle"
msgstr "Pou¾i» titulky" msgstr "Pou¾i» titulky"
msgid "Use description" msgid "Use Description"
msgstr "Pou¾i» popis" msgstr "Pou¾i» popis"
msgid "Use channel" msgid "Limit Channels"
msgstr "Obmedzi» kanály" msgstr "Obmedzi» kanály"
msgid "from channel" msgid "Use Time"
msgstr ""
msgid "to channel"
msgstr ""
msgid "Channel group"
msgstr ""
msgid "Use time"
msgstr "Pou¾i» èas" msgstr "Pou¾i» èas"
msgid "Display advanced Options"
msgstr ""
msgid "Limit Days of the Week"
msgstr ""
msgid "Time margin for start in minutes"
msgstr ""
msgid "Time margin for stop in minutes"
msgstr ""
msgid "Series Recording"
msgstr ""
msgid "Folder"
msgstr ""
msgid "Use VPS"
msgstr ""
msgid "Avoid Repeats"
msgstr ""
msgid "Use in Favorites"
msgstr ""
msgid "Hide advanced Options"
msgstr ""
msgid "Display Results for Search Timer"
msgstr "Pozrie» výsledky pre vyhµadávanie plánov"
msgid "Start Channel"
msgstr "Od kanálu"
msgid "Stop Channel"
msgstr "Po kanál"
msgid "Channel Group"
msgstr ""
msgid "Start after" msgid "Start after"
msgstr "Zaèiatok po" msgstr "Zaèiatok po"
msgid "Start before" msgid "Start before"
msgstr "Zaèiatok pred" msgstr "Zaèiatok pred"
msgid "Use duration" msgid "Select Days"
msgstr "" msgstr ""
msgid "Min. duration" msgid "Number of allowed repeats"
msgstr ""
msgid "Max. duration"
msgstr ""
msgid "Use day of week"
msgstr ""
msgid "Day of week"
msgstr ""
msgid "Use in Favorites"
msgstr ""
msgid "Use as search timer"
msgstr ""
msgid "Action"
msgstr ""
msgid "Switch ... minutes before start"
msgstr ""
msgid "Unmute sound"
msgstr ""
msgid "Ask ... minutes before start"
msgstr ""
msgid "Series Recording"
msgstr ""
msgid "Directory"
msgstr ""
msgid "Delete recordings after ... days"
msgstr ""
msgid "Keep ... recordings"
msgstr ""
msgid "Pause when ... recordings exist"
msgstr ""
msgid "Avoid Repeats"
msgstr ""
msgid "Allowed repeats"
msgstr ""
msgid "Only repeats within ... days"
msgstr "" msgstr ""
msgid "Compare Title" msgid "Compare Title"
@ -420,33 +387,6 @@ msgstr ""
msgid "Compare Description" msgid "Compare Description"
msgstr "" msgstr ""
msgid "Min. match in %"
msgstr ""
msgid "Compare date"
msgstr ""
msgid "Time margin for start in minutes"
msgstr ""
msgid "Time margin for stop in minutes"
msgstr ""
msgid "Use VPS"
msgstr ""
msgid "Auto delete"
msgstr ""
msgid "after ... recordings"
msgstr ""
msgid "after ... days after first rec."
msgstr ""
msgid "Display Results for Search Timer"
msgstr "Pozrie» výsledky pre vyhµadávanie plánov"
msgid "Really delete Search Timer" msgid "Really delete Search Timer"
msgstr "" msgstr ""
@ -456,8 +396,8 @@ msgstr ""
msgid "Delete Search Timer and created Timers" msgid "Delete Search Timer and created Timers"
msgstr "" msgstr ""
msgid "Search Timer sucessfully created" msgid "Search Timer sucessfully created."
msgstr "Vyhµadávaè plánu vytvorený" msgstr "Vyhµadávaè plánu vytvorený."
msgid "Search Timer update initialised" msgid "Search Timer update initialised"
msgstr "Vyhladávaè plánu inicializovaný" msgstr "Vyhladávaè plánu inicializovaný"
@ -480,12 +420,12 @@ msgstr "Pou
msgid "search results for Favorite" msgid "search results for Favorite"
msgstr "" msgstr ""
msgid "search results for Search Timer"
msgstr "nájdené výsledky vyhµadávania plánu"
msgid "search result for Favorite" msgid "search result for Favorite"
msgstr "" msgstr ""
msgid "search results for Search Timer"
msgstr "nájdené výsledky vyhµadávania plánu"
msgid "search result for Search Timer" msgid "search result for Search Timer"
msgstr "nájdený výsledok vyhµadávania plánu" msgstr "nájdený výsledok vyhµadávania plánu"
@ -495,8 +435,8 @@ msgstr "H
msgid "Configure Options for Switchtimer" msgid "Configure Options for Switchtimer"
msgstr "Konfigurova» mo¾nosti pre prepínací plán" msgstr "Konfigurova» mo¾nosti pre prepínací plán"
msgid "Create" msgid "Minutes before switching"
msgstr "Vytvori»" msgstr "Minúty pred prepnutím"
msgid "switch" msgid "switch"
msgstr "Prepnú»" msgstr "Prepnú»"
@ -507,12 +447,12 @@ msgstr "iba ozn
msgid "ask for switch" msgid "ask for switch"
msgstr "opýta» sa na prepnutie" msgstr "opýta» sa na prepnutie"
msgid "Minutes before switching"
msgstr "Minúty pred prepnutím"
msgid "Switch Mode" msgid "Switch Mode"
msgstr "Prepínací re¾im" msgstr "Prepínací re¾im"
msgid "Create"
msgstr "Vytvori»"
msgid "Switch Timer sucessfully created" msgid "Switch Timer sucessfully created"
msgstr "Prepnutie je naplánované" msgstr "Prepnutie je naplánované"
@ -522,12 +462,6 @@ msgstr "Pl
msgid "Switch Timer deleted" msgid "Switch Timer deleted"
msgstr "Plán prepnutia vymazaný" msgstr "Plán prepnutia vymazaný"
msgid "Perform Search"
msgstr "Vykona» vyhµadávanie"
msgid "Search Mode"
msgstr "Re¾im vyhµadávania"
msgid "Channel to Search" msgid "Channel to Search"
msgstr "Hµada» na kanále" msgstr "Hµada» na kanále"
@ -543,6 +477,9 @@ msgstr "H
msgid "Show Search Options" msgid "Show Search Options"
msgstr "Zobrazi» mo¾nosti vyhµadávania" msgstr "Zobrazi» mo¾nosti vyhµadávania"
msgid "Perform Search"
msgstr "Vykona» vyhµadávanie"
msgid "search results for" msgid "search results for"
msgstr "vyhµadané výsledky pre" msgstr "vyhµadané výsledky pre"
@ -558,12 +495,12 @@ msgstr ""
msgid "Found" msgid "Found"
msgstr "Nájdené" msgstr "Nájdené"
msgid "recordings"
msgstr "nahrávky"
msgid "recording" msgid "recording"
msgstr "nahrávka" msgstr "nahrávka"
msgid "recordings"
msgstr "nahrávky"
msgid "for" msgid "for"
msgstr "pre" msgstr "pre"
@ -573,12 +510,6 @@ msgstr "Nena
msgid "No Favorites available" msgid "No Favorites available"
msgstr "" msgstr ""
msgid "What's on now"
msgstr ""
msgid "What's on next"
msgstr ""
msgid "whole term must appear" msgid "whole term must appear"
msgstr "kompletný výraz" msgstr "kompletný výraz"
@ -594,57 +525,12 @@ msgstr "presn
msgid "regular expression" msgid "regular expression"
msgstr "regulárny výraz" msgstr "regulárny výraz"
msgid "fuzzy"
msgstr ""
msgid "allow empty"
msgstr ""
msgid "Interval" msgid "Interval"
msgstr "" msgstr ""
msgid "Channel Group"
msgstr ""
msgid "only FTA" msgid "only FTA"
msgstr "" msgstr ""
msgid "same day"
msgstr ""
msgid "same week"
msgstr ""
msgid "same month"
msgstr ""
msgid "Record"
msgstr ""
msgid "Announce by OSD"
msgstr ""
msgid "Switch only"
msgstr ""
msgid "Announce and switch"
msgstr ""
msgid "Announce by mail"
msgstr ""
msgid "Inactive record"
msgstr ""
msgid "no"
msgstr ""
msgid "count recordings"
msgstr ""
msgid "count days"
msgstr ""
msgid "General Settings" msgid "General Settings"
msgstr "V¹eobecné nastavenia" msgstr "V¹eobecné nastavenia"
@ -690,9 +576,6 @@ msgstr "ak s
msgid "always" msgid "always"
msgstr "v¾dy" msgstr "v¾dy"
msgid "Use workaround for HWAccelerated OSD"
msgstr ""
msgid "Show Main Menu Entry" msgid "Show Main Menu Entry"
msgstr "Zobrazi» v hlavnom menu" msgstr "Zobrazi» v hlavnom menu"
@ -769,7 +652,7 @@ msgid "Display time in EPG Grids"
msgstr "Zobrazi» èas v EPG mrie¾ke" msgstr "Zobrazi» èas v EPG mrie¾ke"
msgid "Height of Headers (Status Header and EPG View, Perc. of osd height)" msgid "Height of Headers (Status Header and EPG View, Perc. of osd height)"
msgstr "Vý¹ka stavovej hlavièky (% z OSD vý¹ky)" msgstr ""
msgid "Height of Footer (Perc. of osd height)" msgid "Height of Footer (Perc. of osd height)"
msgstr "" msgstr ""
@ -900,39 +783,15 @@ msgstr ""
msgid "Use fixed folder" msgid "Use fixed folder"
msgstr "" msgstr ""
msgid "smart"
msgstr "chytrý"
msgid "Instant recording:"
msgstr ""
msgid "Folder for instant Recordings" msgid "Folder for instant Recordings"
msgstr "Pou¾i» adresáre pre okam¾ité nahrávky"
msgid "Folder"
msgstr "" msgstr ""
msgid "Add episode to manual timers"
msgstr "Prida¿ epizódy do ru¿ného ¿asova¿a"
msgid "Use Remotetimers" msgid "Use Remotetimers"
msgstr "Pou¾i» vzdialený plánovaè" msgstr "Pou¾i» vzdialený plánovaè"
msgid "Show timer confirmation messages"
msgstr ""
msgid "Favorites:"
msgstr ""
msgid "Limit channels in favorites" msgid "Limit channels in favorites"
msgstr "" msgstr ""
msgid "Start Channel"
msgstr "Od kanálu"
msgid "Stop Channel"
msgstr "Po kanál"
msgid "Use \"What's on now\" in favorites" msgid "Use \"What's on now\" in favorites"
msgstr "" msgstr ""
@ -1009,7 +868,7 @@ msgid "EPG Info"
msgstr "" msgstr ""
msgid "Reruns" msgid "Reruns"
msgstr "Repríza" msgstr ""
msgid "Recording Information" msgid "Recording Information"
msgstr "" msgstr ""
@ -1068,6 +927,9 @@ msgstr ""
msgid "yes" msgid "yes"
msgstr "" msgstr ""
msgid "no"
msgstr ""
msgid "Adult" msgid "Adult"
msgstr "" msgstr ""

View File

@ -1,4 +1,4 @@
#define DISABLE_TEMPLATES_COLLIDING_WITH_STL #define __STL_CONFIG_H
#include <string> #include <string>
#include <sstream> #include <sstream>
@ -44,7 +44,7 @@ bool cRecManager::RefreshRemoteTimers(void) {
bool cRecManager::CheckEventForTimer(const cEvent *event) { bool cRecManager::CheckEventForTimer(const cEvent *event) {
bool hasTimer = false; bool hasTimer = false;
if (config.useRemoteTimers && pRemoteTimers) { if (tvguideConfig.useRemoteTimers && pRemoteTimers) {
RemoteTimers_GetMatch_v1_0 rtMatch; RemoteTimers_GetMatch_v1_0 rtMatch;
rtMatch.event = event; rtMatch.event = event;
pRemoteTimers->Service("RemoteTimers::GetMatch-v1.0", &rtMatch); pRemoteTimers->Service("RemoteTimers::GetMatch-v1.0", &rtMatch);
@ -66,7 +66,7 @@ bool cRecManager::CheckEventForTimer(const cEvent *event) {
const cTimer *cRecManager::GetTimerForEvent(const cEvent *event) { const cTimer *cRecManager::GetTimerForEvent(const cEvent *event) {
const cTimer *timer = NULL; const cTimer *timer = NULL;
if (config.useRemoteTimers && pRemoteTimers) { if (tvguideConfig.useRemoteTimers && pRemoteTimers) {
RemoteTimers_GetMatch_v1_0 rtMatch; RemoteTimers_GetMatch_v1_0 rtMatch;
rtMatch.event = event; rtMatch.event = event;
pRemoteTimers->Service("RemoteTimers::GetMatch-v1.0", &rtMatch); pRemoteTimers->Service("RemoteTimers::GetMatch-v1.0", &rtMatch);
@ -85,7 +85,7 @@ const cTimer *cRecManager::GetTimerForEvent(const cEvent *event) {
cTimer *cRecManager::createTimer(const cEvent *event, std::string path) { cTimer *cRecManager::createTimer(const cEvent *event, std::string path) {
cTimer *timer = NULL; cTimer *timer = NULL;
if (config.useRemoteTimers && pRemoteTimers) { if (tvguideConfig.useRemoteTimers && pRemoteTimers) {
timer = createRemoteTimer(event, path); timer = createRemoteTimer(event, path);
} else { } else {
timer = createLocalTimer(event, path); timer = createLocalTimer(event, path);
@ -96,15 +96,13 @@ cTimer *cRecManager::createTimer(const cEvent *event, std::string path) {
cTimer *cRecManager::createLocalTimer(const cEvent *event, std::string path) { cTimer *cRecManager::createLocalTimer(const cEvent *event, std::string path) {
cTimer *timer = new cTimer(event); cTimer *timer = new cTimer(event);
#if VDRVERSNUM >= 20301 #if VDRVERSNUM >= 20301
LOCK_TIMERS_WRITE;
cTimers* timers = Timers;
timers->SetExplicitModify();
if (Setup.SVDRPPeering && *Setup.SVDRPDefaultHost) if (Setup.SVDRPPeering && *Setup.SVDRPDefaultHost)
timer->SetRemote(Setup.SVDRPDefaultHost); ((cTimer*)timer)->SetRemote(Setup.SVDRPDefaultHost);
LOCK_TIMERS_WRITE;
cTimer *t = Timers->GetTimer(timer);
#else #else
cTimers* timers = &Timers; cTimer *t = Timers.GetTimer(timer);
#endif #endif
cTimer *t = timers->GetTimer(timer);
if (t) { if (t) {
t->OnOff(); t->OnOff();
#if VDRVERSNUM >= 20301 #if VDRVERSNUM >= 20301
@ -116,21 +114,20 @@ cTimer *cRecManager::createLocalTimer(const cEvent *event, std::string path) {
timer = t; timer = t;
isyslog("timer %s reactivated", *t->ToDescr()); isyslog("timer %s reactivated", *t->ToDescr());
} else { } else {
SetTimerPath(timer, event, path);
timers->Add(timer);
timers->SetModified();
#if VDRVERSNUM >= 20301 #if VDRVERSNUM >= 20301
if (!HandleRemoteTimerModifications(timer)) { Timers->Add(timer);
timers->Del(timer);
esyslog(tr("tvguide: RemoteTimerModifications failed"));
} else {
isyslog("timer %s added (active)", *timer->ToDescr());
}
#else #else
isyslog("timer %s added (active)", *timer->ToDescr()); Timers.Add(timer);
#endif #endif
isyslog("timer %s added (active)", *timer->ToDescr());
} }
return timers->GetTimer(timer); SetTimerPath(timer, event, path);
#if VDRVERSNUM >= 20301
Timers->SetModified();
#else
Timers.SetModified();
#endif
return timer;
} }
cTimer *cRecManager::createRemoteTimer(const cEvent *event, std::string path) { cTimer *cRecManager::createRemoteTimer(const cEvent *event, std::string path) {
@ -153,9 +150,9 @@ cTimer *cRecManager::createRemoteTimer(const cEvent *event, std::string path) {
} }
void cRecManager::SetTimerPath(cTimer *timer, const cEvent *event, std::string path) { void cRecManager::SetTimerPath(cTimer *timer, const cEvent *event, std::string path) {
if (config.instRecFolderMode == eFolderFixed) { if (tvguideConfig.instRecFolderMode == eFolderFixed) {
Epgsearch_services_v1_2 *epgSearch = new Epgsearch_services_v1_2; Epgsearch_services_v1_2 *epgSearch = new Epgsearch_services_v1_2;
std::string recDir = config.instRecFixedFolder; std::string recDir = tvguideConfig.instRecFixedFolder;
std::replace(recDir.begin(), recDir.end(), '/', '~'); std::replace(recDir.begin(), recDir.end(), '/', '~');
if (strchr(recDir.c_str(), '%') != NULL) { if (strchr(recDir.c_str(), '%') != NULL) {
if (epgSearchPlugin->Service("Epgsearch-services-v1.1", epgSearch)) { if (epgSearchPlugin->Service("Epgsearch-services-v1.1", epgSearch)) {
@ -175,33 +172,35 @@ void cRecManager::SetTimerPath(cTimer *timer, const cEvent *event, std::string p
return; return;
} }
//Set choosen path //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; cString newFileName;
if (path.size() > 0) { if (path.size() > 0) {
std::replace(path.begin(), path.end(), '/', '~'); std::replace(path.begin(), path.end(), '/', '~');
if (addSubtitle) newFileName = cString::sprintf("%s~%s", path.c_str(), timer->File());
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 { } else {
if (addSubtitle) newFileName = event->Title();
newFileName = cString::sprintf("%s~%s", event->Title(), event->ShortText());
else
newFileName = event->Title();
} }
timer->SetFile(*newFileName); timer->SetFile(*newFileName);
} }
void cRecManager::DeleteTimer(int timerID) {
#if VDRVERSNUM >= 20301
cTimer *t;
{
LOCK_TIMERS_WRITE;
t = Timers->Get(timerID);
}
#else
cTimer *t = Timers.Get(timerID);
#endif
if (!t)
return;
DeleteTimer(t);
}
void cRecManager::DeleteTimer(const cEvent *event) { void cRecManager::DeleteTimer(const cEvent *event) {
if (!event) if (!event)
return; return;
if (config.useRemoteTimers && pRemoteTimers) { if (tvguideConfig.useRemoteTimers && pRemoteTimers) {
DeleteRemoteTimer(event); DeleteRemoteTimer(event);
} else { } else {
DeleteLocalTimer(event); DeleteLocalTimer(event);
@ -227,19 +226,12 @@ void cRecManager::DeleteTimer(const cTimer *timer) {
#if VDRVERSNUM >= 20301 #if VDRVERSNUM >= 20301
LOCK_TIMERS_WRITE; LOCK_TIMERS_WRITE;
cTimers* timers = Timers; 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); cTimer* t = timers->GetTimer(timer);
#else #else
cTimers* timers = &Timers; cTimers* timers = &Timers;
cTimer* t = timers->GetTimer((cTimer*)timer); cTimer* t = timers->GetTimer((cTimer*)timer);
#endif #endif
if (!t)
return;
if (t->Recording()) { if (t->Recording()) {
t->Skip(); t->Skip();
#if VDRVERSNUM >= 20301 #if VDRVERSNUM >= 20301
@ -247,7 +239,7 @@ void cRecManager::DeleteTimer(const cTimer *timer) {
#else #else
cRecordControls::Process(time(NULL)); cRecordControls::Process(time(NULL));
#endif #endif
} }
isyslog("timer %s deleted", *t->ToDescr()); isyslog("timer %s deleted", *t->ToDescr());
timers->Del(t, true); timers->Del(t, true);
timers->SetModified(); timers->SetModified();
@ -267,82 +259,56 @@ void cRecManager::DeleteRemoteTimer(const cEvent *event) {
} }
} }
void cRecManager::OnOffTimer(const cEvent *event) { void cRecManager::SaveTimer(const cTimer *t, cTimer newTimerSettings) {
const cTimer *t;
#if VDRVERSNUM >= 20301
{
LOCK_TIMERS_READ;
t = Timers->GetMatch(event);
}
#else
t = Timers.GetMatch(event);
#endif
if (!t)
return;
SaveTimer(t);
}
void cRecManager::SaveTimer(const cTimer *t, cTimer *newTimerSettings) {
if (!t) if (!t)
return; return;
#if VDRVERSNUM >= 20301 #if VDRVERSNUM >= 20301
LOCK_TIMERS_WRITE; LOCK_TIMERS_WRITE;
cTimers* timers = Timers; cTimer *timer = Timers->GetTimer(t);
timers->SetExplicitModify();
if (t && t->Remote()) {
if (!HandleRemoteTimerModifications(newTimerSettings, (cTimer *)t)) {
esyslog(tr("tvguide: RemoteTimerModifications failed"));
}
}
cTimer *timer = timers->GetTimer(t);
#else #else
cTimers* timers = &Timers; cTimer *timer = Timers.GetTimer((cTimer*)t);
cTimer *timer = timers->GetTimer((cTimer *)t);
#endif #endif
if (!timer) {
return;
}
bool active = true; bool active = newTimerSettings.HasFlags(tfActive);
if (newTimerSettings) { int prio = newTimerSettings.Priority();
int prio = newTimerSettings->Priority(); int lifetime = newTimerSettings.Lifetime();
int lifetime = newTimerSettings->Lifetime(); time_t day = newTimerSettings.Day();
time_t day = newTimerSettings->Day(); int start = newTimerSettings.Start();
int start = newTimerSettings->Start(); int stop = newTimerSettings.Stop();
int stop = newTimerSettings->Stop(); std::string fileName = newTimerSettings.File();
std::string fileName = newTimerSettings->File();
timer->SetDay(day); timer->SetDay(day);
timer->SetStart(start); timer->SetStart(start);
timer->SetStop(stop); timer->SetStop(stop);
timer->SetPriority(prio); timer->SetPriority(prio);
timer->SetLifetime(lifetime); timer->SetLifetime(lifetime);
timer->SetFile(fileName.c_str()); timer->SetFile(fileName.c_str());
active = newTimerSettings->HasFlags(tfActive); if (timer->HasFlags(tfActive) && !active)
} else timer->ClrFlags(tfActive);
active = !timer->HasFlags(tfActive); else if (!timer->HasFlags(tfActive) && active)
timer->SetFlags(tfActive);
if (active)
timer->SetFlags(tfActive);
else
timer->ClrFlags(tfActive);
#if VDRVERSNUM < 20300 #if VDRVERSNUM < 20300
timer->SetEventFromSchedule(); timer->SetEventFromSchedule();
#endif #endif
if (config.useRemoteTimers && pRemoteTimers) { if (tvguideConfig.useRemoteTimers && pRemoteTimers) {
RemoteTimers_Timer_v1_0 rt; RemoteTimers_Timer_v1_0 rt;
rt.timer = timer; rt.timer = timer;
if (!pRemoteTimers->Service("RemoteTimers::ModTimer-v1.0", &rt)) if (!pRemoteTimers->Service("RemoteTimers::ModTimer-v1.0", &rt))
rt.timer = NULL; rt.timer = NULL;
RefreshRemoteTimers(); RefreshRemoteTimers();
} else { } else {
timers->SetModified(); #if VDRVERSNUM >= 20301
Timers->SetModified();
#else
Timers.SetModified();
#endif
} }
} }
bool cRecManager::IsRecorded(const cEvent *event) { bool cRecManager::IsRecorded(const cEvent *event) {
#if VDRVERSNUM >= 20301 #if VDRVERSNUM >= 20301
LOCK_TIMERS_WRITE; LOCK_TIMERS_WRITE;
@ -375,10 +341,11 @@ cTVGuideTimerConflicts *cRecManager::CheckTimerConflict(void) {
} }
void cRecManager::CreateSeriesTimer(cTimer *seriesTimer) { void cRecManager::CreateSeriesTimer(cTimer *seriesTimer) {
#if VDRVERSNUM < 20300 #if VDRVERSNUM >= 20301
#else
seriesTimer->SetEventFromSchedule(); seriesTimer->SetEventFromSchedule();
#endif #endif
if (config.useRemoteTimers && pRemoteTimers) { if (tvguideConfig.useRemoteTimers && pRemoteTimers) {
RemoteTimers_Timer_v1_0 rt; RemoteTimers_Timer_v1_0 rt;
rt.timer = seriesTimer; rt.timer = seriesTimer;
if (!pRemoteTimers->Service("RemoteTimers::NewTimer-v1.0", &rt)) if (!pRemoteTimers->Service("RemoteTimers::NewTimer-v1.0", &rt))
@ -388,11 +355,12 @@ void cRecManager::CreateSeriesTimer(cTimer *seriesTimer) {
#if VDRVERSNUM >= 20301 #if VDRVERSNUM >= 20301
LOCK_TIMERS_WRITE; LOCK_TIMERS_WRITE;
cTimers* timers = Timers; cTimers* timers = Timers;
#else
cTimers* timers = &Timers;
#endif
timers->Add(seriesTimer); timers->Add(seriesTimer);
timers->SetModified(); timers->SetModified();
#else
Timers.Add(seriesTimer);
Timers.SetModified();
#endif
} }
} }
@ -527,52 +495,22 @@ void cRecManager::GetSearchTimers(std::vector<cTVGuideSearchTimer> *searchTimer)
std::sort(searchTimer->begin(), searchTimer->end()); std::sort(searchTimer->begin(), searchTimer->end());
} }
void cRecManager::GetSearchExtCats(std::vector<std::string> *searchExtCats) {
if (!epgSearchAvailable) {
return;
}
Epgsearch_services_v1_1 *epgSearch = new Epgsearch_services_v1_1;
if (epgSearchPlugin->Service("Epgsearch-services-v1.1", epgSearch)) {
std::list<std::string> list;
list = epgSearch->handler->ExtEPGInfoList();
for (std::list<std::string>::iterator it = list.begin(); it != list.end(); it++) {
searchExtCats->push_back(*it);
}
}
}
void cRecManager::GetChannelGroups(std::vector<std::string> *channelGroups) { void cRecManager::GetChannelGroups(std::vector<std::string> *channelGroups) {
if (!epgSearchAvailable) { if (!epgSearchAvailable) {
return; return;
} }
Epgsearch_services_v1_1 *epgSearch = new Epgsearch_services_v1_1; Epgsearch_services_v1_1 *epgSearch = new Epgsearch_services_v1_1;
if (epgSearchPlugin->Service("Epgsearch-services-v1.1", epgSearch)) { if (epgSearchPlugin->Service("Epgsearch-services-v1.1", epgSearch)) {
std::list<std::string> list; std::list<std::string> channelGroupList;
list = epgSearch->handler->ChanGrpList(); channelGroupList = epgSearch->handler->ChanGrpList();
for (std::list<std::string>::iterator it = list.begin(); it != list.end(); it++) { for (std::list<std::string>::iterator it = channelGroupList.begin(); it != channelGroupList.end(); it++) {
channelGroups->push_back(*it); channelGroups->push_back(*it);
} }
} }
std::sort(channelGroups->begin(), channelGroups->end()); std::sort(channelGroups->begin(), channelGroups->end());
} }
void cRecManager::GetBlacklists(std::vector<std::string> *blacklists) {
if (!epgSearchAvailable) {
return;
}
Epgsearch_services_v1_1 *epgSearch = new Epgsearch_services_v1_1;
if (epgSearchPlugin->Service("Epgsearch-services-v1.1", epgSearch)) {
std::list<std::string> list;
list = epgSearch->handler->BlackList();
for (std::list<std::string>::iterator it = list.begin(); it != list.end(); it++) {
blacklists->push_back(*it);
}
}
}
int cRecManager::CreateSearchTimer(std::string epgSearchString) { int cRecManager::CreateSearchTimer(std::string epgSearchString) {
int timerID = -1; int timerID = -1;
if (!epgSearchAvailable) if (!epgSearchAvailable)
@ -629,7 +567,7 @@ void cRecManager::DeleteSearchTimer(cTVGuideSearchTimer *searchTimer, bool delTi
timers = &Timers; timers = &Timers;
#endif #endif
cTimer *timer = timers->First(); cTimer *timer = timers->First();
while (timer) { while(timer) {
if (!timer->Recording()) { if (!timer->Recording()) {
char* searchID = GetAuxValue(timer, "s-id"); char* searchID = GetAuxValue(timer, "s-id");
if (searchID) { if (searchID) {
@ -653,9 +591,9 @@ void cRecManager::DeleteSearchTimer(cTVGuideSearchTimer *searchTimer, bool delTi
if (epgSearchPlugin->Service("Epgsearch-services-v1.1", epgSearch)) { if (epgSearchPlugin->Service("Epgsearch-services-v1.1", epgSearch)) {
bool success = epgSearch->handler->DelSearchTimer(searchTimerID); bool success = epgSearch->handler->DelSearchTimer(searchTimerID);
if (success) { if (success) {
esyslog("tvguide: search timer \"%s\" sucessfully deleted", searchTimer->GetSearchString().c_str()); esyslog("tvguide: search timer \"%s\" sucessfully deleted", searchTimer->SearchString().c_str());
} else { } else {
esyslog("tvguide: error deleting search timer \"%s\"", searchTimer->GetSearchString().c_str()); esyslog("tvguide: error deleting search timer \"%s\"", searchTimer->SearchString().c_str());
} }
} }
} }
@ -758,8 +696,8 @@ const cEvent **cRecManager::LoadReruns(const cEvent *event, int &numResults) {
if (epgSearchAvailable && !isempty(event->Title())) { if (epgSearchAvailable && !isempty(event->Title())) {
Epgsearch_searchresults_v1_0 data; Epgsearch_searchresults_v1_0 data;
std::string strQuery = event->Title(); std::string strQuery = event->Title();
if (config.useSubtitleRerun > 0) { if (tvguideConfig.useSubtitleRerun > 0) {
if (config.useSubtitleRerun == 2 || !isempty(event->ShortText())) if (tvguideConfig.useSubtitleRerun == 2 || !isempty(event->ShortText()))
strQuery += "~"; strQuery += "~";
if (!isempty(event->ShortText())) if (!isempty(event->ShortText()))
strQuery += event->ShortText(); strQuery += event->ShortText();
@ -821,23 +759,31 @@ const cEvent **cRecManager::WhatsOnNow(bool nowOrNext, int &numResults) {
std::vector<const cEvent*> tmpResults; std::vector<const cEvent*> tmpResults;
#if VDRVERSNUM >= 20301 #if VDRVERSNUM >= 20301
LOCK_CHANNELS_READ; LOCK_CHANNELS_READ;
const cChannels* channels = Channels;
LOCK_SCHEDULES_READ; LOCK_SCHEDULES_READ;
const cSchedules* schedules = Schedules; const cSchedules* schedules = Schedules;
#else #else
cChannels* channels = &Channels;
cSchedulesLock schedulesLock; cSchedulesLock schedulesLock;
const cSchedules *schedules = cSchedules::Schedules(schedulesLock); const cSchedules *schedules = cSchedules::Schedules(schedulesLock);
#endif #endif
const cChannel *startChannel = NULL, *stopChannel = NULL; const cChannel *startChannel = NULL, *stopChannel = NULL;
if (config.favLimitChannels) { if (tvguideConfig.favLimitChannels) {
startChannel = channels->GetByNumber(config.favStartChannel); #if VDRVERSNUM >= 20301
stopChannel = channels->GetByNumber(config.favStopChannel); startChannel = Channels->GetByNumber(tvguideConfig.favStartChannel);
stopChannel = Channels->GetByNumber(tvguideConfig.favStopChannel);
} }
if (!startChannel) if (!startChannel)
startChannel = channels->First(); startChannel = Channels->First();
for (const cChannel *channel = startChannel; channel; channel = channels->Next(channel)) { for (const cChannel *channel = startChannel; channel; channel = Channels->Next(channel)) {
#else
startChannel = Channels.GetByNumber(tvguideConfig.favStartChannel);
stopChannel = Channels.GetByNumber(tvguideConfig.favStopChannel);
}
if (!startChannel)
startChannel = Channels.First();
for (const cChannel *channel = startChannel; channel; channel = Channels.Next(channel)) {
#endif
if (channel->GroupSep()) continue; if (channel->GroupSep()) continue;
const cSchedule *Schedule = schedules->GetSchedule(channel); const cSchedule *Schedule = schedules->GetSchedule(channel);
if (!Schedule) continue; if (!Schedule) continue;
@ -866,13 +812,13 @@ const cEvent **cRecManager::UserDefinedTime(int userTime, int &numResults) {
std::vector<const cEvent*> tmpResults; std::vector<const cEvent*> tmpResults;
int favTime = 0; int favTime = 0;
if (userTime == 1) { if (userTime == 1) {
favTime = config.favTime1; favTime = tvguideConfig.favTime1;
} else if (userTime == 2) { } else if (userTime == 2) {
favTime = config.favTime2; favTime = tvguideConfig.favTime2;
} else if (userTime == 3) { } else if (userTime == 3) {
favTime = config.favTime3; favTime = tvguideConfig.favTime3;
} else if (userTime == 4) { } else if (userTime == 4) {
favTime = config.favTime4; favTime = tvguideConfig.favTime4;
} }
time_t now = time(0); time_t now = time(0);
@ -889,23 +835,32 @@ const cEvent **cRecManager::UserDefinedTime(int userTime, int &numResults) {
#if VDRVERSNUM >= 20301 #if VDRVERSNUM >= 20301
LOCK_CHANNELS_READ; LOCK_CHANNELS_READ;
const cChannels* channels = Channels;
LOCK_SCHEDULES_READ; LOCK_SCHEDULES_READ;
// const cChannels* channels = Channels;
const cSchedules* schedules = Schedules; const cSchedules* schedules = Schedules;
#else #else
cChannels* channels = &Channels;
cSchedulesLock schedulesLock; cSchedulesLock schedulesLock;
const cSchedules *schedules = cSchedules::Schedules(schedulesLock); const cSchedules *schedules = cSchedules::Schedules(schedulesLock);
#endif #endif
const cChannel *startChannel = NULL, *stopChannel = NULL; const cChannel *startChannel = NULL, *stopChannel = NULL;
if (config.favLimitChannels) { if (tvguideConfig.favLimitChannels) {
startChannel = channels->GetByNumber(config.favStartChannel); #if VDRVERSNUM >= 20301
stopChannel = channels->GetByNumber(config.favStopChannel); startChannel = Channels->GetByNumber(tvguideConfig.favStartChannel);
stopChannel = Channels->GetByNumber(tvguideConfig.favStopChannel);
} }
if (!startChannel) if (!startChannel)
startChannel = channels->First(); startChannel = Channels->First();
for (const cChannel *channel = startChannel; channel; channel = channels->Next(channel)) { for (const cChannel *channel = startChannel; channel; channel = Channels->Next(channel)) {
#else
startChannel = Channels.GetByNumber(tvguideConfig.favStartChannel);
stopChannel = Channels.GetByNumber(tvguideConfig.favStopChannel);
}
if (!startChannel)
startChannel = Channels.First();
for (const cChannel *channel = startChannel; channel; channel = Channels.Next(channel)) {
#endif
if (channel->GroupSep()) continue; if (channel->GroupSep()) continue;
const cSchedule *Schedule = schedules->GetSchedule(channel); const cSchedule *Schedule = schedules->GetSchedule(channel);
if (!Schedule) continue; if (!Schedule) continue;

View File

@ -33,12 +33,12 @@ public:
cTimer *createLocalTimer(const cEvent *event, std::string path); cTimer *createLocalTimer(const cEvent *event, std::string path);
cTimer *createRemoteTimer(const cEvent *event, std::string path); cTimer *createRemoteTimer(const cEvent *event, std::string path);
void SetTimerPath(cTimer *timer, const cEvent *event, std::string path); void SetTimerPath(cTimer *timer, const cEvent *event, std::string path);
void OnOffTimer(const cEvent *event);
void DeleteTimer(const cTimer *timer); void DeleteTimer(const cTimer *timer);
void DeleteTimer(int timerID);
void DeleteTimer(const cEvent *event); void DeleteTimer(const cEvent *event);
void DeleteLocalTimer(const cEvent *event); void DeleteLocalTimer(const cEvent *event);
void DeleteRemoteTimer(const cEvent *event); void DeleteRemoteTimer(const cEvent *event);
void SaveTimer(const cTimer *timer, cTimer *newTimerSettings = NULL); void SaveTimer(const cTimer *timer, cTimer newTimerSettings);
bool IsRecorded(const cEvent *event); bool IsRecorded(const cEvent *event);
cTVGuideTimerConflicts *CheckTimerConflict(void); cTVGuideTimerConflicts *CheckTimerConflict(void);
void CreateSeriesTimer(cTimer *seriesTimer); void CreateSeriesTimer(cTimer *seriesTimer);
@ -46,9 +46,7 @@ public:
const cEvent **PerformSearch(Epgsearch_searchresults_v1_0 data, int &numResults); const cEvent **PerformSearch(Epgsearch_searchresults_v1_0 data, int &numResults);
void ReadEPGSearchTemplates(std::vector<TVGuideEPGSearchTemplate> *epgTemplates); void ReadEPGSearchTemplates(std::vector<TVGuideEPGSearchTemplate> *epgTemplates);
void GetSearchTimers(std::vector<cTVGuideSearchTimer> *timers); void GetSearchTimers(std::vector<cTVGuideSearchTimer> *timers);
void GetSearchExtCats(std::vector<std::string> *searchExtCats);
void GetChannelGroups(std::vector<std::string> *channelGroups); void GetChannelGroups(std::vector<std::string> *channelGroups);
void GetBlacklists(std::vector<std::string> *blacklists);
int CreateSearchTimer(std::string epgSearchString); int CreateSearchTimer(std::string epgSearchString);
bool SaveSearchTimer(cTVGuideSearchTimer *searchTimer); bool SaveSearchTimer(cTVGuideSearchTimer *searchTimer);
void DeleteSearchTimer(cTVGuideSearchTimer *searchTimer, bool delTimers); void DeleteSearchTimer(cTVGuideSearchTimer *searchTimer, bool delTimers);

138
recmenu.c
View File

@ -5,7 +5,7 @@
cRecMenu::cRecMenu(void) { cRecMenu::cRecMenu(void) {
border = geoManager.borderRecMenus; border = geoManager.borderRecMenus;
height = 2 * border; height = 2*border;
headerHeight = 0; headerHeight = 0;
footerHeight = 0; footerHeight = 0;
currentHeight = 0; currentHeight = 0;
@ -28,7 +28,7 @@ cRecMenu::~cRecMenu(void) {
if (footer) if (footer)
delete footer; delete footer;
if (pixmapScrollBar) if (pixmapScrollBar)
osdManager.DestroyPixmap(pixmapScrollBar); osdManager.releasePixmap(pixmapScrollBar);
if (imgScrollBar) if (imgScrollBar)
delete imgScrollBar; delete imgScrollBar;
} }
@ -54,53 +54,49 @@ int cRecMenu::CalculateOptimalWidth(void) {
} }
bool cRecMenu::CalculateHeight(bool reDraw) { bool cRecMenu::CalculateHeight(bool reDraw) {
int newHeight = 2 * border; int newHeight = 2*border;
bool returnvalue = false; if (header)
if (header) {
newHeight += headerHeight; newHeight += headerHeight;
}
for (std::list<cRecMenuItem*>::iterator item = menuItems.begin(); item != menuItems.end(); item++) { for (std::list<cRecMenuItem*>::iterator item = menuItems.begin(); item != menuItems.end(); item++) {
newHeight += (*item)->GetHeight(); newHeight += (*item)->GetHeight();
} }
if (footer) { if (footer)
newHeight += footerHeight; newHeight += footerHeight;
}
y = (geoManager.osdHeight - newHeight) / 2; y = (geoManager.osdHeight - newHeight) / 2;
if (newHeight != height) { if (newHeight != height) {
height = newHeight; height = newHeight;
returnvalue = true; if (scrollable && !reDraw) {
width += scrollbarWidth + border;
}
return true;
} }
if (scrollable && !reDraw) { return false;
width += scrollbarWidth + border;
returnvalue = true;
}
return returnvalue;
} }
void cRecMenu::CreatePixmap(void) { void cRecMenu::CreatePixmap(void) {
if (pixmap) if (pixmap)
osdManager.DestroyPixmap(pixmap); osdManager.releasePixmap(pixmap);
pixmap = osdManager.CreatePixmap(3, cRect(x, y, width, height)); pixmap = osdManager.requestPixmap(3, cRect(x, y, width, height));
if (scrollable) { if (scrollable) {
int scrollBarX = x + width - scrollbarWidth - border; int scrollBarX = x + width - scrollbarWidth - border;
int scrollBarY = y + border + headerHeight; int scrollBarY = y + border + headerHeight;
int scrollBarHeight = height - headerHeight - footerHeight - 2 * border; int scrollBarHeight = height - headerHeight - footerHeight - 2 * border;
if (pixmapScrollBar) if (pixmapScrollBar)
osdManager.DestroyPixmap(pixmapScrollBar); osdManager.releasePixmap(pixmapScrollBar);
pixmapScrollBar = osdManager.CreatePixmap(4, cRect(scrollBarX, scrollBarY, scrollbarWidth, scrollBarHeight)); pixmapScrollBar = osdManager.requestPixmap(4, cRect(scrollBarX, scrollBarY, scrollbarWidth, scrollBarHeight));
} else } else
pixmapScrollBar = NULL; pixmapScrollBar = NULL;
} }
void cRecMenu::AddHeader(cRecMenuItem *header) { void cRecMenu::SetHeader(cRecMenuItem *header) {
this->header = header; this->header = header;
headerHeight = header->GetHeight(); headerHeight = header->GetHeight();
height += headerHeight; height += headerHeight;
} }
void cRecMenu::AddFooter(cRecMenuItem *footer) { void cRecMenu::SetFooter(cRecMenuItem *footer) {
this->footer = footer; this->footer = footer;
footerHeight = footer->GetHeight(); footerHeight = footer->GetHeight();
height += footerHeight; height += footerHeight;
@ -121,11 +117,12 @@ void cRecMenu::InitMenu(bool complete) {
numItems = 0; numItems = 0;
if (scrollable) { if (scrollable) {
width -= scrollbarWidth + border; width -= scrollbarWidth + border;
osdManager.DestroyPixmap(pixmapScrollBar); osdManager.releasePixmap(pixmapScrollBar);
pixmapScrollBar = NULL; pixmapScrollBar = NULL;
DELETENULL(imgScrollBar); delete imgScrollBar;
imgScrollBar = NULL;
} }
osdManager.DestroyPixmap(pixmap); osdManager.releasePixmap(pixmap);
pixmap = NULL; pixmap = NULL;
for (std::list<cRecMenuItem*>::iterator it = menuItems.begin(); it != menuItems.end(); it++) { for (std::list<cRecMenuItem*>::iterator it = menuItems.begin(); it != menuItems.end(); it++) {
if (deleteMenuItems) if (deleteMenuItems)
@ -144,6 +141,7 @@ void cRecMenu::InitMenu(bool complete) {
} }
void cRecMenu::AddMenuItem(cRecMenuItem *item, bool inFront) { void cRecMenu::AddMenuItem(cRecMenuItem *item, bool inFront) {
item->Show(); item->Show();
if (!inFront) if (!inFront)
@ -155,7 +153,7 @@ void cRecMenu::AddMenuItem(cRecMenuItem *item, bool inFront) {
bool cRecMenu::AddMenuItemInitial(cRecMenuItem *item, bool inFront) { bool cRecMenu::AddMenuItemInitial(cRecMenuItem *item, bool inFront) {
currentHeight += item->GetHeight(); currentHeight += item->GetHeight();
int totalHeight = headerHeight + footerHeight + currentHeight + 2*border; int totalHeight = headerHeight + footerHeight + currentHeight + 2*border;
if (totalHeight >= geoManager.osdHeight - 80) { if (totalHeight >= geoManager.osdHeight - 10) {
scrollable = true; scrollable = true;
currentHeight -= item->GetHeight(); currentHeight -= item->GetHeight();
if (deleteMenuItems) { if (deleteMenuItems) {
@ -178,14 +176,14 @@ void cRecMenu::Activate(cRecMenuItem *itemOld, cRecMenuItem *item) {
itemOld->setInactive(); itemOld->setInactive();
itemOld->setBackground(); itemOld->setBackground();
itemOld->Draw(); itemOld->Draw();
item->SetActive(); item->setActive();
item->setBackground(); item->setBackground();
item->Draw(); item->Draw();
} }
bool cRecMenu::ActivatePrev(void) { bool cRecMenu::ActivatePrev(void) {
cRecMenuItem *activeItem = GetActiveMenuItem(); cRecMenuItem *activeItem = GetActiveMenuItem();
if (!scrollable && footer && footer->IsActive()) { if (!scrollable && footer && footer->isActive()) {
if (menuItems.size() > 0) { if (menuItems.size() > 0) {
cRecMenuItem *itemLast = menuItems.back(); cRecMenuItem *itemLast = menuItems.back();
Activate(footer, itemLast); Activate(footer, itemLast);
@ -216,7 +214,7 @@ bool cRecMenu::ActivatePrev(void) {
} }
bool cRecMenu::ScrollUp(void) { bool cRecMenu::ScrollUp(void) {
if (footer && footer->IsActive()) { if (footer && footer->isActive()) {
if (menuItems.size() > 0) if (menuItems.size() > 0)
Activate(footer, menuItems.back()); Activate(footer, menuItems.back());
} else { } else {
@ -274,7 +272,7 @@ bool cRecMenu::ActivateNext(void) {
if (next) { if (next) {
Activate(activeItem , next); Activate(activeItem , next);
return true; return true;
} else if (!scrollable && footer && footer->isSelectable() && !footer->IsActive()) { } else if (!scrollable && footer && footer->isSelectable() && !footer->isActive()) {
Activate(activeItem , footer); Activate(activeItem , footer);
return true; return true;
} }
@ -312,7 +310,7 @@ bool cRecMenu::ScrollDown(void) {
ActivateNext(); ActivateNext();
} else { } else {
//last item reached, activate footer if not already active //last item reached, activate footer if not already active
if ((footer) && !(footer->IsActive())) { if ((footer) && !(footer->isActive())) {
cRecMenuItem *activeItem = GetActiveMenuItem(); cRecMenuItem *activeItem = GetActiveMenuItem();
Activate(activeItem , footer); Activate(activeItem , footer);
} else { } else {
@ -334,7 +332,7 @@ void cRecMenu::PageUp(void) {
Activate(footer, menuItems.front()); Activate(footer, menuItems.front());
return; return;
} }
int newActive = GetNumActive() - numItems; int newActive = GetActive() - numItems;
if (newActive < 0) if (newActive < 0)
newActive = 0; newActive = 0;
activeItem->setInactive(); activeItem->setInactive();
@ -347,7 +345,7 @@ void cRecMenu::PageUp(void) {
bool spaceLeft = true; bool spaceLeft = true;
while (newItem = GetMenuItem(startIndex-1)) { while (newItem = GetMenuItem(startIndex-1)) {
if (startIndex-1 == newActive) if (startIndex-1 == newActive)
newItem->SetActive(); newItem->setActive();
spaceLeft = AddMenuItemInitial(newItem, true); spaceLeft = AddMenuItemInitial(newItem, true);
if (!spaceLeft) if (!spaceLeft)
break; break;
@ -359,8 +357,8 @@ void cRecMenu::PageUp(void) {
break; break;
} }
} }
if (GetNumActive() == numItems) if (GetActive() == numItems)
menuItems.front()->SetActive(); menuItems.front()->setActive();
if (CalculateHeight(true)) if (CalculateHeight(true))
CreatePixmap(); CreatePixmap();
Arrange(deleteMenuItems); Arrange(deleteMenuItems);
@ -378,7 +376,7 @@ void cRecMenu::PageDown(void) {
JumpEnd(); JumpEnd();
return; return;
} }
int newActive = GetNumActive() + numItems; int newActive = GetActive() + numItems;
activeItem->setInactive(); activeItem->setInactive();
activeItem->setBackground(); activeItem->setBackground();
ClearMenuItems(); ClearMenuItems();
@ -389,7 +387,7 @@ void cRecMenu::PageDown(void) {
bool spaceLeft = true; bool spaceLeft = true;
while (newItem = GetMenuItem(stopIndex)) { while (newItem = GetMenuItem(stopIndex)) {
if (stopIndex == newActive) if (stopIndex == newActive)
newItem->SetActive(); newItem->setActive();
spaceLeft = AddMenuItemInitial(newItem); spaceLeft = AddMenuItemInitial(newItem);
if (!spaceLeft) if (!spaceLeft)
break; break;
@ -401,8 +399,8 @@ void cRecMenu::PageDown(void) {
break; break;
} }
} }
if (GetNumActive() == GetTotalNumMenuItems()) if (GetActive() == GetTotalNumMenuItems())
menuItems.back()->SetActive(); menuItems.back()->setActive();
if (CalculateHeight(true)) if (CalculateHeight(true))
CreatePixmap(); CreatePixmap();
Arrange(deleteMenuItems); Arrange(deleteMenuItems);
@ -436,16 +434,14 @@ void cRecMenu::JumpBegin(void) {
if (currentItem >= numItems) if (currentItem >= numItems)
break; break;
} }
if (CalculateHeight(true)) Arrange(true);
CreatePixmap();
Arrange(false);
startIndex = 0; startIndex = 0;
stopIndex = currentItem; stopIndex = numItems-1;
cRecMenuItem *first = menuItems.front(); cRecMenuItem *first = menuItems.front();
first->SetActive(); first->setActive();
first->setBackground(); first->setBackground();
first->Draw(); first->Draw();
Display(false); Display(true);
} }
} }
@ -474,7 +470,7 @@ void cRecMenu::JumpEnd(void) {
activeItem->setBackground(); activeItem->setBackground();
ClearMenuItems(); ClearMenuItems();
int totalNumItems = GetTotalNumMenuItems(); int totalNumItems = GetTotalNumMenuItems();
int currentItem = totalNumItems - 1; int currentItem = totalNumItems-1;
int itemsAdded = 0; int itemsAdded = 0;
cRecMenuItem *newItem = NULL; cRecMenuItem *newItem = NULL;
while (newItem = GetMenuItem(currentItem)) { while (newItem = GetMenuItem(currentItem)) {
@ -484,22 +480,20 @@ void cRecMenu::JumpEnd(void) {
if (itemsAdded >= numItems) if (itemsAdded >= numItems)
break; break;
} }
if (CalculateHeight(true)) Arrange(true);
CreatePixmap();
Arrange(false);
stopIndex = totalNumItems; stopIndex = totalNumItems;
startIndex = stopIndex - numItems; startIndex = stopIndex - numItems;
if (footer) { if (footer) {
footer->SetActive(); footer->setActive();
footer->setBackground(); footer->setBackground();
footer->Draw(); footer->Draw();
} else { } else {
cRecMenuItem *last = menuItems.back(); cRecMenuItem *last = menuItems.back();
last->SetActive(); last->setActive();
last->setBackground(); last->setBackground();
last->Draw(); last->Draw();
} }
Display(false); Display(true);
} }
} }
@ -531,7 +525,7 @@ void cRecMenu::Arrange(bool scroll) {
} }
void cRecMenu::Display(bool scroll) { void cRecMenu::Display(bool scroll) {
if (config.style == eStyleGraphical) { if (tvguideConfig.style == eStyleGraphical) {
drawBackgroundGraphical(bgRecMenuBack); drawBackgroundGraphical(bgRecMenuBack);
} else { } else {
pixmap->Fill(theme.Color(clrBackground)); pixmap->Fill(theme.Color(clrBackground));
@ -588,17 +582,13 @@ void cRecMenu::UpdateActiveMenuItem(void) {
void cRecMenu::DrawScrollBar(void) { void cRecMenu::DrawScrollBar(void) {
if (!pixmapScrollBar)
return;
pixmapScrollBar->Fill(theme.Color(clrBorder)); pixmapScrollBar->Fill(theme.Color(clrBorder));
pixmapScrollBar->DrawRectangle(cRect(2, 2, pixmapScrollBar->ViewPort().Width() - 4, pixmapScrollBar->ViewPort().Height() - 4), theme.Color(clrBackground)); pixmapScrollBar->DrawRectangle(cRect(2,2,pixmapScrollBar->ViewPort().Width()-4, pixmapScrollBar->ViewPort().Height() - 4), theme.Color(clrBackground));
int totalNumItems = GetTotalNumMenuItems(); int totalNumItems = GetTotalNumMenuItems();
if (!totalNumItems) if (imgScrollBar == NULL) {
return;
if (!imgScrollBar) {
int scrollBarImgHeight = (pixmapScrollBar->ViewPort().Height() - 8) * numItems / totalNumItems; int scrollBarImgHeight = (pixmapScrollBar->ViewPort().Height() - 8) * numItems / totalNumItems;
imgScrollBar = createScrollbar(pixmapScrollBar->ViewPort().Width() - 8, scrollBarImgHeight, theme.Color(clrHighlight), theme.Color(clrHighlightBlending)); imgScrollBar = createScrollbar(pixmapScrollBar->ViewPort().Width()-8, scrollBarImgHeight, theme.Color(clrHighlight), theme.Color(clrHighlightBlending));
} }
int offset = (pixmapScrollBar->ViewPort().Height() - 8) * startIndex / totalNumItems; int offset = (pixmapScrollBar->ViewPort().Height() - 8) * startIndex / totalNumItems;
pixmapScrollBar->DrawImage(cPoint(4, 2 + offset), *imgScrollBar); pixmapScrollBar->DrawImage(cPoint(4, 2 + offset), *imgScrollBar);
@ -606,10 +596,10 @@ void cRecMenu::DrawScrollBar(void) {
cRecMenuItem *cRecMenu::GetActiveMenuItem(void) { cRecMenuItem *cRecMenu::GetActiveMenuItem(void) {
for (std::list<cRecMenuItem*>::iterator item = menuItems.begin(); item != menuItems.end(); item++) { for (std::list<cRecMenuItem*>::iterator item = menuItems.begin(); item != menuItems.end(); item++) {
if ((*item)->IsActive()) if ((*item)->isActive())
return *item; return *item;
} }
if (footer && footer->IsActive()) if (footer && footer->isActive())
return footer; return footer;
return NULL; return NULL;
} }
@ -624,10 +614,10 @@ cRecMenuItem *cRecMenu::GetMenuItemAt(int num) {
return NULL; return NULL;
} }
int cRecMenu::GetNumActive(void) { int cRecMenu::GetActive(void) {
int numActive = startIndex; int numActive = startIndex;
for (std::list<cRecMenuItem*>::iterator item = menuItems.begin(); item != menuItems.end(); item++) { for (std::list<cRecMenuItem*>::iterator item = menuItems.begin(); item != menuItems.end(); item++) {
if ((*item)->IsActive()) { if ((*item)->isActive()) {
break; break;
} }
numActive++; numActive++;
@ -677,25 +667,29 @@ eRecMenuState cRecMenu::ProcessKey(eKeys Key) {
cImage *cRecMenu::createScrollbar(int width, int height, tColor clrBgr, tColor clrBlend) { cImage *cRecMenu::createScrollbar(int width, int height, tColor clrBgr, tColor clrBlend) {
cImage *image = new cImage(cSize(width, height)); cImage *image = new cImage(cSize(width, height));
image->Fill(clrBgr); image->Fill(clrBgr);
if (height >= 32 && config.style != eStyleFlat) { if (tvguideConfig.style != eStyleFlat) {
int numSteps = 64; int numSteps = 64;
int alphaStep = 0x03; int alphaStep = 0x03;
if (height < 100) { if (height < 30)
return image;
else if (height < 100) {
numSteps = 32; numSteps = 32;
alphaStep = 0x06; alphaStep = 0x06;
} }
int stepY = std::max(1, (int)(0.5 * height / numSteps)); int stepY = 0.5*height / numSteps;
if (stepY == 0)
stepY = 1;
int alpha = 0x40; int alpha = 0x40;
tColor clr; tColor clr;
for (int i = 0; i < numSteps; i++) { for (int i = 0; i<numSteps; i++) {
clr = AlphaBlend(clrBgr, clrBlend, alpha); clr = AlphaBlend(clrBgr, clrBlend, alpha);
for (int y = i * stepY; y < (i + 1) * stepY; y++) { for (int y = i*stepY; y < (i+1)*stepY; y++) {
for (int x = 0; x < width; x++) { for (int x=0; x<width; x++) {
image->SetPixel(cPoint(x, y), clr); image->SetPixel(cPoint(x,y), clr);
} }
} }
alpha += alphaStep; alpha += alphaStep;
} }
} }
return image; return image;
} }

View File

@ -37,8 +37,8 @@ protected:
int CalculateOptimalWidth(void); int CalculateOptimalWidth(void);
bool CalculateHeight(bool reDraw = false); bool CalculateHeight(bool reDraw = false);
void CreatePixmap(void); void CreatePixmap(void);
void AddHeader(cRecMenuItem *header); void SetHeader(cRecMenuItem *header);
void AddFooter(cRecMenuItem *footer); void SetFooter(cRecMenuItem *footer);
void ClearMenuItems(bool destructor = false); void ClearMenuItems(bool destructor = false);
void InitMenu(bool complete); void InitMenu(bool complete);
bool AddMenuItemInitial(cRecMenuItem *item, bool inFront = false); bool AddMenuItemInitial(cRecMenuItem *item, bool inFront = false);
@ -53,7 +53,7 @@ protected:
virtual int GetTotalNumMenuItems(void) { return 0; }; virtual int GetTotalNumMenuItems(void) { return 0; };
virtual void CreateMenuItems(void) {}; virtual void CreateMenuItems(void) {};
int GetStartIndex(void) { return startIndex; }; int GetStartIndex(void) { return startIndex; };
int GetNumActive(void); int GetActive(void);
public: public:
cRecMenu(void); cRecMenu(void);
virtual ~cRecMenu(void); virtual ~cRecMenu(void);
@ -63,4 +63,4 @@ public:
void UpdateActiveMenuItem(void); void UpdateActiveMenuItem(void);
virtual eRecMenuState ProcessKey(eKeys Key); virtual eRecMenuState ProcessKey(eKeys Key);
}; };
#endif //__TVGUIDE_RECMENU_H #endif //__TVGUIDE_RECMENU_H

File diff suppressed because it is too large Load Diff

View File

@ -25,7 +25,6 @@ enum eRecMenuState {
rmsSearchRerunsTimerConflictMenu, rmsSearchRerunsTimerConflictMenu,
rmsSaveTimerConflictMenu, rmsSaveTimerConflictMenu,
rmsTimerConflictShowInfo, rmsTimerConflictShowInfo,
rmsOnOffTimer,
rmsDeleteTimer, rmsDeleteTimer,
rmsDeleteTimerConfirmation, rmsDeleteTimerConfirmation,
rmsEditTimer, rmsEditTimer,
@ -47,6 +46,7 @@ enum eRecMenuState {
rmsSearchTimerOptions, rmsSearchTimerOptions,
rmsSearchTimers, rmsSearchTimers,
rmsSearchTimerEdit, rmsSearchTimerEdit,
rmsSearchTimerEditAdvanced,
rmsSearchTimerTest, rmsSearchTimerTest,
rmsSearchTimerSave, rmsSearchTimerSave,
rmsSearchTimerCreateWithTemplate, rmsSearchTimerCreateWithTemplate,
@ -110,10 +110,10 @@ public:
virtual int GetHeight(void) { return height; }; virtual int GetHeight(void) { return height; };
virtual int GetWidth(void) { return 0; }; virtual int GetWidth(void) { return 0; };
virtual void CalculateHeight(int textWidth) {}; virtual void CalculateHeight(int textWidth) {};
virtual void SetActive(void) { this->active = true; } virtual void setActive(void) { this->active = true; }
virtual void setInactive(void) { this->active = false; } virtual void setInactive(void) { this->active = false; }
bool isSelectable(void) { return selectable; } bool isSelectable(void) { return selectable; }
bool IsActive(void) { return active; } bool isActive(void) { return active; }
virtual void setBackground(void); virtual void setBackground(void);
virtual void Draw(void) {}; virtual void Draw(void) {};
virtual void Hide(void) { if (pixmap) pixmap->SetLayer(-1);}; virtual void Hide(void) { if (pixmap) pixmap->SetLayer(-1);};
@ -122,7 +122,8 @@ public:
virtual time_t GetTimeValue(void) { return 0; }; virtual time_t GetTimeValue(void) { return 0; };
virtual bool GetBoolValue(void) { return false; }; virtual bool GetBoolValue(void) { return false; };
virtual cString GetStringValue(void) { return cString(""); }; virtual cString GetStringValue(void) { return cString(""); };
virtual const cEvent *GetEvent(void) { return NULL; }; virtual const cEvent *GetEventValue(void) { return NULL; };
virtual const cTimer *GetTimerValue(void) { return NULL; };
virtual eRecMenuState ProcessKey(eKeys Key) { return rmsNotConsumed; }; virtual eRecMenuState ProcessKey(eKeys Key) { return rmsNotConsumed; };
}; };
@ -174,18 +175,12 @@ public:
// --- cRecMenuItemInfo ------------------------------------------------------- // --- cRecMenuItemInfo -------------------------------------------------------
class cRecMenuItemInfo : public cRecMenuItem { class cRecMenuItemInfo : public cRecMenuItem {
private: private:
int numLines;
cString text; cString text;
std::string line1;
std::string line2;
std::string line3;
std::string line4;
cTextWrapper wrapper; cTextWrapper wrapper;
int border; int border;
const cFont *fontInfo; const cFont *fontInfo;
public: public:
cRecMenuItemInfo(const char *text, bool largeFont = false); cRecMenuItemInfo(const char *text, bool largeFont = false);
cRecMenuItemInfo(std::string line1, int numLines = 1, std::string line2 = "", std::string line3 = "", std::string line4 = "", int width = 80, bool largeFont = false);
virtual ~cRecMenuItemInfo(void); virtual ~cRecMenuItemInfo(void);
void setBackground(void); void setBackground(void);
void CalculateHeight(int textWidth); void CalculateHeight(int textWidth);
@ -205,6 +200,7 @@ private:
void DrawValue(void); void DrawValue(void);
public: public:
cRecMenuItemInt(cString text, cRecMenuItemInt(cString text,
int initialVal,
int minVal, int minVal,
int maxVal, int maxVal,
bool active = false, bool active = false,
@ -231,15 +227,11 @@ private:
void DrawValue(void); void DrawValue(void);
public: public:
cRecMenuItemBool(cString text, cRecMenuItemBool(cString text,
bool initialVal,
bool refresh = false,
bool active = false, bool active = false,
bool *callback = NULL, bool *callback = NULL,
eRecMenuState action = rmsNotConsumed, eRecMenuState action = rmsNotConsumed);
bool refresh = false);
cRecMenuItemBool(cString text,
bool active = false,
int *callback = NULL,
eRecMenuState action = rmsNotConsumed,
bool refresh = false);
virtual ~cRecMenuItemBool(void); virtual ~cRecMenuItemBool(void);
void SetPixmaps(void); void SetPixmaps(void);
void Hide(void); void Hide(void);
@ -263,6 +255,7 @@ private:
public: public:
cRecMenuItemSelect(cString text, cRecMenuItemSelect(cString text,
std::vector<std::string> Strings, std::vector<std::string> Strings,
int initialVal,
bool active = false, bool active = false,
int *callback = NULL, int *callback = NULL,
eRecMenuState action = rmsNotConsumed, eRecMenuState action = rmsNotConsumed,
@ -349,6 +342,7 @@ private:
void DrawValue(char *newValue); void DrawValue(char *newValue);
public: public:
cRecMenuItemText(cString title, cRecMenuItemText(cString title,
char *initialVal,
int length, int length,
bool active = false, bool active = false,
char *callback = NULL); char *callback = NULL);
@ -377,6 +371,7 @@ private:
void DrawValue(void); void DrawValue(void);
public: public:
cRecMenuItemTime(cString text, cRecMenuItemTime(cString text,
int initialVal,
bool active = false, bool active = false,
int *callback = NULL, int *callback = NULL,
eRecMenuState action = rmsNotConsumed); eRecMenuState action = rmsNotConsumed);
@ -399,6 +394,7 @@ private:
void DrawValue(void); void DrawValue(void);
public: public:
cRecMenuItemDay(cString text, cRecMenuItemDay(cString text,
time_t initialVal,
bool active = false, bool active = false,
time_t *callback = NULL, time_t *callback = NULL,
eRecMenuState action = rmsNotConsumed); eRecMenuState action = rmsNotConsumed);
@ -486,7 +482,7 @@ public:
void SetPixmaps(void); void SetPixmaps(void);
void Hide(void); void Hide(void);
void Show(void); void Show(void);
const cEvent *GetEvent(void) { return event; }; const cEvent *GetEventValue(void) { return event; };
eRecMenuState ProcessKey(eKeys Key); eRecMenuState ProcessKey(eKeys Key);
void Draw(void); void Draw(void);
}; };
@ -495,13 +491,6 @@ public:
class cRecMenuItemChannelChooser : public cRecMenuItem { class cRecMenuItemChannelChooser : public cRecMenuItem {
private: private:
cString text; cString text;
#if VDRVERSNUM >= 20301
const cChannels *channels;
const cChannel *chanNew;
#else
cChannels *channels;
cChannel *chanNew;
#endif
const cChannel *channel; const cChannel *channel;
int channelNumber; int channelNumber;
int *callback; int *callback;
@ -511,6 +500,7 @@ private:
void DrawValue(void); void DrawValue(void);
public: public:
cRecMenuItemChannelChooser (cString text, cRecMenuItemChannelChooser (cString text,
const cChannel *initialChannel,
bool active = false, bool active = false,
int *callback = NULL, int *callback = NULL,
eRecMenuState action = rmsNotConsumed); eRecMenuState action = rmsNotConsumed);
@ -544,6 +534,7 @@ private:
bool WeekDaySet(unsigned day); bool WeekDaySet(unsigned day);
public: public:
cRecMenuItemDayChooser (cString text, cRecMenuItemDayChooser (cString text,
int weekdays,
bool active = false, bool active = false,
int *callback = NULL); int *callback = NULL);
virtual ~cRecMenuItemDayChooser(void); virtual ~cRecMenuItemDayChooser(void);
@ -579,21 +570,19 @@ private:
cPixmap *pixmapTimeline; cPixmap *pixmapTimeline;
cPixmap *pixmapTimerInfo; cPixmap *pixmapTimerInfo;
cPixmap *pixmapTimerConflicts; cPixmap *pixmapTimerConflicts;
float width5Mins; int width5Mins;
int x0; int x0;
int numTimersToday;
bool timelineDrawn; bool timelineDrawn;
void DrawTimeline(void); void DrawTimeline(void);
void DrawTimerConflicts(void); void DrawTimerConflicts(void);
void DrawCurrentTimer(void); void DrawCurrentTimer(void);
public: public:
cRecMenuItemTimelineHeader(time_t day, int numTimersToday, std::vector<cTVGuideTimerConflict*> conflictsToday); cRecMenuItemTimelineHeader(time_t day, std::vector<cTVGuideTimerConflict*> conflictsToday);
virtual ~cRecMenuItemTimelineHeader(void); virtual ~cRecMenuItemTimelineHeader(void);
void SetDay(time_t day) { this->day = day; }; void SetDay(time_t day) { this->day = day; };
void SetPixmaps(void); void SetPixmaps(void);
void SetCurrentTimer(const cTimer *timer) { this->timer = timer; }; void SetCurrentTimer(const cTimer *timer) { this->timer = timer; };
void UnsetCurrentTimer(void) { timer = NULL; }; void UnsetCurrentTimer(void) { timer = NULL; };
void SetNumTimersToday(int numTimersToday) { this->numTimersToday = numTimersToday; };
void RefreshTimerDisplay(void); void RefreshTimerDisplay(void);
void Hide(void); void Hide(void);
void Show(void); void Show(void);
@ -609,7 +598,7 @@ private:
cPixmap *pixmapTimerConflicts; cPixmap *pixmapTimerConflicts;
cRecMenuItemTimelineHeader *header; cRecMenuItemTimelineHeader *header;
int x0; int x0;
float width5Mins; int width5Mins;
time_t start; time_t start;
time_t stop; time_t stop;
void DrawBackground(void); void DrawBackground(void);
@ -620,13 +609,13 @@ private:
public: public:
cRecMenuItemTimelineTimer(const cTimer *timer, time_t start, time_t stop, std::vector<cTVGuideTimerConflict*> conflictsToday, cRecMenuItemTimelineHeader *header, bool active); cRecMenuItemTimelineTimer(const cTimer *timer, time_t start, time_t stop, std::vector<cTVGuideTimerConflict*> conflictsToday, cRecMenuItemTimelineHeader *header, bool active);
virtual ~cRecMenuItemTimelineTimer(void); virtual ~cRecMenuItemTimelineTimer(void);
void SetActive(void); void setActive(void);
void setInactive(void); void setInactive(void);
void SetPixmaps(void); void SetPixmaps(void);
void Hide(void); void Hide(void);
void Show(void); void Show(void);
void Draw(void); void Draw(void);
const cTimer *GetTimer(void); const cTimer *GetTimerValue(void);
eRecMenuState ProcessKey(eKeys Key); eRecMenuState ProcessKey(eKeys Key);
}; };

File diff suppressed because it is too large Load Diff

View File

@ -1,43 +1,43 @@
#ifndef __TVGUIDE_RECMENUVIEW_H #ifndef __TVGUIDE_RECMENUMANAGER_H
#define __TVGUIDE_RECMENUVIEW_H #define __TVGUIDE_RECMENUMANAGER_H
#include "recmenu.h" #include "recmenu.h"
#include "recmanager.h" #include "recmanager.h"
#include "services/epgsearch.h" #include "services/epgsearch.h"
#include "footer.h" #include "footer.h"
// --- cRecMenuView ------------------------------------------------------------- // --- cRecMenuManager -------------------------------------------------------------
class cRecMenuView { class cRecMenuManager {
private: private:
cFooter *footer; cFooter *footer;
bool active; bool active;
cRecMenu *activeMenu; cRecMenu *activeMenu;
cRecMenu *activeMenuBuffer; cRecMenu *activeMenuBuffer;
cRecMenu *activeMenuBuffer2; cRecMenu *activeMenuBuffer2;
const cEvent *event; const cEvent *event;
const cEvent *displayEvent; const cEvent *displayEvent;
cRecManager *recManager; cRecManager *recManager;
cTVGuideTimerConflicts *timerConflicts; cTVGuideTimerConflicts *timerConflicts;
cDetailView *detailView; cDetailView *detailView;
cPixmap *pixmapBackground; cPixmap *pixmapBackground;
bool detailViewActive; bool detailViewActive;
void SetBackground(void); void SetBackground(void);
void DeleteBackground(void); void DeleteBackground(void);
void DisplaySearchTimerList(void); void DisplaySearchTimerList(void);
bool DisplayTimerConflict(const cTimer *timer); bool DisplayTimerConflict(const cTimer *timer);
bool DisplayTimerConflict(int timerID); bool DisplayTimerConflict(int timerID);
void DisplayDetailedView(const cEvent *ev); void DisplayDetailedView(const cEvent *ev);
void DisplayFavoriteResults(std::string header, const cEvent **result, int numResults); void DisplayFavoriteResults(std::string header, const cEvent **result, int numResults);
eOSState StateMachine(eRecMenuState nextState); eOSState StateMachine(eRecMenuState nextState);
public: public:
cRecMenuView(void); cRecMenuManager(void);
virtual ~cRecMenuView(void); virtual ~cRecMenuManager(void);
void AddFooter(cFooter *footer) { this->footer = footer; }; void SetFooter(cFooter *footer) { this->footer = footer; };
bool IsActive(void) { return active; }; bool isActive(void) { return active; };
void Start(const cEvent *event); void Start(const cEvent *event);
void StartFavorites(void); void StartFavorites(void);
void Close(void); void Close(void);
eOSState ProcessKey(eKeys Key); eOSState ProcessKey(eKeys Key);
}; };
#endif //__TVGUIDE_RECMENUVIEW_H #endif //__TVGUIDE_RECMENUMANAGER_H

1577
recmenus.c

File diff suppressed because it is too large Load Diff

View File

@ -10,15 +10,6 @@
#include "switchtimer.h" #include "switchtimer.h"
#include "recmanager.h" #include "recmanager.h"
typedef enum {
searchTimerActionRecord = 0,
searchTimerActionAnnounceViaOSD,
searchTimerActionSwitchOnly,
searchTimerActionAnnounceAndSwitch,
searchTimerActionAnnounceViaMail,
searchTimerActionInactiveRecord
} searchTimerAction;
// --- cRecMenuMain --------------------------------------------------------- // --- cRecMenuMain ---------------------------------------------------------
class cRecMenuMain : public cRecMenu { class cRecMenuMain : public cRecMenu {
public: public:
@ -47,7 +38,7 @@ public:
// --- cRecMenuConfirmTimer --------------------------------------------------------- // --- cRecMenuConfirmTimer ---------------------------------------------------------
class cRecMenuConfirmTimer: public cRecMenu { class cRecMenuConfirmTimer: public cRecMenu {
public: public:
cRecMenuConfirmTimer(const cEvent *event, bool timerChanged = false); cRecMenuConfirmTimer(const cEvent *event);
virtual ~cRecMenuConfirmTimer(void) {}; virtual ~cRecMenuConfirmTimer(void) {};
}; };
@ -77,12 +68,11 @@ public:
class cRecMenuTimerConflict: public cRecMenu { class cRecMenuTimerConflict: public cRecMenu {
private: private:
cTVGuideTimerConflict *conflict; cTVGuideTimerConflict *conflict;
int totalNumMenuItems;
public: public:
cRecMenuTimerConflict(cTVGuideTimerConflict *conflict, eRecMenuState nextAction = rmsClose); cRecMenuTimerConflict(cTVGuideTimerConflict *conflict);
virtual ~cRecMenuTimerConflict(void) {};
cRecMenuItem *GetMenuItem(int number); cRecMenuItem *GetMenuItem(int number);
int GetTotalNumMenuItems(void); int GetTotalNumMenuItems(void);
virtual ~cRecMenuTimerConflict(void) {};
int GetTimerConflictIndex(void); int GetTimerConflictIndex(void);
}; };
@ -137,7 +127,7 @@ public:
cRecMenuEditTimer(const cTimer *timer, eRecMenuState nextState); cRecMenuEditTimer(const cTimer *timer, eRecMenuState nextState);
const cTimer *GetOriginalTimer(void); const cTimer *GetOriginalTimer(void);
virtual ~cRecMenuEditTimer(void) {}; virtual ~cRecMenuEditTimer(void) {};
cTimer *GetTimer(void); cTimer GetTimer(void);
}; };
/****************************************************************************************** /******************************************************************************************
@ -205,46 +195,68 @@ class cRecMenuSearchTimers: public cRecMenu {
private: private:
int numSearchTimers; int numSearchTimers;
std::vector<cTVGuideSearchTimer> searchTimers; std::vector<cTVGuideSearchTimer> searchTimers;
void SetMenuItems(void);
public: public:
cRecMenuSearchTimers(std::vector<cTVGuideSearchTimer> searchTimers); cRecMenuSearchTimers(std::vector<cTVGuideSearchTimer> searchTimers);
virtual ~cRecMenuSearchTimers(void) {};
cRecMenuItem *GetMenuItem(int number); cRecMenuItem *GetMenuItem(int number);
int GetTotalNumMenuItems(void); int GetTotalNumMenuItems(void);
cTVGuideSearchTimer GetSearchTimer(void); cTVGuideSearchTimer GetSearchTimer(void);
virtual ~cRecMenuSearchTimers(void);
}; };
// --- cRecMenuSearchTimerEdit --------------------------------------------------------- // --- cRecMenuSearchTimerEdit ---------------------------------------------------------
class cRecMenuSearchTimerEdit: public cRecMenu { class cRecMenuSearchTimerEdit: public cRecMenu {
private: private:
cTVGuideSearchTimer sT; bool advancedOptions;
std::vector<std::string> searchModes; cTVGuideSearchTimer searchTimer;
std::vector<std::string> subTitleModes;
std::vector<std::string> useChannelModes;
std::vector<std::string> channelGroups; std::vector<std::string> channelGroups;
std::vector<std::string> compareDateModes;
std::vector<std::string> searchTimerModes;
std::vector<std::string> delModes;
std::vector<std::string> channelgroups;
std::vector<cRecMenuItem*> mainMenuItems; std::vector<cRecMenuItem*> mainMenuItems;
cString indent; std::vector<cRecMenuItem*> useChannelSubMenu;
bool init; std::vector<cRecMenuItem*> useGroupSubMenu;
std::vector<cRecMenuItem*> useTimeSubMenu;
std::vector<cRecMenuItem*> useDayOfWeekSubMenu;
std::vector<cRecMenuItem*> avoidRepeatSubMenu;
std::vector<cRecMenuItem*> currentMenuItems;
int numMenuItems; int numMenuItems;
int useChannelPos; int useChannelPos;
int useTimePos; int useTimePos;
int useDayOfWeekPos; int useDayOfWeekPos;
int DayOfWeek(int dayofWeek = 0);
int SetDayOfWeek(int VDRDayOfWeek);
int avoidRepeatsPos; int avoidRepeatsPos;
char searchString[TEXTINPUTLENGTH]; char searchString[TEXTINPUTLENGTH];
bool timerActive; bool timerActive;
int mode;
bool useTitle;
bool useSubtitle;
bool useDescription;
int useChannel;
int startChannel; int startChannel;
int stopChannel; int stopChannel;
std::string channelGroup;
std::vector<std::string> channelgroups;
int channelgroupIndex; int channelgroupIndex;
bool useTime;
int startTime;
int stopTime;
bool useDayOfWeek;
int dayOfWeek; int dayOfWeek;
int priority;
int lifetime;
bool useEpisode;
char directory[TEXTINPUTLENGTH]; char directory[TEXTINPUTLENGTH];
int marginStart;
int marginStop;
bool useVPS;
bool avoidRepeats;
int allowedRepeats;
bool compareTitle;
bool compareSubtitle;
bool compareSummary;
bool useInFavorites;
void InitMenuItems(void);
void AddSubMenu(std::vector<cRecMenuItem*> *subMenu);
int SplitChannelGroups(std::vector<std::string> *channelGroups, std::vector<std::string> *channelgroups); int SplitChannelGroups(std::vector<std::string> *channelGroups, std::vector<std::string> *channelgroups);
public: public:
cRecMenuSearchTimerEdit(cTVGuideSearchTimer searchTimer, std::vector<std::string> channelGroups); cRecMenuSearchTimerEdit(cTVGuideSearchTimer searchTimer, bool advancedOptions, std::vector<std::string> channelGroups);
void CreateMenuItems(void); void CreateMenuItems(void);
virtual ~cRecMenuSearchTimerEdit(void); virtual ~cRecMenuSearchTimerEdit(void);
cTVGuideSearchTimer GetSearchTimer(void); cTVGuideSearchTimer GetSearchTimer(void);
@ -258,7 +270,7 @@ private:
cTVGuideSearchTimer searchTimer; cTVGuideSearchTimer searchTimer;
public: public:
cRecMenuSearchTimerDeleteConfirm(cTVGuideSearchTimer searchTimer); cRecMenuSearchTimerDeleteConfirm(cTVGuideSearchTimer searchTimer);
virtual ~cRecMenuSearchTimerDeleteConfirm(void) {}; virtual ~cRecMenuSearchTimerDeleteConfirm(void);
cTVGuideSearchTimer GetSearchTimer(void); cTVGuideSearchTimer GetSearchTimer(void);
}; };

File diff suppressed because it is too large Load Diff

View File

@ -1,92 +1,144 @@
#ifndef __TVGUIDE_SEARCHTIMER_H #ifndef __TVGUIDE_SEARCHTIMER_H
#define __TVGUIDE_SEARCHTIMER_H #define __TVGUIDE_SEARCHTIMER_H
class cTVGuideSearchTimer { class cTVGuideSearchTimer {
friend class cRecMenuSearchTimerEdit; private:
protected: std::string strTimer;
std::string strTimer; int ID;
int ID; std::string searchString;
std::string searchString; int useTime;
int useTime; int startTime;
int startTime; int stopTime;
int stopTime; int useChannel;
int useChannel; #if VDRVERSNUM >= 20301
const cChannel *channelMin; const cChannel *channelMin;
const cChannel *channelMax; const cChannel *channelMax;
std::string channelGroup; #else
int useCase; cChannel *channelMin;
int mode; cChannel *channelMax;
int useTitle; #endif
int useSubtitle; std::string channelGroup;
int useDescription; int useCase;
int useDuration; int mode;
int minDuration; int useTitle;
int maxDuration; int useSubtitle;
int useAsSearchTimer; int useDescription;
int useDayOfWeek; int useDuration;
int dayOfWeek; int minDuration;
int useEpisode; int maxDuration;
std::string directory; int useAsSearchTimer;
int priority; int useDayOfWeek;
int lifetime; int dayOfWeek;
int marginStart; int useEpisode;
int marginStop; std::string directory;
int useVPS; int priority;
int action; int lifetime;
int useExtEPGInfo; int marginStart;
std::string extEPGInfoValues; int marginStop;
int avoidRepeats; int useVPS;
int allowedRepeats; int action;
int compareTitle; int useExtEPGInfo;
int compareSubtitle; std::string extEPGInfoValues;
int compareSummary; int avoidRepeats;
unsigned long catvaluesAvoidRepeat; int allowedRepeats;
int repeatsWithinDays; int compareTitle;
int delAfterDays; int compareSubtitle;
int recordingsKeep; int compareSummary;
int switchMinsBefore; unsigned long catvaluesAvoidRepeat;
int pauseOnNrRecordings; int repeatsWithinDays;
int blacklistMode; int delAfterDays;
std::string blacklists; int recordingsKeep;
int fuzzyTolerance; int switchMinsBefore;
int useInFavorites; int pauseOnNrRecordings;
int menuTemplate; int blacklistMode;
int delMode; std::string blacklists;
int delAfterCountRecs; int fuzzyTolerance;
int delAfterDaysOfFirstRec; int useInFavorites;
int useAsSearchTimerFrom; int menuTemplate;
int useAsSearchTimerTil; int delMode;
int ignoreMissingEPGCats; int delAfterCountRecs;
int unmuteSoundOnSwitch; int delAfterDaysOfFirstRec;
int compareSummaryMatchInPercent; int useAsSearchTimerFrom;
std::string contentsFilter; int useAsSearchTimerTil;
int compareDate; int ignoreMissingEPGCats;
public: int unmuteSoundOnSwitch;
cTVGuideSearchTimer(void); int compareSummaryMatchInPercent;
virtual ~cTVGuideSearchTimer(void); std::string contentsFilter;
bool operator < (const cTVGuideSearchTimer& other) const; int compareDate;
void SetEPGSearchString(std::string strTimer) { this->strTimer = strTimer; }; public:
void SetTemplate(std::string tmpl); cTVGuideSearchTimer(void);
bool Parse(bool readTemplate = false); virtual ~cTVGuideSearchTimer(void);
std::string BuildSearchString(void); bool operator < (const cTVGuideSearchTimer& other) const;
int GetID(void) { return ID; }; void SetEPGSearchString(std::string strTimer) { this->strTimer = strTimer; };
//GETTER void SetTemplate(std::string tmpl);
std::string GetSearchString(void) const { return searchString; }; bool Parse(bool readTemplate = false);
bool IsActive(void); std::string BuildSearchString(void);
bool UseInFavorites(void) { return useInFavorites; }; int GetID(void) { return ID; };
//SETTER //GETTER
void SetSearchString(std::string searchString) { this->searchString = searchString; }; std::string SearchString(void) const { return searchString; };
//COMMON bool Active(void);
int GetNumTimers(void); bool UseTitle(void) { return useTitle; };
int GetNumRecordings(void); bool UseSubtitle(void) { return useSubtitle; };
void GetSearchModes(std::vector<std::string> *searchModes); bool UseDescription(void) { return useDescription; };
void GetSubTitleModes(std::vector<std::string> *subTitleModes); int SearchMode(void) { return mode; };
void GetUseChannelModes(std::vector<std::string> *useChannelModes); int UseChannel(void) { return useChannel; };
void GetSearchTimerModes(std::vector<std::string> *searchTimerModes); int StartChannel(void) { return (channelMin)?channelMin->Number():0; };
void GetCompareDateModes(std::vector<std::string> *compareDateModes); int StopChannel(void) { return (channelMax)?channelMax->Number():0; };
void GetDelModes(std::vector<std::string> *delModes); std::string ChannelGroup(void) { return channelGroup; };
void Dump(void); bool UseTime(void) { return useTime; };
}; int StartTime(void) { return startTime; };
int StopTime(void) { return stopTime; };
#endif //__TVGUIDE_SEARCHTIMER_H bool UseDayOfWeek(void) { return useDayOfWeek; };
int DayOfWeek(void);
int UseEpisode(void) { return useEpisode; };
std::string Directory(void) { return directory; };
int Priority(void) { return priority; };
int Lifetime(void) { return lifetime; };
int MarginStart(void) { return marginStart; };
int MarginStop(void) { return marginStop; };
bool UseVPS(void) { return useVPS; };
bool AvoidRepeats(void) { return avoidRepeats; };
int AllowedRepeats(void) { return allowedRepeats; };
bool CompareTitle(void) { return compareTitle; };
bool CompareSubtitle(void) { return compareSubtitle; };
bool CompareSummary(void) { return compareSummary; };
bool UseInFavorites(void) { return useInFavorites; };
//SETTER
void SetSearchString(std::string searchString) { this->searchString = searchString; };
void SetActive(bool active) { useAsSearchTimer = active; };
void SetSearchMode(int searchMode) { mode = searchMode; };
void SetUseTitle(bool useTitle) { this->useTitle = useTitle; };
void SetUseSubtitle(bool useSubtitle) { this->useSubtitle = useSubtitle; };
void SetUseDesription(bool useDescription) { this->useDescription = useDescription; };
void SetUseChannel(int useChannel) { this->useChannel = useChannel; };
void SetStartChannel(int startChannel);
void SetStopChannel(int stopChannel);
void SetChannelGroup(std::string channelGroup) { this->channelGroup = channelGroup; };
void SetUseTime(bool useTime) { this->useTime = useTime; };
void SetStartTime(int startTime) { this->startTime = startTime; };
void SetStopTime(int stopTime) { this->stopTime = stopTime; };
void SetUseDayOfWeek(bool useDayOfWeek) { this->useDayOfWeek = useDayOfWeek; };
void SetDayOfWeek(int VDRDayOfWeek);
void SetUseEpisode(int useEpisode) { this->useEpisode = useEpisode; };
void SetDirectory(std::string directory) { this-> directory = directory; };
void SetPriority(int priority) { this->priority = priority; };
void SetLifetime(int lifetime) { this->lifetime = lifetime; };
void SetMarginStart(int marginStart) { this->marginStart = marginStart; };
void SetMarginStop(int marginStop) { this->marginStop = marginStop; };
void SetUseVPS(bool useVPS) { this->useVPS = useVPS; };
void SetAvoidRepeats(bool avoidRepeats) { this->avoidRepeats = avoidRepeats; };
void SetAllowedRepeats(int allowedRepeats) { this->allowedRepeats = allowedRepeats; };
void SetCompareTitle(bool compareTitle) { this->compareTitle = compareTitle; };
void SetCompareSubtitle(bool compareSubtitle) { this->compareSubtitle = compareSubtitle; };
void SetCompareSummary(bool compareSummary) { this->compareSummary = compareSummary; };
void SetUseInFavorites(bool useInFavorites) { this->useInFavorites = useInFavorites; };
//COMMON
int GetNumTimers(void);
int GetNumRecordings(void);
void GetSearchModes(std::vector<std::string> *searchModes);
void GetUseChannelModes(std::vector<std::string> *useChannelModes);
void Dump(void);
};
#endif //__TVGUIDE_SEARCHTIMER_H

View File

@ -1,182 +1,33 @@
/* #ifndef REMOTETIMERSERVICES_INC
* remotetimers.h: Public interface of the plugin's services #define REMOTETIMERSERVICES_INC
*
* Copyright (C) 2008-2013 Frank Schmirler <vdr@schmirler.de>
*
* This file is part of VDR Plugin remotetimers.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
* Or, point your browser to http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*/
#ifndef _SERVICE__H
#define _SERVICE__H
#include <vdr/timers.h>
#include <vdr/epg.h> #include <vdr/epg.h>
#include <vdr/osdbase.h> #include <vdr/timers.h>
/* // RemoteTimers services
* If the Data argument is NULL, all service calls return true. struct RemoteTimers_Event_v1_0 {
* Otherwise the return value indicates success or failure of the service call. //in
* const cEvent *event;
* The service calls are not thread safe and must be called from the VDR main loop. //out
*/ cTimer *timer;
cString errorMsg;
/*
* RemoteTimers::InstantRecording-v1.0
* Start an instant recording or pause live TV. VDR needs to be patched to support this.
* The service returns false if a local timer should be used. An error occured if true is returned but the out parameters name and fileName are NULL.
* Data points to the following structure where pause indicates if it is an instant recording or an attempt to pause live TV.
*/
struct RemoteTimers_InstantRecording_v1_0 {
//in
const cTimer *timer;
bool pause;
const cEvent *event;
//out
cString name;
cString fileName;
}; };
/*
* RemoteTimers::RefreshTimers-v1.0
* Fetch timer list from remote VDR. You must call this service before you can use one of the service calls below.
* Data points to a cString which in case of failure (service call returns false) contains an error message.
*/
//out
// cString errorMsg;
/*
* RemoteTimers::ForEachConflict-v1.0
* Iterates the list of remote timer conflicts.
* The service call always returns true.
* Data points to a const char* which must be NULL to return the first conflict. Pass the previously returned conflict to get the next one until const char* is NULL.
*
*/
//in+out
// const char* conflict;
/*
* RemoteTimers::ForEach-v1.0
* Iterates the list of remote timers.
* The service call always returns true.
* Data points to a cTimer* which must be NULL to return the first timer. Pass the previously returned timer to get the next one until cTimer* is NULL.
*
* RemoteTimers::GetTimer-v1.0
* Test if the timer exists as either a remote or a local timer.
* The service call always returns true.
* Data points to a cTimer* which points to the timer you are looking for. If found, cTimer* will point to the timer, otherwise it will be NULL.
*/
//in+out
// cTimer* timer;
/*
* RemoteTimers::GetMatch-v1.0
* Find the remote or local timer which matches the event best.
* The service call always returns true.
* Data points to the following structure:
*/
struct RemoteTimers_GetMatch_v1_0 { struct RemoteTimers_GetMatch_v1_0 {
//in //in
const cEvent *event; const cEvent *event;
//out //out
cTimer *timer; cTimer *timer;
int timerMatch; int timerMatch;
int timerType; int timerType;
bool isRemote; bool isRemote;
}; };
/*
* RemoteTimers::GetTimerByEvent-v1.0
* Find the remote or local timer matching the event.
* If no timer matches, the service call returns false.
* Data points to a RemoteTimers_Event_v1_0 struct.
*
* RemoteTimers::NewTimerByEvent-v1.0
* Add a new timer for an event.
* In case of an error, the service call returns false and the structure includes an error message.
* Data points to a RemoteTimers_Event_v1_0 struct.
*/
struct RemoteTimers_Event_v1_0 {
//in
const cEvent *event;
//out
cTimer *timer;
cString errorMsg;
};
/*
* RemoteTimers::NewTimer-v1.0
* Add a new timer.
* In case of an error, the service call returns false and the structure includes an error message.
* Data points to a RemoteTimers_Timer_v1_0 struct.
*
* RemoteTimers::ModTimer-v1.0
* Change an existing timer.
* In case of an error, the service call returns false and the structure includes an error message.
* Data points to a RemoteTimers_Timer_v1_0 struct.
*
* RemoteTimers::DelTimer-v1.0
* Delete an existing timer.
* In case of an error, the service call returns false and the structure includes an error message.
* Data points to a RemoteTimers_Timer_v1_0 struct.
*/
struct RemoteTimers_Timer_v1_0 { struct RemoteTimers_Timer_v1_0 {
//in+out //in+out
cTimer *timer; cTimer *timer;
//out //out
cString errorMsg; cString errorMsg;
}; };
/* #endif //REMOTETIMERSERVICES_INC
* RemoteTimers::GetTimerById-v1.0
* Get a remote timer by its id (i.e. timer->Index()+1 on remote machine).
* The service call always returns true.
* Data must point to a RemoteTimers_Timer_v1_1 structure. errorMsg is unused.
* NULL is returned as timer if no remote timer exists for the given id locally.
* Note that a timer with this id may exist remotely. This can happen if the
* remote timer's channel doesn't exist on the local machine.
*/
struct RemoteTimers_Timer_v1_1 {
//in+out
cTimer *timer;
int id;
//out
cString errorMsg;
};
/*
* RemoteTimers::Menu-v1.0
* Depending on the state parameter, open the Timers or Schedule menu.
* In case of an error, menu is NULL.
* Data points to a RemoteTimers_Menu_v1_0 struct.
*/
struct RemoteTimers_Menu_v1_0 {
//in
const char *serverIp;
unsigned short serverPort;
eOSState state;
//out
cOsdMenu *menu;
};
#endif //_SERVICE__H

549
setup.c
View File

@ -1,7 +1,7 @@
#include "setup.h" #include "setup.h"
cTvguideSetup::cTvguideSetup() { cTvguideSetup::cTvguideSetup() {
tmpConfig = config; tmpTvguideConfig = tvguideConfig;
Setup(); Setup();
} }
@ -9,8 +9,8 @@ cTvguideSetup::~cTvguideSetup() {
geoManager.SetGeometry(cOsd::OsdWidth(), cOsd::OsdHeight(), true); geoManager.SetGeometry(cOsd::OsdWidth(), cOsd::OsdHeight(), true);
fontManager.DeleteFonts(); fontManager.DeleteFonts();
fontManager.SetFonts(); fontManager.SetFonts();
config.LoadTheme(); tvguideConfig.LoadTheme();
config.setDynamicValues(); tvguideConfig.setDynamicValues();
imgCache.Clear(); imgCache.Clear();
imgCache.CreateCache(); imgCache.CreateCache();
} }
@ -40,15 +40,15 @@ eOSState cTvguideSetup::ProcessKey(eKeys Key) {
if ((Key == kOk && !hadSubMenu)) { if ((Key == kOk && !hadSubMenu)) {
const char* ItemText = Get(Current())->Text(); const char* ItemText = Get(Current())->Text();
if (strcmp(ItemText, tr("General Settings")) == 0) if (strcmp(ItemText, tr("General Settings")) == 0)
state = AddSubMenu(new cMenuSetupGeneral(&tmpConfig)); state = AddSubMenu(new cMenuSetupGeneral(&tmpTvguideConfig));
if (strcmp(ItemText, tr("Screen Presentation")) == 0) if (strcmp(ItemText, tr("Screen Presentation")) == 0)
state = AddSubMenu(new cMenuSetupScreenLayout(&tmpConfig)); state = AddSubMenu(new cMenuSetupScreenLayout(&tmpTvguideConfig));
if (strcmp(ItemText, tr("Fonts and Fontsizes")) == 0) if (strcmp(ItemText, tr("Fonts and Fontsizes")) == 0)
state = AddSubMenu(new cMenuSetupFont(&tmpConfig)); state = AddSubMenu(new cMenuSetupFont(&tmpTvguideConfig));
if (strcmp(ItemText, tr("Recording Menus and Favorites")) == 0) if (strcmp(ItemText, tr("Recording Menus and Favorites")) == 0)
state = AddSubMenu(new cMenuSetupFavorites(&tmpConfig)); state = AddSubMenu(new cMenuSetupFavorites(&tmpTvguideConfig));
if (strcmp(ItemText, tr("Image Loading and Caching")) == 0) if (strcmp(ItemText, tr("Image Loading and Caching")) == 0)
state = AddSubMenu(new cMenuSetupImageCache(&tmpConfig)); state = AddSubMenu(new cMenuSetupImageCache(&tmpTvguideConfig));
} }
} }
return state; return state;
@ -56,113 +56,108 @@ eOSState cTvguideSetup::ProcessKey(eKeys Key) {
void cTvguideSetup::Store(void) { void cTvguideSetup::Store(void) {
config = tmpConfig; tvguideConfig = tmpTvguideConfig;
SetupStore("debugImageLoading", config.debugImageLoading); SetupStore("debugImageLoading", tvguideConfig.debugImageLoading);
SetupStore("useNopacityTheme", config.useNopacityTheme); SetupStore("useNopacityTheme", tvguideConfig.useNopacityTheme);
SetupStore("themeIndex", config.themeIndex); SetupStore("themeIndex", tvguideConfig.themeIndex);
SetupStore("useHWAccel", config.useHWAccel); SetupStore("showMainMenuEntry", tvguideConfig.showMainMenuEntry);
SetupStore("showMainMenuEntry", config.showMainMenuEntry); SetupStore("replaceOriginalSchedule", tvguideConfig.replaceOriginalSchedule);
SetupStore("replaceOriginalSchedule", config.replaceOriginalSchedule); SetupStore("displayMode", tvguideConfig.displayMode);
SetupStore("displayMode", config.displayMode); SetupStore("showTimeInGrid", tvguideConfig.showTimeInGrid);
SetupStore("showTimeInGrid", config.showTimeInGrid); SetupStore("displayStatusHeader", tvguideConfig.displayStatusHeader);
SetupStore("displayStatusHeader", config.displayStatusHeader); SetupStore("displayChannelGroups", tvguideConfig.displayChannelGroups);
SetupStore("displayChannelGroups", config.displayChannelGroups); SetupStore("displayTimeBase", tvguideConfig.displayTimeBase);
SetupStore("displayTimeBase", config.displayTimeBase); SetupStore("headerHeightPercent", tvguideConfig.headerHeightPercent);
SetupStore("headerHeightPercent", config.headerHeightPercent); SetupStore("channelGroupsPercent", tvguideConfig.channelGroupsPercent);
SetupStore("channelGroupsPercent", config.channelGroupsPercent); SetupStore("epgViewBorder", tvguideConfig.epgViewBorder);
SetupStore("epgViewBorder", config.epgViewBorder); SetupStore("scaleVideo", tvguideConfig.scaleVideo);
SetupStore("scaleVideo", config.scaleVideo); SetupStore("decorateVideo", tvguideConfig.decorateVideo);
SetupStore("decorateVideo", config.decorateVideo); SetupStore("roundedCorners", tvguideConfig.roundedCorners);
SetupStore("roundedCorners", config.roundedCorners); SetupStore("timeFormat", tvguideConfig.timeFormat);
SetupStore("timeFormat", config.timeFormat); SetupStore("channelCols", tvguideConfig.channelCols);
SetupStore("channelCols", config.channelCols); SetupStore("channelRows", tvguideConfig.channelRows);
SetupStore("channelRows", config.channelRows); SetupStore("displayTime", tvguideConfig.displayTime);
SetupStore("displayTime", config.displayTime); SetupStore("displayHorizontalTime", tvguideConfig.displayHorizontalTime);
SetupStore("displayHorizontalTime", config.displayHorizontalTime); SetupStore("bigStepHours", tvguideConfig.bigStepHours);
SetupStore("bigStepHours", config.bigStepHours); SetupStore("hugeStepHours", tvguideConfig.hugeStepHours);
SetupStore("bigStepHoursHorizontal", config.bigStepHoursHorizontal); SetupStore("channelJumpMode", tvguideConfig.channelJumpMode);
SetupStore("hugeStepHours", config.hugeStepHours); SetupStore("blueKeyMode", tvguideConfig.blueKeyMode);
SetupStore("hugeStepHoursHorizontal", config.hugeStepHoursHorizontal); SetupStore("numkeyMode", tvguideConfig.numkeyMode);
SetupStore("channelJumpMode", config.channelJumpMode); SetupStore("useRemoteTimers", tvguideConfig.useRemoteTimers);
SetupStore("blueKeyMode", config.blueKeyMode); SetupStore("closeOnSwitch", tvguideConfig.closeOnSwitch);
SetupStore("numkeyMode", config.numkeyMode); SetupStore("hideLastGroup", tvguideConfig.hideLastGroup);
SetupStore("useRemoteTimers", config.useRemoteTimers); SetupStore("hideChannelLogos", tvguideConfig.hideChannelLogos);
SetupStore("closeOnSwitch", config.closeOnSwitch); SetupStore("logoExtension", tvguideConfig.logoExtension);
SetupStore("hideLastGroup", config.hideLastGroup); SetupStore("logoWidthRatio", tvguideConfig.logoWidthRatio);
SetupStore("hideChannelLogos", config.hideChannelLogos); SetupStore("logoHeightRatio", tvguideConfig.logoHeightRatio);
SetupStore("logoExtension", config.logoExtension); SetupStore("hideEpgImages", tvguideConfig.hideEpgImages);
SetupStore("logoWidthRatio", config.logoWidthRatio); SetupStore("epgImageWidth", tvguideConfig.epgImageWidth);
SetupStore("logoHeightRatio", config.logoHeightRatio); SetupStore("epgImageHeight", tvguideConfig.epgImageHeight);
SetupStore("hideEpgImages", config.hideEpgImages); SetupStore("numAdditionalEPGPictures", tvguideConfig.numAdditionalEPGPictures);
SetupStore("epgImageWidth", config.epgImageWidth); SetupStore("epgImageWidthLarge", tvguideConfig.epgImageWidthLarge);
SetupStore("epgImageHeight", config.epgImageHeight); SetupStore("epgImageHeightLarge", tvguideConfig.epgImageHeightLarge);
SetupStore("numAdditionalEPGPictures", config.numAdditionalEPGPictures); SetupStore("detailedViewScrollStep", tvguideConfig.detailedViewScrollStep);
SetupStore("epgImageWidthLarge", config.epgImageWidthLarge); SetupStore("timeLineWidthPercent", tvguideConfig.timeLineWidthPercent);
SetupStore("epgImageHeightLarge", config.epgImageHeightLarge); SetupStore("timeLineHeightPercent", tvguideConfig.timeLineHeightPercent);
SetupStore("detailedViewScrollStep", config.detailedViewScrollStep); SetupStore("displayChannelName", tvguideConfig.displayChannelName);
SetupStore("timeLineWidthPercent", config.timeLineWidthPercent); SetupStore("channelHeaderWidthPercent", tvguideConfig.channelHeaderWidthPercent);
SetupStore("timeLineHeightPercent", config.timeLineHeightPercent); SetupStore("channelHeaderHeightPercent", tvguideConfig.channelHeaderHeightPercent);
SetupStore("displayChannelName", config.displayChannelName); SetupStore("footerHeightPercent", tvguideConfig.footerHeightPercent);
SetupStore("channelHeaderWidthPercent", config.channelHeaderWidthPercent); SetupStore("instRecFolderMode", tvguideConfig.instRecFolderMode);
SetupStore("channelHeaderHeightPercent", config.channelHeaderHeightPercent); SetupStore("instRecFixedFolder", tvguideConfig.instRecFixedFolder.c_str());
SetupStore("footerHeightPercent", config.footerHeightPercent); SetupStore("favWhatsOnNow", tvguideConfig.favWhatsOnNow);
SetupStore("instRecFolderMode", config.instRecFolderMode); SetupStore("favWhatsOnNext", tvguideConfig.favWhatsOnNext);
SetupStore("instRecFixedFolder", config.instRecFixedFolder.c_str()); SetupStore("favUseTime1", tvguideConfig.favUseTime1);
SetupStore("addSubtitleToTimer", config.addSubtitleToTimer); SetupStore("favUseTime2", tvguideConfig.favUseTime2);
SetupStore("timerMessage", config.timerMessage); SetupStore("favUseTime3", tvguideConfig.favUseTime3);
SetupStore("favWhatsOnNow", config.favWhatsOnNow); SetupStore("favUseTime4", tvguideConfig.favUseTime4);
SetupStore("favWhatsOnNext", config.favWhatsOnNext); SetupStore("favTime1", tvguideConfig.favTime1);
SetupStore("favUseTime1", config.favUseTime1); SetupStore("favTime2", tvguideConfig.favTime2);
SetupStore("favUseTime2", config.favUseTime2); SetupStore("favTime3", tvguideConfig.favTime3);
SetupStore("favUseTime3", config.favUseTime3); SetupStore("favTime4", tvguideConfig.favTime4);
SetupStore("favUseTime4", config.favUseTime4); SetupStore("descUser1", tvguideConfig.descUser1.c_str());
SetupStore("favTime1", config.favTime1); SetupStore("descUser2", tvguideConfig.descUser2.c_str());
SetupStore("favTime2", config.favTime2); SetupStore("descUser3", tvguideConfig.descUser3.c_str());
SetupStore("favTime3", config.favTime3); SetupStore("descUser4", tvguideConfig.descUser4.c_str());
SetupStore("favTime4", config.favTime4); SetupStore("favLimitChannels", tvguideConfig.favLimitChannels);
SetupStore("descUser1", config.descUser1.c_str()); SetupStore("favStartChannel", tvguideConfig.favStartChannel);
SetupStore("descUser2", config.descUser2.c_str()); SetupStore("favStopChannel", tvguideConfig.favStopChannel);
SetupStore("descUser3", config.descUser3.c_str()); SetupStore("switchMode", tvguideConfig.switchMode);
SetupStore("descUser4", config.descUser4.c_str()); SetupStore("switchMinsBefore", tvguideConfig.switchMinsBefore);
SetupStore("favLimitChannels", config.favLimitChannels); SetupStore("fontIndex", tvguideConfig.fontIndex);
SetupStore("favStartChannel", config.favStartChannel); SetupStore("FontButtonDelta", tvguideConfig.FontButtonDelta);
SetupStore("favStopChannel", config.favStopChannel); SetupStore("FontDetailViewDelta", tvguideConfig.FontDetailViewDelta);
SetupStore("switchMode", config.switchMode); SetupStore("FontDetailHeaderDelta", tvguideConfig.FontDetailHeaderDelta);
SetupStore("switchMinsBefore", config.switchMinsBefore); SetupStore("FontMessageBoxDelta", tvguideConfig.FontMessageBoxDelta);
SetupStore("fontIndex", config.fontIndex); SetupStore("FontMessageBoxLargeDelta", tvguideConfig.FontMessageBoxLargeDelta);
SetupStore("FontButtonDelta", config.FontButtonDelta); SetupStore("FontStatusHeaderDelta", tvguideConfig.FontStatusHeaderDelta);
SetupStore("FontDetailViewDelta", config.FontDetailViewDelta); SetupStore("FontStatusHeaderLargeDelta", tvguideConfig.FontStatusHeaderLargeDelta);
SetupStore("FontDetailHeaderDelta", config.FontDetailHeaderDelta); SetupStore("FontChannelHeaderDelta", tvguideConfig.FontChannelHeaderDelta);
SetupStore("FontMessageBoxDelta", config.FontMessageBoxDelta); SetupStore("FontChannelGroupsDelta", tvguideConfig.FontChannelGroupsDelta);
SetupStore("FontMessageBoxLargeDelta", config.FontMessageBoxLargeDelta); SetupStore("FontGridDelta", tvguideConfig.FontGridDelta);
SetupStore("FontStatusHeaderDelta", config.FontStatusHeaderDelta); SetupStore("FontGridSmallDelta", tvguideConfig.FontGridSmallDelta);
SetupStore("FontStatusHeaderLargeDelta", config.FontStatusHeaderLargeDelta); SetupStore("FontTimeLineWeekdayDelta", tvguideConfig.FontTimeLineWeekdayDelta);
SetupStore("FontChannelHeaderDelta", config.FontChannelHeaderDelta); SetupStore("FontTimeLineDateDelta", tvguideConfig.FontTimeLineDateDelta);
SetupStore("FontChannelGroupsDelta", config.FontChannelGroupsDelta); SetupStore("FontTimeLineTimeDelta", tvguideConfig.FontTimeLineTimeDelta);
SetupStore("FontGridDelta", config.FontGridDelta); SetupStore("FontChannelHeaderHorizontalDelta", tvguideConfig.FontChannelHeaderHorizontalDelta);
SetupStore("FontGridSmallDelta", config.FontGridSmallDelta); SetupStore("FontChannelGroupsHorizontalDelta", tvguideConfig.FontChannelGroupsHorizontalDelta);
SetupStore("FontTimeLineWeekdayDelta", config.FontTimeLineWeekdayDelta); SetupStore("FontGridHorizontalDelta", tvguideConfig.FontGridHorizontalDelta);
SetupStore("FontTimeLineDateDelta", config.FontTimeLineDateDelta); SetupStore("FontGridHorizontalSmallDelta", tvguideConfig.FontGridHorizontalSmallDelta);
SetupStore("FontTimeLineTimeDelta", config.FontTimeLineTimeDelta); SetupStore("FontTimeLineDateHorizontalDelta", tvguideConfig.FontTimeLineDateHorizontalDelta);
SetupStore("FontChannelHeaderHorizontalDelta", config.FontChannelHeaderHorizontalDelta); SetupStore("FontTimeLineTimeHorizontalDelta", tvguideConfig.FontTimeLineTimeHorizontalDelta);
SetupStore("FontChannelGroupsHorizontalDelta", config.FontChannelGroupsHorizontalDelta); SetupStore("FontRecMenuItemDelta", tvguideConfig.FontRecMenuItemDelta);
SetupStore("FontGridHorizontalDelta", config.FontGridHorizontalDelta); SetupStore("FontRecMenuItemSmallDelta", tvguideConfig.FontRecMenuItemSmallDelta);
SetupStore("FontGridHorizontalSmallDelta", config.FontGridHorizontalSmallDelta); SetupStore("FontRecMenuItemLargeDelta", tvguideConfig.FontRecMenuItemLargeDelta);
SetupStore("FontTimeLineDateHorizontalDelta", config.FontTimeLineDateHorizontalDelta); SetupStore("displayRerunsDetailEPGView", tvguideConfig.displayRerunsDetailEPGView);
SetupStore("FontTimeLineTimeHorizontalDelta", config.FontTimeLineTimeHorizontalDelta); SetupStore("numReruns", tvguideConfig.numReruns);
SetupStore("FontRecMenuItemDelta", config.FontRecMenuItemDelta); SetupStore("useSubtitleRerun", tvguideConfig.useSubtitleRerun);
SetupStore("FontRecMenuItemSmallDelta", config.FontRecMenuItemSmallDelta); SetupStore("numLogosInitial", tvguideConfig.numLogosInitial);
SetupStore("FontRecMenuItemLargeDelta", config.FontRecMenuItemLargeDelta); SetupStore("numLogosMax", tvguideConfig.numLogosMax);
SetupStore("displayRerunsDetailEPGView", config.displayRerunsDetailEPGView); SetupStore("limitLogoCache", tvguideConfig.limitLogoCache);
SetupStore("numReruns", config.numReruns);
SetupStore("useSubtitleRerun", config.useSubtitleRerun);
SetupStore("numLogosInitial", config.numLogosInitial);
SetupStore("numLogosMax", config.numLogosMax);
SetupStore("limitLogoCache", config.limitLogoCache);
} }
cMenuSetupSubMenu::cMenuSetupSubMenu(const char* Title, cTVGuideConfig* data) : cOsdMenu(Title, 40) { cMenuSetupSubMenu::cMenuSetupSubMenu(const char* Title, cTvguideConfig* data) : cOsdMenu(Title, 40) {
tmpConfig = data; tmpTvguideConfig = data;
indent = " "; indent = " ";
} }
@ -188,7 +183,7 @@ eOSState cMenuSetupSubMenu::ProcessKey(eKeys Key) {
//----- General Settings ------------------------------------------------------------------------------------------------------------- //----- General Settings -------------------------------------------------------------------------------------------------------------
cMenuSetupGeneral::cMenuSetupGeneral(cTVGuideConfig* data) : cMenuSetupSubMenu(tr("General Settings"), data) { cMenuSetupGeneral::cMenuSetupGeneral(cTvguideConfig* data) : cMenuSetupSubMenu(tr("General Settings"), data) {
themes.Load(*cString("tvguide")); themes.Load(*cString("tvguide"));
timeFormatItems[0] = "12h"; timeFormatItems[0] = "12h";
timeFormatItems[1] = "24h"; timeFormatItems[1] = "24h";
@ -208,53 +203,47 @@ cMenuSetupGeneral::cMenuSetupGeneral(cTVGuideConfig* data) : cMenuSetupSubMenu(
void cMenuSetupGeneral::Set(void) { void cMenuSetupGeneral::Set(void) {
int currentItem = Current(); int currentItem = Current();
Clear(); Clear();
Add(new cMenuEditBoolItem(tr("Use workaround for HWAccelerated OSD"), &tmpConfig->useHWAccel)); Add(new cMenuEditBoolItem(tr("Show Main Menu Entry"), &tmpTvguideConfig->showMainMenuEntry));
Add(new cMenuEditBoolItem(tr("Show Main Menu Entry"), &tmpConfig->showMainMenuEntry)); Add(new cMenuEditBoolItem(tr("Replace VDR Schedules Menu"), &tmpTvguideConfig->replaceOriginalSchedule));
Add(new cMenuEditBoolItem(tr("Replace VDR Schedules Menu"), &tmpConfig->replaceOriginalSchedule)); Add(new cMenuEditBoolItem(tr("Use appropriate nOpacity Theme"), &tmpTvguideConfig->useNopacityTheme));
Add(new cMenuEditBoolItem(tr("Use appropriate nOpacity Theme"), &tmpConfig->useNopacityTheme)); if (!tmpTvguideConfig->useNopacityTheme) {
if (!tmpConfig->useNopacityTheme) {
if (themes.NumThemes()) if (themes.NumThemes())
Add(new cMenuEditStraItem(cString::sprintf("%s%s", *indent, tr("Theme")), &tmpConfig->themeIndex, themes.NumThemes(), themes.Descriptions())); Add(new cMenuEditStraItem(cString::sprintf("%s%s", *indent, tr("Theme")), &tmpTvguideConfig->themeIndex, themes.NumThemes(), themes.Descriptions()));
} }
if (tmpConfig->displayMode == eVertical) { if (tmpTvguideConfig->displayMode == eVertical) {
Add(new cMenuEditIntItem(tr("Time to display in minutes"), &tmpConfig->displayTime, 60, 320)); Add(new cMenuEditIntItem(tr("Time to display in minutes"), &tmpTvguideConfig->displayTime, 60, 320));
} else if (tmpConfig->displayMode == eHorizontal) { } else if (tmpTvguideConfig->displayMode == eHorizontal) {
Add(new cMenuEditIntItem(tr("Time to display in minutes"), &tmpConfig->displayHorizontalTime, 60, 320)); Add(new cMenuEditIntItem(tr("Time to display in minutes"), &tmpTvguideConfig->displayHorizontalTime, 60, 320));
} }
Add(new cMenuEditBoolItem(tr("Rounded Corners"), &tmpConfig->roundedCorners)); Add(new cMenuEditBoolItem(tr("Rounded Corners"), &tmpTvguideConfig->roundedCorners));
Add(new cMenuEditStraItem(tr("Channel Jump Mode (Keys Green / Yellow)"), &tmpConfig->channelJumpMode, 2, jumpMode)); Add(new cMenuEditStraItem(tr("Channel Jump Mode (Keys Green / Yellow)"), &tmpTvguideConfig->channelJumpMode, 2, jumpMode));
Add(new cMenuEditStraItem(tr("Keys Blue and OK"), &tmpConfig->blueKeyMode, 3, blueMode)); Add(new cMenuEditStraItem(tr("Keys Blue and OK"), &tmpTvguideConfig->blueKeyMode, 3, blueMode));
Add(new cMenuEditBoolItem(tr("Close TVGuide after channel switch"), &tmpConfig->closeOnSwitch)); Add(new cMenuEditBoolItem(tr("Close TVGuide after channel switch"), &tmpTvguideConfig->closeOnSwitch));
Add(new cMenuEditStraItem(tr("Functionality of numeric Keys"), &tmpConfig->numkeyMode, 2, numMode)); Add(new cMenuEditStraItem(tr("Functionality of numeric Keys"), &tmpTvguideConfig->numkeyMode, 2, numMode));
Add(new cMenuEditBoolItem(tr("Hide last Channel Group"), &tmpConfig->hideLastGroup)); Add(new cMenuEditBoolItem(tr("Hide last Channel Group"), &tmpTvguideConfig->hideLastGroup));
if (tmpConfig->displayMode == eVertical) { Add(new cMenuEditIntItem(tr("Big Step (Keys 1 / 3) in hours"), &tmpTvguideConfig->bigStepHours, 1, 12));
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"), &tmpTvguideConfig->hugeStepHours, 13, 48));
Add(new cMenuEditIntItem(tr("Huge Step (Keys 4 / 6) in hours"), &tmpConfig->hugeStepHours, 13, 48)); Add(new cMenuEditStraItem(tr("Time Format (12h/24h)"), &tmpTvguideConfig->timeFormat, 2, timeFormatItems));
} else if (tmpConfig->displayMode == eHorizontal) { Add(new cMenuEditIntItem(tr("EPG Window Text Scrolling Speed"), &tmpTvguideConfig->detailedViewScrollStep, 1, 30));
Add(new cMenuEditIntItem(tr("Big Step (Keys 1 / 3) in hours"), &tmpConfig->bigStepHoursHorizontal, 1, 12)); Add(new cMenuEditBoolItem(tr("Display Reruns in detailed EPG View"), &tmpTvguideConfig->displayRerunsDetailEPGView));
Add(new cMenuEditIntItem(tr("Huge Step (Keys 4 / 6) in hours"), &tmpConfig->hugeStepHoursHorizontal, 13, 48)); if (tmpTvguideConfig->displayRerunsDetailEPGView) {
} Add(new cMenuEditIntItem(cString::sprintf("%s%s", *indent, tr("Number of reruns to display")), &tmpTvguideConfig->numReruns, 1, 10));
Add(new cMenuEditStraItem(tr("Time Format (12h/24h)"), &tmpConfig->timeFormat, 2, timeFormatItems)); Add(new cMenuEditStraItem(cString::sprintf("%s%s", *indent, tr("Use Subtitle for reruns")), &tmpTvguideConfig->useSubtitleRerun, 3, useSubtitleRerunTexts));
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));
if (tmpConfig->displayRerunsDetailEPGView) {
Add(new cMenuEditIntItem(cString::sprintf("%s%s", *indent, tr("Number of reruns to display")), &tmpConfig->numReruns, 1, 10));
Add(new cMenuEditStraItem(cString::sprintf("%s%s", *indent, tr("Use Subtitle for reruns")), &tmpConfig->useSubtitleRerun, 3, useSubtitleRerunTexts));
} }
SetCurrent(Get(currentItem)); SetCurrent(Get(currentItem));
Display(); Display();
} }
eOSState cMenuSetupGeneral::ProcessKey(eKeys Key) { eOSState cMenuSetupGeneral::ProcessKey(eKeys Key) {
bool olduseNopacityTheme = tmpConfig->useNopacityTheme; bool olduseNopacityTheme = tmpTvguideConfig->useNopacityTheme;
bool olddisplayRerunsDetailEPGView = tmpConfig->displayRerunsDetailEPGView; bool olddisplayRerunsDetailEPGView = tmpTvguideConfig->displayRerunsDetailEPGView;
eOSState state = cOsdMenu::ProcessKey(Key); eOSState state = cOsdMenu::ProcessKey(Key);
if (Key == kOk) { if (Key == kOk) {
state = osBack; state = osBack;
} else if (Key != kNone) { } else if (Key != kNone) {
if (tmpConfig->useNopacityTheme != olduseNopacityTheme || if (tmpTvguideConfig->useNopacityTheme != olduseNopacityTheme ||
tmpConfig->displayRerunsDetailEPGView != olddisplayRerunsDetailEPGView) { tmpTvguideConfig->displayRerunsDetailEPGView != olddisplayRerunsDetailEPGView) {
Set(); Set();
} }
} }
@ -263,7 +252,7 @@ eOSState cMenuSetupGeneral::ProcessKey(eKeys Key) {
//----- Screen Presentation ------------------------------------------------------------------------------------------------------------- //----- Screen Presentation -------------------------------------------------------------------------------------------------------------
cMenuSetupScreenLayout::cMenuSetupScreenLayout(cTVGuideConfig* data) : cMenuSetupSubMenu(tr("Screen Presentation"), data) { cMenuSetupScreenLayout::cMenuSetupScreenLayout(cTvguideConfig* data) : cMenuSetupSubMenu(tr("Screen Presentation"), data) {
displayModeItems[0] = "vertical"; displayModeItems[0] = "vertical";
displayModeItems[1] = "horizontal"; displayModeItems[1] = "horizontal";
hideChannelLogosItems[0] = trVDR("yes"); hideChannelLogosItems[0] = trVDR("yes");
@ -277,55 +266,55 @@ void cMenuSetupScreenLayout::Set(void) {
int currentItem = Current(); int currentItem = Current();
Clear(); Clear();
Add(new cMenuEditStraItem(tr("Display Mode"), &tmpConfig->displayMode, 2, displayModeItems)); Add(new cMenuEditStraItem(tr("Display Mode"), &tmpTvguideConfig->displayMode, 2, displayModeItems));
if (tmpConfig->displayMode == eVertical) { if (tmpTvguideConfig->displayMode == eVertical) {
Add(new cMenuEditIntItem(*cString::sprintf("%s%s", *indent, tr("Height of Channel Header (Perc. of osd height)")), &tmpConfig->channelHeaderHeightPercent, 5, 30)); Add(new cMenuEditIntItem(*cString::sprintf("%s%s", *indent, tr("Height of Channel Header (Perc. of osd height)")), &tmpTvguideConfig->channelHeaderHeightPercent, 5, 30));
Add(new cMenuEditIntItem(*cString::sprintf("%s%s", *indent, tr("Width of Timeline (Perc. of osd width)")), &tmpConfig->timeLineWidthPercent, 5, 30)); Add(new cMenuEditIntItem(*cString::sprintf("%s%s", *indent, tr("Width of Timeline (Perc. of osd width)")), &tmpTvguideConfig->timeLineWidthPercent, 5, 30));
Add(new cMenuEditIntItem(*cString::sprintf("%s%s", *indent, tr("Number of Channels to display")), &tmpConfig->channelCols, 3, 12)); Add(new cMenuEditIntItem(*cString::sprintf("%s%s", *indent, tr("Number of Channels to display")), &tmpTvguideConfig->channelCols, 3, 12));
} else if (tmpConfig->displayMode == eHorizontal) { } else if (tmpTvguideConfig->displayMode == eHorizontal) {
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("Width of Channel Header (Perc. of osd width)")), &tmpTvguideConfig->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("Height of Timeline (Perc. of osd height)")), &tmpTvguideConfig->timeLineHeightPercent, 5, 30));
Add(new cMenuEditIntItem(*cString::sprintf("%s%s", *indent, tr("Number of Channels to display")), &tmpConfig->channelRows, 3, 12)); Add(new cMenuEditIntItem(*cString::sprintf("%s%s", *indent, tr("Number of Channels to display")), &tmpTvguideConfig->channelRows, 3, 12));
Add(new cMenuEditBoolItem(*cString::sprintf("%s%s", *indent, tr("Display time in EPG Grids")), &tmpTvguideConfig->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)"), &tmpTvguideConfig->headerHeightPercent, 10, 50));
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)"), &tmpTvguideConfig->footerHeightPercent, 3, 20));
Add(new cMenuEditIntItem(tr("Height of Footer (Perc. of osd height)"), &tmpConfig->footerHeightPercent, 3, 20));
Add(new cMenuEditBoolItem(tr("Display status header"), &tmpConfig->displayStatusHeader)); Add(new cMenuEditBoolItem(tr("Display status header"), &tmpTvguideConfig->displayStatusHeader));
if (tmpConfig->displayStatusHeader) { if (tmpTvguideConfig->displayStatusHeader) {
Add(new cMenuEditBoolItem(*cString::sprintf("%s%s", *indent, tr("Scale video to upper right corner")), &tmpConfig->scaleVideo)); Add(new cMenuEditBoolItem(*cString::sprintf("%s%s", *indent, tr("Scale video to upper right corner")), &tmpTvguideConfig->scaleVideo));
Add(new cMenuEditBoolItem(*cString::sprintf("%s%s", *indent, tr("Rounded corners around video frame")), &tmpConfig->decorateVideo)); Add(new cMenuEditBoolItem(*cString::sprintf("%s%s", *indent, tr("Rounded corners around video frame")), &tmpTvguideConfig->decorateVideo));
} }
Add(new cMenuEditBoolItem(tr("Display Channel Names in Header"), &tmpConfig->displayChannelName)); Add(new cMenuEditBoolItem(tr("Display Channel Names in Header"), &tmpTvguideConfig->displayChannelName));
Add(new cMenuEditBoolItem(tr("Display channel groups"), &tmpConfig->displayChannelGroups)); Add(new cMenuEditBoolItem(tr("Display channel groups"), &tmpTvguideConfig->displayChannelGroups));
if (tmpConfig->displayChannelGroups) { if (tmpTvguideConfig->displayChannelGroups) {
if (tmpConfig->displayMode == eVertical) { if (tmpTvguideConfig->displayMode == eVertical) {
Add(new cMenuEditIntItem(*cString::sprintf("%s%s", *indent, tr("Height of channel groups (Perc. of osd height)")), &tmpConfig->channelGroupsPercent, 3, 30)); Add(new cMenuEditIntItem(*cString::sprintf("%s%s", *indent, tr("Height of channel groups (Perc. of osd height)")), &tmpTvguideConfig->channelGroupsPercent, 3, 30));
} else if (tmpConfig->displayMode == eHorizontal) { } else if (tmpTvguideConfig->displayMode == eHorizontal) {
Add(new cMenuEditIntItem(*cString::sprintf("%s%s", *indent, tr("Width of channel groups (Perc. of osd width)")), &tmpConfig->channelGroupsPercent, 3, 30)); Add(new cMenuEditIntItem(*cString::sprintf("%s%s", *indent, tr("Width of channel groups (Perc. of osd width)")), &tmpTvguideConfig->channelGroupsPercent, 3, 30));
} }
} }
Add(new cMenuEditBoolItem(tr("Display current time baseline"), &tmpConfig->displayTimeBase)); Add(new cMenuEditBoolItem(tr("Display current time baseline"), &tmpTvguideConfig->displayTimeBase));
Add(new cMenuEditStraItem(tr("Show Channel Logos"), &tmpConfig->hideChannelLogos, 2, hideChannelLogosItems)); Add(new cMenuEditStraItem(tr("Show Channel Logos"), &tmpTvguideConfig->hideChannelLogos, 2, hideChannelLogosItems));
if (!tmpConfig->hideChannelLogos) { if (!tmpTvguideConfig->hideChannelLogos) {
Add(InfoItem(tr("Logo Path used"), *config.logoPath)); Add(InfoItem(tr("Logo Path used"), *tvguideConfig.logoPath));
Add(new cMenuEditStraItem(*cString::sprintf("%s%s", *indent, tr("Logo Extension")), &tmpConfig->logoExtension, 2, logoExtensionItems)); Add(new cMenuEditStraItem(*cString::sprintf("%s%s", *indent, tr("Logo Extension")), &tmpTvguideConfig->logoExtension, 2, logoExtensionItems));
Add(new cMenuEditIntItem(*cString::sprintf("%s%s", *indent, tr("Logo width ratio")), &tmpConfig->logoWidthRatio, 1, 1000)); Add(new cMenuEditIntItem(*cString::sprintf("%s%s", *indent, tr("Logo width ratio")), &tmpTvguideConfig->logoWidthRatio, 1, 1000));
Add(new cMenuEditIntItem(*cString::sprintf("%s%s", *indent, tr("Logo height ratio")), &tmpConfig->logoHeightRatio, 1, 1000)); Add(new cMenuEditIntItem(*cString::sprintf("%s%s", *indent, tr("Logo height ratio")), &tmpTvguideConfig->logoHeightRatio, 1, 1000));
} }
Add(new cMenuEditIntItem(tr("Text Border in Detailed View (pixel)"), &tmpConfig->epgViewBorder, 0, 300)); Add(new cMenuEditIntItem(tr("Text Border in Detailed View (pixel)"), &tmpTvguideConfig->epgViewBorder, 0, 300));
Add(new cMenuEditStraItem(tr("Show EPG Images"), &tmpConfig->hideEpgImages, 2, hideChannelLogosItems)); Add(new cMenuEditStraItem(tr("Show EPG Images"), &tmpTvguideConfig->hideEpgImages, 2, hideChannelLogosItems));
if (!tmpConfig->hideEpgImages) { if (!tmpTvguideConfig->hideEpgImages) {
Add(InfoItem(tr("EPG Images Path used"), *config.epgImagePath)); Add(InfoItem(tr("EPG Images Path used"), *tvguideConfig.epgImagePath));
Add(new cMenuEditIntItem(*cString::sprintf("%s%s", *indent, tr("EPG Image width")), &tmpConfig->epgImageWidth, 0, 800)); Add(new cMenuEditIntItem(*cString::sprintf("%s%s", *indent, tr("EPG Image width")), &tmpTvguideConfig->epgImageWidth, 0, 800));
Add(new cMenuEditIntItem(*cString::sprintf("%s%s", *indent, tr("EPG Image height")), &tmpConfig->epgImageHeight, 0, 800)); Add(new cMenuEditIntItem(*cString::sprintf("%s%s", *indent, tr("EPG Image height")), &tmpTvguideConfig->epgImageHeight, 0, 800));
Add(new cMenuEditIntItem(*cString::sprintf("%s%s", *indent, tr("Number of additional EPG Images")), &tmpConfig->numAdditionalEPGPictures, 0, 20)); Add(new cMenuEditIntItem(*cString::sprintf("%s%s", *indent, tr("Number of additional EPG Images")), &tmpTvguideConfig->numAdditionalEPGPictures, 0, 20));
Add(new cMenuEditIntItem(*cString::sprintf("%s%s", *indent, tr("Additional EPG Image width")), &tmpConfig->epgImageWidthLarge, 1, 800)); Add(new cMenuEditIntItem(*cString::sprintf("%s%s", *indent, tr("Additional EPG Image width")), &tmpTvguideConfig->epgImageWidthLarge, 1, 800));
Add(new cMenuEditIntItem(*cString::sprintf("%s%s", *indent, tr("Additional EPG Image height")), &tmpConfig->epgImageHeightLarge, 0, 800)); Add(new cMenuEditIntItem(*cString::sprintf("%s%s", *indent, tr("Additional EPG Image height")), &tmpTvguideConfig->epgImageHeightLarge, 0, 800));
} }
SetCurrent(Get(currentItem)); SetCurrent(Get(currentItem));
@ -333,20 +322,20 @@ void cMenuSetupScreenLayout::Set(void) {
} }
eOSState cMenuSetupScreenLayout::ProcessKey(eKeys Key) { eOSState cMenuSetupScreenLayout::ProcessKey(eKeys Key) {
int olddisplayMode = tmpConfig->displayMode; int olddisplayMode = tmpTvguideConfig->displayMode;
bool olddisplayStatusHeader = tmpConfig->displayStatusHeader; bool olddisplayStatusHeader = tmpTvguideConfig->displayStatusHeader;
bool olddisplayChannelGroups = tmpConfig->displayChannelGroups; bool olddisplayChannelGroups = tmpTvguideConfig->displayChannelGroups;
int oldhideChannelLogos = tmpConfig->hideChannelLogos; int oldhideChannelLogos = tmpTvguideConfig->hideChannelLogos;
int oldhideEpgImages = tmpConfig->hideEpgImages; int oldhideEpgImages = tmpTvguideConfig->hideEpgImages;
eOSState state = cOsdMenu::ProcessKey(Key); eOSState state = cOsdMenu::ProcessKey(Key);
if (Key == kOk) { if (Key == kOk) {
state = osBack; state = osBack;
} else if (Key != kNone) { } else if (Key != kNone) {
if (tmpConfig->displayMode != olddisplayMode || if (tmpTvguideConfig->displayMode != olddisplayMode ||
tmpConfig->displayStatusHeader != olddisplayStatusHeader || tmpTvguideConfig->displayStatusHeader != olddisplayStatusHeader ||
tmpConfig->displayChannelGroups != olddisplayChannelGroups || tmpTvguideConfig->displayChannelGroups != olddisplayChannelGroups ||
tmpConfig->hideChannelLogos != oldhideChannelLogos || tmpTvguideConfig->hideChannelLogos != oldhideChannelLogos ||
tmpConfig->hideEpgImages != oldhideEpgImages) { tmpTvguideConfig->hideEpgImages != oldhideEpgImages) {
Set(); Set();
} }
} }
@ -355,9 +344,9 @@ eOSState cMenuSetupScreenLayout::ProcessKey(eKeys Key) {
//-----Fonts and Fontsizes ------------------------------------------------------------------------------------------------------- //-----Fonts and Fontsizes -------------------------------------------------------------------------------------------------------
cMenuSetupFont::cMenuSetupFont(cTVGuideConfig* data) : cMenuSetupSubMenu(tr("Fonts and Fontsizes"), data) { cMenuSetupFont::cMenuSetupFont(cTvguideConfig* data) : cMenuSetupSubMenu(tr("Fonts and Fontsizes"), data) {
cFont::GetAvailableFontNames(&fontNames); cFont::GetAvailableFontNames(&fontNames);
fontNames.Insert(strdup(config.fontNameDefault)); fontNames.Insert(strdup(tvguideConfig.fontNameDefault));
Set(); Set();
} }
@ -365,37 +354,37 @@ void cMenuSetupFont::Set(void) {
int currentItem = Current(); int currentItem = Current();
Clear(); Clear();
Add(new cMenuEditStraItem(tr("Font"), &tmpConfig->fontIndex, fontNames.Size(), &fontNames[0])); Add(new cMenuEditStraItem(tr("Font"), &tmpTvguideConfig->fontIndex, fontNames.Size(), &fontNames[0]));
Add(new cMenuEditIntItem(tr("Status Header Font Size"), &tmpConfig->FontStatusHeaderDelta, -30, 30)); Add(new cMenuEditIntItem(tr("Status Header Font Size"), &tmpTvguideConfig->FontStatusHeaderDelta, -30, 30));
Add(new cMenuEditIntItem(tr("Status Header Large Font Size"), &tmpConfig->FontStatusHeaderLargeDelta, -30, 30)); Add(new cMenuEditIntItem(tr("Status Header Large Font Size"), &tmpTvguideConfig->FontStatusHeaderLargeDelta, -30, 30));
Add(new cMenuEditIntItem(tr("Detail EPG View Font Size"), &tmpConfig->FontDetailViewDelta, -30, 30)); Add(new cMenuEditIntItem(tr("Detail EPG View Font Size"), &tmpTvguideConfig->FontDetailViewDelta, -30, 30));
Add(new cMenuEditIntItem(tr("Detail EPG View Header Font Size"), &tmpConfig->FontDetailHeaderDelta, -30, 30)); Add(new cMenuEditIntItem(tr("Detail EPG View Header Font Size"), &tmpTvguideConfig->FontDetailHeaderDelta, -30, 30));
Add(new cMenuEditIntItem(tr("Message Font Size"), &tmpConfig->FontMessageBoxDelta, -30, 30)); Add(new cMenuEditIntItem(tr("Message Font Size"), &tmpTvguideConfig->FontMessageBoxDelta, -30, 30));
Add(new cMenuEditIntItem(tr("Message Large Font Size"), &tmpConfig->FontMessageBoxLargeDelta, -30, 30)); Add(new cMenuEditIntItem(tr("Message Large Font Size"), &tmpTvguideConfig->FontMessageBoxLargeDelta, -30, 30));
Add(new cMenuEditIntItem(tr("Button Font Size"), &tmpConfig->FontButtonDelta, -30, 30)); Add(new cMenuEditIntItem(tr("Button Font Size"), &tmpTvguideConfig->FontButtonDelta, -30, 30));
if (tmpConfig->displayMode == eVertical) { if (tmpTvguideConfig->displayMode == eVertical) {
Add(new cMenuEditIntItem(tr("Channel Header Font Size"), &tmpConfig->FontChannelHeaderDelta, -30, 30)); Add(new cMenuEditIntItem(tr("Channel Header Font Size"), &tmpTvguideConfig->FontChannelHeaderDelta, -30, 30));
Add(new cMenuEditIntItem(tr("Channel Groups Font Size"), &tmpConfig->FontChannelGroupsDelta, -30, 30)); Add(new cMenuEditIntItem(tr("Channel Groups Font Size"), &tmpTvguideConfig->FontChannelGroupsDelta, -30, 30));
Add(new cMenuEditIntItem(tr("Grid Font Size"), &tmpConfig->FontGridDelta, -30, 30)); Add(new cMenuEditIntItem(tr("Grid Font Size"), &tmpTvguideConfig->FontGridDelta, -30, 30));
Add(new cMenuEditIntItem(tr("Grid Font Small Size"), &tmpConfig->FontGridSmallDelta, -30, 30)); Add(new cMenuEditIntItem(tr("Grid Font Small Size"), &tmpTvguideConfig->FontGridSmallDelta, -30, 30));
Add(new cMenuEditIntItem(tr("Timeline Weekday Font Size"), &tmpConfig->FontTimeLineWeekdayDelta, -30, 30)); Add(new cMenuEditIntItem(tr("Timeline Weekday Font Size"), &tmpTvguideConfig->FontTimeLineWeekdayDelta, -30, 30));
Add(new cMenuEditIntItem(tr("Timeline Date Font Size"), &tmpConfig->FontTimeLineDateDelta, -30, 30)); Add(new cMenuEditIntItem(tr("Timeline Date Font Size"), &tmpTvguideConfig->FontTimeLineDateDelta, -30, 30));
Add(new cMenuEditIntItem(tr("Timeline Time Font Size"), &tmpConfig->FontTimeLineTimeDelta, -30, 30)); Add(new cMenuEditIntItem(tr("Timeline Time Font Size"), &tmpTvguideConfig->FontTimeLineTimeDelta, -30, 30));
} else if (tmpConfig->displayMode == eHorizontal) { } else if (tmpTvguideConfig->displayMode == eHorizontal) {
Add(new cMenuEditIntItem(tr("Channel Header Font Size"), &tmpConfig->FontChannelHeaderHorizontalDelta, -30, 30)); Add(new cMenuEditIntItem(tr("Channel Header Font Size"), &tmpTvguideConfig->FontChannelHeaderHorizontalDelta, -30, 30));
Add(new cMenuEditIntItem(tr("Channel Groups Font Size"), &tmpConfig->FontChannelGroupsHorizontalDelta, -30, 30)); Add(new cMenuEditIntItem(tr("Channel Groups Font Size"), &tmpTvguideConfig->FontChannelGroupsHorizontalDelta, -30, 30));
Add(new cMenuEditIntItem(tr("Grid Font Size"), &tmpConfig->FontGridHorizontalDelta, -30, 30)); Add(new cMenuEditIntItem(tr("Grid Font Size"), &tmpTvguideConfig->FontGridHorizontalDelta, -30, 30));
Add(new cMenuEditIntItem(tr("Grid Font Small Size"), &tmpConfig->FontGridHorizontalSmallDelta, -30, 30)); Add(new cMenuEditIntItem(tr("Grid Font Small Size"), &tmpTvguideConfig->FontGridHorizontalSmallDelta, -30, 30));
Add(new cMenuEditIntItem(tr("Timeline Date Font Size"), &tmpConfig->FontTimeLineDateHorizontalDelta, -30, 30)); Add(new cMenuEditIntItem(tr("Timeline Date Font Size"), &tmpTvguideConfig->FontTimeLineDateHorizontalDelta, -30, 30));
Add(new cMenuEditIntItem(tr("Timeline Time Font Size"), &tmpConfig->FontTimeLineTimeHorizontalDelta, -30, 30)); Add(new cMenuEditIntItem(tr("Timeline Time Font Size"), &tmpTvguideConfig->FontTimeLineTimeHorizontalDelta, -30, 30));
} }
Add(new cMenuEditIntItem(tr("Search & Recording Menu Font Size"), &tmpConfig->FontRecMenuItemDelta, -30, 30)); Add(new cMenuEditIntItem(tr("Search & Recording Menu Font Size"), &tmpTvguideConfig->FontRecMenuItemDelta, -30, 30));
Add(new cMenuEditIntItem(tr("Search & Recording Menu Small Font Size"), &tmpConfig->FontRecMenuItemSmallDelta, -30, 30)); Add(new cMenuEditIntItem(tr("Search & Recording Menu Small Font Size"), &tmpTvguideConfig->FontRecMenuItemSmallDelta, -30, 30));
Add(new cMenuEditIntItem(tr("Search & Recording Menu Header Font Size"), &tmpConfig->FontRecMenuItemLargeDelta, -30, 30)); Add(new cMenuEditIntItem(tr("Search & Recording Menu Header Font Size"), &tmpTvguideConfig->FontRecMenuItemLargeDelta, -30, 30));
SetCurrent(Get(currentItem)); SetCurrent(Get(currentItem));
Display(); Display();
@ -403,7 +392,7 @@ void cMenuSetupFont::Set(void) {
//----- Recording Menus and Favorites ------------------------------------------------------------------------------------------------------- //----- Recording Menus and Favorites -------------------------------------------------------------------------------------------------------
cMenuSetupFavorites::cMenuSetupFavorites(cTVGuideConfig* data) : cMenuSetupSubMenu(tr("Recording Menus and Favorites"), data) { cMenuSetupFavorites::cMenuSetupFavorites(cTvguideConfig* data) : cMenuSetupSubMenu(tr("Recording Menus and Favorites"), data) {
strn0cpy(description1, data->descUser1.c_str(), sizeof(description1)); strn0cpy(description1, data->descUser1.c_str(), sizeof(description1));
strn0cpy(description2, data->descUser2.c_str(), sizeof(description2)); strn0cpy(description2, data->descUser2.c_str(), sizeof(description2));
strn0cpy(description3, data->descUser3.c_str(), sizeof(description3)); strn0cpy(description3, data->descUser3.c_str(), sizeof(description3));
@ -412,9 +401,6 @@ cMenuSetupFavorites::cMenuSetupFavorites(cTVGuideConfig* data) : cMenuSetupSubM
recFolderMode[1] = tr("Select from folder list"); recFolderMode[1] = tr("Select from folder list");
recFolderMode[2] = tr("Use fixed folder"); recFolderMode[2] = tr("Use fixed folder");
strn0cpy(fixedFolder, data->instRecFixedFolder.c_str(), sizeof(fixedFolder)); 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[0] = (tr("switch"));
switchModeItems[1] = (tr("announce only")); switchModeItems[1] = (tr("announce only"));
switchModeItems[2] = (tr("ask for switch")); switchModeItems[2] = (tr("ask for switch"));
@ -425,47 +411,44 @@ void cMenuSetupFavorites::Set(void) {
int currentItem = Current(); int currentItem = Current();
Clear(); Clear();
Add(new cOsdItem(tr("Instant recording:"), osUnknown, false)); Add(new cMenuEditStraItem(tr("Folder for instant Recordings"), &tmpTvguideConfig->instRecFolderMode, 3, recFolderMode));
Add(new cMenuEditStraItem(tr("Folder for instant Recordings"), &tmpConfig->instRecFolderMode, 3, recFolderMode)); if (tmpTvguideConfig->instRecFolderMode == eFolderFixed) {
if (tmpConfig->instRecFolderMode == eFolderFixed) {
Add(new cMenuEditStrItem(cString::sprintf("%s%s", *indent, tr("Folder")), fixedFolder, sizeof(fixedFolder), trVDR(FileNameChars))); 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) if (pRemoteTimers)
Add(new cMenuEditBoolItem(tr("Use Remotetimers"), &tmpConfig->useRemoteTimers)); Add(new cMenuEditBoolItem(tr("Use Remotetimers"), &tmpTvguideConfig->useRemoteTimers));
Add(new cMenuEditBoolItem(tr("Show timer confirmation messages"), &tmpConfig->timerMessage));
Add(new cOsdItem(tr("Favorites:"), osUnknown, false)); Add(new cMenuEditBoolItem(tr("Limit channels in favorites"), &tmpTvguideConfig->favLimitChannels));
Add(new cMenuEditBoolItem(tr("Limit channels in favorites"), &tmpConfig->favLimitChannels)); if (tmpTvguideConfig->favLimitChannels) {
if (tmpConfig->favLimitChannels) { Add(new cMenuEditChanItem(tr("Start Channel"), &tmpTvguideConfig->favStartChannel));
Add(new cMenuEditChanItem(tr("Start Channel"), &tmpConfig->favStartChannel)); Add(new cMenuEditChanItem(tr("Stop Channel"), &tmpTvguideConfig->favStopChannel));
Add(new cMenuEditChanItem(tr("Stop Channel"), &tmpConfig->favStopChannel));
} }
Add(new cMenuEditBoolItem(tr("Use \"What's on now\" in favorites"), &tmpConfig->favWhatsOnNow)); Add(new cMenuEditBoolItem(tr("Use \"What's on now\" in favorites"), &tmpTvguideConfig->favWhatsOnNow));
Add(new cMenuEditBoolItem(tr("Use \"What's on next\" in favorites"), &tmpConfig->favWhatsOnNext)); Add(new cMenuEditBoolItem(tr("Use \"What's on next\" in favorites"), &tmpTvguideConfig->favWhatsOnNext));
Add(new cOsdItem(tr("User defined times in favorites:"), osUnknown, false)); Add(new cOsdItem(tr("User defined times in favorites:"), osUnknown, false));
Add(new cMenuEditBoolItem(tr("Use user defined time 1"), &tmpConfig->favUseTime1)); Add(new cMenuEditBoolItem(tr("Use user defined time 1"), &tmpTvguideConfig->favUseTime1));
if (tmpConfig->favUseTime1) { if (tmpTvguideConfig->favUseTime1) {
Add(new cMenuEditStrItem(cString::sprintf("%s%s", *indent, tr("Description")), description1, sizeof(description1), trVDR(FileNameChars))); Add(new cMenuEditStrItem(cString::sprintf("%s%s", *indent, tr("Description")), description1, sizeof(description1), trVDR(FileNameChars)));
Add(new cMenuEditTimeItem(cString::sprintf("%s%s", *indent, tr("Time")), &tmpConfig->favTime1)); Add(new cMenuEditTimeItem(cString::sprintf("%s%s", *indent, tr("Time")), &tmpTvguideConfig->favTime1));
} }
Add(new cMenuEditBoolItem(tr("Use user defined time 2"), &tmpConfig->favUseTime2)); Add(new cMenuEditBoolItem(tr("Use user defined time 2"), &tmpTvguideConfig->favUseTime2));
if (tmpConfig->favUseTime2) { if (tmpTvguideConfig->favUseTime2) {
Add(new cMenuEditStrItem(cString::sprintf("%s%s", *indent, tr("Description")), description2, sizeof(description2), trVDR(FileNameChars))); Add(new cMenuEditStrItem(cString::sprintf("%s%s", *indent, tr("Description")), description2, sizeof(description2), trVDR(FileNameChars)));
Add(new cMenuEditTimeItem(cString::sprintf("%s%s", *indent, tr("Time")), &tmpConfig->favTime2)); Add(new cMenuEditTimeItem(cString::sprintf("%s%s", *indent, tr("Time")), &tmpTvguideConfig->favTime2));
} }
Add(new cMenuEditBoolItem(tr("Use user defined time 3"), &tmpConfig->favUseTime3)); Add(new cMenuEditBoolItem(tr("Use user defined time 3"), &tmpTvguideConfig->favUseTime3));
if (tmpConfig->favUseTime3) { if (tmpTvguideConfig->favUseTime3) {
Add(new cMenuEditStrItem(cString::sprintf("%s%s", *indent, tr("Description")), description3, sizeof(description3), trVDR(FileNameChars))); Add(new cMenuEditStrItem(cString::sprintf("%s%s", *indent, tr("Description")), description3, sizeof(description3), trVDR(FileNameChars)));
Add(new cMenuEditTimeItem(cString::sprintf("%s%s", *indent, tr("Time")), &tmpConfig->favTime3)); Add(new cMenuEditTimeItem(cString::sprintf("%s%s", *indent, tr("Time")), &tmpTvguideConfig->favTime3));
} }
Add(new cMenuEditBoolItem(tr("Use user defined time 4"), &tmpConfig->favUseTime4)); Add(new cMenuEditBoolItem(tr("Use user defined time 4"), &tmpTvguideConfig->favUseTime4));
if (tmpConfig->favUseTime4) { if (tmpTvguideConfig->favUseTime4) {
Add(new cMenuEditStrItem(cString::sprintf("%s%s", *indent, tr("Description")), description4, sizeof(description4), trVDR(FileNameChars))); Add(new cMenuEditStrItem(cString::sprintf("%s%s", *indent, tr("Description")), description4, sizeof(description4), trVDR(FileNameChars)));
Add(new cMenuEditTimeItem(cString::sprintf("%s%s", *indent, tr("Time")), &tmpConfig->favTime4)); Add(new cMenuEditTimeItem(cString::sprintf("%s%s", *indent, tr("Time")), &tmpTvguideConfig->favTime4));
} }
Add(new cOsdItem(tr("Switchtimer:"), osUnknown, false)); Add(new cOsdItem(tr("Switchtimer:"), osUnknown, false));
Add(new cMenuEditStraItem(tr("Switch Mode"), &tmpConfig->switchMode, 3, switchModeItems)); Add(new cMenuEditStraItem(tr("Switch Mode"), &tmpTvguideConfig->switchMode, 3, switchModeItems));
Add(new cMenuEditIntItem(tr("Switch (x)min before start of the show"), &tmpConfig->switchMinsBefore, 0, 10)); Add(new cMenuEditIntItem(tr("Switch (x)min before start of the show"), &tmpTvguideConfig->switchMinsBefore, 0, 10));
SetCurrent(Get(currentItem)); SetCurrent(Get(currentItem));
@ -474,21 +457,21 @@ void cMenuSetupFavorites::Set(void) {
eOSState cMenuSetupFavorites::ProcessKey(eKeys Key) { eOSState cMenuSetupFavorites::ProcessKey(eKeys Key) {
int tmpFavUseTime1 = tmpConfig->favUseTime1; int tmpFavUseTime1 = tmpTvguideConfig->favUseTime1;
int tmpFavUseTime2 = tmpConfig->favUseTime2; int tmpFavUseTime2 = tmpTvguideConfig->favUseTime2;
int tmpFavUseTime3 = tmpConfig->favUseTime3; int tmpFavUseTime3 = tmpTvguideConfig->favUseTime3;
int tmpFavUseTime4 = tmpConfig->favUseTime4; int tmpFavUseTime4 = tmpTvguideConfig->favUseTime4;
int tmpFavLimitChannels = tmpConfig->favLimitChannels; int tmpFavLimitChannels = tmpTvguideConfig->favLimitChannels;
int tmpFolderMode = tmpConfig->instRecFolderMode; int tmpFolderMode = tmpTvguideConfig->instRecFolderMode;
eOSState state = cOsdMenu::ProcessKey(Key); eOSState state = cOsdMenu::ProcessKey(Key);
if ((tmpFavUseTime1 != tmpConfig->favUseTime1) || if ((tmpFavUseTime1 != tmpTvguideConfig->favUseTime1) ||
(tmpFavUseTime2 != tmpConfig->favUseTime2) || (tmpFavUseTime2 != tmpTvguideConfig->favUseTime2) ||
(tmpFavUseTime3 != tmpConfig->favUseTime3) || (tmpFavUseTime3 != tmpTvguideConfig->favUseTime3) ||
(tmpFavUseTime4 != tmpConfig->favUseTime4) || (tmpFavUseTime4 != tmpTvguideConfig->favUseTime4) ||
(tmpFavLimitChannels != tmpConfig->favLimitChannels) || (tmpFavLimitChannels != tmpTvguideConfig->favLimitChannels) ||
(tmpFolderMode != tmpConfig->instRecFolderMode) ) { (tmpFolderMode != tmpTvguideConfig->instRecFolderMode) ) {
Set(); Set();
Display(); Display();
} }
@ -496,10 +479,10 @@ eOSState cMenuSetupFavorites::ProcessKey(eKeys Key) {
if (state == osUnknown) { if (state == osUnknown) {
switch (Key) { switch (Key) {
case kOk: { case kOk: {
tmpConfig->descUser1 = cString::sprintf("%s", description1); tmpTvguideConfig->descUser1 = cString::sprintf("%s", description1);
tmpConfig->descUser2 = cString::sprintf("%s", description2); tmpTvguideConfig->descUser2 = cString::sprintf("%s", description2);
tmpConfig->descUser3 = cString::sprintf("%s", description3); tmpTvguideConfig->descUser3 = cString::sprintf("%s", description3);
tmpConfig->descUser4 = cString::sprintf("%s", description4); tmpTvguideConfig->descUser4 = cString::sprintf("%s", description4);
return osBack; } return osBack; }
default: default:
break; break;
@ -510,26 +493,26 @@ eOSState cMenuSetupFavorites::ProcessKey(eKeys Key) {
} }
//-----Image Caching------------------------------------------------------------------------------------------------------------- //-----Image Caching-------------------------------------------------------------------------------------------------------------
cMenuSetupImageCache::cMenuSetupImageCache(cTVGuideConfig* data) : cMenuSetupSubMenu(tr("Image Loading and Caching"), data) { cMenuSetupImageCache::cMenuSetupImageCache(cTvguideConfig* data) : cMenuSetupSubMenu(tr("Image Loading and Caching"), data) {
Set(); Set();
} }
void cMenuSetupImageCache::Set(void) { void cMenuSetupImageCache::Set(void) {
int currentItem = Current(); int currentItem = Current();
Clear(); Clear();
Add(new cMenuEditBoolItem(tr("Create Log Messages for image loading"), &tmpConfig->debugImageLoading)); Add(new cMenuEditBoolItem(tr("Create Log Messages for image loading"), &tmpTvguideConfig->debugImageLoading));
Add(new cMenuEditBoolItem(tr("Limit Logo Cache"), &tmpConfig->limitLogoCache)); Add(new cMenuEditBoolItem(tr("Limit Logo Cache"), &tmpTvguideConfig->limitLogoCache));
if (&tmpConfig->limitLogoCache) { if (&tmpTvguideConfig->limitLogoCache) {
Add(new cMenuEditIntItem(cString::sprintf("%s%s", *indent, tr("Maximal number of logos to cache")), &tmpConfig->numLogosMax, 1, 9999)); Add(new cMenuEditIntItem(cString::sprintf("%s%s", *indent, tr("Maximal number of logos to cache")), &tmpTvguideConfig->numLogosMax, 1, 9999));
} }
Add(new cMenuEditIntItem(tr("Number of logos to cache at start"), &tmpConfig->numLogosInitial, 0, 9999)); Add(new cMenuEditIntItem(tr("Number of logos to cache at start"), &tmpTvguideConfig->numLogosInitial, 0, 9999));
Add(InfoItem(tr("Cache Sizes"), "")); Add(InfoItem(tr("Cache Sizes"), ""));
Add(InfoItem(tr("OSD Element Cache"), cString::sprintf("\t%s", (imgCache.GetCacheSize(ctOsdElement)).c_str()))); Add(InfoItem(tr("OSD Element Cache"), (imgCache.GetCacheSize(ctOsdElement)).c_str()));
Add(InfoItem(tr("Logo cache"), cString::sprintf("\t%s", (imgCache.GetCacheSize(ctLogo)).c_str()))); Add(InfoItem(tr("Logo cache"), (imgCache.GetCacheSize(ctLogo)).c_str()));
Add(InfoItem(tr("EPG Grid Cache"), cString::sprintf("\t%s", (imgCache.GetCacheSize(ctGrid)).c_str()))); Add(InfoItem(tr("EPG Grid Cache"), (imgCache.GetCacheSize(ctGrid)).c_str()));
Add(InfoItem(tr("Channel Groups Cache"), cString::sprintf("\t%s", (imgCache.GetCacheSize(ctChannelGroup)).c_str()))); Add(InfoItem(tr("Channel Groups Cache"), (imgCache.GetCacheSize(ctChannelGroup)).c_str()));
Add(InfoItem(tr("Recording Menus Icon Cache"), cString::sprintf("\t%s", (imgCache.GetCacheSize(ctIcon)).c_str()))); Add(InfoItem(tr("Recording Menus Icon Cache"), (imgCache.GetCacheSize(ctIcon)).c_str()));
SetCurrent(Get(currentItem)); SetCurrent(Get(currentItem));
Display(); Display();

19
setup.h
View File

@ -4,14 +4,12 @@
#include <vdr/menuitems.h> #include <vdr/menuitems.h>
#include "config.h" #include "config.h"
extern cTVGuideConfig config;
class cTvguideSetup : public cMenuSetupPage { class cTvguideSetup : public cMenuSetupPage {
public: public:
cTvguideSetup(void); cTvguideSetup(void);
virtual ~cTvguideSetup(); virtual ~cTvguideSetup();
private: private:
cTVGuideConfig tmpConfig; cTvguideConfig tmpTvguideConfig;
void Setup(void); void Setup(void);
protected: protected:
virtual eOSState ProcessKey(eKeys Key); virtual eOSState ProcessKey(eKeys Key);
@ -21,13 +19,13 @@ class cTvguideSetup : public cMenuSetupPage {
class cMenuSetupSubMenu : public cOsdMenu { class cMenuSetupSubMenu : public cOsdMenu {
protected: protected:
cTVGuideConfig *tmpConfig; cTvguideConfig *tmpTvguideConfig;
virtual eOSState ProcessKey(eKeys Key); virtual eOSState ProcessKey(eKeys Key);
virtual void Set(void) = 0; virtual void Set(void) = 0;
cOsdItem *InfoItem(const char *label, const char *value); cOsdItem *InfoItem(const char *label, const char *value);
cString indent; cString indent;
public: public:
cMenuSetupSubMenu(const char *Title, cTVGuideConfig *data); cMenuSetupSubMenu(const char *Title, cTvguideConfig *data);
}; };
class cMenuSetupGeneral : public cMenuSetupSubMenu { class cMenuSetupGeneral : public cMenuSetupSubMenu {
@ -41,7 +39,7 @@ class cMenuSetupGeneral : public cMenuSetupSubMenu {
const char *useSubtitleRerunTexts[3]; const char *useSubtitleRerunTexts[3];
void Set(void); void Set(void);
public: public:
cMenuSetupGeneral(cTVGuideConfig *data); cMenuSetupGeneral(cTvguideConfig *data);
}; };
class cMenuSetupScreenLayout : public cMenuSetupSubMenu { class cMenuSetupScreenLayout : public cMenuSetupSubMenu {
@ -52,7 +50,7 @@ class cMenuSetupScreenLayout : public cMenuSetupSubMenu {
const char * logoExtensionItems[2]; const char * logoExtensionItems[2];
void Set(void); void Set(void);
public: public:
cMenuSetupScreenLayout(cTVGuideConfig *data); cMenuSetupScreenLayout(cTvguideConfig *data);
}; };
class cMenuSetupFont : public cMenuSetupSubMenu { class cMenuSetupFont : public cMenuSetupSubMenu {
@ -60,7 +58,7 @@ class cMenuSetupFont : public cMenuSetupSubMenu {
cStringList fontNames; cStringList fontNames;
void Set(void); void Set(void);
public: public:
cMenuSetupFont(cTVGuideConfig *data); cMenuSetupFont(cTvguideConfig *data);
}; };
class cMenuSetupFavorites : public cMenuSetupSubMenu { class cMenuSetupFavorites : public cMenuSetupSubMenu {
@ -70,20 +68,19 @@ class cMenuSetupFavorites : public cMenuSetupSubMenu {
char description3[256]; char description3[256];
char description4[256]; char description4[256];
const char * recFolderMode[3]; const char * recFolderMode[3];
const char * addSubtitleMode[3];
const char * switchModeItems[3]; const char * switchModeItems[3];
char fixedFolder[256]; char fixedFolder[256];
void Set(void); void Set(void);
virtual eOSState ProcessKey(eKeys Key); virtual eOSState ProcessKey(eKeys Key);
public: public:
cMenuSetupFavorites(cTVGuideConfig *data); cMenuSetupFavorites(cTvguideConfig *data);
}; };
class cMenuSetupImageCache : public cMenuSetupSubMenu { class cMenuSetupImageCache : public cMenuSetupSubMenu {
protected: protected:
void Set(void); void Set(void);
public: public:
cMenuSetupImageCache(cTVGuideConfig *data); cMenuSetupImageCache(cTvguideConfig *data);
}; };
#endif //__TVGUIDE_SETUP_H #endif //__TVGUIDE_SETUP_H

View File

@ -1,143 +1,143 @@
#include "tools.h" #include "tools.h"
#include "services/scraper2vdr.h" #include "services/scraper2vdr.h"
#include "imageloader.h" #include "imageloader.h"
#include "statusheader.h" #include "statusheader.h"
cStatusHeader::cStatusHeader(void) { cStatusHeader::cStatusHeader(void) {
color = theme.Color(clrStatusHeader); color = theme.Color(clrStatusHeader);
colorBlending = theme.Color(clrStatusHeaderBlending); colorBlending = theme.Color(clrStatusHeaderBlending);
height = geoManager.statusHeaderHeight; height = geoManager.statusHeaderHeight;
width = geoManager.headerContentWidth; width = geoManager.headerContentWidth;
tvFrameWidth = geoManager.tvFrameWidth; tvFrameWidth = geoManager.tvFrameWidth;
pixmap = osdManager.CreatePixmap(1, cRect(0, 0, width, height)); pixmap = osdManager.requestPixmap(1, cRect(0, 0, width, height));
pixmapText = osdManager.CreatePixmap(2, cRect(0, 0, width, height)); pixmapText = osdManager.requestPixmap(2, cRect(0, 0, width, height));
pixmapTVFrame = osdManager.CreatePixmap(1, cRect(width, 0, tvFrameWidth, height)); pixmapTVFrame = osdManager.requestPixmap(1, cRect(width, 0, tvFrameWidth, height));
} }
cStatusHeader::~cStatusHeader(void) { cStatusHeader::~cStatusHeader(void) {
osdManager.DestroyPixmap(pixmapText); osdManager.releasePixmap(pixmapText);
osdManager.DestroyPixmap(pixmapTVFrame); osdManager.releasePixmap(pixmapTVFrame);
if (config.scaleVideo) { if (tvguideConfig.scaleVideo) {
cRect vidWin = cDevice::PrimaryDevice()->CanScaleVideo(cRect::Null); cRect vidWin = cDevice::PrimaryDevice()->CanScaleVideo(cRect::Null);
cDevice::PrimaryDevice()->ScaleVideo(vidWin); cDevice::PrimaryDevice()->ScaleVideo(vidWin);
} }
} }
void cStatusHeader::Draw(void) { void cStatusHeader::Draw(void) {
pixmapText->Fill(clrTransparent); pixmapText->Fill(clrTransparent);
pixmapTVFrame->Fill(clrTransparent); pixmapTVFrame->Fill(clrTransparent);
if (config.style == eStyleGraphical) { if (tvguideConfig.style == eStyleGraphical) {
if (config.scaleVideo) { if (tvguideConfig.scaleVideo) {
drawBackgroundGraphical(bgStatusHeaderWindowed); drawBackgroundGraphical(bgStatusHeaderWindowed);
cImage *tvFrameBack = imgCache.GetOsdElement(oeStatusHeaderTVFrame); cImage *tvFrameBack = imgCache.GetOsdElement(oeStatusHeaderTVFrame);
if (tvFrameBack) if (tvFrameBack)
pixmapTVFrame->DrawImage(cPoint(0,0), *tvFrameBack); pixmapTVFrame->DrawImage(cPoint(0,0), *tvFrameBack);
} else { } else {
drawBackgroundGraphical(bgStatusHeaderFull); drawBackgroundGraphical(bgStatusHeaderFull);
} }
} else { } else {
if (config.decorateVideo) { if (tvguideConfig.decorateVideo) {
DecorateVideoFrame(); DecorateVideoFrame();
} }
drawBackground(); drawBackground();
drawBorder(); drawBorder();
} }
} }
void cStatusHeader::ScaleVideo(void) { void cStatusHeader::ScaleVideo(void) {
if (config.scaleVideo) { if (tvguideConfig.scaleVideo) {
int width = height * 16 / 9; int width = height * 16 / 9;
int x = osdManager.Left() + geoManager.osdWidth - width; int x = osdManager.Left() + geoManager.osdWidth - width;
int y = osdManager.Top(); int y = osdManager.Top();
cRect availableRect(x, y, width, height); cRect availableRect(x, y, width, height);
cRect vidWin = cDevice::PrimaryDevice()->CanScaleVideo(availableRect); cRect vidWin = cDevice::PrimaryDevice()->CanScaleVideo(availableRect);
cDevice::PrimaryDevice()->ScaleVideo(vidWin); cDevice::PrimaryDevice()->ScaleVideo(vidWin);
} }
} }
void cStatusHeader::DrawInfoText(cGridElement *grid) { void cStatusHeader::DrawInfoText(cGrid *grid) {
int border = 10; int border = 10;
int textWidth = 0; int textWidth = 0;
textWidth = width - 2 * border; textWidth = width - 2 * border;
tColor colorTextBack = (config.style == eStyleFlat)?color:clrTransparent; tColor colorTextBack = (tvguideConfig.style == eStyleFlat)?color:clrTransparent;
pixmapText->Fill(clrTransparent); pixmapText->Fill(clrTransparent);
int x = border; int x = border;
int y = border; int y = border;
if (!grid->IsDummy()) { if (!grid->isDummy()) {
const cEvent *event = grid->GetEvent(); const cEvent *event = grid->GetEvent();
int newX = DrawPoster(event, x, y, height-2*border, border); int newX = DrawPoster(event, x, y, height-2*border, border);
if (newX > 0) { if (newX > 0) {
textWidth -= (newX - x); textWidth -= (newX - x);
x += newX; x += newX;
} }
cString time = grid->getTimeString(); cString time = grid->getTimeString();
cString title(""); cString title("");
title = cString::sprintf(": %s", event->Title()); title = cString::sprintf(": %s", event->Title());
cString header = cString::sprintf("%s%s", *time, *title); cString header = cString::sprintf("%s%s", *time, *title);
header = CutText(*header, textWidth, fontManager.FontStatusHeaderLarge).c_str(); header = CutText(*header, textWidth, fontManager.FontStatusHeaderLarge).c_str();
pixmapText->DrawText(cPoint(x,y), *header, theme.Color(clrFont), colorTextBack, fontManager.FontStatusHeaderLarge); pixmapText->DrawText(cPoint(x,y), *header, theme.Color(clrFont), colorTextBack, fontManager.FontStatusHeaderLarge);
y += fontManager.FontStatusHeaderLarge->Height() + border; y += fontManager.FontStatusHeaderLarge->Height() + border;
int heightText = pixmapText->ViewPort().Height() - y; int heightText = pixmapText->ViewPort().Height() - y;
cTextWrapper description; cTextWrapper description;
description.Set(event->Description(), fontManager.FontStatusHeader, textWidth); description.Set(event->Description(), fontManager.FontStatusHeader, textWidth);
int lineHeight = fontManager.FontStatusHeader->Height(); int lineHeight = fontManager.FontStatusHeader->Height();
int textLines = description.Lines(); int textLines = description.Lines();
int maxLines = heightText / lineHeight; int maxLines = heightText / lineHeight;
int lines = std::min(textLines, maxLines); int lines = std::min(textLines, maxLines);
for (int i = 0; i < lines-1; i++) { for (int i = 0; i < lines-1; i++) {
pixmapText->DrawText(cPoint(x,y), description.GetLine(i), theme.Color(clrFont), colorTextBack, fontManager.FontStatusHeader); pixmapText->DrawText(cPoint(x,y), description.GetLine(i), theme.Color(clrFont), colorTextBack, fontManager.FontStatusHeader);
y += lineHeight; y += lineHeight;
} }
cString lastLine = description.GetLine(lines-1); cString lastLine = description.GetLine(lines-1);
if (textLines > maxLines) { if (textLines > maxLines) {
lastLine = cString::sprintf("%s...", *lastLine); lastLine = cString::sprintf("%s...", *lastLine);
} }
pixmapText->DrawText(cPoint(x,y), *lastLine, theme.Color(clrFont), colorTextBack, fontManager.FontStatusHeader); pixmapText->DrawText(cPoint(x,y), *lastLine, theme.Color(clrFont), colorTextBack, fontManager.FontStatusHeader);
} else { } else {
int heightText = pixmapText->ViewPort().Height() - y; int heightText = pixmapText->ViewPort().Height() - y;
y += (heightText - fontManager.FontStatusHeaderLarge->Height() - 2*border)/2; y += (heightText - fontManager.FontStatusHeaderLarge->Height() - 2*border)/2;
pixmapText->DrawText(cPoint(x,y), *grid->getText(), theme.Color(clrFont), colorTextBack, fontManager.FontStatusHeaderLarge); pixmapText->DrawText(cPoint(x,y), *grid->getText(), theme.Color(clrFont), colorTextBack, fontManager.FontStatusHeaderLarge);
} }
} }
int cStatusHeader::DrawPoster(const cEvent *event, int x, int y, int height, int border) { int cStatusHeader::DrawPoster(const cEvent *event, int x, int y, int height, int border) {
bool hasPoster = false; bool hasPoster = false;
ScraperGetPoster posterScraper2Vdr; ScraperGetPoster posterScraper2Vdr;
int posterWidth = 0; int posterWidth = 0;
int posterHeight = 0; int posterHeight = 0;
static cPlugin *pScraper = GetScraperPlugin(); static cPlugin *pScraper = GetScraperPlugin();
if (pScraper) { if (pScraper) {
posterScraper2Vdr.event = event; posterScraper2Vdr.event = event;
posterScraper2Vdr.recording = NULL; posterScraper2Vdr.recording = NULL;
if (pScraper->Service("GetPoster", &posterScraper2Vdr)) { if (pScraper->Service("GetPoster", &posterScraper2Vdr)) {
hasPoster = true; hasPoster = true;
int posterWidthOrig = posterScraper2Vdr.poster.width; int posterWidthOrig = posterScraper2Vdr.poster.width;
int posterHeightOrig = posterScraper2Vdr.poster.height; int posterHeightOrig = posterScraper2Vdr.poster.height;
posterHeight = height; posterHeight = height;
posterWidth = posterWidthOrig * ((double)posterHeight / (double)posterHeightOrig); posterWidth = posterWidthOrig * ((double)posterHeight / (double)posterHeightOrig);
} else { } else {
hasPoster = false; hasPoster = false;
} }
} }
if (hasPoster) { if (hasPoster) {
cImageLoader imgLoader; cImageLoader imgLoader;
if (imgLoader.LoadPoster(posterScraper2Vdr.poster.path.c_str(), posterWidth, posterHeight)) { if (imgLoader.LoadPoster(posterScraper2Vdr.poster.path.c_str(), posterWidth, posterHeight)) {
pixmapText->DrawImage(cPoint(x, y), imgLoader.GetImage()); pixmapText->DrawImage(cPoint(x, y), imgLoader.GetImage());
return posterWidth + border; return posterWidth + border;
} }
} }
return 0; return 0;
} }
void cStatusHeader::DecorateVideoFrame(void) { void cStatusHeader::DecorateVideoFrame(void) {
int radius = 16; int radius = 16;
int frame = 2; int frame = 2;
pixmapTVFrame->DrawRectangle(cRect(0, 0, tvFrameWidth, frame), theme.Color(clrBackgroundOSD)); pixmapTVFrame->DrawRectangle(cRect(0, 0, tvFrameWidth, frame), theme.Color(clrBackgroundOSD));
pixmapTVFrame->DrawEllipse(cRect(frame,frame,radius,radius), theme.Color(clrBackgroundOSD), -2); pixmapTVFrame->DrawEllipse(cRect(frame,frame,radius,radius), theme.Color(clrBackgroundOSD), -2);
pixmapTVFrame->DrawRectangle(cRect(tvFrameWidth - frame, frame, frame, height - 2*frame), theme.Color(clrBackgroundOSD)); pixmapTVFrame->DrawRectangle(cRect(tvFrameWidth - frame, frame, frame, height - 2*frame), theme.Color(clrBackgroundOSD));
pixmapTVFrame->DrawEllipse(cRect(tvFrameWidth - radius - frame, frame, radius, radius), theme.Color(clrBackgroundOSD), -1); pixmapTVFrame->DrawEllipse(cRect(tvFrameWidth - radius - frame, frame, radius, radius), theme.Color(clrBackgroundOSD), -1);
pixmapTVFrame->DrawRectangle(cRect(0, frame, frame, height - 2*frame), theme.Color(clrBackgroundOSD)); pixmapTVFrame->DrawRectangle(cRect(0, frame, frame, height - 2*frame), theme.Color(clrBackgroundOSD));
pixmapTVFrame->DrawEllipse(cRect(frame, height - radius - frame, radius, radius), theme.Color(clrBackgroundOSD), -3); pixmapTVFrame->DrawEllipse(cRect(frame, height - radius - frame, radius, radius), theme.Color(clrBackgroundOSD), -3);
pixmapTVFrame->DrawRectangle(cRect(0, height - frame, tvFrameWidth, frame), theme.Color(clrBackgroundOSD)); pixmapTVFrame->DrawRectangle(cRect(0, height - frame, tvFrameWidth, frame), theme.Color(clrBackgroundOSD));
pixmapTVFrame->DrawEllipse(cRect(tvFrameWidth - radius - frame, height - radius - frame, radius, radius), theme.Color(clrBackgroundOSD), -4); pixmapTVFrame->DrawEllipse(cRect(tvFrameWidth - radius - frame, height - radius - frame, radius, radius), theme.Color(clrBackgroundOSD), -4);
} }

View File

@ -1,25 +1,25 @@
#ifndef __TVGUIDE_STATUSHEADER_H #ifndef __TVGUIDE_STATUSHEADER_H
#define __TVGUIDE_STATUSHEADER_H #define __TVGUIDE_STATUSHEADER_H
#include "styledpixmap.h" #include "styledpixmap.h"
#include "gridelement.h" #include "grid.h"
// --- cStatusHeader ------------------------------------------------------------- // --- cStatusHeader -------------------------------------------------------------
class cStatusHeader : public cStyledPixmap { class cStatusHeader : public cStyledPixmap {
private: private:
int width, height; int width, height;
int tvFrameWidth; int tvFrameWidth;
cPixmap *pixmapText; cPixmap *pixmapText;
cPixmap *pixmapTVFrame; cPixmap *pixmapTVFrame;
int DrawPoster(const cEvent *event, int x, int y, int height, int border); int DrawPoster(const cEvent *event, int x, int y, int height, int border);
void DecorateVideoFrame(void); void DecorateVideoFrame(void);
public: public:
cStatusHeader(void); cStatusHeader(void);
virtual ~cStatusHeader(void); virtual ~cStatusHeader(void);
void Draw(void); void Draw(void);
void ScaleVideo(void); void ScaleVideo(void);
void DrawInfoText(cGridElement *grid); void DrawInfoText(cGrid *grid);
}; };
#endif //__TVGUIDE_STATUSHEADER_H #endif //__TVGUIDE_STATUSHEADER_H

View File

@ -1,205 +1,205 @@
#include "imageloader.h" #include "imageloader.h"
#include "geometrymanager.h" #include "geometrymanager.h"
#include "styledpixmap.h" #include "styledpixmap.h"
cStyledPixmap::cStyledPixmap(void) { cStyledPixmap::cStyledPixmap(void) {
pixmap = NULL; pixmap = NULL;
} }
cStyledPixmap::cStyledPixmap(cPixmap *pixmap) { cStyledPixmap::cStyledPixmap(cPixmap *pixmap) {
this->pixmap = pixmap; this->pixmap = pixmap;
} }
cStyledPixmap::~cStyledPixmap(void) { cStyledPixmap::~cStyledPixmap(void) {
if (pixmap) if (pixmap)
osdManager.DestroyPixmap(pixmap); osdManager.releasePixmap(pixmap);
} }
void cStyledPixmap::setPixmap(cPixmap *pixmap) { void cStyledPixmap::setPixmap(cPixmap *pixmap) {
if (pixmap) { if (pixmap) {
this->pixmap = pixmap; this->pixmap = pixmap;
} }
} }
void cStyledPixmap::drawBackground() { void cStyledPixmap::drawBackground() {
if (config.style == eStyleBlendingDefault){ if (tvguideConfig.style == eStyleBlendingDefault){
drawBlendedBackground(); drawBlendedBackground();
} else if (config.style == eStyleBlendingMagick){ } else if (tvguideConfig.style == eStyleBlendingMagick){
drawSparsedBackground(); drawSparsedBackground();
} else { } else {
pixmap->Fill(color); pixmap->Fill(color);
} }
} }
void cStyledPixmap::drawBackgroundGraphical(eBackgroundType type, bool active) { void cStyledPixmap::drawBackgroundGraphical(eBackgroundType type, bool active) {
cImage *back = NULL; cImage *back = NULL;
if (type == bgGrid) { if (type == bgGrid) {
back = imgCache.GetGrid(pixmap->ViewPort().Width(), pixmap->ViewPort().Height(), active); back = imgCache.GetGrid(pixmap->ViewPort().Width(), pixmap->ViewPort().Height(), active);
} else if (type == bgChannelHeader) { } else if (type == bgChannelHeader) {
back = imgCache.GetOsdElement(oeLogoBack); back = imgCache.GetOsdElement(oeLogoBack);
} else if (type == bgChannelGroup) { } else if (type == bgChannelGroup) {
back = imgCache.GetChannelGroup(pixmap->ViewPort().Width(), pixmap->ViewPort().Height()); back = imgCache.GetChannelGroup(pixmap->ViewPort().Width(), pixmap->ViewPort().Height());
} else if (type == bgStatusHeaderWindowed) { } else if (type == bgStatusHeaderWindowed) {
back = imgCache.GetOsdElement(oeStatusHeaderContentWindowed); back = imgCache.GetOsdElement(oeStatusHeaderContentWindowed);
} else if (type == bgStatusHeaderFull) { } else if (type == bgStatusHeaderFull) {
back = imgCache.GetOsdElement(oeStatusHeaderContentFull); back = imgCache.GetOsdElement(oeStatusHeaderContentFull);
} else if (type == bgClock) { } else if (type == bgClock) {
back = imgCache.GetOsdElement(oeClock); back = imgCache.GetOsdElement(oeClock);
} else if (type == bgButton) { } else if (type == bgButton) {
drawBackgroundButton(active); drawBackgroundButton(active);
return; return;
} else if (type == bgRecMenuBack) { } else if (type == bgRecMenuBack) {
cImageLoader imgLoader; cImageLoader imgLoader;
if (imgLoader.LoadOsdElement("recmenu_background", pixmap->ViewPort().Width(), pixmap->ViewPort().Height())) { if (imgLoader.LoadOsdElement("recmenu_background", pixmap->ViewPort().Width(), pixmap->ViewPort().Height())) {
cImage background = imgLoader.GetImage(); cImage background = imgLoader.GetImage();
pixmap->DrawImage(cPoint(0, 0), background); pixmap->DrawImage(cPoint(0, 0), background);
} else { } else {
pixmap->Fill(clrTransparent); pixmap->Fill(clrTransparent);
} }
return; return;
} else if (type == bgChannelJump) { } else if (type == bgChannelJump) {
back = imgCache.GetOsdElement(oeChannelJump); back = imgCache.GetOsdElement(oeChannelJump);
} }
if (back) { if (back) {
pixmap->DrawImage(cPoint(0,0), *back); pixmap->DrawImage(cPoint(0,0), *back);
} else { } else {
pixmap->Fill(clrTransparent); pixmap->Fill(clrTransparent);
} }
} }
void cStyledPixmap::drawBackgroundButton(bool active) { void cStyledPixmap::drawBackgroundButton(bool active) {
std::string buttonName = ""; std::string buttonName = "";
int buttonWidth = pixmap->ViewPort().Width(); int buttonWidth = pixmap->ViewPort().Width();
int buttonHeight = pixmap->ViewPort().Height(); int buttonHeight = pixmap->ViewPort().Height();
if (buttonWidth > geoManager.osdWidth * 50 / 100) { if (buttonWidth > geoManager.osdWidth * 50 / 100) {
if (active) if (active)
buttonName = "button_active_70percent"; buttonName = "button_active_70percent";
else else
buttonName = "button_70percent"; buttonName = "button_70percent";
} else { } else {
if (active) if (active)
buttonName = "button_active_30percent"; buttonName = "button_active_30percent";
else else
buttonName = "button_30percent"; buttonName = "button_30percent";
} }
cImageLoader imgLoader; cImageLoader imgLoader;
if (imgLoader.LoadOsdElement(buttonName.c_str(), buttonWidth, buttonHeight)) { if (imgLoader.LoadOsdElement(buttonName.c_str(), buttonWidth, buttonHeight)) {
cImage button = imgLoader.GetImage(); cImage button = imgLoader.GetImage();
pixmap->DrawImage(cPoint(0, 0), button); pixmap->DrawImage(cPoint(0, 0), button);
} else { } else {
pixmap->Fill(clrTransparent); pixmap->Fill(clrTransparent);
} }
} }
void cStyledPixmap::drawBlendedBackground() { void cStyledPixmap::drawBlendedBackground() {
int width = pixmap->ViewPort().Width(); int width = pixmap->ViewPort().Width();
int height = pixmap->ViewPort().Height(); int height = pixmap->ViewPort().Height();
pixmap->Fill(color); pixmap->Fill(color);
int numSteps = 64; int numSteps = 64;
int alphaStep = 0x04; int alphaStep = 0x04;
if (height < 30) if (height < 30)
return; return;
else if (height < 100) { else if (height < 100) {
numSteps = 32; numSteps = 32;
alphaStep = 0x08; alphaStep = 0x08;
} }
int stepY = 0.5*height / numSteps; int stepY = 0.5*height / numSteps;
if (stepY == 0) stepY = 1; if (stepY == 0) stepY = 1;
int alpha = 0x00; int alpha = 0x00;
tColor clr; tColor clr;
for (int i = 0; i<numSteps; i++) { for (int i = 0; i<numSteps; i++) {
clr = AlphaBlend(color, colorBlending, alpha); clr = AlphaBlend(color, colorBlending, alpha);
pixmap->DrawRectangle(cRect(0,i*stepY,width,stepY), clr); pixmap->DrawRectangle(cRect(0,i*stepY,width,stepY), clr);
alpha += alphaStep; alpha += alphaStep;
} }
} }
void cStyledPixmap::drawSparsedBackground() { void cStyledPixmap::drawSparsedBackground() {
int width = pixmap->ViewPort().Width(); int width = pixmap->ViewPort().Width();
int height = pixmap->ViewPort().Height(); int height = pixmap->ViewPort().Height();
cImageLoader imgLoader; cImageLoader imgLoader;
if (imgLoader.DrawBackground(colorBlending, color, width, height)) if (imgLoader.DrawBackground(colorBlending, color, width, height))
pixmap->DrawImage(cPoint(0,0), imgLoader.GetImage()); pixmap->DrawImage(cPoint(0,0), imgLoader.GetImage());
} }
void cStyledPixmap::drawBorder() { void cStyledPixmap::drawBorder() {
int width = pixmap->ViewPort().Width(); int width = pixmap->ViewPort().Width();
int height = pixmap->ViewPort().Height(); int height = pixmap->ViewPort().Height();
drawDefaultBorder(width, height); drawDefaultBorder(width, height);
if (config.roundedCorners) { if (tvguideConfig.roundedCorners) {
int borderRadius = 12; int borderRadius = 12;
drawRoundedCorners(width, height, borderRadius); drawRoundedCorners(width, height, borderRadius);
} }
} }
void cStyledPixmap::drawDefaultBorder(int width, int height) { void cStyledPixmap::drawDefaultBorder(int width, int height) {
pixmap->DrawRectangle(cRect(0,0,width,2), clrTransparent); //top pixmap->DrawRectangle(cRect(0,0,width,2), clrTransparent); //top
pixmap->DrawRectangle(cRect(0,0,2,height), clrTransparent); //left pixmap->DrawRectangle(cRect(0,0,2,height), clrTransparent); //left
pixmap->DrawRectangle(cRect(0,height-2,width,2), clrTransparent); //bottom pixmap->DrawRectangle(cRect(0,height-2,width,2), clrTransparent); //bottom
pixmap->DrawRectangle(cRect(width-2,0,2,height), clrTransparent); //right pixmap->DrawRectangle(cRect(width-2,0,2,height), clrTransparent); //right
pixmap->DrawRectangle(cRect(2,2,width-4,1), theme.Color(clrBorder)); //top pixmap->DrawRectangle(cRect(2,2,width-4,1), theme.Color(clrBorder)); //top
pixmap->DrawRectangle(cRect(2,2,1,height-4), theme.Color(clrBorder)); //left pixmap->DrawRectangle(cRect(2,2,1,height-4), theme.Color(clrBorder)); //left
pixmap->DrawRectangle(cRect(2,height-3,width-4,1), theme.Color(clrBorder)); //bottom pixmap->DrawRectangle(cRect(2,height-3,width-4,1), theme.Color(clrBorder)); //bottom
pixmap->DrawRectangle(cRect(width-3,2,1,height-4), theme.Color(clrBorder)); //right pixmap->DrawRectangle(cRect(width-3,2,1,height-4), theme.Color(clrBorder)); //right
} }
void cStyledPixmap::drawBoldBorder() { void cStyledPixmap::drawBoldBorder() {
int width = pixmap->ViewPort().Width(); int width = pixmap->ViewPort().Width();
int height = pixmap->ViewPort().Height(); int height = pixmap->ViewPort().Height();
pixmap->DrawRectangle(cRect(0,0,width,2), theme.Color(clrBorder)); //top pixmap->DrawRectangle(cRect(0,0,width,2), theme.Color(clrBorder)); //top
pixmap->DrawRectangle(cRect(0,0,2,height), theme.Color(clrBorder)); //left pixmap->DrawRectangle(cRect(0,0,2,height), theme.Color(clrBorder)); //left
pixmap->DrawRectangle(cRect(0,height-2,width,2), theme.Color(clrBorder)); //bottom pixmap->DrawRectangle(cRect(0,height-2,width,2), theme.Color(clrBorder)); //bottom
pixmap->DrawRectangle(cRect(width-2,0,2,height), theme.Color(clrBorder)); //right pixmap->DrawRectangle(cRect(width-2,0,2,height), theme.Color(clrBorder)); //right
} }
void cStyledPixmap::drawRoundedCorners(int width, int height, int radius) { void cStyledPixmap::drawRoundedCorners(int width, int height, int radius) {
pixmap->DrawEllipse(cRect(2,2,radius,radius), theme.Color(clrBorder), -2); pixmap->DrawEllipse(cRect(2,2,radius,radius), theme.Color(clrBorder), -2);
pixmap->DrawEllipse(cRect(1,1,radius,radius), clrTransparent, -2); pixmap->DrawEllipse(cRect(1,1,radius,radius), clrTransparent, -2);
pixmap->DrawEllipse(cRect(width-radius - 2,2,radius,radius), theme.Color(clrBorder), -1); pixmap->DrawEllipse(cRect(width-radius - 2,2,radius,radius), theme.Color(clrBorder), -1);
pixmap->DrawEllipse(cRect(width-radius - 1,1,radius,radius), clrTransparent, -1); pixmap->DrawEllipse(cRect(width-radius - 1,1,radius,radius), clrTransparent, -1);
if( height > 2*radius) { if( height > 2*radius) {
pixmap->DrawEllipse(cRect(2,height-radius - 2,radius,radius), theme.Color(clrBorder), -3); pixmap->DrawEllipse(cRect(2,height-radius - 2,radius,radius), theme.Color(clrBorder), -3);
pixmap->DrawEllipse(cRect(1,height-radius - 1,radius,radius), clrTransparent, -3); pixmap->DrawEllipse(cRect(1,height-radius - 1,radius,radius), clrTransparent, -3);
pixmap->DrawEllipse(cRect(width-radius - 2,height-radius - 2,radius,radius), theme.Color(clrBorder), -4); pixmap->DrawEllipse(cRect(width-radius - 2,height-radius - 2,radius,radius), theme.Color(clrBorder), -4);
pixmap->DrawEllipse(cRect(width-radius - 1,height-radius - 1,radius,radius), clrTransparent, -4); pixmap->DrawEllipse(cRect(width-radius - 1,height-radius - 1,radius,radius), clrTransparent, -4);
} }
} }
void cStyledPixmap::drawVerticalLine(int x, int yStart, int yStop, tColor col) { void cStyledPixmap::drawVerticalLine(int x, int yStart, int yStop, tColor col) {
for (int y = yStart; y <= yStop; y++) { for (int y = yStart; y <= yStop; y++) {
pixmap->DrawPixel(cPoint(x,y), col); pixmap->DrawPixel(cPoint(x,y), col);
} }
} }
void cStyledPixmap::drawHorizontalLine(int y, int xStart, int xStop, tColor col) { void cStyledPixmap::drawHorizontalLine(int y, int xStart, int xStop, tColor col) {
for (int x = xStart; x <= xStop; x++) { for (int x = xStart; x <= xStop; x++) {
pixmap->DrawPixel(cPoint(x,y), col); pixmap->DrawPixel(cPoint(x,y), col);
} }
} }
void cStyledPixmap::DrawText(const cPoint &Point, const char *s, tColor ColorFg, tColor ColorBg, const cFont *Font) { void cStyledPixmap::DrawText(const cPoint &Point, const char *s, tColor ColorFg, tColor ColorBg, const cFont *Font) {
pixmap->DrawText(Point, s, ColorFg, ColorBg, Font); pixmap->DrawText(Point, s, ColorFg, ColorBg, Font);
} }
void cStyledPixmap::DrawImage(const cPoint &Point, const cImage &Image) { void cStyledPixmap::DrawImage(const cPoint &Point, const cImage &Image) {
pixmap->DrawImage(Point, Image); pixmap->DrawImage(Point, Image);
} }
void cStyledPixmap::DrawRectangle(const cRect &Rect, tColor Color) { void cStyledPixmap::DrawRectangle(const cRect &Rect, tColor Color) {
pixmap->DrawRectangle(Rect,Color); pixmap->DrawRectangle(Rect,Color);
} }
void cStyledPixmap::DrawEllipse(const cRect &Rect, tColor Color, int Quadrant) { void cStyledPixmap::DrawEllipse(const cRect &Rect, tColor Color, int Quadrant) {
pixmap->DrawEllipse(Rect,Color,Quadrant); pixmap->DrawEllipse(Rect,Color,Quadrant);
} }
void cStyledPixmap::SetViewPort(const cRect &Rect) { void cStyledPixmap::SetViewPort(const cRect &Rect) {
pixmap->SetViewPort(Rect); pixmap->SetViewPort(Rect);
} }

View File

@ -1,58 +1,58 @@
#ifndef __TVGUIDE_STYLEDPIXMAP_H #ifndef __TVGUIDE_STYLEDPIXMAP_H
#define __TVGUIDE_STYLEDPIXMAP_H #define __TVGUIDE_STYLEDPIXMAP_H
#include <vdr/osd.h> #include <vdr/osd.h>
#include <vdr/epg.h> #include <vdr/epg.h>
#include "timemanager.h" #include "timer.h"
#include "config.h" #include "config.h"
enum eBackgroundType { enum eBackgroundType {
bgGrid, bgGrid,
bgStatusHeaderFull, bgStatusHeaderFull,
bgStatusHeaderWindowed, bgStatusHeaderWindowed,
bgChannelHeader, bgChannelHeader,
bgChannelGroup, bgChannelGroup,
bgClock, bgClock,
bgButton, bgButton,
bgRecMenuBack, bgRecMenuBack,
bgChannelJump, bgChannelJump,
}; };
// --- cStyledPixmap ------------------------------------------------------------- // --- cStyledPixmap -------------------------------------------------------------
class cStyledPixmap { class cStyledPixmap {
private: private:
void drawVerticalLine(int x, int yStart, int yStop, tColor col); void drawVerticalLine(int x, int yStart, int yStop, tColor col);
void drawHorizontalLine(int y, int xStart, int xStop, tColor col); void drawHorizontalLine(int y, int xStart, int xStop, tColor col);
void drawBackgroundButton(bool active); void drawBackgroundButton(bool active);
protected: protected:
cPixmap *pixmap; cPixmap *pixmap;
tColor color; tColor color;
tColor colorBlending; tColor colorBlending;
void setPixmap(cPixmap *pixmap); void setPixmap(cPixmap *pixmap);
public: public:
cStyledPixmap(void); cStyledPixmap(void);
cStyledPixmap(cPixmap *pixmap); cStyledPixmap(cPixmap *pixmap);
virtual ~cStyledPixmap(void); virtual ~cStyledPixmap(void);
void drawBackground(); void drawBackground();
void drawBackgroundGraphical(eBackgroundType type, bool active = false); void drawBackgroundGraphical(eBackgroundType type, bool active = false);
void drawBlendedBackground(); void drawBlendedBackground();
void drawSparsedBackground(); void drawSparsedBackground();
void drawBorder(); void drawBorder();
void drawBoldBorder(); void drawBoldBorder();
void drawDefaultBorder(int width, int height); void drawDefaultBorder(int width, int height);
void drawRoundedCorners(int width, int height, int radius); void drawRoundedCorners(int width, int height, int radius);
void setColor(tColor color, tColor colorBlending) {this->color = color; this->colorBlending = colorBlending;}; void setColor(tColor color, tColor colorBlending) {this->color = color; this->colorBlending = colorBlending;};
void SetAlpha(int alpha) {pixmap->SetAlpha(alpha);}; void SetAlpha(int alpha) {pixmap->SetAlpha(alpha);};
void SetLayer(int layer) {pixmap->SetLayer(layer);}; void SetLayer(int layer) {pixmap->SetLayer(layer);};
void Fill(tColor clr) {pixmap->Fill(clr);}; void Fill(tColor clr) {pixmap->Fill(clr);};
void DrawText(const cPoint &Point, const char *s, tColor ColorFg, tColor ColorBg, const cFont *Font); void DrawText(const cPoint &Point, const char *s, tColor ColorFg, tColor ColorBg, const cFont *Font);
void DrawImage(const cPoint &Point, const cImage &Image); void DrawImage(const cPoint &Point, const cImage &Image);
void DrawRectangle(const cRect &Rect, tColor Color); void DrawRectangle(const cRect &Rect, tColor Color);
void DrawEllipse(const cRect &Rect, tColor Color, int Quadrant); void DrawEllipse(const cRect &Rect, tColor Color, int Quadrant);
void SetViewPort(const cRect &Rect); void SetViewPort(const cRect &Rect);
int Width() {return pixmap->ViewPort().Width();}; int Width() {return pixmap->ViewPort().Width();};
int Height() {return pixmap->ViewPort().Height();}; int Height() {return pixmap->ViewPort().Height();};
}; };
#endif //__TVGUIDE_STYLEDPIXMAP_H #endif //__TVGUIDE_STYLEDPIXMAP_H

View File

@ -6,13 +6,15 @@ cSwitchTimers SwitchTimers;
cSwitchTimer::cSwitchTimer(void) { cSwitchTimer::cSwitchTimer(void) {
eventID = 0; eventID = 0;
startTime = 0; startTime = 0;
switchMinsBefore = config.switchMinsBefore; switchMinsBefore = tvguideConfig.switchMinsBefore;
switchMode = config.switchMode; switchMode = tvguideConfig.switchMode;
} }
cSwitchTimer::cSwitchTimer(const cEvent* Event) { cSwitchTimer::cSwitchTimer(const cEvent* Event) {
eventID = 0; eventID = 0;
startTime = 0; startTime = 0;
// switchMinsBefore = tvguideConfig.switchMinsBefore;
// switchModes = tvguideConfig.switchModes;
if (Event) { if (Event) {
eventID = Event->EventID(); eventID = Event->EventID();
channelID = Event->ChannelID(); channelID = Event->ChannelID();

View File

@ -1,14 +1,14 @@
Description = IceBlue Description = IceBlue
clrStyle = 00000000 clrStyle = 00000000
clrBackground = EEFFFFFF clrBackground = DDFFFFFF
clrBackgroundOSD = F0FFFFFF clrBackgroundOSD = FFFFFFFF
clrGrid1 = FFB2B2C clrGrid1 = BB555555
clrGrid2 = 55B2B2C7 clrGrid2 = BB888888
clrGridFontBack = 00000000 clrGridFontBack = 00000000
clrGridActiveFontBack = FFFFFFFF clrGridActiveFontBack = 00000000
clrHighlight = FF000044 clrHighlight = FF000044
clrFont = FF000000 clrFont = FF000000
clrFontActive = FFFFFFFF clrFontActive = FFFFFFFF
clrFontButtons = FFFFFFFF clrFontButtons = FFFFFFFF
clrFontHeader = FF000000 clrFontHeader = FF000000
clrHeader = FFFFFFFF clrHeader = FFFFFFFF
@ -20,14 +20,14 @@ clrTimeline1Blending = 00000000
clrTimeline2 = FF000000 clrTimeline2 = FF000000
clrTimeline2Blending = 00000000 clrTimeline2Blending = 00000000
clrTimeBase = A0FF0000 clrTimeBase = A0FF0000
clrTabInactive = 55B2B2C7 clrTabInactive = 88B8B8E6
clrButtonRed = FFCC00000 clrButtonRed = FFBB0000
clrButtonRedBorder = FF000000 clrButtonRedBorder = FF000000
clrButtonGreen = FF00BB00 clrButtonGreen = FF00BB00
clrButtonGreenBorder = FF000000 clrButtonGreenBorder = FF000000
clrButtonYellow = FFF5B800 clrButtonYellow = FFBBBB00
clrButtonYellowBorder = FF000000 clrButtonYellowBorder = FF000000
clrButtonBlue = FF003DF5 clrButtonBlue = FF0000BB
clrButtonBlueBorder = FF000000 clrButtonBlueBorder = FF000000
clrRecMenuBackground = AA000000 clrRecMenuBackground = AA000000
clrRecMenuTimerConflictBackground = FFCCCCCC clrRecMenuTimerConflictBackground = FFCCCCCC
@ -36,16 +36,16 @@ clrRecMenuTimerConflictOverlap = AAFF0000
clrRecMenuDayActive = FF00FF00 clrRecMenuDayActive = FF00FF00
clrRecMenuDayInactive = FFFF0000 clrRecMenuDayInactive = FFFF0000
clrRecMenuDayHighlight = 77000000 clrRecMenuDayHighlight = 77000000
clrRecMenuTextBack = 00000000 clrRecMenuTextBack = FF3C3C3C
clrRecMenuTextActiveBack = FF404749 clrRecMenuTextActiveBack = FF404749
clrRecMenuKeyboardBack = FF000044 clrRecMenuKeyboardBack = FF000044
clrRecMenuKeyboardBorder = FF6C6C6C clrRecMenuKeyboardBorder = FF3C3C3C
clrRecMenuKeyboardHigh = 55FFFFFF clrRecMenuKeyboardHigh = 55FFFFFF
clrButtonRedKeyboard = FFBB0000 clrButtonRedKeyboard = FFBB0000
clrButtonGreenKeyboard = FF00BB00 clrButtonGreenKeyboard = FF00BB00
clrButtonYellowKeyboard = FFBBBB00 clrButtonYellowKeyboard = FFBBBB00
clrRecMenuTimelineTimer = B012273f clrRecMenuTimelineTimer = B012273f
clrRecMenuTimelineBack = 55B2B2C7 clrRecMenuTimelineBack = FF828282
clrRecMenuTimelineActive = 773F3F3F clrRecMenuTimelineActive = FF3F3F3F
clrRecMenuTimelineConflict = 30FF0000 clrRecMenuTimelineConflict = 30FF0000
clrRecMenuTimelineConflictOverlap = 90FF0000 clrRecMenuTimelineConflictOverlap = 90FF0000

View File

@ -1,276 +1,282 @@
#include "imageloader.h" #include "imageloader.h"
#include "timeline.h" #include "timeline.h"
cTimeLine::cTimeLine(cTimeManager *timeManager) { cTimeLine::cTimeLine(cMyTime *myTime) {
this->timeManager = timeManager; this->myTime = myTime;
lastClock = ""; if (tvguideConfig.displayMode == eVertical) {
timeBase = NULL; dateViewer = new cStyledPixmap(osdManager.requestPixmap(1, cRect(0,
int x11, x21, y11, y21, x12, x22, y12, y22; geoManager.statusHeaderHeight + geoManager.clockHeight,
if (config.displayMode == eVertical) { geoManager.dateVieverWidth,
x11 = 0; geoManager.dateVieverHeight)));
x21 = geoManager.dateVieverWidth; timeline = osdManager.requestPixmap(2, cRect(0,
y11 = geoManager.statusHeaderHeight + geoManager.clockHeight; geoManager.statusHeaderHeight + geoManager.channelHeaderHeight + geoManager.channelGroupsHeight,
y21 = geoManager.dateVieverHeight; geoManager.timeLineWidth,
x12 = 0; geoManager.osdHeight - geoManager.statusHeaderHeight - geoManager.channelHeaderHeight - geoManager.channelGroupsHeight - geoManager.footerHeight)
x22 = geoManager.timeLineWidth; , cRect(0,
y12 = geoManager.statusHeaderHeight + geoManager.channelHeaderHeight + geoManager.channelGroupsHeight; 0,
y22 = geoManager.osdHeight - geoManager.statusHeaderHeight - geoManager.channelHeaderHeight - geoManager.channelGroupsHeight - geoManager.footerHeight; geoManager.timeLineWidth,
} else if (config.displayMode == eHorizontal) { 1440*geoManager.minutePixel));
x11 = geoManager.clockWidth; timeBase = osdManager.requestPixmap(3, cRect(0,
x21 = geoManager.dateVieverWidth; geoManager.statusHeaderHeight + geoManager.channelGroupsHeight + geoManager.channelHeaderHeight,
y11 = geoManager.statusHeaderHeight; geoManager.osdWidth,
y21 = geoManager.dateVieverHeight; geoManager.timeLineGridHeight));
x12 = geoManager.channelHeaderWidth + geoManager.channelGroupsWidth; } else if (tvguideConfig.displayMode == eHorizontal) {
x22 = geoManager.osdWidth - geoManager.channelHeaderWidth - geoManager.channelGroupsWidth; dateViewer = new cStyledPixmap(osdManager.requestPixmap(1, cRect(geoManager.clockWidth,
y12 = geoManager.statusHeaderHeight; geoManager.statusHeaderHeight,
y22 = geoManager.timeLineHeight; geoManager.dateVieverWidth,
} geoManager.dateVieverHeight)));
dateViewer = new cStyledPixmap(osdManager.CreatePixmap(1, cRect(x11, y11, x21, y21))); timeline = osdManager.requestPixmap(2, cRect(geoManager.channelHeaderWidth + geoManager.channelGroupsWidth,
timeline = osdManager.CreatePixmap(2, cRect(x12, y12, x22, y22)); geoManager.statusHeaderHeight,
clock = new cStyledPixmap(osdManager.CreatePixmap(3, cRect(0, geoManager.osdWidth - geoManager.channelHeaderWidth - geoManager.channelGroupsWidth,
geoManager.statusHeaderHeight, geoManager.timeLineHeight)
geoManager.clockWidth, , cRect(0,
geoManager.clockHeight))); 0,
} 1440*geoManager.minutePixel,
geoManager.timeLineHeight));
cTimeLine::~cTimeLine(void) { timeBase = osdManager.requestPixmap(3, cRect(geoManager.channelGroupsWidth + geoManager.channelHeaderWidth,
if (clock) geoManager.statusHeaderHeight,
delete clock; geoManager.timeLineGridWidth,
osdManager.DestroyPixmap(timeBase); geoManager.timeLineHeight + tvguideConfig.channelRows * geoManager.rowHeight));
osdManager.DestroyPixmap(timeline); }
if (dateViewer) timeBase->Fill(clrTransparent);
delete dateViewer; int clockY;
} int clockX;
if (tvguideConfig.displayMode == eVertical) {
void cTimeLine::DrawDateViewer(void) { clockY = geoManager.statusHeaderHeight;
cString weekDay = timeManager->GetWeekday(); clockX = 0;
cString date = timeManager->GetDate(); }
if (config.style != eStyleGraphical) { else {
dateViewer->setColor(theme.Color(clrHeader), theme.Color(clrHeaderBlending)); clockY = geoManager.statusHeaderHeight;
dateViewer->drawBackground(); clockX = 0;
dateViewer->drawBorder(); }
clock = new cStyledPixmap(osdManager.requestPixmap(3, cRect(clockX,
} else { clockY,
cImage *imgBack = imgCache.GetOsdElement(oeDateViewer); geoManager.clockWidth,
if (imgBack) geoManager.clockHeight)));
dateViewer->DrawImage(cPoint(0,0), *imgBack); }
else
dateViewer->Fill(clrTransparent); cTimeLine::~cTimeLine(void) {
} delete dateViewer;
tColor colorFont = theme.Color(clrButtonYellow); osdManager.releasePixmap(timeline);
tColor colorFontBack = (config.style == eStyleFlat) ? theme.Color(clrHeader) : clrTransparent; if (clock)
delete clock;
if (config.displayMode == eVertical) { }
int textHeightWeekday = fontManager.FontTimeLineWeekday->Height();
int textHeightDate = fontManager.FontTimeLineDate->Height(); void cTimeLine::drawDateViewer() {
int weekdayWidth = fontManager.FontTimeLineWeekday->Width(*weekDay); cString weekDay = myTime->GetWeekday();
int dateWidth = fontManager.FontTimeLineDate->Width(*date); cString date = myTime->GetDate();
int y = ((geoManager.dateVieverHeight - textHeightWeekday - textHeightDate) / 2); if (tvguideConfig.style != eStyleGraphical) {
dateViewer->DrawText(cPoint((geoManager.timeLineWidth - weekdayWidth) / 2, y), *weekDay, colorFont, colorFontBack, fontManager.FontTimeLineWeekday); dateViewer->setColor(theme.Color(clrHeader), theme.Color(clrHeaderBlending));
dateViewer->DrawText(cPoint((geoManager.timeLineWidth - dateWidth) / 2, y + textHeightWeekday), *date, colorFont, colorFontBack, fontManager.FontTimeLineDate); dateViewer->drawBackground();
} else if (config.displayMode == eHorizontal) { dateViewer->drawBorder();
cString strDate = cString::sprintf("%s %s", *weekDay, *date);
int x = ((dateViewer->Width() - fontManager.FontTimeLineDateHorizontal->Width(*strDate)) / 2); } else {
int y = ((dateViewer->Height() - fontManager.FontTimeLineDateHorizontal->Height()) / 2); cImage *imgBack = imgCache.GetOsdElement(oeDateViewer);
dateViewer->DrawText(cPoint(x, y), *strDate, colorFont, colorFontBack, fontManager.FontTimeLineDateHorizontal); if (imgBack)
} dateViewer->DrawImage(cPoint(0,0), *imgBack);
} else
dateViewer->Fill(clrTransparent);
void cTimeLine::DrawTimeline(void) { }
// timeline->SetTile(true); tColor colorFont = theme.Color(clrButtonYellow);
timeline->Fill(clrTransparent); tColor colorFontBack = (tvguideConfig.style == eStyleFlat) ? theme.Color(clrHeader) : clrTransparent;
tColor colorFont, colorBackground;
if (tvguideConfig.displayMode == eVertical) {
int imgWidth = geoManager.timeLineGridWidth; int textHeightWeekday = fontManager.FontTimeLineWeekday->Height();
int imgHeight = geoManager.timeLineGridHeight; int textHeightDate = fontManager.FontTimeLineDate->Height();
const cImage *img1 = NULL; int weekdayWidth = fontManager.FontTimeLineWeekday->Width(*weekDay);
const cImage *img2 = NULL; int dateWidth = fontManager.FontTimeLineDate->Width(*date);
if (config.style == eStyleGraphical) { int y = ((geoManager.dateVieverHeight - textHeightWeekday - textHeightDate) / 2);
img1 = imgCache.GetOsdElement(oeTimeline1); dateViewer->DrawText(cPoint((geoManager.timeLineWidth - weekdayWidth) / 2, y), *weekDay, colorFont, colorFontBack, fontManager.FontTimeLineWeekday);
img2 = imgCache.GetOsdElement(oeTimeline2); dateViewer->DrawText(cPoint((geoManager.timeLineWidth - dateWidth) / 2, y + textHeightWeekday), *date, colorFont, colorFontBack, fontManager.FontTimeLineDate);
} else { } else if (tvguideConfig.displayMode == eHorizontal) {
img1 = CreateBackgroundImage(imgWidth, imgHeight, theme.Color(clrTimeline1), theme.Color(clrTimeline1Blending)); cString strDate = cString::sprintf("%s %s", *weekDay, *date);
img2 = CreateBackgroundImage(imgWidth, imgHeight, theme.Color(clrTimeline2), theme.Color(clrTimeline2Blending)); int x = ((dateViewer->Width() - fontManager.FontTimeLineDateHorizontal->Width(*strDate)) / 2);
} int y = ((dateViewer->Height() - fontManager.FontTimeLineDateHorizontal->Height()) / 2);
const cImage *img = NULL; dateViewer->DrawText(cPoint(x, y), *strDate, colorFont, colorFontBack, fontManager.FontTimeLineDateHorizontal);
if (!img1 || !img2) }
return; }
int textWidth, posX, posY;
char timetext[10]; void cTimeLine::drawTimeline() {
timeline->SetTile(true);
int halfHours; timeline->Fill(clrTransparent);
if (config.displayMode == eVertical) tColor colorFont, colorBackground;
halfHours = config.displayTime / 30 + 1;
else int imgWidth = geoManager.timeLineGridWidth;
halfHours = config.displayHorizontalTime / 30 + 1; int imgHeight = geoManager.timeLineGridHeight;
const cImage *img1 = NULL;
time_t tStart = timeManager->GetStart(); const cImage *img2 = NULL;
tm *t = localtime ( &tStart ); if (tvguideConfig.style == eStyleGraphical) {
img1 = imgCache.GetOsdElement(oeTimeline1);
int x = 2 * t->tm_hour + ((t->tm_min == 0) ? 0 : 1); img2 = imgCache.GetOsdElement(oeTimeline2);
for (int j = x; j < (x + halfHours); j++) { } else {
int i = (j >= 48) ? (j - 48) : j; img1 = createBackgroundImage(imgWidth, imgHeight, theme.Color(clrTimeline1), theme.Color(clrTimeline1Blending));
if (i % 2 == 0) { img2 = createBackgroundImage(imgWidth, imgHeight, theme.Color(clrTimeline2), theme.Color(clrTimeline2Blending));
img = img1; }
colorFont = theme.Color(clrTimeline2); const cImage *img = NULL;
colorBackground = (config.style == eStyleFlat)?theme.Color(clrTimeline1):clrTransparent; if (!img1 || !img2)
if (config.timeFormat == e12Hours) { return;
if (i == 0) int textWidth, posX, posY;
sprintf(timetext, "12:00 PM"); char timetext[10];
else if (i/2 < 13)
sprintf(timetext, "%d:00 AM", i / 2); for (int i=0; i<48; i++) {
else if (i%2==0) {
sprintf(timetext, "%d:00 PM", i / 2 - 12); img = img1;
} else { colorFont = theme.Color(clrTimeline2);
sprintf(timetext, "%d:00", i / 2); colorBackground = (tvguideConfig.style == eStyleFlat)?theme.Color(clrTimeline1):clrTransparent;
} if (tvguideConfig.timeFormat == e12Hours) {
} else { if (i == 0)
img = img2; sprintf(timetext, "12:00 PM");
colorFont = theme.Color(clrTimeline1); else if (i/2 < 13)
colorBackground = (config.style == eStyleFlat)?theme.Color(clrTimeline2):clrTransparent; sprintf(timetext, "%d:00 AM", i/2);
if (config.timeFormat == e12Hours) { else
if (i == 1) sprintf(timetext, "%d:00 PM", i/2-12);
sprintf(timetext, "12:30 PM"); } else {
else if (i/2 < 13) sprintf(timetext, "%d:00", i/2);
sprintf(timetext, "%d:30 AM", i / 2); }
else } else {
sprintf(timetext, "%d:30 PM", i / 2 - 12); img = img2;
} else { colorFont = theme.Color(clrTimeline1);
sprintf(timetext, "%d:30", i / 2); colorBackground = (tvguideConfig.style == eStyleFlat)?theme.Color(clrTimeline2):clrTransparent;
} if (tvguideConfig.timeFormat == e12Hours) {
} if (i == 1)
if (config.displayMode == eVertical) { sprintf(timetext, "12:30 PM");
posY = (j - x) * geoManager.minutePixel * 30; else if (i/2 < 13)
timeline->DrawImage(cPoint(0, posY), *img); sprintf(timetext, "%d:30 AM", i/2);
if (config.style != eStyleGraphical) { else
DecorateTile(0, posY, imgWidth + 2, imgHeight); sprintf(timetext, "%d:30 PM", i/2-12);
} } else {
textWidth = fontManager.FontTimeLineTime->Width(timetext); sprintf(timetext, "%d:30", i/2);
timeline->DrawText(cPoint((geoManager.timeLineWidth-textWidth) / 2, posY + 5), timetext, colorFont, colorBackground, fontManager.FontTimeLineTime); }
} else if (config.displayMode == eHorizontal) { }
posX = (j - x) * geoManager.minutePixel * 30; if (tvguideConfig.displayMode == eVertical) {
timeline->DrawImage(cPoint(posX, 0), *img); posY = i*geoManager.minutePixel*30;
if (config.style != eStyleGraphical) { timeline->DrawImage(cPoint(0, posY), *img);
DecorateTile(posX, 0, imgWidth, imgHeight + 2); if (tvguideConfig.style != eStyleGraphical) {
} decorateTile(0, posY, imgWidth+2, imgHeight);
timeline->DrawText(cPoint(posX + 15, (dateViewer->Height() - fontManager.FontTimeLineTimeHorizontal->Height()) / 2), timetext, colorFont, colorBackground, fontManager.FontTimeLineTimeHorizontal); }
} textWidth = fontManager.FontTimeLineTime->Width(timetext);
} timeline->DrawText(cPoint((geoManager.timeLineWidth-textWidth)/2, posY + 5), timetext, colorFont, colorBackground, fontManager.FontTimeLineTime);
DrawTimeIndicator(); } else if (tvguideConfig.displayMode == eHorizontal) {
if (config.style != eStyleGraphical) { posX = i*geoManager.minutePixel*30;
delete img1; timeline->DrawImage(cPoint(posX, 0), *img);
delete img2; if (tvguideConfig.style != eStyleGraphical) {
} decorateTile(posX, 0, imgWidth, imgHeight+2);
} }
timeline->DrawText(cPoint(posX + 15, (dateViewer->Height() - fontManager.FontTimeLineTimeHorizontal->Height())/2), timetext, colorFont, colorBackground, fontManager.FontTimeLineTimeHorizontal);
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 setTimeline();
timeline->DrawRectangle(cRect(posX,posY + tileHeight-2,tileWidth,2), clrTransparent); //bottom if (tvguideConfig.style != eStyleGraphical) {
timeline->DrawRectangle(cRect(posX + tileWidth-2,posY,2,tileHeight), clrTransparent); //right delete img1;
delete img2;
timeline->DrawRectangle(cRect(2+posX,posY+2,tileWidth-4,1), theme.Color(clrBorder)); //top }
timeline->DrawRectangle(cRect(2+posX,posY+2,1,tileHeight-4), theme.Color(clrBorder)); //left }
timeline->DrawRectangle(cRect(2+posX,posY+tileHeight-3,tileWidth-4,1), theme.Color(clrBorder)); //bottom
timeline->DrawRectangle(cRect(posX+tileWidth-3,posY+2,1,tileHeight-4), theme.Color(clrBorder)); //right void cTimeLine::decorateTile(int posX, int posY, int tileWidth, int tileHeight) {
timeline->DrawRectangle(cRect(posX,posY,tileWidth,2), clrTransparent); //top
if (config.roundedCorners) { timeline->DrawRectangle(cRect(posX,posY,2,tileHeight), clrTransparent); //left
int borderRadius = 12; timeline->DrawRectangle(cRect(posX,posY + tileHeight-2,tileWidth,2), clrTransparent); //bottom
DrawRoundedCorners(posX, posY, tileWidth, tileHeight, borderRadius); timeline->DrawRectangle(cRect(posX + tileWidth-2,posY,2,tileHeight), clrTransparent); //right
}
} timeline->DrawRectangle(cRect(2+posX,posY+2,tileWidth-4,1), theme.Color(clrBorder)); //top
timeline->DrawRectangle(cRect(2+posX,posY+2,1,tileHeight-4), theme.Color(clrBorder)); //left
void cTimeLine::DrawRoundedCorners(int posX, int posY, int width, int height, int radius) { timeline->DrawRectangle(cRect(2+posX,posY+tileHeight-3,tileWidth-4,1), theme.Color(clrBorder)); //bottom
timeline->DrawEllipse(cRect(posX+2,posY+2,radius,radius), theme.Color(clrBorder), -2); timeline->DrawRectangle(cRect(posX+tileWidth-3,posY+2,1,tileHeight-4), theme.Color(clrBorder)); //right
timeline->DrawEllipse(cRect(posX+1,posY+1,radius,radius), clrTransparent, -2);
if (tvguideConfig.roundedCorners) {
timeline->DrawEllipse(cRect(posX+width-radius - 2,posY+2,radius,radius), theme.Color(clrBorder), -1); int borderRadius = 12;
timeline->DrawEllipse(cRect(posX+width-radius - 1,posY+1,radius,radius), clrTransparent, -1); drawRoundedCorners(posX, posY, tileWidth, tileHeight, borderRadius);
}
if( height > 2*radius) { }
timeline->DrawEllipse(cRect(posX+2,posY+height-radius - 2,radius,radius), theme.Color(clrBorder), -3);
timeline->DrawEllipse(cRect(posX+1,posY+height-radius - 1,radius,radius), clrTransparent, -3); 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+width-radius - 2,posY+height-radius - 2,radius,radius), theme.Color(clrBorder), -4); timeline->DrawEllipse(cRect(posX+1,posY+1,radius,radius), clrTransparent, -2);
timeline->DrawEllipse(cRect(posX+width-radius - 1,posY+height-radius - 1,radius,radius), clrTransparent, -4);
} timeline->DrawEllipse(cRect(posX+width-radius - 2,posY+2,radius,radius), theme.Color(clrBorder), -1);
} timeline->DrawEllipse(cRect(posX+width-radius - 1,posY+1,radius,radius), clrTransparent, -1);
void cTimeLine::DrawTimeIndicator(void) { if( height > 2*radius) {
if (!config.displayTimeBase) timeline->DrawEllipse(cRect(posX+2,posY+height-radius - 2,radius,radius), theme.Color(clrBorder), -3);
return; timeline->DrawEllipse(cRect(posX+1,posY+height-radius - 1,radius,radius), clrTransparent, -3);
if (!timeManager->NowVisible()) {
if (timeBase) timeline->DrawEllipse(cRect(posX+width-radius - 2,posY+height-radius - 2,radius,radius), theme.Color(clrBorder), -4);
timeBase->Fill(clrTransparent); timeline->DrawEllipse(cRect(posX+width-radius - 1,posY+height-radius - 1,radius,radius), clrTransparent, -4);
return; }
} }
int deltaTime = (time(0) - timeManager->GetStart()) / 60 * geoManager.minutePixel;
osdManager.DestroyPixmap(timeBase); void cTimeLine::drawCurrentTimeBase(void) {
int x1, x2, y1, y2; timeBase->Fill(clrTransparent);
if (config.displayMode == eVertical) { bool nowVisible = myTime->NowVisible();
x1 = 0; if (!nowVisible)
y1 = geoManager.statusHeaderHeight + geoManager.channelGroupsHeight + geoManager.channelHeaderHeight + deltaTime - 2; return;
x2 = geoManager.osdWidth; int deltaTime = (myTime->GetNow() - myTime->GetStart()) / 60 * geoManager.minutePixel;
y2 = 4; if (tvguideConfig.displayMode == eVertical) {
} else { timeBase->DrawRectangle(cRect(0, deltaTime - 2, timeBase->ViewPort().Width(), 4), theme.Color(clrTimeBase));
x1 = geoManager.channelGroupsWidth + geoManager.channelHeaderWidth + deltaTime - 2; } else {
y1 = geoManager.statusHeaderHeight; timeBase->DrawRectangle(cRect(deltaTime-2, 0, 4, timeBase->ViewPort().Height()), theme.Color(clrTimeBase));
x2 = 4; }
y2 = geoManager.timeLineHeight + config.channelRows * geoManager.rowHeight; }
}
timeBase = osdManager.CreatePixmap(3, cRect(x1, y1, x2, y2));
timeBase->Fill(clrTransparent); cImage *cTimeLine::createBackgroundImage(int width, int height, tColor clrBgr, tColor clrBlend) {
timeBase->DrawRectangle(cRect(0, 0, timeBase->ViewPort().Width(), timeBase->ViewPort().Height()), theme.Color(clrTimeBase)); cImage *image = NULL;
} if (tvguideConfig.style == eStyleBlendingDefault) {
image = new cImage(cSize(width, height));
cImage *cTimeLine::CreateBackgroundImage(int width, int height, tColor clrBgr, tColor clrBlend) { image->Fill(clrBgr);
cImage *image = NULL; int stepY = 0.5*height / 64;
if (config.style == eStyleBlendingDefault) { int alpha = 0x00;
image = new cImage(cSize(width, height)); tColor clr;
image->Fill(clrBgr); for (int i = 0; i<64; i++) {
int stepY = 0.5*height / 64; clr = AlphaBlend(clrBgr, clrBlend, alpha);
int alpha = 0x00; for (int y = i*stepY; y < (i+1)*stepY; y++) {
tColor clr; for (int x=0; x<width; x++) {
for (int i = 0; i<64; i++) { image->SetPixel(cPoint(x,y), clr);
clr = AlphaBlend(clrBgr, clrBlend, alpha); }
for (int y = i*stepY; y < (i+1)*stepY; y++) { }
for (int x=0; x<width; x++) { alpha += 0x04;
image->SetPixel(cPoint(x,y), clr); }
} } else if (tvguideConfig.style == eStyleBlendingMagick) {
} cImageLoader imgLoader;
alpha += 0x04; if (imgLoader.DrawBackground(clrBgr, clrBlend, width, height)) {
} image = new cImage(imgLoader.GetImage());
} else if (config.style == eStyleBlendingMagick) { }
cImageLoader imgLoader; } else {
if (imgLoader.DrawBackground(clrBgr, clrBlend, width, height)) { image = new cImage(cSize(width, height));
image = new cImage(imgLoader.GetImage()); image->Fill(clrBgr);
} }
} else { return image;
image = new cImage(cSize(width, height)); }
image->Fill(clrBgr);
} void cTimeLine::setTimeline() {
return image; int offset = myTime->GetTimelineOffset();
} int xNew, yNew;
if (tvguideConfig.displayMode == eVertical) {
bool cTimeLine::DrawClock(void) { xNew = 0;
cString currentTime = timeManager->GetCurrentTime(); yNew = -offset*geoManager.minutePixel;
if (strcmp(currentTime, lastClock)) { } else if (tvguideConfig.displayMode == eHorizontal) {
clock->Fill(clrTransparent); xNew = -offset*geoManager.minutePixel;
const cFont *font = (config.displayMode == eVertical) ? fontManager.FontTimeLineTime : fontManager.FontTimeLineTimeHorizontal; yNew = 0;
int textHeight = font->Height(); }
int clockTextWidth = font->Width(*currentTime); timeline->SetDrawPortPoint(cPoint(xNew, yNew));
tColor colorFontBack = (config.style == eStyleFlat) ? theme.Color(clrHeader) : clrTransparent; if (tvguideConfig.displayTimeBase)
if (config.style == eStyleGraphical) { drawCurrentTimeBase();
clock->drawBackgroundGraphical(bgClock); }
} else {
clock->setColor(theme.Color(clrHeader), theme.Color(clrHeaderBlending)); void cTimeLine::drawClock() {
clock->drawBackground(); if (tvguideConfig.displayMode == eVertical)
clock->drawBorder(); clock->Fill(clrTransparent);
} cString currentTime = myTime->GetCurrentTime();
clock->DrawText(cPoint((geoManager.clockWidth - clockTextWidth) / 2, (geoManager.clockHeight - textHeight) / 2), *currentTime, theme.Color(clrFont), colorFontBack, font); const cFont *font = (tvguideConfig.displayMode == eVertical)?fontManager.FontTimeLineTime:fontManager.FontTimeLineTimeHorizontal;
lastClock = currentTime; int textHeight = font->Height();
DrawTimeIndicator(); int clockTextWidth = font->Width(*currentTime);
return true; tColor colorFontBack = (tvguideConfig.style == eStyleFlat)?theme.Color(clrHeader):clrTransparent;
} if (tvguideConfig.style == eStyleGraphical) {
return false; clock->drawBackgroundGraphical(bgClock);
} } else {
clock->setColor(theme.Color(clrHeader), theme.Color(clrHeaderBlending));
clock->drawBackground();
clock->drawBorder();
}
clock->DrawText(cPoint((geoManager.clockWidth-clockTextWidth)/2, (geoManager.clockHeight-textHeight)/2), *currentTime, theme.Color(clrFont), colorFontBack, font);
}

View File

@ -1,29 +1,29 @@
#ifndef __TVGUIDE_TIMELINE_H #ifndef __TVGUIDE_TIMELINE_H
#define __TVGUIDE_TIMELINE_H #define __TVGUIDE_TIMELINE_H
#include "timemanager.h" #include "timer.h"
#include "styledpixmap.h" #include "styledpixmap.h"
// --- cTimeLine ------------------------------------------------------------- // --- cTimeLine -------------------------------------------------------------
class cTimeLine { class cTimeLine {
private: private:
cTimeManager *timeManager; cMyTime *myTime;
cStyledPixmap *dateViewer; cStyledPixmap *dateViewer;
cPixmap *timeline; cPixmap *timeline;
cStyledPixmap *clock; cStyledPixmap *clock;
cPixmap *timeBase; cPixmap *timeBase;
cString lastClock; void decorateTile(int posX, int posY, int tileWidth, int tileHeight);
void DecorateTile(int posX, int posY, int tileWidth, int tileHeight); void drawRoundedCorners(int posX, int posY, int width, int height, int radius);
void DrawRoundedCorners(int posX, int posY, int width, int height, int radius); cImage *createBackgroundImage(int width, int height, tColor clrBgr, tColor clrBlend);
cImage *CreateBackgroundImage(int width, int height, tColor clrBgr, tColor clrBlend); void drawCurrentTimeBase(void);
public: public:
cTimeLine(cTimeManager *timeManager); cTimeLine(cMyTime *myTime);
virtual ~cTimeLine(void); virtual ~cTimeLine(void);
void DrawDateViewer(void); void setTimeline();
void DrawTimeline(void); void drawDateViewer();
void DrawTimeIndicator(void); void drawTimeline();
bool DrawClock(void); void drawClock();
}; };
#endif //__TVGUIDE_TIMELINE_H #endif //__TVGUIDE_TIMELINE_H

View File

@ -1,178 +1,178 @@
#include <time.h> #include <time.h>
#include <vdr/tools.h> #include <vdr/tools.h>
#include "config.h" #include "config.h"
#include "timemanager.h" #include "timer.h"
cTimeManager::cTimeManager(void) { cMyTime::~cMyTime(void) {
if (config.displayMode == eVertical) { }
displaySeconds = (geoManager.osdHeight - geoManager.statusHeaderHeight - geoManager.channelHeaderHeight - geoManager.channelGroupsHeight - geoManager.footerHeight) / geoManager.minutePixel * 60;
} else if (config.displayMode == eHorizontal) { cString cMyTime::printTime(time_t displayTime) {
displaySeconds = (geoManager.osdWidth - geoManager.channelHeaderWidth - geoManager.channelGroupsWidth) / geoManager.minutePixel * 60; 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);
return strTime;
cTimeManager::~cTimeManager(void) { }
}
cString cTimeManager::printTime(time_t displayTime) { void cMyTime::Now() {
struct tm *ts; t = time(0);
ts = localtime(&displayTime); tStart = t;
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); tStart = GetRounded();
return strTime; if (tvguideConfig.displayMode == eVertical) {
} tEnd = tStart + (geoManager.osdHeight - geoManager.statusHeaderHeight - geoManager.channelHeaderHeight - geoManager.channelGroupsHeight - geoManager.footerHeight)/geoManager.minutePixel*60;
} else if (tvguideConfig.displayMode == eHorizontal) {
tEnd = tStart + (geoManager.osdWidth - geoManager.channelHeaderWidth - geoManager.channelGroupsWidth)/geoManager.minutePixel*60;
void cTimeManager::Now() { }
t = time(0); }
tStart = t;
tStart = GetRounded(); void cMyTime::AddStep(int step) {
tEnd = tStart + displaySeconds; tStart += step*60;
} tEnd += step*60;
}
void cTimeManager::AddStep(int step) {
tStart += step * 60; bool cMyTime::DelStep(int step) {
tEnd = tStart + displaySeconds; if ((tStart - step*60)+30*60 < t) {
} return true;
}
void cTimeManager::DelStep(int step) { tStart -= step*60;
if ((tStart - step * 60) + 30 * 60 < t) { tEnd -= step*60;
Now(); return false;
} else { }
tStart -= step * 60;
tEnd = tStart + displaySeconds; void cMyTime::SetTime(time_t newTime) {
} tStart = newTime;
} if (tvguideConfig.displayMode == eVertical) {
tEnd = tStart + (geoManager.osdHeight - geoManager.statusHeaderHeight - geoManager.channelHeaderHeight - geoManager.channelGroupsHeight - geoManager.footerHeight)/geoManager.minutePixel*60;
void cTimeManager::SetTime(time_t newTime) { } else if (tvguideConfig.displayMode == eHorizontal) {
tStart = newTime; tEnd = tStart + (geoManager.osdWidth - geoManager.channelHeaderWidth - geoManager.channelGroupsWidth)/geoManager.minutePixel*60;
tEnd = tStart + displaySeconds; }
} }
time_t cTimeManager::getPrevPrimetime(time_t current) { time_t cMyTime::getPrevPrimetime(time_t current) {
tm *st = localtime(&current); tm *st = localtime(&current);
if (st->tm_hour < 21) { if (st->tm_hour < 21) {
current -= 24 * 60 * 60; current -= 24 * 60* 60;
st = localtime(&current); st = localtime(&current);
} }
st->tm_hour = 20; st->tm_hour = 20;
st->tm_min = 0; st->tm_min = 0;
time_t primeTime = mktime(st); time_t primeTime = mktime(st);
return primeTime; return primeTime;
} }
time_t cTimeManager::getNextPrimetime(time_t current){ time_t cMyTime::getNextPrimetime(time_t current){
tm *st = localtime(&current); tm *st = localtime(&current);
if (st->tm_hour > 19) { if (st->tm_hour > 19) {
current += 24 * 60 * 60; current += 24 * 60* 60;
st = localtime(&current); st = localtime(&current);
} }
st->tm_hour = 20; st->tm_hour = 20;
st->tm_min = 0; st->tm_min = 0;
time_t primeTime = mktime(st); time_t primeTime = mktime(st);
return primeTime; return primeTime;
} }
bool cTimeManager::tooFarInPast(time_t current) { bool cMyTime::tooFarInPast(time_t current) {
if (current < t) { if (current < t) {
return true; return true;
} }
return false; return false;
} }
cString cTimeManager::GetCurrentTime() { cString cMyTime::GetCurrentTime() {
char buf[25]; char buf[25];
t = time(0); t = time(0);
tm *st = localtime(&t); tm *st = localtime(&t);
//snprintf(text, sizeof(text), "%d:%02d", st->tm_hour, st->tm_min); //snprintf(text, sizeof(text), "%d:%02d", st->tm_hour, st->tm_min);
if (config.timeFormat == e12Hours) { if (tvguideConfig.timeFormat == e12Hours) {
strftime(buf, sizeof(buf), "%I:%M %p", st); strftime(buf, sizeof(buf), "%I:%M %p", st);
} else if (config.timeFormat == e24Hours) } else if (tvguideConfig.timeFormat == e24Hours)
strftime(buf, sizeof(buf), "%H:%M", st); strftime(buf, sizeof(buf), "%H:%M", st);
return buf; return buf;
} }
cString cTimeManager::GetDate() { cString cMyTime::GetDate() {
char text[6]; char text[6];
tm *st = localtime(&tStart); tm *st = localtime(&tStart);
snprintf(text, sizeof(text), "%d.%d", st->tm_mday, st->tm_mon+1); snprintf(text, sizeof(text), "%d.%d", st->tm_mday, st->tm_mon+1);
return text; return text;
} }
cString cTimeManager::GetWeekday() { cString cMyTime::GetWeekday() {
return WeekDayName(tStart); return WeekDayName(tStart);
} }
int cTimeManager::GetTimelineOffset() { int cMyTime::GetTimelineOffset() {
tm *st = localtime(&tStart); tm *st = localtime(&tStart);
int offset = st->tm_hour*60; int offset = st->tm_hour*60;
offset += st->tm_min; offset += st->tm_min;
return offset; return offset;
} }
time_t cTimeManager::GetRounded() { time_t cMyTime::GetRounded() {
tm *rounded = localtime ( &tStart ); tm *rounded = localtime ( &tStart );
rounded->tm_sec = 0; rounded->tm_sec = 0;
if (rounded->tm_min > 29) if (rounded->tm_min > 29)
rounded->tm_min = 30; rounded->tm_min = 30;
else else
rounded->tm_min = 0; rounded->tm_min = 0;
return mktime(rounded); return mktime(rounded);
} }
bool cTimeManager::NowVisible(void) { bool cMyTime::NowVisible(void) {
if (t > tStart) if (t > tStart)
return true; return true;
return false; return false;
} }
void cTimeManager::debug() { void cMyTime::debug() {
esyslog("t: %s, tStart: %s, tEnd: %s", *TimeString(t), *TimeString(tStart), *TimeString(tEnd)); esyslog("t: %s, tStart: %s, tEnd: %s", *TimeString(t), *TimeString(tStart), *TimeString(tEnd));
} }
// --- cTimeInterval ------------------------------------------------------------- // --- cTimeInterval -------------------------------------------------------------
cTimeInterval::cTimeInterval(time_t start, time_t stop) { cTimeInterval::cTimeInterval(time_t start, time_t stop) {
this->start = start; this->start = start;
this->stop = stop; this->stop = stop;
} }
cTimeInterval::~cTimeInterval(void) { cTimeInterval::~cTimeInterval(void) {
} }
cTimeInterval *cTimeInterval::Intersect(cTimeInterval *interval) { cTimeInterval *cTimeInterval::Intersect(cTimeInterval *interval) {
time_t startIntersect, stopIntersect; time_t startIntersect, stopIntersect;
if ((stop <= interval->Start()) || (interval->Stop() <= start)) { if ((stop <= interval->Start()) || (interval->Stop() <= start)) {
return NULL; return NULL;
} }
if (start <= interval->Start()) { if (start <= interval->Start()) {
startIntersect = interval->Start(); startIntersect = interval->Start();
} else { } else {
startIntersect = start; startIntersect = start;
} }
if (stop <= interval->Stop()) { if (stop <= interval->Stop()) {
stopIntersect = stop; stopIntersect = stop;
} else { } else {
stopIntersect = interval->Stop(); stopIntersect = interval->Stop();
} }
return new cTimeInterval(startIntersect, stopIntersect); return new cTimeInterval(startIntersect, stopIntersect);
} }
cTimeInterval *cTimeInterval::Union(cTimeInterval *interval) { cTimeInterval *cTimeInterval::Union(cTimeInterval *interval) {
time_t startUnion, stopUnion; time_t startUnion, stopUnion;
if (start <= interval->Start()) { if (start <= interval->Start()) {
startUnion = start; startUnion = start;
} else { } else {
startUnion = interval->Start(); startUnion = interval->Start();
} }
if (stop <= interval->Stop()) { if (stop <= interval->Stop()) {
stopUnion = interval->Stop(); stopUnion = interval->Stop();
} else { } else {
stopUnion = stop; stopUnion = stop;
} }
return new cTimeInterval(startUnion, stopUnion); return new cTimeInterval(startUnion, stopUnion);
} }

View File

@ -1,56 +1,52 @@
#ifndef __TVGUIDE_TIMEMANAGER_H #ifndef __TVGUIDE_TIMER_H
#define __TVGUIDE_TIMEMANAGER_H #define __TVGUIDE_TIMER_H
#include <vdr/tools.h> #include <vdr/tools.h>
#include "config.h"
// --- cMyTime -------------------------------------------------------------
// --- cTimeManager -------------------------------------------------------------
class cMyTime {
class cTimeManager { private:
private: time_t t;
time_t t; time_t tStart;
time_t tStart; time_t tEnd;
time_t tEnd; public:
int displaySeconds; cMyTime(){};
eTimeFormat timeFormat; virtual ~cMyTime(void);
public: static cString printTime(time_t displayTime);
cTimeManager(); void Now();
virtual ~cTimeManager(void); time_t GetNow() { return t; };
static cString printTime(time_t displayTime); void AddStep(int step);
void Now(); bool DelStep(int step);
time_t GetNow() { return t; }; void SetTime(time_t newTime);
void AddStep(int step); time_t Get() {return t;};
void DelStep(int step); time_t GetStart() {return tStart;};
void SetTime(time_t newTime); time_t GetEnd() {return tEnd;};
time_t Get() {return t;}; cString GetCurrentTime();
time_t GetStart() {return tStart;}; cString GetDate();
time_t GetEnd() {return tEnd;}; cString GetWeekday();
cString GetCurrentTime(); time_t getPrevPrimetime(time_t current);
cString GetDate(); time_t getNextPrimetime(time_t current);
cString GetWeekday(); bool tooFarInPast(time_t current);
time_t getPrevPrimetime(time_t current); int GetTimelineOffset();
time_t getNextPrimetime(time_t current); time_t GetRounded();
bool tooFarInPast(time_t current); bool NowVisible(void);
int GetTimelineOffset(); void debug();
time_t GetRounded(); };
bool NowVisible(void);
int GetDisplaySeconds(void) { return displaySeconds; }; // --- cTimeInterval -------------------------------------------------------------
void debug();
}; class cTimeInterval {
private:
// --- cTimeInterval ------------------------------------------------------------- time_t start;
time_t stop;
class cTimeInterval { public:
private: cTimeInterval(time_t start, time_t stop);
time_t start; virtual ~cTimeInterval(void);
time_t stop; time_t Start(void) { return start; };
public: time_t Stop(void) { return stop; };
cTimeInterval(time_t start, time_t stop); cTimeInterval *Intersect(cTimeInterval *interval);
virtual ~cTimeInterval(void); cTimeInterval *Union(cTimeInterval *interval);
time_t Start(void) { return start; }; };
time_t Stop(void) { return stop; };
cTimeInterval *Intersect(cTimeInterval *interval); #endif //__TVGUIDE_TIMER_H
cTimeInterval *Union(cTimeInterval *interval);
};
#endif //__TVGUIDE_TIMEMANAGER_H

View File

@ -2,7 +2,7 @@
#include <vector> #include <vector>
#include <vdr/timers.h> #include <vdr/timers.h>
#include "tools.h" #include "tools.h"
#include "timemanager.h" #include "timer.h"
#include "timerconflict.h" #include "timerconflict.h"
cTVGuideTimerConflict::cTVGuideTimerConflict(void) { cTVGuideTimerConflict::cTVGuideTimerConflict(void) {
@ -16,11 +16,12 @@ cTVGuideTimerConflict::cTVGuideTimerConflict(void) {
} }
cTVGuideTimerConflict::~cTVGuideTimerConflict(void) { cTVGuideTimerConflict::~cTVGuideTimerConflict(void) {
} }
bool cTVGuideTimerConflict::timerInvolved(int involvedID) { bool cTVGuideTimerConflict::timerInvolved(int involvedID) {
int numConflicts = timerIDs.size(); int numConflicts = timerIDs.size();
for (int i = 0; i < numConflicts; i++) { for (int i=0; i<numConflicts; i++) {
if (timerIDs[i] == involvedID) if (timerIDs[i] == involvedID)
return true; return true;
} }
@ -43,12 +44,13 @@ cTVGuideTimerConflicts::~cTVGuideTimerConflicts(void) {
} }
void cTVGuideTimerConflicts::AddConflict(std::string epgSearchConflictLine) { void cTVGuideTimerConflicts::AddConflict(std::string epgSearchConflictLine) {
/* TIMERCONFLICT FORMAT: /* TIMERCONFLICT FORMAT:
The result list looks like this for example when we have 2 timer conflicts at one time: The result list looks like this for example when we have 2 timer conflicts at one time:
1190232780:152|30|50#152#45:45|10|50#152#45 1190232780:152|30|50#152#45:45|10|50#152#45
'1190232780' is the time of the conflict in seconds since 1970-01-01. '1190232780' is the time of the conflict in seconds since 1970-01-01.
It's followed by list of timers that have a conflict at this time: It's followed by list of timers that have a conflict at this time:
'152|30|50#152#45' is the description of the first conflicting timer. Here: '152|30|50#1 int editTimer(cTimer *timer, bool active, int prio, int start, int stop);
52#45' is the description of the first conflicting timer. Here:
'152' is VDR's timer id of this timer as returned from VDR's LSTT command '152' is VDR's timer id of this timer as returned from VDR's LSTT command
'30' is the percentage of recording that would be done (0...100) '30' is the percentage of recording that would be done (0...100)
'50#152#45' is the list of concurrent timers at this conflict '50#152#45' is the list of concurrent timers at this conflict
@ -84,13 +86,11 @@ void cTVGuideTimerConflicts::CalculateConflicts(void) {
#if VDRVERSNUM >= 20301 #if VDRVERSNUM >= 20301
LOCK_TIMERS_READ; LOCK_TIMERS_READ;
const cTimers* timers = Timers; const cTimers* timers = Timers;
for (int j=0; j < numTimers; j++) {
const cTimer *timer = timers->GetById(conflicts[i]->timerIDs[j] + 1);
#else #else
const cTimers* timers = &Timers; const cTimers* timers = &Timers;
#endif
for (int j=0; j < numTimers; j++) { for (int j=0; j < numTimers; j++) {
const cTimer *timer = timers->Get(conflicts[i]->timerIDs[j]); const cTimer *timer = timers->Get(conflicts[i]->timerIDs[j]);
#endif
if (timer) { if (timer) {
if (!unionSet) { if (!unionSet) {
unionSet = new cTimeInterval(timer->StartTime(), timer->StopTime()); unionSet = new cTimeInterval(timer->StartTime(), timer->StopTime());
@ -109,11 +109,7 @@ void cTVGuideTimerConflicts::CalculateConflicts(void) {
cTimeInterval *intersect = NULL; cTimeInterval *intersect = NULL;
for (int j=0; j < numTimers; j++) { for (int j=0; j < numTimers; j++) {
#if VDRVERSNUM >= 20301
const cTimer *timer = timers->GetById(conflicts[i]->timerIDs[j] + 1);
#else
const cTimer *timer = timers->Get(conflicts[i]->timerIDs[j]); const cTimer *timer = timers->Get(conflicts[i]->timerIDs[j]);
#endif
if (timer) { if (timer) {
if (!intersect) { if (!intersect) {
intersect = new cTimeInterval(timer->StartTime(), timer->StopTime()); intersect = new cTimeInterval(timer->StartTime(), timer->StopTime());
@ -156,7 +152,7 @@ int cTVGuideTimerConflicts::GetCurrentConflictTimerID(int timerIndex) {
int cTVGuideTimerConflicts::GetCorrespondingConflict(int timerID) { int cTVGuideTimerConflicts::GetCorrespondingConflict(int timerID) {
int conflictIndex = -1; int conflictIndex = -1;
if (numConflicts > 0) { if (numConflicts > 0) {
for (int i = 0; i < numConflicts; i++) { for (int i=0; i<numConflicts; i++) {
if (conflicts[i]->timerInvolved(timerID)) { if (conflicts[i]->timerInvolved(timerID)) {
conflictIndex = i; conflictIndex = i;
break; break;
@ -176,7 +172,7 @@ cTVGuideTimerConflict *cTVGuideTimerConflicts::GetConflict(int conflictIndex) {
std::vector<cTVGuideTimerConflict*> cTVGuideTimerConflicts::GetConflictsBetween(time_t start, time_t stop) { std::vector<cTVGuideTimerConflict*> cTVGuideTimerConflicts::GetConflictsBetween(time_t start, time_t stop) {
std::vector<cTVGuideTimerConflict*> conflictsFound; std::vector<cTVGuideTimerConflict*> conflictsFound;
for (int i = 0; i < numConflicts; i++) { for (int i=0; i < numConflicts; i++) {
if ((conflicts[i]->timeStart > start) && (conflicts[i]->timeStart < stop)|| if ((conflicts[i]->timeStart > start) && (conflicts[i]->timeStart < stop)||
(conflicts[i]->timeStop > start) && (conflicts[i]->timeStop < stop)) (conflicts[i]->timeStop > start) && (conflicts[i]->timeStop < stop))
conflictsFound.push_back(conflicts[i]); conflictsFound.push_back(conflicts[i]);

79
tools.c
View File

@ -10,6 +10,7 @@
#include <vdr/plugin.h> #include <vdr/plugin.h>
#include <vdr/skins.h> #include <vdr/skins.h>
#include "services/epgsearch.h" #include "services/epgsearch.h"
#include "tools.h" #include "tools.h"
cPlugin *GetScraperPlugin(void) { cPlugin *GetScraperPlugin(void) {
@ -22,49 +23,32 @@ cPlugin *GetScraperPlugin(void) {
/**************************************************************************************** /****************************************************************************************
* CUTTEXT * CUTTEXT
****************************************************************************************/ ****************************************************************************************/
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-min);
}
std::string CutText(std::string text, int width, const cFont *font) { std::string CutText(std::string text, int width, const cFont *font) {
int actWidth = font->Width(text.c_str()); if (width <= font->Size())
if (actWidth <= width) {
return text.c_str(); return text.c_str();
} else { if (font->Width(text.c_str()) < width)
int i = std::max(width / font->Size(), 1) - 1; return text.c_str();
std::string cuttext, oldtext; cTextWrapper twText;
cuttext = utf8_substr(text, 0, i); twText.Set(text.c_str(), font, width);
do { std::string cuttedTextNative = twText.GetLine(0);
oldtext = cuttext; std::stringstream sstrText;
i++; sstrText << cuttedTextNative << "...";
cuttext = utf8_substr(text, 0, i); std::string cuttedText = sstrText.str();
std::stringstream sstrText; int actWidth = font->Width(cuttedText.c_str());
sstrText << cuttext << "..."; if (actWidth > width) {
actWidth = font->Width(sstrText.str().c_str()); 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();
} }
while (actWidth < width);
std::stringstream sstrText2;
sstrText2 << oldtext << "...";
return sstrText2.str();
} }
return cuttedText;
} }
/**************************************************************************************** /****************************************************************************************
@ -129,6 +113,7 @@ void ReadRecordingDirectories(std::vector<std::string> *folders, cList<cNestedIt
} }
} }
/**************************************************************************************** /****************************************************************************************
* DrawRoundedCorners * DrawRoundedCorners
****************************************************************************************/ ****************************************************************************************/
@ -434,8 +419,8 @@ ALGORITHM
******************************************************************************/ ******************************************************************************/
int afuzzy_checkSUB(const char *t, AFUZZY *fuzzy) int afuzzy_checkSUB(const char *t, AFUZZY *fuzzy)
{ {
char c; register char c;
int j, d; register int j, d;
/* For eficciency this case should be little bit optimized */ /* For eficciency this case should be little bit optimized */
if (!fuzzy->k) if (!fuzzy->k)
@ -449,7 +434,7 @@ int afuzzy_checkSUB(const char *t, AFUZZY *fuzzy)
if (R1 & fuzzy->mask_ok) if (R1 & fuzzy->mask_ok)
return 1; return 1;
} /* end for (int j = 0 ... */ } /* end for (register int j = 0 ... */
return 0; return 0;
} }
@ -473,16 +458,16 @@ int afuzzy_checkSUB(const char *t, AFUZZY *fuzzy)
memcpy(fuzzy->R, fuzzy->R1, fuzzy->r_size); memcpy(fuzzy->R, fuzzy->R1, fuzzy->r_size);
} /* end for (int j = 0 ... */ } /* end for (register int j = 0 ... */
return 0; return 0;
} }
int afuzzy_checkFLT(const char *t, AFUZZY *fuzzy) int afuzzy_checkFLT(const char *t, AFUZZY *fuzzy)
{ {
Uint FilterR = 0; register Uint FilterR = 0;
Uint FilterR1; register Uint FilterR1;
int j; register int j;
for (j = 0; t[j] != '\0'; j++) for (j = 0; t[j] != '\0'; j++)
{ {
@ -491,7 +476,7 @@ int afuzzy_checkFLT(const char *t, AFUZZY *fuzzy)
if (FilterR1 & fuzzy->filter_ok) if (FilterR1 & fuzzy->filter_ok)
return 1; return 1;
FilterR = FilterR1; FilterR = FilterR1;
} /* end for (int j = 0 ... */ } /* end for (register int j = 0 ... */
return 0; return 0;
} }

View File

@ -9,7 +9,6 @@
cPlugin *GetScraperPlugin(void); 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 CutText(std::string text, int width, const cFont *font);
std::string StrToLowerCase(std::string str); std::string StrToLowerCase(std::string str);
std::string GetDirectoryFromTimer(std::string file); std::string GetDirectoryFromTimer(std::string file);

View File

@ -12,7 +12,6 @@
#include <vdr/plugin.h> #include <vdr/plugin.h>
#include <vdr/device.h> #include <vdr/device.h>
#include <vdr/menu.h> #include <vdr/menu.h>
#include <Magick++.h>
#define DEFINE_CONFIG 1 #define DEFINE_CONFIG 1
#include "geometrymanager.h" #include "geometrymanager.h"
@ -27,7 +26,7 @@
#error "VDR-2.0.0 API version or greater is required!" #error "VDR-2.0.0 API version or greater is required!"
#endif #endif
static const char *VERSION = "1.3.6"; static const char *VERSION = "1.2.6";
static const char *DESCRIPTION = tr("A fancy 2d EPG Viewer"); static const char *DESCRIPTION = tr("A fancy 2d EPG Viewer");
static const char *MAINMENUENTRY = "Tvguide"; static const char *MAINMENUENTRY = "Tvguide";
@ -46,7 +45,7 @@ public:
virtual void MainThreadHook(void); virtual void MainThreadHook(void);
virtual cString Active(void); virtual cString Active(void);
virtual time_t WakeupTime(void); virtual time_t WakeupTime(void);
virtual const char *MainMenuEntry(void) { return (config.showMainMenuEntry) ? MAINMENUENTRY : NULL; } virtual const char *MainMenuEntry(void) { return (tvguideConfig.showMainMenuEntry)?MAINMENUENTRY:NULL; }
virtual cOsdObject *MainMenuAction(void); virtual cOsdObject *MainMenuAction(void);
virtual cMenuSetupPage *SetupMenu(void); virtual cMenuSetupPage *SetupMenu(void);
virtual bool SetupParse(const char *Name, const char *Value); virtual bool SetupParse(const char *Name, const char *Value);
@ -63,9 +62,9 @@ cPluginTvguide::~cPluginTvguide() {
const char *cPluginTvguide::CommandLineHelp(void) { const char *cPluginTvguide::CommandLineHelp(void) {
return return
" -e <IMAGESDIR>, --epgimages=<IMAGESDIR> Set directory where epgimages are stored.\n" " -e <IMAGESDIR>, --epgimages=<IMAGESDIR> Set directory where epgimages are stored.\n"
" -i <ICONDIR>, --iconpath=<ICONDIR> Set directory where icons are stored.\n" " -i <ICONDIR>, --icons=<ICONDIR> Set directory where icons are stored.\n"
" -l <LOGODIR>, --logopath=<LOGODIR> Set directory where logos are stored.\n"; " -l <LOGODIR>, --logodir=<LOGODIR> Set directory where logos are stored.\n";
} }
bool cPluginTvguide::ProcessArgs(int argc, char *argv[]) { bool cPluginTvguide::ProcessArgs(int argc, char *argv[]) {
@ -79,13 +78,13 @@ bool cPluginTvguide::ProcessArgs(int argc, char *argv[]) {
while ((c = getopt_long(argc, argv, "e:i:l:", long_options, NULL)) != -1) { while ((c = getopt_long(argc, argv, "e:i:l:", long_options, NULL)) != -1) {
switch (c) { switch (c) {
case 'e': case 'e':
config.SetImagesPath(cString(optarg)); tvguideConfig.SetImagesPath(cString(optarg));
break; break;
case 'i': case 'i':
config.SetIconsPath(cString(optarg)); tvguideConfig.SetIconsPath(cString(optarg));
break; break;
case 'l': case 'l':
config.SetLogoPath(cString(optarg)); tvguideConfig.SetLogoPath(cString(optarg));
break; break;
default: default:
return false; return false;
@ -94,15 +93,11 @@ bool cPluginTvguide::ProcessArgs(int argc, char *argv[]) {
return true; return true;
} }
__attribute__((constructor)) static void init(void) {
Magick::InitializeMagick(NULL);
}
bool cPluginTvguide::Initialize(void) { bool cPluginTvguide::Initialize(void) {
config.SetDefaultPathes(); tvguideConfig.SetDefaultPathes();
config.LoadTheme(); tvguideConfig.LoadTheme();
config.SetStyle(); tvguideConfig.SetStyle();
config.setDynamicValues(); tvguideConfig.setDynamicValues();
geoManager.SetGeometry(cOsd::OsdWidth(), cOsd::OsdHeight()); geoManager.SetGeometry(cOsd::OsdWidth(), cOsd::OsdHeight());
fontManager.SetFonts(); fontManager.SetFonts();
imgCache.CreateCache(); imgCache.CreateCache();
@ -139,11 +134,11 @@ cMenuSetupPage *cPluginTvguide::SetupMenu(void) {
} }
bool cPluginTvguide::SetupParse(const char *Name, const char *Value) { bool cPluginTvguide::SetupParse(const char *Name, const char *Value) {
return config.SetupParse(Name, Value); return tvguideConfig.SetupParse(Name, Value);
} }
bool cPluginTvguide::Service(const char *Id, void *Data) { bool cPluginTvguide::Service(const char *Id, void *Data) {
if (strcmp(Id, "MainMenuHooksPatch-v1.0::osSchedule") == 0 && config.replaceOriginalSchedule != 0) { if (strcmp(Id, "MainMenuHooksPatch-v1.0::osSchedule") == 0 && tvguideConfig.replaceOriginalSchedule != 0) {
if (Data == NULL) if (Data == NULL)
return true; return true;
cOsdObject **guide = (cOsdObject**) Data; cOsdObject **guide = (cOsdObject**) Data;

File diff suppressed because it is too large Load Diff

View File

@ -1,66 +1,65 @@
#ifndef __TVGUIDE_TVGUIDEOSD_H #ifndef __TVGUIDE_TVGUIDEOSD_H
#define __TVGUIDE_TVGUIDEOSD_H #define __TVGUIDE_TVGUIDEOSD_H
#include "timemanager.h" #include "timer.h"
#include "gridelement.h" #include "grid.h"
#include "channelepg.h" #include "channelcolumn.h"
#include "statusheader.h" #include "statusheader.h"
#include "detailview.h" #include "detailview.h"
#include "timeline.h" #include "timeline.h"
#include "channelgroups.h" #include "channelgroups.h"
#include "footer.h" #include "footer.h"
#include "recmenuview.h" #include "recmenumanager.h"
#include "channeljump.h" #include "channeljump.h"
// --- cTvGuideOsd ------------------------------------------------------------- // --- cTvGuideOsd -------------------------------------------------------------
class cTvGuideOsd : public cOsdObject { class cTvGuideOsd : public cOsdObject {
private: private:
cTimeManager *timeManager; cMyTime *myTime;
cList<cChannelEpg> columns; cList<cChannelColumn> columns;
cGridElement *activeGrid; cGrid *activeGrid;
cStatusHeader *statusHeader; cStatusHeader *statusHeader;
cDetailView *detailView; cDetailView *detailView;
cTimeLine *timeLine; cTimeLine *timeLine;
cChannelGroups *channelGroups; cChannelGroups *channelGroups;
cFooter *footer; cFooter *footer;
cRecMenuView *recMenuView; cRecMenuManager *recMenuManager;
cChannelJump *channelJumper; cChannelJump *channelJumper;
int GetLastValidChannel(void); bool detailViewActive;
bool detailViewActive; void drawOsd();
void drawOsd(); void readChannels(const cChannel *channelStart);
void readChannels(const cChannel *channelStart); void drawGridsChannelJump(int offset = 0);
void drawGridsChannelJump(int offset = 0); void drawGridsTimeJump();
void drawGridsTimeJump(bool last = false); void processKeyUp();
void processKeyUp(); void processKeyDown();
void processKeyDown(); void processKeyLeft();
void processKeyLeft(); void processKeyRight();
void processKeyRight(); void processKeyRed();
void processKeyRed(); void processKeyGreen();
void processKeyGreen(); void processKeyYellow();
void processKeyYellow(); eOSState processKeyBlue(bool *alreadyUnlocked);
eOSState processKeyBlue(bool *alreadyUnlocked); eOSState processKeyOk(bool *alreadyUnlocked);
eOSState processKeyOk(bool *alreadyUnlocked); void processNumKey(int numKey);
void processNumKey(int numKey); void TimeJump(int mode);
void TimeJump(int mode); void ChannelJump(int num);
void ChannelJump(int num); void CheckTimeout(void);
void CheckTimeout(void); void setNextActiveGrid(cGrid *next);
void setNextActiveGrid(cGridElement *next); void channelForward();
void channelForward(); void channelBack();
void channelBack(); void timeForward();
void timeForward(); void timeBack();
void timeBack(); void ScrollForward();
void ScrollForward(); void ScrollBack();
void ScrollBack(); eOSState ChannelSwitch(bool *alreadyUnlocked);
eOSState ChannelSwitch(bool *alreadyUnlocked); void DetailedEPG();
void DetailedEPG(); void SetTimers();
void SetTimers(); void dump();
void dump(); public:
public: cTvGuideOsd(void);
cTvGuideOsd(void); virtual ~cTvGuideOsd(void);
virtual ~cTvGuideOsd(void); virtual void Show(void);
virtual void Show(void); virtual eOSState ProcessKey(eKeys Key);
virtual eOSState ProcessKey(eKeys Key); };
};
#endif //__TVGUIDE_TVGUIDEOSD_H
#endif //__TVGUIDE_TVGUIDEOSD_H

2130
view.c

File diff suppressed because it is too large Load Diff

299
view.h
View File

@ -1,150 +1,149 @@
#ifndef __TVGUIDE_VIEW_H #ifndef __TVGUIDE_VIEW_H
#define __TVGUIDE_VIEW_H #define __TVGUIDE_VIEW_H
#include <vector> #include <vector>
#include <string> #include <string>
#include <sstream> #include <sstream>
#include <vdr/skins.h> #include <vdr/skins.h>
#include "services/scraper2vdr.h" #include "services/scraper2vdr.h"
#include "services/epgsearch.h" #include "services/epgsearch.h"
#include "services/remotetimers.h" #include "services/remotetimers.h"
#include "config.h" #include "config.h"
#include "imagecache.h" #include "imagecache.h"
#include "imageloader.h" #include "imageloader.h"
#include "tools.h" #include "tools.h"
enum eEPGViewTabs { enum eEPGViewTabs {
evtInfo = 0, evtInfo = 0,
evtAddInfo, evtAddInfo,
evtImages, evtImages,
evtCount evtCount
}; };
enum eMediaViewTabs { enum eMediaViewTabs {
mvtInfo = 0, mvtInfo = 0,
mvtAddInfo, mvtAddInfo,
mvtCast, mvtCast,
mvtOnlineInfo, mvtOnlineInfo,
mvtImages, mvtImages,
mvtCount mvtCount
}; };
class cView : public cThread { class cView : public cThread {
protected: protected:
const cEvent *event; const cEvent *event;
cPixmap *pixmapBackground; cPixmap *pixmapBackground;
cStyledPixmap *pixmapHeader; cStyledPixmap *pixmapHeader;
cPixmap *pixmapHeaderLogo; cPixmap *pixmapHeaderLogo;
cPixmap *pixmapContent; cPixmap *pixmapContent;
cPixmap *pixmapScrollbar; cPixmap *pixmapScrollbar;
cPixmap *pixmapScrollbarBack; cPixmap *pixmapScrollbarBack;
cPixmap *pixmapTabs; cPixmap *pixmapTabs;
cFont *font, *fontSmall, *fontHeader, *fontHeaderLarge; cFont *font, *fontSmall, *fontHeader, *fontHeaderLarge;
cImage *imgScrollBar; cImage *imgScrollBar;
int activeView; int activeView;
bool scrollable; bool scrollable;
bool tabbed; bool tabbed;
int x, y; int x, y;
int width, height; int width, height;
int border; int border;
int headerWidth, headerHeight; int headerWidth, headerHeight;
int contentHeight; int contentHeight;
int tabHeight; int tabHeight;
int scrollbarWidth; int scrollbarWidth;
cTextWrapper wrapper; std::vector<std::string> tabs;
std::vector<std::string> tabs; std::string title;
std::string title; std::string subTitle;
std::string subTitle; std::string dateTime;
std::string dateTime; std::string infoText;
std::string infoText; std::string addInfoText;
std::string addInfoText; const cChannel *channel;
const cChannel *channel; int eventID;
int eventID; bool headerDrawn;
bool headerDrawn; void DrawHeader(void);
void DrawHeader(void); void ClearContent(void);
void ClearContent(void); void CreateContent(int fullHeight);
void CreateContent(int fullHeight); void DrawContent(std::string *text);
void DrawContent(std::string *text); void DrawFloatingContent(std::string *infoText, cTvMedia *img, cTvMedia *img2 = NULL);
void DrawFloatingContent(std::string *infoText, cTvMedia *img, cTvMedia *img2 = NULL); void CreateFloatingTextWrapper(cTextWrapper *twNarrow, cTextWrapper *twFull, std::string *text, int widthImg, int heightImg);
void CreateFloatingTextWrapper(cTextWrapper *twNarrow, cTextWrapper *twFull, std::string *text, int widthImg, int heightImg); void DrawActors(std::vector<cActor> *actors);
void DrawActors(std::vector<cActor> *actors); void ClearScrollbar(void);
void ClearScrollbar(void); void ClearScrollbarImage(void);
void ClearScrollbarImage(void); cImage *CreateScrollbarImage(int width, int height, tColor clrBgr, tColor clrBlend);
cImage *CreateScrollbarImage(int width, int height, tColor clrBgr, tColor clrBlend); virtual void SetTabs(void) {};
virtual void SetTabs(void) {}; void DrawTabs(void);
void DrawTabs(void); public:
public: cView(void);
cView(void); virtual ~cView(void);
virtual ~cView(void); void SetTitle(const char *t) { title = t ? t : ""; };
void SetTitle(const char *t) { title = t ? t : ""; }; void SetSubTitle(const char *s) { subTitle = s ? s : ""; };
void SetSubTitle(const char *s) { subTitle = s ? s : ""; }; void SetDateTime(const char *dt) { dateTime = dt; };
void SetDateTime(const char *dt) { dateTime = dt; }; void SetInfoText(const char *i) { infoText = i ? i : ""; };
void SetInfoText(const char *i) { infoText = i ? i : ""; }; void SetAdditionalInfoText(std::string addInfo) { addInfoText = addInfo; };
void SetAdditionalInfoText(std::string addInfo) { addInfoText = addInfo; }; void SetChannel(const cChannel *c) { channel = c; };
void SetChannel(const cChannel *c) { channel = c; }; void SetEventID(int id) { eventID = id; };
void SetEventID(int id) { eventID = id; }; void SetEvent(const cEvent *event) { this->event = event; };
void SetEvent(const cEvent *event) { this->event = event; }; virtual void LoadMedia(void) {};
virtual void LoadMedia(void) {}; void SetGeometry(void);
void SetGeometry(void); void SetFonts(void);
void SetFonts(void); virtual bool KeyUp(void);
virtual bool KeyUp(void); virtual bool KeyDown(void);
virtual bool KeyDown(void); virtual void KeyLeft(void) {};
virtual void KeyLeft(void) {}; virtual void KeyRight(void) {};
virtual void KeyRight(void) {}; void DrawScrollbar(void);
void DrawScrollbar(void); virtual void Action(void) {};
virtual void Action(void) {}; };
};
class cEPGView : public cView {
class cEPGView : public cView { protected:
protected: std::vector<std::string> epgPics;
std::vector<std::string> epgPics; int numEPGPics;
int numEPGPics; int numTabs;
int numTabs; void SetTabs(void);
void SetTabs(void); void CheckEPGImages(void);
void CheckEPGImages(void); void DrawImages(void);
void DrawImages(void); public:
public: cEPGView(void);
cEPGView(void); virtual ~cEPGView(void);
virtual ~cEPGView(void); void KeyLeft(void);
void KeyLeft(void); void KeyRight(void);
void KeyRight(void); void Action(void);
void Action(void); };
};
class cSeriesView : public cView {
class cSeriesView : public cView { protected:
protected: int seriesId;
int seriesId; int episodeId;
int episodeId; cSeries series;
cSeries series; std::string tvdbInfo;
std::string tvdbInfo; void SetTabs(void);
void SetTabs(void); void CreateTVDBInfo(void);
void CreateTVDBInfo(void); void DrawImages(void);
void DrawImages(void); int GetRandomPoster(void);
int GetRandomPoster(void); public:
public: cSeriesView(int seriesId, int episodeId);
cSeriesView(int seriesId, int episodeId); virtual ~cSeriesView(void);
virtual ~cSeriesView(void); void LoadMedia(void);
void LoadMedia(void); void KeyLeft(void);
void KeyLeft(void); void KeyRight(void);
void KeyRight(void); void Action(void);
void Action(void); };
};
class cMovieView : public cView {
class cMovieView : public cView { protected:
protected: int movieId;
int movieId; cMovie movie;
cMovie movie; std::string movieDBInfo;
std::string movieDBInfo; void SetTabs(void);
void SetTabs(void); void CreateMovieDBInfo(void);
void CreateMovieDBInfo(void); void DrawImages(void);
void DrawImages(void); public:
public: cMovieView(int movieId);
cMovieView(int movieId); virtual ~cMovieView(void);
virtual ~cMovieView(void); void LoadMedia(void);
void LoadMedia(void); void KeyLeft(void);
void KeyLeft(void); void KeyRight(void);
void KeyRight(void); void Action(void);
void Action(void); };
};
#endif //__TVGUIDE_VIEW_H
#endif //__TVGUIDE_VIEW_H