[mythtv] [PATCH] Make keycontexts hierarchical
Joseph A. Caputo
jcaputo1 at comcast.net
Sun Dec 14 02:40:38 EST 2003
This patch introduces parent-child relationships in keycontexts. The
parent-child relationships are stored in a new table, "keycontexts", with the
following structure:
+---------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------------+--------------+------+-----+---------+-------+
| context | varchar(32) | | | | |
| description | varchar(255) | YES | | NULL | |
| parentcontext | varchar(32) | | | Global | |
+---------------+--------------+------+-----+---------+-------+
Only contexts for which an explicit parent exists need to be in this table;
all other contexts have an implicit parent of "Global". The following rows
should be inserted at minimum:
mysql> select * from keycontexts;
+-------------------+-------------+-------------------+
| context | description | parentcontext |
+-------------------+-------------+-------------------+
| TV Playback | NULL | TV CommonPlayback |
| TV LivePlayback | NULL | TV CommonPlayback |
| TV CommonPlayback | NULL | Global |
+-------------------+-------------+-------------------+
This splits the existing "TV Playback" into 2 contexts, and collects common
actions between the two into "TV CommonPlayback". This further reduces the
number of unique keybindings required, as LiveTV and normal Playback may now
re-use more keys for different purposes.
It's late, and I haven't had time tonight to add the DB stuff to dbcheck, but
I will if someone doesn't do it before I get to it (hopefully tomorrow).
-JAC
-------------- next part --------------
A non-text attachment was scrubbed...
Name: keycontext.diff
Type: text/x-diff
Size: 8230 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20031214/74bb8e74/keycontext-0001.bin
More information about the mythtv-dev
mailing list