[mythtv] Stop recording patch and some small fixes

Geoffrey Hausheer ou401cru02 at sneakemail.com
Wed Sep 17 23:48:54 EDT 2003


On Thu, 18 Sep 2003 03:05:13 +0200, "Tako Schotanus
quintesse-at-palacio-cristal.com |mythtv/1.0-Allow|"
<hd1zhicfeg0t at sneakemail.com> said:

> Now for the one big code change that might or might not make it past
> Isaac.
> 
> Isaac, when looking at the code in playbackbox I decided that to make 
> the action menu pop-up I would have to do too much code duplication. The 
> code would have gotten even uglier with me just patching my changes onto 
> what was already there. So I decided to take out the entire code that 
> makes the pop-up menu and put it in a seperate class (SimpleMythPopup). 
> That made the code a lot easier to read and manage because making any 
> kind of simple pop-up (only labels and buttons) is now extremely simple.
> 
> But there are a couple of things that I have no answer to:
> 1. maybe there is already something like the SimpleMythPopup that I just 
> don't know about (but then again, neither did the playbackbox' original 
> author in that case (you?)). If so please tell me so I can take my stuff 
> out and use whatever is the standard.

Take a look at the 2ButtonDialog in mythdialog.cpp.  I just added it for
the profile group stuff.  It is designed to be a modal dialog, and is
basically identical to the popup in playbackbox.  If it won't suit your
needs, just patch it so it does.  It is designed so you build it with
'new Myth2ButtonDialog(...)' (just provide the title, message,and button
names in the constructor call), then 'ret = exec() will return 0,1,or 2
depending on whether an abort, 1st-button, or 2nd-button is selected.

.Geoff


More information about the mythtv-dev mailing list