Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
5fe636f6
Commit
5fe636f6
authored
Aug 03, 2011
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: stop using NTableVieew's selectedRowEnumerator since it was deprecated in 10.3 ...
parent
be6c6aa1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
48 deletions
+29
-48
modules/gui/macosx/playlist.m
modules/gui/macosx/playlist.m
+29
-48
No files found.
modules/gui/macosx/playlist.m
View file @
5fe636f6
...
@@ -825,67 +825,53 @@
...
@@ -825,67 +825,53 @@
-
(
IBAction
)
preparseItem
:(
id
)
sender
-
(
IBAction
)
preparseItem
:(
id
)
sender
{
{
int
i_count
;
int
i_count
;
NS
MutableArray
*
o_to_preparse
;
NS
IndexSet
*
o_selected_indexes
;
intf_thread_t
*
p_intf
=
VLCIntf
;
intf_thread_t
*
p_intf
=
VLCIntf
;
playlist_t
*
p_playlist
=
pl_Get
(
p_intf
);
playlist_t
*
p_playlist
=
pl_Get
(
p_intf
);
o_to_preparse
=
[
NSMutableArray
arrayWithArray
:[[
o_outline_view
selectedRowEnumerator
]
allObjects
]];
i_count
=
[
o_to_preparse
count
];
int
i
,
i_row
;
NSNumber
*
o_number
;
playlist_item_t
*
p_item
=
NULL
;
playlist_item_t
*
p_item
=
NULL
;
for
(
i
=
0
;
i
<
i_count
;
i
++
)
o_selected_indexes
=
[
o_outline_view
selectedRowIndexes
];
i_count
=
[
o_selected_indexes
count
];
NSUInteger
indexes
[
i_count
];
[
o_selected_indexes
getIndexes
:
indexes
maxCount
:
i_count
inIndexRange
:
nil
];
for
(
int
i
=
0
;
i
<
i_count
;
i
++
)
{
{
o_number
=
[
o_to_preparse
lastObject
];
p_item
=
[[
o_outline_view
itemAtRow
:
indexes
[
i
]]
pointerValue
];
i_row
=
[
o_number
intValue
];
[
o_outline_view
deselectRow
:
indexes
[
i
]];
p_item
=
[[
o_outline_view
itemAtRow
:
i_row
]
pointerValue
];
[
o_to_preparse
removeObject
:
o_number
];
[
o_outline_view
deselectRow
:
i_row
];
if
(
p_item
)
if
(
p_item
)
{
{
if
(
p_item
->
i_children
==
-
1
)
if
(
p_item
->
i_children
==
-
1
)
{
playlist_PreparseEnqueue
(
p_playlist
,
p_item
->
p_input
);
playlist_PreparseEnqueue
(
p_playlist
,
p_item
->
p_input
);
}
else
else
{
msg_Dbg
(
p_intf
,
"preparsing nodes not implemented"
);
msg_Dbg
(
p_intf
,
"preparsing nodes not implemented"
);
}
}
}
}
}
[
self
playlistUpdated
];
[
self
playlistUpdated
];
}
}
-
(
IBAction
)
downloadCoverArt
:(
id
)
sender
-
(
IBAction
)
downloadCoverArt
:(
id
)
sender
{
{
int
i_count
;
int
i_count
;
NS
MutableArray
*
o_to_preparse
;
NS
IndexSet
*
o_selected_indexes
;
intf_thread_t
*
p_intf
=
VLCIntf
;
intf_thread_t
*
p_intf
=
VLCIntf
;
playlist_t
*
p_playlist
=
pl_Get
(
p_intf
);
playlist_t
*
p_playlist
=
pl_Get
(
p_intf
);
o_to_preparse
=
[
NSMutableArray
arrayWithArray
:[[
o_outline_view
selectedRowEnumerator
]
allObjects
]];
i_count
=
[
o_to_preparse
count
];
int
i
,
i_row
;
NSNumber
*
o_number
;
playlist_item_t
*
p_item
=
NULL
;
playlist_item_t
*
p_item
=
NULL
;
for
(
i
=
0
;
i
<
i_count
;
i
++
)
o_selected_indexes
=
[
o_outline_view
selectedRowIndexes
];
i_count
=
[
o_selected_indexes
count
];
NSUInteger
indexes
[
i_count
];
[
o_selected_indexes
getIndexes
:
indexes
maxCount
:
i_count
inIndexRange
:
nil
];
for
(
int
i
=
0
;
i
<
i_count
;
i
++
)
{
{
o_number
=
[
o_to_preparse
lastObject
];
p_item
=
[[
o_outline_view
itemAtRow
:
indexes
[
i
]]
pointerValue
];
i_row
=
[
o_number
intValue
];
[
o_outline_view
deselectRow
:
indexes
[
i
]];
p_item
=
[[
o_outline_view
itemAtRow
:
i_row
]
pointerValue
];
[
o_to_preparse
removeObject
:
o_number
];
[
o_outline_view
deselectRow
:
i_row
];
if
(
p_item
&&
p_item
->
i_children
==
-
1
)
if
(
p_item
&&
p_item
->
i_children
==
-
1
)
{
playlist_AskForArtEnqueue
(
p_playlist
,
p_item
->
p_input
);
playlist_AskForArtEnqueue
(
p_playlist
,
p_item
->
p_input
);
}
}
}
[
self
playlistUpdated
];
[
self
playlistUpdated
];
}
}
...
@@ -913,24 +899,22 @@
...
@@ -913,24 +899,22 @@
-
(
IBAction
)
deleteItem
:(
id
)
sender
-
(
IBAction
)
deleteItem
:(
id
)
sender
{
{
int
i_count
,
i_row
;
int
i_count
;
NSMutableArray
*
o_to_delete
;
NSIndexSet
*
o_selected_indexes
;
NSNumber
*
o_number
;
playlist_t
*
p_playlist
;
playlist_t
*
p_playlist
;
intf_thread_t
*
p_intf
=
VLCIntf
;
intf_thread_t
*
p_intf
=
VLCIntf
;
o_
to_delete
=
[
NSMutableArray
arrayWithArray
:[[
o_outline_view
selectedRowEnumerator
]
allObjects
]
];
o_
selected_indexes
=
[
o_outline_view
selectedRowIndexes
];
i_count
=
[
o_
to_delete
count
];
i_count
=
[
o_
selected_indexes
count
];
p_playlist
=
pl_Get
(
p_intf
);
p_playlist
=
pl_Get
(
p_intf
);
for
(
int
i
=
0
;
i
<
i_count
;
i
++
)
NSUInteger
indexes
[
i_count
];
[
o_selected_indexes
getIndexes
:
indexes
maxCount
:
i_count
inIndexRange
:
nil
];
for
(
int
i
=
0
;
i
<
i_count
;
i
++
)
{
{
o_number
=
[
o_to_delete
lastObject
];
id
o_item
=
[
o_outline_view
itemAtRow
:
indexes
[
i
]];
i_row
=
[
o_number
intValue
];
[
o_outline_view
deselectRow
:
indexes
[
i
]];
id
o_item
=
[
o_outline_view
itemAtRow
:
i_row
];
[
o_outline_view
deselectRow
:
i_row
];
PL_LOCK
;
PL_LOCK
;
playlist_item_t
*
p_item
=
[
o_item
pointerValue
];
playlist_item_t
*
p_item
=
[
o_item
pointerValue
];
...
@@ -938,14 +922,12 @@
...
@@ -938,14 +922,12 @@
msg_Dbg
(
p_intf
,
"deleting item %i (of %i) with id
\"
%i
\"
, pointerValue
\"
%p
\"
and %i children"
,
i
+
1
,
i_count
,
msg_Dbg
(
p_intf
,
"deleting item %i (of %i) with id
\"
%i
\"
, pointerValue
\"
%p
\"
and %i children"
,
i
+
1
,
i_count
,
p_item
->
p_input
->
i_id
,
[
o_item
pointerValue
],
p_item
->
i_children
+
1
);
p_item
->
p_input
->
i_id
,
[
o_item
pointerValue
],
p_item
->
i_children
+
1
);
#endif
#endif
[
o_to_delete
removeObject
:
o_number
];
if
(
p_item
->
i_children
!=
-
1
)
if
(
p_item
->
i_children
!=
-
1
)
//is a node and not an item
//is a node and not an item
{
{
if
(
playlist_Status
(
p_playlist
)
!=
PLAYLIST_STOPPED
&&
if
(
playlist_Status
(
p_playlist
)
!=
PLAYLIST_STOPPED
&&
[
self
isItem
:
playlist_CurrentPlayingItem
(
p_playlist
)
inNode
:
[
self
isItem
:
playlist_CurrentPlayingItem
(
p_playlist
)
inNode
:
((
playlist_item_t
*
)[
o_item
pointerValue
])
((
playlist_item_t
*
)[
o_item
pointerValue
])
checkItemExistence:
NO
locked
:
YES
]
==
YES
)
checkItemExistence:
NO
locked
:
YES
]
==
YES
)
// if current item is in selected node and is playing then stop playlist
// if current item is in selected node and is playing then stop playlist
playlist_Control
(
p_playlist
,
PLAYLIST_STOP
,
pl_Locked
);
playlist_Control
(
p_playlist
,
PLAYLIST_STOP
,
pl_Locked
);
...
@@ -956,8 +938,7 @@
...
@@ -956,8 +938,7 @@
playlist_DeleteFromInput
(
p_playlist
,
p_item
->
p_input
,
pl_Locked
);
playlist_DeleteFromInput
(
p_playlist
,
p_item
->
p_input
,
pl_Locked
);
PL_UNLOCK
;
PL_UNLOCK
;
[
o_outline_dict
removeObjectForKey
:[
NSString
stringWithFormat
:
@"%p"
,
[
o_outline_dict
removeObjectForKey
:[
NSString
stringWithFormat
:
@"%p"
,
[
o_item
pointerValue
]]];
[
o_item
pointerValue
]]];
[
o_item
release
];
[
o_item
release
];
}
}
...
...
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