[vlc-commits] macosx: displayed ocalizable sstrings correctly

Felix Paul Kühne git at videolan.org
Sun Jan 29 14:53:01 CET 2012


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Sun Jan 29 14:23:49 2012 +0100| [b3807154b3fa4b90a5570549a5e1a7eff6cedd49] | committer: Felix Paul Kühne

macosx: displayed ocalizable sstrings correctly

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

 modules/gui/macosx/MainWindow.m |    8 ++++----
 modules/gui/macosx/open.m       |    7 ++-----
 2 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m
index a2415e7..da7c08a 100644
--- a/modules/gui/macosx/MainWindow.m
+++ b/modules/gui/macosx/MainWindow.m
@@ -332,7 +332,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
         switch (*p_category) {
             case SD_CAT_INTERNET:
                 {
-                    [internetItems addObject: [SideBarItem itemWithTitle: [NSString stringWithCString: *ppsz_longname encoding: NSUTF8StringEncoding] identifier: o_identifier]];
+                    [internetItems addObject: [SideBarItem itemWithTitle: _NS(*ppsz_longname) identifier: o_identifier]];
                     if (!strncmp( *ppsz_name, "podcast", 7 ))
                         [[internetItems lastObject] setIcon: [NSImage imageNamed:@"sidebar-podcast"]];
                     else
@@ -342,21 +342,21 @@ static VLCMainWindow *_o_sharedInstance = nil;
                 break;
             case SD_CAT_DEVICES:
                 {
-                    [devicesItems addObject: [SideBarItem itemWithTitle: [NSString stringWithCString: *ppsz_longname encoding: NSUTF8StringEncoding] identifier: o_identifier]];
+                    [devicesItems addObject: [SideBarItem itemWithTitle: _NS(*ppsz_longname) identifier: o_identifier]];
                     [[devicesItems lastObject] setIcon: [NSImage imageNamed:@"NSApplicationIcon"]];
                     [[devicesItems lastObject] setSdtype: SD_CAT_DEVICES];
                 }
                 break;
             case SD_CAT_LAN:
                 {
-                    [lanItems addObject: [SideBarItem itemWithTitle: [NSString stringWithCString: *ppsz_longname encoding: NSUTF8StringEncoding] identifier: o_identifier]];
+                    [lanItems addObject: [SideBarItem itemWithTitle: _NS(*ppsz_longname) identifier: o_identifier]];
                     [[lanItems lastObject] setIcon: [NSImage imageNamed:@"sidebar-local"]];
                     [[lanItems lastObject] setSdtype: SD_CAT_LAN];
                 }
                 break;
             case SD_CAT_MYCOMPUTER:
                 {
-                    [mycompItems addObject: [SideBarItem itemWithTitle: [NSString stringWithCString: *ppsz_longname encoding: NSUTF8StringEncoding] identifier: o_identifier]];
+                    [mycompItems addObject: [SideBarItem itemWithTitle: _NS(*ppsz_longname) identifier: o_identifier]];
                     if (!strncmp( *ppsz_name, "video_dir", 9 ))
                         [[mycompItems lastObject] setIcon: [NSImage imageNamed:@"sidebar-movie"]];
                     else if (!strncmp( *ppsz_name, "audio_dir", 9 ))
diff --git a/modules/gui/macosx/open.m b/modules/gui/macosx/open.m
index c370b7b..85c5cb7 100644
--- a/modules/gui/macosx/open.m
+++ b/modules/gui/macosx/open.m
@@ -346,8 +346,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
         for ( i_index = 0; i_index < p_item->i_list; i_index++ )
         {
             [o_file_sub_align_pop addItemWithTitle:
-                [NSString stringWithUTF8String:
-                p_item->ppsz_list_text[i_index]]];
+             _NS(p_item->ppsz_list_text[i_index])];
         }
         [o_file_sub_align_pop selectItemAtIndex: p_item->value.i];
     }
@@ -358,9 +357,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
     {
         for ( i_index = 0; i_index < p_item->i_list; i_index++ )
         {
-            [o_file_sub_size_pop addItemWithTitle:
-                [NSString stringWithUTF8String:
-                p_item->ppsz_list_text[i_index]]];
+            [o_file_sub_size_pop addItemWithTitle: _NS(p_item->ppsz_list_text[i_index])];
             if ( p_item->value.i == p_item->pi_list[i_index] )
             {
                 [o_file_sub_size_pop selectItemAtIndex: i_index];



More information about the vlc-commits mailing list