[mythtv] Patch to accept remote buttons as logical identifiers

Navaho Gunleg navahogunleg at gmail.com
Mon Jun 12 07:01:07 UTC 2006


After more extensive testing I discovered that the patch introduces a
few minor issues:
- When entering text, for instance changing a song's name in
MythMusic, and I accidentally hit the '*' on the remote -- I get the
text 'remoteASTERIX' inserted in the fext-box.

- When in MythControls, there is a test on a few keys to make sure
that there's 1 assigned because it requires at least one.  The
QKeySequence->count( ) will not return the right amount of items if it
contains a 'remoteXXX' identifier. Currently, for instance when you
want to assign Global/Esc, it does, I guess, a 'count( ) >to check if there's at least one key assigned. The moment you want to
delete remoteBACK, MythTV gives the error 'There /must/ be an
assignment for this key', because 1 - 1  = 0 (where as it should end
up with 2 - 1 = 1 if you understand what I try to say here).

- Some duplicate code in MythTV and MythControls to parse the
'key1,key2,key3' sequences.

These 'issues' would be solved by introducing a MythKeySequence:
- Testing the isRemote( ) member would avoid the text like
'remoteHOME' getting inserted in textboxes.

- The count( ) member would return the correct number of entries, not
ignoring the remoteXXX entries.

So last week I created a class as described in attached files,
implementing the members that MythTV calls on the, now used,
QKeySequence.

Note that to test a keys' validity or converting it to/from a
text-description and an integer, internally a QKeySequence is still
used.

I haven't yet implemented this in my local MythTV because perhaps
there might be people that have other / additional thoughts about
this.

Thoughts / comments?

Cheers,
NG
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mythkeysequence.h
Type: application/octet-stream
Size: 1881 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20060612/6f7d99f3/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mythkeysequence.cpp
Type: application/octet-stream
Size: 5369 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20060612/6f7d99f3/attachment-0001.obj 


More information about the mythtv-dev mailing list