[mythtv] [PATCH] Frontend Idle and automatic shutdown

Aaron McCarthy aaronmccarthy100 at hotmail.com
Sun Jun 20 00:18:32 EDT 2004


Isaac Richards wrote:

>On Sunday 13 June 2004 06:45 pm, Aaron McCarthy wrote:
>  
>
>>Hi all,
>>
>>The following patch implements a frontend idle timer which enables the
>>backend to automatically shutdown when frontends are connected.  This is
>>usefull when the frontend and backend are runing on the same system.
>>
>>I've included patches to disable the timer in mythgallery, mythmusic and
>>mythvideo.
>>
>>This is my first patch, let me know if it is formatted correctly.
>>    
>>
>
>The patch itself looks fine, but it seems awfully invasive.  I think the same 
>thing could be more easily accomplished by adding an event filter to the top 
>level MythWindow and updating a timestamp based on the last keypress.  
>
>  
>
Isaac,

I'm not exactly sure what you mean by invasive, can you elaborate.  The 
patch does kind of work the way in the way you mention, except that it 
filters events on the QApplication object.  The timestamp is implemented 
as a QTimer derived class (MythIdleTimer), on each keypress the timer is 
reset.

My decision to implement most of the functionality within the 
MythIdleTimer class was so I could keep my code seperate.

Aaron McCarthy


More information about the mythtv-dev mailing list