]> git.sesse.net Git - vlc/commitdiff
macosx: remove completely unsensical and unneeded delocalize method
authorDavid Fuhrmann <david.fuhrmann@googlemail.com>
Sat, 20 Apr 2013 08:39:20 +0000 (10:39 +0200)
committerDavid Fuhrmann <david.fuhrmann@googlemail.com>
Sat, 20 Apr 2013 08:39:20 +0000 (10:39 +0200)
modules/gui/macosx/StringUtility.h
modules/gui/macosx/StringUtility.m
modules/gui/macosx/prefs_widgets.m

index c45b42a54bf5fcaf5d243d096b6809a0ff30db8b..c95848d1b13ae804286dadeb5b8130679598a06a 100644 (file)
@@ -39,7 +39,6 @@ unsigned int CocoaKeyToVLC(unichar i_key);
 + (VLCStringUtility *)sharedInstance;
 
 - (NSString *)localizedString:(const char *)psz;
-- (char *)delocalizeString:(NSString *)psz;
 - (NSString *)wrapString: (NSString *)o_in_string toWidth: (int)i_width;
 - (NSString *)OSXStringKeyToString:(NSString *)theString;
 - (NSString *)getCurrentTimeAsString:(input_thread_t *)p_input negative:(BOOL)b_negative;
index 00ae8f2cf394b2bd8d81c296441f50e73635f742..33127d01cab99f680e840e183426899b0f0df062 100644 (file)
@@ -70,31 +70,6 @@ static VLCStringUtility *_o_sharedInstance = nil;
     return(o_str);
 }
 
-
-
-- (char *)delocalizeString:(NSString *)id
-{
-    NSData * o_data = [id dataUsingEncoding: NSUTF8StringEncoding
-                       allowLossyConversion: NO];
-    char * psz_string;
-
-    if (o_data == nil) {
-        o_data = [id dataUsingEncoding: NSUTF8StringEncoding
-                  allowLossyConversion: YES];
-        psz_string = malloc([o_data length] + 1);
-        [o_data getBytes: psz_string];
-        psz_string[ [o_data length] ] = '\0';
-        msg_Err(VLCIntf, "cannot convert to the requested encoding: %s",
-                psz_string);
-    } else {
-        psz_string = malloc([o_data length] + 1);
-        [o_data getBytes: psz_string];
-        psz_string[ [o_data length] ] = '\0';
-    }
-
-    return psz_string;
-}
-
 /* i_width is in pixels */
 - (NSString *)wrapString: (NSString *)o_in_string toWidth: (int) i_width
 {
index cb2b152d484abdde0d4ddd323d801210e0558406..3673ca3cc26f6f3ca8bfeed5877515d75aa20e92 100644 (file)
@@ -1075,10 +1075,8 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];     \
     if ([o_popup indexOfSelectedItem] >= 0) {
         if (p_item->list.psz[[o_popup indexOfSelectedItem]] != NULL)
             return strdup(p_item->list.psz[[o_popup indexOfSelectedItem]]);
-    } else {
-        if ([[VLCStringUtility sharedInstance] delocalizeString: [o_popup stringValue]] != NULL)
-            return strdup([[VLCStringUtility sharedInstance] delocalizeString: [o_popup stringValue]]);
     }
+
     return NULL;
 }