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
96f22ac4
Commit
96f22ac4
authored
Mar 26, 2007
by
Yoann Peronneau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* use an int to select extension filters
parent
78d552dd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
18 deletions
+21
-18
modules/gui/qt4/components/open.cpp
modules/gui/qt4/components/open.cpp
+3
-4
modules/gui/qt4/dialogs_provider.cpp
modules/gui/qt4/dialogs_provider.cpp
+8
-11
modules/gui/qt4/dialogs_provider.hpp
modules/gui/qt4/dialogs_provider.hpp
+10
-3
No files found.
modules/gui/qt4/components/open.cpp
View file @
96f22ac4
...
@@ -55,7 +55,7 @@ FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
...
@@ -55,7 +55,7 @@ FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
fileTypes
.
replace
(
QString
(
";*"
),
QString
(
" *"
));
fileTypes
.
replace
(
QString
(
";*"
),
QString
(
" *"
));
// Make this QFileDialog a child of tempWidget from the ui.
// Make this QFileDialog a child of tempWidget from the ui.
dialogBox
=
new
QFileDialog
(
ui
.
tempWidget
,
NULL
,
dialogBox
=
new
QFileDialog
(
ui
.
tempWidget
,
NULL
,
qfu
(
p_intf
->
p_libvlc
->
psz_homedir
),
fileTypes
);
qfu
(
p_intf
->
p_libvlc
->
psz_homedir
),
fileTypes
);
dialogBox
->
setFileMode
(
QFileDialog
::
ExistingFiles
);
dialogBox
->
setFileMode
(
QFileDialog
::
ExistingFiles
);
/* We don't want to see a grip in the middle of the window, do we? */
/* We don't want to see a grip in the middle of the window, do we? */
...
@@ -120,10 +120,9 @@ void FileOpenPanel::browseFile()
...
@@ -120,10 +120,9 @@ void FileOpenPanel::browseFile()
void
FileOpenPanel
::
browseFileSub
()
void
FileOpenPanel
::
browseFileSub
()
{
{
// FIXME
We shouldn't allow the user to select
more than one subtitles file
// FIXME
Handle selection of
more than one subtitles file
QStringList
files
=
THEDP
->
showSimpleOpen
(
qtr
(
"Open subtitles file"
),
QStringList
files
=
THEDP
->
showSimpleOpen
(
qtr
(
"Open subtitles file"
),
false
,
false
,
false
,
EXT_FILTER_SUBTITLE
);
true
,
false
);
ui
.
subInput
->
setEditText
(
files
.
join
(
" "
)
);
ui
.
subInput
->
setEditText
(
files
.
join
(
" "
)
);
updateMRL
();
updateMRL
();
}
}
...
...
modules/gui/qt4/dialogs_provider.cpp
View file @
96f22ac4
...
@@ -195,25 +195,22 @@ void DialogsProvider::MLAppendDialog()
...
@@ -195,25 +195,22 @@ void DialogsProvider::MLAppendDialog()
}
}
/**** Simple open ****/
/**** Simple open ****/
QStringList
DialogsProvider
::
showSimpleOpen
(
QString
help
,
int
filters
)
QStringList
DialogsProvider
::
showSimpleOpen
(
QString
help
,
bool
all
,
bool
audio
,
bool
video
,
bool
subs
,
bool
pls
)
{
{
QString
fileTypes
=
""
;
QString
fileTypes
=
""
;
if
(
all
)
{
if
(
filters
&
EXT_FILTER_MEDIA
)
{
ADD_FILTER_MEDIA
(
fileTypes
);
ADD_FILTER_MEDIA
(
fileTypes
);
}
}
if
(
video
)
{
if
(
filters
&
EXT_FILTER_VIDEO
)
{
ADD_FILTER_VIDEO
(
fileTypes
);
ADD_FILTER_VIDEO
(
fileTypes
);
}
}
if
(
audio
)
{
if
(
filters
&
EXT_FILTER_AUDIO
)
{
ADD_FILTER_AUDIO
(
fileTypes
);
ADD_FILTER_AUDIO
(
fileTypes
);
}
}
if
(
pls
)
{
if
(
filters
&
EXT_FILTER_PLAYLIST
)
{
ADD_FILTER_PLAYLIST
(
fileTypes
);
ADD_FILTER_PLAYLIST
(
fileTypes
);
}
}
if
(
subs
)
{
if
(
filters
&
EXT_FILTER_SUBTITLE
)
{
ADD_FILTER_SUBTITLE
(
fileTypes
);
ADD_FILTER_SUBTITLE
(
fileTypes
);
}
}
ADD_FILTER_ALL
(
fileTypes
);
ADD_FILTER_ALL
(
fileTypes
);
...
@@ -259,8 +256,8 @@ void DialogsProvider::simpleOpenDialog()
...
@@ -259,8 +256,8 @@ void DialogsProvider::simpleOpenDialog()
void
DialogsProvider
::
openPlaylist
()
void
DialogsProvider
::
openPlaylist
()
{
{
QStringList
files
=
showSimpleOpen
(
qtr
(
"Open playlist file"
),
false
,
QStringList
files
=
showSimpleOpen
(
qtr
(
"Open playlist file"
),
false
,
false
,
false
);
EXT_FILTER_PLAYLIST
);
foreach
(
QString
file
,
files
)
foreach
(
QString
file
,
files
)
{
{
playlist_Import
(
THEPL
,
qtu
(
file
)
);
playlist_Import
(
THEPL
,
qtu
(
file
)
);
...
...
modules/gui/qt4/dialogs_provider.hpp
View file @
96f22ac4
...
@@ -33,6 +33,12 @@
...
@@ -33,6 +33,12 @@
#include <vlc/vlc.h>
#include <vlc/vlc.h>
#include <vlc_interface.h>
#include <vlc_interface.h>
#define EXT_FILTER_MEDIA 0x01
#define EXT_FILTER_VIDEO 0x02
#define EXT_FILTER_AUDIO 0x04
#define EXT_FILTER_PLAYLIST 0x08
#define EXT_FILTER_SUBTITLE 0x10
#define ADD_FILTER_MEDIA( string ) \
#define ADD_FILTER_MEDIA( string ) \
string += _("Media Files"); \
string += _("Media Files"); \
string += " ( "; \
string += " ( "; \
...
@@ -90,9 +96,10 @@ public:
...
@@ -90,9 +96,10 @@ public:
virtual
~
DialogsProvider
();
virtual
~
DialogsProvider
();
QTimer
*
fixed_timer
;
QTimer
*
fixed_timer
;
QStringList
showSimpleOpen
(
QString
help
=
QString
(),
bool
all
=
true
,
QStringList
showSimpleOpen
(
QString
help
=
QString
(),
bool
video
=
true
,
bool
audio
=
true
,
int
filters
=
EXT_FILTER_MEDIA
|
bool
subs
=
false
,
bool
pls
=
true
);
EXT_FILTER_VIDEO
|
EXT_FILTER_AUDIO
|
EXT_FILTER_PLAYLIST
);
protected:
protected:
friend
class
QVLCMenu
;
friend
class
QVLCMenu
;
QSignalMapper
*
menusMapper
;
QSignalMapper
*
menusMapper
;
...
...
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