[mythtv] [PATCH] Separate key contexts for LiveTV & WatchingRecording

Joseph A. Caputo jcaputo1 at comcast.net
Sat Jan 10 23:40:57 EST 2004


I sent this patch before, but it got lost in the shuffle.  I've been running 
it for about a month, and have updated it to CVS as of 1/9; it should apply 
cleanly to current CVS.

The attached patch creates a hierarchical framework for keycontexts.  Every 
KeyContext may have a parent.  Key context hierarchies are stored in the 
database.  If a parent is not specified, 'Global' is implied.  When 
keypresses are translated, first the current context is evaluated, then each 
ancestor context, on up the chain to 'Global'.  This operates in similar 
fashion to the current behavior, where 'Global' is always the (only) 
ancestor.

Currently, all of the keycontexts use the default of no parent, which implies 
'Global'.  The exception is the old 'TV Playback', which has now been split 
into 'TV Live Playback' and 'TV Playback', which both have a common parent of 
'TV Common Playback'.  This allows us to re-use the same key for different 
purposes in LiveTV vs. recorded playback (i.e., there's really no need for an 
'Enter Edit Mode' action in LiveTV, so why waste a keybinding?)

I've also included code for dbcheck.cpp to create the necessary tables.

-JAC

-------------- next part --------------
A non-text attachment was scrubbed...
Name: keycontext.diff
Type: text/x-diff
Size: 9686 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20040110/59bd8ed3/keycontext.bin


More information about the mythtv-dev mailing list