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
885113ae
Commit
885113ae
authored
Mar 25, 2007
by
Yoann Peronneau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Use subtitles file extension filter for the "Open subtitles file" dialog.
parent
43caf180
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
4 deletions
+16
-4
modules/gui/qt4/components/open.cpp
modules/gui/qt4/components/open.cpp
+6
-2
modules/gui/qt4/dialogs_provider.cpp
modules/gui/qt4/dialogs_provider.cpp
+4
-1
modules/gui/qt4/dialogs_provider.hpp
modules/gui/qt4/dialogs_provider.hpp
+6
-1
No files found.
modules/gui/qt4/components/open.cpp
View file @
885113ae
...
...
@@ -111,7 +111,7 @@ QStringList FileOpenPanel::browse(QString help)
void
FileOpenPanel
::
browseFile
()
{
QString
fileString
=
""
;
foreach
(
QString
file
,
dialogBox
->
selectedFiles
()
)
{
foreach
(
QString
file
,
dialogBox
->
selectedFiles
()
)
{
fileString
+=
"
\"
"
+
file
+
"
\"
"
;
}
ui
.
fileInput
->
setEditText
(
fileString
);
...
...
@@ -120,7 +120,11 @@ void FileOpenPanel::browseFile()
void
FileOpenPanel
::
browseFileSub
()
{
ui
.
subInput
->
setEditText
(
browse
(
qtr
(
"Open subtitles file"
)
).
join
(
" "
)
);
// FIXME We shouldn't allow the user to select more than one subtitles file
QStringList
files
=
THEDP
->
showSimpleOpen
(
qtr
(
"Open subtitles file"
),
false
,
false
,
false
,
true
,
false
);
ui
.
subInput
->
setEditText
(
files
.
join
(
" "
)
);
updateMRL
();
}
...
...
modules/gui/qt4/dialogs_provider.cpp
View file @
885113ae
...
...
@@ -213,12 +213,15 @@ QStringList DialogsProvider::showSimpleOpen(QString help, bool all,
if
(
pls
)
{
ADD_FILTER_PLAYLIST
(
fileTypes
);
}
if
(
subs
)
{
ADD_FILTER_SUBTITLE
(
fileTypes
);
}
ADD_FILTER_ALL
(
fileTypes
);
fileTypes
.
replace
(
QString
(
";*"
),
QString
(
" *"
));
return
QFileDialog
::
getOpenFileNames
(
NULL
,
help
.
isNull
()
?
qfu
(
I_OP_SEL_FILES
)
:
help
,
qfu
(
p_intf
->
p_libvlc
->
psz_homedir
),
qfu
(
p_intf
->
p_libvlc
->
psz_homedir
),
fileTypes
);
}
...
...
modules/gui/qt4/dialogs_provider.hpp
View file @
885113ae
...
...
@@ -53,6 +53,11 @@
string += " ( "; \
string += EXTENSIONS_PLAYLIST; \
string += ");;";
#define ADD_FILTER_SUBTITLE( string )\
string += _("Subtitles Files"); \
string += " ( "; \
string += EXTENSIONS_SUBTITLE; \
string += ");;";
#define ADD_FILTER_ALL( string ) \
string += _("All Files"); \
string += " (*.*)";
...
...
@@ -87,7 +92,7 @@ public:
QStringList
showSimpleOpen
(
QString
help
=
QString
(),
bool
all
=
true
,
bool
video
=
true
,
bool
audio
=
true
,
bool
subs
=
tru
e
,
bool
pls
=
true
);
bool
subs
=
fals
e
,
bool
pls
=
true
);
protected:
friend
class
QVLCMenu
;
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