[mythtv] Jump points and local overrides

Roo roo.watt at gmail.com
Tue Jun 12 12:35:47 UTC 2007


After some discussion on the mailing list (re Ticket #3363) about the
local context keybindings overriding jumppoints I have made an attempt
at a patch.

I would like to seek some advice.

*** Having had a poke around under the bonnet I thought an appropriate
approach to disabling jump points from particular contexts would be to
enhance TranslateKeyPress() to take a list of jump points to exclude
from the translation. The exclude list can then be specified for each
context from where TranslateKeyPresses.

bool TranslateKeyPress(
    const QString &context,
    QKeyEvent *e,
    QStringList &actions,
    bool allowJumps = true,
    const QStringList &excludedJumpDestinations = QStringList()
);

The default value for the excludedJumpDestinations parameter means
that all current instances of TranslateKeyPress() will continue to
work OK.

Is this a suitable approach?


*** The attached patch DOESN'T work completely, it is a work in
progress. Due to the compile time and I do the development on my only
mythtv machine I thought I might ask a friendly dev to have a look.

* Without the patch if the jump point and guide keybinding are the
same (S) I see a flash of the live tv in guide screen then it jumps to
the program guide jump point.

* It seems the patch does block the "Program Guide" jump point but the
live tv in guide preview video doesn't show, it just says waiting for
preview or similar.

* When you exit the live tv in guide it exits to the program guide
(although it was launched from live tv)

* Occasioanlly I saw what looked like multiple calls to
TranslateKeyPress for a single keypress. I had some debug print
statements that printed the excludedJumpDestinations. I saw the
expected debug messages and occasionally other messages that had a
excludedJumpDestinations list from a different context (the default
empty list).

Any thoughts from would be appreciated.

Cheers,

Roo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: translate-key-presses.diff
Type: text/x-patch
Size: 2962 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20070612/81839bb9/attachment.bin 


More information about the mythtv-dev mailing list