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
ee145e3a
Commit
ee145e3a
authored
Nov 01, 2009
by
Jakob Leben
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4: disable removing service discovery items
parent
c235001a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
9 deletions
+17
-9
modules/gui/qt4/components/playlist/playlist_model.cpp
modules/gui/qt4/components/playlist/playlist_model.cpp
+16
-9
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 @
ee145e3a
...
@@ -113,15 +113,7 @@ Qt::ItemFlags PLModel::flags( const QModelIndex &index ) const
...
@@ -113,15 +113,7 @@ Qt::ItemFlags PLModel::flags( const QModelIndex &index ) const
PLItem
*
item
=
index
.
isValid
()
?
getItem
(
index
)
:
rootItem
;
PLItem
*
item
=
index
.
isValid
()
?
getItem
(
index
)
:
rootItem
;
input_item_t
*
pl_input
=
if
(
canEdit
()
)
p_playlist
->
p_local_category
?
p_playlist
->
p_local_category
->
p_input
:
NULL
;
input_item_t
*
ml_input
=
p_playlist
->
p_ml_category
?
p_playlist
->
p_ml_category
->
p_input
:
NULL
;
if
(
(
pl_input
&&
rootItem
->
p_input
==
pl_input
)
||
(
ml_input
&&
rootItem
->
p_input
==
ml_input
)
)
{
{
PL_LOCK
;
PL_LOCK
;
playlist_item_t
*
plItem
=
playlist_item_t
*
plItem
=
...
@@ -610,6 +602,19 @@ int PLModel::columnFromMeta( int meta_col ) const
...
@@ -610,6 +602,19 @@ int PLModel::columnFromMeta( int meta_col ) const
return
column
;
return
column
;
}
}
bool
PLModel
::
canEdit
()
const
{
return
(
rootItem
!=
NULL
&&
(
rootItem
->
p_input
==
p_playlist
->
p_local_category
->
p_input
||
(
p_playlist
->
p_ml_category
&&
rootItem
->
p_input
==
p_playlist
->
p_ml_category
->
p_input
)
)
);
}
/************************* Updates handling *****************************/
/************************* Updates handling *****************************/
void
PLModel
::
customEvent
(
QEvent
*
event
)
void
PLModel
::
customEvent
(
QEvent
*
event
)
{
{
...
@@ -823,6 +828,8 @@ void PLModel::updateTreeItem( PLItem *item )
...
@@ -823,6 +828,8 @@ void PLModel::updateTreeItem( PLItem *item )
*/
*/
void
PLModel
::
doDelete
(
QModelIndexList
selected
)
void
PLModel
::
doDelete
(
QModelIndexList
selected
)
{
{
if
(
!
canEdit
()
)
return
;
for
(
int
i
=
selected
.
size
()
-
1
;
i
>=
0
;
i
--
)
for
(
int
i
=
selected
.
size
()
-
1
;
i
>=
0
;
i
--
)
{
{
QModelIndex
index
=
selected
[
i
];
QModelIndex
index
=
selected
[
i
];
...
...
modules/gui/qt4/components/playlist/playlist_model.hpp
View file @
ee145e3a
...
@@ -171,6 +171,7 @@ private:
...
@@ -171,6 +171,7 @@ private:
static
inline
PLItem
*
getItem
(
QModelIndex
index
);
static
inline
PLItem
*
getItem
(
QModelIndex
index
);
int
columnFromMeta
(
int
meta_column
)
const
;
int
columnFromMeta
(
int
meta_column
)
const
;
int
columnToMeta
(
int
column
)
const
;
int
columnToMeta
(
int
column
)
const
;
bool
canEdit
()
const
;
PLItem
*
p_cached_item
;
PLItem
*
p_cached_item
;
PLItem
*
p_cached_item_bi
;
PLItem
*
p_cached_item_bi
;
int
i_cached_id
;
int
i_cached_id
;
...
...
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