]> git.sesse.net Git - vlc/commitdiff
intf.m: * we can't localise empty strings, so don't put an error when trying to do...
authorFelix Paul Kühne <fkuehne@videolan.org>
Tue, 11 Apr 2006 12:37:47 +0000 (12:37 +0000)
committerFelix Paul Kühne <fkuehne@videolan.org>
Tue, 11 Apr 2006 12:37:47 +0000 (12:37 +0000)
    * be a bit nicer and return @"" instead of NULL strings
    - this fixes the display of certain modules in the preferences such as the parametric equaliser

prefs.m: * removed 2 unused variables

modules/gui/macosx/intf.m
modules/gui/macosx/prefs.m

index d39ff019fd78fe1327a26eab3035162aef46a3e4..1b3b5619037f2fec9cc9452dd4be3ad296295243 100644 (file)
@@ -654,10 +654,17 @@ static VLCMain *_o_sharedMainInstance = nil;
     if( psz != NULL )
     {
         o_str = [[[NSString alloc] initWithUTF8String: psz] autorelease];
+
+        if ( o_str == NULL )
+        {
+            msg_Err( VLCIntf, "could not translate: %s", psz );
+            return( @"" );
+        }
     }
-    if ( o_str == NULL )
+    else
     {
-        msg_Err( VLCIntf, "could not translate: %s", psz );
+        msg_Warn( VLCIntf, "can't translate empty strings" );
+        return( @"" );
     }
 
     return( o_str );
index 235b7b1d3a86520c921dda2c85046974334981ca..02dff1a1aa41065e78b47df23890185ae8218d77 100644 (file)
@@ -315,10 +315,10 @@ static VLCTreeItem *o_root_item = nil;
                                    if( p_item->i_value == -1 ) break;
 
                         o_child_name = [[VLCMain sharedInstance]
-                            localizedString: config_CategoryNameGet( p_item->i_value ) ];
+                            localizedString: config_CategoryNameGet( p_item->i_value )];
                         o_child_title = o_child_name;
                         o_child_help = [[VLCMain sharedInstance]
-                            localizedString: config_CategoryHelpGet( p_item->i_value ) ];
+                            localizedString: config_CategoryHelpGet( p_item->i_value )];
                         p_last_category = [VLCTreeItem alloc];
                         [o_children addObject:[p_last_category
                             initWithName: o_child_name
@@ -546,7 +546,6 @@ static VLCTreeItem *o_root_item = nil;
                 return nil;
             }
             p_item = p_parser->p_config;
-            int i = 0;
 
             p_item = p_parser->p_config + 1;
 
@@ -589,7 +588,6 @@ static VLCTreeItem *o_root_item = nil;
         }
         else
         {
-            int i = 0;
             int i_index;
             p_list = vlc_list_find( p_intf, VLC_OBJECT_MODULE, FIND_ANYWHERE );
             if( !p_list ) return o_view;