Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
567eba17
Commit
567eba17
authored
May 25, 2003
by
Christophe Massiot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* We now use
UTF-8
internally under Mac OS X. This requires a libiconv-
enabled version of gettext. (patch courtesy of the DJ)
parent
d59b2b17
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
42 additions
and
57 deletions
+42
-57
configure.ac.in
configure.ac.in
+1
-2
include/vlc_common.h
include/vlc_common.h
+6
-7
modules/gui/macosx/controls.m
modules/gui/macosx/controls.m
+3
-3
modules/gui/macosx/info.m
modules/gui/macosx/info.m
+2
-2
modules/gui/macosx/intf.m
modules/gui/macosx/intf.m
+9
-29
modules/gui/macosx/open.m
modules/gui/macosx/open.m
+2
-2
modules/gui/macosx/output.m
modules/gui/macosx/output.m
+2
-2
modules/gui/macosx/prefs.h
modules/gui/macosx/prefs.h
+2
-2
modules/gui/macosx/prefs.m
modules/gui/macosx/prefs.m
+6
-6
src/libvlc.c
src/libvlc.c
+9
-2
No files found.
configure.ac.in
View file @
567eba17
...
...
@@ -183,8 +183,7 @@ if test "${nls_cv_force_use_gnu_gettext}" = "yes"; then
else
AC_CHECK_FUNCS(textdomain,,[
AC_CHECK_LIB(intl,textdomain,
LDFLAGS_vlc="${LDFLAGS_vlc} ${LIBINTL}"
LDFLAGS_plugins="${LDFLAGS_plugins} ${LIBINTL}",,
LDFLAGS_vlc="${LDFLAGS_vlc} ${LIBINTL}",,
${LIBINTL}
)
])
...
...
include/vlc_common.h
View file @
567eba17
...
...
@@ -3,7 +3,7 @@
* Collection of useful common types and macros definitions
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: vlc_common.h,v 1.6
4 2003/05/20 16:20:33 zorglub
Exp $
* $Id: vlc_common.h,v 1.6
5 2003/05/25 17:27:13 massiot
Exp $
*
* Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr>
...
...
@@ -678,8 +678,12 @@ VLC_EXPORT( char *, vlc_dgettext, ( const char *package, const char *msgid ) );
(defined(MODULE_NAME_IS_gnome)||defined(MODULE_NAME_IS_gnome_main)||\
defined(MODULE_NAME_IS_gnome2)||defined(MODULE_NAME_IS_gnome2_main))
/* Declare nothing: gnome.h will do it for us */
#elif defined( ENABLE_NLS ) && defined( HAVE_INCLUDED_GETTEXT )
#elif defined( ENABLE_NLS )
#if defined( HAVE_INCLUDED_GETTEXT )
# include "libintl.h"
#else
# include <libintl.h>
#endif
# undef _
#if defined( __BORLANDC__ )
#define _(String) vlc_dgettext (PACKAGE_TARNAME, String)
...
...
@@ -687,11 +691,6 @@ VLC_EXPORT( char *, vlc_dgettext, ( const char *package, const char *msgid ) );
# define _(String) vlc_dgettext (PACKAGE, String)
#endif
# define N_(String) ((char*)(String))
#elif defined( ENABLE_NLS ) && defined( HAVE_GETTEXT )
# include <libintl.h>
# undef _
# define _(String) dgettext (PACKAGE, String)
# define N_(String) ((char*)(String))
#else
# define _(String) ((char*)(String))
# define N_(String) ((char*)(String))
...
...
modules/gui/macosx/controls.m
View file @
567eba17
...
...
@@ -2,7 +2,7 @@
* controls.m: MacOS X interface plugin
*****************************************************************************
* Copyright (C) 2002-2003 VideoLAN
* $Id: controls.m,v 1.3
8 2003/05/11 18:41:27 hartman
Exp $
* $Id: controls.m,v 1.3
9 2003/05/25 17:27:13 massiot
Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr>
...
...
@@ -369,7 +369,7 @@
{
config_PutPsz
(
p_intf
,
"filter"
,
"deinterlace"
);
config_PutPsz
(
p_intf
,
"deinterlace-mode"
,
[[
sender
title
]
lossyC
String
]
);
[[
sender
title
]
UTF8
String
]
);
}
else
{
...
...
@@ -536,7 +536,7 @@
if
(
psz_filter
!=
NULL
)
{
if
(
strcmp
(
psz_filter
,
[[
o_mi
title
]
lossyC
String
]
)
==
0
)
if
(
strcmp
(
psz_filter
,
[[
o_mi
title
]
UTF8
String
]
)
==
0
)
{
[
o_mi
setState
:
NSOnState
];
}
...
...
modules/gui/macosx/info.m
View file @
567eba17
...
...
@@ -2,7 +2,7 @@
* info.m: MacOS X info panel
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: info.m,v 1.
5 2003/03/18 02:28:53 hartman
Exp $
* $Id: info.m,v 1.
6 2003/05/25 17:27:13 massiot
Exp $
*
* Authors: Derk-Jan Hartman <thedj@users.sourceforge.net>
*
...
...
@@ -133,7 +133,7 @@
input_info_t
*
p_info
;
/* Add a category */
o_title
=
[
NSString
stringWith
C
String
:
p_category
->
psz_name
];
o_title
=
[
NSString
stringWith
UTF8
String
:
p_category
->
psz_name
];
[
o_selector
addItemWithTitle
:
o_title
];
/* Create empty content string */
...
...
modules/gui/macosx/intf.m
View file @
567eba17
...
...
@@ -2,7 +2,7 @@
* intf.m: MacOS X interface plugin
*****************************************************************************
* Copyright (C) 2002-2003 VideoLAN
* $Id: intf.m,v 1.8
5 2003/05/20 18:53:03 hartman
Exp $
* $Id: intf.m,v 1.8
6 2003/05/25 17:27:13 massiot
Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr>
...
...
@@ -113,34 +113,13 @@ static void Run( intf_thread_t *p_intf )
-
(
id
)
init
{
/* default encoding: ISO-8859-1 */
i_encoding
=
NS
ISOLatin1
StringEncoding
;
i_encoding
=
NS
UTF8
StringEncoding
;
return
(
[
super
init
]
);
}
-
(
void
)
initIntlSupport
{
char
*
psz_lang
=
getenv
(
"LANG"
);
if
(
psz_lang
==
NULL
)
{
return
;
}
if
(
strncmp
(
psz_lang
,
"pl"
,
2
)
==
0
)
{
i_encoding
=
NSISOLatin2StringEncoding
;
}
else
if
(
strncmp
(
psz_lang
,
"ja"
,
2
)
==
0
)
{
i_encoding
=
NSJapaneseEUCStringEncoding
;
}
else
if
(
strncmp
(
psz_lang
,
"ru"
,
2
)
==
0
)
{
#define CFSENC2NSSENC(e) CFStringConvertEncodingToNSStringEncoding(e)
i_encoding
=
CFSENC2NSSENC
(
kCFStringEncodingKOI8_R
);
#undef CFSENC2NSSENC
}
}
-
(
NSString
*
)
localizedString
:(
char
*
)
psz
...
...
@@ -149,10 +128,11 @@ static void Run( intf_thread_t *p_intf )
if
(
psz
!=
NULL
)
{
UInt32
uiLength
=
(
UInt32
)
strlen
(
psz
);
NSData
*
o_data
=
[
NSData
dataWithBytes
:
psz
length
:
uiLength
];
o_str
=
[[[
NSString
alloc
]
initWithData
:
o_data
encoding:
i_encoding
]
autorelease
];
o_str
=
[[[
NSString
alloc
]
initWithUTF8String
:
psz
]
autorelease
];
}
if
(
o_str
==
NULL
)
{
msg_Err
(
p_intf
,
"could not translate: %s"
,
psz
);
}
return
(
o_str
);
...
...
@@ -764,7 +744,7 @@ int PlaylistChanged( vlc_object_t *p_this, const char *psz_variable,
input_OffsetToTime
(
p_input
,
psz_time
,
p_area
->
i_tell
);
o_time
=
[
NSString
stringWith
C
String
:
psz_time
];
o_time
=
[
NSString
stringWith
UTF8
String
:
psz_time
];
[
o_timefield
setStringValue
:
o_time
];
}
...
...
@@ -1183,7 +1163,7 @@ int PlaylistChanged( vlc_object_t *p_this, const char *psz_variable,
vlc_mutex_unlock
(
&
p_playlist
->
p_input
->
stream
.
stream_lock
);
#undef p_area
o_time
=
[
NSString
stringWith
C
String
:
psz_time
];
o_time
=
[
NSString
stringWith
UTF8
String
:
psz_time
];
[
o_timefield
setStringValue
:
o_time
];
}
...
...
modules/gui/macosx/open.m
View file @
567eba17
...
...
@@ -2,7 +2,7 @@
* open.m: MacOS X plugin for vlc
*****************************************************************************
* Copyright (C) 2002-2003 VideoLAN
* $Id: open.m,v 1.3
4 2003/05/20 18:53:03 hartman
Exp $
* $Id: open.m,v 1.3
5 2003/05/25 17:27:13 massiot
Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr>
...
...
@@ -238,7 +238,7 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class )
if
(([
o_file_sub_ckbox
state
]
==
NSOnState
)
&&
!
([
subPath
isEqualTo
:
@""
]))
{
config_PutPsz
(
p_intf
,
"sub-file"
,
strdup
(
[
subPath
c
String
]
)
);
config_PutPsz
(
p_intf
,
"sub-file"
,
strdup
(
[
subPath
UTF8
String
]
)
);
if
(
[
o_file_sub_override
state
]
)
{
config_PutInt
(
p_intf
,
"sub-delay"
,
(
int
)(
[
o_file_sub_delay
intValue
]
*
10
)
);
...
...
modules/gui/macosx/output.m
View file @
567eba17
...
...
@@ -2,7 +2,7 @@
* output.m: MacOS X Output Dialog
*****************************************************************************
* Copyright (C) 2002-2003 VideoLAN
* $Id: output.m,v 1.
5 2003/05/22 14:40:07 hartman
Exp $
* $Id: output.m,v 1.
6 2003/05/25 17:27:13 massiot
Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr>
...
...
@@ -179,7 +179,7 @@
-
(
IBAction
)
outputCloseSheet
:(
id
)
sender
{
intf_thread_t
*
p_intf
=
[
NSApp
getIntf
];
config_PutPsz
(
p_intf
,
"sout"
,
[
o_mrl
lossyC
String
]
);
config_PutPsz
(
p_intf
,
"sout"
,
[
o_mrl
UTF8
String
]
);
[
o_output_sheet
orderOut
:
sender
];
[
NSApp
endSheet
:
o_output_sheet
];
...
...
modules/gui/macosx/prefs.h
View file @
567eba17
...
...
@@ -2,7 +2,7 @@
* prefs.h: MacOS X plugin for vlc
*****************************************************************************
* Copyright (C) 2002-2003 VideoLAN
* $Id: prefs.h,v 1.
6 2003/05/20 15:23:25 hartman
Exp $
* $Id: prefs.h,v 1.
7 2003/05/25 17:27:13 massiot
Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
*
...
...
@@ -160,6 +160,6 @@ INTF_CONTROL_CONFIG(TextField);
{ \
[obj setModuleName: mname]; \
[obj setConfigType: ctype]; \
[obj setConfigName: [NSString stringWith
C
String: cname]]; \
[obj setConfigName: [NSString stringWith
UTF8
String: cname]]; \
}
modules/gui/macosx/prefs.m
View file @
567eba17
...
...
@@ -2,7 +2,7 @@
* prefs.m: MacOS X plugin for vlc
*****************************************************************************
* Copyright (C) 2002-2003 VideoLAN
* $Id: prefs.m,v 1.2
6 2003/05/24 20:54:27 gbazin
Exp $
* $Id: prefs.m,v 1.2
7 2003/05/25 17:27:13 massiot
Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Derk-Jan Hartman <thedj at users.sf.net>
...
...
@@ -129,7 +129,7 @@
int
i_type
=
[
o_vlc_config
configType
];
NSString
*
o_name
=
[
o_vlc_config
configName
];
char
*
psz_name
=
(
char
*
)[
o_name
lossyC
String
];
char
*
psz_name
=
(
char
*
)[
o_name
UTF8
String
];
switch
(
i_type
)
{
...
...
@@ -141,7 +141,7 @@
o_value
=
[
o_vlc_config
titleOfSelectedItem
];
psz_value
=
[
o_value
isEqualToString
:
_NS
(
"Auto"
)
]
?
""
:
(
char
*
)[
o_value
lossyC
String
];
(
char
*
)[
o_value
UTF8
String
];
config_PutPsz
(
p_intf
,
psz_name
,
psz_value
);
}
break
;
...
...
@@ -154,7 +154,7 @@
NSString
*
o_value
;
o_value
=
[
o_vlc_config
stringValue
];
psz_value
=
(
char
*
)[
o_value
lossyC
String
];
psz_value
=
(
char
*
)[
o_value
UTF8
String
];
config_PutPsz
(
p_intf
,
psz_name
,
psz_value
);
}
...
...
@@ -205,7 +205,7 @@
}
/* Enumerate config options and add corresponding config boxes */
o_module_name
=
[
NSString
stringWith
C
String
:
p_parser
->
psz_object_name
];
o_module_name
=
[
NSString
stringWith
UTF8
String
:
p_parser
->
psz_object_name
];
p_item
=
p_parser
->
p_config
;
i_pos
=
0
;
...
...
@@ -771,7 +771,7 @@ static VLCTreeItem *o_root_item = nil;
char
*
psz_module_name
;
int
i_index
;
psz_module_name
=
(
char
*
)[
o_module_name
lossyC
String
];
psz_module_name
=
(
char
*
)[
o_module_name
UTF8
String
];
/* look for module */
p_list
=
vlc_list_find
(
p_intf
,
VLC_OBJECT_MODULE
,
FIND_ANYWHERE
);
...
...
src/libvlc.c
View file @
567eba17
...
...
@@ -2,7 +2,7 @@
* libvlc.c: main libvlc source
*****************************************************************************
* Copyright (C) 1998-2002 VideoLAN
* $Id: libvlc.c,v 1.8
7 2003/05/21 15:40:03 hartman
Exp $
* $Id: libvlc.c,v 1.8
8 2003/05/25 17:27:13 massiot
Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
...
...
@@ -346,6 +346,12 @@ int VLC_Init( int i_object, int i_argc, char *ppsz_argv[] )
textdomain
(
PACKAGE
);
#if defined( SYS_BEOS ) || defined ( SYS_DARWIN )
/* BeOS only support UTF8 strings */
/* Mac OS X prefers UTF8 */
bind_textdomain_codeset
(
PACKAGE
,
"UTF-8"
);
#endif
module_EndBank
(
p_vlc
);
module_InitBank
(
&
libvlc
);
module_LoadMain
(
&
libvlc
);
...
...
@@ -1061,8 +1067,9 @@ static void SetLanguage ( char const *psz_lang )
/* Set the default domain */
textdomain
(
PACKAGE
);
#if
def SYS_BEOS
#if
defined( SYS_BEOS ) || defined ( SYS_DARWIN )
/* BeOS only support UTF8 strings */
/* Mac OS X prefers UTF8 */
bind_textdomain_codeset
(
PACKAGE
,
"UTF-8"
);
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment