]> git.sesse.net Git - vlc/commitdiff
* Fixed a segfault in the Japanese preferences panel.
authorChristophe Massiot <massiot@videolan.org>
Tue, 18 Feb 2003 00:17:06 +0000 (00:17 +0000)
committerChristophe Massiot <massiot@videolan.org>
Tue, 18 Feb 2003 00:17:06 +0000 (00:17 +0000)
modules/gui/macosx/intf.h
modules/gui/macosx/intf.m
modules/gui/macosx/prefs.m

index e6d796296a254b88d64dffdd7f817c5a4ceea8a2..9c87ed94851518e305feee2ac73fb35de680b98d 100644 (file)
@@ -2,7 +2,7 @@
  * intf.h: MacOS X interface plugin
  *****************************************************************************
  * Copyright (C) 2002 VideoLAN
- * $Id: intf.h,v 1.28 2003/02/16 23:32:06 hartman Exp $
+ * $Id: intf.h,v 1.29 2003/02/18 00:17:06 massiot Exp $
  *
  * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
  *          Christophe Massiot <massiot@via.ecp.fr>
@@ -42,6 +42,7 @@
 - (void)initIntlSupport;
 - (NSString *)localizedString:(char *)psz;
 - (char *)delocalizeString:(NSString *)psz;
+- (NSStringEncoding)getEncoding;
 
 - (void)setIntf:(intf_thread_t *)p_intf;
 - (intf_thread_t *)getIntf;
index a12fd8eeba125576eda2cb913a7d61541a6d2716..0b6b9208dcc52fdd9afc9135c8a36dc855d4a5ea 100644 (file)
@@ -2,7 +2,7 @@
  * intf.m: MacOS X interface plugin
  *****************************************************************************
  * Copyright (C) 2002-2003 VideoLAN
- * $Id: intf.m,v 1.58 2003/02/16 23:32:06 hartman Exp $
+ * $Id: intf.m,v 1.59 2003/02/18 00:17:06 massiot Exp $
  *
  * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
  *          Christophe Massiot <massiot@via.ecp.fr>
@@ -181,6 +181,11 @@ static void Run( intf_thread_t *p_intf )
     return psz_string;
 }
 
+- (NSStringEncoding)getEncoding
+{
+    return i_encoding;
+}
+
 - (void)setIntf:(intf_thread_t *)_p_intf
 {
     p_intf = _p_intf;
index 82b6956e8c47719c294e6e000be6ff80abea9816..280a2a2cff692e6b04b90ce86efa76a3cb50ff1a 100644 (file)
@@ -2,7 +2,7 @@
  * prefs.m: MacOS X plugin for vlc
  *****************************************************************************
  * Copyright (C) 2002 VideoLAN
- * $Id: prefs.m,v 1.12 2003/02/09 19:28:43 massiot Exp $
+ * $Id: prefs.m,v 1.13 2003/02/18 00:17:06 massiot Exp $
  *
  * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
  *
 #define INPUT_FIELD( ctype, cname, label, w, msg, param, tip ) \
     { \
         char * psz_duptip = NULL; \
-        if ( p_item->psz_longtext != NULL ) \
+        if ( p_item->psz_longtext != NULL && [NSApp getEncoding] == NSISOLatin1StringEncoding ) \
             psz_duptip = strdup(p_item->psz_longtext); \
         s_rc.size.height = 25; \
         s_rc.size.width = w; \
             NSButton *o_btn_select;
             NSButton *o_btn_configure;
             char * psz_duptip = NULL;
-            if ( p_item->psz_longtext != NULL )
+            if ( p_item->psz_longtext != NULL && [NSApp getEncoding] == NSISOLatin1StringEncoding )
                 psz_duptip = strdup(p_item->psz_longtext);
 
 #define MODULE_BUTTON( button, title, sel ) \
                 int i;
                 VLCComboBox *o_combo_box;
                 char * psz_duptip = NULL;
-                if ( p_item->psz_longtext != NULL )
+                if ( p_item->psz_longtext != NULL && [NSApp getEncoding] == NSISOLatin1StringEncoding )
                     psz_duptip = strdup(p_item->psz_longtext);
 
                 s_rc.size.height = 27;
         {
             VLCButton *o_btn_bool;
             char * psz_duptip = NULL;
-            if ( p_item->psz_longtext != NULL )
+            if ( p_item->psz_longtext != NULL && [NSApp getEncoding] == NSISOLatin1StringEncoding )
                 psz_duptip = strdup(p_item->psz_longtext);
 
             s_rc.size.height = 27;