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
9a8838d7
Commit
9a8838d7
authored
Dec 11, 2004
by
Benjamin Pracht
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Code simplification
parent
e27abf4e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
11 deletions
+56
-11
modules/gui/macosx/playlist.h
modules/gui/macosx/playlist.h
+1
-0
modules/gui/macosx/playlist.m
modules/gui/macosx/playlist.m
+55
-11
No files found.
modules/gui/macosx/playlist.h
View file @
9a8838d7
...
@@ -59,6 +59,7 @@
...
@@ -59,6 +59,7 @@
-
(
IBAction
)
searchItem
:(
id
)
sender
;
-
(
IBAction
)
searchItem
:(
id
)
sender
;
-
(
void
)
initStrings
;
-
(
void
)
initStrings
;
-
(
NSMenu
*
)
menuForEvent
:(
NSEvent
*
)
o_event
;
-
(
void
)
playlistUpdated
;
-
(
void
)
playlistUpdated
;
-
(
void
)
playItem
:(
id
)
sender
;
-
(
void
)
playItem
:(
id
)
sender
;
...
...
modules/gui/macosx/playlist.m
View file @
9a8838d7
...
@@ -73,28 +73,33 @@
...
@@ -73,28 +73,33 @@
-
(
bool
)
isItem
:(
playlist_item_t
*
)
p_item
inNode
:(
playlist_item_t
*
)
p_node
-
(
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
,
playlist_t
*
p_playlist
=
vlc_object_find
(
VLCIntf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
FIND_ANYWHERE
);
playlist_item_t
*
p_temp_item
=
p_item
;
if
(
p_playlist
==
NULL
)
if
(
p_playlist
==
NULL
)
{
{
return
NO
;
return
NO
;
}
}
for
(
i
=
0
;
i
<
p_node
->
i_children
;
i
++
)
while
(
p_temp_item
->
i_parents
>
0
)
{
int
i
;
for
(
i
=
0
;
i
<
p_temp_item
->
i_parents
;
i
++
)
{
{
if
(
p_node
->
pp_children
[
i
]
->
i_children
>
0
)
if
(
p_temp_item
->
pp_parents
[
i
]
->
i_view
==
VIEW_SIMPLE
)
{
{
if
([
self
isItem
:
p_item
inNode
:
p_node
->
pp_children
[
i
]]
==
YES
)
if
(
p_temp_item
->
pp_parents
[
i
]
->
p_parent
==
p_node
)
{
{
vlc_object_release
(
p_playlist
);
vlc_object_release
(
p_playlist
);
return
YES
;
return
YES
;
}
}
}
else
else
if
(
p_node
->
pp_children
[
i
]
==
p_item
)
{
{
vlc_object_release
(
p_playlist
);
p_temp_item
=
p_temp_item
->
pp_parents
[
i
]
->
p_parent
;
return
YES
;
break
;
}
}
}
}
}
}
...
@@ -572,6 +577,45 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
...
@@ -572,6 +577,45 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
}
}
#if 0
- (NSMenu *)menuForEvent:(NSEvent *)o_event
{
intf_thread_t * p_intf = VLCIntf;
playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
bool b_itemstate = FALSE;
NSPoint pt;
vlc_bool_t b_rows;
vlc_bool_t b_item_sel;
pt = [o_table_view convertPoint: [o_event locationInWindow]
fromView: nil];
b_item_sel = ( [o_table_view rowAtPoint: pt] != -1 &&
[o_table_view selectedRow] != -1 );
b_rows = [o_table_view numberOfRows] != 0;
[o_mi_play setEnabled: b_item_sel];
[o_mi_delete setEnabled: b_item_sel];
[o_mi_selectall setEnabled: b_rows];
[o_mi_info setEnabled: b_item_sel];
[o_mi_toggleItemsEnabled setEnabled: b_item_sel];
[o_mi_enableGroup setEnabled: b_item_sel];
[o_mi_disableGroup setEnabled: b_item_sel];
if (p_playlist)
{
b_itemstate = ([o_table_view selectedRow] > -1) ?
p_playlist->pp_items[[o_table_view selectedRow]]->b_enabled : FALSE;
vlc_object_release(p_playlist);
}
[o_mi_toggleItemsEnabled setState: b_itemstate];
return( o_ctx_menu );
}
#endif
-
(
void
)
initDict
-
(
void
)
initDict
{
{
[
o_outline_dict
removeAllObjects
];
[
o_outline_dict
removeAllObjects
];
...
...
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