Author: hdu
Date: Mon Feb 10 09:36:08 2014
New Revision: 1566545
URL: http://svn.apache.org/r1566545
Log:
#i124201# rename apple_remote's MainController to AppleRemoteController
having a MainController class in the global namespace of an application with
gazillions of MVC patterns is not a good idea. Renaming it to better match
its scope (i.e. the Apple Remote) cleans this up.
Modified:
openoffice/trunk/main/apple_remote/RemoteMainController.m
openoffice/trunk/main/apple_remote/inc/RemoteMainController.h
openoffice/trunk/main/vcl/aqua/source/app/saldata.cxx
openoffice/trunk/main/vcl/aqua/source/app/salinst.cxx
openoffice/trunk/main/vcl/aqua/source/app/vclnsapp.mm
openoffice/trunk/main/vcl/inc/aqua/saldata.hxx
Modified: openoffice/trunk/main/apple_remote/RemoteMainController.m
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/apple_remote/RemoteMainController.m?rev=1566545&r1=1566544&r2=1566545&view=diff
==============================================================================
--- openoffice/trunk/main/apple_remote/RemoteMainController.m (original)
+++ openoffice/trunk/main/apple_remote/RemoteMainController.m Mon Feb 10
09:36:08 2014
@@ -37,7 +37,7 @@
// Sample Code 3: Multi Click Behavior and Hold Event Simulation
//
-------------------------------------------------------------------------------------------
-@implementation MainController
+@implementation AppleRemoteMainController
- (id) init {
self = [super init]; // because we redefined our own init instead of use
the fu..nny awakeFromNib
@@ -73,11 +73,11 @@
// to give the binding mechanism a chance to see the change of the
attribute
[self setValue: container forKey: @"remoteControl"];
#ifdef DEBUG
- NSLog(@"MainController init done");
+ NSLog(@"AppleRemoteMainController init done");
#endif
}
else
- NSLog(@"MainController init failed");
+ NSLog(@"AppleRemoteMainController init failed");
return self;
}
@@ -164,4 +164,4 @@
return remoteControlBehavior;
}
-@end
\ No newline at end of file
+@end
Modified: openoffice/trunk/main/apple_remote/inc/RemoteMainController.h
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/apple_remote/inc/RemoteMainController.h?rev=1566545&r1=1566544&r2=1566545&view=diff
==============================================================================
--- openoffice/trunk/main/apple_remote/inc/RemoteMainController.h (original)
+++ openoffice/trunk/main/apple_remote/inc/RemoteMainController.h Mon Feb 10
09:36:08 2014
@@ -37,7 +37,7 @@
//static void sendTheEvent( unichar, int );
-@interface MainController : NSObject {
+@interface AppleRemoteMainController : NSObject {
@public // else remoteControl is not reachable from
GetSalData()->mpMainController
RemoteControl* remoteControl;
@private
Modified: openoffice/trunk/main/vcl/aqua/source/app/saldata.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/aqua/source/app/saldata.cxx?rev=1566545&r1=1566544&r2=1566545&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/aqua/source/app/saldata.cxx (original)
+++ openoffice/trunk/main/vcl/aqua/source/app/saldata.cxx Mon Feb 10 09:36:08
2014
@@ -54,7 +54,7 @@ SalData::SalData()
maCursors( POINTER_COUNT, INVALID_CURSOR_PTR ),
mbIsScrollbarDoubleMax( false ),
mnSystemVersion( OSX_VER_LION ),
- mpMainController( NULL ),
+ mpAppleRemoteMainController( NULL ),
mpDockIconClickHandler( nil ),
mnDPIX( 0 ),
mnDPIY( 0 )
@@ -89,8 +89,8 @@ SalData::~SalData()
osl_destroyThreadKey( s_aAutoReleaseKey );
s_aAutoReleaseKey = 0;
}
- if ( mpMainController )
- [mpMainController release];
+ if ( mpAppleRemoteMainController )
+ [mpAppleRemoteMainController release];
}
void SalData::ensureThreadAutoreleasePool()
Modified: openoffice/trunk/main/vcl/aqua/source/app/salinst.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/aqua/source/app/salinst.cxx?rev=1566545&r1=1566544&r2=1566545&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/aqua/source/app/salinst.cxx (original)
+++ openoffice/trunk/main/vcl/aqua/source/app/salinst.cxx Mon Feb 10 09:36:08
2014
@@ -190,8 +190,7 @@ static void initNSApp()
else
NSLog(@"Unable to obtain system version: %ld", (long)err);
- // Initialize Apple Remote
- GetSalData()->mpMainController = [[MainController alloc] init]; // TODO:
rename MainController to AppleRemoteController
+ GetSalData()->mpAppleRemoteMainController = [[AppleRemoteMainController
alloc] init];
[[NSDistributedNotificationCenter defaultCenter] addObserver: NSApp
selector:
@selector(applicationWillBecomeActive:)
Modified: openoffice/trunk/main/vcl/aqua/source/app/vclnsapp.mm
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/aqua/source/app/vclnsapp.mm?rev=1566545&r1=1566544&r2=1566545&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/aqua/source/app/vclnsapp.mm (original)
+++ openoffice/trunk/main/vcl/aqua/source/app/vclnsapp.mm Mon Feb 10 09:36:08
2014
@@ -450,15 +450,16 @@
{
(void)pNotification;
SalData* pSalData = GetSalData();
- if( pSalData->mpMainController &&
pSalData->mpMainController->remoteControl)
+ AppleRemoteMainController* pAppleRemoteCtrl =
pSalData->mpAppleRemoteMainController;
+ if( pAppleRemoteCtrl && pAppleRemoteCtrl->remoteControl)
{
// [remoteControl startListening: self];
// does crash because the right thing to do is
- // [GetSalData()->mpMainController->remoteControl startListening:
self];
+ // [pAppleRemoteCtrl->remoteControl startListening: self];
// but the instance variable 'remoteControl' is declared protected
// workaround : declare remoteControl instance variable as public in
RemoteMainController.m
- [pSalData->mpMainController->remoteControl startListening: self];
+ [pAppleRemoteCtrl->remoteControl startListening: self];
#ifdef DEBUG
NSLog(@"Apple Remote will become active - Using remote controls");
#endif
@@ -477,15 +478,16 @@
{
(void)pNotification;
SalData* pSalData = GetSalData();
- if( pSalData->mpMainController &&
pSalData->mpMainController->remoteControl)
+ AppleRemoteMainController* pAppleRemoteCtrl =
pSalData->mpAppleRemoteMainController;
+ if( pAppleRemoteCtrl && pAppleRemoteCtrl->remoteControl)
{
// [remoteControl stopListening: self];
// does crash because the right thing to do is
- // [GetSalData()->mpMainController->remoteControl stopListening: self];
+ // [pAppleRemoteCtrl->remoteControl stopListening: self];
// but the instance variable 'remoteControl' is declared protected
// workaround : declare remoteControl instance variable as public in
RemoteMainController.m
- [pSalData->mpMainController->remoteControl stopListening: self];
+ [pAppleRemoteCtrl->remoteControl stopListening: self];
#ifdef DEBUG
NSLog(@"Apple Remote will resign active - Releasing remote controls");
#endif
Modified: openoffice/trunk/main/vcl/inc/aqua/saldata.hxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/inc/aqua/saldata.hxx?rev=1566545&r1=1566544&r2=1566545&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/inc/aqua/saldata.hxx (original)
+++ openoffice/trunk/main/vcl/inc/aqua/saldata.hxx Mon Feb 10 09:36:08 2014
@@ -106,7 +106,7 @@ struct SalData
bool
mbIsScrollbarDoubleMax; // TODO: support DoubleMin and DoubleBoth too
SInt32 mnSystemVersion; //
Store System Version
- MainController* mpMainController; //
Apple Remote
+ AppleRemoteMainController* mpAppleRemoteMainController;
NSObject* mpDockIconClickHandler;
long mnDPIX; //
#i100617# read DPI only once per office life