[vlc-commits] macosx: remove completely unsensical and unneeded delocalize method
David Fuhrmann
git at videolan.org
Sat Apr 20 10:52:26 CEST 2013
vlc | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Sat Apr 20 10:39:20 2013 +0200| [bb19532a4408afbd750708b0d60fd322be275838] | committer: David Fuhrmann
macosx: remove completely unsensical and unneeded delocalize method
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bb19532a4408afbd750708b0d60fd322be275838
---
modules/gui/macosx/StringUtility.h | 1 -
modules/gui/macosx/StringUtility.m | 25 -------------------------
modules/gui/macosx/prefs_widgets.m | 4 +---
3 files changed, 1 insertion(+), 29 deletions(-)
diff --git a/modules/gui/macosx/StringUtility.h b/modules/gui/macosx/StringUtility.h
index c45b42a..c95848d 100644
--- a/modules/gui/macosx/StringUtility.h
+++ b/modules/gui/macosx/StringUtility.h
@@ -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;
diff --git a/modules/gui/macosx/StringUtility.m b/modules/gui/macosx/StringUtility.m
index 00ae8f2..33127d0 100644
--- a/modules/gui/macosx/StringUtility.m
+++ b/modules/gui/macosx/StringUtility.m
@@ -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
{
diff --git a/modules/gui/macosx/prefs_widgets.m b/modules/gui/macosx/prefs_widgets.m
index cb2b152..3673ca3 100644
--- a/modules/gui/macosx/prefs_widgets.m
+++ b/modules/gui/macosx/prefs_widgets.m
@@ -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;
}
More information about the vlc-commits
mailing list