107 Commits

Author SHA1 Message Date
kamel5
5ef383453f Version 1.3.6 2022-06-25 13:30:04 +02:00
kamel5
5638c408c1 Better fit channel logo in search result 2022-06-25 13:29:18 +02:00
kamel5
519a87a471 Adapt epgsearch "allow empty" in searchtimer edit 2022-06-25 13:12:24 +02:00
kamel5
a87a1db7c2 Remove SetHeader and SetFooter 2022-06-25 13:00:13 +02:00
kamel5
00ea3fb5ff Rename isDummy() to IsDummy() 2022-06-18 17:03:15 +02:00
kamel5
93af9304c8 Cosmetic change in osdmanager.* 2022-06-18 17:03:15 +02:00
kamel5
d8663ff309 Cosmetic change in geometrymanager.c 2022-06-18 17:03:15 +02:00
kamel5
8e26759d4e Rename GetTimerValue() to GetTimer() 2022-06-18 17:03:15 +02:00
kamel5
5923c9c0ed Rename setActive() to SetActive() 2022-06-18 17:03:15 +02:00
kamel5
6174461af6 Rename isActive() to IsActive() 2022-06-18 17:03:15 +02:00
kamel5
018a8946b7 Rename GetEventValue() to GetEvent() 2022-06-18 17:03:15 +02:00
kamel5
c3dbae705a Rename GetActive() to GetNumActive() 2022-06-18 17:03:15 +02:00
kamel5
0289731158 Refactor cRecMenuTimeline 2022-06-18 17:03:15 +02:00
kamel5
1f1498a734 Refactor cRecMenuAskFolder 2022-06-18 17:03:15 +02:00
kamel5
e707ec7d4f Refactor cRecMenuFavorites 2022-06-18 17:03:15 +02:00
kamel5
bb7d03c7ed Refactor cRecMenuRecordingSearchNotFound 2022-06-18 17:03:15 +02:00
kamel5
b804b63353 Refactor cRecMenuRecordingSearchResults 2022-06-18 17:03:15 +02:00
kamel5
a7e0aacdf1 Refactor cRecMenuRecordingSearch 2022-06-18 17:03:15 +02:00
kamel5
37a31d0768 Refactor cRecMenuSearchConfirmTimer 2022-06-18 17:03:15 +02:00
kamel5
380e84afcd Refactor cRecMenuSearchNothingFound 2022-06-18 17:03:15 +02:00
kamel5
412a78a112 Refactor cRecMenuSearchResults 2022-06-18 17:03:15 +02:00
kamel5
5cc50e465d Refactor cRecMenuSearch 2022-06-18 17:03:15 +02:00
kamel5
a3dc78f70a Refactor cRecMenuSwitchTimerDelete 2022-06-18 17:03:15 +02:00
kamel5
403af35519 Refactor cRecMenuSwitchTimerConfirm 2022-06-18 17:03:15 +02:00
kamel5
97c8bc23fd Refactor cRecMenuSwitchTimer 2022-06-18 17:03:15 +02:00
kamel5
95fd68a6be Refactor cRecMenuSearchTimerNothingFound 2022-06-18 17:03:15 +02:00
kamel5
66659a865d Refactor cRecMenuSearchTimerResults 2022-06-18 17:03:15 +02:00
kamel5
4f95cffdb2 Refactor cRecMenuSearchTimerTemplatesCreate 2022-06-18 17:03:15 +02:00
kamel5
7f7a16498c Refactor cRecMenuSearchTimerCreateConfirm 2022-06-18 17:03:15 +02:00
kamel5
f900446195 Refactor cRecMenuSearchTimerDeleteConfirm 2022-06-18 17:03:15 +02:00
kamel5
d24bbefe4c Refactor cRecMenuSearchTimerEdit 2022-06-18 17:03:15 +02:00
kamel5
54ce728fa5 Refactor cRecMenuSearchTimers 2022-06-18 17:03:15 +02:00
kamel5
a4cc2a4fa8 Refactor cRecMenuSearchTimerTemplates 2022-06-18 17:03:15 +02:00
kamel5
30fc49af0c Refactor cRecMenuSearchTimer 2022-06-18 17:03:15 +02:00
kamel5
cf9250e50b Refactor cRecMenuConfirmSeriesTimer 2022-06-18 17:03:15 +02:00
kamel5
2531526a4d Refactor cRecMenuSeriesTimer 2022-06-18 17:03:15 +02:00
kamel5
37db3b185c Refactor cRecMenuEditTimer 2022-06-18 17:03:15 +02:00
kamel5
e4ef6c4ee5 Refactor cRecMenuConfirmRerunUsed 2022-06-18 17:03:15 +02:00
kamel5
51b1896c6d Refactor cRecMenuNoRerunsFound 2022-06-18 17:03:15 +02:00
kamel5
ec7d45f960 Refactor cRecMenuRerunResults 2022-06-18 17:03:15 +02:00
kamel5
0837137ea8 Refactor cRecMenuNoTimerConflict 2022-06-18 17:03:15 +02:00
kamel5
33196207d0 Refactor cRecMenuTimerConflict 2022-06-18 17:03:15 +02:00
kamel5
73e331f97f Refactor cRecMenuTimerConflicts 2022-06-18 17:03:15 +02:00
kamel5
56cab4a666 Refactor cRecMenuAskDeleteTimer 2022-06-18 17:03:15 +02:00
kamel5
a4294b1f54 Refactor cRecMenuConfirmDeleteTimer 2022-06-18 17:03:15 +02:00
kamel5
ce690366f8 Refactor cRecMenuConfirmTimer 2022-06-18 17:03:02 +02:00
kamel5
9565eda1aa Fix typo 2022-06-18 16:10:07 +02:00
kamel5
637617bd12 Fix a segfault
In the function "cDetailView::InitiateView" there was a
segfault when the "call->type = tNone".
2022-06-18 12:38:50 +02:00
kamel5
eb259fb961 Fixed possible segfault when showing scrollbar in search result lists
A segfault is possible if numSteps is greater than height in
"cRecMenu::createScrollbar()".
2022-04-29 12:18:36 +02:00
kamel5
e2d67769dc Changed the size and location of the channel logos to better fit in place
This leads to a better positioning of the channel logos if they are
displayed in the EPG grid
2022-04-29 12:08:51 +02:00
kamel5
936db4a087 Display errors in search recordings 2021-12-15 15:20:34 +01:00
kamel5
6af3193b02 In menu "Search Recordins" get ChannelName from 'RecInfo'
Alternatively fallback via 'ChannelID' from the active channel list.
2021-12-15 14:48:39 +01:00
kamel5
2d46769a3e Eliminate "Warnung: ISO-C++17 erlaubt Speicherklassenangabe »register« nicht [-Wregister]" 2021-12-15 14:42:41 +01:00
kamel5
6663910058 Version 1.3.5 2021-05-22 11:43:26 +02:00
kamel5
896a4abf75 Update iceblue theme 2021-05-22 11:41:31 +02:00
kamel5
4e062c0a8d Fix for VDR-2.5.4 2021-05-22 11:40:58 +02:00
kamel5
2f497adf01 Version 1.3.4 2021-01-11 11:36:25 +01:00
kamel5
decfb2d39d Coemetic changes 2021-01-11 11:33:16 +01:00
kamel5
5f4ea6b30d gcc11fix 2021-01-11 11:19:01 +01:00
kamel5
435a74d9cf Version 1.3.3 2020-08-06 19:05:42 +02:00
kamel5
fc47c35bea Version 1.3.2 2020-08-06 12:47:03 +02:00
kamel5
4d80c6900d Optional deactivation of the timer confirmation messages 2020-08-06 12:47:03 +02:00
kamel5
78d6e980ee Wrap title in detailview header 2020-08-06 12:47:03 +02:00
kamel5
69356e9c43 Add "Timer On/Off" to recmenu 2020-08-06 12:46:59 +02:00
kamel5
bf3a8a430b Center some channel logos 2020-08-02 19:50:55 +02:00
kamel5
52c41ff5af Fixed display groupname in cChannelGroupGrid::DrawHorizontal 2020-07-25 13:35:03 +02:00
kamel5
5870b1ae4c Version 1.3.1 2020-03-11 15:08:32 +01:00
kamel5
69b851c9ed Fixed a segfault 2020-03-11 14:59:03 +01:00
kamel5
8335ab0e41 Fixes for <VDR-2.3.1 compatibility 2020-03-07 16:55:49 +01:00
kamel5
240cbe87e0 Version 1.3.0 2020-03-06 14:03:36 +01:00
kamel5
ee68d2eb2f Fixed messages in DisplayTimerConflict 2020-03-06 14:01:47 +01:00
kamel5
eb3a4113be Fixed horizontal alignment in timeline 2020-03-06 14:01:47 +01:00
kamel5
7ec89bf12b Fixed stopIndex in cRecMenu::JumpBegin 2020-03-06 14:01:47 +01:00
kamel5
f653594c4a Fixes for <VDR-2.3.1 compatibility 2020-03-04 15:26:27 +01:00
kamel5
8129d116fb Show numTimersToday in timeline 2020-03-02 13:33:58 +01:00
kamel5
874f5cd9d5 Fixed a problem in DisplayTimerConflict 2020-03-02 12:47:04 +01:00
kamel5
9044e092f8 Version 1.2.17 2020-02-17 16:08:14 +01:00
kamel5
b96f800240 Add episode to manual timer 2020-02-17 16:05:43 +01:00
kamel5
5d9ed1439a Fixed a remote timer problem 2020-02-17 15:51:51 +01:00
kamel5
66a0c15aea Final fix for utf8 CutText 2020-02-17 15:51:47 +01:00
kamel5
8db88c2556 Version 1.2.16 2020-01-10 11:11:55 +01:00
kamel5
509b64d78f RecMenu "Timer Timeline" displays now sorted active timer 2020-01-10 11:05:28 +01:00
kamel5
15b7074b4e Separate "displayTime" for horizontal and vertical view 2020-01-09 14:30:05 +01:00
kamel5
3fee6ab13f Optimize display "REC" sign in epgview 2020-01-09 14:29:47 +01:00
kamel5
ffd3e2c79f Refactor CutText in horizontal epgview 2020-01-09 14:29:30 +01:00
kamel5
c77f74321f Refactor Timeline 2020-01-06 15:14:45 +01:00
kamel5
efe06b8e98 Fixed a possible deadlook in cEPGView::cEPGView 2020-01-06 15:14:45 +01:00
kamel5
6540e21444 Optimize TimeJump 2020-01-06 15:14:45 +01:00
kamel5
2e4a43133e Fixed a error in DeleteTimerConflictMenu 2020-01-06 15:14:45 +01:00
kamel5
bcf2ce757c Fixed a timer changed message 2020-01-06 15:14:42 +01:00
kamel5
263a734a0d Version 1.2.15 2019-11-03 13:46:13 +01:00
kamel5
7300fdf91c Workaround for HWAccelerated OSD 2019-11-03 13:08:07 +01:00
kamel5
89e9086943 Version 1.2.14 2019-10-19 16:41:09 +02:00
kamel5
e236d9e571 Optimize cTimeLine::drawClock 2019-10-19 15:10:20 +02:00
kamel5
8794891599 Fixed a error while changing a Theme 2019-10-19 15:10:13 +02:00
kamel5
cd62a9bd6b Diplay the current TimeBase throughout the whole timeline 2019-10-19 15:10:06 +02:00
kamel5
3f0bd75011 Can switch off and optimize diplay time in epggrid "displayMode == Vertical" 2019-10-19 15:09:59 +02:00
kamel5
a711aed160 Version 1.2.13 2019-10-14 18:16:28 +02:00
kamel5
cdb5a46145 Revert "Diplay the current TimeBase throughout the whole timeline"
This reverts commit b707292 because of a segfault.
2019-10-14 16:51:52 +02:00
kamel5
fc784f34e5 Version 1.2.12 2019-10-14 12:58:40 +02:00
kamel5
b707292485 Diplay the current TimeBase throughout the whole timeline 2019-10-14 12:58:35 +02:00
kamel5
587fbe1f44 Fixed updating current TimeBase 2019-10-13 13:46:29 +02:00
kamel5
9173d14b10 Fixed updating current time 2019-10-13 13:46:23 +02:00
kamel5
3386c05e91 Version 1.2.11 2019-09-07 17:32:20 +02:00
kamel5
a1eaf7a865 Optical change in cMenuSetupImageCache 2019-09-07 17:24:01 +02:00
kamel5
41eb32389d Fixed a possible deadlock in detailview 2019-09-07 17:23:32 +02:00
kamel5
f4369c0772 Fix a segfault with graphicsmagick > 1.3.31 2019-09-05 17:08:12 +02:00
54 changed files with 2150 additions and 1614 deletions

91
HISTORY
View File

@@ -210,3 +210,94 @@ Version 1.2.10
- Simplify cRecMenuSearchTimerEdit::GetSearchTimer - Simplify cRecMenuSearchTimerEdit::GetSearchTimer
- Fixed cRecMenuItemSelectDirectory::DrawValue - Fixed cRecMenuItemSelectDirectory::DrawValue
- Some rework - 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

