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
82db99a4
Commit
82db99a4
authored
Mar 05, 2014
by
David Fuhrmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: show reveal-in-finder menu replacement at a similar position as the original one
parent
ceb372ef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
2 deletions
+26
-2
modules/gui/macosx/MainWindowTitle.m
modules/gui/macosx/MainWindowTitle.m
+26
-2
No files found.
modules/gui/macosx/MainWindowTitle.m
View file @
82db99a4
...
...
@@ -474,7 +474,7 @@
[
contextMenu
release
];
NSURL
*
representedURL
=
[[
self
window
]
representedURL
];
if
(
!
representedURL
)
if
(
!
representedURL
)
return
;
NSArray
*
pathComponents
;
...
...
@@ -527,7 +527,31 @@
[
currentItem
setImage
:
icon
];
[
currentItem
setTarget
:
self
];
[
NSMenu
popUpContextMenu
:
contextMenu
withEvent
:
o_event
forView
:
[
self
superview
]];
// center the context menu similar to the white interface
CGFloat
menuWidth
=
[
contextMenu
size
].
width
;
NSRect
windowFrame
=
[[
self
window
]
frame
];
NSPoint
point
;
CGFloat
fullButtonWidth
=
0
.;
if
([[
VLCMain
sharedInstance
]
nativeFullscreenMode
])
fullButtonWidth
=
20
.;
// assumes 60 px for the window buttons
point
.
x
=
(
windowFrame
.
size
.
width
-
60
.
-
fullButtonWidth
)
/
2
.
-
menuWidth
/
2
.
+
60
.
-
20
.;
point
.
y
=
windowFrame
.
size
.
height
+
1
.;
if
(
point
.
x
<
0
)
point
.
x
=
10
;
NSEvent
*
fakeMouseEvent
=
[
NSEvent
mouseEventWithType
:
NSRightMouseDown
location:
point
modifierFlags:
0
timestamp:
0
windowNumber:
[[
self
window
]
windowNumber
]
context:
nil
eventNumber:
0
clickCount:
0
pressure:
0
];
[
NSMenu
popUpContextMenu
:
contextMenu
withEvent
:
fakeMouseEvent
forView
:
[
self
superview
]];
}
-
(
IBAction
)
revealInFinder
:(
id
)
sender
...
...
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