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
8d183679
Commit
8d183679
authored
Jun 28, 2005
by
Benjamin Pracht
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Don't select items that are in a selected node for drag'n'drop
parent
fa5d2c03
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
6 deletions
+49
-6
modules/gui/macosx/playlist.m
modules/gui/macosx/playlist.m
+49
-6
No files found.
modules/gui/macosx/playlist.m
View file @
8d183679
...
...
@@ -369,11 +369,13 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
int
i
;
vlc_mutex_lock
(
&
p_playlist
->
object_lock
);
// Let's check if we can do without that
#if 0
/* Since outlineView: willDisplayCell:... may call this function with
p_items that don't exist anymore, first check if the item is still
in the playlist. Any cleaner solution welcomed. */
for
(
i
=
0
;
i
<
p_playlist
->
i_all_size
;
i
++
)
{
if( p_playlist->pp_all_items[i] == p_item ) break;
else if ( i == p_playlist->i_all_size - 1 )
...
...
@@ -383,7 +385,7 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
return NO;
}
}
#endif
while
(
p_temp_item
->
i_parents
>
0
)
{
for
(
i
=
0
;
i
<
p_temp_item
->
i_parents
;
i
++
)
...
...
@@ -1319,10 +1321,12 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
/* Required for drag & drop and reordering */
-
(
BOOL
)
outlineView
:(
NSOutlineView
*
)
outlineView
writeItems
:(
NSArray
*
)
items
toPasteboard
:(
NSPasteboard
*
)
pboard
{
unsigned
int
i
;
unsigned
int
i
,
j
;
playlist_t
*
p_playlist
=
vlc_object_find
(
VLCIntf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
NSArray
*
o_array
;
NSMutableArray
*
o_nodes_array
=
[
NSMutableArray
array
];
NSMutableArray
*
o_items_array
=
[
NSMutableArray
array
];
NSMutableArray
*
o_objects_array
=
[
NSMutableArray
array
];
if
(
!
p_playlist
)
return
NO
;
...
...
@@ -1339,11 +1343,50 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
vlc_object_release
(
p_playlist
);
return
NO
;
}
if
(
((
playlist_item_t
*
)[
o_item
pointerValue
])
->
i_children
>
0
)
[
o_nodes_array
addObject
:
o_item
];
else
[
o_items_array
addObject
:
o_item
];
}
/* Now we need to check if there are selected items that are in already
selected nodes. In that case, we only want to move the nodes */
for
(
i
=
0
;
i
<
[
o_nodes_array
count
]
;
i
++
)
{
for
(
j
=
0
;
j
<
[
o_nodes_array
count
]
;
j
++
)
{
if
(
j
==
i
)
continue
;
if
(
[
self
isItem
:
[[
o_nodes_array
objectAtIndex
:
i
]
pointerValue
]
inNode:
[[
o_nodes_array
objectAtIndex
:
j
]
pointerValue
]]
)
{
[
o_nodes_array
removeObjectAtIndex
:
i
];
/* We need to execute the next iteration with the same index
since the current item has been deleted */
i
--
;
break
;
}
}
}
for
(
i
=
0
;
i
<
[
o_items_array
count
]
;
i
++
)
{
for
(
j
=
0
;
j
<
[
o_nodes_array
count
]
;
j
++
)
{
if
(
[
self
isItem
:
[[
o_items_array
objectAtIndex
:
i
]
pointerValue
]
inNode:
[[
o_nodes_array
objectAtIndex
:
j
]
pointerValue
]]
)
{
[
o_items_array
removeObjectAtIndex
:
i
];
i
--
;
break
;
}
if
(
j
==
[
o_nodes_array
count
]
)
i
++
;
}
}
o_array
=
[
NSArray
arrayWithArray
:
items
];
[
o_objects_array
addObjectsFromArray
:
o_nodes_array
];
[
o_objects_array
addObjectsFromArray
:
o_items_array
];
if
(
!
[
pboard
setPropertyList
:(
id
)
o_array
if
(
!
[
pboard
setPropertyList
:(
id
)
o_
objects_
array
forType:
@"VLCPlaylistItemPboardType"
]
)
{
vlc_object_release
(
p_playlist
);
...
...
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