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
ed388490
Commit
ed388490
authored
Aug 18, 2009
by
Jakob Leben
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4: allow adding node under playlist root item
parent
5a38d2b2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
14 deletions
+21
-14
modules/gui/qt4/components/playlist/playlist_model.cpp
modules/gui/qt4/components/playlist/playlist_model.cpp
+21
-13
modules/gui/qt4/components/playlist/standardpanel.cpp
modules/gui/qt4/components/playlist/standardpanel.cpp
+0
-1
No files found.
modules/gui/qt4/components/playlist/playlist_model.cpp
View file @
ed388490
...
@@ -941,9 +941,11 @@ void PLModel::search( const QString& search_text )
...
@@ -941,9 +941,11 @@ void PLModel::search( const QString& search_text )
/*********** Popup *********/
/*********** Popup *********/
void
PLModel
::
popup
(
QModelIndex
&
index
,
QPoint
&
point
,
QModelIndexList
list
)
void
PLModel
::
popup
(
QModelIndex
&
index
,
QPoint
&
point
,
QModelIndexList
list
)
{
{
assert
(
index
.
isValid
()
);
PL_LOCK
;
PL_LOCK
;
playlist_item_t
*
p_item
=
playlist_ItemGetById
(
p_playlist
,
itemId
(
index
)
);
int
i_id
;
if
(
index
.
isValid
()
)
i_id
=
itemId
(
index
);
else
i_id
=
rootItem
->
i_id
;
playlist_item_t
*
p_item
=
playlist_ItemGetById
(
p_playlist
,
i_id
);
if
(
p_item
)
if
(
p_item
)
{
{
i_popup_item
=
p_item
->
i_id
;
i_popup_item
=
p_item
->
i_id
;
...
@@ -964,22 +966,28 @@ void PLModel::popup( QModelIndex & index, QPoint &point, QModelIndexList list )
...
@@ -964,22 +966,28 @@ void PLModel::popup( QModelIndex & index, QPoint &point, QModelIndexList list )
current_selection
=
list
;
current_selection
=
list
;
QMenu
*
menu
=
new
QMenu
;
QMenu
*
menu
=
new
QMenu
;
menu
->
addAction
(
qtr
(
I_POP_PLAY
),
this
,
SLOT
(
popupPlay
()
)
);
if
(
index
.
isValid
()
)
menu
->
addAction
(
qtr
(
I_POP_DEL
),
this
,
SLOT
(
popupDel
()
)
);
menu
->
addSeparator
();
menu
->
addAction
(
qtr
(
I_POP_STREAM
),
this
,
SLOT
(
popupStream
()
)
);
menu
->
addAction
(
qtr
(
I_POP_SAVE
),
this
,
SLOT
(
popupSave
()
)
);
menu
->
addSeparator
();
menu
->
addAction
(
qtr
(
I_POP_INFO
),
this
,
SLOT
(
popupInfo
()
)
);
if
(
node
)
{
{
menu
->
addAction
(
qtr
(
I_POP_PLAY
),
this
,
SLOT
(
popupPlay
()
)
);
menu
->
addAction
(
qtr
(
I_POP_DEL
),
this
,
SLOT
(
popupDel
()
)
);
menu
->
addSeparator
();
menu
->
addAction
(
qtr
(
I_POP_STREAM
),
this
,
SLOT
(
popupStream
()
)
);
menu
->
addAction
(
qtr
(
I_POP_SAVE
),
this
,
SLOT
(
popupSave
()
)
);
menu
->
addSeparator
();
menu
->
addSeparator
();
menu
->
addAction
(
qtr
(
I_POP_INFO
),
this
,
SLOT
(
popupInfo
()
)
);
}
if
(
node
)
{
if
(
index
.
isValid
()
)
menu
->
addSeparator
();
menu
->
addAction
(
qtr
(
I_POP_SORT
),
this
,
SLOT
(
popupSort
()
)
);
menu
->
addAction
(
qtr
(
I_POP_SORT
),
this
,
SLOT
(
popupSort
()
)
);
if
(
tree
)
;
if
(
tree
)
menu
->
addAction
(
qtr
(
I_POP_ADD
),
this
,
SLOT
(
popupAddNode
()
)
);
menu
->
addAction
(
qtr
(
I_POP_ADD
),
this
,
SLOT
(
popupAddNode
()
)
);
}
}
menu
->
addSeparator
();
if
(
index
.
isValid
()
)
menu
->
addAction
(
qtr
(
I_POP_EXPLORE
),
this
,
SLOT
(
popupExplore
()
)
);
{
menu
->
addSeparator
();
menu
->
addAction
(
qtr
(
I_POP_EXPLORE
),
this
,
SLOT
(
popupExplore
()
)
);
}
menu
->
popup
(
point
);
menu
->
popup
(
point
);
}
}
else
else
...
...
modules/gui/qt4/components/playlist/standardpanel.cpp
View file @
ed388490
...
@@ -336,7 +336,6 @@ void StandardPLPanel::search( const QString& searchText )
...
@@ -336,7 +336,6 @@ void StandardPLPanel::search( const QString& searchText )
void
StandardPLPanel
::
doPopup
(
QModelIndex
index
,
QPoint
point
)
void
StandardPLPanel
::
doPopup
(
QModelIndex
index
,
QPoint
point
)
{
{
if
(
!
index
.
isValid
()
)
return
;
QItemSelectionModel
*
selection
=
view
->
selectionModel
();
QItemSelectionModel
*
selection
=
view
->
selectionModel
();
QModelIndexList
list
=
selection
->
selectedIndexes
();
QModelIndexList
list
=
selection
->
selectedIndexes
();
model
->
popup
(
index
,
point
,
list
);
model
->
popup
(
index
,
point
,
list
);
...
...
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