diff options
author | louis <louis.braun@gmx.de> | 2013-07-15 17:27:55 +0200 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2013-07-15 17:27:55 +0200 |
commit | 30957bfb0f89ffa7cafaab36f25d5f83a582f196 (patch) | |
tree | abfa36033ea78048cb690b975f83986776064fc3 /tvguideosd.c | |
parent | e55b546078356966a5eb2fe8dfe7590f34a1432c (diff) | |
download | vdr-plugin-tvguide-30957bfb0f89ffa7cafaab36f25d5f83a582f196.tar.gz vdr-plugin-tvguide-30957bfb0f89ffa7cafaab36f25d5f83a582f196.tar.bz2 |
changed channel jump logic
Diffstat (limited to 'tvguideosd.c')
-rw-r--r-- | tvguideosd.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/tvguideosd.c b/tvguideosd.c index cbd364a..a0ac921 100644 --- a/tvguideosd.c +++ b/tvguideosd.c @@ -187,10 +187,10 @@ void cTvGuideOsd::readChannels(const cChannel *channelStart) { }
}
-void cTvGuideOsd::drawGridsChannelJump() {
+void cTvGuideOsd::drawGridsChannelJump(int offset) {
if (columns.Count() == 0)
return;
- activeGrid = columns.First()->getActive();
+ activeGrid = columns.Get(offset)->getActive();
if (activeGrid)
activeGrid->SetActive();
if (tvguideConfig.displayStatusHeader) {
@@ -465,6 +465,8 @@ void cTvGuideOsd::processKeyGreen() { return;
const cChannel *currentChannel = activeGrid->column->getChannel();
+ const cChannel *firstChannel = columns.First()->getChannel();
+ int currentCol = activeGrid->column->GetNum();
const cChannel *prev = NULL;
if (tvguideConfig.channelJumpMode == eGroupJump) {
@@ -474,7 +476,7 @@ void cTvGuideOsd::processKeyGreen() { }
} else if (tvguideConfig.channelJumpMode == eNumJump) {
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()) {
prev = channel;
i--;
@@ -486,7 +488,7 @@ void cTvGuideOsd::processKeyGreen() { if (prev) {
readChannels(prev);
if (columns.Count() > 0) {
- drawGridsChannelJump();
+ drawGridsChannelJump(currentCol);
}
osdManager.flush();
}
@@ -495,8 +497,9 @@ void cTvGuideOsd::processKeyGreen() { void cTvGuideOsd::processKeyYellow() {
if (activeGrid == NULL)
return;
-
const cChannel *currentChannel = activeGrid->column->getChannel();
+ int currentCol = activeGrid->column->GetNum();
+ const cChannel *firstChannel = columns.First()->getChannel();
const cChannel *next = NULL;
if (tvguideConfig.channelJumpMode == eGroupJump) {
@@ -506,7 +509,7 @@ void cTvGuideOsd::processKeyYellow() { }
} else if (tvguideConfig.channelJumpMode == eNumJump) {
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)) {
break;
}
@@ -522,7 +525,7 @@ void cTvGuideOsd::processKeyYellow() { if (next) {
readChannels(next);
if (columns.Count() > 0) {
- drawGridsChannelJump();
+ drawGridsChannelJump(currentCol);
}
osdManager.flush();
}
|