55 changed files with 159 additions and 90 deletions
@ -0,0 +1,35 @@ |
|||
/*****************************************************************************
|
|||
* VLCApplication.h: MacOS X interface module |
|||
***************************************************************************** |
|||
* Copyright (C) 2002-2016 VLC authors and VideoLAN |
|||
* $Id$ |
|||
* |
|||
* Authors: Derk-Jan Hartman <hartman at videolan dot org> |
|||
* Felix Paul Kühne <fkuehne at videolan dot org> |
|||
* David Fuhrmann <david dot fuhrmann at googlemail dot com> |
|||
* Pierre d'Herbemont <pdherbemont # videolan org> |
|||
* |
|||
* This program is free software; you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation; either version 2 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program; if not, write to the Free Software |
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. |
|||
*****************************************************************************/ |
|||
|
|||
#import <Cocoa/Cocoa.h> |
|||
|
|||
/*****************************************************************************
|
|||
* VLCApplication interface |
|||
*****************************************************************************/ |
|||
|
|||
@interface VLCApplication : NSApplication |
|||
|
|||
@end |
|||
@ -0,0 +1,49 @@ |
|||
/***************************************************************************** |
|||
* VLCApplication.m: MacOS X interface module |
|||
***************************************************************************** |
|||
* Copyright (C) 2002-2016 VLC authors and VideoLAN |
|||
* $Id$ |
|||
* |
|||
* Authors: Derk-Jan Hartman <hartman at videolan.org> |
|||
* Felix Paul Kühne <fkuehne at videolan dot org> |
|||
* Pierre d'Herbemont <pdherbemont # videolan org> |
|||
* David Fuhrmann <david dot fuhrmann at googlemail dot com> |
|||
* |
|||
* This program is free software; you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation; either version 2 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program; if not, write to the Free Software |
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. |
|||
*****************************************************************************/ |
|||
|
|||
/***************************************************************************** |
|||
* Preamble |
|||
*****************************************************************************/ |
|||
|
|||
#import "VLCApplication.h" |
|||
|
|||
/***************************************************************************** |
|||
* VLCApplication implementation |
|||
*****************************************************************************/ |
|||
|
|||
@implementation VLCApplication |
|||
// when user selects the quit menu from dock it sends a terminate: |
|||
// but we need to send a stop: to properly exits libvlc. |
|||
// However, we are not able to change the action-method sent by this standard menu item. |
|||
// thus we override terminate: to send a stop: |
|||
// see [af97f24d528acab89969d6541d83f17ce1ecd580] that introduced the removal of setjmp() and longjmp() |
|||
- (void)terminate:(id)sender |
|||
{ |
|||
[self activateIgnoringOtherApps:YES]; |
|||
[self stop:sender]; |
|||
} |
|||
|
|||
@end |
|||
Loading…
Reference in new issue