[vlc-devel] commit: Qt: fix StringList in Simple preferences (Jean-Baptiste Kempf )
git version control
git at videolan.org
Mon Jan 4 00:59:52 CET 2010
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Mon Jan 4 00:58:02 2010 +0100| [ee7c9f4683a69db427aaed48f38438c0803b471d] | committer: Jean-Baptiste Kempf
Qt: fix StringList in Simple preferences
The list wasn't correctly updated when there was an action to update_list.
This fix the weird DirectSound bug.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ee7c9f4683a69db427aaed48f38438c0803b471d
---
modules/gui/qt4/components/preferences_widgets.cpp | 55 ++++++++++----------
1 files changed, 28 insertions(+), 27 deletions(-)
diff --git a/modules/gui/qt4/components/preferences_widgets.cpp b/modules/gui/qt4/components/preferences_widgets.cpp
index 24712fe..e1ff997 100644
--- a/modules/gui/qt4/components/preferences_widgets.cpp
+++ b/modules/gui/qt4/components/preferences_widgets.cpp
@@ -414,20 +414,6 @@ StringListConfigControl::StringListConfigControl( vlc_object_t *_p_this,
combo->setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Preferred );
module_config_t *p_module_config = config_FindConfig( p_this, p_item->psz_name );
- if(p_module_config && p_module_config->pf_update_list)
- {
- vlc_value_t val;
- val.psz_string = strdup(p_module_config->value.psz);
-
- p_module_config->pf_update_list(p_this, p_item->psz_name, val, val, NULL);
-
- // assume in any case that dirty was set to true
- // because lazy programmes will use the same callback for
- // this, like the one behind the refresh push button?
- p_module_config->b_dirty = false;
-
- free( val.psz_string );
- }
finish( p_module_config, bycat );
if( !l )
@@ -500,6 +486,21 @@ void StringListConfigControl::finish(module_config_t *p_module_config, bool byca
if(!p_module_config) return;
+ if( p_module_config->pf_update_list )
+ {
+ vlc_value_t val;
+ val.psz_string = strdup(p_module_config->value.psz);
+
+ p_module_config->pf_update_list(p_this, p_item->psz_name, val, val, NULL);
+
+ // assume in any case that dirty was set to true
+ // because lazy programmes will use the same callback for
+ // this, like the one behind the refresh push button?
+ p_module_config->b_dirty = false;
+
+ free( val.psz_string );
+ }
+
for( int i_index = 0; i_index < p_module_config->i_list; i_index++ )
{
combo->addItem( qfu((p_module_config->ppsz_list_text &&
@@ -914,19 +915,6 @@ IntegerListConfigControl::IntegerListConfigControl( vlc_object_t *_p_this,
combo->setMinimumWidth( MINWIDTH_BOX );
module_config_t *p_module_config = config_FindConfig( p_this, p_item->psz_name );
- if(p_module_config && p_module_config->pf_update_list)
- {
- vlc_value_t val;
- val.i_int = p_module_config->value.i;
-
- p_module_config->pf_update_list(p_this, p_item->psz_name, val, val, NULL);
-
- // assume in any case that dirty was set to true
- // because lazy programmes will use the same callback for
- // this, like the one behind the refresh push button?
- p_module_config->b_dirty = false;
- }
-
finish( p_module_config, bycat );
if( !l )
@@ -978,6 +966,19 @@ void IntegerListConfigControl::finish(module_config_t *p_module_config, bool byc
if(!p_module_config) return;
+ if( p_module_config->pf_update_list )
+ {
+ vlc_value_t val;
+ val.i_int = p_module_config->value.i;
+
+ p_module_config->pf_update_list(p_this, p_item->psz_name, val, val, NULL);
+
+ // assume in any case that dirty was set to true
+ // because lazy programmes will use the same callback for
+ // this, like the one behind the refresh push button?
+ p_module_config->b_dirty = false;
+ }
+
for( int i_index = 0; i_index < p_module_config->i_list; i_index++ )
{
combo->addItem( qtr(p_module_config->ppsz_list_text[i_index] ),
More information about the vlc-devel
mailing list