[mythtv] [PATCH] Fix editable ComboBoxSetting

Matt Zimmerman mdz at debian.org
Sat Oct 25 20:05:17 EDT 2003


On Sat, Oct 25, 2003 at 01:50:36PM -0700, Morgan Green wrote:

> Am I missing something or is there really no way to edit a string in a 
> ComboBoxSetting and have the manually entered string actually get saved in 
> the database?

That seems unlikely, since I believe the recording profile name is done this
way...or are you talking about selecting something from the drop-down and
then editing it, rather than entering in a value when it is empty?  Yes,
that probably doesn't work correctly.

> I feel like I must be missing something obvious, but in case I'm not I've 
> attached a patch that changes the behavior of editable ComboBoxSettings 
> slightly and fixes this problem for me.
> 
> The patch changes it so that instead of editing a temporary string which 
> must then be inserted somehow you are just editing the current selection in 
> place.

This looks mostly OK, but changes things in a way that was explicitly
avoided when designing the interface.  The setting itself and the widget
which modifies it are separate and independent things, and the widget
doesn't know about the setting.  There could be any number of widgets tied
to the setting, or none at all.  You can do something similar without
storing a reference to the widget in the setting object.

-- 
 - mdz


More information about the mythtv-dev mailing list