Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Dev

Displaying messages from mythshutdown in mythfrontend - ideas?

 

 

MythTV dev RSS feed   Index | Next | Previous | View Threaded


devel at mrwire

Aug 18, 2007, 11:14 AM

Post #1 of 5 (1127 views)
Permalink
Displaying messages from mythshutdown in mythfrontend - ideas?

A simple use case:

mythshutdown -x returns false, can't shutdown system. I want to inform
the user via a dialog that it ran successfully.

For example, such a dialog might appear:

/--------------------------------------\
|Cannot shutdown at the moment because |
| "My program" is recording. |
| |
| [ ok ] |
| [ Override and shutdown anyway ] |
\--------------------------------------/

(Ignore the wording etc, basically such a dialog would need to have
configurable text, and configurable buttons).

Clearly, there would be many other uses for this kind of function as
well. I could display a message to the user while watching tv via
mythtvosd but this is not interactive and furthermore only works in tv.

1. There needs to be a way for external programs to inject messages into
mythfrontend.
2. mythfrontend needs to interpret these correctly.
3. Two-way communication may be useful (eg. mythfrontend says to
mythshutdown - force shutdown anyway).
Maybe the network control interface could be used?

Not looking for a solution on a plate but some ideas to help me go about
this.

_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


devel at mrwire

Aug 18, 2007, 12:19 PM

Post #2 of 5 (1088 views)
Permalink
Re: Displaying messages from mythshutdown in mythfrontend - ideas? [In reply to]

> I would like to see such a feature, too. E.g. for mytharchive to inform the
> user to insert a dvd, close the tray or similar things.
>
> Another solution would be to use external applications like xosd and simply
> run this application with the needed message. A popup would be really nicer.
>
> mythtvosd is no option, because it works only if the user uses the internal
> player.

Actually, it may be easier than I thought... Attached is a quick patch
to the network control interface to allow a dialog to be displayed.

Use telnet to test. Parameters are as follows:

# DIALOG title message defaultbutton button1 button2 button3 etc...

Returns: It returns the id of the button that was pressed: 0, 1 etc.

* You just keep appending buttons on the end until you have enough!

Issues:
* You can't have spaces in any of the strings.
* It's not documented in the help.
* It probably has other bugs in it.

Please give it a test, thoughts anyone?

--
Matthew
Attachments: mythtv-networkdialog.diff (2.09 KB)


lukas.kasprowicz at online

Aug 18, 2007, 12:20 PM

Post #3 of 5 (1098 views)
Permalink
Re: Displaying messages from mythshutdown in mythfrontend - ideas? [In reply to]

Hi,

Am Samstag 18 August 2007 18:14:50 schrieb Matthew Wire:
> mythshutdown -x returns false, can't shutdown system. I want to inform
> the user via a dialog that it ran successfully.

I would like to see such a feature, too. E.g. for mytharchive to inform the
user to insert a dvd, close the tray or similar things.

Another solution would be to use external applications like xosd and simply
run this application with the needed message. A popup would be really nicer.

mythtvosd is no option, because it works only if the user uses the internal
player.


Lukas
Attachments: signature.asc (0.18 KB)


schachte at csse

Aug 19, 2007, 8:43 PM

Post #4 of 5 (1074 views)
Permalink
Re: Displaying messages from mythshutdown in mythfrontend - ideas? [In reply to]

Matthew Wire wrote:

> Actually, it may be easier than I thought... Attached is a quick patch
> to the network control interface to allow a dialog to be displayed.

I haven't tested this, but it sounds like exactly what I've been looking for
(to prompt for DVD insertion), so I'll comment on it anyway.

It would be nice if there were a /programmatic/ way to pop the dialog back
down. For my application, I'd like the dialog to go away automatically once
the user has inserted a DVD. I have a process that keeps trying to mount the
DVD drive, but I need a way to pop the dialog back down once it succeeds.

A couple more potential limitations to think about:
Will this work while an external application (eg, mplayer or a game emulator)
is running?
Will this pause the internal player when it pops up, and continue it when it
pops back down?

Anyway, thanks for implementing this. Even if none of these things can be
handled, I'll definitely use it as soon as it makes its way into a released
version.

--
Peter Schachte There is a sufficiency in the world for man's
schachte [at] cs need but not for man's greed.
www.cs.mu.oz.au/~schachte/ -- Mahatma Gandhi
Phone: +61 3 8344 1338
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


devel at mrwire

Aug 20, 2007, 1:13 AM

Post #5 of 5 (1077 views)
Permalink
Re: Displaying messages from mythshutdown in mythfrontend - ideas? [In reply to]

> It would be nice if there were a /programmatic/ way to pop the dialog
back down. For my application, I'd like the dialog to go away
automatically once
> the user has inserted a DVD. I have a process that keeps trying to
mount the
> DVD drive, but I need a way to pop the dialog back down once it succeeds.
I don't think this would be possible. The network control message only
terminates when a value is returned (in this case button number etc.), so
there would need to be some way of telling the dialog to respond to
actions other than keypresses. A good idea but I think probably beyond
the first implementation!
One thing that did occur to me is that there should be a configurable
timeout.
>
> A couple more potential limitations to think about:
> Will this work while an external application (eg, mplayer or a game
> emulator)
> is running?
Nope :( At least I don't think so, because mythfrontend will need to be
visible. The other option would be to just create a separate application
to display dialogs, but I'm not sure how well this would work since it
would need to create an instance of mythcontext, set up lirc etc and then
return focus to mythtv.

> Will this pause the internal player when it pops up, and continue it
> when it
> pops back down?
Again, no. Not sure I'd want it to work like this, but you could always
send a pause message via the network control before invoking the dialog.


_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev

MythTV dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.