[mythtv] Jump points and local overrides
roo.watt at gmail.com
Sun Jun 17 06:43:33 UTC 2007
After having a bit more of a poke around in the code I have a bit
better understanding, please correct me if I am wrong ;)
* It seems that a TRUE return from MythMainWindow::TranslateKeyPress
indicates that an action has been found for the key in the context
passed or the global context.
* Global actions override "context" actions if they exist.
* Jump points override both local and global context mappings.
* A return of FALSE indicates that a jumppoint was found or no mapping
was found in the local or global context.
* A jump point is "fired" by using a callback set when the jump point
was registered with MythMainWindow::RegisterJump
If the above is accurate then...
This is why, when watching live tv and with the "Program Guide" jump
point and "GUIDE" in TV Playback context are both set to 'S' I see a
flash of the live tv in guide screen before the "Program Guide" page
I have placed some debug VERBOSE statements in tv_play.cpp and
mythmainwindow.cpp and have noticed that:
* when watching live tv and I hit 'S' that ignoreKeys is false when
TV::ProcessKeypress() is called.
* this means the first TranslateKeyPress()@2188 won't be run
* the jump point is scheduled by TranslateKeyPress("ITV Menu"
,...)@2257 and the return is false and program flow continues.
* the call gContext->GetMainWindow()->TranslateKeyPress("TV
Playback",...)@2266 return true so program flow continues and the
GUIDE action is launched @3072
* it is slightly after the GUIDE is displayed (the video isn;t painted
yet) that the jump point kicks in and switches to the Program Guide.
So, I have two questions:
Q1/ Should MythMainWindow::TranslateKeyPress first check to see if a
jump point is currently queued (d->exitmenucallback != NULL) and
simply return false if it is?
Q2/ Should there be a test for jump points at the start of
TV::ProcessKeypress() so they are handled before all the other stuff,
with a if (!ignoreJumpPoints) or similar?
I am not not a programmer (just hacking) so please be kind if I am way
off base ;)
More information about the mythtv-dev