]> git.sesse.net Git - vlc/commitdiff
Revert "macosx: prevent unwanted strings from being displayed instead of empty string...
authorFelix Paul Kühne <fkuehne@videolan.org>
Sat, 18 Feb 2012 00:37:26 +0000 (01:37 +0100)
committerFelix Paul Kühne <fkuehne@videolan.org>
Sat, 18 Feb 2012 00:38:20 +0000 (01:38 +0100)
This reverts commit a97666db8a5ee0eb8498cc068c4fe3a8d76e1783.

modules/gui/macosx/prefs.m
modules/gui/macosx/simple_prefs.m

index 11eb51a075bea398900e58f88b483710d1632a8d..dc91a3977e5b16a037128041fab1470122b4731c 100644 (file)
@@ -478,20 +478,13 @@ static VLCPrefs *_o_sharedMainInstance = nil;
 @implementation VLCTreePluginItem
 - (id)initWithPlugin:(module_t *)plugin
 {
-    const char * psz_name = module_get_name( plugin, false );
-    NSString * name;
-    if (psz_name)
-        name = _NS(psz_name);
-    else
-        name = @"";
-
+    NSString * name = _NS( module_get_name( plugin, false )?:"" );
     if(self = [super initWithName:name])
     {
         _configItems = module_config_get( plugin, &_configSize );
         //_plugin = plugin;
         //_help = [_NS(config_CategoryHelpGet( subCategory )) retain];
     }
-
     return self;
 }
 
index 0f91f5a3a44407faec61e01f5085b5ab1f1f57e9..cd00abaa2d3d5e8f3ebee17791a7a4fbaeb52996 100644 (file)
@@ -438,19 +438,7 @@ static inline char * __config_GetLabel( vlc_object_t *p_this, const char *psz_na
 - (void)setupButton: (NSButton *)object forBoolValue: (const char *)name
 {
     [object setState: config_GetInt( p_intf, name )];
-
-    char * psz_label = config_GetLabel( p_intf, name );
-    NSString * o_label;
-
-    if (psz_label)
-    {
-        o_label = _NS(psz_label);
-        free( psz_label );
-    }
-    else
-        o_label = @"";
-
-    [object setToolTip: o_label];
+    [object setToolTip: _NS(config_GetLabel( p_intf, name ) ?: "")];
 }
 
 - (void)setupField:(NSTextField *)o_object forOption:(const char *)psz_option