Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
dfb262bd
Commit
dfb262bd
authored
May 28, 2006
by
zorglub
Browse files
File type filters and implementation in WX. Refs:#24
Thanks to Steven Sheehy and sorry for the delay :)
parent
f30c349b
Changes
4
Hide whitespace changes
Inline
Side-by-side
include/vlc_interface.h
View file @
dfb262bd
...
...
@@ -176,3 +176,14 @@ VLC_EXPORT( void, intf_Destroy, ( intf_thread_t * ) );
/* Useful text messages shared by interfaces */
#define INTF_ABOUT_MSG LICENSE_MSG
#define EXTENSIONS_AUDIO "*.a52;*.aac;*.ac3;*.dts;*.flac;*.m4a;*.m4p;*.mka;" \
"*.mod;*.mp1;*.mp2;*.mp3;*.ogg;*.spx;*.wav;*.wma;*.xm"
#define EXTENSIONS_VIDEO "*.asf;*.avi;*.divx;*.dv;*.m1v;*.m2v;*.m4v;*.mkv;" \
"*.mov;*.mp2;*.mp4;*.mpeg;*.mpeg1;*.mpeg2;*.mpeg4;" \
"*.mpg;*.ogg;*.ogm;*.ps;*.ts;*.vob;*.wmv"
#define EXTENSIONS_PLAYLIST "*.asx;*.b4s;*.m3u;*.pls;*.vlc;*.xspf"
#define EXTENSIONS_SUBTITLE "*.idx;*.srt;*.sub;*.utf"
modules/gui/wxwidgets/dialogs.cpp
View file @
dfb262bd
...
...
@@ -430,6 +430,12 @@ void DialogsProvider::OnOpenFileSimple( wxCommandEvent& event )
p_file_dialog
=
new
wxFileDialog
(
NULL
,
wxU
(
_
(
"Open File"
)),
wxT
(
""
),
wxT
(
""
),
wxT
(
"*"
),
wxOPEN
|
wxMULTIPLE
);
p_file_dialog
->
SetWildcard
(
wxU
(
_
(
"All Files (*.*)|*"
"|Sound Files (*.mp3, *.ogg, etc.)|"
EXTENSIONS_AUDIO
"|Video Files (*.avi, *.mpg, etc.)|"
EXTENSIONS_VIDEO
"|Playlist Files (*.m3u, *.pls, etc.)|"
EXTENSIONS_PLAYLIST
"|Subtitle Files (*.srt, *.sub, etc.)|"
EXTENSIONS_SUBTITLE
)));
if
(
p_file_dialog
&&
p_file_dialog
->
ShowModal
()
==
wxID_OK
)
{
wxArrayString
paths
;
...
...
modules/gui/wxwidgets/dialogs/open.cpp
View file @
dfb262bd
...
...
@@ -1262,6 +1262,12 @@ void OpenDialog::OnFileBrowse( wxCommandEvent& WXUNUSED(event) )
file_dialog
=
new
wxFileDialog
(
this
,
wxU
(
_
(
"Open File"
)),
wxT
(
""
),
wxT
(
""
),
wxT
(
"*"
),
wxOPEN
|
wxMULTIPLE
);
p_file_dialog
->
SetWildcard
(
wxU
(
_
(
"All Files (*.*)|*"
"|Sound Files (*.mp3, *.ogg, etc.)|"
EXTENSIONS_AUDIO
"|Video Files (*.avi, *.mpg, etc.)|"
EXTENSIONS_VIDEO
"|Playlist Files (*.m3u, *.pls, etc.)|"
EXTENSIONS_PLAYLIST
"|Subtitle Files (*.srt, *.sub, etc.)|"
EXTENSIONS_SUBTITLE
)));
if
(
file_dialog
&&
file_dialog
->
ShowModal
()
==
wxID_OK
)
{
wxArrayString
paths
;
...
...
modules/gui/wxwidgets/dialogs/playlist.cpp
View file @
dfb262bd
...
...
@@ -971,7 +971,7 @@ void Playlist::OnSave( wxCommandEvent& WXUNUSED(event) )
void
Playlist
::
OnOpen
(
wxCommandEvent
&
WXUNUSED
(
event
)
)
{
wxFileDialog
dialog
(
this
,
wxU
(
_
(
"Open playlist"
)),
wxT
(
""
),
wxT
(
""
),
wxT
(
"All playlists|
*.pls;*.m3u;*.asx;*.b4s;*.xspf
|XSPF playlist|*.xspf|M3U files|*.m3u"
),
wxOPEN
);
wxT
(
"All playlists|
"
EXTENSIONS_PLAYLIST
"
|XSPF playlist|*.xspf|M3U files|*.m3u"
),
wxOPEN
);
if
(
dialog
.
ShowModal
()
==
wxID_OK
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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