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
3ce16b37
Commit
3ce16b37
authored
Dec 08, 2011
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: simplify media filters
parent
f1790cf4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
34 deletions
+17
-34
modules/gui/qt4/dialogs_provider.cpp
modules/gui/qt4/dialogs_provider.cpp
+6
-6
modules/gui/qt4/dialogs_provider.hpp
modules/gui/qt4/dialogs_provider.hpp
+11
-28
No files found.
modules/gui/qt4/dialogs_provider.cpp
View file @
3ce16b37
...
...
@@ -401,21 +401,21 @@ QStringList DialogsProvider::showSimpleOpen( const QString& help,
{
QString
fileTypes
=
""
;
if
(
filters
&
EXT_FILTER_MEDIA
)
{
ADD_
FILTER_MEDIA
(
fileTypes
);
ADD_
EXT_FILTER
(
fileTypes
,
EXTENSIONS_MEDIA
);
}
if
(
filters
&
EXT_FILTER_VIDEO
)
{
ADD_
FILTER_VIDEO
(
fileTypes
);
ADD_
EXT_FILTER
(
fileTypes
,
EXTENSIONS_VIDEO
);
}
if
(
filters
&
EXT_FILTER_AUDIO
)
{
ADD_
FILTER_AUDIO
(
fileTypes
);
ADD_
EXT_FILTER
(
fileTypes
,
EXTENSIONS_AUDIO
);
}
if
(
filters
&
EXT_FILTER_PLAYLIST
)
{
ADD_
FILTER_PLAYLIST
(
fileTypes
);
ADD_
EXT_FILTER
(
fileTypes
,
EXTENSIONS_PLAYLIST
);
}
if
(
filters
&
EXT_FILTER_SUBTITLE
)
{
ADD_
FILTER_SUBTITLE
(
fileTypes
);
ADD_
EXT_FILTER
(
fileTypes
,
EXTENSIONS_SUBTITLE
);
}
ADD_
FILTER_ALL
(
fileTypes
);
ADD_
EXT_FILTER
(
fileTypes
,
EXTENSIONS_ALL
);
fileTypes
.
replace
(
";*"
,
" *"
);
QStringList
files
=
QFileDialog
::
getOpenFileNames
(
NULL
,
...
...
modules/gui/qt4/dialogs_provider.hpp
View file @
3ce16b37
...
...
@@ -37,34 +37,17 @@
#include <QObject>
#include <QStringList>
#define ADD_FILTER_MEDIA( string ) \
string += qtr( "Media Files" ); \
string += " ( "; \
string += EXTENSIONS_MEDIA; \
string += ");;";
#define ADD_FILTER_VIDEO( string ) \
string += qtr( "Video Files" ); \
string += " ( "; \
string += EXTENSIONS_VIDEO; \
string += ");;";
#define ADD_FILTER_AUDIO( string ) \
string += qtr( "Audio Files" ); \
string += " ( "; \
string += EXTENSIONS_AUDIO; \
string += ");;";
#define ADD_FILTER_PLAYLIST( string ) \
string += qtr( "Playlist Files" ); \
string += " ( "; \
string += EXTENSIONS_PLAYLIST; \
string += ");;";
#define ADD_FILTER_SUBTITLE( string ) \
string += qtr( "Subtitles Files" );\
string += " ( "; \
string += EXTENSIONS_SUBTITLE; \
string += ");;";
#define ADD_FILTER_ALL( string ) \
string += qtr( "All Files" ); \
string += " (*)";
#define TITLE_EXTENSIONS_MEDIA qtr( "Media Files" )
#define TITLE_EXTENSIONS_VIDEO qtr( "Video Files" )
#define TITLE_EXTENSIONS_AUDIO qtr( "Audio Files" )
#define TITLE_EXTENSIONS_PLAYLIST qtr( "Playlist Files" )
#define TITLE_EXTENSIONS_SUBTITLE qtr( "Subtitles Files" )
#define TITLE_EXTENSIONS_ALL qtr( "All Files" )
#define EXTENSIONS_ALL "*"
#define ADD_EXT_FILTER( string, type ) \
string = string + QString("%1 ( %2 );;") \
.arg( TITLE_##type ) \
.arg( QString( type ) );
enum
{
EXT_FILTER_MEDIA
=
0x01
,
...
...
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