Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
f9c3744e
Commit
f9c3744e
authored
Jan 21, 2006
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ugly bug-to-bug fix for wxWidgets drag'n'drop (closes #507)
parent
5f438ca0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
1 deletion
+38
-1
modules/gui/wxwidgets/interface.cpp
modules/gui/wxwidgets/interface.cpp
+38
-1
No files found.
modules/gui/wxwidgets/interface.cpp
View file @
f9c3744e
/*****************************************************************************
* interface.cpp : wxWidgets plugin for vlc
*****************************************************************************
* Copyright (C) 2000-200
5
the VideoLAN team
* Copyright (C) 2000-200
6
the VideoLAN team
* $Id$
*
* Authors: Gildas Bazin <gbazin@videolan.org>
...
...
@@ -1255,12 +1255,49 @@ bool DragAndDrop::OnDropFiles( wxCoord, wxCoord,
for
(
size_t
i
=
0
;
i
<
filenames
.
GetCount
();
i
++
)
{
#ifdef wxUSE_UNICODE
/*
* 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
* encoding with each **bytes** (rather than characters) represented
* by a 32 bits unsigned integer. If you are lucky enough to be using
* ISO-8859-1 as your local character encoding, that lame encoding
* scheme happens to be identical to UTF-32 with your arch native
* byte-endianess. If you are using anything else, including not only
* UTF-8 but also Windows-1252(!) and ISO-8859-15(!) or any
* non-western encoding, it obviously fails.
*/
unsigned
len
=
1
;
const
wxChar
*
stupid
=
filenames
[
i
];
for
(
const
wxChar
*
braindead
=
stupid
;
*
braindead
;
braindead
++
)
len
++
;
char
*
psz_local
=
(
char
*
)
malloc
(
len
);
do
psz_local
[
len
]
=
(
char
)
stupid
[
len
];
while
(
len
--
);
fprintf
(
stderr
,
"local =
\"
%s
\"\n
"
,
psz_local
);
char
*
psz_utf8
=
FromLocale
(
psz_local
);
fprintf
(
stderr
,
"utf8 =
\"
%s
\"\n
"
,
psz_utf8
);
#else
char
*
psz_utf8
=
wxFromLocale
(
filenames
[
i
]
);
#endif
playlist_Add
(
p_playlist
,
psz_utf8
,
psz_utf8
,
PLAYLIST_APPEND
|
((
i
|
b_enqueue
)
?
0
:
PLAYLIST_GO
),
PLAYLIST_END
);
#ifdef wxUSE_UNICODE
LocaleFree
(
psz_utf8
);
free
(
psz_local
);
#else
wxLocaleFree
(
psz_utf8
);
#endif
}
vlc_object_release
(
p_playlist
);
...
...
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