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
54aaf840
Commit
54aaf840
authored
Mar 07, 2006
by
Antoine Cellerier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix wx DnD once more.
parent
bc07639d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
9 deletions
+14
-9
modules/gui/wxwidgets/dialogs/playlist.cpp
modules/gui/wxwidgets/dialogs/playlist.cpp
+3
-2
modules/gui/wxwidgets/interface.cpp
modules/gui/wxwidgets/interface.cpp
+3
-2
modules/gui/wxwidgets/wxwidgets.hpp
modules/gui/wxwidgets/wxwidgets.hpp
+8
-5
No files found.
modules/gui/wxwidgets/dialogs/playlist.cpp
View file @
54aaf840
...
...
@@ -1292,12 +1292,13 @@ bool PlaylistFileDropTarget::OnDropFiles( wxCoord x, wxCoord y,
/* Put the items in the playlist node */
for
(
size_t
i
=
0
;
i
<
filenames
.
GetCount
();
i
++
)
{
const
char
*
psz_utf8
=
wxDnDFromLocale
(
filenames
[
i
]
);
char
*
psz_local
=
NULL
;
const
char
*
psz_utf8
=
wxDnDFromLocale
(
filenames
[
i
],
psz_local
);
playlist_item_t
*
p_item
=
playlist_ItemNew
(
p
->
p_playlist
,
psz_utf8
,
psz_utf8
);
playlist_NodeAddItem
(
p
->
p_playlist
,
p_item
,
p
->
i_current_view
,
p_dest
,
PLAYLIST_PREPARSE
,
i_pos
);
wxDnDLocaleFree
(
psz_utf8
);
wxDnDLocaleFree
(
psz_utf8
,
psz_local
);
}
/* FIXME: having this Rebuild() is dirty */
...
...
modules/gui/wxwidgets/interface.cpp
View file @
54aaf840
...
...
@@ -1261,13 +1261,14 @@ bool DragAndDrop::OnDropFiles( wxCoord, wxCoord,
for
(
size_t
i
=
0
;
i
<
filenames
.
GetCount
();
i
++
)
{
const
char
*
psz_utf8
=
wxDnDFromLocale
(
filenames
[
i
]
);
char
*
psz_local
=
NULL
;
const
char
*
psz_utf8
=
wxDnDFromLocale
(
filenames
[
i
],
psz_local
);
playlist_Add
(
p_playlist
,
psz_utf8
,
psz_utf8
,
PLAYLIST_APPEND
|
((
i
|
b_enqueue
)
?
0
:
PLAYLIST_GO
),
PLAYLIST_END
);
wxDnDLocaleFree
(
psz_utf8
);
wxDnDLocaleFree
(
psz_utf8
,
psz_local
);
}
vlc_object_release
(
p_playlist
);
...
...
modules/gui/wxwidgets/wxwidgets.hpp
View file @
54aaf840
...
...
@@ -98,7 +98,7 @@ DECLARE_LOCAL_EVENT_TYPE( wxEVT_INTF, 1 );
/* From Locale functions to use for File Drop targets ... go figure */
#ifdef wxUSE_UNICODE
inline
const
char
*
wxDnDFromLocale
(
const
wxChar
*
stupid
)
inline
const
char
*
wxDnDFromLocale
(
const
wxChar
*
stupid
,
char
*
psz_local
)
{
/*
* FIXME: this is yet another awful and ugly bug-to-bug work-around
...
...
@@ -120,19 +120,22 @@ inline const char *wxDnDFromLocale( const wxChar *stupid )
for
(
braindead
=
stupid
;
*
braindead
;
braindead
++
);
size_t
i
=
(
braindead
-
stupid
);
char
*
psz_local
=
(
char
*
)
malloc
(
i
+
1
);
psz_local
=
(
char
*
)
malloc
(
i
+
1
);
do
psz_local
[
i
]
=
(
char
)
stupid
[
i
];
while
(
i
--
);
const
char
*
psz_utf8
=
FromLocale
(
psz_local
);
free
(
psz_local
);
return
psz_utf8
;
}
#else
# define wxDnDFromLocale( string ) wxFromLocale( string )
# define wxDnDFromLocale( string, a ) wxFromLocale( string )
#endif
#ifdef wxUSE_UNICODE
# define wxDnDLocaleFree( string, a ) LocaleFree( string ); free( a )
#else
# define wxDnDLocaleFree( string, a ) wxLocaleFree( string )
#endif
#define wxDnDLocaleFree(string) LocaleFree( string )
#define WRAPCOUNT 80
...
...
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