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
a40a5116
Commit
a40a5116
authored
May 22, 2011
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: add popupAddToPlaylist
Close #4341
parent
303d976b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
3 deletions
+20
-3
modules/gui/qt4/components/playlist/playlist_model.cpp
modules/gui/qt4/components/playlist/playlist_model.cpp
+19
-3
modules/gui/qt4/components/playlist/playlist_model.hpp
modules/gui/qt4/components/playlist/playlist_model.hpp
+1
-0
No files found.
modules/gui/qt4/components/playlist/playlist_model.cpp
View file @
a40a5116
...
...
@@ -944,6 +944,8 @@ bool PLModel::popup( const QModelIndex & index, const QPoint &point, const QMode
}
if
(
i_popup_item
>
-
1
)
{
if
(
rootItem
->
id
()
!=
THEPL
->
p_playing
->
i_id
)
menu
.
addAction
(
qtr
(
"Add to playlist"
),
this
,
SLOT
(
popupAddToPlaylist
()
)
);
menu
.
addAction
(
QIcon
(
":/buttons/playlist/playlist_remove"
),
qtr
(
I_POP_DEL
),
this
,
SLOT
(
popupDel
()
)
);
menu
.
addSeparator
();
...
...
@@ -990,6 +992,22 @@ void PLModel::popupPlay()
PL_UNLOCK
;
}
void
PLModel
::
popupAddToPlaylist
()
{
playlist_Lock
(
THEPL
);
foreach
(
QModelIndex
currentIndex
,
current_selection
)
{
playlist_item_t
*
p_item
=
playlist_ItemGetById
(
THEPL
,
getId
(
currentIndex
)
);
if
(
!
p_item
)
continue
;
playlist_NodeAddCopy
(
THEPL
,
p_item
,
THEPL
->
p_playing
,
PLAYLIST_END
);
}
playlist_Unlock
(
THEPL
);
}
void
PLModel
::
popupInfo
()
{
PL_LOCK
;
...
...
@@ -1014,7 +1032,6 @@ void PLModel::popupStream()
QStringList
mrls
=
selectedURIs
();
if
(
!
mrls
.
isEmpty
()
)
THEDP
->
streamingDialog
(
NULL
,
mrls
[
0
],
false
);
}
void
PLModel
::
popupSave
()
...
...
@@ -1027,8 +1044,7 @@ void PLModel::popupSave()
void
PLModel
::
popupExplore
()
{
PL_LOCK
;
playlist_item_t
*
p_item
=
playlist_ItemGetById
(
p_playlist
,
i_popup_item
);
playlist_item_t
*
p_item
=
playlist_ItemGetById
(
p_playlist
,
i_popup_item
);
if
(
p_item
)
{
input_item_t
*
p_input
=
p_item
->
p_input
;
...
...
modules/gui/qt4/components/playlist/playlist_model.hpp
View file @
a40a5116
...
...
@@ -161,6 +161,7 @@ private slots:
void
popupSave
();
void
popupExplore
();
void
popupAddNode
();
void
popupAddToPlaylist
();
void
popupSort
(
int
column
);
void
processInputItemUpdate
(
input_item_t
*
);
void
processInputItemUpdate
(
input_thread_t
*
p_input
);
...
...
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