[vlc-commits] Revert "macosx: prevent unwanted strings from being displayed instead of empty strings as suggested by xtophe "

Felix Paul Kühne git at videolan.org
Sat Feb 18 01:41:49 CET 2012


vlc/vlc-2.0 | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Sat Feb 18 01:41:40 2012 +0100| [455e82f1229d400ed536d3b9ceb33e856d2db11c] | committer: Felix Paul Kühne

Revert "macosx: prevent unwanted strings from being displayed instead of empty strings as suggested by xtophe"

This reverts commit 84eee5c2fda0508547f3f4c479d9df8162acf1d9.

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=455e82f1229d400ed536d3b9ceb33e856d2db11c
---

 modules/gui/macosx/prefs.m        |    9 +--------
 modules/gui/macosx/simple_prefs.m |   14 +-------------
 2 files changed, 2 insertions(+), 21 deletions(-)

diff --git a/modules/gui/macosx/prefs.m b/modules/gui/macosx/prefs.m
index 11eb51a..dc91a39 100644
--- a/modules/gui/macosx/prefs.m
+++ b/modules/gui/macosx/prefs.m
@@ -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;
 }
 
diff --git a/modules/gui/macosx/simple_prefs.m b/modules/gui/macosx/simple_prefs.m
index c19564e..1d83806 100644
--- a/modules/gui/macosx/simple_prefs.m
+++ b/modules/gui/macosx/simple_prefs.m
@@ -437,19 +437,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



More information about the vlc-commits mailing list