summaryrefslogtreecommitdiff
path: root/vcl/aqua/source/app/salinst.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/aqua/source/app/salinst.cxx')
-rw-r--r--vcl/aqua/source/app/salinst.cxx21
1 files changed, 19 insertions, 2 deletions
diff --git a/vcl/aqua/source/app/salinst.cxx b/vcl/aqua/source/app/salinst.cxx
index 2ab60067bd6f..2d6648063088 100644
--- a/vcl/aqua/source/app/salinst.cxx
+++ b/vcl/aqua/source/app/salinst.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: salinst.cxx,v $
- * $Revision: 1.54.28.1 $
+ * $Revision: 1.53.22.2 $
*
* This file is part of OpenOffice.org.
*
@@ -56,9 +56,12 @@
#include "vclnsapp.h"
#include "premac.h"
+#include <Foundation/Foundation.h>
#include <ApplicationServices/ApplicationServices.h>
+#import "apple_remote/RemoteMainController.h"
#include "postmac.h"
+
using namespace std;
extern BOOL ImplSVMain();
@@ -67,7 +70,6 @@ static BOOL* gpbInit = 0;
static NSMenu* pDockMenu = nil;
static bool bNoSVMain = true;
static bool bLeftMain = false;
-
// -----------------------------------------------------------------------
class AquaDelayedSettingsChanged : public Timer
@@ -175,6 +177,21 @@ static void initNSApp()
// get System Version and store the value in GetSalData()->mnSystemVersion
[NSApp getSystemVersionMajor: (unsigned int *)major minor:(unsigned int *)minor bugFix:(unsigned int *)bugFix ];
+// -----------------------------------------------------------------------------------------------------------------
+ // Initialize Apple Remote
+ GetSalData()->mpMainController = [[MainController alloc] init];
+
+ [[NSDistributedNotificationCenter defaultCenter] addObserver: NSApp
+ selector: @selector(applicationWillBecomeActive:)
+ name: @"AppleRemoteWillBecomeActive"
+ object: nil ];
+
+ [[NSDistributedNotificationCenter defaultCenter] addObserver: NSApp
+ selector: @selector(applicationWillResignActive:)
+ name: @"AppleRemoteWillResignActive"
+ object: nil ];
+// -----------------------------------------------------------------------------------------------------------------
+
if( AquaSalInstance::isOnCommandLine( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "-enableautomation" ) ) ) )
{
[NSApp activateIgnoringOtherApps: YES];