@@ -130,9 +130,11 @@ int cChannelEpg::getY() {
return geoManager.statusHeaderHeight + geoManager.timeLineHeight + num*geoManager.rowHeight; return geoManager.statusHeaderHeight + geoManager.timeLineHeight + num*geoManager.rowHeight;
} }
cGridElement *cChannelEpg::getActive() { cGridElement *cChannelEpg::getActive(bool last) {
cTimeManager t; cTimeManager t;
t.Now(); t.Now();
if (last)
return grids.Last();
for (cGridElement *grid = grids.First(); grid; grid = grids.Next(grid)) { for (cGridElement *grid = grids.First(); grid; grid = grids.Next(grid)) {
if (grid->Match(t.Get())) if (grid->Match(t.Get()))
return grid; return grid;
@@ -212,7 +214,7 @@ 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(timeManager->GetStart());
firstGrid->SetEndTime(timeManager->GetEnd()); firstGrid->SetEndTime(timeManager->GetEnd());
} }
@@ -236,7 +238,7 @@ void cChannelEpg::AddNewGridsAtStart() {
} }
if (dummyNeeded) { if (dummyNeeded) {
firstGrid = grids.First(); firstGrid = grids.First();
if (firstGrid->isDummy()) { if (firstGrid->IsDummy()) {
firstGrid->SetStartTime(timeManager->GetStart()); firstGrid->SetStartTime(timeManager->GetStart());
if (firstGrid->EndTime() >= timeManager->GetEnd()) if (firstGrid->EndTime() >= timeManager->GetEnd())
firstGrid->SetEndTime(timeManager->GetEnd()); firstGrid->SetEndTime(timeManager->GetEnd());
@@ -268,7 +270,7 @@ 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(timeManager->GetStart());
lastGrid->SetEndTime(timeManager->GetEnd()); lastGrid->SetEndTime(timeManager->GetEnd());
} }
@@ -291,7 +293,7 @@ void cChannelEpg::AddNewGridsAtEnd() {
} }
if (dummyNeeded) { if (dummyNeeded) {
lastGrid = grids.Last(); lastGrid = grids.Last();
if (lastGrid->isDummy()) { if (lastGrid->IsDummy()) {
lastGrid->SetEndTime(timeManager->GetEnd()); lastGrid->SetEndTime(timeManager->GetEnd());
if (lastGrid->StartTime() <= timeManager->GetStart()) if (lastGrid->StartTime() <= timeManager->GetStart())
lastGrid->SetStartTime(timeManager->GetStart()); lastGrid->SetStartTime(timeManager->GetStart());
@@ -311,7 +313,7 @@ void cChannelEpg::ClearOutdatedStart() {
grids.Del(firstGrid); grids.Del(firstGrid);
firstGrid = NULL; firstGrid = NULL;
} else { } else {
if (firstGrid->isDummy()) { if (firstGrid->IsDummy()) {
firstGrid->SetStartTime(timeManager->GetStart()); firstGrid->SetStartTime(timeManager->GetStart());
cGridElement *next = getNext(firstGrid); cGridElement *next = getNext(firstGrid);
if (next) { if (next) {
@@ -335,7 +337,7 @@ void cChannelEpg::ClearOutdatedEnd() {
grids.Del(lastGrid); grids.Del(lastGrid);
lastGrid = NULL; lastGrid = NULL;
} else { } else {
if (lastGrid->isDummy()) { if (lastGrid->IsDummy()) {
lastGrid->SetEndTime(timeManager->GetEnd()); lastGrid->SetEndTime(timeManager->GetEnd());
cGridElement *prev = getPrev(lastGrid); cGridElement *prev = getPrev(lastGrid);
if (prev) { if (prev) {

View File

@@ -42,7 +42,7 @@ public:
int Stop() { return timeManager->GetEnd(); }; int Stop() { return timeManager->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(); cGridElement *getActive(bool last = false);
cGridElement *getNext(cGridElement *activeGrid); cGridElement *getNext(cGridElement *activeGrid);
cGridElement *getPrev(cGridElement *activeGrid); cGridElement *getPrev(cGridElement *activeGrid);
cGridElement *getNeighbor(cGridElement *activeGrid); cGridElement *getNeighbor(cGridElement *activeGrid);

View File

@@ -47,7 +47,7 @@ void cChannelGroupGrid::SetGeometry(int start, int end) {
width = geoManager.channelGroupsWidth; width = geoManager.channelGroupsWidth;
height = (end - start + 1) * geoManager.rowHeight; height = (end - start + 1) * geoManager.rowHeight;
} }
pixmap = osdManager.requestPixmap(1, cRect(x, y, width, height)); pixmap = osdManager.CreatePixmap(1, cRect(x, y, width, height));
} }
void cChannelGroupGrid::Draw(void) { void cChannelGroupGrid::Draw(void) {
@@ -68,29 +68,28 @@ void cChannelGroupGrid::Draw(void) {
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 = CutText(name, Width() - 4, fontManager.FontChannelGroups).c_str(); cString text = cString::sprintf("%s", 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 nameUpper = name; std::string groupName = name;
std::transform(nameUpper.begin(), nameUpper.end(),nameUpper.begin(), ::toupper); int numChars = groupName.length();
int numChars = nameUpper.length();
int charHeight = fontManager.FontChannelGroupsHorizontal->Height(); int charHeight = fontManager.FontChannelGroupsHorizontal->Height();
int textHeight = numChars * charHeight; int textHeight = numChars * charHeight;
int y = 5; int y = 5;
if ((textHeight +5) < Height()) { if ((textHeight + 5) < Height()) {
y = (Height() - textHeight) / 2; y = (Height() - textHeight) / 2;
} }
for (int i=0; i < numChars; i++) { for (int i = 0; i < numChars; i++) {
if (((y + 2*charHeight) > Height()) && ((i+1)<numChars)) { if (((y + 2 * charHeight) > Height()) && ((i + 1) < numChars)) {
int x = (Width() - fontManager.FontChannelGroupsHorizontal->Width("...")) / 2; int x = (Width() - fontManager.FontChannelGroupsHorizontal->Width("...")) / 2;
pixmap->DrawText(cPoint(x, y), "...", colorText, colorTextBack, fontManager.FontChannelGroupsHorizontal); pixmap->DrawText(cPoint(x, y), "...", colorText, colorTextBack, fontManager.FontChannelGroupsHorizontal);
break; break;
} }
cString currentChar = cString::sprintf("%c", nameUpper.at(i)); cString currentChar = cString::sprintf("%s", utf8_substr(groupName.c_str(), i, 1).c_str());
int x = (Width() - fontManager.FontChannelGroupsHorizontal->Width(*currentChar)) / 2; int x = (Width() - fontManager.FontChannelGroupsHorizontal->Width(*currentChar)) / 2;
pixmap->DrawText(cPoint(x, y), *currentChar, colorText, colorTextBack, fontManager.FontChannelGroupsHorizontal); pixmap->DrawText(cPoint(x, y), *currentChar, colorText, colorTextBack, fontManager.FontChannelGroupsHorizontal);
y += fontManager.FontChannelGroupsHorizontal->Height(); y += fontManager.FontChannelGroupsHorizontal->Height();

View File

@@ -18,17 +18,17 @@ cChannelJump::cChannelJump(cChannelGroups *channelGroups, int lastValidChannel)
} }
cChannelJump::~cChannelJump(void) { cChannelJump::~cChannelJump(void) {
osdManager.releasePixmap(pixmapBack); osdManager.DestroyPixmap(pixmapBack);
osdManager.releasePixmap(pixmapText); osdManager.DestroyPixmap(pixmapText);
} }
void cChannelJump::SetPixmaps(void) { void cChannelJump::SetPixmaps(void) {
int x = (geoManager.osdWidth - geoManager.channelJumpWidth)/2; int x = (geoManager.osdWidth - geoManager.channelJumpWidth)/2;
int y = (geoManager.osdHeight - geoManager.channelJumpHeight)/2; int y = (geoManager.osdHeight - geoManager.channelJumpHeight)/2;
pixmapBack = osdManager.requestPixmap(4, cRect(x, y, geoManager.channelJumpWidth, geoManager.channelJumpHeight)); pixmapBack = osdManager.CreatePixmap(4, cRect(x, y, geoManager.channelJumpWidth, geoManager.channelJumpHeight));
pixmap = osdManager.requestPixmap(5, cRect(x, y, geoManager.channelJumpWidth, geoManager.channelJumpHeight)); pixmap = osdManager.CreatePixmap(5, cRect(x, y, geoManager.channelJumpWidth, geoManager.channelJumpHeight));
pixmapText = osdManager.requestPixmap(6, cRect(x, y, geoManager.channelJumpWidth, geoManager.channelJumpHeight)); pixmapText = osdManager.CreatePixmap(6, cRect(x, y, geoManager.channelJumpWidth, geoManager.channelJumpHeight));
} }
void cChannelJump::Draw(void) { void cChannelJump::Draw(void) {

View File

@@ -2,6 +2,7 @@
#include "config.h" #include "config.h"
cTVGuideConfig::cTVGuideConfig() { cTVGuideConfig::cTVGuideConfig() {
useHWAccel = false;
debugImageLoading = 0; debugImageLoading = 0;
showMainMenuEntry = 1; showMainMenuEntry = 1;
replaceOriginalSchedule = 0; replaceOriginalSchedule = 0;
@@ -9,8 +10,8 @@ cTVGuideConfig::cTVGuideConfig() {
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;
@@ -27,10 +28,14 @@ cTVGuideConfig::cTVGuideConfig() {
footerHeightPercent = 7; footerHeightPercent = 7;
stepMinutes = 30; stepMinutes = 30;
bigStepHours = 3; bigStepHours = 3;
bigStepHoursHorizontal = 3;
hugeStepHours = 24; hugeStepHours = 24;
hugeStepHoursHorizontal = 24;
channelJumpMode = eNumJump; channelJumpMode = eNumJump;
jumpChannels = 0; jumpChannels = 0;
blueKeyMode = 2; blueKeyMode = 2;
addSubtitleToTimer = 1;
timerMessage = 1;
closeOnSwitch = 1; closeOnSwitch = 1;
numkeyMode = 0; numkeyMode = 0;
useRemoteTimers = 0; useRemoteTimers = 0;
@@ -95,6 +100,7 @@ cTVGuideConfig::cTVGuideConfig() {
FontRecMenuItemLargeDelta = 0; FontRecMenuItemLargeDelta = 0;
timeFormat = 1; timeFormat = 1;
useNopacityTheme = 1; useNopacityTheme = 1;
useNopacityThemeCurrent = -1;
themeIndex = -1; themeIndex = -1;
themeIndexCurrent = -1; themeIndexCurrent = -1;
themeName = ""; themeName = "";
@@ -124,13 +130,14 @@ bool cTVGuideConfig::LoadTheme() {
//is correct theme already loaded? //is correct theme already loaded?
if (nOpacityTheme.size() == 0) if (nOpacityTheme.size() == 0)
nOpacityTheme = Setup.OSDTheme; nOpacityTheme = Setup.OSDTheme;
if ((themeIndex > -1) && (themeIndex == themeIndexCurrent)) { if ((themeIndex > -1) && (themeIndex == themeIndexCurrent) && (useNopacityTheme == useNopacityThemeCurrent)) {
if (!nOpacityTheme.compare(Setup.OSDTheme)) { if (!nOpacityTheme.compare(Setup.OSDTheme)) {
return false; return false;
} else { } else {
nOpacityTheme = Setup.OSDTheme; nOpacityTheme = Setup.OSDTheme;
} }
} }
esyslog("tvguide: loading new Theme");
//Load available Themes //Load available Themes
cThemes themes; cThemes themes;
themes.Load(*cString("tvguide")); themes.Load(*cString("tvguide"));
@@ -167,6 +174,7 @@ bool cTVGuideConfig::LoadTheme() {
themeIndex = 0; themeIndex = 0;
themeIndexCurrent = themeIndex; themeIndexCurrent = themeIndex;
useNopacityThemeCurrent = useNopacityTheme;
const char *themePath = themes.FileName(themeIndex); const char *themePath = themes.FileName(themeIndex);
if (access(themePath, F_OK) == 0) { if (access(themePath, F_OK) == 0) {
@@ -240,6 +248,7 @@ cString cTVGuideConfig::checkSlashAtEnd(std::string path) {
bool cTVGuideConfig::SetupParse(const char *Name, const char *Value) { bool cTVGuideConfig::SetupParse(const char *Name, const char *Value) {
if (strcmp(Name, "timeFormat") == 0) timeFormat = atoi(Value); if (strcmp(Name, "timeFormat") == 0) timeFormat = atoi(Value);
else if (strcmp(Name, "debugImageLoading") == 0) debugImageLoading = atoi(Value); else if (strcmp(Name, "debugImageLoading") == 0) debugImageLoading = atoi(Value);
else if (strcmp(Name, "useHWAccel") == 0) useHWAccel = atoi(Value);
else if (strcmp(Name, "showMainMenuEntry") == 0) showMainMenuEntry = atoi(Value); else if (strcmp(Name, "showMainMenuEntry") == 0) showMainMenuEntry = atoi(Value);
else if (strcmp(Name, "replaceOriginalSchedule") == 0) replaceOriginalSchedule = atoi(Value); else if (strcmp(Name, "replaceOriginalSchedule") == 0) replaceOriginalSchedule = atoi(Value);
else if (strcmp(Name, "useNopacityTheme") == 0) useNopacityTheme = atoi(Value); else if (strcmp(Name, "useNopacityTheme") == 0) useNopacityTheme = atoi(Value);
@@ -264,7 +273,9 @@ bool cTVGuideConfig::SetupParse(const char *Name, const char *Value) {
else if (strcmp(Name, "logoWidthRatio") == 0) logoWidthRatio = atoi(Value); else if (strcmp(Name, "logoWidthRatio") == 0) logoWidthRatio = atoi(Value);
else if (strcmp(Name, "logoHeightRatio") == 0) logoHeightRatio = atoi(Value); else if (strcmp(Name, "logoHeightRatio") == 0) logoHeightRatio = atoi(Value);
else if (strcmp(Name, "bigStepHours") == 0) bigStepHours = atoi(Value); else if (strcmp(Name, "bigStepHours") == 0) bigStepHours = atoi(Value);
else if (strcmp(Name, "bigStepHoursHorizontal") == 0) bigStepHoursHorizontal = atoi(Value);
else if (strcmp(Name, "hugeStepHours") == 0) hugeStepHours = atoi(Value); else if (strcmp(Name, "hugeStepHours") == 0) hugeStepHours = atoi(Value);
else if (strcmp(Name, "hugeStepHoursHorizontal") == 0) hugeStepHoursHorizontal = atoi(Value);
else if (strcmp(Name, "channelJumpMode") == 0) channelJumpMode = atoi(Value); else if (strcmp(Name, "channelJumpMode") == 0) channelJumpMode = atoi(Value);
else if (strcmp(Name, "blueKeyMode") == 0) blueKeyMode = atoi(Value); else if (strcmp(Name, "blueKeyMode") == 0) blueKeyMode = atoi(Value);
else if (strcmp(Name, "numkeyMode") == 0) numkeyMode = atoi(Value); else if (strcmp(Name, "numkeyMode") == 0) numkeyMode = atoi(Value);
@@ -286,6 +297,8 @@ bool cTVGuideConfig::SetupParse(const char *Name, const char *Value) {
else if (strcmp(Name, "footerHeightPercent") == 0) footerHeightPercent = atoi(Value); else if (strcmp(Name, "footerHeightPercent") == 0) footerHeightPercent = atoi(Value);
else if (strcmp(Name, "instRecFolderMode") == 0) instRecFolderMode = atoi(Value); else if (strcmp(Name, "instRecFolderMode") == 0) instRecFolderMode = atoi(Value);
else if (strcmp(Name, "instRecFixedFolder") == 0) instRecFixedFolder = Value; else if (strcmp(Name, "instRecFixedFolder") == 0) instRecFixedFolder = Value;
else if (strcmp(Name, "addSubtitleToTimer") == 0) addSubtitleToTimer = atoi(Value);
else if (strcmp(Name, "timerMessage") == 0) timerMessage = atoi(Value);
else if (strcmp(Name, "favWhatsOnNow") == 0) favWhatsOnNow = atoi(Value); else if (strcmp(Name, "favWhatsOnNow") == 0) favWhatsOnNow = atoi(Value);
else if (strcmp(Name, "favWhatsOnNext") == 0) favWhatsOnNext = atoi(Value); else if (strcmp(Name, "favWhatsOnNext") == 0) favWhatsOnNext = atoi(Value);
else if (strcmp(Name, "favUseTime1") == 0) favUseTime1 = atoi(Value); else if (strcmp(Name, "favUseTime1") == 0) favUseTime1 = atoi(Value);

View File

@@ -8,7 +8,7 @@
#include "fontmanager.h" #include "fontmanager.h"
#include "imagecache.h" #include "imagecache.h"
enum { enum eTimeFormat {
e12Hours, e12Hours,
e24Hours e24Hours
}; };
@@ -43,12 +43,19 @@ enum eInstRecFolderMode {
eFolderFixed eFolderFixed
}; };
typedef enum {
addSubtitleNever = 0,
addSubtitleSmart,
addSubtitleAlways
} addSubtitleToTimerMode;
class cTVGuideConfig { class cTVGuideConfig {
private: private:
cString checkSlashAtEnd(std::string path); cString checkSlashAtEnd(std::string path);
public: public:
cTVGuideConfig(); cTVGuideConfig();
~cTVGuideConfig(); ~cTVGuideConfig();
int useHWAccel;
int debugImageLoading; int debugImageLoading;
int showMainMenuEntry; int showMainMenuEntry;
int replaceOriginalSchedule; int replaceOriginalSchedule;
@@ -75,10 +82,14 @@ class cTVGuideConfig {
int footerHeightPercent; int footerHeightPercent;
int stepMinutes; int stepMinutes;
int bigStepHours; int bigStepHours;
int bigStepHoursHorizontal;
int hugeStepHours; int hugeStepHours;
int hugeStepHoursHorizontal;
int channelJumpMode; int channelJumpMode;
int jumpChannels; int jumpChannels;
int blueKeyMode; int blueKeyMode;
int timerMessage;
int addSubtitleToTimer;
int closeOnSwitch; int closeOnSwitch;
int numkeyMode; int numkeyMode;
int useRemoteTimers; int useRemoteTimers;
@@ -149,6 +160,7 @@ class cTVGuideConfig {
int FontRecMenuItemLargeDelta; int FontRecMenuItemLargeDelta;
int timeFormat; int timeFormat;
int useNopacityTheme; int useNopacityTheme;
int useNopacityThemeCurrent;
int themeIndex; int themeIndex;
int themeIndexCurrent; int themeIndexCurrent;
cString themeName; cString themeName;

View File

@@ -1,12 +1,12 @@
#include "detailview.h" #include "detailview.h"
cDetailView::cDetailView(const cEvent *event, cFooter *footer) { cDetailView::cDetailView(const cEvent *event, cFooter *footer) : cThread("DetailView") {
this->event = event; this->event = event;
this->footer = footer; this->footer = footer;
} }
cDetailView::~cDetailView(void){ cDetailView::~cDetailView(void){
Cancel(-1); Cancel(3);
while (Active()) while (Active())
cCondWait::SleepMs(10); cCondWait::SleepMs(10);
#if VDRVERSNUM >= 20301 #if VDRVERSNUM >= 20301
@@ -32,6 +32,8 @@ 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();
@@ -147,14 +149,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:

View File

@@ -34,10 +34,10 @@ void cDummyGrid::PositionPixmap() {
y0 += (StartTime() - column->Start())/60*geoManager.minutePixel; y0 += (StartTime() - column->Start())/60*geoManager.minutePixel;
} }
if (!pixmap) { if (!pixmap) {
pixmap = osdManager.requestPixmap(-1, cRect(x0, y0, geoManager.colWidth, viewportHeight)); pixmap = osdManager.CreatePixmap(-1, cRect(x0, y0, geoManager.colWidth, viewportHeight));
} else if (dirty) { } else if (dirty) {
osdManager.releasePixmap(pixmap); osdManager.DestroyPixmap(pixmap);
pixmap = osdManager.requestPixmap(-1, cRect(x0, y0, geoManager.colWidth, viewportHeight)); pixmap = osdManager.CreatePixmap(-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));
} }
@@ -48,10 +48,10 @@ void cDummyGrid::PositionPixmap() {
x0 += (StartTime() - column->Start())/60*geoManager.minutePixel; x0 += (StartTime() - column->Start())/60*geoManager.minutePixel;
} }
if (!pixmap) { if (!pixmap) {
pixmap = osdManager.requestPixmap(-1, cRect(x0, y0, viewportHeight, geoManager.rowHeight)); pixmap = osdManager.CreatePixmap(-1, cRect(x0, y0, viewportHeight, geoManager.rowHeight));
} else if (dirty) { } else if (dirty) {
osdManager.releasePixmap(pixmap); osdManager.DestroyPixmap(pixmap);
pixmap = osdManager.requestPixmap(-1, cRect(x0, y0, viewportHeight, geoManager.rowHeight)); pixmap = osdManager.CreatePixmap(-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));
} }

View File

@@ -20,9 +20,9 @@ cEpgGrid::~cEpgGrid(void) {
void cEpgGrid::SetViewportHeight() { void cEpgGrid::SetViewportHeight() {
int viewportHeightOld = viewportHeight; int viewportHeightOld = viewportHeight;
if ( column->Start() > StartTime() ) { if ( column->Start() > StartTime() ) {
viewportHeight = (min((int)EndTime(), column->Stop()) - column->Start()) /60; viewportHeight = (std::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;
@@ -37,11 +37,11 @@ void cEpgGrid::PositionPixmap() {
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.requestPixmap(-1, cRect(x0, y0, geoManager.colWidth, viewportHeight), pixmap = osdManager.CreatePixmap(-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));
} }
@@ -49,11 +49,11 @@ void cEpgGrid::PositionPixmap() {
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.requestPixmap(-1, cRect(x0, y0, viewportHeight, geoManager.rowHeight), pixmap = osdManager.CreatePixmap(-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 ));
} }
@@ -92,53 +92,52 @@ void cEpgGrid::SetSwitchTimer() {
void cEpgGrid::setText() { void cEpgGrid::setText() {
if (config.displayMode == eVertical) { if (config.displayMode == eVertical) {
cString strText; text->Set(event->Title(), fontManager.FontGrid, geoManager.colWidth - 2 * borderWidth);
strText = cString::sprintf("%s - %s:\n%s", *(event->GetTimeString()), *(event->GetEndTimeString()), event->Title()); extText->Set(event->ShortText(), fontManager.FontGridSmall, geoManager.colWidth - 2 * borderWidth);
text->Set(*(strText), fontManager.FontGrid, geoManager.colWidth-2*borderWidth); }
extText->Set(event->ShortText(), fontManager.FontGridSmall, geoManager.colWidth-2*borderWidth); if (config.showTimeInGrid) {
} else if (config.displayMode == eHorizontal) { timeString = cString::sprintf("%s - %s:", *(event->GetTimeString()), *(event->GetEndTimeString()));
timeString = cString::sprintf("%s - %s", *(event->GetTimeString()), *(event->GetEndTimeString()));
} }
} }
void cEpgGrid::drawText() { void cEpgGrid::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 (config.style == eStyleFlat)
colorTextBack = color; colorTextBack = color;
else if (config.style == eStyleGraphical) else if (config.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 (config.displayMode == eVertical) {
if (Height()/geoManager.minutePixel < 6) if (Height() / geoManager.minutePixel < 6)
return; return;
int textHeight = fontManager.FontGrid->Height(); int textHeight = fontManager.FontGrid->Height();
int textHeightSmall = fontManager.FontGridSmall->Height();
int textLines = text->Lines(); int textLines = text->Lines();
for (int i=0; i<textLines; i++) { int titleY = borderWidth;
pixmap->DrawText(cPoint(borderWidth, borderWidth + i*textHeight), text->GetLine(i), colorText, colorTextBack, fontManager.FontGrid); if (config.showTimeInGrid) { // mit Zeitangabe im Grid
pixmap->DrawText(cPoint(borderWidth, borderWidth), *timeString, colorText, colorTextBack, fontManager.FontGridSmall);
titleY += textHeightSmall;
}
for (int i = 0; i < textLines; i++) {
pixmap->DrawText(cPoint(borderWidth, titleY + i * textHeight), text->GetLine(i), colorText, colorTextBack, fontManager.FontGrid);
} }
int extTextLines = extText->Lines(); int extTextLines = extText->Lines();
int offset = (textLines+1)*textHeight - 0.5*textHeight; int offset = titleY + (textLines + 0.5) * textHeight;
textHeight = fontManager.FontGridSmall->Height(); if ((Height() - textHeightSmall - 10) > offset) {
if ((Height()-textHeight-10) > offset) { for (int i = 0; i < extTextLines; i++) {
for (int i=0; i<extTextLines; i++) { pixmap->DrawText(cPoint(borderWidth, offset + i * textHeightSmall), extText->GetLine(i), colorText, colorTextBack, fontManager.FontGridSmall);
pixmap->DrawText(cPoint(borderWidth, borderWidth + offset + i*textHeight), extText->GetLine(i), colorText, colorTextBack, fontManager.FontGridSmall);
} }
} }
} else if (config.displayMode == eHorizontal) { } else if (config.displayMode == eHorizontal) {
if (Width()/geoManager.minutePixel < 10) { cString strTitle = CutText(event->Title(), viewportHeight - borderWidth, fontManager.FontGridHorizontal).c_str();
int titleY = (geoManager.rowHeight - fontManager.FontGridHorizontal->Height())/2;
pixmap->DrawText(cPoint(borderWidth - 2, titleY), "...", colorText, colorTextBack, fontManager.FontGridHorizontal);
return;
}
cString strTitle = CutText(event->Title(), viewportHeight, fontManager.FontGridHorizontal).c_str();
int titleY = 0; int titleY = 0;
if (config.showTimeInGrid) { if (config.showTimeInGrid) { // mit Zeitangabe im Grid
pixmap->DrawText(cPoint(borderWidth, borderWidth), *timeString, colorText, colorTextBack, fontManager.FontGridHorizontalSmall); pixmap->DrawText(cPoint(borderWidth, borderWidth), *timeString, colorText, colorTextBack, fontManager.FontGridHorizontalSmall);
titleY = fontManager.FontGridHorizontalSmall->Height() + (geoManager.rowHeight - fontManager.FontGridHorizontalSmall->Height() - fontManager.FontGridHorizontal->Height())/2; titleY = fontManager.FontGridHorizontalSmall->Height() + (geoManager.rowHeight - fontManager.FontGridHorizontalSmall->Height() - fontManager.FontGridHorizontal->Height()) / 2;
} else { } else {
titleY = (geoManager.rowHeight - fontManager.FontGridHorizontal->Height())/2; titleY = (geoManager.rowHeight - fontManager.FontGridHorizontal->Height()) / 2;
} }
pixmap->DrawText(cPoint(borderWidth, titleY), *strTitle, colorText, colorTextBack, fontManager.FontGridHorizontal); pixmap->DrawText(cPoint(borderWidth, titleY), *strTitle, colorText, colorTextBack, fontManager.FontGridHorizontal);
} }
@@ -170,13 +169,17 @@ void cEpgGrid::drawText() {
void cEpgGrid::drawIcon(cString iconText, tColor color) { void cEpgGrid::drawIcon(cString iconText, tColor color) {
const cFont *font = (config.displayMode == eVertical) const cFont *font = (config.displayMode == eVertical) ? fontManager.FontGrid : fontManager.FontGridHorizontalSmall;
?fontManager.FontGrid int textWidth = font->Width(*iconText) + 2 * borderWidth;
:fontManager.FontGridHorizontalSmall; int textHeight = font->Height() + 10;
int textWidth = font->Width(*iconText)+2*borderWidth; if ((config.displayMode == eHorizontal) && ((Width() - 2 * textWidth) < 0))
int textHeight = font->Height()+10; pixmap->DrawEllipse( cRect(Width() - textHeight / 2 - borderWidth, Height() - textHeight - borderWidth, textHeight / 2, textHeight / 2), color);
pixmap->DrawRectangle( cRect(Width() - textWidth - borderWidth, Height() - textHeight - borderWidth, textWidth, textHeight), color); else if ((config.displayMode == eVertical) && ((Height() - 2 * textHeight) < 0))
pixmap->DrawText(cPoint(Width() - textWidth, Height() - textHeight - borderWidth/2), *iconText, theme.Color(clrFont), color, font); pixmap->DrawEllipse( cRect(Width() - textHeight / 2 - borderWidth, borderWidth, textHeight / 2, textHeight / 2), color);
else {
pixmap->DrawEllipse( cRect(Width() - textWidth - borderWidth, Height() - textHeight - borderWidth, textWidth, textHeight), color);
pixmap->DrawText(cPoint(Width() - textWidth, Height() - textHeight - borderWidth / 2), *iconText, theme.Color(clrFont), clrTransparent, font);
}
} }
cString cEpgGrid::getTimeString(void) { cString cEpgGrid::getTimeString(void) {

View File

@@ -8,7 +8,7 @@ cFooter::cFooter(cChannelGroups *channelGroups) {
currentGroup = -1; currentGroup = -1;
buttonY = (geoManager.footerHeight - geoManager.buttonHeight)/2; buttonY = (geoManager.footerHeight - geoManager.buttonHeight)/2;
SetButtonPositions(); SetButtonPositions();
footer = osdManager.requestPixmap(2, cRect( 0, footer = osdManager.CreatePixmap(2, cRect( 0,
geoManager.footerY, geoManager.footerY,
geoManager.osdWidth, geoManager.osdWidth,
geoManager.footerHeight), geoManager.footerHeight),
@@ -17,7 +17,7 @@ cFooter::cFooter(cChannelGroups *channelGroups) {
} }
cFooter::~cFooter(void) { cFooter::~cFooter(void) {
osdManager.releasePixmap(footer); osdManager.DestroyPixmap(footer);
} }
void cFooter::drawRedButton() { void cFooter::drawRedButton() {

View File

@@ -12,19 +12,19 @@ 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 = (config.displayStatusHeader) ? (config.headerHeightPercent * osdHeight / 100) : 0;
tvFrameWidth = statusHeaderHeight * 16 / 9; tvFrameWidth = statusHeaderHeight * 16 / 9;
headerContentWidth = (config.scaleVideo) ? (osdWidth - tvFrameWidth):osdWidth; headerContentWidth = (config.scaleVideo) ? (osdWidth - tvFrameWidth):osdWidth;
channelGroupsWidth = (config.displayChannelGroups) ? (config.channelGroupsPercent * osdWidth / 100):0; channelGroupsWidth = (config.displayChannelGroups) ? (config.channelGroupsPercent * osdWidth / 100) : 0;
channelGroupsHeight = (config.displayChannelGroups) ? (config.channelGroupsPercent * osdHeight / 100):0; channelGroupsHeight = (config.displayChannelGroups) ? (config.channelGroupsPercent * osdHeight / 100) : 0;
channelHeaderWidth = config.channelHeaderWidthPercent * osdWidth / 100; channelHeaderWidth = config.channelHeaderWidthPercent * osdWidth / 100;
channelHeaderHeight = config.channelHeaderHeightPercent * osdHeight / 100; channelHeaderHeight = config.channelHeaderHeightPercent * osdHeight / 100;
timeLineWidth = config.timeLineWidthPercent * osdWidth / 100; timeLineWidth = config.timeLineWidthPercent * osdWidth / 100;
@@ -35,7 +35,7 @@ bool cGeometryManager::SetGeometry(int osdWidth, int osdHeight, bool force) {
if (config.displayMode == eVertical) { if (config.displayMode == eVertical) {
colWidth = (osdWidth - timeLineWidth) / config.channelCols; colWidth = (osdWidth - timeLineWidth) / config.channelCols;
rowHeight = 0; rowHeight = 0;
minutePixel = (osdHeight - statusHeaderHeight - channelGroupsHeight - channelHeaderHeight - footerHeight) / config.displayTime; minutePixel = (double)(osdHeight - statusHeaderHeight - channelGroupsHeight - channelHeaderHeight - footerHeight) / (double)config.displayTime;
channelLogoWidth = colWidth; channelLogoWidth = colWidth;
channelLogoHeight = channelHeaderHeight; channelLogoHeight = channelHeaderHeight;
logoWidth = channelLogoWidth / 2 - 15; logoWidth = channelLogoWidth / 2 - 15;
@@ -49,7 +49,7 @@ bool cGeometryManager::SetGeometry(int osdWidth, int osdHeight, bool force) {
} else if (config.displayMode == eHorizontal) { } else if (config.displayMode == eHorizontal) {
colWidth = 0; colWidth = 0;
rowHeight = (osdHeight - statusHeaderHeight - timeLineHeight - footerHeight) / config.channelRows; rowHeight = (osdHeight - statusHeaderHeight - timeLineHeight - footerHeight) / config.channelRows;
minutePixel = (osdWidth - channelHeaderWidth - channelGroupsWidth) / config.displayHorizontalTime; minutePixel = (double)(osdWidth - channelHeaderWidth - channelGroupsWidth) / (double)config.displayHorizontalTime;
channelLogoWidth = channelHeaderWidth; channelLogoWidth = channelHeaderWidth;
channelLogoHeight = rowHeight; channelLogoHeight = rowHeight;
logoWidth = channelLogoHeight * config.logoWidthRatio / config.logoHeightRatio; logoWidth = channelLogoHeight * config.logoWidthRatio / config.logoHeightRatio;

View File

@@ -24,7 +24,7 @@ public:
//Content //Content
int colWidth; int colWidth;
int rowHeight; int rowHeight;
int minutePixel; double minutePixel;
int channelLogoWidth; int channelLogoWidth;
int channelLogoHeight; int channelLogoHeight;
//Timeline //Timeline

View File

@@ -51,7 +51,7 @@ public:
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() {};
}; };

View File

@@ -8,7 +8,7 @@ cHeaderGrid::cHeaderGrid(void) : cGridElement(NULL) {
} }
cHeaderGrid::~cHeaderGrid(void) { cHeaderGrid::~cHeaderGrid(void) {
osdManager.releasePixmap(pixmapLogo); osdManager.DestroyPixmap(pixmapLogo);
} }
void cHeaderGrid::createBackground(int num) { void cHeaderGrid::createBackground(int num) {
@@ -22,8 +22,8 @@ void cHeaderGrid::createBackground(int num) {
x = geoManager.channelGroupsWidth; x = geoManager.channelGroupsWidth;
y = geoManager.statusHeaderHeight + geoManager.timeLineHeight + num*geoManager.rowHeight; y = geoManager.statusHeaderHeight + geoManager.timeLineHeight + num*geoManager.rowHeight;
} }
pixmap = osdManager.requestPixmap(1, cRect(x, y, geoManager.channelLogoWidth, geoManager.channelLogoHeight)); pixmap = osdManager.CreatePixmap(1, cRect(x, y, geoManager.channelLogoWidth, geoManager.channelLogoHeight));
pixmapLogo = osdManager.requestPixmap(2, cRect(x, y, geoManager.channelLogoWidth, geoManager.channelLogoHeight)); pixmapLogo = osdManager.CreatePixmap(2, cRect(x, y, geoManager.channelLogoWidth, geoManager.channelLogoHeight));
if ((!pixmap) || (!pixmapLogo)){ if ((!pixmap) || (!pixmapLogo)){
return; return;
} }
@@ -56,7 +56,8 @@ void cHeaderGrid::drawChannelHorizontal(const cChannel *channel) {
cImage *logo = imgCache.GetLogo(channel); cImage *logo = imgCache.GetLogo(channel);
if (logo) { if (logo) {
const int logoheight = logo->Height(); const int logoheight = logo->Height();
pixmapLogo->DrawImage(cPoint(logoX, (Height() - logoheight) / 2), *logo); const int logowidth = logo->Width();
pixmapLogo->DrawImage(cPoint(logoX + ((logoWidth - logowidth) / 2), (Height() - logoheight) / 2), *logo);
logoFound = true; logoFound = true;
} }
} }
@@ -81,7 +82,6 @@ void cHeaderGrid::drawChannelHorizontal(const cChannel *channel) {
// 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());
@@ -93,8 +93,10 @@ void cHeaderGrid::drawChannelVertical(const cChannel *channel) {
if (!config.hideChannelLogos) { if (!config.hideChannelLogos) {
cImage *logo = imgCache.GetLogo(channel); cImage *logo = imgCache.GetLogo(channel);
if (logo) { if (logo) {
pixmapLogo->DrawImage(cPoint((Width() - logoWidth) / 2, 6), *logo); const int logoheight = logo->Height();
logoFound = true; const int logowidth = logo->Width();
pixmapLogo->DrawImage(cPoint((Width() - logowidth) / 2, (logoHeight - logoheight) / 2), *logo);
logoFound = true;
} }
} }
bool drawText = false; bool drawText = false;

View File

@@ -34,19 +34,19 @@ void cImageCache::CreateCache(void) {
int start = cTimeMs::Now(); int start = cTimeMs::Now();
int startNext = cTimeMs::Now(); int startNext = cTimeMs::Now();
CreateOsdIconCache(); CreateOsdIconCache();
esyslog("tvguide: Osd Icon Cash created in %d ms", int(cTimeMs::Now()-startNext)); esyslog("tvguide: Osd Icon Cache created in %d ms", int(cTimeMs::Now()-startNext));
startNext = cTimeMs::Now(); startNext = cTimeMs::Now();
PrepareGridIconCache(); PrepareGridIconCache();
CreateGridIconCache(); CreateGridIconCache();
esyslog("tvguide: Grid Icon Cash created in %d ms", int(cTimeMs::Now()-startNext)); esyslog("tvguide: Grid Icon Cache created in %d ms", int(cTimeMs::Now()-startNext));
startNext = cTimeMs::Now(); startNext = cTimeMs::Now();
CreateChannelGroupCache(); CreateChannelGroupCache();
esyslog("tvguide: Channelgroup Cash created in %d ms", int(cTimeMs::Now()-startNext)); esyslog("tvguide: Channelgroup Cache created in %d ms", int(cTimeMs::Now()-startNext));
startNext = cTimeMs::Now(); startNext = cTimeMs::Now();
CreateLogoCache(); CreateLogoCache();
esyslog("tvguide: Logo Cash created in %d ms", int(cTimeMs::Now()-startNext)); esyslog("tvguide: Logo Cache created in %d ms", int(cTimeMs::Now()-startNext));
startNext = cTimeMs::Now(); startNext = cTimeMs::Now();
esyslog("tvguide: Complete Image Cash created in %d ms", int(cTimeMs::Now()-start)); esyslog("tvguide: Complete Image Cache created in %d ms", int(cTimeMs::Now()-start));
} }
void cImageCache::CreateOsdIconCache(void) { void cImageCache::CreateOsdIconCache(void) {
@@ -357,7 +357,7 @@ cImage *cImageCache::GetLogo(const cChannel *channel) {
delete tempStaticLogo; delete tempStaticLogo;
tempStaticLogo = NULL; tempStaticLogo = NULL;
} }
tempStaticLogo = CreateImage(geoManager.logoWidth, geoManager.logoHeight); tempStaticLogo = CreateImage(geoManager.logoWidth * 0.8, geoManager.logoHeight * 0.8);
return tempStaticLogo; return tempStaticLogo;
} else { } else {
//add requested logo to cache //add requested logo to cache
@@ -609,7 +609,7 @@ bool cImageCache::LoadLogo(const cChannel *channel) {
} }
void cImageCache::InsertIntoLogoCache(std::string channelID) { void cImageCache::InsertIntoLogoCache(std::string channelID) {
cImage *image = CreateImage(geoManager.logoWidth, geoManager.logoHeight); cImage *image = CreateImage(geoManager.logoWidth * 0.8, geoManager.logoHeight * 0.8);
logoCache.insert(std::pair<std::string, cImage*>(channelID, image)); logoCache.insert(std::pair<std::string, cImage*>(channelID, image));
} }

View File

@@ -11,7 +11,6 @@
using namespace Magick; using namespace Magick;
cImageLoader::cImageLoader() { cImageLoader::cImageLoader() {
InitializeMagick(NULL);
} }
cImageLoader::~cImageLoader() { cImageLoader::~cImageLoader() {

View File

@@ -5,7 +5,6 @@
#include "imagescaler.h" #include "imagescaler.h"
cImageMagickWrapper::cImageMagickWrapper() { cImageMagickWrapper::cImageMagickWrapper() {
InitializeMagick(NULL);
} }
cImageMagickWrapper::~cImageMagickWrapper() { cImageMagickWrapper::~cImageMagickWrapper() {

View File

@@ -2,12 +2,21 @@
#include "osdmanager.h" #include "osdmanager.h"
cOsdManager::cOsdManager(void) { cOsdManager::cOsdManager(void) {
osd = NULL;
} }
bool cOsdManager::setOsd() { void cOsdManager::Lock(void) {
mutex.Lock();
}
void cOsdManager::Unlock(void) {
mutex.Unlock();
}
bool cOsdManager::CreateOsd(void) {
osd = cOsdProvider::NewOsd(cOsd::OsdLeft(), cOsd::OsdTop()); osd = cOsdProvider::NewOsd(cOsd::OsdLeft(), cOsd::OsdTop());
if (osd) { if (osd) {
tArea Area = { 0, 0, cOsd::OsdWidth(), cOsd::OsdHeight(), 32 }; tArea Area = { 0, 0, cOsd::OsdWidth() - 1, cOsd::OsdHeight() - 1, 32 };
if (osd->SetAreas(&Area, 1) == oeOk) { if (osd->SetAreas(&Area, 1) == oeOk) {
return true; return true;
} }
@@ -15,7 +24,14 @@ bool cOsdManager::setOsd() {
return false; return false;
} }
void cOsdManager::setBackground() { void cOsdManager::DeleteOsd(void) {
Lock();
delete osd;
osd = NULL;
Unlock();
}
void cOsdManager::SetBackground(void) {
if (config.displayStatusHeader && config.scaleVideo) { if (config.displayStatusHeader && config.scaleVideo) {
int widthStatus = cOsd::OsdWidth() - geoManager.statusHeaderHeight * 16 / 9; int widthStatus = cOsd::OsdWidth() - geoManager.statusHeaderHeight * 16 / 9;
@@ -27,12 +43,20 @@ void cOsdManager::setBackground() {
} }
cPixmap *cOsdManager::requestPixmap(int Layer, const cRect &ViewPort, const cRect &DrawPort) { cPixmap *cOsdManager::CreatePixmap(int Layer, const cRect &ViewPort, const cRect &DrawPort) {
return osd->CreatePixmap(Layer, ViewPort, DrawPort); if (osd)
return osd->CreatePixmap(Layer, ViewPort, DrawPort);
return NULL;
} }
void cOsdManager::releasePixmap(cPixmap *pixmap) { void cOsdManager::DestroyPixmap(cPixmap *pixmap) {
if (!pixmap) if (!osd || !pixmap)
return; return;
osd->DestroyPixmap(pixmap); osd->DestroyPixmap(pixmap);
} }
void cOsdManager::Flush(void) {
if (osd) {
osd->Flush();
}
}

View File

@@ -4,20 +4,23 @@
#include <vdr/osd.h> #include <vdr/osd.h>
class cOsdManager { class cOsdManager {
private: private:
cOsd *osd; cOsd *osd;
public: cMutex mutex;
cOsdManager(void); public:
bool setOsd(); cOsdManager(void);
void setBackground(); void Lock(void);
void flush() {osd->Flush();}; void Unlock(void);
cPixmap *requestPixmap(int Layer, const cRect &ViewPort, const cRect &DrawPort = cRect::Null); bool CreateOsd(void);
void releasePixmap(cPixmap *pixmap); void DeleteOsd(void);
void deleteOsd() {delete osd;}; void SetBackground(void);
int Width() { return osd->Width(); }; cPixmap *CreatePixmap(int Layer, const cRect &ViewPort, const cRect &DrawPort = cRect::Null);
int Height() { return osd->Height(); }; void DestroyPixmap(cPixmap *pixmap);
int Top() { return osd->Top(); }; void Flush(void);
int Left() { return osd->Left(); }; int Width(void) { return osd->Width(); };
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: 2019-04-22 14:34+0200\n" "POT-Creation-Date: 2022-04-29 16:05+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 "" msgstr "Reemissions "
msgid "No reruns found" msgid "No reruns found"
msgstr "" msgstr ""
@@ -57,6 +57,9 @@ 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"
@@ -72,6 +75,15 @@ 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"
@@ -99,21 +111,18 @@ 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 "Delete Timer" msgid "Timer On/Off"
msgstr "Esborra temporitzador" msgstr "Temporitzador On/Off"
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 ""
@@ -144,6 +153,9 @@ 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"
@@ -168,14 +180,14 @@ msgstr "Sí"
msgid "No" msgid "No"
msgstr "No" msgstr "No"
msgid "One" msgid "Timer Conflicts"
msgstr "Un" msgstr "Conflicte al temporitzador"
msgid "detected" msgid "detected"
msgstr "detectat" msgstr "detectat"
msgid "Timer Conflicts" msgid "Ignore Conflicts"
msgstr "Conflicte al temporitzador" msgstr "Ignora conflictes"
msgid "Show conflict" msgid "Show conflict"
msgstr "Mostra conflicte" msgstr "Mostra conflicte"
@@ -183,9 +195,6 @@ 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"
@@ -216,6 +225,12 @@ 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"
@@ -240,14 +255,11 @@ msgstr ""
msgid "New Folder" msgid "New Folder"
msgstr "" msgstr ""
msgid "Save" msgid "Create Series Timer based on:"
msgstr "Desa" msgstr "Programa enregistrament de Sèries segons:"
msgid "Cancel" msgid "Create Timer"
msgstr "Cancel·la" msgstr "Crea temporitzador"
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"
@@ -261,9 +273,6 @@ 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"
@@ -273,17 +282,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 "Search Expression:"
msgstr "Cerca expressió:"
msgid "Continue" msgid "Continue"
msgstr "Continua" msgstr "Continua"
msgid "Configure Search Timer for Search String" msgid "Search Expression:"
msgstr "Configura cerca de temporitzadors amb text" msgstr "Cerca expressió:"
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"
@@ -450,7 +459,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"
@@ -474,12 +483,12 @@ msgstr "Utilitza una altra plantilla"
msgid "search results for Favorite" msgid "search results for Favorite"
msgstr "" msgstr ""
msgid "search result for Favorite"
msgstr ""
msgid "search results for Search Timer" msgid "search results for Search Timer"
msgstr "cerca resultats per temporitzador" msgstr "cerca resultats per temporitzador"
msgid "search result for Favorite"
msgstr ""
msgid "search result for Search Timer" msgid "search result for Search Timer"
msgstr "cerca resultat per temporitzador" msgstr "cerca resultat per temporitzador"
@@ -489,8 +498,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 "Minutes before switching" msgid "Create"
msgstr "Minuts abans del canvi" msgstr "Crea"
msgid "switch" msgid "switch"
msgstr "canvia" msgstr "canvia"
@@ -501,12 +510,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"
@@ -516,6 +525,9 @@ 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" msgid "Search Mode"
msgstr "Mode de cerca" msgstr "Mode de cerca"
@@ -534,9 +546,6 @@ 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"
@@ -552,12 +561,12 @@ msgstr ""
msgid "Found" msgid "Found"
msgstr "Trobada" msgstr "Trobada"
msgid "recording"
msgstr "gravació"
msgid "recordings" msgid "recordings"
msgstr "gravacions" msgstr "gravacions"
msgid "recording"
msgstr "gravació"
msgid "for" msgid "for"
msgstr "per" msgstr "per"
@@ -567,6 +576,12 @@ 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"
@@ -585,6 +600,9 @@ msgstr "expressió regular"
msgid "fuzzy" msgid "fuzzy"
msgstr "" msgstr ""
msgid "allow empty"
msgstr ""
msgid "Interval" msgid "Interval"
msgstr "" msgstr ""
@@ -675,6 +693,9 @@ 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"
@@ -751,7 +772,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 "" msgstr "Alçada capçalera d'estat (% alçada OSD)"
msgid "Height of Footer (Perc. of osd height)" msgid "Height of Footer (Perc. of osd height)"
msgstr "" msgstr ""
@@ -882,15 +903,30 @@ msgstr ""
msgid "Use fixed folder" msgid "Use fixed folder"
msgstr "" msgstr ""
msgid "Folder for instant Recordings" msgid "smart"
msgstr "" msgstr ""
msgid "Instant recording:"
msgstr ""
msgid "Folder for instant Recordings"
msgstr "Utilitza carpetes per gravacions a l'instant"
msgid "Folder" msgid "Folder"
msgstr "" msgstr ""
msgid "Add episode to manual timers"
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 ""
@@ -976,7 +1012,7 @@ msgid "EPG Info"
msgstr "" msgstr ""
msgid "Reruns" msgid "Reruns"
msgstr "" msgstr "Reemissions"
msgid "Recording Information" msgid "Recording Information"
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: 2019-04-22 14:34+0200\n" "POT-Creation-Date: 2022-04-29 16:05+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,6 +54,9 @@ 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"
@@ -69,6 +72,15 @@ 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"
@@ -96,21 +108,18 @@ 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 "Delete Timer" msgid "Timer On/Off"
msgstr "Timer löschen" msgstr "Timer Ein/Aus"
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"
@@ -141,6 +150,9 @@ 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"
@@ -165,14 +177,14 @@ msgstr "Ja"
msgid "No" msgid "No"
msgstr "Nein" msgstr "Nein"
msgid "One" msgid "Timer Conflicts"
msgstr "Ein" msgstr "Timerkonflikte"
msgid "detected" msgid "detected"
msgstr "gefunden" msgstr "gefunden"
msgid "Timer Conflicts" msgid "Ignore Conflicts"
msgstr "Timerkonflikte" msgstr "Konflikte ignorieren"
msgid "Show conflict" msgid "Show conflict"
msgstr "Konflikt zeigen" msgstr "Konflikt zeigen"
@@ -180,9 +192,6 @@ 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"
@@ -213,6 +222,12 @@ 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"
@@ -237,14 +252,11 @@ msgstr "Timer Datei"
msgid "New Folder" msgid "New Folder"
msgstr "Neues Verzeichnis" msgstr "Neues Verzeichnis"
msgid "Save" msgid "Create Series Timer based on:"
msgstr "Speichern" msgstr "Serientimer anlegen basierend auf:"
msgid "Cancel" msgid "Create Timer"
msgstr "Abbrechen" msgstr "Timer anlegen"
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"
@@ -258,9 +270,6 @@ 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"
@@ -270,17 +279,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 "Search Expression:"
msgstr "Suchausdruck:"
msgid "Continue" msgid "Continue"
msgstr "Weiter" msgstr "Weiter"
msgid "Configure Search Timer for Search String" msgid "Search Expression:"
msgstr "Suchtimer konfigurieren für Suchbegriff" msgstr "Suchausdruck:"
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"
@@ -447,7 +456,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"
@@ -471,12 +480,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 result for Favorite"
msgstr "Suchergebnis für Favorit"
msgid "search results for Search Timer" msgid "search results for Search Timer"
msgstr "Treffer für Suchtimer" msgstr "Treffer für Suchtimer"
msgid "search result for Favorite"
msgstr "Suchergebnis für Favorit"
msgid "search result for Search Timer" msgid "search result for Search Timer"
msgstr "Treffer für Suchtimer" msgstr "Treffer für Suchtimer"
@@ -486,8 +495,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 "Minutes before switching" msgid "Create"
msgstr "Minuten vor umschalten" msgstr "Anlegen"
msgid "switch" msgid "switch"
msgstr "umschalten" msgstr "umschalten"
@@ -498,12 +507,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"
@@ -513,6 +522,9 @@ 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" msgid "Search Mode"
msgstr "Suchmodus" msgstr "Suchmodus"
@@ -531,9 +543,6 @@ 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"
@@ -549,12 +558,12 @@ msgstr "Suchausdruck muss mindestens drei Zeichen haben"
msgid "Found" msgid "Found"
msgstr " " msgstr " "
msgid "recording"
msgstr "Aufnahme gefunden"
msgid "recordings" msgid "recordings"
msgstr "Aufnahmen gefunden" msgstr "Aufnahmen gefunden"
msgid "recording"
msgstr "Aufnahme gefunden"
msgid "for" msgid "for"
msgstr "für" msgstr "für"
@@ -564,6 +573,12 @@ 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"
@@ -582,6 +597,9 @@ msgstr "Regulärer Ausdruck"
msgid "fuzzy" msgid "fuzzy"
msgstr "unscharf" msgstr "unscharf"
msgid "allow empty"
msgstr "erlaube leere"
msgid "Interval" msgid "Interval"
msgstr "Bereich" msgstr "Bereich"
@@ -672,6 +690,9 @@ 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"
@@ -879,15 +900,30 @@ 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" msgid "Folder"
msgstr "Verzeichnis" 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"
@@ -934,7 +970,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 Cash beschränken" msgstr "Logo Cache beschränken"
msgid "Maximal number of logos to cache" msgid "Maximal number of logos to cache"
msgstr "Maximale Anzahl Logos" msgstr "Maximale Anzahl Logos"
@@ -976,7 +1012,7 @@ msgid "Reruns"
msgstr "Wiederholungen" msgstr "Wiederholungen"
msgid "Recording Information" msgid "Recording Information"
msgstr "" msgstr "Aufnahme Information"
msgid "Image Galery" msgid "Image Galery"
msgstr "Bildergalerie" msgstr "Bildergalerie"

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: 2019-04-22 14:34+0200\n" "POT-Creation-Date: 2022-04-29 16:05+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,6 +54,9 @@ 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"
@@ -69,6 +72,15 @@ 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"
@@ -96,21 +108,18 @@ 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 "Delete Timer" msgid "Timer On/Off"
msgstr "Cancella il Timer" msgstr "Timer On/Off"
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"
@@ -141,6 +150,9 @@ 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"
@@ -165,14 +177,14 @@ msgstr "Si"
msgid "No" msgid "No"
msgstr "No" msgstr "No"
msgid "One" msgid "Timer Conflicts"
msgstr "Uno" msgstr "Conflitti del Timer"
msgid "detected" msgid "detected"
msgstr "rilevato" msgstr "rilevato"
msgid "Timer Conflicts" msgid "Ignore Conflicts"
msgstr "Conflitti del Timer" msgstr "Ignora conflitti"
msgid "Show conflict" msgid "Show conflict"
msgstr "Mostra conflitto" msgstr "Mostra conflitto"
@@ -180,9 +192,6 @@ 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"
@@ -213,6 +222,12 @@ 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"
@@ -237,14 +252,11 @@ msgstr "File del Timer"
msgid "New Folder" msgid "New Folder"
msgstr "Nuova cartella" msgstr "Nuova cartella"
msgid "Save" msgid "Create Series Timer based on:"
msgstr "Salva" msgstr "Crea il Series Timer basato su:"
msgid "Cancel" msgid "Create Timer"
msgstr "Cancella" msgstr "Crea il Timer"
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"
@@ -258,9 +270,6 @@ 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"
@@ -270,17 +279,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 "Search Expression:"
msgstr "Cerca espressione:"
msgid "Continue" msgid "Continue"
msgstr "Continua" msgstr "Continua"
msgid "Configure Search Timer for Search String" msgid "Search Expression:"
msgstr "Configura il Search Timer basato su Search String" msgstr "Cerca espressione:"
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"
@@ -447,7 +456,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"
@@ -471,12 +480,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 result for Favorite"
msgstr "Suchergebnis für Favorit"
msgid "search results for Search Timer" msgid "search results for Search Timer"
msgstr "Treffer für Suchtimer" msgstr "Treffer für Suchtimer"
msgid "search result for Favorite"
msgstr "Suchergebnis für Favorit"
msgid "search result for Search Timer" msgid "search result for Search Timer"
msgstr "Treffer für Suchtimer" msgstr "Treffer für Suchtimer"
@@ -486,8 +495,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 "Minutes before switching" msgid "Create"
msgstr "Minuten vor umschalten" msgstr "Creare"
msgid "switch" msgid "switch"
msgstr "cambio" msgstr "cambio"
@@ -498,12 +507,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"
@@ -513,6 +522,9 @@ 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" msgid "Search Mode"
msgstr "Modalità di ricerca" msgstr "Modalità di ricerca"
@@ -531,9 +543,6 @@ 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"
@@ -549,12 +558,12 @@ msgstr "Search String deve avere almeno tre lettere"
msgid "Found" msgid "Found"
msgstr "Trovato" msgstr "Trovato"
msgid "recording"
msgstr "registrazione"
msgid "recordings" msgid "recordings"
msgstr "registrazioni" msgstr "registrazioni"
msgid "recording"
msgstr "registrazione"
msgid "for" msgid "for"
msgstr "per" msgstr "per"
@@ -564,6 +573,12 @@ 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"
@@ -582,6 +597,9 @@ msgstr "Regulärer Ausdruck"
msgid "fuzzy" msgid "fuzzy"
msgstr "" msgstr ""
msgid "allow empty"
msgstr ""
msgid "Interval" msgid "Interval"
msgstr "" msgstr ""
@@ -672,6 +690,9 @@ 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"
@@ -879,15 +900,30 @@ 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" msgid "Folder"
msgstr "Cartella" 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"

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: 2019-04-22 14:34+0200\n" "POT-Creation-Date: 2022-04-29 16:05+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,6 +54,9 @@ msgstr ""
msgid "images" msgid "images"
msgstr "" msgstr ""
msgid "tvguide: RemoteTimerModifications failed"
msgstr ""
msgid "root video folder" msgid "root video folder"
msgstr "Главная видео директория" msgstr "Главная видео директория"
@@ -69,6 +72,15 @@ msgstr "все каналы"
msgid "unknown channel" msgid "unknown channel"
msgstr "неизвестный канал" msgstr "неизвестный канал"
msgid "with"
msgstr ""
msgid "errors"
msgstr ""
msgid "error"
msgstr ""
msgid "Duration" msgid "Duration"
msgstr "Продолжительность" msgstr "Продолжительность"
@@ -96,21 +108,18 @@ 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 "Delete Timer" msgid "Timer On/Off"
msgstr "Удалить таймер" msgstr "таймер Вкл/Выкл"
msgid "Edit Timer" msgid "Edit Timer"
msgstr "Редактировать таймер" msgstr "Редактировать таймер"
msgid "Delete Timer"
msgstr "Удалить таймер"
msgid "Timer Timeline" msgid "Timer Timeline"
msgstr "" msgstr ""
@@ -141,6 +150,9 @@ msgstr "Искать в записях"
msgid "Set Folder for" msgid "Set Folder for"
msgstr "Укажите каталог для" msgstr "Укажите каталог для"
msgid "Timer changed"
msgstr ""
msgid "Timer created" msgid "Timer created"
msgstr "Таймер создан" msgstr "Таймер создан"
@@ -165,14 +177,14 @@ msgstr "Да"
msgid "No" msgid "No"
msgstr "Нет" msgstr "Нет"
msgid "One" msgid "Timer Conflicts"
msgstr "Один" msgstr "Таймер-конфликты"
msgid "detected" msgid "detected"
msgstr "обнаружен" msgstr "обнаружен"
msgid "Timer Conflicts" msgid "Ignore Conflicts"
msgstr "Таймер-конфликты" msgstr "Игнорировать конфликты"
msgid "Show conflict" msgid "Show conflict"
msgstr "Показать конфликты" msgstr "Показать конфликты"
@@ -180,9 +192,6 @@ msgstr "Показать конфликты"
msgid "timers involved" msgid "timers involved"
msgstr "Таймер" msgstr "Таймер"
msgid "Ignore Conflicts"
msgstr "Игнорировать конфликты"
msgid "Ignore Conflict" msgid "Ignore Conflict"
msgstr "Игнорировать конфликт" msgstr "Игнорировать конфликт"
@@ -213,6 +222,12 @@ 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 "Таймер активен"
@@ -237,14 +252,11 @@ msgstr ""
msgid "New Folder" msgid "New Folder"
msgstr "" msgstr ""
msgid "Save" msgid "Create Series Timer based on:"
msgstr "Сохранить" msgstr "Настроить циклический таймер:"
msgid "Cancel" msgid "Create Timer"
msgstr "Отменить" msgstr "Создать"
msgid "Create Series Timer based on"
msgstr "Настроить циклический таймер"
msgid "Series Timer start time" msgid "Series Timer start time"
msgstr "Время с" msgstr "Время с"
@@ -258,9 +270,6 @@ 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 "Циклический таймер создан"
@@ -270,17 +279,17 @@ msgstr "Старт"
msgid "Stop" msgid "Stop"
msgstr "Стоп" msgstr "Стоп"
msgid "Configure Search Timer based on" msgid "Configure Search Timer based on:"
msgstr "Настроить поисковый таймер" msgstr "Настроить поисковый таймер:"
msgid "Search Expression:"
msgstr "Искать выражение:"
msgid "Continue" msgid "Continue"
msgstr "Продолжить" msgstr "Продолжить"
msgid "Configure Search Timer for Search String" msgid "Search Expression:"
msgstr "Настройка таймера поиска по ключевым словам" msgstr "Искать выражение:"
msgid "Configure Search Timer for Search String:"
msgstr "Настройка таймера поиска по ключевым словам:"
msgid "Manually configure Options" msgid "Manually configure Options"
msgstr "Ручная настройка параметров" msgstr "Ручная настройка параметров"
@@ -295,7 +304,7 @@ 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 ""
@@ -447,7 +456,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"
@@ -471,12 +480,12 @@ msgstr "Использовать другие шаблоны"
msgid "search results for Favorite" msgid "search results for Favorite"
msgstr "" msgstr ""
msgid "search result for Favorite"
msgstr ""
msgid "search results for Search Timer" msgid "search results for Search Timer"
msgstr "Совпадений найдено" msgstr "Совпадений найдено"
msgid "search result for Favorite"
msgstr ""
msgid "search result for Search Timer" msgid "search result for Search Timer"
msgstr "Совпадение найдено" msgstr "Совпадение найдено"
@@ -486,8 +495,8 @@ msgstr "Совпадений НЕ найдено"
msgid "Configure Options for Switchtimer" msgid "Configure Options for Switchtimer"
msgstr "Настройка таймера переключения" msgstr "Настройка таймера переключения"
msgid "Minutes before switching" msgid "Create"
msgstr "Минут до события" msgstr "Создать"
msgid "switch" msgid "switch"
msgstr "Переключить" msgstr "Переключить"
@@ -498,12 +507,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 "Таймер переключения создан"
@@ -513,6 +522,9 @@ msgstr "Таймер переключения НЕ был создан!"
msgid "Switch Timer deleted" msgid "Switch Timer deleted"
msgstr "Таймер переключения удален" msgstr "Таймер переключения удален"
msgid "Perform Search"
msgstr "Найти"
msgid "Search Mode" msgid "Search Mode"
msgstr "Режим поиска" msgstr "Режим поиска"
@@ -531,9 +543,6 @@ 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 "Найдено по запросу"
@@ -549,12 +558,12 @@ msgstr ""
msgid "Found" msgid "Found"
msgstr "Найдено" msgstr "Найдено"
msgid "recording"
msgstr "запись"
msgid "recordings" msgid "recordings"
msgstr "записей" msgstr "записей"
msgid "recording"
msgstr "запись"
msgid "for" msgid "for"
msgstr "для" msgstr "для"
@@ -564,6 +573,12 @@ 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 "фраза"
@@ -582,6 +597,9 @@ msgstr "регулярные выражения"
msgid "fuzzy" msgid "fuzzy"
msgstr "" msgstr ""
msgid "allow empty"
msgstr ""
msgid "Interval" msgid "Interval"
msgstr "" msgstr ""
@@ -672,6 +690,9 @@ 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 "Показывать пункт в главном меню"
@@ -748,7 +769,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 "" msgstr "Высота верхней панели (% от высоты OSD)"
msgid "Height of Footer (Perc. of osd height)" msgid "Height of Footer (Perc. of osd height)"
msgstr "" msgstr ""
@@ -879,15 +900,30 @@ msgstr ""
msgid "Use fixed folder" msgid "Use fixed folder"
msgstr "" msgstr ""
msgid "Folder for instant Recordings" msgid "smart"
msgstr "" msgstr ""
msgid "Instant recording:"
msgstr ""
msgid "Folder for instant Recordings"
msgstr "Использовать директории для быстрой записи"
msgid "Folder" msgid "Folder"
msgstr "" msgstr ""
msgid "Add episode to manual timers"
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 ""
@@ -973,7 +1009,7 @@ msgid "EPG Info"
msgstr "" msgstr ""
msgid "Reruns" msgid "Reruns"
msgstr "" msgstr "ПОВТОРЫ"
msgid "Recording Information" msgid "Recording Information"
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: 2019-04-22 14:34+0200\n" "POT-Creation-Date: 2022-04-29 16:05+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 "" msgstr "Repr<EFBFBD>za tohto "
msgid "No reruns found" msgid "No reruns found"
msgstr "" msgstr ""
@@ -54,6 +54,9 @@ msgstr ""
msgid "images" msgid "images"
msgstr "" msgstr ""
msgid "tvguide: RemoteTimerModifications failed"
msgstr ""
msgid "root video folder" msgid "root video folder"
msgstr "Hlavn<76> video adres<65>r" msgstr "Hlavn<76> video adres<65>r"
@@ -69,6 +72,15 @@ msgstr "v
msgid "unknown channel" msgid "unknown channel"
msgstr "nezn<7A>my Kanal" msgstr "nezn<7A>my Kanal"
msgid "with"
msgstr ""
msgid "errors"
msgstr ""
msgid "error"
msgstr ""
msgid "Duration" msgid "Duration"
msgstr "D<><44>ka" msgstr "D<><44>ka"
@@ -96,21 +108,18 @@ 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<61>ite nahra<72>" msgstr "Okam<61>ite nahra<72>"
msgid "Delete Timer" msgid "Timer On/Off"
msgstr "Vymaza<EFBFBD> pl<70>n nahr<68>vania" msgstr "Zap./Vyp. pl<70>n nahr<68>vania"
msgid "Edit Timer" msgid "Edit Timer"
msgstr "Upravi<76> pl<70>n nahr<68>vania" msgstr "Upravi<76> pl<70>n nahr<68>vania"
msgid "Delete Timer"
msgstr "Vymaza<7A> pl<70>n nahr<68>vania"
msgid "Timer Timeline" msgid "Timer Timeline"
msgstr "" msgstr ""
@@ -141,6 +150,9 @@ msgstr "Vyh
msgid "Set Folder for" msgid "Set Folder for"
msgstr "Nastavi<76> adres<65>r pre" msgstr "Nastavi<76> adres<65>r pre"
msgid "Timer changed"
msgstr ""
msgid "Timer created" msgid "Timer created"
msgstr "Pl<50>n vytvoren<65>" msgstr "Pl<50>n vytvoren<65>"
@@ -165,14 +177,14 @@ msgstr "
msgid "No" msgid "No"
msgstr "Nie" msgstr "Nie"
msgid "One" msgid "Timer Conflicts"
msgstr "Jeden" msgstr "Konflikty pl<70>nov"
msgid "detected" msgid "detected"
msgstr "n<>jden<65>ch" msgstr "n<>jden<65>ch"
msgid "Timer Conflicts" msgid "Ignore Conflicts"
msgstr "Konflikty pl<70>nov" msgstr "Ignorova<EFBFBD> konflikty"
msgid "Show conflict" msgid "Show conflict"
msgstr "Zobrazi<7A> konflikt" msgstr "Zobrazi<7A> konflikt"
@@ -180,9 +192,6 @@ msgstr "Zobrazi
msgid "timers involved" msgid "timers involved"
msgstr "pl<70>ny komplikovan<61>" msgstr "pl<70>ny komplikovan<61>"
msgid "Ignore Conflicts"
msgstr "Ignorova<76> konflikty"
msgid "Ignore Conflict" msgid "Ignore Conflict"
msgstr "Ignorova<76> konflikt" msgstr "Ignorova<76> konflikt"
@@ -213,6 +222,12 @@ msgstr ""
msgid "replaced by rerun" msgid "replaced by rerun"
msgstr "" msgstr ""
msgid "Save"
msgstr "Ulo<6C>i<EFBFBD>"
msgid "Cancel"
msgstr "Zru<72>i<EFBFBD>"
msgid "Timer Active" msgid "Timer Active"
msgstr "Pl<50>n akt<6B>vny" msgstr "Pl<50>n akt<6B>vny"
@@ -237,14 +252,11 @@ msgstr ""
msgid "New Folder" msgid "New Folder"
msgstr "" msgstr ""
msgid "Save" msgid "Create Series Timer based on:"
msgstr "Ulo<EFBFBD>i<EFBFBD>" msgstr "Vytvorenie pl<70>nu na z<>klade s<>rie:"
msgid "Cancel" msgid "Create Timer"
msgstr "Zru<EFBFBD>i<EFBFBD>" msgstr "Vytvori<EFBFBD> pl<70>n"
msgid "Create Series Timer based on"
msgstr "Vytvorenie pl<70>nu na z<>klade s<>rie"
msgid "Series Timer start time" msgid "Series Timer start time"
msgstr "S<>riov<6F> pl<70>n za<7A><61>na" msgstr "S<>riov<6F> pl<70>n za<7A><61>na"
@@ -258,9 +270,6 @@ msgstr "Dni"
msgid "Day to start" msgid "Day to start"
msgstr "Za<5A><61>na d<>a" msgstr "Za<5A><61>na d<>a"
msgid "Create Timer"
msgstr "Vytvori<72> pl<70>n"
msgid "Series Timer created" msgid "Series Timer created"
msgstr "Vytvoren<65> s<>riov<6F> pl<70>n" msgstr "Vytvoren<65> s<>riov<6F> pl<70>n"
@@ -270,17 +279,17 @@ msgstr "
msgid "Stop" msgid "Stop"
msgstr "Stop" msgstr "Stop"
msgid "Configure Search Timer based on" msgid "Configure Search Timer based on:"
msgstr "Vyh<79>ad<61>vanie pl<70>nu nastavi<76> na z<>klade" msgstr "Vyh<79>ad<61>vanie pl<70>nu nastavi<76> na z<>klade:"
msgid "Search Expression:"
msgstr "H<>adan<61> v<>raz:"
msgid "Continue" msgid "Continue"
msgstr "<22>al<61>ie" msgstr "<22>al<61>ie"
msgid "Configure Search Timer for Search String" msgid "Search Expression:"
msgstr "Konfigur<EFBFBD>cia vyh<79>ad<61>vania pl<70>nu pre h<>adan<61> k<><6B><EFBFBD>ov<6F> slovo " msgstr "H<EFBFBD>adan<EFBFBD> v<>raz:"
msgid "Configure Search Timer for Search String:"
msgstr "Konfigur<75>cia vyh<79>ad<61>vania pl<70>nu pre h<>adan<61> k<><6B><EFBFBD>ov<6F> slovo:"
msgid "Manually configure Options" msgid "Manually configure Options"
msgstr "Ru<52>ne konfigurova<76> mo<6D>nosti" msgstr "Ru<52>ne konfigurova<76> mo<6D>nosti"
@@ -447,8 +456,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<79>ad<61>va<76> pl<70>nu vytvoren<65>." msgstr "Vyh<79>ad<61>va<76> pl<70>nu vytvoren<65>"
msgid "Search Timer update initialised" msgid "Search Timer update initialised"
msgstr "Vyhlad<61>va<76> pl<70>nu inicializovan<61>" msgstr "Vyhlad<61>va<76> pl<70>nu inicializovan<61>"
@@ -471,12 +480,12 @@ msgstr "Pou
msgid "search results for Favorite" msgid "search results for Favorite"
msgstr "" msgstr ""
msgid "search result for Favorite"
msgstr ""
msgid "search results for Search Timer" msgid "search results for Search Timer"
msgstr "n<>jden<65> v<>sledky vyh<79>ad<61>vania pl<70>nu" msgstr "n<>jden<65> v<>sledky vyh<79>ad<61>vania pl<70>nu"
msgid "search result for Favorite"
msgstr ""
msgid "search result for Search Timer" msgid "search result for Search Timer"
msgstr "n<>jden<65> v<>sledok vyh<79>ad<61>vania pl<70>nu" msgstr "n<>jden<65> v<>sledok vyh<79>ad<61>vania pl<70>nu"
@@ -486,8 +495,8 @@ msgstr "H
msgid "Configure Options for Switchtimer" msgid "Configure Options for Switchtimer"
msgstr "Konfigurova<76> mo<6D>nosti pre prep<65>nac<61> pl<70>n" msgstr "Konfigurova<76> mo<6D>nosti pre prep<65>nac<61> pl<70>n"
msgid "Minutes before switching" msgid "Create"
msgstr "Min<EFBFBD>ty pred prepnut<75>m" msgstr "Vytvori<EFBFBD>"
msgid "switch" msgid "switch"
msgstr "Prepn<70><6E>" msgstr "Prepn<70><6E>"
@@ -498,12 +507,12 @@ msgstr "iba ozn
msgid "ask for switch" msgid "ask for switch"
msgstr "op<6F>ta<74> sa na prepnutie" msgstr "op<6F>ta<74> sa na prepnutie"
msgid "Minutes before switching"
msgstr "Min<69>ty pred prepnut<75>m"
msgid "Switch Mode" msgid "Switch Mode"
msgstr "Prep<65>nac<61> re<72>im" msgstr "Prep<65>nac<61> re<72>im"
msgid "Create"
msgstr "Vytvori<72>"
msgid "Switch Timer sucessfully created" msgid "Switch Timer sucessfully created"
msgstr "Prepnutie je napl<70>novan<61>" msgstr "Prepnutie je napl<70>novan<61>"
@@ -513,6 +522,9 @@ msgstr "Pl
msgid "Switch Timer deleted" msgid "Switch Timer deleted"
msgstr "Pl<50>n prepnutia vymazan<61>" msgstr "Pl<50>n prepnutia vymazan<61>"
msgid "Perform Search"
msgstr "Vykona<6E> vyh<79>ad<61>vanie"
msgid "Search Mode" msgid "Search Mode"
msgstr "Re<52>im vyh<79>ad<61>vania" msgstr "Re<52>im vyh<79>ad<61>vania"
@@ -531,9 +543,6 @@ msgstr "H
msgid "Show Search Options" msgid "Show Search Options"
msgstr "Zobrazi<7A> mo<6D>nosti vyh<79>ad<61>vania" msgstr "Zobrazi<7A> mo<6D>nosti vyh<79>ad<61>vania"
msgid "Perform Search"
msgstr "Vykona<6E> vyh<79>ad<61>vanie"
msgid "search results for" msgid "search results for"
msgstr "vyh<79>adan<61> v<>sledky pre" msgstr "vyh<79>adan<61> v<>sledky pre"
@@ -549,12 +558,12 @@ msgstr ""
msgid "Found" msgid "Found"
msgstr "N<>jden<65>" msgstr "N<>jden<65>"
msgid "recording"
msgstr "nahr<68>vka"
msgid "recordings" msgid "recordings"
msgstr "nahr<68>vky" msgstr "nahr<68>vky"
msgid "recording"
msgstr "nahr<68>vka"
msgid "for" msgid "for"
msgstr "pre" msgstr "pre"
@@ -564,6 +573,12 @@ 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<74> v<>raz" msgstr "kompletn<74> v<>raz"
@@ -582,6 +597,9 @@ msgstr "regul
msgid "fuzzy" msgid "fuzzy"
msgstr "" msgstr ""
msgid "allow empty"
msgstr ""
msgid "Interval" msgid "Interval"
msgstr "" msgstr ""
@@ -672,6 +690,9 @@ 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<7A> v hlavnom menu" msgstr "Zobrazi<7A> v hlavnom menu"
@@ -748,7 +769,7 @@ msgid "Display time in EPG Grids"
msgstr "Zobrazi<7A> <20>as v EPG mrie<69>ke" msgstr "Zobrazi<7A> <20>as v EPG mrie<69>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 "" msgstr "V<EFBFBD><EFBFBD>ka stavovej hlavi<76>ky (% z OSD v<><76>ky)"
msgid "Height of Footer (Perc. of osd height)" msgid "Height of Footer (Perc. of osd height)"
msgstr "" msgstr ""
@@ -879,15 +900,30 @@ msgstr ""
msgid "Use fixed folder" msgid "Use fixed folder"
msgstr "" msgstr ""
msgid "Folder for instant Recordings" msgid "smart"
msgstr "chytr<74>"
msgid "Instant recording:"
msgstr "" msgstr ""
msgid "Folder for instant Recordings"
msgstr "Pou<6F>i<EFBFBD> adres<65>re pre okam<61>it<69> nahr<68>vky"
msgid "Folder" msgid "Folder"
msgstr "" msgstr ""
msgid "Add episode to manual timers"
msgstr "Prida<64> epiz<69>dy do ru<72>n<EFBFBD>ho <20>asova<76>a"
msgid "Use Remotetimers" msgid "Use Remotetimers"
msgstr "Pou<6F>i<EFBFBD> vzdialen<65> pl<70>nova<76>" msgstr "Pou<6F>i<EFBFBD> vzdialen<65> pl<70>nova<76>"
msgid "Show timer confirmation messages"
msgstr ""
msgid "Favorites:"
msgstr ""
msgid "Limit channels in favorites" msgid "Limit channels in favorites"
msgstr "" msgstr ""
@@ -973,7 +1009,7 @@ msgid "EPG Info"
msgstr "" msgstr ""
msgid "Reruns" msgid "Reruns"
msgstr "" msgstr "Repr<EFBFBD>za"
msgid "Recording Information" msgid "Recording Information"
msgstr "" msgstr ""

View File

@@ -1,4 +1,4 @@
#define __STL_CONFIG_H #define DISABLE_TEMPLATES_COLLIDING_WITH_STL
#include <string> #include <string>
#include <sstream> #include <sstream>
@@ -96,10 +96,11 @@ 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
if (Setup.SVDRPPeering && *Setup.SVDRPDefaultHost)
((cTimer*)timer)->SetRemote(Setup.SVDRPDefaultHost);
LOCK_TIMERS_WRITE; LOCK_TIMERS_WRITE;
cTimers* timers = Timers; cTimers* timers = Timers;
timers->SetExplicitModify();
if (Setup.SVDRPPeering && *Setup.SVDRPDefaultHost)
timer->SetRemote(Setup.SVDRPDefaultHost);
#else #else
cTimers* timers = &Timers; cTimers* timers = &Timers;
#endif #endif
@@ -115,12 +116,21 @@ 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->Add(timer);
timers->SetModified();
#if VDRVERSNUM >= 20301
if (!HandleRemoteTimerModifications(timer)) {
timers->Del(timer);
esyslog(tr("tvguide: RemoteTimerModifications failed"));
} else {
isyslog("timer %s added (active)", *timer->ToDescr());
}
#else
isyslog("timer %s added (active)", *timer->ToDescr()); isyslog("timer %s added (active)", *timer->ToDescr());
#endif
} }
SetTimerPath(timer, event, path); return timers->GetTimer(timer);
timers->SetModified();
return timer;
} }
cTimer *cRecManager::createRemoteTimer(const cEvent *event, std::string path) { cTimer *cRecManager::createRemoteTimer(const cEvent *event, std::string path) {
@@ -165,31 +175,29 @@ 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(), '/', '~');
newFileName = cString::sprintf("%s~%s", path.c_str(), timer->File()); if (addSubtitle)
newFileName = cString::sprintf("%s~%s~%s", path.c_str(), event->Title(), event->ShortText());
else
newFileName = cString::sprintf("%s~%s", path.c_str(), timer->File());
} else { } else {
newFileName = event->Title(); if (addSubtitle)
newFileName = cString::sprintf("%s~%s", event->Title(), event->ShortText());
else
newFileName = event->Title();
} }
timer->SetFile(*newFileName); timer->SetFile(*newFileName);
} }
void cRecManager::DeleteTimer(int timerID) {
const cTimer *t;
#if VDRVERSNUM >= 20301
{
LOCK_TIMERS_READ;
t = Timers->Get(timerID);
}
#else
t = Timers.Get(timerID);
#endif
if (!t)
return;
DeleteTimer(t);
}
void cRecManager::DeleteTimer(const cEvent *event) { void cRecManager::DeleteTimer(const cEvent *event) {
if (!event) if (!event)
return; return;
@@ -219,6 +227,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;
@@ -253,36 +267,67 @@ void cRecManager::DeleteRemoteTimer(const cEvent *event) {
} }
} }
void cRecManager::SaveTimer(const cTimer *t, cTimer newTimerSettings) { void cRecManager::OnOffTimer(const cEvent *event) {
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;
cTimer *timer = Timers->GetTimer(t); cTimers* timers = Timers;
timers->SetExplicitModify();
if (t && t->Remote()) {
if (!HandleRemoteTimerModifications(newTimerSettings, (cTimer *)t)) {
esyslog(tr("tvguide: RemoteTimerModifications failed"));
}
}
cTimer *timer = timers->GetTimer(t);
#else #else
cTimer *timer = Timers.GetTimer((cTimer*)t); cTimers* timers = &Timers;
cTimer *timer = timers->GetTimer((cTimer *)t);
#endif #endif
if (!timer) {
return;
}
bool active = newTimerSettings.HasFlags(tfActive); bool active = true;
int prio = newTimerSettings.Priority(); if (newTimerSettings) {
int lifetime = newTimerSettings.Lifetime(); int prio = newTimerSettings->Priority();
time_t day = newTimerSettings.Day(); int lifetime = newTimerSettings->Lifetime();
int start = newTimerSettings.Start(); time_t day = newTimerSettings->Day();
int stop = newTimerSettings.Stop(); int start = newTimerSettings->Start();
std::string fileName = newTimerSettings.File(); int stop = newTimerSettings->Stop();
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());
if (timer->HasFlags(tfActive) && !active) active = newTimerSettings->HasFlags(tfActive);
timer->ClrFlags(tfActive); } else
else if (!timer->HasFlags(tfActive) && active) active = !timer->HasFlags(tfActive);
timer->SetFlags(tfActive);
if (active)
timer->SetFlags(tfActive);
else
timer->ClrFlags(tfActive);
#if VDRVERSNUM < 20300 #if VDRVERSNUM < 20300
timer->SetEventFromSchedule(); timer->SetEventFromSchedule();
@@ -294,11 +339,7 @@ void cRecManager::SaveTimer(const cTimer *t, cTimer newTimerSettings) {
rt.timer = NULL; rt.timer = NULL;
RefreshRemoteTimers(); RefreshRemoteTimers();
} else { } else {
#if VDRVERSNUM >= 20301 timers->SetModified();
Timers->SetModified();
#else
Timers.SetModified();
#endif
} }
} }

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); void SaveTimer(const cTimer *timer, cTimer *newTimerSettings = NULL);
bool IsRecorded(const cEvent *event); bool IsRecorded(const cEvent *event);
cTVGuideTimerConflicts *CheckTimerConflict(void); cTVGuideTimerConflicts *CheckTimerConflict(void);
void CreateSeriesTimer(cTimer *seriesTimer); void CreateSeriesTimer(cTimer *seriesTimer);

View File

@@ -28,7 +28,7 @@ cRecMenu::~cRecMenu(void) {
if (footer) if (footer)
delete footer; delete footer;
if (pixmapScrollBar) if (pixmapScrollBar)
osdManager.releasePixmap(pixmapScrollBar); osdManager.DestroyPixmap(pixmapScrollBar);
if (imgScrollBar) if (imgScrollBar)
delete imgScrollBar; delete imgScrollBar;
} }
@@ -81,26 +81,26 @@ bool cRecMenu::CalculateHeight(bool reDraw) {
void cRecMenu::CreatePixmap(void) { void cRecMenu::CreatePixmap(void) {
if (pixmap) if (pixmap)
osdManager.releasePixmap(pixmap); osdManager.DestroyPixmap(pixmap);
pixmap = osdManager.requestPixmap(3, cRect(x, y, width, height)); pixmap = osdManager.CreatePixmap(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.releasePixmap(pixmapScrollBar); osdManager.DestroyPixmap(pixmapScrollBar);
pixmapScrollBar = osdManager.requestPixmap(4, cRect(scrollBarX, scrollBarY, scrollbarWidth, scrollBarHeight)); pixmapScrollBar = osdManager.CreatePixmap(4, cRect(scrollBarX, scrollBarY, scrollbarWidth, scrollBarHeight));
} else } else
pixmapScrollBar = NULL; pixmapScrollBar = NULL;
} }
void cRecMenu::SetHeader(cRecMenuItem *header) { void cRecMenu::AddHeader(cRecMenuItem *header) {
this->header = header; this->header = header;
headerHeight = header->GetHeight(); headerHeight = header->GetHeight();
height += headerHeight; height += headerHeight;
} }
void cRecMenu::SetFooter(cRecMenuItem *footer) { void cRecMenu::AddFooter(cRecMenuItem *footer) {
this->footer = footer; this->footer = footer;
footerHeight = footer->GetHeight(); footerHeight = footer->GetHeight();
height += footerHeight; height += footerHeight;
@@ -121,12 +121,11 @@ void cRecMenu::InitMenu(bool complete) {
numItems = 0; numItems = 0;
if (scrollable) { if (scrollable) {
width -= scrollbarWidth + border; width -= scrollbarWidth + border;
osdManager.releasePixmap(pixmapScrollBar); osdManager.DestroyPixmap(pixmapScrollBar);
pixmapScrollBar = NULL; pixmapScrollBar = NULL;
delete imgScrollBar; DELETENULL(imgScrollBar);
imgScrollBar = NULL;
} }
osdManager.releasePixmap(pixmap); osdManager.DestroyPixmap(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)
@@ -179,14 +178,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);
@@ -217,7 +216,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 {
@@ -275,7 +274,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;
} }
@@ -313,7 +312,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 {
@@ -335,7 +334,7 @@ void cRecMenu::PageUp(void) {
Activate(footer, menuItems.front()); Activate(footer, menuItems.front());
return; return;
} }
int newActive = GetActive() - numItems; int newActive = GetNumActive() - numItems;
if (newActive < 0) if (newActive < 0)
newActive = 0; newActive = 0;
activeItem->setInactive(); activeItem->setInactive();
@@ -348,7 +347,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;
@@ -360,8 +359,8 @@ void cRecMenu::PageUp(void) {
break; break;
} }
} }
if (GetActive() == numItems) if (GetNumActive() == numItems)
menuItems.front()->setActive(); menuItems.front()->SetActive();
if (CalculateHeight(true)) if (CalculateHeight(true))
CreatePixmap(); CreatePixmap();
Arrange(deleteMenuItems); Arrange(deleteMenuItems);
@@ -379,7 +378,7 @@ void cRecMenu::PageDown(void) {
JumpEnd(); JumpEnd();
return; return;
} }
int newActive = GetActive() + numItems; int newActive = GetNumActive() + numItems;
activeItem->setInactive(); activeItem->setInactive();
activeItem->setBackground(); activeItem->setBackground();
ClearMenuItems(); ClearMenuItems();
@@ -390,7 +389,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;
@@ -402,8 +401,8 @@ void cRecMenu::PageDown(void) {
break; break;
} }
} }
if (GetActive() == GetTotalNumMenuItems()) if (GetNumActive() == GetTotalNumMenuItems())
menuItems.back()->setActive(); menuItems.back()->SetActive();
if (CalculateHeight(true)) if (CalculateHeight(true))
CreatePixmap(); CreatePixmap();
Arrange(deleteMenuItems); Arrange(deleteMenuItems);
@@ -441,9 +440,9 @@ void cRecMenu::JumpBegin(void) {
CreatePixmap(); CreatePixmap();
Arrange(false); Arrange(false);
startIndex = 0; startIndex = 0;
stopIndex = numItems - 1; stopIndex = currentItem;
cRecMenuItem *first = menuItems.front(); cRecMenuItem *first = menuItems.front();
first->setActive(); first->SetActive();
first->setBackground(); first->setBackground();
first->Draw(); first->Draw();
Display(false); Display(false);
@@ -491,12 +490,12 @@ void cRecMenu::JumpEnd(void) {
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();
} }
@@ -589,13 +588,17 @@ 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 (imgScrollBar == NULL) { if (!totalNumItems)
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);
@@ -603,10 +606,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;
} }
@@ -621,10 +624,10 @@ cRecMenuItem *cRecMenu::GetMenuItemAt(int num) {
return NULL; return NULL;
} }
int cRecMenu::GetActive(void) { int cRecMenu::GetNumActive(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++;
@@ -674,25 +677,21 @@ 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 (config.style != eStyleFlat) { if (height >= 32 && config.style != eStyleFlat) {
int numSteps = 64; int numSteps = 64;
int alphaStep = 0x03; int alphaStep = 0x03;
if (height < 30) if (height < 100) {
return image;
else if (height < 100) {
numSteps = 32; numSteps = 32;
alphaStep = 0x06; alphaStep = 0x06;
} }
int stepY = 0.5*height / numSteps; int stepY = std::max(1, (int)(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;

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 SetHeader(cRecMenuItem *header); void AddHeader(cRecMenuItem *header);
void SetFooter(cRecMenuItem *footer); void AddFooter(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 GetActive(void); int GetNumActive(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

View File

@@ -30,7 +30,7 @@ void cRecMenuItem::SetGeometry(int x, int y, int width) {
void cRecMenuItem::SetPixmaps(void) { void cRecMenuItem::SetPixmaps(void) {
if (!pixmap) if (!pixmap)
pixmap = osdManager.requestPixmap(4, cRect(x, y, width, height)); pixmap = osdManager.CreatePixmap(4, cRect(x, y, width, height));
else else
pixmap->SetViewPort(cRect(x, y, width, height)); pixmap->SetViewPort(cRect(x, y, width, height));
} }
@@ -76,7 +76,7 @@ cRecMenuItemButton::cRecMenuItemButton(const char *text, eRecMenuState action, b
cRecMenuItemButton::~cRecMenuItemButton(void) { cRecMenuItemButton::~cRecMenuItemButton(void) {
if (pixmapText) if (pixmapText)
osdManager.releasePixmap(pixmapText); osdManager.DestroyPixmap(pixmapText);
} }
int cRecMenuItemButton::GetWidth(void) { int cRecMenuItemButton::GetWidth(void) {
@@ -89,8 +89,8 @@ void cRecMenuItemButton::SetPixmaps(void) {
width = width / 2; width = width / 2;
} }
if (!pixmap) { if (!pixmap) {
pixmap = osdManager.requestPixmap(4, cRect(x, y, width, height)); pixmap = osdManager.CreatePixmap(4, cRect(x, y, width, height));
pixmapText = osdManager.requestPixmap(5, cRect(x, y, width, height)); pixmapText = osdManager.CreatePixmap(5, cRect(x, y, width, height));
} else { } else {
pixmap->SetViewPort(cRect(x, y, width, height)); pixmap->SetViewPort(cRect(x, y, width, height));
pixmapText->SetViewPort(cRect(x, y, width, height)); pixmapText->SetViewPort(cRect(x, y, width, height));
@@ -158,8 +158,8 @@ void cRecMenuItemButtonYesNo::SetPixmaps(void) {
int noX = x + 52 * width / 100; int noX = x + 52 * width / 100;
int yPixmaps = y + geoManager.borderRecMenus / 2; int yPixmaps = y + geoManager.borderRecMenus / 2;
if (!pixmap) { if (!pixmap) {
pixmap = osdManager.requestPixmap(4, cRect(yesX, yPixmaps, buttonWidth, height)); pixmap = osdManager.CreatePixmap(4, cRect(yesX, yPixmaps, buttonWidth, height));
pixmapNo = new cStyledPixmap(osdManager.requestPixmap(4, cRect(noX, yPixmaps, buttonWidth, height))); pixmapNo = new cStyledPixmap(osdManager.CreatePixmap(4, cRect(noX, yPixmaps, buttonWidth, height)));
} else { } else {
pixmap->SetViewPort(cRect(yesX, yPixmaps, buttonWidth, height)); pixmap->SetViewPort(cRect(yesX, yPixmaps, buttonWidth, height));
pixmapNo->SetViewPort(cRect(noX, yPixmaps, buttonWidth, height)); pixmapNo->SetViewPort(cRect(noX, yPixmaps, buttonWidth, height));
@@ -266,15 +266,41 @@ cRecMenuItemInfo::cRecMenuItemInfo(const char *text, bool largeFont) {
selectable = false; selectable = false;
active = false; active = false;
this->text = text; this->text = text;
this->line1 = "";
this->line2 = "";
this->line3 = "";
this->line4 = "";
this->numLines = 1;
fontInfo = (largeFont) ? fontLarge : font; fontInfo = (largeFont) ? fontLarge : font;
border = 10; border = 10;
} }
cRecMenuItemInfo::cRecMenuItemInfo(std::string line1, int numLines, std::string line2, std::string line3, std::string line4, int width, bool largeFont) {
selectable = false;
fontInfo = (largeFont) ? fontLarge : font;
border = 10;
this->numLines = numLines;
this->line2 = line2;
this->line3 = line3;
this->line4 = line4;
if (numLines == 1) {
this->line1 = line1;
} else if (numLines == 2) {
this->line1 = cString::sprintf("%s\n%s", line1.c_str(), line2.c_str());
} else if (numLines == 3) {
this->line1 = cString::sprintf("%s\n%s\n%s", line1.c_str(), line2.c_str(), line3.c_str());
} else if (numLines == 4) {
this->line1 = cString::sprintf("%s\n%s\n%s\n%s", line1.c_str(), line2.c_str(), line3.c_str(), line4.c_str());
}
this->active = false;
CalculateHeight(width);
}
cRecMenuItemInfo::~cRecMenuItemInfo(void) { cRecMenuItemInfo::~cRecMenuItemInfo(void) {
} }
void cRecMenuItemInfo::CalculateHeight(int textWidth) { void cRecMenuItemInfo::CalculateHeight(int textWidth) {
wrapper.Set(*text, fontInfo, textWidth); wrapper.Set((line1 == "") ? *text : line1.c_str(), fontInfo, textWidth);
height = fontInfo->Height() * wrapper.Lines() + 2 * border; height = fontInfo->Height() * wrapper.Lines() + 2 * border;
} }
@@ -317,13 +343,13 @@ cRecMenuItemInt::cRecMenuItemInt(cString text,
cRecMenuItemInt::~cRecMenuItemInt(void) { cRecMenuItemInt::~cRecMenuItemInt(void) {
if (pixmapVal) if (pixmapVal)
osdManager.releasePixmap(pixmapVal); osdManager.DestroyPixmap(pixmapVal);
} }
void cRecMenuItemInt::SetPixmaps(void) { void cRecMenuItemInt::SetPixmaps(void) {
if (!pixmap) { if (!pixmap) {
pixmap = osdManager.requestPixmap(4, cRect(x, y, width, height)); pixmap = osdManager.CreatePixmap(4, cRect(x, y, width, height));
pixmapVal = osdManager.requestPixmap(5, cRect(x, y, width, height)); pixmapVal = osdManager.CreatePixmap(5, cRect(x, y, width, height));
} else { } else {
pixmap->SetViewPort(cRect(x, y, width, height)); pixmap->SetViewPort(cRect(x, y, width, height));
pixmapVal->SetViewPort(cRect(x, y, width, height)); pixmapVal->SetViewPort(cRect(x, y, width, height));
@@ -438,13 +464,13 @@ cRecMenuItemBool::cRecMenuItemBool(cString text,
cRecMenuItemBool::~cRecMenuItemBool(void) { cRecMenuItemBool::~cRecMenuItemBool(void) {
if (pixmapVal) if (pixmapVal)
osdManager.releasePixmap(pixmapVal); osdManager.DestroyPixmap(pixmapVal);
} }
void cRecMenuItemBool::SetPixmaps(void) { void cRecMenuItemBool::SetPixmaps(void) {
if (!pixmap) { if (!pixmap) {
pixmap = osdManager.requestPixmap(4, cRect(x, y, width, height)); pixmap = osdManager.CreatePixmap(4, cRect(x, y, width, height));
pixmapVal = osdManager.requestPixmap(5, cRect(x, y, width, height)); pixmapVal = osdManager.CreatePixmap(5, cRect(x, y, width, height));
} else { } else {
pixmap->SetViewPort(cRect(x, y, width, height)); pixmap->SetViewPort(cRect(x, y, width, height));
pixmapVal->SetViewPort(cRect(x, y, width, height)); pixmapVal->SetViewPort(cRect(x, y, width, height));
@@ -525,13 +551,13 @@ cRecMenuItemSelect::cRecMenuItemSelect(cString text,
cRecMenuItemSelect::~cRecMenuItemSelect(void) { cRecMenuItemSelect::~cRecMenuItemSelect(void) {
if (pixmapVal) if (pixmapVal)
osdManager.releasePixmap(pixmapVal); osdManager.DestroyPixmap(pixmapVal);
} }
void cRecMenuItemSelect::SetPixmaps(void) { void cRecMenuItemSelect::SetPixmaps(void) {
if (!pixmap) { if (!pixmap) {
pixmap = osdManager.requestPixmap(4, cRect(x, y, width, height)); pixmap = osdManager.CreatePixmap(4, cRect(x, y, width, height));
pixmapVal = osdManager.requestPixmap(5, cRect(x, y, width, height)); pixmapVal = osdManager.CreatePixmap(5, cRect(x, y, width, height));
} else { } else {
pixmap->SetViewPort(cRect(x, y, width, height)); pixmap->SetViewPort(cRect(x, y, width, height));
pixmapVal->SetViewPort(cRect(x, y, width, height)); pixmapVal->SetViewPort(cRect(x, y, width, height));
@@ -557,7 +583,7 @@ void cRecMenuItemSelect::Draw(void) {
void cRecMenuItemSelect::DrawValue(void) { void cRecMenuItemSelect::DrawValue(void) {
pixmapVal->Fill(clrTransparent); pixmapVal->Fill(clrTransparent);
std::string textVal = strings[currentVal]; std::string textVal = strings[currentVal];
int iconSize = min(128, height); int iconSize = std::min(128, height);
int textX = width - font->Width(textVal.c_str()) - iconSize; int textX = width - font->Width(textVal.c_str()) - iconSize;
int textY = (height - font->Height()) / 2; int textY = (height - font->Height()) / 2;
pixmapVal->DrawText(cPoint(textX, textY), textVal.c_str(), colorText, clrTransparent, font); pixmapVal->DrawText(cPoint(textX, textY), textVal.c_str(), colorText, clrTransparent, font);
@@ -633,13 +659,13 @@ cRecMenuItemSelectDirectory::cRecMenuItemSelectDirectory(cString text,
cRecMenuItemSelectDirectory::~cRecMenuItemSelectDirectory(void) { cRecMenuItemSelectDirectory::~cRecMenuItemSelectDirectory(void) {
if (pixmapVal) if (pixmapVal)
osdManager.releasePixmap(pixmapVal); osdManager.DestroyPixmap(pixmapVal);
} }
void cRecMenuItemSelectDirectory::SetPixmaps(void) { void cRecMenuItemSelectDirectory::SetPixmaps(void) {
if (!pixmap) { if (!pixmap) {
pixmap = osdManager.requestPixmap(4, cRect(x, y, width, height)); pixmap = osdManager.CreatePixmap(4, cRect(x, y, width, height));
pixmapVal = osdManager.requestPixmap(5, cRect(x, y, width, height)); pixmapVal = osdManager.CreatePixmap(5, cRect(x, y, width, height));
} else { } else {
pixmap->SetViewPort(cRect(x, y, width, height)); pixmap->SetViewPort(cRect(x, y, width, height));
pixmapVal->SetViewPort(cRect(x, y, width, height)); pixmapVal->SetViewPort(cRect(x, y, width, height));
@@ -664,7 +690,7 @@ void cRecMenuItemSelectDirectory::Draw(void) {
void cRecMenuItemSelectDirectory::DrawValue(void) { void cRecMenuItemSelectDirectory::DrawValue(void) {
pixmapVal->Fill(clrTransparent); pixmapVal->Fill(clrTransparent);
int iconSize = min(128, height); int iconSize = std::min(128, height);
int textX = std::max(width - font->Width(folders[currentVal].c_str()) - iconSize, 10 + font->Width(*text) + 2 * iconSize); int textX = std::max(width - font->Width(folders[currentVal].c_str()) - iconSize, 10 + font->Width(*text) + 2 * iconSize);
int textY = (height - font->Height()) / 2; int textY = (height - font->Height()) / 2;
pixmapVal->DrawText(cPoint(textX, textY), folders[currentVal].c_str(), colorText, clrTransparent, font, width - textX - iconSize, font->Height(), taTop | taRight); pixmapVal->DrawText(cPoint(textX, textY), folders[currentVal].c_str(), colorText, clrTransparent, font, width - textX - iconSize, font->Height(), taTop | taRight);
@@ -767,13 +793,13 @@ cRecMenuItemText::cRecMenuItemText(cString title,
cRecMenuItemText::~cRecMenuItemText(void) { cRecMenuItemText::~cRecMenuItemText(void) {
if (pixmapVal) if (pixmapVal)
osdManager.releasePixmap(pixmapVal); osdManager.DestroyPixmap(pixmapVal);
if (pixmapKeyboard) if (pixmapKeyboard)
delete pixmapKeyboard; delete pixmapKeyboard;
if (pixmapKeyboardHighlight) if (pixmapKeyboardHighlight)
osdManager.releasePixmap(pixmapKeyboardHighlight); osdManager.DestroyPixmap(pixmapKeyboardHighlight);
if (pixmapKeyboardIcons) if (pixmapKeyboardIcons)
osdManager.releasePixmap(pixmapKeyboardIcons); osdManager.DestroyPixmap(pixmapKeyboardIcons);
delete[] valueUtf8; delete[] valueUtf8;
delete[] allowedUtf8; delete[] allowedUtf8;
delete[] charMapUtf8; delete[] charMapUtf8;
@@ -787,11 +813,11 @@ void cRecMenuItemText::SetPixmaps(void) {
int keyboardX = x + (100 - keyboardWidth)*width / 100; int keyboardX = x + (100 - keyboardWidth)*width / 100;
int keyboardY = y + height; int keyboardY = y + height;
if (!pixmap) { if (!pixmap) {
pixmap = osdManager.requestPixmap(4, cRect(x, y, width, height)); pixmap = osdManager.CreatePixmap(4, cRect(x, y, width, height));
pixmapVal = osdManager.requestPixmap(5, cRect(xPixmapVal, yPixmapVal, widthPixmapVal, heightPixmapVal)); pixmapVal = osdManager.CreatePixmap(5, cRect(xPixmapVal, yPixmapVal, widthPixmapVal, heightPixmapVal));
pixmapKeyboard = new cStyledPixmap(osdManager.requestPixmap(-1, cRect(keyboardX, keyboardY, keyboardWidth*width/100, keyboardHeight))); pixmapKeyboard = new cStyledPixmap(osdManager.CreatePixmap(-1, cRect(keyboardX, keyboardY, keyboardWidth*width/100, keyboardHeight)));
pixmapKeyboardHighlight = osdManager.requestPixmap(-1, cRect(keyboardX, keyboardY, keyboardWidth*width/100, keyboardHeight)); pixmapKeyboardHighlight = osdManager.CreatePixmap(-1, cRect(keyboardX, keyboardY, keyboardWidth*width/100, keyboardHeight));
pixmapKeyboardIcons = osdManager.requestPixmap(-1, cRect(keyboardX, keyboardY, keyboardWidth*width/100, keyboardHeight)); pixmapKeyboardIcons = osdManager.CreatePixmap(-1, cRect(keyboardX, keyboardY, keyboardWidth*width/100, keyboardHeight));
} else { } else {
pixmap->SetViewPort(cRect(x, y, width, height)); pixmap->SetViewPort(cRect(x, y, width, height));
pixmapVal->SetViewPort(cRect(xPixmapVal, yPixmapVal, widthPixmapVal, heightPixmapVal)); pixmapVal->SetViewPort(cRect(xPixmapVal, yPixmapVal, widthPixmapVal, heightPixmapVal));
@@ -967,7 +993,7 @@ char *cRecMenuItemText::GetSMSKeys(int num) {
if (specialChar) if (specialChar)
addition = 1; addition = 1;
Utf8FromArray(startCharUtf8, p, numChars+addition); Utf8FromArray(startCharUtf8, p, numChars+addition);
int maxChars = min(numChars+1+addition, 8); int maxChars = std::min(numChars+1+addition, 8);
char *smskey = new char[maxChars]; char *smskey = new char[maxChars];
Utf8Strn0Cpy(smskey, p, maxChars); Utf8Strn0Cpy(smskey, p, maxChars);
return smskey; return smskey;
@@ -1324,13 +1350,13 @@ cRecMenuItemTime::cRecMenuItemTime(cString text,
cRecMenuItemTime::~cRecMenuItemTime(void) { cRecMenuItemTime::~cRecMenuItemTime(void) {
if (pixmapVal) if (pixmapVal)
osdManager.releasePixmap(pixmapVal); osdManager.DestroyPixmap(pixmapVal);
} }
void cRecMenuItemTime::SetPixmaps(void) { void cRecMenuItemTime::SetPixmaps(void) {
if (!pixmap) { if (!pixmap) {
pixmap = osdManager.requestPixmap(4, cRect(x, y, width, height)); pixmap = osdManager.CreatePixmap(4, cRect(x, y, width, height));
pixmapVal = osdManager.requestPixmap(5, cRect(x, y, width, height)); pixmapVal = osdManager.CreatePixmap(5, cRect(x, y, width, height));
} else { } else {
pixmap->SetViewPort(cRect(x, y, width, height)); pixmap->SetViewPort(cRect(x, y, width, height));
pixmapVal->SetViewPort(cRect(x, y, width, height)); pixmapVal->SetViewPort(cRect(x, y, width, height));
@@ -1463,13 +1489,13 @@ cRecMenuItemDay::cRecMenuItemDay(cString text,
cRecMenuItemDay::~cRecMenuItemDay(void) { cRecMenuItemDay::~cRecMenuItemDay(void) {
if (pixmapVal) if (pixmapVal)
osdManager.releasePixmap(pixmapVal); osdManager.DestroyPixmap(pixmapVal);
} }
void cRecMenuItemDay::SetPixmaps(void) { void cRecMenuItemDay::SetPixmaps(void) {
if (!pixmap) { if (!pixmap) {
pixmap = osdManager.requestPixmap(4, cRect(x, y, width, height)); pixmap = osdManager.CreatePixmap(4, cRect(x, y, width, height));
pixmapVal = osdManager.requestPixmap(5, cRect(x, y, width, height)); pixmapVal = osdManager.CreatePixmap(5, cRect(x, y, width, height));
} else { } else {
pixmap->SetViewPort(cRect(x, y, width, height)); pixmap->SetViewPort(cRect(x, y, width, height));
pixmapVal->SetViewPort(cRect(x, y, width, height)); pixmapVal->SetViewPort(cRect(x, y, width, height));
@@ -1548,21 +1574,22 @@ cRecMenuItemTimer::cRecMenuItemTimer(const cTimer *timer,
this->overlapStop = overlapStop; this->overlapStop = overlapStop;
this->active = active; this->active = active;
height = 3 * font->Height(); height = 3 * font->Height();
pixmapStatus = NULL;
pixmapIcons = NULL; pixmapIcons = NULL;
} }
cRecMenuItemTimer::~cRecMenuItemTimer(void) { cRecMenuItemTimer::~cRecMenuItemTimer(void) {
if (pixmapIcons) if (pixmapIcons)
osdManager.releasePixmap(pixmapIcons); osdManager.DestroyPixmap(pixmapIcons);
if (pixmapStatus) if (pixmapStatus)
osdManager.releasePixmap(pixmapStatus); osdManager.DestroyPixmap(pixmapStatus);
} }
void cRecMenuItemTimer::SetPixmaps(void) { void cRecMenuItemTimer::SetPixmaps(void) {
if (!pixmap) { if (!pixmap) {
pixmap = osdManager.requestPixmap(4, cRect(x, y, width, height)); pixmap = osdManager.CreatePixmap(4, cRect(x, y, width, height));
pixmapStatus = osdManager.requestPixmap(5, cRect(x, y, width, height)); pixmapStatus = osdManager.CreatePixmap(5, cRect(x, y, width, height));
pixmapIcons = osdManager.requestPixmap(6, cRect(x, y, width, height)); pixmapIcons = osdManager.CreatePixmap(6, cRect(x, y, width, height));
} else { } else {
pixmap->SetViewPort(cRect(x, y, width, height)); pixmap->SetViewPort(cRect(x, y, width, height));
pixmapStatus->SetViewPort(cRect(x, y, width, height)); pixmapStatus->SetViewPort(cRect(x, y, width, height));
@@ -1585,6 +1612,8 @@ void cRecMenuItemTimer::Show(void) {
} }
void cRecMenuItemTimer::Draw(void) { void cRecMenuItemTimer::Draw(void) {
if (!timer)
return;
const cChannel *channel = timer->Channel(); const cChannel *channel = timer->Channel();
int channelTransponder = 0; int channelTransponder = 0;
cString channelName = ""; cString channelName = "";
@@ -1598,7 +1627,7 @@ void cRecMenuItemTimer::Draw(void) {
if (!config.hideChannelLogos) { if (!config.hideChannelLogos) {
if (imgLoader.LoadLogo(channel, logoWidth, height)) { if (imgLoader.LoadLogo(channel, logoWidth, height)) {
cImage logo = imgLoader.GetImage(); cImage logo = imgLoader.GetImage();
pixmapIcons->DrawImage(cPoint(logoX, 0), logo); pixmapIcons->DrawImage(cPoint(logoX, (height - logo.Height()) / 2), logo);
logoX += logoWidth + 5; logoX += logoWidth + 5;
} }
} }
@@ -1736,12 +1765,17 @@ cRecMenuItemTimerConflictHeader::cRecMenuItemTimerConflictHeader(time_t conflict
cRecMenuItemTimerConflictHeader::~cRecMenuItemTimerConflictHeader(void) { cRecMenuItemTimerConflictHeader::~cRecMenuItemTimerConflictHeader(void) {
if (pixmapStatus) if (pixmapStatus)
osdManager.releasePixmap(pixmapStatus); osdManager.DestroyPixmap(pixmapStatus);
} }
void cRecMenuItemTimerConflictHeader::SetPixmaps(void) { void cRecMenuItemTimerConflictHeader::SetPixmaps(void) {
pixmap = osdManager.requestPixmap(4, cRect(x, y, width, height)); if (!pixmap) {
pixmapStatus = osdManager.requestPixmap(5, cRect(x, y, width, height)); pixmap = osdManager.CreatePixmap(4, cRect(x, y, width, height));
pixmapStatus = osdManager.CreatePixmap(5, cRect(x, y, width, height));
} else {
pixmap->SetViewPort(cRect(x, y, width, height));
pixmapStatus->SetViewPort(cRect(x, y, width, height));
}
pixmapStatus->Fill(clrTransparent); pixmapStatus->Fill(clrTransparent);
} }
@@ -1811,17 +1845,17 @@ cRecMenuItemEvent::cRecMenuItemEvent(const cEvent *event,
cRecMenuItemEvent::~cRecMenuItemEvent(void) { cRecMenuItemEvent::~cRecMenuItemEvent(void) {
if (pixmapIcons) if (pixmapIcons)
osdManager.releasePixmap(pixmapIcons); osdManager.DestroyPixmap(pixmapIcons);
if (pixmapText) if (pixmapText)
osdManager.releasePixmap(pixmapText); osdManager.DestroyPixmap(pixmapText);
} }
void cRecMenuItemEvent::SetPixmaps(void) { void cRecMenuItemEvent::SetPixmaps(void) {
if (!pixmap) { if (!pixmap) {
pixmap = osdManager.requestPixmap(4, cRect(x, y, width, height)); pixmap = osdManager.CreatePixmap(4, cRect(x, y, width, height));
pixmapText = osdManager.requestPixmap(5, cRect(x, y, width - height / 2 - 10, height)); pixmapText = osdManager.CreatePixmap(5, cRect(x, y, width - height / 2 - 10, height));
pixmapText->Fill(clrTransparent); pixmapText->Fill(clrTransparent);
pixmapIcons = osdManager.requestPixmap(6, cRect(x, y, width, height)); pixmapIcons = osdManager.CreatePixmap(6, cRect(x, y, width, height));
pixmapIcons->Fill(clrTransparent); pixmapIcons->Fill(clrTransparent);
} else { } else {
pixmap->SetViewPort(cRect(x, y, width, height)); pixmap->SetViewPort(cRect(x, y, width, height));
@@ -1844,12 +1878,11 @@ void cRecMenuItemEvent::Draw(void) {
if (channel) if (channel)
channelName = channel->Name(); channelName = channel->Name();
int logoWidth = height * config.logoWidthRatio / config.logoHeightRatio; int logoWidth = height * config.logoWidthRatio / config.logoHeightRatio;
cImageLoader imgLoader;
if (!config.hideChannelLogos) { if (!config.hideChannelLogos) {
if (imgLoader.LoadLogo(channel, logoWidth, height)) { cImageLoader imgLoader;
if (imgLoader.LoadLogo(channel, logoWidth * 0.8, height * 0.8)) {
cImage logo = imgLoader.GetImage(); cImage logo = imgLoader.GetImage();
pixmapText->DrawImage(cPoint(logoX, (height - logo.Height()) / 2), logo); pixmapText->DrawImage(cPoint(logoX + (logoWidth - logo.Width()) / 2, (height - logo.Height()) / 2), logo);
// logoX += logoWidth + 5;
} }
logoX += logoWidth + 5; logoX += logoWidth + 5;
} }
@@ -1964,13 +1997,13 @@ cRecMenuItemChannelChooser::cRecMenuItemChannelChooser(cString text,
cRecMenuItemChannelChooser::~cRecMenuItemChannelChooser(void) { cRecMenuItemChannelChooser::~cRecMenuItemChannelChooser(void) {
if (pixmapChannel) if (pixmapChannel)
osdManager.releasePixmap(pixmapChannel); osdManager.DestroyPixmap(pixmapChannel);
} }
void cRecMenuItemChannelChooser::SetPixmaps(void) { void cRecMenuItemChannelChooser::SetPixmaps(void) {
if (!pixmap) { if (!pixmap) {
pixmap = osdManager.requestPixmap(4, cRect(x, y, width, height)); pixmap = osdManager.CreatePixmap(4, cRect(x, y, width, height));
pixmapChannel = osdManager.requestPixmap(5, cRect(x, y, width, height)); pixmapChannel = osdManager.CreatePixmap(5, cRect(x, y, width, height));
} else { } else {
pixmap->SetViewPort(cRect(x, y, width, height)); pixmap->SetViewPort(cRect(x, y, width, height));
pixmapChannel->SetViewPort(cRect(x, y, width, height)); pixmapChannel->SetViewPort(cRect(x, y, width, height));
@@ -2005,7 +2038,7 @@ void cRecMenuItemChannelChooser::DrawValue(void) {
cImageLoader imgLoader; cImageLoader imgLoader;
if (imgLoader.LoadLogo(channel, logoWidth, height - 10)) { if (imgLoader.LoadLogo(channel, logoWidth, height - 10)) {
cImage logo = imgLoader.GetImage(); cImage logo = imgLoader.GetImage();
pixmapChannel->DrawImage(cPoint(logoX, 5), logo); pixmapChannel->DrawImage(cPoint(logoX, (height - logo.Height()) / 2), logo);
} }
} else { } else {
cString textVal = tr("all Channels"); cString textVal = tr("all Channels");
@@ -2117,16 +2150,16 @@ cRecMenuItemDayChooser::cRecMenuItemDayChooser(cString text,
cRecMenuItemDayChooser::~cRecMenuItemDayChooser(void) { cRecMenuItemDayChooser::~cRecMenuItemDayChooser(void) {
if (pixmapWeekdays) if (pixmapWeekdays)
osdManager.releasePixmap(pixmapWeekdays); osdManager.DestroyPixmap(pixmapWeekdays);
if (pixmapWeekdaysSelect) if (pixmapWeekdaysSelect)
osdManager.releasePixmap(pixmapWeekdaysSelect); osdManager.DestroyPixmap(pixmapWeekdaysSelect);
} }
void cRecMenuItemDayChooser::SetPixmaps(void) { void cRecMenuItemDayChooser::SetPixmaps(void) {
if (!pixmap) { if (!pixmap) {
pixmap = osdManager.requestPixmap(4, cRect(x, y, width, height)); pixmap = osdManager.CreatePixmap(4, cRect(x, y, width, height));
pixmapWeekdays = osdManager.requestPixmap(5, cRect(x, y, width, height)); pixmapWeekdays = osdManager.CreatePixmap(5, cRect(x, y, width, height));
pixmapWeekdaysSelect = osdManager.requestPixmap(6, cRect(x, y, width, height)); pixmapWeekdaysSelect = osdManager.CreatePixmap(6, cRect(x, y, width, height));
} else { } else {
pixmap->SetViewPort(cRect(x, y, width, height)); pixmap->SetViewPort(cRect(x, y, width, height));
pixmapWeekdays->SetViewPort(cRect(x, y, width, height)); pixmapWeekdays->SetViewPort(cRect(x, y, width, height));
@@ -2155,7 +2188,7 @@ void cRecMenuItemDayChooser::SetSizes(void) {
if (charWidth > maxWidth) if (charWidth > maxWidth)
maxWidth = charWidth; maxWidth = charWidth;
} }
daysSize = min(maxWidth + 15, height - 4); daysSize = std::min(maxWidth + 15, height - 4);
daysX = width - 10 - 7 * daysSize; daysX = width - 10 - 7 * daysSize;
daysY = (height - daysSize) / 2; daysY = (height - daysSize) / 2;
} }
@@ -2252,13 +2285,13 @@ cRecMenuItemRecording::cRecMenuItemRecording(const cRecording *recording, bool a
cRecMenuItemRecording::~cRecMenuItemRecording(void) { cRecMenuItemRecording::~cRecMenuItemRecording(void) {
if (pixmapText) if (pixmapText)
osdManager.releasePixmap(pixmapText); osdManager.DestroyPixmap(pixmapText);
} }
void cRecMenuItemRecording::SetPixmaps(void) { void cRecMenuItemRecording::SetPixmaps(void) {
if (!pixmap) { if (!pixmap) {
pixmap = osdManager.requestPixmap(4, cRect(x, y, width, height)); pixmap = osdManager.CreatePixmap(4, cRect(x, y, width, height));
pixmapText = osdManager.requestPixmap(5, cRect(x, y, width, height)); pixmapText = osdManager.CreatePixmap(5, cRect(x, y, width, height));
pixmapText->Fill(clrTransparent); pixmapText->Fill(clrTransparent);
} else { } else {
pixmap->SetViewPort(cRect(x, y, width, height)); pixmap->SetViewPort(cRect(x, y, width, height));
@@ -2270,21 +2303,38 @@ void cRecMenuItemRecording::Draw(void) {
if (!recording) if (!recording)
return; return;
const cRecordingInfo *recInfo = recording->Info(); const cRecordingInfo *recInfo = recording->Info();
#if VDRVERSNUM >= 20301 const cChannel *channel = NULL;
LOCK_CHANNELS_READ;
const cChannel *channel = Channels->GetByChannelID(recInfo->ChannelID());
#else
const cChannel *channel = Channels.GetByChannelID(recInfo->ChannelID());
#endif
cString channelName = tr("unknown channel"); cString channelName = tr("unknown channel");
if (channel) if (recInfo) {
channelName = channel->Name(); if (recInfo->ChannelName() && (strlen(recInfo->ChannelName()) > 0)) {
channelName = recInfo->ChannelName();
} else {
#if VDRVERSNUM >= 20301
{
LOCK_CHANNELS_READ;
channel = Channels->GetByChannelID(recInfo->ChannelID());
}
#else
channel = Channels.GetByChannelID(recInfo->ChannelID());
#endif
if (channel)
channelName = channel->Name();
}
}
cString name = recording->Name(); cString name = recording->Name();
cString dateTime = cString::sprintf("%s, %s", *DateString(recording->Start()), *TimeString(recording->Start())); cString dateTime = cString::sprintf("%s, %s", *DateString(recording->Start()), *TimeString(recording->Start()));
int recDuration = recording->LengthInSeconds() / 60; int recDuration = recording->LengthInSeconds() / 60;
cString recDetails = cString::sprintf("%s: %d %s, %s %s %s \"%s\"", tr("Duration"), recDuration, tr("min"), tr("recorded at"), *dateTime, tr("from"), *channelName); cString recDetails = "";
#if (APIVERSNUM >= 20505)
cString error = "";
if (recInfo->Errors() >= 0) {
error = cString::sprintf("%s %d %s ", tr("with"), recInfo->Errors(), (recInfo->Errors() >= 2) ? tr("errors") : tr("error"));
recDetails = cString::sprintf("%s: %d %s, %s %s %s \"%s\" %s", tr("Duration"), recDuration, tr("min"), tr("recorded at"), *dateTime, tr("from"), *channelName, *error);
} else
#endif
recDetails = cString::sprintf("%s: %d %s, %s %s %s \"%s\"", tr("Duration"), recDuration, tr("min"), tr("recorded at"), *dateTime, tr("from"), *channelName);
recDetails = CutText(*recDetails, width - 40, fontSmall).c_str(); recDetails = CutText(*recDetails, width - 40, fontSmall).c_str();
int text1Y = (height/2 - font->Height()) / 2 + 5; int text1Y = (height/2 - font->Height()) / 2 + 5;
int text2Y = height/2 + (height/2 - fontSmall->Height())/2 - 5; int text2Y = height/2 + (height/2 - fontSmall->Height())/2 - 5;
@@ -2304,13 +2354,14 @@ void cRecMenuItemRecording::Show(void) {
} }
// --- cRecMenuItemTimelineHeader ------------------------------------------------------- // --- cRecMenuItemTimelineHeader -------------------------------------------------------
cRecMenuItemTimelineHeader::cRecMenuItemTimelineHeader(time_t day, std::vector<cTVGuideTimerConflict*> conflictsToday) { cRecMenuItemTimelineHeader::cRecMenuItemTimelineHeader(time_t day, int numTimersToday, std::vector<cTVGuideTimerConflict*> conflictsToday) {
conflicts = conflictsToday; conflicts = conflictsToday;
pixmapTimeline = NULL; pixmapTimeline = NULL;
pixmapTimerInfo = NULL; pixmapTimerInfo = NULL;
pixmapTimerConflicts = NULL; pixmapTimerConflicts = NULL;
timer = NULL; timer = NULL;
this->day = day; this->day = day;
this->numTimersToday = numTimersToday;
selectable = false; selectable = false;
active = false; active = false;
height = 5 * font->Height(); height = 5 * font->Height();
@@ -2319,20 +2370,20 @@ cRecMenuItemTimelineHeader::cRecMenuItemTimelineHeader(time_t day, std::vector<c
cRecMenuItemTimelineHeader::~cRecMenuItemTimelineHeader(void) { cRecMenuItemTimelineHeader::~cRecMenuItemTimelineHeader(void) {
if (pixmapTimeline) if (pixmapTimeline)
osdManager.releasePixmap(pixmapTimeline); osdManager.DestroyPixmap(pixmapTimeline);
if (pixmapTimerInfo) if (pixmapTimerInfo)
osdManager.releasePixmap(pixmapTimerInfo); osdManager.DestroyPixmap(pixmapTimerInfo);
if (pixmapTimerConflicts) if (pixmapTimerConflicts)
osdManager.releasePixmap(pixmapTimerConflicts); osdManager.DestroyPixmap(pixmapTimerConflicts);
} }
void cRecMenuItemTimelineHeader::SetPixmaps(void) { void cRecMenuItemTimelineHeader::SetPixmaps(void) {
if (!pixmap) { if (!pixmap) {
pixmap = osdManager.requestPixmap(4, cRect(x, y, width, height)); pixmap = osdManager.CreatePixmap(4, cRect(x, y, width, height));
pixmapTimeline = osdManager.requestPixmap(5, cRect(x, y, width, height)); pixmapTimeline = osdManager.CreatePixmap(5, cRect(x, y, width, height));
pixmapTimerInfo = osdManager.requestPixmap(6, cRect(x, y + 3 * font->Height() / 2, width, 2 * font->Height())); pixmapTimerInfo = osdManager.CreatePixmap(6, cRect(x, y + 3 * font->Height() / 2, width, 2 * font->Height()));
if (conflicts.size() > 0) { if (conflicts.size() > 0) {
pixmapTimerConflicts = osdManager.requestPixmap(6, cRect(x, y, width, height)); pixmapTimerConflicts = osdManager.CreatePixmap(6, cRect(x, y, width, height));
} }
} else { } else {
pixmap->SetViewPort(cRect(x, y, width, height)); pixmap->SetViewPort(cRect(x, y, width, height));
@@ -2359,7 +2410,7 @@ void cRecMenuItemTimelineHeader::Draw(void) {
} }
DrawTimerConflicts(); DrawTimerConflicts();
pixmap->Fill(clrTransparent); pixmap->Fill(clrTransparent);
cString headerText = tr("Timers for"); cString headerText = cString::sprintf("%i %s", numTimersToday, tr("Timers for"));
cString dateText = DateString(day); cString dateText = DateString(day);
cString header = cString::sprintf("%s: %s", *headerText, *dateText); cString header = cString::sprintf("%s: %s", *headerText, *dateText);
int xText = (width - fontLarge->Width(*header)) / 2; int xText = (width - fontLarge->Width(*header)) / 2;
@@ -2384,7 +2435,7 @@ void cRecMenuItemTimelineHeader::DrawCurrentTimer(void) {
if (!config.hideChannelLogos) { if (!config.hideChannelLogos) {
if (imgLoader.LoadLogo(channel, logoWidth, infoHeight)) { if (imgLoader.LoadLogo(channel, logoWidth, infoHeight)) {
cImage logo = imgLoader.GetImage(); cImage logo = imgLoader.GetImage();
pixmapTimerInfo->DrawImage(cPoint(0, 0), logo); pixmapTimerInfo->DrawImage(cPoint(0, (infoHeight - logo.Height()) / 2), logo);
x += logoWidth + 10; x += logoWidth + 10;
logoDrawn = true; logoDrawn = true;
} }
@@ -2421,7 +2472,7 @@ void cRecMenuItemTimelineHeader::DrawTimeline(void) {
pixmapTimeline->Fill(clrTransparent); pixmapTimeline->Fill(clrTransparent);
width5Mins = (float)width * 5.0 / 24.0 / 60.0; width5Mins = (float)width * 5.0 / 24.0 / 60.0;
int widthHour = 12 * width5Mins; int widthHour = 12 * width5Mins;
x0 = (width - 24*widthHour)/2; x0 = (width - (24 * widthHour)) / 2;
int barHeight = fontSmall->Height(); int barHeight = fontSmall->Height();
int y = height - barHeight; int y = height - barHeight;
tColor col1 = theme.Color(clrTimeline1); tColor col1 = theme.Color(clrTimeline1);
@@ -2502,21 +2553,23 @@ cRecMenuItemTimelineTimer::cRecMenuItemTimelineTimer(const cTimer *timer, time_t
selectable = true; selectable = true;
this->active = active; this->active = active;
height = geoManager.osdHeight / 16; height = geoManager.osdHeight / 16;
if (active)
SetActive();
} }
cRecMenuItemTimelineTimer::~cRecMenuItemTimelineTimer(void) { cRecMenuItemTimelineTimer::~cRecMenuItemTimelineTimer(void) {
if (pixmapBack) if (pixmapBack)
osdManager.releasePixmap(pixmapBack); osdManager.DestroyPixmap(pixmapBack);
if (pixmapTimerConflicts) if (pixmapTimerConflicts)
osdManager.releasePixmap(pixmapTimerConflicts); osdManager.DestroyPixmap(pixmapTimerConflicts);
} }
void cRecMenuItemTimelineTimer::SetPixmaps(void) { void cRecMenuItemTimelineTimer::SetPixmaps(void) {
if (!pixmap) { if (!pixmap) {
pixmapBack = osdManager.requestPixmap(4, cRect(x, y, width, height)); pixmapBack = osdManager.CreatePixmap(4, cRect(x, y, width, height));
pixmap = osdManager.requestPixmap(5, cRect(x, y, width, height)); pixmap = osdManager.CreatePixmap(5, cRect(x, y, width, height));
if (conflicts.size() > 0) { if (conflicts.size() > 0) {
pixmapTimerConflicts = osdManager.requestPixmap(6, cRect(x, y, width, height)); pixmapTimerConflicts = osdManager.CreatePixmap(6, cRect(x, y, width, height));
} }
} else { } else {
pixmapBack->SetViewPort(cRect(x, y, width, height)); pixmapBack->SetViewPort(cRect(x, y, width, height));
@@ -2526,7 +2579,8 @@ void cRecMenuItemTimelineTimer::SetPixmaps(void) {
} }
width5Mins = (float)width * 5.0 / 24.0 / 60.0; width5Mins = (float)width * 5.0 / 24.0 / 60.0;
x0 = (width - 24*12*width5Mins)/2; int widthHour = 12 * width5Mins;
x0 = (width - (24 * widthHour)) / 2;
} }
void cRecMenuItemTimelineTimer::Draw(void) { void cRecMenuItemTimelineTimer::Draw(void) {
@@ -2613,7 +2667,7 @@ void cRecMenuItemTimelineTimer::DrawNoTimerInfo(void) {
pixmap->DrawText(cPoint(x, y), *noTimersText, colorText, clrTransparent, font); pixmap->DrawText(cPoint(x, y), *noTimersText, colorText, clrTransparent, font);
} }
void cRecMenuItemTimelineTimer::setActive(void) { void cRecMenuItemTimelineTimer::SetActive(void) {
active = true; active = true;
header->SetCurrentTimer(timer); header->SetCurrentTimer(timer);
header->RefreshTimerDisplay(); header->RefreshTimerDisplay();
@@ -2637,7 +2691,7 @@ void cRecMenuItemTimelineTimer::Show(void) {
if (pixmapTimerConflicts) pixmapTimerConflicts->SetLayer(6); if (pixmapTimerConflicts) pixmapTimerConflicts->SetLayer(6);
} }
const cTimer *cRecMenuItemTimelineTimer::GetTimerValue(void) { const cTimer *cRecMenuItemTimelineTimer::GetTimer(void) {
return timer; return timer;
} }
@@ -2672,16 +2726,16 @@ cRecMenuItemSearchTimer::cRecMenuItemSearchTimer(cTVGuideSearchTimer timer,
cRecMenuItemSearchTimer::~cRecMenuItemSearchTimer(void) { cRecMenuItemSearchTimer::~cRecMenuItemSearchTimer(void) {
if (pixmapText) if (pixmapText)
osdManager.releasePixmap(pixmapText); osdManager.DestroyPixmap(pixmapText);
if (pixmapIcons) if (pixmapIcons)
osdManager.releasePixmap(pixmapIcons); osdManager.DestroyPixmap(pixmapIcons);
} }
void cRecMenuItemSearchTimer::SetPixmaps(void) { void cRecMenuItemSearchTimer::SetPixmaps(void) {
if (!pixmap) { if (!pixmap) {
pixmap = osdManager.requestPixmap(4, cRect(x, y, width, height)); pixmap = osdManager.CreatePixmap(4, cRect(x, y, width, height));
pixmapText = osdManager.requestPixmap(5, cRect(x, y, width, height)); pixmapText = osdManager.CreatePixmap(5, cRect(x, y, width, height));
pixmapIcons = osdManager.requestPixmap(6, cRect(x, y, width, height)); pixmapIcons = osdManager.CreatePixmap(6, cRect(x, y, width, height));
} else { } else {
pixmap->SetViewPort(cRect(x, y, width, height)); pixmap->SetViewPort(cRect(x, y, width, height));
pixmapText->SetViewPort(cRect(x, y, width, height)); pixmapText->SetViewPort(cRect(x, y, width, height));
@@ -2799,16 +2853,16 @@ cRecMenuItemFavorite::cRecMenuItemFavorite(cTVGuideSearchTimer favorite,
cRecMenuItemFavorite::~cRecMenuItemFavorite(void) { cRecMenuItemFavorite::~cRecMenuItemFavorite(void) {
if (pixmapText) if (pixmapText)
osdManager.releasePixmap(pixmapText); osdManager.DestroyPixmap(pixmapText);
if (pixmapIcons) if (pixmapIcons)
osdManager.releasePixmap(pixmapIcons); osdManager.DestroyPixmap(pixmapIcons);
} }
void cRecMenuItemFavorite::SetPixmaps(void) { void cRecMenuItemFavorite::SetPixmaps(void) {
if (!pixmap) { if (!pixmap) {
pixmap = osdManager.requestPixmap(4, cRect(x, y, width, height)); pixmap = osdManager.CreatePixmap(4, cRect(x, y, width, height));
pixmapText = osdManager.requestPixmap(5, cRect(x, y, width, height)); pixmapText = osdManager.CreatePixmap(5, cRect(x, y, width, height));
pixmapIcons = osdManager.requestPixmap(6, cRect(x, y, width, height)); pixmapIcons = osdManager.CreatePixmap(6, cRect(x, y, width, height));
} else { } else {
pixmap->SetViewPort(cRect(x, y, width, height)); pixmap->SetViewPort(cRect(x, y, width, height));
pixmapText->SetViewPort(cRect(x, y, width, height)); pixmapText->SetViewPort(cRect(x, y, width, height));
@@ -2874,16 +2928,16 @@ cRecMenuItemFavoriteStatic::cRecMenuItemFavoriteStatic(std::string text, eRecMen
cRecMenuItemFavoriteStatic::~cRecMenuItemFavoriteStatic(void) { cRecMenuItemFavoriteStatic::~cRecMenuItemFavoriteStatic(void) {
if (pixmapText) if (pixmapText)
osdManager.releasePixmap(pixmapText); osdManager.DestroyPixmap(pixmapText);
if (pixmapIcons) if (pixmapIcons)
osdManager.releasePixmap(pixmapIcons); osdManager.DestroyPixmap(pixmapIcons);
} }
void cRecMenuItemFavoriteStatic::SetPixmaps(void) { void cRecMenuItemFavoriteStatic::SetPixmaps(void) {
if (!pixmap) { if (!pixmap) {
pixmap = osdManager.requestPixmap(4, cRect(x, y, width, height)); pixmap = osdManager.CreatePixmap(4, cRect(x, y, width, height));
pixmapText = osdManager.requestPixmap(5, cRect(x, y, width, height)); pixmapText = osdManager.CreatePixmap(5, cRect(x, y, width, height));
pixmapIcons = osdManager.requestPixmap(6, cRect(x, y, width, height)); pixmapIcons = osdManager.CreatePixmap(6, cRect(x, y, width, height));
} else { } else {
pixmap->SetViewPort(cRect(x, y, width, height)); pixmap->SetViewPort(cRect(x, y, width, height));
pixmapText->SetViewPort(cRect(x, y, width, height)); pixmapText->SetViewPort(cRect(x, y, width, height));

View File

@@ -25,6 +25,7 @@ enum eRecMenuState {
rmsSearchRerunsTimerConflictMenu, rmsSearchRerunsTimerConflictMenu,
rmsSaveTimerConflictMenu, rmsSaveTimerConflictMenu,
rmsTimerConflictShowInfo, rmsTimerConflictShowInfo,
rmsOnOffTimer,
rmsDeleteTimer, rmsDeleteTimer,
rmsDeleteTimerConfirmation, rmsDeleteTimerConfirmation,
rmsEditTimer, rmsEditTimer,
@@ -109,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);};
@@ -121,8 +122,7 @@ 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 *GetEventValue(void) { return NULL; }; virtual const cEvent *GetEvent(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,12 +174,18 @@ 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);
@@ -480,7 +486,7 @@ public:
void SetPixmaps(void); void SetPixmaps(void);
void Hide(void); void Hide(void);
void Show(void); void Show(void);
const cEvent *GetEventValue(void) { return event; }; const cEvent *GetEvent(void) { return event; };
eRecMenuState ProcessKey(eKeys Key); eRecMenuState ProcessKey(eKeys Key);
void Draw(void); void Draw(void);
}; };
@@ -573,19 +579,21 @@ private:
cPixmap *pixmapTimeline; cPixmap *pixmapTimeline;
cPixmap *pixmapTimerInfo; cPixmap *pixmapTimerInfo;
cPixmap *pixmapTimerConflicts; cPixmap *pixmapTimerConflicts;
int width5Mins; float 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, std::vector<cTVGuideTimerConflict*> conflictsToday); cRecMenuItemTimelineHeader(time_t day, int numTimersToday, 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);
@@ -601,7 +609,7 @@ private:
cPixmap *pixmapTimerConflicts; cPixmap *pixmapTimerConflicts;
cRecMenuItemTimelineHeader *header; cRecMenuItemTimelineHeader *header;
int x0; int x0;
int width5Mins; float width5Mins;
time_t start; time_t start;
time_t stop; time_t stop;
void DrawBackground(void); void DrawBackground(void);
@@ -612,13 +620,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 *GetTimerValue(void); const cTimer *GetTimer(void);
eRecMenuState ProcessKey(eKeys Key); eRecMenuState ProcessKey(eKeys Key);
}; };

1193
recmenus.c

File diff suppressed because it is too large Load Diff

View File

@@ -47,7 +47,7 @@ public:
// --- cRecMenuConfirmTimer --------------------------------------------------------- // --- cRecMenuConfirmTimer ---------------------------------------------------------
class cRecMenuConfirmTimer: public cRecMenu { class cRecMenuConfirmTimer: public cRecMenu {
public: public:
cRecMenuConfirmTimer(const cEvent *event); cRecMenuConfirmTimer(const cEvent *event, bool timerChanged = false);
virtual ~cRecMenuConfirmTimer(void) {}; virtual ~cRecMenuConfirmTimer(void) {};
}; };
@@ -77,11 +77,12 @@ public:
class cRecMenuTimerConflict: public cRecMenu { class cRecMenuTimerConflict: public cRecMenu {
private: private:
cTVGuideTimerConflict *conflict; cTVGuideTimerConflict *conflict;
int totalNumMenuItems;
public: public:
cRecMenuTimerConflict(cTVGuideTimerConflict *conflict); cRecMenuTimerConflict(cTVGuideTimerConflict *conflict, eRecMenuState nextAction = rmsClose);
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);
}; };
@@ -136,7 +137,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);
}; };
/****************************************************************************************** /******************************************************************************************
@@ -204,13 +205,12 @@ 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 ---------------------------------------------------------
@@ -218,6 +218,7 @@ class cRecMenuSearchTimerEdit: public cRecMenu {
private: private:
cTVGuideSearchTimer sT; cTVGuideSearchTimer sT;
std::vector<std::string> searchModes; std::vector<std::string> searchModes;
std::vector<std::string> subTitleModes;
std::vector<std::string> useChannelModes; std::vector<std::string> useChannelModes;
std::vector<std::string> channelGroups; std::vector<std::string> channelGroups;
std::vector<std::string> compareDateModes; std::vector<std::string> compareDateModes;
@@ -257,7 +258,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);
}; };

View File

@@ -37,7 +37,7 @@ void cRecMenuView::Start(const cEvent *event) {
this->event = event; this->event = event;
activeMenu = new cRecMenuMain(recManager->EpgSearchAvailable(), recManager->CheckEventForTimer(event), SwitchTimers.EventInSwitchList(event)); activeMenu = new cRecMenuMain(recManager->EpgSearchAvailable(), recManager->CheckEventForTimer(event), SwitchTimers.EventInSwitchList(event));
activeMenu->Display(); activeMenu->Display();
osdManager.flush(); osdManager.Flush();
} }
void cRecMenuView::StartFavorites(void) { void cRecMenuView::StartFavorites(void) {
@@ -49,7 +49,7 @@ void cRecMenuView::StartFavorites(void) {
recManager->GetFavorites(&favorites); recManager->GetFavorites(&favorites);
activeMenu = new cRecMenuFavorites(favorites); activeMenu = new cRecMenuFavorites(favorites);
activeMenu->Display(); activeMenu->Display();
osdManager.flush(); osdManager.Flush();
} }
@@ -70,7 +70,7 @@ void cRecMenuView::Close(void) {
void cRecMenuView::SetBackground(void) { void cRecMenuView::SetBackground(void) {
int backgroundWidth = geoManager.osdWidth; int backgroundWidth = geoManager.osdWidth;
int backgroundHeight = geoManager.osdHeight; int backgroundHeight = geoManager.osdHeight;
pixmapBackground = osdManager.requestPixmap(3, cRect(0, 0, backgroundWidth, backgroundHeight)); pixmapBackground = osdManager.CreatePixmap(3, cRect(0, 0, backgroundWidth, backgroundHeight));
pixmapBackground->Fill(theme.Color(clrRecMenuBackground)); pixmapBackground->Fill(theme.Color(clrRecMenuBackground));
if (config.scaleVideo) { if (config.scaleVideo) {
int tvHeight = geoManager.statusHeaderHeight; int tvHeight = geoManager.statusHeaderHeight;
@@ -81,7 +81,7 @@ void cRecMenuView::SetBackground(void) {
} }
void cRecMenuView::DeleteBackground(void) { void cRecMenuView::DeleteBackground(void) {
osdManager.releasePixmap(pixmapBackground); osdManager.DestroyPixmap(pixmapBackground);
} }
void cRecMenuView::DisplaySearchTimerList(void) { void cRecMenuView::DisplaySearchTimerList(void) {
@@ -93,16 +93,18 @@ void cRecMenuView::DisplaySearchTimerList(void) {
} }
bool cRecMenuView::DisplayTimerConflict(const cTimer *timer) { bool cRecMenuView::DisplayTimerConflict(const cTimer *timer) {
int timerID = 0;
#if VDRVERSNUM >= 20301 #if VDRVERSNUM >= 20301
LOCK_TIMERS_READ; LOCK_TIMERS_READ;
for (const cTimer *t = Timers->First(); t; t = Timers->Next(t)) { for (const cTimer *t = Timers->First(); t; t = Timers->Next(t)) {
if (t == timer)
return DisplayTimerConflict(timer->Id() - 1);
#else #else
int timerID = 0;
for (const cTimer *t = Timers.First(); t; t = Timers.Next(t)) { for (const cTimer *t = Timers.First(); t; t = Timers.Next(t)) {
#endif
if (t == timer) if (t == timer)
return DisplayTimerConflict(timerID); return DisplayTimerConflict(timerID);
timerID++; timerID++;
#endif
} }
return false; return false;
} }
@@ -119,7 +121,8 @@ bool cRecMenuView::DisplayTimerConflict(int timerID) {
cTVGuideTimerConflict *conflict = timerConflicts->GetCurrentConflict(); cTVGuideTimerConflict *conflict = timerConflicts->GetCurrentConflict();
if (!conflict) if (!conflict)
return false; return false;
activeMenu = new cRecMenuTimerConflict(conflict); delete activeMenu;
activeMenu = new cRecMenuTimerConflict(conflict, rmsIgnoreTimerConflict);
activeMenu->Display(); activeMenu->Display();
return true; return true;
} }
@@ -161,11 +164,16 @@ eOSState cRecMenuView::StateMachine(eRecMenuState nextState) {
if (cRecMenuAskFolder *menu = dynamic_cast<cRecMenuAskFolder*>(activeMenu)) { if (cRecMenuAskFolder *menu = dynamic_cast<cRecMenuAskFolder*>(activeMenu)) {
recFolder = menu->GetFolder(); recFolder = menu->GetFolder();
} }
delete activeMenu;
cTimer *timer = recManager->createTimer(event, recFolder); cTimer *timer = recManager->createTimer(event, recFolder);
if (!DisplayTimerConflict(timer)) { if (!DisplayTimerConflict(timer)) {
activeMenu = new cRecMenuConfirmTimer(event); if (config.timerMessage) {
activeMenu->Display(); delete activeMenu;
activeMenu = new cRecMenuConfirmTimer(event);
activeMenu->Display();
} else {
Close();
state = osEnd;
}
} }
break; } break; }
case rmsInstantRecordFolder: case rmsInstantRecordFolder:
@@ -175,24 +183,49 @@ eOSState cRecMenuView::StateMachine(eRecMenuState nextState) {
activeMenu = new cRecMenuAskFolder(event, rmsInstantRecord); activeMenu = new cRecMenuAskFolder(event, rmsInstantRecord);
activeMenu->Display(); activeMenu->Display();
break; break;
case rmsOnOffTimer: {
//caller: main menu
//De/Activate timer for active event
recManager->OnOffTimer(event);
if (config.timerMessage) {
delete activeMenu;
activeMenu = new cRecMenuConfirmTimer(event, true);
activeMenu->Display();
} else {
Close();
state = osEnd;
}
break; }
case rmsDeleteTimer: { case rmsDeleteTimer: {
//caller: main menu //caller: main menu
//delete timer for active event //delete timer for active event
delete activeMenu;
if (recManager->IsRecorded(event)) { if (recManager->IsRecorded(event)) {
delete activeMenu;
activeMenu = new cRecMenuAskDeleteTimer(event); activeMenu = new cRecMenuAskDeleteTimer(event);
activeMenu->Display();
} else { } else {
recManager->DeleteTimer(event); recManager->DeleteTimer(event);
activeMenu = new cRecMenuConfirmDeleteTimer(event); if (config.timerMessage) {
delete activeMenu;
activeMenu = new cRecMenuConfirmDeleteTimer(event);
activeMenu->Display();
} else {
Close();
state = osEnd;
}
} }
activeMenu->Display();
break; } break; }
case rmsDeleteTimerConfirmation: { case rmsDeleteTimerConfirmation: {
//delete running timer for active event //delete running timer for active event
recManager->DeleteTimer(event); recManager->DeleteTimer(event);
delete activeMenu; if (config.timerMessage) {
activeMenu = new cRecMenuConfirmDeleteTimer(event); delete activeMenu;
activeMenu->Display(); activeMenu = new cRecMenuConfirmDeleteTimer(event);
activeMenu->Display();
} else {
Close();
state = osEnd;
}
break; } break; }
case rmsEditTimer: { case rmsEditTimer: {
//edit timer for active event //edit timer for active event
@@ -206,7 +239,7 @@ eOSState cRecMenuView::StateMachine(eRecMenuState nextState) {
case rmsSaveTimer: { case rmsSaveTimer: {
//caller: cRecMenuEditTimer //caller: cRecMenuEditTimer
//save timer for active event //save timer for active event
cTimer timerModified; cTimer *timerModified;
const cTimer *originalTimer; const cTimer *originalTimer;
if (cRecMenuEditTimer *menu = dynamic_cast<cRecMenuEditTimer*>(activeMenu)) { if (cRecMenuEditTimer *menu = dynamic_cast<cRecMenuEditTimer*>(activeMenu)) {
timerModified = menu->GetTimer(); timerModified = menu->GetTimer();
@@ -219,9 +252,14 @@ eOSState cRecMenuView::StateMachine(eRecMenuState nextState) {
case rmsIgnoreTimerConflict: case rmsIgnoreTimerConflict:
//caller: cRecMenuTimerConflict //caller: cRecMenuTimerConflict
//Confirming created Timer //Confirming created Timer
delete activeMenu; if (config.timerMessage) {
activeMenu = new cRecMenuConfirmTimer(event); delete activeMenu;
activeMenu->Display(); activeMenu = new cRecMenuConfirmTimer(event);
activeMenu->Display();
} else {
Close();
state = osEnd;
}
break; break;
case rmsTimerConflictShowInfo: { case rmsTimerConflictShowInfo: {
//caller: cRecMenuTimerConflict //caller: cRecMenuTimerConflict
@@ -229,12 +267,18 @@ eOSState cRecMenuView::StateMachine(eRecMenuState nextState) {
if (cRecMenuTimerConflict *menu = dynamic_cast<cRecMenuTimerConflict*>(activeMenu)) { if (cRecMenuTimerConflict *menu = dynamic_cast<cRecMenuTimerConflict*>(activeMenu)) {
timerIndex = menu->GetTimerConflictIndex(); timerIndex = menu->GetTimerConflictIndex();
} else break; } else break;
int timerID = timerConflicts->GetCurrentConflictTimerID(timerIndex); const cTimers* timers;
#if VDRVERSNUM >= 20301 #if VDRVERSNUM >= 20301
int timerID = timerConflicts->GetCurrentConflictTimerID(timerIndex) + 1;
{
LOCK_TIMERS_READ; LOCK_TIMERS_READ;
const cTimer *t = Timers->Get(timerID); timers = Timers;
}
const cTimer *t = timers->GetById(timerID);
#else #else
cTimer *t = Timers.Get(timerID); int timerID = timerConflicts->GetCurrentConflictTimerID(timerIndex);
timers = &Timers;
const cTimer *t = timers->Get(timerID);
#endif #endif
if (t) { if (t) {
const cEvent *ev = t->Event(); const cEvent *ev = t->Event();
@@ -250,12 +294,30 @@ eOSState cRecMenuView::StateMachine(eRecMenuState nextState) {
if (cRecMenuTimerConflict *menu = dynamic_cast<cRecMenuTimerConflict*>(activeMenu)) { if (cRecMenuTimerConflict *menu = dynamic_cast<cRecMenuTimerConflict*>(activeMenu)) {
timerIndex = menu->GetTimerConflictIndex(); timerIndex = menu->GetTimerConflictIndex();
} else break; } else break;
const cTimers* timers;
const cEvent *event;
#if VDRVERSNUM >= 20301
int timerID = timerConflicts->GetCurrentConflictTimerID(timerIndex) + 1;
{
LOCK_TIMERS_READ;
timers = Timers;
}
event = timers->GetById(timerID)->Event();
#else
int timerID = timerConflicts->GetCurrentConflictTimerID(timerIndex); int timerID = timerConflicts->GetCurrentConflictTimerID(timerIndex);
recManager->DeleteTimer(timerID); timers = &Timers;
delete activeMenu; event = timers->Get(timerID)->Event();
#endif
recManager->DeleteTimer(event);
if (!DisplayTimerConflict(timerID)) { if (!DisplayTimerConflict(timerID)) {
activeMenu = new cRecMenuConfirmTimer(event); if (config.timerMessage) {
activeMenu->Display(); delete activeMenu;
activeMenu = new cRecMenuConfirmDeleteTimer(event);
activeMenu->Display();
} else {
Close();
state = osEnd;
}
} }
break; } break; }
case rmsEditTimerConflictMenu: { case rmsEditTimerConflictMenu: {
@@ -265,12 +327,18 @@ eOSState cRecMenuView::StateMachine(eRecMenuState nextState) {
if (cRecMenuTimerConflict *menu = dynamic_cast<cRecMenuTimerConflict*>(activeMenu)) { if (cRecMenuTimerConflict *menu = dynamic_cast<cRecMenuTimerConflict*>(activeMenu)) {
timerIndex = menu->GetTimerConflictIndex(); timerIndex = menu->GetTimerConflictIndex();
} else break; } else break;
int timerID = timerConflicts->GetCurrentConflictTimerID(timerIndex); const cTimers* timers;
#if VDRVERSNUM >= 20301 #if VDRVERSNUM >= 20301
int timerID = timerConflicts->GetCurrentConflictTimerID(timerIndex) + 1;
{
LOCK_TIMERS_READ; LOCK_TIMERS_READ;
const cTimer *timer = Timers->Get(timerID); timers = Timers;
}
const cTimer *timer = timers->GetById(timerID);
#else #else
const cTimer *timer = Timers.Get(timerID); int timerID = timerConflicts->GetCurrentConflictTimerID(timerIndex);
timers = &Timers;
const cTimer *timer = timers->Get(timerID);
#endif #endif
if (timer) { if (timer) {
delete activeMenu; delete activeMenu;
@@ -281,17 +349,22 @@ eOSState cRecMenuView::StateMachine(eRecMenuState nextState) {
case rmsSaveTimerConflictMenu: { case rmsSaveTimerConflictMenu: {
//caller: cRecMenuEditTimer //caller: cRecMenuEditTimer
//save timer from current timer conflict //save timer from current timer conflict
cTimer timerModified; cTimer *timerModified;
const cTimer *originalTimer; const cTimer *originalTimer;
if (cRecMenuEditTimer *menu = dynamic_cast<cRecMenuEditTimer*>(activeMenu)) { if (cRecMenuEditTimer *menu = dynamic_cast<cRecMenuEditTimer*>(activeMenu)) {
timerModified = menu->GetTimer(); timerModified = menu->GetTimer();
originalTimer = menu->GetOriginalTimer(); originalTimer = menu->GetOriginalTimer();
} else break; } else break;
recManager->SaveTimer(originalTimer, timerModified); recManager->SaveTimer(originalTimer, timerModified);
delete activeMenu;
if (!DisplayTimerConflict(originalTimer)) { if (!DisplayTimerConflict(originalTimer)) {
activeMenu = new cRecMenuConfirmTimer(event); if (config.timerMessage) {
activeMenu->Display(); delete activeMenu;
activeMenu = new cRecMenuConfirmTimer(originalTimer->Event(), true);
activeMenu->Display();
} else {
Close();
state = osEnd;
}
} }
break; } break; }
/*************************************************************************************** /***************************************************************************************
@@ -639,7 +712,7 @@ eOSState cRecMenuView::StateMachine(eRecMenuState nextState) {
} else break; } else break;
timerConflicts->SetCurrentConflict(timerConflict); timerConflicts->SetCurrentConflict(timerConflict);
delete activeMenu; delete activeMenu;
activeMenu = new cRecMenuTimerConflict(timerConflicts->GetCurrentConflict()); activeMenu = new cRecMenuTimerConflict(timerConflicts->GetCurrentConflict(), rmsTimerConflicts);
activeMenu->Display(); activeMenu->Display();
break; } break; }
case rmsSearchRerunsTimerConflictMenu: { case rmsSearchRerunsTimerConflictMenu: {
@@ -651,12 +724,18 @@ eOSState cRecMenuView::StateMachine(eRecMenuState nextState) {
if (cRecMenuTimerConflict *menu = dynamic_cast<cRecMenuTimerConflict*>(activeMenu)) { if (cRecMenuTimerConflict *menu = dynamic_cast<cRecMenuTimerConflict*>(activeMenu)) {
timerConflict = menu->GetTimerConflictIndex(); timerConflict = menu->GetTimerConflictIndex();
} else break; } else break;
int timerID = timerConflicts->GetCurrentConflictTimerID(timerConflict); const cTimers* timers;
#if VDRVERSNUM >= 20301 #if VDRVERSNUM >= 20301
int timerID = timerConflicts->GetCurrentConflictTimerID(timerConflict) + 1;
{
LOCK_TIMERS_READ; LOCK_TIMERS_READ;
const cTimer *timer = Timers->Get(timerID); timers = Timers;
}
const cTimer *timer = timers->GetById(timerID);
#else #else
cTimer *timer = Timers.Get(timerID); int timerID = timerConflicts->GetCurrentConflictTimerID(timerConflict);
timers = &Timers;
const cTimer *timer = timers->Get(timerID);
#endif #endif
if (timer) { if (timer) {
const cEvent *event = timer->Event(); const cEvent *event = timer->Event();
@@ -698,12 +777,16 @@ eOSState cRecMenuView::StateMachine(eRecMenuState nextState) {
originalConflictIndex = menu->GetTimerConflictIndex(); originalConflictIndex = menu->GetTimerConflictIndex();
} else break; } else break;
int originalTimerID = timerConflicts->GetCurrentConflictTimerID(originalConflictIndex); int originalTimerID = timerConflicts->GetCurrentConflictTimerID(originalConflictIndex);
const cTimers* timers;
#if VDRVERSNUM >= 20301 #if VDRVERSNUM >= 20301
{
LOCK_TIMERS_READ; LOCK_TIMERS_READ;
const cTimer *timerOriginal = Timers->Get(originalTimerID); timers = Timers;
}
#else #else
cTimer *timerOriginal = Timers.Get(originalTimerID); timers = &Timers;
#endif #endif
const cTimer *timerOriginal = timers->Get(originalTimerID);
if (replace && timerOriginal) { if (replace && timerOriginal) {
recManager->DeleteTimer(timerOriginal->Event()); recManager->DeleteTimer(timerOriginal->Event());
recManager->createTimer(replace); recManager->createTimer(replace);
@@ -740,7 +823,7 @@ eOSState cRecMenuView::StateMachine(eRecMenuState nextState) {
} }
break;} break;}
case rmsTimelineTimerSave: { case rmsTimelineTimerSave: {
cTimer timerModified; cTimer *timerModified;
const cTimer *originalTimer; const cTimer *originalTimer;
if (cRecMenuEditTimer *menu = dynamic_cast<cRecMenuEditTimer*>(activeMenu)) { if (cRecMenuEditTimer *menu = dynamic_cast<cRecMenuEditTimer*>(activeMenu)) {
timerModified = menu->GetTimer(); timerModified = menu->GetTimer();
@@ -911,12 +994,12 @@ eOSState cRecMenuView::ProcessKey(eKeys Key) {
activeMenu->UpdateActiveMenuItem(); activeMenu->UpdateActiveMenuItem();
activeMenu->Show(); activeMenu->Show();
state = osContinue; state = osContinue;
osdManager.flush(); osdManager.Flush();
} }
return state; return state;
} }
state = StateMachine(nextState); state = StateMachine(nextState);
} }
osdManager.flush(); osdManager.Flush();
return state; return state;
} }

View File

@@ -32,8 +32,8 @@ private:
public: public:
cRecMenuView(void); cRecMenuView(void);
virtual ~cRecMenuView(void); virtual ~cRecMenuView(void);
void SetFooter(cFooter *footer) { this->footer = footer; }; void AddFooter(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);

View File

@@ -554,6 +554,12 @@ void cTVGuideSearchTimer::GetSearchModes(std::vector<std::string> *searchModes)
searchModes->push_back(tr("fuzzy")); searchModes->push_back(tr("fuzzy"));
} }
void cTVGuideSearchTimer::GetSubTitleModes(std::vector<std::string> *subTitleModes) {
subTitleModes->push_back(trVDR("no"));
subTitleModes->push_back(trVDR("yes"));
subTitleModes->push_back(tr("allow empty"));
}
void cTVGuideSearchTimer::GetUseChannelModes(std::vector<std::string> *useChannelModes) { void cTVGuideSearchTimer::GetUseChannelModes(std::vector<std::string> *useChannelModes) {
useChannelModes->push_back(tr("No")); useChannelModes->push_back(tr("No"));
useChannelModes->push_back(tr("Interval")); useChannelModes->push_back(tr("Interval"));

View File

@@ -81,6 +81,7 @@ public:
int GetNumTimers(void); int GetNumTimers(void);
int GetNumRecordings(void); int GetNumRecordings(void);
void GetSearchModes(std::vector<std::string> *searchModes); void GetSearchModes(std::vector<std::string> *searchModes);
void GetSubTitleModes(std::vector<std::string> *subTitleModes);
void GetUseChannelModes(std::vector<std::string> *useChannelModes); void GetUseChannelModes(std::vector<std::string> *useChannelModes);
void GetSearchTimerModes(std::vector<std::string> *searchTimerModes); void GetSearchTimerModes(std::vector<std::string> *searchTimerModes);
void GetCompareDateModes(std::vector<std::string> *compareDateModes); void GetCompareDateModes(std::vector<std::string> *compareDateModes);

37
setup.c
View File

@@ -60,6 +60,7 @@ void cTvguideSetup::Store(void) {
SetupStore("debugImageLoading", config.debugImageLoading); SetupStore("debugImageLoading", config.debugImageLoading);
SetupStore("useNopacityTheme", config.useNopacityTheme); SetupStore("useNopacityTheme", config.useNopacityTheme);
SetupStore("themeIndex", config.themeIndex); SetupStore("themeIndex", config.themeIndex);
SetupStore("useHWAccel", config.useHWAccel);
SetupStore("showMainMenuEntry", config.showMainMenuEntry); SetupStore("showMainMenuEntry", config.showMainMenuEntry);
SetupStore("replaceOriginalSchedule", config.replaceOriginalSchedule); SetupStore("replaceOriginalSchedule", config.replaceOriginalSchedule);
SetupStore("displayMode", config.displayMode); SetupStore("displayMode", config.displayMode);
@@ -79,7 +80,9 @@ void cTvguideSetup::Store(void) {
SetupStore("displayTime", config.displayTime); SetupStore("displayTime", config.displayTime);
SetupStore("displayHorizontalTime", config.displayHorizontalTime); SetupStore("displayHorizontalTime", config.displayHorizontalTime);
SetupStore("bigStepHours", config.bigStepHours); SetupStore("bigStepHours", config.bigStepHours);
SetupStore("bigStepHoursHorizontal", config.bigStepHoursHorizontal);
SetupStore("hugeStepHours", config.hugeStepHours); SetupStore("hugeStepHours", config.hugeStepHours);
SetupStore("hugeStepHoursHorizontal", config.hugeStepHoursHorizontal);
SetupStore("channelJumpMode", config.channelJumpMode); SetupStore("channelJumpMode", config.channelJumpMode);
SetupStore("blueKeyMode", config.blueKeyMode); SetupStore("blueKeyMode", config.blueKeyMode);
SetupStore("numkeyMode", config.numkeyMode); SetupStore("numkeyMode", config.numkeyMode);
@@ -105,6 +108,8 @@ void cTvguideSetup::Store(void) {
SetupStore("footerHeightPercent", config.footerHeightPercent); SetupStore("footerHeightPercent", config.footerHeightPercent);
SetupStore("instRecFolderMode", config.instRecFolderMode); SetupStore("instRecFolderMode", config.instRecFolderMode);
SetupStore("instRecFixedFolder", config.instRecFixedFolder.c_str()); SetupStore("instRecFixedFolder", config.instRecFixedFolder.c_str());
SetupStore("addSubtitleToTimer", config.addSubtitleToTimer);
SetupStore("timerMessage", config.timerMessage);
SetupStore("favWhatsOnNow", config.favWhatsOnNow); SetupStore("favWhatsOnNow", config.favWhatsOnNow);
SetupStore("favWhatsOnNext", config.favWhatsOnNext); SetupStore("favWhatsOnNext", config.favWhatsOnNext);
SetupStore("favUseTime1", config.favUseTime1); SetupStore("favUseTime1", config.favUseTime1);
@@ -203,6 +208,7 @@ 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"), &tmpConfig->showMainMenuEntry)); Add(new cMenuEditBoolItem(tr("Show Main Menu Entry"), &tmpConfig->showMainMenuEntry));
Add(new cMenuEditBoolItem(tr("Replace VDR Schedules Menu"), &tmpConfig->replaceOriginalSchedule)); Add(new cMenuEditBoolItem(tr("Replace VDR Schedules Menu"), &tmpConfig->replaceOriginalSchedule));
Add(new cMenuEditBoolItem(tr("Use appropriate nOpacity Theme"), &tmpConfig->useNopacityTheme)); Add(new cMenuEditBoolItem(tr("Use appropriate nOpacity Theme"), &tmpConfig->useNopacityTheme));
@@ -222,8 +228,13 @@ void cMenuSetupGeneral::Set(void) {
Add(new cMenuEditBoolItem(tr("Close TVGuide after channel switch"), &tmpConfig->closeOnSwitch)); Add(new cMenuEditBoolItem(tr("Close TVGuide after channel switch"), &tmpConfig->closeOnSwitch));
Add(new cMenuEditStraItem(tr("Functionality of numeric Keys"), &tmpConfig->numkeyMode, 2, numMode)); Add(new cMenuEditStraItem(tr("Functionality of numeric Keys"), &tmpConfig->numkeyMode, 2, numMode));
Add(new cMenuEditBoolItem(tr("Hide last Channel Group"), &tmpConfig->hideLastGroup)); Add(new cMenuEditBoolItem(tr("Hide last Channel Group"), &tmpConfig->hideLastGroup));
Add(new cMenuEditIntItem(tr("Big Step (Keys 1 / 3) in hours"), &tmpConfig->bigStepHours, 1, 12)); if (tmpConfig->displayMode == eVertical) {
Add(new cMenuEditIntItem(tr("Huge Step (Keys 4 / 6) in hours"), &tmpConfig->hugeStepHours, 13, 48)); Add(new cMenuEditIntItem(tr("Big Step (Keys 1 / 3) in hours"), &tmpConfig->bigStepHours, 1, 12));
Add(new cMenuEditIntItem(tr("Huge Step (Keys 4 / 6) in hours"), &tmpConfig->hugeStepHours, 13, 48));
} else if (tmpConfig->displayMode == eHorizontal) {
Add(new cMenuEditIntItem(tr("Big Step (Keys 1 / 3) in hours"), &tmpConfig->bigStepHoursHorizontal, 1, 12));
Add(new cMenuEditIntItem(tr("Huge Step (Keys 4 / 6) in hours"), &tmpConfig->hugeStepHoursHorizontal, 13, 48));
}
Add(new cMenuEditStraItem(tr("Time Format (12h/24h)"), &tmpConfig->timeFormat, 2, timeFormatItems)); Add(new cMenuEditStraItem(tr("Time Format (12h/24h)"), &tmpConfig->timeFormat, 2, timeFormatItems));
Add(new cMenuEditIntItem(tr("EPG Window Text Scrolling Speed"), &tmpConfig->detailedViewScrollStep, 1, 30)); Add(new cMenuEditIntItem(tr("EPG Window Text Scrolling Speed"), &tmpConfig->detailedViewScrollStep, 1, 30));
Add(new cMenuEditBoolItem(tr("Display Reruns in detailed EPG View"), &tmpConfig->displayRerunsDetailEPGView)); Add(new cMenuEditBoolItem(tr("Display Reruns in detailed EPG View"), &tmpConfig->displayRerunsDetailEPGView));
@@ -275,8 +286,8 @@ void cMenuSetupScreenLayout::Set(void) {
Add(new cMenuEditIntItem(*cString::sprintf("%s%s", *indent, tr("Width of Channel Header (Perc. of osd width)")), &tmpConfig->channelHeaderWidthPercent, 5, 30)); Add(new cMenuEditIntItem(*cString::sprintf("%s%s", *indent, tr("Width of Channel Header (Perc. of osd width)")), &tmpConfig->channelHeaderWidthPercent, 5, 30));
Add(new cMenuEditIntItem(*cString::sprintf("%s%s", *indent, tr("Height of Timeline (Perc. of osd height)")), &tmpConfig->timeLineHeightPercent, 5, 30)); Add(new cMenuEditIntItem(*cString::sprintf("%s%s", *indent, tr("Height of Timeline (Perc. of osd height)")), &tmpConfig->timeLineHeightPercent, 5, 30));
Add(new cMenuEditIntItem(*cString::sprintf("%s%s", *indent, tr("Number of Channels to display")), &tmpConfig->channelRows, 3, 12)); Add(new cMenuEditIntItem(*cString::sprintf("%s%s", *indent, tr("Number of Channels to display")), &tmpConfig->channelRows, 3, 12));
Add(new cMenuEditBoolItem(*cString::sprintf("%s%s", *indent, tr("Display time in EPG Grids")), &tmpConfig->showTimeInGrid));
} }
Add(new cMenuEditBoolItem(tr("Display time in EPG Grids"), &tmpConfig->showTimeInGrid));
Add(new cMenuEditIntItem(tr("Height of Headers (Status Header and EPG View, Perc. of osd height)"), &tmpConfig->headerHeightPercent, 10, 50)); Add(new cMenuEditIntItem(tr("Height of Headers (Status Header and EPG View, Perc. of osd height)"), &tmpConfig->headerHeightPercent, 10, 50));
Add(new cMenuEditIntItem(tr("Height of Footer (Perc. of osd height)"), &tmpConfig->footerHeightPercent, 3, 20)); Add(new cMenuEditIntItem(tr("Height of Footer (Perc. of osd height)"), &tmpConfig->footerHeightPercent, 3, 20));
@@ -401,6 +412,9 @@ 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"));
@@ -411,13 +425,16 @@ void cMenuSetupFavorites::Set(void) {
int currentItem = Current(); int currentItem = Current();
Clear(); Clear();
Add(new cMenuEditStraItem(tr("Folder for instant Recordings"), &tmpConfig->instRecFolderMode, 3, recFolderMode)); Add(new cOsdItem(tr("Instant recording:"), osUnknown, false));
Add(new cMenuEditStraItem(tr("Folder for instant Recordings"), &tmpConfig->instRecFolderMode, 3, recFolderMode));
if (tmpConfig->instRecFolderMode == eFolderFixed) { 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"), &tmpConfig->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"), &tmpConfig->favLimitChannels)); Add(new cMenuEditBoolItem(tr("Limit channels in favorites"), &tmpConfig->favLimitChannels));
if (tmpConfig->favLimitChannels) { if (tmpConfig->favLimitChannels) {
Add(new cMenuEditChanItem(tr("Start Channel"), &tmpConfig->favStartChannel)); Add(new cMenuEditChanItem(tr("Start Channel"), &tmpConfig->favStartChannel));
@@ -508,11 +525,11 @@ void cMenuSetupImageCache::Set(void) {
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"), &tmpConfig->numLogosInitial, 0, 9999));
Add(InfoItem(tr("Cache Sizes"), "")); Add(InfoItem(tr("Cache Sizes"), ""));
Add(InfoItem(tr("OSD Element Cache"), (imgCache.GetCacheSize(ctOsdElement)).c_str())); Add(InfoItem(tr("OSD Element Cache"), cString::sprintf("\t%s", (imgCache.GetCacheSize(ctOsdElement)).c_str())));
Add(InfoItem(tr("Logo cache"), (imgCache.GetCacheSize(ctLogo)).c_str())); Add(InfoItem(tr("Logo cache"), cString::sprintf("\t%s", (imgCache.GetCacheSize(ctLogo)).c_str())));
Add(InfoItem(tr("EPG Grid Cache"), (imgCache.GetCacheSize(ctGrid)).c_str())); Add(InfoItem(tr("EPG Grid Cache"), cString::sprintf("\t%s", (imgCache.GetCacheSize(ctGrid)).c_str())));
Add(InfoItem(tr("Channel Groups Cache"), (imgCache.GetCacheSize(ctChannelGroup)).c_str())); Add(InfoItem(tr("Channel Groups Cache"), cString::sprintf("\t%s", (imgCache.GetCacheSize(ctChannelGroup)).c_str())));
Add(InfoItem(tr("Recording Menus Icon Cache"), (imgCache.GetCacheSize(ctIcon)).c_str())); Add(InfoItem(tr("Recording Menus Icon Cache"), cString::sprintf("\t%s", (imgCache.GetCacheSize(ctIcon)).c_str())));
SetCurrent(Get(currentItem)); SetCurrent(Get(currentItem));
Display(); Display();

View File

@@ -70,6 +70,7 @@ 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);

View File

@@ -9,14 +9,14 @@ cStatusHeader::cStatusHeader(void) {
height = geoManager.statusHeaderHeight; height = geoManager.statusHeaderHeight;
width = geoManager.headerContentWidth; width = geoManager.headerContentWidth;
tvFrameWidth = geoManager.tvFrameWidth; tvFrameWidth = geoManager.tvFrameWidth;
pixmap = osdManager.requestPixmap(1, cRect(0, 0, width, height)); pixmap = osdManager.CreatePixmap(1, cRect(0, 0, width, height));
pixmapText = osdManager.requestPixmap(2, cRect(0, 0, width, height)); pixmapText = osdManager.CreatePixmap(2, cRect(0, 0, width, height));
pixmapTVFrame = osdManager.requestPixmap(1, cRect(width, 0, tvFrameWidth, height)); pixmapTVFrame = osdManager.CreatePixmap(1, cRect(width, 0, tvFrameWidth, height));
} }
cStatusHeader::~cStatusHeader(void) { cStatusHeader::~cStatusHeader(void) {
osdManager.releasePixmap(pixmapText); osdManager.DestroyPixmap(pixmapText);
osdManager.releasePixmap(pixmapTVFrame); osdManager.DestroyPixmap(pixmapTVFrame);
if (config.scaleVideo) { if (config.scaleVideo) {
cRect vidWin = cDevice::PrimaryDevice()->CanScaleVideo(cRect::Null); cRect vidWin = cDevice::PrimaryDevice()->CanScaleVideo(cRect::Null);
cDevice::PrimaryDevice()->ScaleVideo(vidWin); cDevice::PrimaryDevice()->ScaleVideo(vidWin);
@@ -63,7 +63,7 @@ void cStatusHeader::DrawInfoText(cGridElement *grid) {
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) {

View File

@@ -12,7 +12,7 @@ cStyledPixmap::cStyledPixmap(cPixmap *pixmap) {
cStyledPixmap::~cStyledPixmap(void) { cStyledPixmap::~cStyledPixmap(void) {
if (pixmap) if (pixmap)
osdManager.releasePixmap(pixmap); osdManager.DestroyPixmap(pixmap);
} }
void cStyledPixmap::setPixmap(cPixmap *pixmap) { void cStyledPixmap::setPixmap(cPixmap *pixmap) {

View File

@@ -1,14 +1,14 @@
Description = IceBlue Description = IceBlue
clrStyle = 00000000 clrStyle = 00000000
clrBackground = DDFFFFFF clrBackground = EEFFFFFF
clrBackgroundOSD = FFFFFFFF clrBackgroundOSD = F0FFFFFF
clrGrid1 = BB555555 clrGrid1 = FFB2B2C
clrGrid2 = BB888888 clrGrid2 = 55B2B2C7
clrGridFontBack = 00000000 clrGridFontBack = 00000000
clrGridActiveFontBack = 00000000 clrGridActiveFontBack = FFFFFFFF
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 = 88B8B8E6 clrTabInactive = 55B2B2C7
clrButtonRed = FFBB0000 clrButtonRed = FFCC00000
clrButtonRedBorder = FF000000 clrButtonRedBorder = FF000000
clrButtonGreen = FF00BB00 clrButtonGreen = FF00BB00
clrButtonGreenBorder = FF000000 clrButtonGreenBorder = FF000000
clrButtonYellow = FFBBBB00 clrButtonYellow = FFF5B800
clrButtonYellowBorder = FF000000 clrButtonYellowBorder = FF000000
clrButtonBlue = FF0000BB clrButtonBlue = FF003DF5
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 = FF3C3C3C clrRecMenuTextBack = 00000000
clrRecMenuTextActiveBack = FF404749 clrRecMenuTextActiveBack = FF404749
clrRecMenuKeyboardBack = FF000044 clrRecMenuKeyboardBack = FF000044
clrRecMenuKeyboardBorder = FF3C3C3C clrRecMenuKeyboardBorder = FF6C6C6C
clrRecMenuKeyboardHigh = 55FFFFFF clrRecMenuKeyboardHigh = 55FFFFFF
clrButtonRedKeyboard = FFBB0000 clrButtonRedKeyboard = FFBB0000
clrButtonGreenKeyboard = FF00BB00 clrButtonGreenKeyboard = FF00BB00
clrButtonYellowKeyboard = FFBBBB00 clrButtonYellowKeyboard = FFBBBB00
clrRecMenuTimelineTimer = B012273f clrRecMenuTimelineTimer = B012273f
clrRecMenuTimelineBack = FF828282 clrRecMenuTimelineBack = 55B2B2C7
clrRecMenuTimelineActive = FF3F3F3F clrRecMenuTimelineActive = 773F3F3F
clrRecMenuTimelineConflict = 30FF0000 clrRecMenuTimelineConflict = 30FF0000
clrRecMenuTimelineConflictOverlap = 90FF0000 clrRecMenuTimelineConflictOverlap = 90FF0000

View File

@@ -3,66 +3,46 @@
cTimeLine::cTimeLine(cTimeManager *timeManager) { cTimeLine::cTimeLine(cTimeManager *timeManager) {
this->timeManager = timeManager; this->timeManager = timeManager;
lastClock = "";
timeBase = NULL;
int x11, x21, y11, y21, x12, x22, y12, y22;
if (config.displayMode == eVertical) { if (config.displayMode == eVertical) {
dateViewer = new cStyledPixmap(osdManager.requestPixmap(1, cRect(0, x11 = 0;
geoManager.statusHeaderHeight + geoManager.clockHeight, x21 = geoManager.dateVieverWidth;
geoManager.dateVieverWidth, y11 = geoManager.statusHeaderHeight + geoManager.clockHeight;
geoManager.dateVieverHeight))); y21 = geoManager.dateVieverHeight;
timeline = osdManager.requestPixmap(2, cRect(0, x12 = 0;
geoManager.statusHeaderHeight + geoManager.channelHeaderHeight + geoManager.channelGroupsHeight, x22 = geoManager.timeLineWidth;
geoManager.timeLineWidth, y12 = geoManager.statusHeaderHeight + geoManager.channelHeaderHeight + geoManager.channelGroupsHeight;
geoManager.osdHeight - geoManager.statusHeaderHeight - geoManager.channelHeaderHeight - geoManager.channelGroupsHeight - geoManager.footerHeight) y22 = geoManager.osdHeight - geoManager.statusHeaderHeight - geoManager.channelHeaderHeight - geoManager.channelGroupsHeight - geoManager.footerHeight;
, cRect(0,
0,
geoManager.timeLineWidth,
1440*geoManager.minutePixel));
timeBase = osdManager.requestPixmap(3, cRect(0,
geoManager.statusHeaderHeight + geoManager.channelGroupsHeight + geoManager.channelHeaderHeight,
geoManager.osdWidth,
geoManager.timeLineGridHeight));
} else if (config.displayMode == eHorizontal) { } else if (config.displayMode == eHorizontal) {
dateViewer = new cStyledPixmap(osdManager.requestPixmap(1, cRect(geoManager.clockWidth, x11 = geoManager.clockWidth;
geoManager.statusHeaderHeight, x21 = geoManager.dateVieverWidth;
geoManager.dateVieverWidth, y11 = geoManager.statusHeaderHeight;
geoManager.dateVieverHeight))); y21 = geoManager.dateVieverHeight;
timeline = osdManager.requestPixmap(2, cRect(geoManager.channelHeaderWidth + geoManager.channelGroupsWidth, x12 = geoManager.channelHeaderWidth + geoManager.channelGroupsWidth;
geoManager.statusHeaderHeight, x22 = geoManager.osdWidth - geoManager.channelHeaderWidth - geoManager.channelGroupsWidth;
geoManager.osdWidth - geoManager.channelHeaderWidth - geoManager.channelGroupsWidth, y12 = geoManager.statusHeaderHeight;
geoManager.timeLineHeight) y22 = geoManager.timeLineHeight;
, cRect(0,
0,
1440*geoManager.minutePixel,
geoManager.timeLineHeight));
timeBase = osdManager.requestPixmap(3, cRect(geoManager.channelGroupsWidth + geoManager.channelHeaderWidth,
geoManager.statusHeaderHeight,
geoManager.timeLineGridWidth,
geoManager.timeLineHeight + config.channelRows * geoManager.rowHeight));
} }
timeBase->Fill(clrTransparent); dateViewer = new cStyledPixmap(osdManager.CreatePixmap(1, cRect(x11, y11, x21, y21)));
int clockY; timeline = osdManager.CreatePixmap(2, cRect(x12, y12, x22, y22));
int clockX; clock = new cStyledPixmap(osdManager.CreatePixmap(3, cRect(0,
if (config.displayMode == eVertical) { geoManager.statusHeaderHeight,
clockY = geoManager.statusHeaderHeight;
clockX = 0;
}
else {
clockY = geoManager.statusHeaderHeight;
clockX = 0;
}
clock = new cStyledPixmap(osdManager.requestPixmap(3, cRect(clockX,
clockY,
geoManager.clockWidth, geoManager.clockWidth,
geoManager.clockHeight))); geoManager.clockHeight)));
} }
cTimeLine::~cTimeLine(void) { cTimeLine::~cTimeLine(void) {
delete dateViewer;
osdManager.releasePixmap(timeline);
if (clock) if (clock)
delete clock; delete clock;
osdManager.DestroyPixmap(timeBase);
osdManager.DestroyPixmap(timeline);
if (dateViewer)
delete dateViewer;
} }
void cTimeLine::drawDateViewer() { void cTimeLine::DrawDateViewer(void) {
cString weekDay = timeManager->GetWeekday(); cString weekDay = timeManager->GetWeekday();
cString date = timeManager->GetDate(); cString date = timeManager->GetDate();
if (config.style != eStyleGraphical) { if (config.style != eStyleGraphical) {
@@ -96,8 +76,8 @@ void cTimeLine::drawDateViewer() {
} }
} }
void cTimeLine::drawTimeline() { void cTimeLine::DrawTimeline(void) {
timeline->SetTile(true); // timeline->SetTile(true);
timeline->Fill(clrTransparent); timeline->Fill(clrTransparent);
tColor colorFont, colorBackground; tColor colorFont, colorBackground;
@@ -109,8 +89,8 @@ void cTimeLine::drawTimeline() {
img1 = imgCache.GetOsdElement(oeTimeline1); img1 = imgCache.GetOsdElement(oeTimeline1);
img2 = imgCache.GetOsdElement(oeTimeline2); img2 = imgCache.GetOsdElement(oeTimeline2);
} else { } else {
img1 = createBackgroundImage(imgWidth, imgHeight, theme.Color(clrTimeline1), theme.Color(clrTimeline1Blending)); img1 = CreateBackgroundImage(imgWidth, imgHeight, theme.Color(clrTimeline1), theme.Color(clrTimeline1Blending));
img2 = createBackgroundImage(imgWidth, imgHeight, theme.Color(clrTimeline2), theme.Color(clrTimeline2Blending)); img2 = CreateBackgroundImage(imgWidth, imgHeight, theme.Color(clrTimeline2), theme.Color(clrTimeline2Blending));
} }
const cImage *img = NULL; const cImage *img = NULL;
if (!img1 || !img2) if (!img1 || !img2)
@@ -118,8 +98,19 @@ void cTimeLine::drawTimeline() {
int textWidth, posX, posY; int textWidth, posX, posY;
char timetext[10]; char timetext[10];
for (int i=0; i<48; i++) { int halfHours;
if (i%2==0) { if (config.displayMode == eVertical)
halfHours = config.displayTime / 30 + 1;
else
halfHours = config.displayHorizontalTime / 30 + 1;
time_t tStart = timeManager->GetStart();
tm *t = localtime ( &tStart );
int x = 2 * t->tm_hour + ((t->tm_min == 0) ? 0 : 1);
for (int j = x; j < (x + halfHours); j++) {
int i = (j >= 48) ? (j - 48) : j;
if (i % 2 == 0) {
img = img1; img = img1;
colorFont = theme.Color(clrTimeline2); colorFont = theme.Color(clrTimeline2);
colorBackground = (config.style == eStyleFlat)?theme.Color(clrTimeline1):clrTransparent; colorBackground = (config.style == eStyleFlat)?theme.Color(clrTimeline1):clrTransparent;
@@ -127,11 +118,11 @@ void cTimeLine::drawTimeline() {
if (i == 0) if (i == 0)
sprintf(timetext, "12:00 PM"); sprintf(timetext, "12:00 PM");
else if (i/2 < 13) else if (i/2 < 13)
sprintf(timetext, "%d:00 AM", i/2); sprintf(timetext, "%d:00 AM", i / 2);
else else
sprintf(timetext, "%d:00 PM", i/2-12); sprintf(timetext, "%d:00 PM", i / 2 - 12);
} else { } else {
sprintf(timetext, "%d:00", i/2); sprintf(timetext, "%d:00", i / 2);
} }
} else { } else {
img = img2; img = img2;
@@ -141,38 +132,38 @@ void cTimeLine::drawTimeline() {
if (i == 1) if (i == 1)
sprintf(timetext, "12:30 PM"); sprintf(timetext, "12:30 PM");
else if (i/2 < 13) else if (i/2 < 13)
sprintf(timetext, "%d:30 AM", i/2); sprintf(timetext, "%d:30 AM", i / 2);
else else
sprintf(timetext, "%d:30 PM", i/2-12); sprintf(timetext, "%d:30 PM", i / 2 - 12);
} else { } else {
sprintf(timetext, "%d:30", i/2); sprintf(timetext, "%d:30", i / 2);
} }
} }
if (config.displayMode == eVertical) { if (config.displayMode == eVertical) {
posY = i*geoManager.minutePixel*30; posY = (j - x) * geoManager.minutePixel * 30;
timeline->DrawImage(cPoint(0, posY), *img); timeline->DrawImage(cPoint(0, posY), *img);
if (config.style != eStyleGraphical) { if (config.style != eStyleGraphical) {
decorateTile(0, posY, imgWidth+2, imgHeight); DecorateTile(0, posY, imgWidth + 2, imgHeight);
} }
textWidth = fontManager.FontTimeLineTime->Width(timetext); textWidth = fontManager.FontTimeLineTime->Width(timetext);
timeline->DrawText(cPoint((geoManager.timeLineWidth-textWidth)/2, posY + 5), timetext, colorFont, colorBackground, fontManager.FontTimeLineTime); timeline->DrawText(cPoint((geoManager.timeLineWidth-textWidth) / 2, posY + 5), timetext, colorFont, colorBackground, fontManager.FontTimeLineTime);
} else if (config.displayMode == eHorizontal) { } else if (config.displayMode == eHorizontal) {
posX = i*geoManager.minutePixel*30; posX = (j - x) * geoManager.minutePixel * 30;
timeline->DrawImage(cPoint(posX, 0), *img); timeline->DrawImage(cPoint(posX, 0), *img);
if (config.style != eStyleGraphical) { if (config.style != eStyleGraphical) {
decorateTile(posX, 0, imgWidth, imgHeight+2); DecorateTile(posX, 0, imgWidth, imgHeight + 2);
} }
timeline->DrawText(cPoint(posX + 15, (dateViewer->Height() - fontManager.FontTimeLineTimeHorizontal->Height())/2), timetext, colorFont, colorBackground, fontManager.FontTimeLineTimeHorizontal); timeline->DrawText(cPoint(posX + 15, (dateViewer->Height() - fontManager.FontTimeLineTimeHorizontal->Height()) / 2), timetext, colorFont, colorBackground, fontManager.FontTimeLineTimeHorizontal);
} }
} }
setTimeline(); DrawTimeIndicator();
if (config.style != eStyleGraphical) { if (config.style != eStyleGraphical) {
delete img1; delete img1;
delete img2; delete img2;
} }
} }
void cTimeLine::decorateTile(int posX, int posY, int tileWidth, int tileHeight) { void cTimeLine::DecorateTile(int posX, int posY, int tileWidth, int tileHeight) {
timeline->DrawRectangle(cRect(posX,posY,tileWidth,2), clrTransparent); //top timeline->DrawRectangle(cRect(posX,posY,tileWidth,2), clrTransparent); //top
timeline->DrawRectangle(cRect(posX,posY,2,tileHeight), clrTransparent); //left timeline->DrawRectangle(cRect(posX,posY,2,tileHeight), clrTransparent); //left
timeline->DrawRectangle(cRect(posX,posY + tileHeight-2,tileWidth,2), clrTransparent); //bottom timeline->DrawRectangle(cRect(posX,posY + tileHeight-2,tileWidth,2), clrTransparent); //bottom
@@ -185,11 +176,11 @@ void cTimeLine::decorateTile(int posX, int posY, int tileWidth, int tileHeight)
if (config.roundedCorners) { if (config.roundedCorners) {
int borderRadius = 12; int borderRadius = 12;
drawRoundedCorners(posX, posY, tileWidth, tileHeight, borderRadius); DrawRoundedCorners(posX, posY, tileWidth, tileHeight, borderRadius);
} }
} }
void cTimeLine::drawRoundedCorners(int posX, int posY, int width, int height, int radius) { void cTimeLine::DrawRoundedCorners(int posX, int posY, int width, int height, int radius) {
timeline->DrawEllipse(cRect(posX+2,posY+2,radius,radius), theme.Color(clrBorder), -2); timeline->DrawEllipse(cRect(posX+2,posY+2,radius,radius), theme.Color(clrBorder), -2);
timeline->DrawEllipse(cRect(posX+1,posY+1,radius,radius), clrTransparent, -2); timeline->DrawEllipse(cRect(posX+1,posY+1,radius,radius), clrTransparent, -2);
@@ -205,21 +196,34 @@ void cTimeLine::drawRoundedCorners(int posX, int posY, int width, int height, in
} }
} }
void cTimeLine::drawCurrentTimeBase(void) { void cTimeLine::DrawTimeIndicator(void) {
timeBase->Fill(clrTransparent); if (!config.displayTimeBase)
bool nowVisible = timeManager->NowVisible();
if (!nowVisible)
return; return;
int deltaTime = (timeManager->GetNow() - timeManager->GetStart()) / 60 * geoManager.minutePixel; if (!timeManager->NowVisible()) {
if (config.displayMode == eVertical) { if (timeBase)
timeBase->DrawRectangle(cRect(0, deltaTime - 2, timeBase->ViewPort().Width(), 4), theme.Color(clrTimeBase)); timeBase->Fill(clrTransparent);
} else { return;
timeBase->DrawRectangle(cRect(deltaTime-2, 0, 4, timeBase->ViewPort().Height()), theme.Color(clrTimeBase));
} }
int deltaTime = (time(0) - timeManager->GetStart()) / 60 * geoManager.minutePixel;
osdManager.DestroyPixmap(timeBase);
int x1, x2, y1, y2;
if (config.displayMode == eVertical) {
x1 = 0;
y1 = geoManager.statusHeaderHeight + geoManager.channelGroupsHeight + geoManager.channelHeaderHeight + deltaTime - 2;
x2 = geoManager.osdWidth;
y2 = 4;
} else {
x1 = geoManager.channelGroupsWidth + geoManager.channelHeaderWidth + deltaTime - 2;
y1 = geoManager.statusHeaderHeight;
x2 = 4;
y2 = geoManager.timeLineHeight + config.channelRows * geoManager.rowHeight;
}
timeBase = osdManager.CreatePixmap(3, cRect(x1, y1, x2, y2));
timeBase->Fill(clrTransparent);
timeBase->DrawRectangle(cRect(0, 0, timeBase->ViewPort().Width(), timeBase->ViewPort().Height()), theme.Color(clrTimeBase));
} }
cImage *cTimeLine::CreateBackgroundImage(int width, int height, tColor clrBgr, tColor clrBlend) {
cImage *cTimeLine::createBackgroundImage(int width, int height, tColor clrBgr, tColor clrBlend) {
cImage *image = NULL; cImage *image = NULL;
if (config.style == eStyleBlendingDefault) { if (config.style == eStyleBlendingDefault) {
image = new cImage(cSize(width, height)); image = new cImage(cSize(width, height));
@@ -248,35 +252,25 @@ cImage *cTimeLine::createBackgroundImage(int width, int height, tColor clrBgr, t
return image; return image;
} }
void cTimeLine::setTimeline() { bool cTimeLine::DrawClock(void) {
int offset = timeManager->GetTimelineOffset();
int xNew, yNew;
if (config.displayMode == eVertical) {
xNew = 0;
yNew = -offset*geoManager.minutePixel;
} else if (config.displayMode == eHorizontal) {
xNew = -offset*geoManager.minutePixel;
yNew = 0;
}
timeline->SetDrawPortPoint(cPoint(xNew, yNew));
if (config.displayTimeBase)
drawCurrentTimeBase();
}
void cTimeLine::drawClock() {
if (config.displayMode == eVertical)
clock->Fill(clrTransparent);
cString currentTime = timeManager->GetCurrentTime(); cString currentTime = timeManager->GetCurrentTime();
const cFont *font = (config.displayMode == eVertical)?fontManager.FontTimeLineTime:fontManager.FontTimeLineTimeHorizontal; if (strcmp(currentTime, lastClock)) {
int textHeight = font->Height(); clock->Fill(clrTransparent);
int clockTextWidth = font->Width(*currentTime); const cFont *font = (config.displayMode == eVertical) ? fontManager.FontTimeLineTime : fontManager.FontTimeLineTimeHorizontal;
tColor colorFontBack = (config.style == eStyleFlat)?theme.Color(clrHeader):clrTransparent; int textHeight = font->Height();
if (config.style == eStyleGraphical) { int clockTextWidth = font->Width(*currentTime);
clock->drawBackgroundGraphical(bgClock); tColor colorFontBack = (config.style == eStyleFlat) ? theme.Color(clrHeader) : clrTransparent;
} else { if (config.style == eStyleGraphical) {
clock->setColor(theme.Color(clrHeader), theme.Color(clrHeaderBlending)); clock->drawBackgroundGraphical(bgClock);
clock->drawBackground(); } else {
clock->drawBorder(); 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);
lastClock = currentTime;
DrawTimeIndicator();
return true;
} }
clock->DrawText(cPoint((geoManager.clockWidth-clockTextWidth)/2, (geoManager.clockHeight-textHeight)/2), *currentTime, theme.Color(clrFont), colorFontBack, font); return false;
} }

View File

@@ -13,17 +13,17 @@ private:
cPixmap *timeline; cPixmap *timeline;
cStyledPixmap *clock; cStyledPixmap *clock;
cPixmap *timeBase; cPixmap *timeBase;
void decorateTile(int posX, int posY, int tileWidth, int tileHeight); cString lastClock;
void drawRoundedCorners(int posX, int posY, int width, int height, int radius); void DecorateTile(int posX, int posY, int tileWidth, int tileHeight);
cImage *createBackgroundImage(int width, int height, tColor clrBgr, tColor clrBlend); void DrawRoundedCorners(int posX, int posY, int width, int height, int radius);
void drawCurrentTimeBase(void); cImage *CreateBackgroundImage(int width, int height, tColor clrBgr, tColor clrBlend);
public: public:
cTimeLine(cTimeManager *timeManager); cTimeLine(cTimeManager *timeManager);
virtual ~cTimeLine(void); virtual ~cTimeLine(void);
void setTimeline(); void DrawDateViewer(void);
void drawDateViewer(); void DrawTimeline(void);
void drawTimeline(); void DrawTimeIndicator(void);
void drawClock(); bool DrawClock(void);
}; };
#endif //__TVGUIDE_TIMELINE_H #endif //__TVGUIDE_TIMELINE_H

View File

@@ -3,6 +3,14 @@
#include "config.h" #include "config.h"
#include "timemanager.h" #include "timemanager.h"
cTimeManager::cTimeManager(void) {
if (config.displayMode == eVertical) {
displaySeconds = (geoManager.osdHeight - geoManager.statusHeaderHeight - geoManager.channelHeaderHeight - geoManager.channelGroupsHeight - geoManager.footerHeight) / geoManager.minutePixel * 60;
} else if (config.displayMode == eHorizontal) {
displaySeconds = (geoManager.osdWidth - geoManager.channelHeaderWidth - geoManager.channelGroupsWidth) / geoManager.minutePixel * 60;
}
}
cTimeManager::~cTimeManager(void) { cTimeManager::~cTimeManager(void) {
} }
@@ -18,40 +26,32 @@ void cTimeManager::Now() {
t = time(0); t = time(0);
tStart = t; tStart = t;
tStart = GetRounded(); tStart = GetRounded();
if (config.displayMode == eVertical) { tEnd = tStart + displaySeconds;
tEnd = tStart + (geoManager.osdHeight - geoManager.statusHeaderHeight - geoManager.channelHeaderHeight - geoManager.channelGroupsHeight - geoManager.footerHeight)/geoManager.minutePixel*60;
} else if (config.displayMode == eHorizontal) {
tEnd = tStart + (geoManager.osdWidth - geoManager.channelHeaderWidth - geoManager.channelGroupsWidth)/geoManager.minutePixel*60;
}
} }
void cTimeManager::AddStep(int step) { void cTimeManager::AddStep(int step) {
tStart += step*60; tStart += step * 60;
tEnd += step*60; tEnd = tStart + displaySeconds;
} }
bool cTimeManager::DelStep(int step) { void cTimeManager::DelStep(int step) {
if ((tStart - step*60)+30*60 < t) { if ((tStart - step * 60) + 30 * 60 < t) {
return true; Now();
} else {
tStart -= step * 60;
tEnd = tStart + displaySeconds;
} }
tStart -= step*60;
tEnd -= step*60;
return false;
} }
void cTimeManager::SetTime(time_t newTime) { void cTimeManager::SetTime(time_t newTime) {
tStart = newTime; tStart = newTime;
if (config.displayMode == eVertical) { tEnd = tStart + displaySeconds;
tEnd = tStart + (geoManager.osdHeight - geoManager.statusHeaderHeight - geoManager.channelHeaderHeight - geoManager.channelGroupsHeight - geoManager.footerHeight)/geoManager.minutePixel*60;
} else if (config.displayMode == eHorizontal) {
tEnd = tStart + (geoManager.osdWidth - geoManager.channelHeaderWidth - geoManager.channelGroupsWidth)/geoManager.minutePixel*60;
}
} }
time_t cTimeManager::getPrevPrimetime(time_t current) { time_t cTimeManager::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;
@@ -63,7 +63,7 @@ time_t cTimeManager::getPrevPrimetime(time_t current) {
time_t cTimeManager::getNextPrimetime(time_t current){ time_t cTimeManager::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;

View File

@@ -2,6 +2,7 @@
#define __TVGUIDE_TIMEMANAGER_H #define __TVGUIDE_TIMEMANAGER_H
#include <vdr/tools.h> #include <vdr/tools.h>
#include "config.h"
// --- cTimeManager ------------------------------------------------------------- // --- cTimeManager -------------------------------------------------------------
@@ -10,14 +11,16 @@ class cTimeManager {
time_t t; time_t t;
time_t tStart; time_t tStart;
time_t tEnd; time_t tEnd;
int displaySeconds;
eTimeFormat timeFormat;
public: public:
cTimeManager(){}; cTimeManager();
virtual ~cTimeManager(void); virtual ~cTimeManager(void);
static cString printTime(time_t displayTime); static cString printTime(time_t displayTime);
void Now(); void Now();
time_t GetNow() { return t; }; time_t GetNow() { return t; };
void AddStep(int step); void AddStep(int step);
bool DelStep(int step); void DelStep(int step);
void SetTime(time_t newTime); void SetTime(time_t newTime);
time_t Get() {return t;}; time_t Get() {return t;};
time_t GetStart() {return tStart;}; time_t GetStart() {return tStart;};
@@ -31,6 +34,7 @@ class cTimeManager {
int GetTimelineOffset(); int GetTimelineOffset();
time_t GetRounded(); time_t GetRounded();
bool NowVisible(void); bool NowVisible(void);
int GetDisplaySeconds(void) { return displaySeconds; };
void debug(); void debug();
}; };

View File

@@ -16,12 +16,11 @@ 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;
} }
@@ -44,13 +43,12 @@ 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#1 int editTimer(cTimer *timer, bool active, int prio, int start, int stop); '152|30|50#152#45' is the description of the first conflicting timer. Here:
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
@@ -86,11 +84,13 @@ 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,7 +109,11 @@ 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());
@@ -152,7 +156,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;
@@ -172,7 +176,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]);

85
tools.c
View File

@@ -10,7 +10,6 @@
#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) {
@@ -23,32 +22,49 @@ cPlugin *GetScraperPlugin(void) {
/**************************************************************************************** /****************************************************************************************
* CUTTEXT * CUTTEXT
****************************************************************************************/ ****************************************************************************************/
std::string CutText(std::string text, int width, const cFont *font) { std::string utf8_substr(const std::string& str, unsigned int start, long unsigned int leng) {
if (width <= font->Size()) if (leng==0) { return ""; }
return text.c_str(); unsigned int c, i, ix, q;
if (font->Width(text.c_str()) < width) long unsigned int min=std::string::npos, max=std::string::npos;
return text.c_str(); for (q=0, i=0, ix=str.length(); i < ix; i++, q++) {
cTextWrapper twText; if (q==start){ min=i; }
twText.Set(text.c_str(), font, width); if (q<=start+leng || leng==std::string::npos){ max=i; }
std::string cuttedTextNative = twText.GetLine(0);
std::stringstream sstrText; c = (unsigned char) str[i];
sstrText << cuttedTextNative << "..."; if (c>=0 && c<=127) i+=0;
std::string cuttedText = sstrText.str(); else if ((c & 0xE0) == 0xC0) i+=1;
int actWidth = font->Width(cuttedText.c_str()); else if ((c & 0xF0) == 0xE0) i+=2;
if (actWidth > width) { else if ((c & 0xF8) == 0xF0) i+=3;
int overlap = actWidth - width; //else if (($c & 0xFC) == 0xF8) i+=4; // 111110bb //byte 5, unnecessary in 4 byte UTF-8
int charWidth = font->Width("."); //else if (($c & 0xFE) == 0xFC) i+=5; // 1111110b //byte 6, unnecessary in 4 byte UTF-8
if (charWidth == 0) else return "";//invalid utf8
charWidth = 1; }
int cutChars = overlap / charWidth; if (q<=start+leng || leng==std::string::npos){ max=i; }
if (cutChars > 0) { if (min==std::string::npos || max==std::string::npos) { return ""; }
cuttedTextNative = cuttedTextNative.substr(0, cuttedTextNative.length() - cutChars); return str.substr(min,max-min);
std::stringstream sstrText2; }
sstrText2 << cuttedTextNative << "...";
cuttedText = sstrText2.str(); std::string CutText(std::string text, int width, const cFont *font) {
} int actWidth = font->Width(text.c_str());
if (actWidth <= width) {
return text.c_str();
} else {
int i = std::max(width / font->Size(), 1) - 1;
std::string cuttext, oldtext;
cuttext = utf8_substr(text, 0, i);
do {
oldtext = cuttext;
i++;
cuttext = utf8_substr(text, 0, i);
std::stringstream sstrText;
sstrText << cuttext << "...";
actWidth = font->Width(sstrText.str().c_str());
}
while (actWidth < width);
std::stringstream sstrText2;
sstrText2 << oldtext << "...";
return sstrText2.str();
} }
return cuttedText;
} }
/**************************************************************************************** /****************************************************************************************
@@ -113,7 +129,6 @@ void ReadRecordingDirectories(std::vector<std::string> *folders, cList<cNestedIt
} }
} }
/**************************************************************************************** /****************************************************************************************
* DrawRoundedCorners * DrawRoundedCorners
****************************************************************************************/ ****************************************************************************************/
@@ -419,8 +434,8 @@ ALGORITHM
******************************************************************************/ ******************************************************************************/
int afuzzy_checkSUB(const char *t, AFUZZY *fuzzy) int afuzzy_checkSUB(const char *t, AFUZZY *fuzzy)
{ {
register char c; char c;
register int j, d; 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)
@@ -434,7 +449,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 (register int j = 0 ... */ } /* end for (int j = 0 ... */
return 0; return 0;
} }
@@ -458,16 +473,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 (register int j = 0 ... */ } /* end for (int j = 0 ... */
return 0; return 0;
} }
int afuzzy_checkFLT(const char *t, AFUZZY *fuzzy) int afuzzy_checkFLT(const char *t, AFUZZY *fuzzy)
{ {
register Uint FilterR = 0; Uint FilterR = 0;
register Uint FilterR1; Uint FilterR1;
register int j; int j;
for (j = 0; t[j] != '\0'; j++) for (j = 0; t[j] != '\0'; j++)
{ {
@@ -476,7 +491,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 (register int j = 0 ... */ } /* end for (int j = 0 ... */
return 0; return 0;
} }

View File

@@ -9,6 +9,7 @@
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,6 +12,7 @@
#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"
@@ -26,7 +27,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.2.10"; static const char *VERSION = "1.3.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";
@@ -93,6 +94,10 @@ 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(); config.SetDefaultPathes();
config.LoadTheme(); config.LoadTheme();

View File

@@ -33,14 +33,12 @@ cTvGuideOsd::~cTvGuideOsd() {
delete recMenuView; delete recMenuView;
if (channelJumper) if (channelJumper)
delete channelJumper; delete channelJumper;
osdManager.deleteOsd(); osdManager.DeleteOsd();
} }
void cTvGuideOsd::Show(void) { void cTvGuideOsd::Show(void) {
int start = cTimeMs::Now(); int start = cTimeMs::Now();
bool ok = false; if (osdManager.CreateOsd()) {
ok = osdManager.setOsd();
if (ok) {
bool themeChanged = config.LoadTheme(); bool themeChanged = config.LoadTheme();
config.SetStyle(); config.SetStyle();
config.setDynamicValues(); config.setDynamicValues();
@@ -51,7 +49,7 @@ void cTvGuideOsd::Show(void) {
imgCache.Clear(); imgCache.Clear();
imgCache.CreateCache(); imgCache.CreateCache();
} }
osdManager.setBackground(); osdManager.SetBackground();
timeManager = new cTimeManager(); timeManager = new cTimeManager();
timeManager->Now(); timeManager->Now();
SwitchTimers.Load(AddDirectory(cPlugin::ConfigDirectory("epgsearch"), "epgsearchswitchtimers.conf")); SwitchTimers.Load(AddDirectory(cPlugin::ConfigDirectory("epgsearch"), "epgsearchswitchtimers.conf"));
@@ -112,23 +110,23 @@ void cTvGuideOsd::drawOsd() {
statusHeader->ScaleVideo(); statusHeader->ScaleVideo();
} }
timeLine = new cTimeLine(timeManager); timeLine = new cTimeLine(timeManager);
timeLine->drawDateViewer(); timeLine->DrawDateViewer();
timeLine->drawTimeline(); timeLine->DrawTimeline();
timeLine->drawClock(); timeLine->DrawClock();
channelGroups = new cChannelGroups(); channelGroups = new cChannelGroups();
channelGroups->ReadChannelGroups(); channelGroups->ReadChannelGroups();
footer = new cFooter(channelGroups); footer = new cFooter(channelGroups);
recMenuView->SetFooter(footer); recMenuView->AddFooter(footer);
footer->drawRedButton(); footer->drawRedButton();
if (config.channelJumpMode == eNumJump) { if (config.channelJumpMode == eNumJump) {
footer->drawGreenButton(); footer->drawGreenButton();
footer->drawYellowButton(); footer->drawYellowButton();
} }
footer->drawBlueButton(false); footer->drawBlueButton(false);
osdManager.flush(); osdManager.Flush();
readChannels(newStartChannel); readChannels(newStartChannel);
drawGridsChannelJump(offset); drawGridsChannelJump(offset);
osdManager.flush(); osdManager.Flush();
cPixmap::Unlock(); cPixmap::Unlock();
} }
@@ -195,7 +193,7 @@ void cTvGuideOsd::drawGridsChannelJump(int offset) {
} }
} }
void cTvGuideOsd::drawGridsTimeJump() { void cTvGuideOsd::drawGridsTimeJump(bool last) {
if (columns.Count() == 0) if (columns.Count() == 0)
return; return;
cChannelEpg *colActive = NULL; cChannelEpg *colActive = NULL;
@@ -209,7 +207,7 @@ void cTvGuideOsd::drawGridsTimeJump() {
column->readGrids(); column->readGrids();
column->drawGrids(); column->drawGrids();
} }
activeGrid = colActive->getActive(); activeGrid = colActive->getActive(last);
if (activeGrid) { if (activeGrid) {
activeGrid->SetActive(); activeGrid->SetActive();
activeGrid->Draw(); activeGrid->Draw();
@@ -289,7 +287,7 @@ void cTvGuideOsd::channelForward() {
if (activeGrid && (config.channelJumpMode == eGroupJump)) { if (activeGrid && (config.channelJumpMode == eGroupJump)) {
footer->UpdateGroupButtons(activeGrid->column->getChannel()); footer->UpdateGroupButtons(activeGrid->column->getChannel());
} }
osdManager.flush(); osdManager.Flush();
} }
void cTvGuideOsd::channelBack() { void cTvGuideOsd::channelBack() {
@@ -347,12 +345,12 @@ void cTvGuideOsd::channelBack() {
if (activeGrid && (config.channelJumpMode == eGroupJump)) { if (activeGrid && (config.channelJumpMode == eGroupJump)) {
footer->UpdateGroupButtons(activeGrid->column->getChannel()); footer->UpdateGroupButtons(activeGrid->column->getChannel());
} }
osdManager.flush(); osdManager.Flush();
} }
void cTvGuideOsd::timeForward() { void cTvGuideOsd::timeForward() {
bool actionDone = false; bool actionDone = false;
if ( (timeManager->GetEnd() - activeGrid->EndTime())/60 < 30 ) { if ((timeManager->GetEnd() - activeGrid->EndTime())/60 < 30 ) {
ScrollForward(); ScrollForward();
actionDone = true; actionDone = true;
} }
@@ -367,24 +365,30 @@ void cTvGuideOsd::timeForward() {
if (!actionDone) { if (!actionDone) {
ScrollForward(); ScrollForward();
} }
osdManager.flush(); osdManager.Flush();
} }
void cTvGuideOsd::ScrollForward() { void cTvGuideOsd::ScrollForward() {
timeManager->AddStep(config.stepMinutes); timeManager->AddStep(config.stepMinutes);
timeLine->drawDateViewer(); if (config.useHWAccel) {
timeLine->drawClock(); drawGridsTimeJump(true);
timeLine->setTimeline(); timeLine->DrawDateViewer();
for (cChannelEpg *column = columns.First(); column; column = columns.Next(column)) { timeLine->DrawClock();
column->AddNewGridsAtEnd(); timeLine->DrawTimeline();
column->ClearOutdatedStart(); } else {
column->drawGrids(); timeLine->DrawDateViewer();
timeLine->DrawTimeline();
for (cChannelEpg *column = columns.First(); column; column = columns.Next(column)) {
column->AddNewGridsAtEnd();
column->ClearOutdatedStart();
column->drawGrids();
}
} }
} }
void cTvGuideOsd::timeBack() { void cTvGuideOsd::timeBack() {
bool actionDone = false; bool actionDone = false;
if ( (activeGrid->StartTime() - timeManager->GetStart())/60 < 30 ) { if ((activeGrid->StartTime() - timeManager->GetStart())/60 < 30 ) {
ScrollBack(); ScrollBack();
actionDone = true; actionDone = true;
} }
@@ -400,21 +404,25 @@ void cTvGuideOsd::timeBack() {
if (!actionDone) { if (!actionDone) {
ScrollBack(); ScrollBack();
} }
osdManager.flush(); osdManager.Flush();
} }
void cTvGuideOsd::ScrollBack() { void cTvGuideOsd::ScrollBack() {
bool tooFarInPast = timeManager->DelStep(config.stepMinutes); timeManager->DelStep(config.stepMinutes);
if (tooFarInPast) if (config.useHWAccel) {
return; drawGridsTimeJump();
timeLine->drawDateViewer(); timeLine->DrawDateViewer();
timeLine->drawClock(); timeLine->DrawClock();
timeLine->setTimeline(); timeLine->DrawTimeline();
for (cChannelEpg *column = columns.First(); column; column = columns.Next(column)) { } else {
column->AddNewGridsAtStart(); timeLine->DrawDateViewer();
column->ClearOutdatedEnd(); timeLine->DrawTimeline();
column->drawGrids(); for (cChannelEpg *column = columns.First(); column; column = columns.Next(column)) {
} column->AddNewGridsAtStart();
column->ClearOutdatedEnd();
column->drawGrids();
}
}
} }
void cTvGuideOsd::processKeyUp() { void cTvGuideOsd::processKeyUp() {
@@ -460,7 +468,7 @@ void cTvGuideOsd::processKeyRight() {
} }
void cTvGuideOsd::processKeyRed() { void cTvGuideOsd::processKeyRed() {
if ((activeGrid == NULL) || activeGrid->isDummy()) if ((activeGrid == NULL) || activeGrid->IsDummy())
return; return;
recMenuView->Start(activeGrid->GetEvent()); recMenuView->Start(activeGrid->GetEvent());
} }
@@ -508,7 +516,7 @@ void cTvGuideOsd::processKeyGreen() {
else else
drawGridsChannelJump(currentCol); drawGridsChannelJump(currentCol);
} }
osdManager.flush(); osdManager.Flush();
} }
} }
@@ -558,7 +566,7 @@ void cTvGuideOsd::processKeyYellow() {
else else
drawGridsChannelJump(currentCol); drawGridsChannelJump(currentCol);
} }
osdManager.flush(); osdManager.Flush();
} }
} }
@@ -605,13 +613,13 @@ eOSState cTvGuideOsd::ChannelSwitch(bool *alreadyUnlocked) {
} }
void cTvGuideOsd::DetailedEPG() { void cTvGuideOsd::DetailedEPG() {
if (!activeGrid->isDummy()) { if (!activeGrid->IsDummy()) {
detailViewActive = true; detailViewActive = true;
detailView = new cDetailView(activeGrid->GetEvent(), footer); detailView = new cDetailView(activeGrid->GetEvent(), footer);
footer->SetDetailedViewMode(); footer->SetDetailedViewMode();
osdManager.flush(); osdManager.Flush();
detailView->Start(); detailView->Start();
osdManager.flush(); osdManager.Flush();
} }
} }
@@ -628,24 +636,20 @@ void cTvGuideOsd::processNumKey(int numKey) {
void cTvGuideOsd::TimeJump(int mode) { void cTvGuideOsd::TimeJump(int mode) {
switch (mode) { switch (mode) {
case 1: { case 1: {
bool tooFarInPast = timeManager->DelStep(config.bigStepHours*60); timeManager->DelStep(((config.displayMode == eVertical) ? config.bigStepHours : config.bigStepHoursHorizontal) * 60);
if (tooFarInPast) }
return;
}
break; break;
case 3: { case 3: {
timeManager->AddStep(config.bigStepHours*60); timeManager->AddStep(((config.displayMode == eVertical) ? config.bigStepHours : config.bigStepHoursHorizontal) * 60);
} }
break; break;
case 4: { case 4: {
bool tooFarInPast = timeManager->DelStep(config.hugeStepHours*60); timeManager->DelStep(((config.displayMode == eVertical) ? config.hugeStepHours : config.hugeStepHoursHorizontal) * 60);
if (tooFarInPast) }
return;
}
break; break;
case 6: { case 6: {
timeManager->AddStep(config.hugeStepHours*60); timeManager->AddStep(((config.displayMode == eVertical) ? config.hugeStepHours : config.hugeStepHoursHorizontal) * 60);
} }
break; break;
case 7: { case 7: {
cTimeManager primeChecker; cTimeManager primeChecker;
@@ -654,22 +658,22 @@ void cTvGuideOsd::TimeJump(int mode) {
if (primeChecker.tooFarInPast(prevPrime)) if (primeChecker.tooFarInPast(prevPrime))
return; return;
timeManager->SetTime(prevPrime); timeManager->SetTime(prevPrime);
} }
break; break;
case 9: { case 9: {
cTimeManager primeChecker; cTimeManager primeChecker;
time_t nextPrime = primeChecker.getNextPrimetime(timeManager->GetStart()); time_t nextPrime = primeChecker.getNextPrimetime(timeManager->GetStart());
timeManager->SetTime(nextPrime); timeManager->SetTime(nextPrime);
} }
break; break;
default: default:
return; return;
} }
drawGridsTimeJump(); drawGridsTimeJump();
timeLine->drawDateViewer(); timeLine->DrawDateViewer();
timeLine->drawClock(); timeLine->DrawClock();
timeLine->setTimeline(); timeLine->DrawTimeline();
osdManager.flush(); osdManager.Flush();
} }
int cTvGuideOsd::GetLastValidChannel(void) { int cTvGuideOsd::GetLastValidChannel(void) {
@@ -683,7 +687,7 @@ void cTvGuideOsd::ChannelJump(int num) {
} }
channelJumper->Set(num); channelJumper->Set(num);
channelJumper->DrawText(); channelJumper->DrawText();
osdManager.flush(); osdManager.Flush();
} }
void cTvGuideOsd::CheckTimeout(void) { void cTvGuideOsd::CheckTimeout(void) {
@@ -708,7 +712,7 @@ void cTvGuideOsd::CheckTimeout(void) {
drawGridsChannelJump(); drawGridsChannelJump();
} }
} }
osdManager.flush(); osdManager.Flush();
} }
} }
@@ -722,11 +726,11 @@ eOSState cTvGuideOsd::ProcessKey(eKeys Key) {
eOSState state = osContinue; eOSState state = osContinue;
cPixmap::Lock(); cPixmap::Lock();
bool alreadyUnlocked = false; bool alreadyUnlocked = false;
if (recMenuView->isActive()) { if (recMenuView->IsActive()) {
state = recMenuView->ProcessKey(Key); state = recMenuView->ProcessKey(Key);
if (state == osEnd) { if (state == osEnd) {
SetTimers(); SetTimers();
osdManager.flush(); osdManager.Flush();
} }
state = osContinue; state = osContinue;
} else if (detailViewActive) { } else if (detailViewActive) {
@@ -742,7 +746,7 @@ eOSState cTvGuideOsd::ProcessKey(eKeys Key) {
if ((config.blueKeyMode == eBlueKeySwitch) || (config.blueKeyMode == eBlueKeyFavorites)) { if ((config.blueKeyMode == eBlueKeySwitch) || (config.blueKeyMode == eBlueKeyFavorites)) {
state = ChannelSwitch(&alreadyUnlocked); state = ChannelSwitch(&alreadyUnlocked);
} else { } else {
osdManager.flush(); osdManager.Flush();
state = osContinue; state = osContinue;
} }
} else if ((Key & ~k_Repeat) == kOk && (config.blueKeyMode == eBlueKeyEPG)) { } else if ((Key & ~k_Repeat) == kOk && (config.blueKeyMode == eBlueKeyEPG)) {
@@ -756,7 +760,7 @@ eOSState cTvGuideOsd::ProcessKey(eKeys Key) {
delete detailView; delete detailView;
detailView = NULL; detailView = NULL;
detailViewActive = false; detailViewActive = false;
osdManager.flush(); osdManager.Flush();
state = osContinue; state = osContinue;
} }
} }
@@ -771,11 +775,18 @@ eOSState cTvGuideOsd::ProcessKey(eKeys Key) {
case kYellow: processKeyYellow(); break; case kYellow: processKeyYellow(); break;
case kBlue: state = processKeyBlue(&alreadyUnlocked); break; case kBlue: state = processKeyBlue(&alreadyUnlocked); break;
case kOk: state = processKeyOk(&alreadyUnlocked); break; case kOk: state = processKeyOk(&alreadyUnlocked); break;
case kBack: state=osEnd; break; case kBack: state = osEnd; break;
case k0 ... k9: processNumKey(Key - k0); break; case k0 ... k9: processNumKey(Key - k0); break;
case kFastRew: TimeJump(1); break; // Doesnt work, if used from timeshiftmode
case kFastFwd: TimeJump(3); break;
case kPrev: TimeJump(4); break;
case kNext: TimeJump(6); break;
case kNone: if (channelJumper) CheckTimeout(); break; case kNone: if (channelJumper) CheckTimeout(); break;
default: break; default: break;
} }
if (timeLine->DrawClock()) {
osdManager.Flush();
}
} }
if (!alreadyUnlocked) { if (!alreadyUnlocked) {
cPixmap::Unlock(); cPixmap::Unlock();

View File

@@ -31,7 +31,7 @@ private:
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();

106
view.c
View File

@@ -5,7 +5,7 @@
* cView * cView
********************************************************************************************/ ********************************************************************************************/
cView::cView(void) { cView::cView(void) : cThread("View") {
activeView = 0; activeView = 0;
scrollable = false; scrollable = false;
tabbed = false; tabbed = false;
@@ -41,19 +41,19 @@ cView::cView(void) {
cView::~cView(void) { cView::~cView(void) {
if (pixmapBackground) if (pixmapBackground)
osdManager.releasePixmap(pixmapBackground); osdManager.DestroyPixmap(pixmapBackground);
if (pixmapHeader) if (pixmapHeader)
delete pixmapHeader; delete pixmapHeader;
if (pixmapHeaderLogo) if (pixmapHeaderLogo)
osdManager.releasePixmap(pixmapHeaderLogo); osdManager.DestroyPixmap(pixmapHeaderLogo);
if (pixmapContent) if (pixmapContent)
osdManager.releasePixmap(pixmapContent); osdManager.DestroyPixmap(pixmapContent);
if (pixmapTabs) if (pixmapTabs)
osdManager.releasePixmap(pixmapTabs); osdManager.DestroyPixmap(pixmapTabs);
if (pixmapScrollbar) if (pixmapScrollbar)
osdManager.releasePixmap(pixmapScrollbar); osdManager.DestroyPixmap(pixmapScrollbar);
if (pixmapScrollbarBack) if (pixmapScrollbarBack)
osdManager.releasePixmap(pixmapScrollbarBack); osdManager.DestroyPixmap(pixmapScrollbarBack);
if (imgScrollBar) if (imgScrollBar)
delete imgScrollBar; delete imgScrollBar;
} }
@@ -81,11 +81,11 @@ void cView::SetGeometry(void) {
void cView::DrawHeader(void) { void cView::DrawHeader(void) {
if (!pixmapHeader) { if (!pixmapHeader) {
pixmapHeader = new cStyledPixmap(osdManager.requestPixmap(5, cRect(0, 0, headerWidth, headerHeight))); pixmapHeader = new cStyledPixmap(osdManager.CreatePixmap(5, cRect(0, 0, headerWidth, headerHeight)));
pixmapHeader->setColor(theme.Color(clrHeader), theme.Color(clrHeaderBlending)); pixmapHeader->setColor(theme.Color(clrHeader), theme.Color(clrHeaderBlending));
} }
if (!pixmapHeaderLogo) { if (!pixmapHeaderLogo) {
pixmapHeaderLogo = osdManager.requestPixmap(6, cRect(0, 0, width, headerHeight)); pixmapHeaderLogo = osdManager.CreatePixmap(6, cRect(0, 0, width, headerHeight));
} }
pixmapHeader->Fill(clrTransparent); pixmapHeader->Fill(clrTransparent);
pixmapHeaderLogo->Fill(clrTransparent); pixmapHeaderLogo->Fill(clrTransparent);
@@ -108,17 +108,24 @@ void cView::DrawHeader(void) {
if (imgLoader.LoadLogo(channel, logoWidth, logoHeight)) { if (imgLoader.LoadLogo(channel, logoWidth, logoHeight)) {
cImage logo = imgLoader.GetImage(); cImage logo = imgLoader.GetImage();
const int logoheight = logo.Height(); const int logoheight = logo.Height();
pixmapHeaderLogo->DrawImage(cPoint(border / 2, ((headerHeight - logoHeight) / 2 + (logoHeight - logoheight) / 2)), logo); const int logowidth = logo.Width();
pixmapHeaderLogo->DrawImage(cPoint(xText + ((logoWidth - logowidth) / 2), ((headerHeight - logoheight) / 2)), logo);
xText += logoWidth + border / 2; xText += logoWidth + border / 2;
} }
} }
//Date and Time, Title, Subtitle //Date and Time, Title, Subtitle
int textWidthMax = headerWidth - xText - border / 2;
wrapper.Set(title.c_str(), fontHeaderLarge, textWidthMax);
int lineHeight = fontHeaderLarge->Height();
int textLines = wrapper.Lines();
int yDateTime = border / 2; int yDateTime = border / 2;
int yTitle = (headerHeight - fontHeaderLarge->Height()) / 2; int yTitle = (headerHeight - textLines * lineHeight) / 2;
int ySubtitle = headerHeight - fontHeader->Height() - border / 3; int ySubtitle = headerHeight - fontHeader->Height() - border / 3;
int textWidthMax = headerWidth - xText;
pixmapHeader->DrawText(cPoint(xText, yDateTime), CutText(dateTime, textWidthMax, fontHeader).c_str(), theme.Color(clrFont), theme.Color(clrStatusHeader), fontHeader); pixmapHeader->DrawText(cPoint(xText, yDateTime), CutText(dateTime, textWidthMax, fontHeader).c_str(), theme.Color(clrFont), theme.Color(clrStatusHeader), fontHeader);
pixmapHeader->DrawText(cPoint(xText, yTitle), CutText(title, textWidthMax, fontHeaderLarge).c_str(), theme.Color(clrFont), theme.Color(clrStatusHeader), fontHeaderLarge); for (int i = 0; i < textLines; i++) {
pixmapHeader->DrawText(cPoint(xText, yTitle + i * lineHeight), wrapper.GetLine(i), theme.Color(clrFont), theme.Color(clrStatusHeader), fontHeaderLarge);
}
pixmapHeader->DrawText(cPoint(xText, ySubtitle), CutText(subTitle, textWidthMax, fontHeader).c_str(), theme.Color(clrFont), theme.Color(clrStatusHeader), fontHeader); pixmapHeader->DrawText(cPoint(xText, ySubtitle), CutText(subTitle, textWidthMax, fontHeader).c_str(), theme.Color(clrFont), theme.Color(clrStatusHeader), fontHeader);
//REC Icon //REC Icon
eTimerMatch timerMatch = tmNone; eTimerMatch timerMatch = tmNone;
@@ -161,7 +168,7 @@ void cView::DrawHeader(void) {
void cView::DrawTabs(void) { void cView::DrawTabs(void) {
if (!pixmapTabs) { if (!pixmapTabs) {
pixmapTabs = osdManager.requestPixmap(4, cRect(0, y + headerHeight + contentHeight, width + scrollbarWidth, tabHeight)); pixmapTabs = osdManager.CreatePixmap(4, cRect(0, y + headerHeight + contentHeight, width + scrollbarWidth, tabHeight));
} }
tColor bgColor = theme.Color(clrTabInactive); tColor bgColor = theme.Color(clrTabInactive);
pixmapTabs->Fill(clrTransparent); pixmapTabs->Fill(clrTransparent);
@@ -188,18 +195,18 @@ void cView::DrawTabs(void) {
void cView::ClearContent(void) { void cView::ClearContent(void) {
if (pixmapContent && Running()) { if (pixmapContent && Running()) {
osdManager.releasePixmap(pixmapContent); osdManager.DestroyPixmap(pixmapContent);
pixmapContent = NULL; pixmapContent = NULL;
} }
if (pixmapBackground && Running()) { if (pixmapBackground && Running()) {
osdManager.releasePixmap(pixmapBackground); osdManager.DestroyPixmap(pixmapBackground);
pixmapBackground = NULL; pixmapBackground = NULL;
} }
} }
void cView::CreateContent(int fullHeight) { void cView::CreateContent(int fullHeight) {
scrollable = false; scrollable = false;
pixmapBackground = osdManager.requestPixmap(3, cRect(x, y + headerHeight, width + scrollbarWidth, contentHeight + tabHeight)); pixmapBackground = osdManager.CreatePixmap(3, cRect(x, y + headerHeight, width + scrollbarWidth, contentHeight + tabHeight));
pixmapBackground->Fill(theme.Color(clrBackground)); pixmapBackground->Fill(theme.Color(clrBackground));
int drawPortHeight = contentHeight; int drawPortHeight = contentHeight;
@@ -207,7 +214,7 @@ void cView::CreateContent(int fullHeight) {
drawPortHeight = fullHeight; drawPortHeight = fullHeight;
scrollable = true; scrollable = true;
} }
pixmapContent = osdManager.requestPixmap(4, cRect(x, y + headerHeight, width, contentHeight), cRect(0, 0, width, drawPortHeight)); pixmapContent = osdManager.CreatePixmap(4, cRect(x, y + headerHeight, width, contentHeight), cRect(0, 0, width, drawPortHeight));
pixmapContent->Fill(clrTransparent); pixmapContent->Fill(clrTransparent);
} }
@@ -216,7 +223,7 @@ void cView::DrawContent(std::string *text) {
wText.Set(text->c_str(), font, width - 2 * border); wText.Set(text->c_str(), font, width - 2 * border);
int lineHeight = font->Height(); int lineHeight = font->Height();
int textLines = wText.Lines(); int textLines = wText.Lines();
int textHeight = lineHeight * textLines + 2*border; int textHeight = lineHeight * textLines + 2 * border;
int yText = border; int yText = border;
CreateContent(textHeight); CreateContent(textHeight);
for (int i=0; i < textLines; i++) { for (int i=0; i < textLines; i++) {
@@ -246,18 +253,18 @@ void cView::DrawFloatingContent(std::string *infoText, cTvMedia *img, cTvMedia *
int lineHeight = font->Height(); int lineHeight = font->Height();
int textLinesTall = wTextTall.Lines(); int textLinesTall = wTextTall.Lines();
int textLinesFull = wTextFull.Lines(); int textLinesFull = wTextFull.Lines();
int textHeight = lineHeight * (textLinesTall + textLinesFull) + 2*border; int textHeight = lineHeight * (textLinesTall + textLinesFull) + 2 * border;
int yText = border; int yText = border;
CreateContent(max(textHeight, imgHeight + 2*border)); CreateContent(std::max(textHeight, imgHeight + 2 * border));
for (int i=0; i < textLinesTall; i++) { for (int i = 0; i < textLinesTall; i++) {
pixmapContent->DrawText(cPoint(border, yText), wTextTall.GetLine(i), theme.Color(clrFont), clrTransparent, font); pixmapContent->DrawText(cPoint(border, yText), wTextTall.GetLine(i), theme.Color(clrFont), clrTransparent, font);
yText += lineHeight; yText += lineHeight;
} }
for (int i=0; i < textLinesFull; i++) { for (int i = 0; i < textLinesFull; i++) {
pixmapContent->DrawText(cPoint(border, yText), wTextFull.GetLine(i), theme.Color(clrFont), clrTransparent, font); pixmapContent->DrawText(cPoint(border, yText), wTextFull.GetLine(i), theme.Color(clrFont), clrTransparent, font);
yText += lineHeight; yText += lineHeight;
} }
osdManager.flush(); osdManager.Flush();
cImageLoader imgLoader; cImageLoader imgLoader;
if (imgLoader.LoadPoster(img->path.c_str(), imgWidth, imgHeight)) { if (imgLoader.LoadPoster(img->path.c_str(), imgWidth, imgHeight)) {
if (Running() && pixmapContent) if (Running() && pixmapContent)
@@ -265,16 +272,16 @@ void cView::DrawFloatingContent(std::string *infoText, cTvMedia *img, cTvMedia *
} }
if (!img2) if (!img2)
return; return;
osdManager.flush(); osdManager.Flush();
if (imgLoader.LoadPoster(img2->path.c_str(), imgWidth2, imgHeight2)) { if (imgLoader.LoadPoster(img2->path.c_str(), imgWidth2, imgHeight2)) {
if (Running() && pixmapContent) if (Running() && pixmapContent)
pixmapContent->DrawImage(cPoint(width - imgWidth2 - border, imgHeight + 2*border), imgLoader.GetImage()); pixmapContent->DrawImage(cPoint(width - imgWidth2 - border, imgHeight + 2 * border), imgLoader.GetImage());
} }
} }
void cView::CreateFloatingTextWrapper(cTextWrapper *twNarrow, cTextWrapper *twFull, std::string *text, int widthImg, int heightImg) { void cView::CreateFloatingTextWrapper(cTextWrapper *twNarrow, cTextWrapper *twFull, std::string *text, int widthImg, int heightImg) {
int lineHeight = font->Height(); int lineHeight = font->Height();
int linesNarrow = (heightImg + 2*border)/ lineHeight; int linesNarrow = (heightImg + 2 * border)/ lineHeight;
int linesDrawn = 0; int linesDrawn = 0;
int y = 0; int y = 0;
int widthNarrow = width - 3 * border - widthImg; int widthNarrow = width - 3 * border - widthImg;
@@ -394,7 +401,7 @@ void cView::DrawActors(std::vector<cActor> *actors) {
} }
actor++; actor++;
} }
osdManager.flush(); osdManager.Flush();
x = 0; x = 0;
y += thumbHeight + 2 * fontSmall->Height() + border + border/2; y += thumbHeight + 2 * fontSmall->Height() + border + border/2;
} }
@@ -420,11 +427,11 @@ void cView::DrawScrollbar(void) {
return; return;
if (!pixmapScrollbar) { if (!pixmapScrollbar) {
pixmapScrollbar = osdManager.requestPixmap(6, cRect(width, y + headerHeight, scrollbarWidth, contentHeight)); pixmapScrollbar = osdManager.CreatePixmap(6, cRect(width, y + headerHeight, scrollbarWidth, contentHeight));
pixmapScrollbar->Fill(clrTransparent); pixmapScrollbar->Fill(clrTransparent);
} }
if (!pixmapScrollbarBack) { if (!pixmapScrollbarBack) {
pixmapScrollbarBack = osdManager.requestPixmap(5, cRect(width, y + headerHeight, scrollbarWidth, contentHeight)); pixmapScrollbarBack = osdManager.CreatePixmap(5, cRect(width, y + headerHeight, scrollbarWidth, contentHeight));
pixmapScrollbarBack->Fill(clrTransparent); pixmapScrollbarBack->Fill(clrTransparent);
} }
@@ -481,7 +488,6 @@ bool cView::KeyUp(void) {
if (!scrollable) if (!scrollable)
return false; return false;
int aktHeight = pixmapContent->DrawPort().Point().Y(); int aktHeight = pixmapContent->DrawPort().Point().Y();
// int lineHeight = font->Height();
if (aktHeight >= 0) { if (aktHeight >= 0) {
return false; return false;
} }
@@ -522,7 +528,7 @@ cEPGView::cEPGView(void) : cView() {
} }
cEPGView::~cEPGView(void) { cEPGView::~cEPGView(void) {
Cancel(-1); Cancel(2);
while (Active()) while (Active())
cCondWait::SleepMs(10); cCondWait::SleepMs(10);
} }
@@ -581,7 +587,7 @@ void cEPGView::DrawImages(void) {
if (drawPic) { if (drawPic) {
pixmapContent->DrawImage(cPoint((width - imgWidth) / 2, yPic), imgLoader.GetImage()); pixmapContent->DrawImage(cPoint((width - imgWidth) / 2, yPic), imgLoader.GetImage());
yPic += imgHeight + border; yPic += imgHeight + border;
osdManager.flush(); osdManager.Flush();
} }
} }
} }
@@ -606,7 +612,7 @@ void cEPGView::Action(void) {
ClearContent(); ClearContent();
if (!headerDrawn) { if (!headerDrawn) {
DrawHeader(); DrawHeader();
osdManager.flush(); osdManager.Flush();
headerDrawn = true; headerDrawn = true;
} }
if (tabs.size() == 0) { if (tabs.size() == 0) {
@@ -626,7 +632,7 @@ void cEPGView::Action(void) {
break; break;
} }
DrawScrollbar(); DrawScrollbar();
osdManager.flush(); osdManager.Flush();
} }
/******************************************************************************************** /********************************************************************************************
@@ -641,7 +647,7 @@ cSeriesView::cSeriesView(int seriesId, int episodeId) : cView() {
} }
cSeriesView::~cSeriesView(void) { cSeriesView::~cSeriesView(void) {
Cancel(-1); Cancel(3);
while (Active()) while (Active())
cCondWait::SleepMs(10); cCondWait::SleepMs(10);
} }
@@ -749,32 +755,32 @@ void cSeriesView::DrawImages(void) {
if (imgLoader.LoadPoster(series.banners[i].path.c_str(), series.banners[i].width, series.banners[i].height) && Running()) { if (imgLoader.LoadPoster(series.banners[i].path.c_str(), series.banners[i].width, series.banners[i].height) && Running()) {
pixmapContent->DrawImage(cPoint((width - series.banners[i].width) / 2, yPic), imgLoader.GetImage()); pixmapContent->DrawImage(cPoint((width - series.banners[i].width) / 2, yPic), imgLoader.GetImage());
yPic += series.banners[i].height + border; yPic += series.banners[i].height + border;
osdManager.flush(); osdManager.Flush();
} }
} }
if (imgLoader.LoadPoster(series.fanarts[i].path.c_str(), fanartWidth, fanartHeight) && Running()) { if (imgLoader.LoadPoster(series.fanarts[i].path.c_str(), fanartWidth, fanartHeight) && Running()) {
pixmapContent->DrawImage(cPoint((width - fanartWidth)/2, yPic), imgLoader.GetImage()); pixmapContent->DrawImage(cPoint((width - fanartWidth)/2, yPic), imgLoader.GetImage());
yPic += fanartHeight + border; yPic += fanartHeight + border;
osdManager.flush(); osdManager.Flush();
} }
} }
if (numPosters >= 1) { if (numPosters >= 1) {
if (imgLoader.LoadPoster(series.posters[0].path.c_str(), posterWidth, posterHeight) && Running()) { if (imgLoader.LoadPoster(series.posters[0].path.c_str(), posterWidth, posterHeight) && Running()) {
pixmapContent->DrawImage(cPoint(border, yPic), imgLoader.GetImage()); pixmapContent->DrawImage(cPoint(border, yPic), imgLoader.GetImage());
osdManager.flush(); osdManager.Flush();
yPic += posterHeight + border; yPic += posterHeight + border;
} }
} }
if (numPosters >= 2) { if (numPosters >= 2) {
if (imgLoader.LoadPoster(series.posters[1].path.c_str(), posterWidth, posterHeight) && Running()) { if (imgLoader.LoadPoster(series.posters[1].path.c_str(), posterWidth, posterHeight) && Running()) {
pixmapContent->DrawImage(cPoint(2 * border + posterWidth, yPic - posterHeight - border), imgLoader.GetImage()); pixmapContent->DrawImage(cPoint(2 * border + posterWidth, yPic - posterHeight - border), imgLoader.GetImage());
osdManager.flush(); osdManager.Flush();
} }
} }
if (numPosters == 3) { if (numPosters == 3) {
if (imgLoader.LoadPoster(series.posters[2].path.c_str(), posterWidth, posterHeight) && Running()) { if (imgLoader.LoadPoster(series.posters[2].path.c_str(), posterWidth, posterHeight) && Running()) {
pixmapContent->DrawImage(cPoint((width - posterWidth) / 2, yPic), imgLoader.GetImage()); pixmapContent->DrawImage(cPoint((width - posterWidth) / 2, yPic), imgLoader.GetImage());
osdManager.flush(); osdManager.Flush();
} }
} }
} }
@@ -808,7 +814,7 @@ void cSeriesView::Action(void) {
ClearContent(); ClearContent();
if (!headerDrawn) { if (!headerDrawn) {
DrawHeader(); DrawHeader();
osdManager.flush(); osdManager.Flush();
headerDrawn = true; headerDrawn = true;
} }
if (tabs.size() == 0) { if (tabs.size() == 0) {
@@ -850,7 +856,7 @@ void cSeriesView::Action(void) {
break; break;
} }
DrawScrollbar(); DrawScrollbar();
osdManager.flush(); osdManager.Flush();
} }
/******************************************************************************************** /********************************************************************************************
@@ -863,7 +869,7 @@ cMovieView::cMovieView(int movieId) : cView() {
} }
cMovieView::~cMovieView(void) { cMovieView::~cMovieView(void) {
Cancel(-1); Cancel(3);
while (Active()) while (Active())
cCondWait::SleepMs(10); cCondWait::SleepMs(10);
} }
@@ -976,28 +982,28 @@ void cMovieView::DrawImages(void) {
if (imgLoader.LoadPoster(movie.fanart.path.c_str(), fanartWidth, fanartHeight) && Running()) { if (imgLoader.LoadPoster(movie.fanart.path.c_str(), fanartWidth, fanartHeight) && Running()) {
pixmapContent->DrawImage(cPoint((width - fanartWidth)/2, yPic), imgLoader.GetImage()); pixmapContent->DrawImage(cPoint((width - fanartWidth)/2, yPic), imgLoader.GetImage());
yPic += fanartHeight + border; yPic += fanartHeight + border;
osdManager.flush(); osdManager.Flush();
} }
} }
if (movie.collectionFanart.width > 0 && movie.collectionFanart.height > 0 && movie.collectionFanart.path.size() > 0) { if (movie.collectionFanart.width > 0 && movie.collectionFanart.height > 0 && movie.collectionFanart.path.size() > 0) {
if (imgLoader.LoadPoster(movie.collectionFanart.path.c_str(), collectionFanartWidth, collectionFanartHeight) && Running()) { if (imgLoader.LoadPoster(movie.collectionFanart.path.c_str(), collectionFanartWidth, collectionFanartHeight) && Running()) {
pixmapContent->DrawImage(cPoint((width - collectionFanartWidth)/2, yPic), imgLoader.GetImage()); pixmapContent->DrawImage(cPoint((width - collectionFanartWidth)/2, yPic), imgLoader.GetImage());
yPic += collectionFanartHeight + border; yPic += collectionFanartHeight + border;
osdManager.flush(); osdManager.Flush();
} }
} }
if (movie.poster.width > 0 && movie.poster.height > 0 && movie.poster.path.size() > 0) { if (movie.poster.width > 0 && movie.poster.height > 0 && movie.poster.path.size() > 0) {
if (imgLoader.LoadPoster(movie.poster.path.c_str(), movie.poster.width, movie.poster.height) && Running()) { if (imgLoader.LoadPoster(movie.poster.path.c_str(), movie.poster.width, movie.poster.height) && Running()) {
pixmapContent->DrawImage(cPoint((width - movie.poster.width) / 2, yPic), imgLoader.GetImage()); pixmapContent->DrawImage(cPoint((width - movie.poster.width) / 2, yPic), imgLoader.GetImage());
yPic += movie.poster.height + border; yPic += movie.poster.height + border;
osdManager.flush(); osdManager.Flush();
} }
} }
if (movie.collectionPoster.width > 0 && movie.collectionPoster.height > 0 && movie.collectionPoster.path.size() > 0) { if (movie.collectionPoster.width > 0 && movie.collectionPoster.height > 0 && movie.collectionPoster.path.size() > 0) {
if (imgLoader.LoadPoster(movie.collectionPoster.path.c_str(), movie.collectionPoster.width, movie.collectionPoster.height) && Running()) { if (imgLoader.LoadPoster(movie.collectionPoster.path.c_str(), movie.collectionPoster.width, movie.collectionPoster.height) && Running()) {
pixmapContent->DrawImage(cPoint((width - movie.collectionPoster.width) / 2, yPic), imgLoader.GetImage()); pixmapContent->DrawImage(cPoint((width - movie.collectionPoster.width) / 2, yPic), imgLoader.GetImage());
yPic += movie.collectionPoster.height + border; yPic += movie.collectionPoster.height + border;
osdManager.flush(); osdManager.Flush();
} }
} }
} }
@@ -1022,7 +1028,7 @@ void cMovieView::Action(void) {
ClearContent(); ClearContent();
if (!headerDrawn) { if (!headerDrawn) {
DrawHeader(); DrawHeader();
osdManager.flush(); osdManager.Flush();
headerDrawn = true; headerDrawn = true;
} }
if (tabs.size() == 0) { if (tabs.size() == 0) {
@@ -1058,5 +1064,5 @@ void cMovieView::Action(void) {
break; break;
} }
DrawScrollbar(); DrawScrollbar();
osdManager.flush(); osdManager.Flush();
} }

1
view.h
View File

@@ -51,6 +51,7 @@ protected:
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;