Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
78d552dd
Commit
78d552dd
authored
Mar 26, 2007
by
Yoann Peronneau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* open dialog: options like :sub-file= are now added to input (ie "use subtitles" now works)
parent
4c906ee3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
27 deletions
+34
-27
modules/gui/qt4/dialogs/open.cpp
modules/gui/qt4/dialogs/open.cpp
+33
-27
modules/gui/qt4/dialogs/open.hpp
modules/gui/qt4/dialogs/open.hpp
+1
-0
No files found.
modules/gui/qt4/dialogs/open.cpp
View file @
78d552dd
...
...
@@ -127,33 +127,39 @@ void OpenDialog::playOrEnqueue( bool b_enqueue = false )
{
this
->
toggleVisible
();
mrl
=
ui
.
advancedLineInput
->
text
();
QStringList
tempMRL
=
mrl
.
split
(
QRegExp
(
"
\"\\
s+
\"
"
),
QString
::
SkipEmptyParts
);
if
(
!
isModal
()
)
{
for
(
size_t
i
=
0
;
i
<
tempMRL
.
size
();
i
++
)
QStringList
tempMRL
=
SeparateEntries
(
mrl
);
for
(
size_t
i
=
0
;
i
<
tempMRL
.
size
();
i
++
)
{
QString
mrli
=
tempMRL
[
i
].
remove
(
QRegExp
(
"^
\"
"
)
).
remove
(
QRegExp
(
"
\"\\
s+$"
)
);
const
char
*
psz_utf8
=
qtu
(
tempMRL
[
i
]
);
if
(
b_enqueue
)
{
/* Enqueue and Preparse all items*/
playlist_Add
(
THEPL
,
psz_utf8
,
NULL
,
PLAYLIST_APPEND
|
PLAYLIST_PREPARSE
,
PLAYLIST_END
,
VLC_TRUE
,
VLC_FALSE
);
}
else
{
/* Play the first one, parse and enqueue the other ones */
playlist_Add
(
THEPL
,
psz_utf8
,
NULL
,
PLAYLIST_APPEND
|
(
i
?
0
:
PLAYLIST_GO
)
|
(
i
?
PLAYLIST_PREPARSE
:
0
),
PLAYLIST_END
,
VLC_TRUE
,
VLC_FALSE
);
}
bool
b_start
=
!
i
&&
!
b_enqueue
;
input_item_t
*
p_input
;
const
char
*
psz_utf8
=
qtu
(
tempMRL
[
i
]
);
p_input
=
input_ItemNew
(
p_intf
,
psz_utf8
,
NULL
);
/* Insert options */
while
(
i
+
1
<
tempMRL
.
size
()
&&
tempMRL
[
i
+
1
].
startsWith
(
":"
)
)
{
i
++
;
psz_utf8
=
qtu
(
tempMRL
[
i
]
);
input_ItemAddOption
(
p_input
,
psz_utf8
);
}
if
(
b_start
)
{
playlist_AddInput
(
THEPL
,
p_input
,
PLAYLIST_APPEND
|
PLAYLIST_GO
,
PLAYLIST_END
,
VLC_TRUE
,
VLC_FALSE
);
}
else
{
playlist_AddInput
(
THEPL
,
p_input
,
PLAYLIST_APPEND
|
PLAYLIST_PREPARSE
,
PLAYLIST_END
,
VLC_TRUE
,
VLC_FALSE
);
}
}
}
else
accept
();
...
...
@@ -207,7 +213,7 @@ void OpenDialog::newMethod(QString method)
}
}
QStringList
SeparateEntries
(
QString
entries
)
QStringList
OpenDialog
::
SeparateEntries
(
QString
entries
)
{
bool
b_quotes_mode
=
false
;
...
...
@@ -217,9 +223,9 @@ QStringList SeparateEntries( QString entries )
int
index
=
0
;
while
(
index
<
entries
.
size
()
)
{
int
delim_pos
=
entries
.
indexOf
(
QRegExp
(
"
\\
s+"
),
index
);
int
delim_pos
=
entries
.
indexOf
(
QRegExp
(
"
\\
s+
|
\"
"
),
index
);
if
(
delim_pos
<
0
)
delim_pos
=
entries
.
size
()
-
1
;
entry
+=
entries
.
mid
(
index
,
delim_pos
);
entry
+=
entries
.
mid
(
index
,
delim_pos
-
index
+
1
);
index
=
delim_pos
+
1
;
if
(
entry
.
isEmpty
()
)
continue
;
...
...
@@ -244,7 +250,7 @@ QStringList SeparateEntries( QString entries )
entry
.
endsWith
(
"
\r
"
)
||
entry
.
endsWith
(
"
\n
"
)
)
entry
.
truncate
(
entry
.
size
()
-
1
);
if
(
!
entry
.
isEmpty
()
)
entries_array
.
append
(
entry
);
entry
=
""
;
entry
.
clear
()
;
}
else
{;}
...
...
modules/gui/qt4/dialogs/open.hpp
View file @
78d552dd
...
...
@@ -66,6 +66,7 @@ private:
int
advHeight
,
mainHeight
;
void
playOrEnqueue
(
bool
);
QStringList
SeparateEntries
(
QString
);
private
slots
:
void
cancel
();
void
play
();
...
...
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