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
5fe42b8e
Commit
5fe42b8e
authored
Oct 21, 2006
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
I might have finally got it right
parent
37d272d3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
18 deletions
+8
-18
modules/gui/wxwidgets/wxwidgets.hpp
modules/gui/wxwidgets/wxwidgets.hpp
+8
-18
No files found.
modules/gui/wxwidgets/wxwidgets.hpp
View file @
5fe42b8e
...
@@ -110,15 +110,11 @@ DECLARE_LOCAL_EVENT_TYPE( wxEVT_INTF, 1 );
...
@@ -110,15 +110,11 @@ DECLARE_LOCAL_EVENT_TYPE( wxEVT_INTF, 1 );
/* From Locale functions to use for File Drop targets ... go figure */
/* From Locale functions to use for File Drop targets ... go figure */
#ifdef wxUSE_UNICODE
#ifdef wxUSE_UNICODE
#include <wchar.h>
static
inline
char
*
wxDnDFromLocale
(
const
wxChar
*
stupid
)
static
inline
char
*
wxDnDFromLocale
(
const
wxChar
*
stupid
)
{
{
/*
/*
* FIXME: this is yet another awful and ugly bug-to-bug work-around
* for the painfully broken and brain-dead wxWidgets character
* encoding internals. Maybe, one day the wxWidgets team will find out
* and we will have to remove (phew) this kludge or autodetect whether
* to trigger it (damn).
*
* In Unicode mode, wxWidgets will encode file names in the locale
* In Unicode mode, wxWidgets will encode file names in the locale
* encoding with each **bytes** (rather than characters) represented
* encoding with each **bytes** (rather than characters) represented
* by a 32 bits unsigned integer. If you are lucky enough to be using
* by a 32 bits unsigned integer. If you are lucky enough to be using
...
@@ -128,20 +124,14 @@ static inline char *wxDnDFromLocale( const wxChar *stupid )
...
@@ -128,20 +124,14 @@ static inline char *wxDnDFromLocale( const wxChar *stupid )
* UTF-8 but also Windows-1252(!) and ISO-8859-15(!) or any
* UTF-8 but also Windows-1252(!) and ISO-8859-15(!) or any
* non-western encoding, it obviously fails.
* non-western encoding, it obviously fails.
*/
*/
const
wxChar
*
braindead
;
size_t
n
=
wcslen
(
stupid
);
for
(
braindead
=
stupid
;
*
braindead
;
braindead
++
);
char
psz_local
[
n
+
1
];
size_t
i
=
(
braindead
-
stupid
);
char
psz_local
[
i
+
1
];
// Some X11 file browsers append a line feed to the filename...
for
(
size_t
i
=
0
;
i
<
n
;
i
++
)
psz_local
[
i
--
]
=
0
;
psz_local
[
i
]
=
stupid
[
i
];
if
(
stupid
[
i
]
==
'\n'
)
psz_local
[
i
--
]
=
0
;
do
if
((
n
>=
1
)
&&
(
stupid
[
n
-
1
]
==
'\n'
))
psz_local
[
i
]
=
(
char
)
stupid
[
i
];
psz_local
[
n
-
1
]
=
'\0'
;
while
(
i
--
);
return
FromLocaleDup
(
psz_local
);
return
FromLocaleDup
(
psz_local
);
}
}
...
...
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