[mythtv] Display popup from network control. Was: Re: Displaying messages from mythshutdown in mythfrontend - ideas?
Peter Schachte
schachte at csse.unimelb.edu.au
Fri Aug 24 02:49:35 UTC 2007
Hi Matthew,
Matthew Wire wrote:
> Please see attached the latest version of my patch to display a popup
> from the network control interface in mythfrontend.
Thanks! That looks like exactly what I was after.
> USAGE:
>>From the telnet interface the following commands are accepted:
> /* Message format:
> POPUP message defaultbutton timeout button1 button2 button3 buttonN
> returns [popupIdentifier] OK
Is "defaultbutton" a button name or number? If it's a name, is that name
required to be one of the button1...buttonN, or is it in addition to them?
> POPUP status (optional)[popupIdentifier]
> returns [popupIdentifier] {ACTIVE|CLOSED}
> POPUP close
> returns [popupIdentifier] CLOSED
It'd be safer to require a [popupIdentifier] with the close, in case it's
already been closed, or, worse, another popup has been opened by another
process (which you wouldn't want to close by accident).
> KNOWN ISSUES:
> * There is currently no way of querying which button was pressed. I'm
> obviously planning on doing something about this but not sure how yet...
> Probably allowing a query via the popup status message could return
> button number as well if closed?
How about:
POPUP status (optional)[popupIdentifier]
returns [popupIdentifier] {ACTIVE|CANCELLED|CLOSED buttonN}
where buttonN is one of the button identifiers
> * There is no way of signalling that the dialog has been closed. This
> will probably not be changed unless someone comes up with a good
> solution!
It's not really necessary, since you can poll with POPUP status. But on the
theory that polling is evil, you could add another command to wait until a
button is pressed or the dialog is cancelled. Equivalent to repeatedly calling
POPUP status until it returns something other than ACTIVE, but without actually
polling. Something like:
POPUP wait (optional)[popupIdentifier]
returns [popupIdentifier] {CANCELLED|CLOSED buttonN}
But I don't know enough about working with sockets to know whether or not this
is a stupid idea.
Last question: are you going to open a ticket and attach this patch? I'd love
to see this incorporated into 0.21.
Thanks for sharing this!
--
Peter Schachte Everything is relative. If the the rich are
schachte at cs.mu.OZ.AU getting a lot richer and the poor are getting a
www.cs.mu.oz.au/~schachte/ little richer, then the rich are getting richer
Phone: +61 3 8344 1338 and the poor are getting poorer. -- me
More information about the mythtv-dev
mailing list