Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
406f8371
Commit
406f8371
authored
Mar 13, 2007
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4 - Open Dialog. Add an enqueue button.
parent
403b22d1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
10 deletions
+29
-10
modules/gui/qt4/dialogs/open.cpp
modules/gui/qt4/dialogs/open.cpp
+19
-7
modules/gui/qt4/dialogs/open.hpp
modules/gui/qt4/dialogs/open.hpp
+1
-1
modules/gui/qt4/ui/open.ui
modules/gui/qt4/ui/open.ui
+9
-2
No files found.
modules/gui/qt4/dialogs/open.cpp
View file @
406f8371
...
...
@@ -74,8 +74,9 @@ OpenDialog::OpenDialog( QWidget *parent, intf_thread_t *_p_intf, bool modal ) :
CONNECT
(
ui
.
slaveText
,
textChanged
(
QString
),
this
,
updateMRL
());
CONNECT
(
ui
.
cacheSpinBox
,
valueChanged
(
int
),
this
,
updateMRL
());
BUTTONACT
(
ui
.
closeButton
,
ok
());
BUTTONACT
(
ui
.
closeButton
,
playOrEnqueue
());
BUTTONACT
(
ui
.
cancelButton
,
cancel
());
BUTTONACT
(
ui
.
enqueueButton
,
playOrEnqueue
(
true
));
BUTTONACT
(
ui
.
advancedCheckBox
,
toggleAdvancedPanel
()
);
/* Initialize caching */
...
...
@@ -110,7 +111,7 @@ void OpenDialog::cancel()
reject
();
}
void
OpenDialog
::
ok
(
)
void
OpenDialog
::
playOrEnqueue
(
bool
b_enqueue
=
false
)
{
this
->
toggleVisible
();
mrl
=
ui
.
advancedLineInput
->
text
();
...
...
@@ -123,12 +124,23 @@ void OpenDialog::ok()
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
);
}
}
}
else
...
...
modules/gui/qt4/dialogs/open.hpp
View file @
406f8371
...
...
@@ -66,7 +66,7 @@ private:
int
advHeight
,
mainHeight
;
private
slots
:
void
cancel
();
void
ok
(
);
void
playOrEnqueue
(
bool
);
void
toggleAdvancedPanel
();
void
updateMRL
(
QString
);
void
updateMRL
();
...
...
modules/gui/qt4/ui/open.ui
View file @
406f8371
...
...
@@ -9,7 +9,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>
525
</width>
<width>
440
</width>
<height>231</height>
</rect>
</property>
...
...
@@ -164,10 +164,17 @@
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="enqueueButton" >
<property name="text" >
<string>Enqueue</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="closeButton" >
<property name="text" >
<string>
Open
</string>
<string>
Play
</string>
</property>
</widget>
</item>
...
...
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