[mythtv] [PATCH] mythvideo - switch between views (the Right Way)

Jeff Doozan mythtv at doozan.com
Wed Sep 10 19:10:03 EDT 2003


Here's an updated patch that makes it possible to switch between 
views using the B/L/M keys to switch to the Browse, List, and Manage 
views.

This patch does things the "Right Way" by destroying the previous 
window before displaying the new window.

Unfortunately, simply destroying the existing window and then 
creating the next window causes the user to be briefly dropped back 
to the menu screen

To avoid this, we pre-create the next window before destroying the 
existing window.  Then we simply display the new window, and 
everything appears seamless.

Currently, libmyth will attach a window to a parent a soon as it is 
created, which makes it impossible to destroy the earlier window 
because it is no longer the "top widget".  To avoid this, I've added 
two new functions to the MythDialog class, attach() and unattach(), 
which allows us to manipulate the windows so that we can create and 
destroy them in the best order.

This patch is available at:

http://www.tcbmi.com/downloads/mythvideo-switch.zip

-- Jeff


More information about the mythtv-dev mailing list