From 01a33e96707668beb5612d69d508d8556a2285a7 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Tue, 23 Sep 2008 10:00:53 +0000 Subject: [PATCH] fixing compiles under certain flags git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55818 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/osx/cocoa/toolbar.mm | 14 ++++++++++---- src/osx/glcanvas_osx.cpp | 2 ++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/osx/cocoa/toolbar.mm b/src/osx/cocoa/toolbar.mm index 1b8b4866fe..a5e2638daf 100644 --- a/src/osx/cocoa/toolbar.mm +++ b/src/osx/cocoa/toolbar.mm @@ -39,10 +39,6 @@ END_EVENT_TABLE() #pragma mark - #pragma mark Tool Implementation -#if wxOSX_USE_COCOA -#define wxOSX_USE_NATIVE_TOOLBAR 1 -#endif - // ---------------------------------------------------------------------------- // private classes // ---------------------------------------------------------------------------- @@ -162,6 +158,7 @@ public: void UpdateLabel() { +#if wxOSX_USE_NATIVE_TOOLBAR if ( m_toolbarItem ) { // strip mnemonics from the label for compatibility with the usual @@ -174,6 +171,7 @@ public: wxCFStringRef sh( GetShortHelp(), GetToolBarFontEncoding() ); [m_toolbarItem setToolTip:sh.AsNSString()]; } +#endif } void Action() @@ -256,6 +254,8 @@ private: #endif }; +#if wxOSX_USE_NATIVE_TOOLBAR + @interface wxNSToolbarItem : NSToolbarItem { wxToolBarTool* impl; @@ -284,6 +284,8 @@ private: @end +#endif + @interface wxNSToolBarButton : NSButton { @@ -298,6 +300,8 @@ private: @end +#if wxOSX_USE_NATIVE_TOOLBAR + @implementation wxNSToolbarItem - (id)initWithItemIdentifier: (NSString*) identifier @@ -374,6 +378,8 @@ private: @end +#endif + @implementation wxNSToolBarButton - (id)initWithFrame:(NSRect)frame diff --git a/src/osx/glcanvas_osx.cpp b/src/osx/glcanvas_osx.cpp index 5811ff545d..154d6ba4ce 100644 --- a/src/osx/glcanvas_osx.cpp +++ b/src/osx/glcanvas_osx.cpp @@ -60,7 +60,9 @@ wxGLContext::~wxGLContext() IMPLEMENT_CLASS(wxGLCanvas, wxWindow) BEGIN_EVENT_TABLE(wxGLCanvas, wxWindow) +#if wxOSX_USE_CARBON EVT_SIZE(wxGLCanvas::OnSize) +#endif END_EVENT_TABLE() wxGLCanvas::wxGLCanvas(wxWindow *parent, -- 2.45.2