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
058e9920
Commit
058e9920
authored
Dec 11, 2004
by
Benjamin Pracht
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* implements deletion of playlist nodes * fixes a bug in playItem:
parent
a14ec8b0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
97 additions
and
11 deletions
+97
-11
modules/gui/macosx/playlist.h
modules/gui/macosx/playlist.h
+1
-0
modules/gui/macosx/playlist.m
modules/gui/macosx/playlist.m
+96
-11
No files found.
modules/gui/macosx/playlist.h
View file @
058e9920
...
...
@@ -64,6 +64,7 @@
-
(
void
)
playItem
:(
id
)
sender
;
-
(
void
)
appendArray
:(
NSArray
*
)
o_array
atPos
:(
int
)
i_position
enqueue
:(
BOOL
)
b_enqueue
;
-
(
void
)
initDict
;
@end
modules/gui/macosx/playlist.m
View file @
058e9920
...
...
@@ -65,6 +65,43 @@
return
(
[[
self
delegate
]
menuForEvent
:
o_event
]
);
}
-
reloadPlaylist
{
[[
self
delegate
]
initDict
];
[
self
reloadData
];
}
-
(
bool
)
isItem
:(
playlist_item_t
*
)
p_item
inNode
:(
playlist_item_t
*
)
p_node
{
int
i
;
playlist_t
*
p_playlist
=
vlc_object_find
(
VLCIntf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
==
NULL
)
{
return
NO
;
}
for
(
i
=
0
;
i
<
p_node
->
i_children
;
i
++
)
{
if
(
p_node
->
pp_children
[
i
]
->
i_children
>
0
)
{
if
([
self
isItem
:
p_item
inNode
:
p_node
->
pp_children
[
i
]]
==
YES
)
{
vlc_object_release
(
p_playlist
);
return
YES
;
}
}
else
if
(
p_node
->
pp_children
[
i
]
==
p_item
)
{
vlc_object_release
(
p_playlist
);
return
YES
;
}
}
vlc_object_release
(
p_playlist
);
return
NO
;
}
-
(
void
)
keyDown
:(
NSEvent
*
)
o_event
{
unichar
key
=
0
;
...
...
@@ -102,15 +139,28 @@ msg_Dbg( p_intf, "KEYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY");
o_number
=
[
o_to_delete
lastObject
];
i_row
=
[
o_number
intValue
];
if
(
p_playlist
->
status
.
p_item
==
[[
self
itemAtRow
:
i_row
]
pointerValue
]
&&
p_playlist
->
status
.
i_status
)
{
playlist_Stop
(
p_playlist
);
}
[
o_to_delete
removeObject
:
o_number
];
[
self
deselectRow
:
i_row
];
p_item
=
(
playlist_item_t
*
)[[
self
itemAtRow
:
i_row
]
pointerValue
];
playlist_Delete
(
p_playlist
,
p_item
->
input
.
i_id
);
[
self
reloadData
];
if
(
p_item
->
i_children
>
-
1
)
{
if
([
self
isItem
:
p_playlist
->
status
.
p_item
inNode
:
p_item
]
==
YES
&&
p_playlist
->
status
.
i_status
)
{
playlist_Stop
(
p_playlist
);
}
playlist_NodeDelete
(
p_playlist
,
p_item
,
VLC_TRUE
);
}
else
{
if
(
p_playlist
->
status
.
p_item
==
[[
self
itemAtRow
:
i_row
]
pointerValue
]
&&
p_playlist
->
status
.
i_status
)
{
playlist_Stop
(
p_playlist
);
}
playlist_Delete
(
p_playlist
,
p_item
->
input
.
i_id
);
}
[
self
reloadPlaylist
];
}
break
;
...
...
@@ -125,7 +175,6 @@ msg_Dbg( p_intf, "KEYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY");
}
}
@end
/*****************************************************************************
...
...
@@ -224,12 +273,43 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
if
(
p_playlist
!=
NULL
)
{
playlist_item_t
*
p_item
;
playlist_view_t
*
p_view
;
p_view
=
playlist_ViewFind
(
p_playlist
,
VIEW_SIMPLE
);
playlist_item_t
*
p_node
=
NULL
;
int
i
;
p_item
=
[[
o_outline_view
itemAtRow
:[
o_outline_view
selectedRow
]]
pointerValue
];
if
(
p_item
)
playlist_Control
(
p_playlist
,
PLAYLIST_VIEWPLAY
,
VIEW_SIMPLE
,
p_view
?
p_view
->
p_root
:
NULL
,
p_item
);
{
if
(
p_item
->
i_children
==
-
1
)
{
for
(
i
=
0
;
i
<
p_item
->
i_parents
;
i
++
)
{
if
(
p_item
->
pp_parents
[
i
]
->
i_view
==
VIEW_SIMPLE
)
{
p_node
=
p_item
->
pp_parents
[
i
]
->
p_parent
;
}
}
}
else
{
p_node
=
p_item
;
if
(
p_node
->
pp_children
[
0
]
->
i_children
==
-
1
&&
p_node
->
i_children
>
0
)
{
p_item
=
p_node
->
pp_children
[
0
];
}
else
{
p_item
=
NULL
;
}
}
// p_view = playlist_ViewFind( p_playlist, VIEW_SIMPLE );
playlist_Control
(
p_playlist
,
PLAYLIST_VIEWPLAY
,
VIEW_SIMPLE
,
p_node
,
p_item
);
// playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, VIEW_SIMPLE, p_view ? p_view->p_root : NULL, p_item );
}
vlc_object_release
(
p_playlist
);
}
}
...
...
@@ -492,6 +572,11 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
}
-
(
void
)
initDict
{
[
o_outline_dict
removeAllObjects
];
}
@end
@implementation
VLCPlaylist
(
NSOutlineViewDataSource
)
...
...
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