diff options
Diffstat (limited to 'Slimber/Cocoa')
| -rw-r--r-- | Slimber/Cocoa/CocoaController.h | 4 | ||||
| -rw-r--r-- | Slimber/Cocoa/CocoaMenulet.h | 4 | ||||
| -rw-r--r-- | Slimber/Cocoa/CocoaMenulet.mm | 8 | 
3 files changed, 13 insertions, 3 deletions
| diff --git a/Slimber/Cocoa/CocoaController.h b/Slimber/Cocoa/CocoaController.h index 27542c6..24070c6 100644 --- a/Slimber/Cocoa/CocoaController.h +++ b/Slimber/Cocoa/CocoaController.h @@ -1,9 +1,11 @@  /* - * Copyright (c) 2010 Remko Tronçon + * Copyright (c) 2010-2012 Remko Tronçon   * Licensed under the GNU General Public License v3.   * See Documentation/Licenses/GPLv3.txt for more information.   */ +// Fix Boost-Cocoa conflict +#define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0  #include <Cocoa/Cocoa.h>  class MainController; diff --git a/Slimber/Cocoa/CocoaMenulet.h b/Slimber/Cocoa/CocoaMenulet.h index 5c7c33e..0edceea 100644 --- a/Slimber/Cocoa/CocoaMenulet.h +++ b/Slimber/Cocoa/CocoaMenulet.h @@ -1,11 +1,13 @@  /* - * Copyright (c) 2010 Remko Tronçon + * Copyright (c) 2010-2012 Remko Tronçon   * Licensed under the GNU General Public License v3.   * See Documentation/Licenses/GPLv3.txt for more information.   */  #pragma once +// Fix Boost-Cocoa conflict +#define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0  #include <Cocoa/Cocoa.h>  #include "Slimber/Menulet.h" diff --git a/Slimber/Cocoa/CocoaMenulet.mm b/Slimber/Cocoa/CocoaMenulet.mm index de9e9e9..c739fb4 100644 --- a/Slimber/Cocoa/CocoaMenulet.mm +++ b/Slimber/Cocoa/CocoaMenulet.mm @@ -1,3 +1,9 @@ +/* + * Copyright (c) 2012-2013 Remko Tronçon + * Licensed under the GNU General Public License v3. + * See Documentation/Licenses/GPLv3.txt for more information. + */ +  #include "Slimber/Cocoa/CocoaMenulet.h"  #pragma GCC diagnostic ignored "-Wold-style-cast" @@ -45,7 +51,7 @@ void CocoaMenulet::addItem(const std::string& name, const std::string& icon) {  		NSString* path = [[NSBundle mainBundle] pathForResource:   				[NSString stringWithUTF8String: icon.c_str()] ofType:@"png"];  		NSImage* image = [[NSImage alloc] initWithContentsOfFile: path]; -		[item setImage: [[NSImage alloc] initWithContentsOfFile: path]]; +		[item setImage: image];  		[image release];  	}  	[menu addItem: item]; | 
 Swift
 Swift