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
3dd486c8
Commit
3dd486c8
authored
Jun 05, 2012
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: add multi-selection support to the playlist's revealItemInFinder (refs #6892)
parent
0e5226e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
13 deletions
+24
-13
modules/gui/macosx/playlist.m
modules/gui/macosx/playlist.m
+24
-13
No files found.
modules/gui/macosx/playlist.m
View file @
3dd486c8
...
@@ -928,23 +928,34 @@
...
@@ -928,23 +928,34 @@
-
(
IBAction
)
revealItemInFinder
:(
id
)
sender
-
(
IBAction
)
revealItemInFinder
:(
id
)
sender
{
{
playlist_item_t
*
p_item
=
[[
o_outline_view
itemAtRow
:[
o_outline_view
selectedRow
]]
pointerValue
];
NSIndexSet
*
selectedRows
=
[
o_outline_view
selectedRowIndexes
];
NSMutableString
*
o_mrl
=
nil
;
NSUInteger
count
=
[
selectedRows
count
];
NSUInteger
indexes
[
count
];
[
selectedRows
getIndexes
:
indexes
maxCount
:
count
inIndexRange
:
nil
];
if
(
!
p_item
||
!
p_item
->
p_input
)
NSMutableString
*
o_mrl
;
return
;
playlist_item_t
*
p_item
;
for
(
NSUInteger
i
=
0
;
i
<
count
;
i
++
)
{
p_item
=
[[
o_outline_view
itemAtRow
:
indexes
[
i
]]
pointerValue
];
char
*
psz_uri
=
decode_URI
(
input_item_GetURI
(
p_item
->
p_input
)
);
if
(
!
p_item
||
!
p_item
->
p_input
)
if
(
psz_uri
)
continue
;
o_mrl
=
[
NSMutableString
stringWithUTF8String
:
psz_uri
];
/* perform some checks whether it is a file and if it is local at all... */
o_mrl
=
[[
NSMutableString
alloc
]
initWithFormat
:
@"%s"
,
decode_URI
(
input_item_GetURI
(
p_item
->
p_input
))];
NSRange
prefix_range
=
[
o_mrl
rangeOfString
:
@"file:"
];
if
(
prefix_range
.
location
!=
NSNotFound
)
[
o_mrl
deleteCharactersInRange
:
prefix_range
];
if
(
[
o_mrl
characterAtIndex
:
0
]
==
'/'
)
/* perform some checks whether it is a file and if it is local at all... */
[[
NSWorkspace
sharedWorkspace
]
selectFile
:
o_mrl
inFileViewerRootedAtPath
:
o_mrl
];
if
([
o_mrl
length
]
>
0
)
{
NSRange
prefix_range
=
[
o_mrl
rangeOfString
:
@"file:"
];
if
(
prefix_range
.
location
!=
NSNotFound
)
[
o_mrl
deleteCharactersInRange
:
prefix_range
];
if
(
[
o_mrl
characterAtIndex
:
0
]
==
'/'
)
[[
NSWorkspace
sharedWorkspace
]
selectFile
:
o_mrl
inFileViewerRootedAtPath
:
o_mrl
];
}
[
o_mrl
release
];
}
}
}
/* When called retrieves the selected outlineview row and plays that node or item */
/* When called retrieves the selected outlineview row and plays that node or item */
...
...
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