mirror of
https://projects.vdr-developer.org/git/vdr-plugin-tvguide.git
synced 2023-10-05 15:01:48 +02:00
changed channel jump logic
This commit is contained in:
parent
e55b546078
commit
30957bfb0f
1
HISTORY
1
HISTORY
@ -49,3 +49,4 @@ VDR Plugin 'tvguide' Revision History
|
|||||||
- display of additional EPG pictures in detailed epg view
|
- display of additional EPG pictures in detailed epg view
|
||||||
- Introduction of "Search & Recording" Menu
|
- Introduction of "Search & Recording" Menu
|
||||||
- added possibility to replace original VDR schedules menu
|
- added possibility to replace original VDR schedules menu
|
||||||
|
- changed channel jump logic
|
||||||
|
@ -357,7 +357,7 @@ void cChannelColumn::SetTimers() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void cChannelColumn::dumpGrids() {
|
void cChannelColumn::dumpGrids() {
|
||||||
esyslog("tvguide: ------Channel %s: %d entires ---------", channel->Name(), grids.Count());
|
esyslog("tvguide: ------Channel %s %d: %d entires ---------", channel->Name(), num, grids.Count());
|
||||||
int i=1;
|
int i=1;
|
||||||
for (cGrid *grid = grids.First(); grid; grid = grids.Next(grid)) {
|
for (cGrid *grid = grids.First(); grid; grid = grids.Next(grid)) {
|
||||||
esyslog("tvguide: grid %d: start: %s, stop: %s", i, *cMyTime::printTime(grid->StartTime()), *cMyTime::printTime(grid->EndTime()));
|
esyslog("tvguide: grid %d: start: %s, stop: %s", i, *cMyTime::printTime(grid->StartTime()), *cMyTime::printTime(grid->EndTime()));
|
||||||
|
17
tvguideosd.c
17
tvguideosd.c
@ -187,10 +187,10 @@ void cTvGuideOsd::readChannels(const cChannel *channelStart) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void cTvGuideOsd::drawGridsChannelJump() {
|
void cTvGuideOsd::drawGridsChannelJump(int offset) {
|
||||||
if (columns.Count() == 0)
|
if (columns.Count() == 0)
|
||||||
return;
|
return;
|
||||||
activeGrid = columns.First()->getActive();
|
activeGrid = columns.Get(offset)->getActive();
|
||||||
if (activeGrid)
|
if (activeGrid)
|
||||||
activeGrid->SetActive();
|
activeGrid->SetActive();
|
||||||
if (tvguideConfig.displayStatusHeader) {
|
if (tvguideConfig.displayStatusHeader) {
|
||||||
@ -465,6 +465,8 @@ void cTvGuideOsd::processKeyGreen() {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
const cChannel *currentChannel = activeGrid->column->getChannel();
|
const cChannel *currentChannel = activeGrid->column->getChannel();
|
||||||
|
const cChannel *firstChannel = columns.First()->getChannel();
|
||||||
|
int currentCol = activeGrid->column->GetNum();
|
||||||
const cChannel *prev = NULL;
|
const cChannel *prev = NULL;
|
||||||
|
|
||||||
if (tvguideConfig.channelJumpMode == eGroupJump) {
|
if (tvguideConfig.channelJumpMode == eGroupJump) {
|
||||||
@ -474,7 +476,7 @@ void cTvGuideOsd::processKeyGreen() {
|
|||||||
}
|
}
|
||||||
} else if (tvguideConfig.channelJumpMode == eNumJump) {
|
} else if (tvguideConfig.channelJumpMode == eNumJump) {
|
||||||
int i = tvguideConfig.jumpChannels + 1;
|
int i = tvguideConfig.jumpChannels + 1;
|
||||||
for (const cChannel *channel = currentChannel; channel; channel = Channels.Prev(channel)) {
|
for (const cChannel *channel = firstChannel; channel; channel = Channels.Prev(channel)) {
|
||||||
if (!channel->GroupSep()) {
|
if (!channel->GroupSep()) {
|
||||||
prev = channel;
|
prev = channel;
|
||||||
i--;
|
i--;
|
||||||
@ -486,7 +488,7 @@ void cTvGuideOsd::processKeyGreen() {
|
|||||||
if (prev) {
|
if (prev) {
|
||||||
readChannels(prev);
|
readChannels(prev);
|
||||||
if (columns.Count() > 0) {
|
if (columns.Count() > 0) {
|
||||||
drawGridsChannelJump();
|
drawGridsChannelJump(currentCol);
|
||||||
}
|
}
|
||||||
osdManager.flush();
|
osdManager.flush();
|
||||||
}
|
}
|
||||||
@ -495,8 +497,9 @@ void cTvGuideOsd::processKeyGreen() {
|
|||||||
void cTvGuideOsd::processKeyYellow() {
|
void cTvGuideOsd::processKeyYellow() {
|
||||||
if (activeGrid == NULL)
|
if (activeGrid == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const cChannel *currentChannel = activeGrid->column->getChannel();
|
const cChannel *currentChannel = activeGrid->column->getChannel();
|
||||||
|
int currentCol = activeGrid->column->GetNum();
|
||||||
|
const cChannel *firstChannel = columns.First()->getChannel();
|
||||||
const cChannel *next = NULL;
|
const cChannel *next = NULL;
|
||||||
|
|
||||||
if (tvguideConfig.channelJumpMode == eGroupJump) {
|
if (tvguideConfig.channelJumpMode == eGroupJump) {
|
||||||
@ -506,7 +509,7 @@ void cTvGuideOsd::processKeyYellow() {
|
|||||||
}
|
}
|
||||||
} else if (tvguideConfig.channelJumpMode == eNumJump) {
|
} else if (tvguideConfig.channelJumpMode == eNumJump) {
|
||||||
int i=0;
|
int i=0;
|
||||||
for (const cChannel *channel = currentChannel; channel; channel = Channels.Next(channel)) {
|
for (const cChannel *channel = firstChannel; channel; channel = Channels.Next(channel)) {
|
||||||
if (channelGroups->IsInLastGroup(channel)) {
|
if (channelGroups->IsInLastGroup(channel)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -522,7 +525,7 @@ void cTvGuideOsd::processKeyYellow() {
|
|||||||
if (next) {
|
if (next) {
|
||||||
readChannels(next);
|
readChannels(next);
|
||||||
if (columns.Count() > 0) {
|
if (columns.Count() > 0) {
|
||||||
drawGridsChannelJump();
|
drawGridsChannelJump(currentCol);
|
||||||
}
|
}
|
||||||
osdManager.flush();
|
osdManager.flush();
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@ private:
|
|||||||
bool detailViewActive;
|
bool detailViewActive;
|
||||||
void drawOsd();
|
void drawOsd();
|
||||||
void readChannels(const cChannel *channelStart);
|
void readChannels(const cChannel *channelStart);
|
||||||
void drawGridsChannelJump();
|
void drawGridsChannelJump(int offset = 0);
|
||||||
void drawGridsTimeJump();
|
void drawGridsTimeJump();
|
||||||
void processKeyUp();
|
void processKeyUp();
|
||||||
void processKeyDown();
|
void processKeyDown();
|
||||||
|
Loading…
Reference in New Issue
Block a user