[mythtv-users] mythWelcome and a very slow gui?
Jay Summet
jay at summet.com
Sat Feb 14 18:30:29 UTC 2009
On my 0.21-release-fixes codebase, MythWelcome would pause for a long
time (2-3 seconds) after I pressed the "MENU" key before making the menu
pop up. This was because a call to "mythshutdown --status" was taking
several seconds to return, and MythWelcome waited for the return value
of that message before drawing the menu (wanting to know if it should
draw an unlock or a lock button.)
I suspect that mythshutdown --status isn't supposed to take this long,
but I've coded up a quick hack in MythWelcome that fixes the UI pause
problem.
Basically, because MythWelcome periodically checks the status of the
system (in the updateStatusMessage function), I just cached this status
in a global variable. When the "Menu" event is processed, it checks the
cached status variable and draws the menu immediately, (only calling
"mythshutdown --status" if the status has not already been cached.)
Obviously, if somebody changes the lock status of the machine between
the last call to updateStatusMessage and the "Menu" button being
pressed, the menu will have the wrong button on it. (I am willing to
live with this.)
I am not suggesting that the attached patch be integrated with the
MythTv codebase (my understanding is that the code in Trunk does not
suffer from the problem I am trying to solve), but if you are running
0.21 and want to solve the problem I've described, the following patch
(to programs/mythwelcome/welcomedialog.cpp) will do it.
Jay
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mythwelcome_patch.diff
Type: text/x-patch
Size: 1258 bytes
Desc: not available
URL: <http://mythtv.org/pipermail/mythtv-users/attachments/20090214/7f7ab00b/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
URL: <http://mythtv.org/pipermail/mythtv-users/attachments/20090214/7f7ab00b/attachment.pgp>
More information about the mythtv-users
mailing list