Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
44b45d38
Commit
44b45d38
authored
Oct 09, 2005
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/gui/wxwidgets: fixed build when wxWidgets isn't compiled with unicode support.
parent
cc631288
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
16 deletions
+31
-16
modules/gui/wxwidgets/dialogs.cpp
modules/gui/wxwidgets/dialogs.cpp
+4
-4
modules/gui/wxwidgets/interface.cpp
modules/gui/wxwidgets/interface.cpp
+2
-2
modules/gui/wxwidgets/open.cpp
modules/gui/wxwidgets/open.cpp
+9
-9
modules/gui/wxwidgets/wxwidgets.h
modules/gui/wxwidgets/wxwidgets.h
+16
-1
No files found.
modules/gui/wxwidgets/dialogs.cpp
View file @
44b45d38
...
...
@@ -406,7 +406,7 @@ void DialogsProvider::OnOpenFileSimple( wxCommandEvent& event )
for
(
size_t
i
=
0
;
i
<
paths
.
GetCount
();
i
++
)
{
char
*
psz_utf8
=
FromUTF32
(
paths
[
i
].
wc_str
()
);
char
*
psz_utf8
=
wxFromLocale
(
paths
[
i
]
);
if
(
event
.
GetInt
()
)
playlist_Add
(
p_playlist
,
psz_utf8
,
psz_utf8
,
PLAYLIST_APPEND
|
(
i
?
0
:
PLAYLIST_GO
),
...
...
@@ -414,7 +414,7 @@ void DialogsProvider::OnOpenFileSimple( wxCommandEvent& event )
else
playlist_Add
(
p_playlist
,
psz_utf8
,
psz_utf8
,
PLAYLIST_APPEND
,
PLAYLIST_END
);
f
ree
(
psz_utf8
);
wxLocaleF
ree
(
psz_utf8
);
}
}
...
...
@@ -437,11 +437,11 @@ void DialogsProvider::OnOpenDirectory( wxCommandEvent& event )
if
(
p_dir_dialog
&&
p_dir_dialog
->
ShowModal
()
==
wxID_OK
)
{
wxString
path
=
p_dir_dialog
->
GetPath
();
char
*
psz_utf8
=
FromUTF32
(
path
.
wc_str
()
);
char
*
psz_utf8
=
wxFromLocale
(
path
);
playlist_Add
(
p_playlist
,
psz_utf8
,
psz_utf8
,
PLAYLIST_APPEND
|
(
event
.
GetInt
()
?
PLAYLIST_GO
:
0
),
PLAYLIST_END
);
f
ree
(
psz_utf8
);
wxLocaleF
ree
(
psz_utf8
);
}
vlc_object_release
(
p_playlist
);
...
...
modules/gui/wxwidgets/interface.cpp
View file @
44b45d38
...
...
@@ -1418,11 +1418,11 @@ bool DragAndDrop::OnDropFiles( wxCoord, wxCoord,
for
(
size_t
i
=
0
;
i
<
filenames
.
GetCount
();
i
++
)
{
char
*
psz_utf8
=
FromUTF32
(
filenames
[
i
].
wc_str
()
);
char
*
psz_utf8
=
wxFromLocale
(
filenames
[
i
]
);
playlist_Add
(
p_playlist
,
psz_utf8
,
psz_utf8
,
PLAYLIST_APPEND
|
((
i
|
b_enqueue
)
?
0
:
PLAYLIST_GO
),
PLAYLIST_END
);
f
ree
(
psz_utf8
);
wxLocaleF
ree
(
psz_utf8
);
}
vlc_object_release
(
p_playlist
);
...
...
modules/gui/wxwidgets/open.cpp
View file @
44b45d38
...
...
@@ -1148,17 +1148,17 @@ void OpenDialog::OnOk( wxCommandEvent& WXUNUSED(event) )
playlist_item_t
*
p_item
;
char
*
psz_utf8
;
psz_utf8
=
FromUTF32
(
mrl
[
i
].
wc_str
()
);
psz_utf8
=
wxFromLocale
(
mrl
[
i
]
);
p_item
=
playlist_ItemNew
(
p_intf
,
psz_utf8
,
psz_utf8
);
f
ree
(
psz_utf8
);
wxLocaleF
ree
(
psz_utf8
);
/* Insert options */
while
(
i
+
1
<
(
int
)
mrl
.
GetCount
()
&&
((
const
char
*
)
mrl
[
i
+
1
].
wc
_str
())[
0
]
==
':'
)
((
const
char
*
)
mrl
[
i
+
1
].
mb
_str
())[
0
]
==
':'
)
{
psz_utf8
=
FromUTF32
(
mrl
[
i
+
1
].
wc_str
()
);
psz_utf8
=
wxFromLocale
(
mrl
[
i
+
1
]
);
playlist_ItemAddOption
(
p_item
,
psz_utf8
);
f
ree
(
psz_utf8
);
wxLocaleF
ree
(
psz_utf8
);
i
++
;
}
...
...
@@ -1167,9 +1167,9 @@ void OpenDialog::OnOk( wxCommandEvent& WXUNUSED(event) )
{
for
(
int
j
=
0
;
j
<
(
int
)
subsfile_mrl
.
GetCount
();
j
++
)
{
psz_utf8
=
FromUTF32
(
subsfile_mrl
[
j
].
wc_str
()
);
psz_utf8
=
wxFromLocale
(
subsfile_mrl
[
j
]
);
playlist_ItemAddOption
(
p_item
,
psz_utf8
);
f
ree
(
psz_utf8
);
wxLocaleF
ree
(
psz_utf8
);
}
}
...
...
@@ -1178,9 +1178,9 @@ void OpenDialog::OnOk( wxCommandEvent& WXUNUSED(event) )
{
for
(
int
j
=
0
;
j
<
(
int
)
sout_mrl
.
GetCount
();
j
++
)
{
psz_utf8
=
FromUTF32
(
sout_mrl
[
j
].
wc_str
()
);
psz_utf8
=
wxFromLocale
(
sout_mrl
[
j
]
);
playlist_ItemAddOption
(
p_item
,
psz_utf8
);
f
ree
(
psz_utf8
);
wxLocaleF
ree
(
psz_utf8
);
}
}
...
...
modules/gui/wxwidgets/wxwidgets.h
View file @
44b45d38
...
...
@@ -36,7 +36,6 @@
#include <list>
#define wxUSE_UNICODE 1
#include <wx/wxprec.h>
#include <wx/wx.h>
...
...
@@ -64,15 +63,31 @@ DECLARE_LOCAL_EVENT_TYPE( wxEVT_INTF, 1 );
/* wxU is used to convert ansi/utf8 strings to unicode strings (wchar_t) */
#if defined( ENABLE_NLS )
#if wxUSE_UNICODE
# define wxU(utf8) wxString(utf8, wxConvUTF8)
#else
# define wxU(utf8) wxString(wxConvUTF8.cMB2WC(utf8), *wxConvCurrent)
#endif
#else // ENABLE_NLS
#if wxUSE_UNICODE
# define wxU(ansi) wxString(ansi, wxConvLocal)
#else
# define wxU(ansi) (ansi)
#endif
#endif
/* wxL2U (locale to unicode) is used to convert ansi strings to unicode
* strings (wchar_t) */
#define wxL2U(ansi) wxU(ansi)
#if wxUSE_UNICODE
# define wxFromLocale(wxstring) FromUTF32(wxstring.wc_str())
# define wxLocaleFree(string) free(string)
#else
# define wxFromLocale(wxstring) FromLocale(wxstring.mb_str())
# define wxLocaleFree(string) LocaleFree(string)
#endif
#define WRAPCOUNT 80
#define OPEN_NORMAL 0
...
...
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