[mythtv] Need help with Password dialog using OSD

Chris Pinkham cpinkham at bc2va.org
Wed Oct 3 20:44:31 UTC 2007


* On Wed Oct 03, 2007 at 04:09:39PM -0400, Daniel Kristjansson wrote:
> On Wed, 2007-10-03 at 15:55 -0400, Sarat Vemuri wrote:
> > Hello,
> > Working on implementing some sort of parental controls.  I think I got it
> > for recorded programs.  Now I am working on Live TV.  I am trying to check
> > and ask for password in the tv_play state machine.  However since the TV
> > already starts at the point I am checking, MythPasswordDialog is not working
> > any more (lost focus).  Does any one know a quick way to get a password, may
> > be using OSD?  The OSD NewDialogBox only has menu selection and not a text
> > box.
> > Thanks for any help you can offer.
> > Thanks
> > Sarat.
> 
> cd mythtv; grep channel_editor */*/*.{cpp,xml,h}
> 
> The frontend channel editor has textarea elements which you could
> extend for "*" echoing text entry. Have a look at the XML files
> first, then look at how the channel_editor fields are populated
> in tv_play.cpp. Then look at libs/libmythtv/osd.cpp parseTextArea()
> for changing the echoing behaviour.

Perhaps it would be nice to extend MythThemedMenu[Private] to allow
requiring a password to select a menu item.  Currently we do this for
the setup page, but it could be easily modified or extended to work for
any menu item.  Jumppoints would have to be handled a little differently
if you use those, but there is already an editor for those, so
extending that code isn't a huge task either.

Want to keep the kids from destroying your heavily tweaked recording
priorities or even worse deleting a recording, just set a pin on that
menu item.  Until we get true multi-user and permissions this could be
an easy interim solution.

A table with the action name and a pin code would be easy to implement.
The list of callbacks from mythfrontend/main.cpp in TVMenuCallback
would be valid actions.  So if you want to deny access to LiveTV, you'd
just set pins on 'tv_watch_live', and 'tv_watch_live_epg'.

My daughter is now old enough to walk across the living room now and
grab the remote, so whether it's something like this or a hack, I imagine
that I'll be wanting something like this in the near future.  :)

--
Chris "not totally thinking it through, but tossing the idea out" Pinkham


More information about the mythtv-dev mailing list