Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
09ad74bd
Commit
09ad74bd
authored
Jan 07, 2012
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: fix the window menu's close and minimize commands when using the black window style
parent
0bce8706
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
38 additions
and
16 deletions
+38
-16
modules/gui/macosx/CoreInteraction.h
modules/gui/macosx/CoreInteraction.h
+2
-1
modules/gui/macosx/CoreInteraction.m
modules/gui/macosx/CoreInteraction.m
+6
-1
modules/gui/macosx/MainWindow.h
modules/gui/macosx/MainWindow.h
+1
-1
modules/gui/macosx/MainWindow.m
modules/gui/macosx/MainWindow.m
+27
-2
modules/gui/macosx/intf.m
modules/gui/macosx/intf.m
+2
-11
No files found.
modules/gui/macosx/CoreInteraction.h
View file @
09ad74bd
/*****************************************************************************
* CoreInteraction.h: MacOS X interface module
*****************************************************************************
* Copyright (C) 2011 Felix Paul Kühne
* Copyright (C) 2011
-2012
Felix Paul Kühne
* $Id$
*
* Authors: Felix Paul Kühne <fkuehne -at- videolan -dot- org>
...
...
@@ -32,6 +32,7 @@
+
(
VLCCoreInteraction
*
)
sharedInstance
;
-
(
void
)
play
;
-
(
void
)
pause
;
-
(
void
)
stop
;
-
(
void
)
faster
;
-
(
void
)
slower
;
...
...
modules/gui/macosx/CoreInteraction.m
View file @
09ad74bd
/*****************************************************************************
* CoreInteraction.m: MacOS X interface module
*****************************************************************************
* Copyright (C) 2011 Felix Paul Kühne
* Copyright (C) 2011
-2012
Felix Paul Kühne
* $Id$
*
* Authors: Felix Paul Kühne <fkuehne -at- videolan -dot- org>
...
...
@@ -91,6 +91,11 @@ static VLCCoreInteraction *_o_sharedInstance = nil;
var_SetInteger
(
VLCIntf
->
p_libvlc
,
"key-action"
,
ACTIONID_PLAY_PAUSE
);
}
-
(
void
)
pause
{
var_SetInteger
(
VLCIntf
->
p_libvlc
,
"key-action"
,
ACTIONID_PAUSE
);
}
-
(
void
)
stop
{
var_SetInteger
(
VLCIntf
->
p_libvlc
,
"key-action"
,
ACTIONID_STOP
);
...
...
modules/gui/macosx/MainWindow.h
View file @
09ad74bd
/*****************************************************************************
* MainWindow.h: MacOS X interface module
*****************************************************************************
* Copyright (C) 2002-201
1
VLC authors and VideoLAN
* Copyright (C) 2002-201
2
VLC authors and VideoLAN
* $Id$
*
* Authors: Felix Paul Kühne <fkuehne -at- videolan -dot- org>
...
...
modules/gui/macosx/MainWindow.m
View file @
09ad74bd
/*****************************************************************************
* MainWindow.m: MacOS X interface module
*****************************************************************************
* Copyright (C) 2002-201
1
VLC authors and VideoLAN
* Copyright (C) 2002-201
2
VLC authors and VideoLAN
* $Id$
*
* Authors: Felix Paul Kühne <fkuehne -at- videolan -dot- org>
...
...
@@ -709,6 +709,15 @@ static VLCMainWindow *_o_sharedInstance = nil;
return
YES
;
}
-
(
BOOL
)
validateMenuItem
:(
NSMenuItem
*
)
menuItem
{
SEL
s_menuAction
=
[
menuItem
action
];
if
((
s_menuAction
==
@selector
(
performClose
:
))
||
(
s_menuAction
==
@selector
(
performMiniaturize
:
))
||
(
s_menuAction
==
@selector
(
performZoom
:
)))
return
YES
;
return
[
super
validateMenuItem
:
menuItem
];
}
-
(
BOOL
)
isMainWindow
{
return
YES
;
...
...
@@ -723,6 +732,22 @@ static VLCMainWindow *_o_sharedInstance = nil;
[
super
setTitle
:
title
];
}
-
(
void
)
performClose
:(
id
)
sender
{
if
(
b_dark_interface
)
[
self
orderOut
:
sender
];
else
[
super
performClose
:
sender
];
}
-
(
void
)
performMiniaturize
:(
id
)
sender
{
if
(
b_dark_interface
)
[
self
miniaturize
:
sender
];
else
[
super
performMiniaturize
:
sender
];
}
-
(
void
)
performZoom
:(
id
)
sender
{
if
(
b_dark_interface
)
...
...
@@ -1210,7 +1235,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
-
(
void
)
someWindowWillClose
:(
NSNotification
*
)
notification
{
if
([
notification
object
]
==
o_nonembedded_window
)
if
([
notification
object
]
==
o_nonembedded_window
||
[
notification
object
]
==
self
)
[[
VLCCoreInteraction
sharedInstance
]
stop
];
}
...
...
modules/gui/macosx/intf.m
View file @
09ad74bd
...
...
@@ -783,7 +783,7 @@ static VLCMain *_o_sharedMainInstance = nil;
{
[
NSApp
activateIgnoringOtherApps
:
YES
];
[
o_remote
stopListening
:
self
];
var_SetInteger
(
p_intf
->
p_libvlc
,
"key-action"
,
ACTIONID_STOP
)
;
[[
VLCCoreInteraction
sharedInstance
]
stop
]
;
}
#pragma mark -
...
...
@@ -853,16 +853,7 @@ static VLCMain *_o_sharedMainInstance = nil;
/* Triggered when the computer goes to sleep */
-
(
void
)
computerWillSleep
:
(
NSNotification
*
)
notification
{
input_thread_t
*
p_input
;
p_input
=
pl_CurrentInput
(
p_intf
);
if
(
p_input
)
{
int
state
=
var_GetInteger
(
p_input
,
"state"
);
if
(
state
==
PLAYING_S
)
var_SetInteger
(
p_intf
->
p_libvlc
,
"key-action"
,
ACTIONID_PLAY_PAUSE
);
vlc_object_release
(
p_input
);
}
[[
VLCCoreInteraction
sharedInstance
]
pause
];
}
#pragma mark -
...
...
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