[vlc-commits] commit: os x: fix preferences to leave x264 preset/tune empty ( Juho Vähä-Herttua )

git at videolan.org git at videolan.org
Mon May 31 15:56:16 CEST 2010


vlc | branch: master | Juho Vähä-Herttua <juhovh at iki.fi> | Mon May 31 15:23:52 2010 +0300| [14bb0136b65fc50b6f1b9c327b25417ce1e4faba] | committer: Ilkka Ollakka 

os x: fix preferences to leave x264 preset/tune empty

Signed-off-by: Ilkka Ollakka <ileoo at videolan.org>
(cherry picked from commit c521391d4c4a8bbcfed35e09705698099798efd9)

Signed-off-by: Ilkka Ollakka <ileoo at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=14bb0136b65fc50b6f1b9c327b25417ce1e4faba
---

 modules/gui/macosx/prefs_widgets.m |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/modules/gui/macosx/prefs_widgets.m b/modules/gui/macosx/prefs_widgets.m
index ec22b65..d444d17 100644
--- a/modules/gui/macosx/prefs_widgets.m
+++ b/modules/gui/macosx/prefs_widgets.m
@@ -1074,9 +1074,13 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
             -2, 0, o_textfieldTooltip )
         [o_combo setAutoresizingMask:NSViewWidthSizable ];
         for( i_index = 0; i_index < p_item->i_list; i_index++ )
-            if( p_item->value.psz && p_item->ppsz_list[i_index] &&
+        {
+            if( !p_item->value.psz && !p_item->ppsz_list[i_index] )
+                [o_combo selectItemAtIndex: i_index];
+            else if( p_item->value.psz && p_item->ppsz_list[i_index] &&
                 !strcmp( p_item->value.psz, p_item->ppsz_list[i_index] ) )
                 [o_combo selectItemAtIndex: i_index];
+       }
         [self addSubview: o_combo];
     }
     return self;
@@ -1118,9 +1122,13 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
     char *psz_value = config_GetPsz( VLCIntf, p_item->psz_name );
 
     for( i_index = 0; i_index < p_item->i_list; i_index++ )
-        if( psz_value && p_item->ppsz_list[i_index] &&
+    {
+        if( !psz_value && !p_item->ppsz_list[i_index] )
+            [o_combo selectItemAtIndex: i_index];
+        else if( psz_value && p_item->ppsz_list[i_index] &&
             !strcmp( psz_value, p_item->ppsz_list[i_index] ) )
             [o_combo selectItemAtIndex: i_index];
+    }
 
     free( psz_value );
     [super resetValues];



More information about the vlc-commits mailing list