From: <hug...@li...> - 2012-06-18 16:22:27
|
branch: gui_overhaul details: http://hugin.hg.sourceforge.net/hgweb/hugin/hugin/hgroot/hugin/hugin/rev/831834a784e8 changeset: 5858:831834a784e8 user: harryvanderwolf <hv...@gm...> date: Mon Jun 18 18:21:59 2012 +0200 description: [OSX] Change osx changes w.r.t. wxwidgets 2.9 to if-then-else to enable <=2.8; remove some hardcoded carbon links from XCode diffstat: mac/Hugin.xcodeproj/project.pbxproj | 12 --------- src/hugin1/base_wx/platform.cpp | 46 ++++++++++++++++++++++++++++++------ src/hugin1/base_wx/platform.h | 10 +++++-- src/hugin1/hugin/GLPreviewFrame.cpp | 18 ++++++++++++- src/hugin1/hugin/MainFrame.cpp | 1 + src/hugin1/hugin/MaskImageCtrl.cpp | 1 + src/hugin1/hugin/PreviewFrame.cpp | 12 ++++++++- src/hugin1/hugin/treelistctrl.cpp | 12 +++++++-- 8 files changed, 83 insertions(+), 29 deletions(-) diffs (335 lines): diff -r c168e07c4ee5 -r 831834a784e8 mac/Hugin.xcodeproj/project.pbxproj --- a/mac/Hugin.xcodeproj/project.pbxproj Sun Jun 17 16:55:15 2012 +0200 +++ b/mac/Hugin.xcodeproj/project.pbxproj Mon Jun 18 18:21:59 2012 +0200 @@ -349,7 +349,6 @@ 574092C10C3943D000D16607 /* Stitcher3.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 57237F4A0C391053005818A4 /* Stitcher3.cpp */; }; 574092C20C3943D000D16607 /* Stitcher4.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 57237F4B0C391053005818A4 /* Stitcher4.cpp */; }; 57525A390C54BCCB00BF8096 /* nona_gui.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 57E330BF0C4A87F2006AA781 /* nona_gui.cpp */; }; - 57525A3C0C54BCEA00BF8096 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5749FA9B067B80F000A6EDD4 /* Carbon.framework */; }; 57525A410C54BCEA00BF8096 /* libiconv.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 57989581068E2FD7009F90BF /* libiconv.dylib */; }; 57525A420C54BCEA00BF8096 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 579895AB068E3002009F90BF /* libz.dylib */; }; 57525A430C54BCEA00BF8096 /* libmx.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 57D55913067BDB84005E4CCD /* libmx.dylib */; }; @@ -754,7 +753,6 @@ 57D3832B0E236B1D00445A37 /* libhugin_levmar.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5720E47A0BD456CD00E63404 /* libhugin_levmar.a */; }; 57D3832C0E236B1D00445A37 /* libhugin_nona.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5740922A0C393E6600D16607 /* libhugin_nona.a */; }; 57D3832D0E236B1D00445A37 /* libhugin_math.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5771F77A0C30216F00736343 /* libhugin_math.a */; }; - 57D50A390F595A6300CCDCB5 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5749FA9B067B80F000A6EDD4 /* Carbon.framework */; }; 57D50A3B0F595A6300CCDCB5 /* libiconv.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 57989581068E2FD7009F90BF /* libiconv.dylib */; }; 57D50A3C0F595A6300CCDCB5 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 579895AB068E3002009F90BF /* libz.dylib */; }; 57D50A3D0F595A6300CCDCB5 /* libmx.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 57D55913067BDB84005E4CCD /* libmx.dylib */; }; @@ -1212,7 +1210,6 @@ 737D5ED5139BA43800829EED /* PTBatcherGui.icns in Resources */ = {isa = PBXBuildFile; fileRef = 731DBF1A129D846500793A38 /* PTBatcherGui.icns */; }; 737E1C190EC9EC0300BA4D9B /* hugin_config.h in Headers */ = {isa = PBXBuildFile; fileRef = 737E1C180EC9EC0300BA4D9B /* hugin_config.h */; }; 737E48B411D3F8C6002BA8AE /* hugin_stitch_project.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 575670980D089B1F00344F55 /* hugin_stitch_project.cpp */; }; - 737E48B611D3F8C6002BA8AE /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5749FA9B067B80F000A6EDD4 /* Carbon.framework */; }; 737E48B811D3F8C6002BA8AE /* libiconv.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 57989581068E2FD7009F90BF /* libiconv.dylib */; }; 737E48B911D3F8C6002BA8AE /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 579895AB068E3002009F90BF /* libz.dylib */; }; 737E48BA11D3F8C6002BA8AE /* libmx.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 57D55913067BDB84005E4CCD /* libmx.dylib */; }; @@ -1283,7 +1280,6 @@ 737E495B11D3FD74002BA8AE /* MaskEditorPanel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 738A773A112B4507004E3612 /* MaskEditorPanel.cpp */; }; 737E495C11D3FD74002BA8AE /* MaskImageCtrl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 738A773C112B4507004E3612 /* MaskImageCtrl.cpp */; }; 737E495D11D3FD74002BA8AE /* MaskLoadDialog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 730B1AE91139B2B20014462B /* MaskLoadDialog.cpp */; }; - 737E495F11D3FD74002BA8AE /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5749FA9B067B80F000A6EDD4 /* Carbon.framework */; }; 737E496111D3FD74002BA8AE /* libiconv.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 57989581068E2FD7009F90BF /* libiconv.dylib */; }; 737E496211D3FD74002BA8AE /* libintl.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 7368E40A1083930D00519ED0 /* libintl.dylib */; }; 737E496311D3FD74002BA8AE /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 579895AB068E3002009F90BF /* libz.dylib */; }; @@ -1589,7 +1585,6 @@ 739286A014225FDB0051CAEC /* HtmlWindow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 733AC12E131AFE1600D276B9 /* HtmlWindow.cpp */; }; 739286A114225FDB0051CAEC /* PluginItems.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 73A8A3BB13F58BDF00BB58F2 /* PluginItems.cpp */; }; 739286A414225FDB0051CAEC /* hugin_python_interface.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 73B1AD0613A6A0B0006A3C54 /* hugin_python_interface.framework */; }; - 739286A514225FDB0051CAEC /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5749FA9B067B80F000A6EDD4 /* Carbon.framework */; }; 739286A614225FDB0051CAEC /* libiconv.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 57989581068E2FD7009F90BF /* libiconv.dylib */; }; 739286A714225FDB0051CAEC /* libintl.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 7368E40A1083930D00519ED0 /* libintl.dylib */; }; 739286A814225FDB0051CAEC /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 579895AB068E3002009F90BF /* libz.dylib */; }; @@ -1901,7 +1896,6 @@ 73DFBC98139B516C00558A2D /* FindN8Lines.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 73DFBC93139B516C00558A2D /* FindN8Lines.cpp */; }; 73DFBC99139B516C00558A2D /* FindLines.h in Headers */ = {isa = PBXBuildFile; fileRef = 73DFBC94139B516C00558A2D /* FindLines.h */; }; 73DFBC9A139B516C00558A2D /* FindLines.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 73DFBC95139B516C00558A2D /* FindLines.cpp */; }; - 73DFBD7B139B69E900558A2D /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5749FA9B067B80F000A6EDD4 /* Carbon.framework */; }; 73DFBD7C139B69E900558A2D /* libiconv.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 57989581068E2FD7009F90BF /* libiconv.dylib */; }; 73DFBD7D139B69E900558A2D /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 579895AB068E3002009F90BF /* libz.dylib */; }; 73DFBD7E139B69E900558A2D /* libmx.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 57D55913067BDB84005E4CCD /* libmx.dylib */; }; @@ -5519,7 +5513,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 57525A3C0C54BCEA00BF8096 /* Carbon.framework in Frameworks */, 57525A410C54BCEA00BF8096 /* libiconv.dylib in Frameworks */, 57525A420C54BCEA00BF8096 /* libz.dylib in Frameworks */, 57525A430C54BCEA00BF8096 /* libmx.dylib in Frameworks */, @@ -5820,7 +5813,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 57D50A390F595A6300CCDCB5 /* Carbon.framework in Frameworks */, 57D50A3B0F595A6300CCDCB5 /* libiconv.dylib in Frameworks */, 73406703125BB8FA00FC4790 /* libexiv2.dylib in Frameworks */, 57D50A3C0F595A6300CCDCB5 /* libz.dylib in Frameworks */, @@ -6180,7 +6172,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 737E48B611D3F8C6002BA8AE /* Carbon.framework in Frameworks */, 737E48B811D3F8C6002BA8AE /* libiconv.dylib in Frameworks */, 737E48B911D3F8C6002BA8AE /* libz.dylib in Frameworks */, 737E48BA11D3F8C6002BA8AE /* libmx.dylib in Frameworks */, @@ -6213,7 +6204,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 737E495F11D3FD74002BA8AE /* Carbon.framework in Frameworks */, 737E496111D3FD74002BA8AE /* libiconv.dylib in Frameworks */, 737E496211D3FD74002BA8AE /* libintl.dylib in Frameworks */, 737E496311D3FD74002BA8AE /* libz.dylib in Frameworks */, @@ -6305,7 +6295,6 @@ buildActionMask = 2147483647; files = ( 739286A414225FDB0051CAEC /* hugin_python_interface.framework in Frameworks */, - 739286A514225FDB0051CAEC /* Carbon.framework in Frameworks */, 739286A614225FDB0051CAEC /* libiconv.dylib in Frameworks */, 739286A714225FDB0051CAEC /* libintl.dylib in Frameworks */, 739286A814225FDB0051CAEC /* libz.dylib in Frameworks */, @@ -6640,7 +6629,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 73DFBD7B139B69E900558A2D /* Carbon.framework in Frameworks */, 73DFBD7C139B69E900558A2D /* libiconv.dylib in Frameworks */, 73DFBD7D139B69E900558A2D /* libz.dylib in Frameworks */, 73DFBD7E139B69E900558A2D /* libmx.dylib in Frameworks */, diff -r c168e07c4ee5 -r 831834a784e8 src/hugin1/base_wx/platform.cpp --- a/src/hugin1/base_wx/platform.cpp Sun Jun 17 16:55:15 2012 +0200 +++ b/src/hugin1/base_wx/platform.cpp Mon Jun 18 18:21:59 2012 +0200 @@ -31,7 +31,9 @@ #if defined __WXMAC__ || defined __WXOSX_COCOA__ #include <CoreFoundation/CFBundle.h> -#include "wx/osx/core/cfstring.h" +#if wxCHECK_VERSION(2,9,0) + #include "wx/osx/core/cfstring.h" +#endif #include <iostream> #include <stdio.h> #include "wx/utils.h" @@ -93,7 +95,11 @@ else { CFRetain( pathInCFString ); - theResult = wxCFStringRef(pathInCFString).AsString(wxLocale::GetSystemEncoding()); + #if wxCHECK_VERSION(2,9,0) + theResult = wxCFStringRef(pathInCFString).AsString(wxLocale::GetSystemEncoding()); + #else + theResult = wxMacCFStringHolder(pathInCFString).AsString(wxLocale::GetSystemEncoding()); + #endif DEBUG_INFO("Mac: the executable's full path in the application bundle: " << theResult.mb_str(wxConvLocal)); } } @@ -164,7 +170,11 @@ else { CFRetain( pathInCFString ); - theResult = wxCFStringRef(pathInCFString).AsString(wxLocale::GetSystemEncoding()); + #if wxCHECK_VERSION(2,9,0) + theResult = wxCFStringRef(pathInCFString).AsString(wxLocale::GetSystemEncoding()); + #else + theResult = wxMacCFStringHolder(pathInCFString).AsString(wxLocale::GetSystemEncoding()); + #endif DEBUG_INFO("Mac: the executable's full path in the application bundle: " << theResult.mb_str(wxConvLocal)); } } @@ -229,7 +239,11 @@ else { CFRetain( pathInCFString ); - theResult = wxCFStringRef(pathInCFString).AsString(wxLocale::GetSystemEncoding()); + #if wxCHECK_VERSION(2,9,0) + theResult = wxCFStringRef(pathInCFString).AsString(wxLocale::GetSystemEncoding()); + #else + theResult = wxMacCFStringHolder(pathInCFString).AsString(wxLocale::GetSystemEncoding()); + #endif DEBUG_INFO("Mac: the executable's full path in the application bundle: " << theResult.mb_str(wxConvLocal)); } } @@ -267,7 +281,11 @@ else { CFRetain( pathInCFString ); - theResult = wxCFStringRef(pathInCFString).AsString(wxLocale::GetSystemEncoding()); + #if wxCHECK_VERSION(2,9,0) + theResult = wxCFStringRef(pathInCFString).AsString(wxLocale::GetSystemEncoding()); + #else + theResult = wxMacCFStringHolder(pathInCFString).AsString(wxLocale::GetSystemEncoding()); + #endif DEBUG_INFO("Mac: the resource file's path in the application bundle: " << theResult.mb_str(wxConvLocal)); } } @@ -309,7 +327,11 @@ else { CFRetain( pathInCFString ); - theResult = wxCFStringRef(pathInCFString).AsString(wxLocale::GetSystemEncoding()); + #if wxCHECK_VERSION(2,9,0) + theResult = wxCFStringRef(pathInCFString).AsString(wxLocale::GetSystemEncoding()); + #else + theResult = wxMacCFStringHolder(pathInCFString).AsString(wxLocale::GetSystemEncoding()); + #endif DEBUG_INFO("Mac: executable's full path in the application bundle: " << theResult.mb_str(wxConvLocal)); } } @@ -332,7 +354,11 @@ { CFStringRef tmpPath = CFURLCopyFileSystemPath(tempDirURL, kCFURLPOSIXPathStyle); CFRetain(tmpPath); - tmpDirPath = wxCFStringRef(tmpPath).AsString(wxLocale::GetSystemEncoding()); + #if wxCHECK_VERSION(2,9,0) + tmpDirPath = wxCFStringRef(tmpPath).AsString(wxLocale::GetSystemEncoding()); + #else + tmpDirPath = wxMacCFStringHolder(tmpPath).AsString(wxLocale::GetSystemEncoding()); + #endif CFRelease(tempDirURL); } @@ -354,7 +380,11 @@ CFURLRef autopanoURL = CFURLCreateCopyAppendingPathComponent(kCFAllocatorDefault,appSupportHugin,CFSTR("Autopano"),true); CFStringRef tmpPath = CFURLCopyFileSystemPath(autopanoURL, kCFURLPOSIXPathStyle); CFRetain(tmpPath); - appSupportAutoPanoFolder = wxCFStringRef(tmpPath).AsString(wxLocale::GetSystemEncoding()); + #if wxCHECK_VERSION(2,9,0) + appSupportAutoPanoFolder = wxCFStringRef(tmpPath).AsString(wxLocale::GetSystemEncoding()); + #else + appSupportAutoPanoFolder = wxMacCFStringHolder(tmpPath).AsString(wxLocale::GetSystemEncoding()); + #endif CFRelease(autopanoURL); } diff -r c168e07c4ee5 -r 831834a784e8 src/hugin1/base_wx/platform.h --- a/src/hugin1/base_wx/platform.h Sun Jun 17 16:55:15 2012 +0200 +++ b/src/hugin1/base_wx/platform.h Mon Jun 18 18:21:59 2012 +0200 @@ -41,9 +41,13 @@ #if defined __WXMAC__ || defined __WXOSX_COCOA__ -//#include <CoreFoundation/CFString.h> -#include "wx/osx/core/cfstring.h" -#include <wx/osx/private.h> +#if wxCHECK_VERSION(2,9,0) + #include "wx/osx/core/cfstring.h" + #include <wx/osx/private.h> +#else + #include <CoreFoundation/CFString.h> + #include <wx/mac/private.h> +#endif CFStringRef MacCreateCFStringWithWxString(const wxString& string); diff -r c168e07c4ee5 -r 831834a784e8 src/hugin1/hugin/GLPreviewFrame.cpp --- a/src/hugin1/hugin/GLPreviewFrame.cpp Sun Jun 17 16:55:15 2012 +0200 +++ b/src/hugin1/hugin/GLPreviewFrame.cpp Mon Jun 18 18:21:59 2012 +0200 @@ -183,10 +183,24 @@ EVT_CHOICE(XRCID("preview_guide_choice_proj"), GLPreviewFrame::OnGuideChanged) EVT_MENU(XRCID("action_show_overview"), GLPreviewFrame::OnOverviewToggle) EVT_CHECKBOX(XRCID("preview_show_grid"), GLPreviewFrame::OnSwitchPreviewGrid) - EVT_COMMAND_SCROLL(XRCID("layout_scale_slider"), GLPreviewFrame::OnLayoutScaleChange) +#ifndef __WXMAC__ + EVT_COMMAND_SCROLL(XRCID("layout_scale_slider"), GLPreviewFrame::OnLayoutScaleChange) EVT_SCROLL_CHANGED(GLPreviewFrame::OnChangeFOV) EVT_COMMAND_SCROLL_CHANGED(XRCID("layout_scale_slider"), GLPreviewFrame::OnLayoutScaleChange) - EVT_SCROLL_THUMBTRACK(GLPreviewFrame::OnTrackChangeFOV) +#else + #if wxCHECK_VERSION(2,9,0) + EVT_COMMAND_SCROLL(XRCID("layout_scale_slider"), GLPreviewFrame::OnLayoutScaleChange) + EVT_SCROLL_CHANGED(GLPreviewFrame::OnChangeFOV) + EVT_COMMAND_SCROLL_CHANGED(XRCID("layout_scale_slider"), GLPreviewFrame::OnLayoutScaleChange) + #else + EVT_SCROLL_THUMBRELEASE(GLPreviewFrame::OnChangeFOV) + EVT_SCROLL_ENDSCROLL(GLPreviewFrame::OnChangeFOV) + EVT_COMMAND_SCROLL_THUMBRELEASE(XRCID("layout_scale_slider"), GLPreviewFrame::OnLayoutScaleChange) + EVT_COMMAND_SCROLL_ENDSCROLL(XRCID("layout_scale_slider"), GLPreviewFrame::OnLayoutScaleChange) + EVT_COMMAND_SCROLL_THUMBTRACK(XRCID("layout_scale_slider"), GLPreviewFrame::OnLayoutScaleChange) + #endif +#endif + EVT_SCROLL_THUMBTRACK(GLPreviewFrame::OnTrackChangeFOV) EVT_TEXT_ENTER(XRCID("pano_text_hfov"), GLPreviewFrame::OnHFOVChanged ) EVT_TEXT_ENTER(XRCID("pano_text_vfov"), GLPreviewFrame::OnVFOVChanged ) EVT_TEXT_ENTER(XRCID("pano_val_roi_left"), GLPreviewFrame::OnROIChanged) diff -r c168e07c4ee5 -r 831834a784e8 src/hugin1/hugin/MainFrame.cpp --- a/src/hugin1/hugin/MainFrame.cpp Sun Jun 17 16:55:15 2012 +0200 +++ b/src/hugin1/hugin/MainFrame.cpp Mon Jun 18 18:21:59 2012 +0200 @@ -120,6 +120,7 @@ bool PanoDropTarget::OnDropFiles(wxCoord x, wxCoord y, const wxArrayString& filenames) { DEBUG_TRACE("OnDropFiles"); + wxMessageBox(filenames[0]); MainFrame * mf = MainFrame::Get(); if (!mf) return false; diff -r c168e07c4ee5 -r 831834a784e8 src/hugin1/hugin/MaskImageCtrl.cpp --- a/src/hugin1/hugin/MaskImageCtrl.cpp Sun Jun 17 16:55:15 2012 +0200 +++ b/src/hugin1/hugin/MaskImageCtrl.cpp Mon Jun 18 18:21:59 2012 +0200 @@ -1056,6 +1056,7 @@ // draw all areas without fillings dc.SetBrush(*wxTRANSPARENT_BRUSH); dc.SetLogicalFunction (wxINVERT); + dc.SetPen(*wxBLACK_PEN); wxPoint middle=transform(applyRot((m_cropRect.lowerRight()+m_cropRect.upperLeft())/2)); int c = 8; // size of midpoint cross diff -r c168e07c4ee5 -r 831834a784e8 src/hugin1/hugin/PreviewFrame.cpp --- a/src/hugin1/hugin/PreviewFrame.cpp Sun Jun 17 16:55:15 2012 +0200 +++ b/src/hugin1/hugin/PreviewFrame.cpp Mon Jun 18 18:21:59 2012 +0200 @@ -96,8 +96,18 @@ #else EVT_CHECKBOX(-1, PreviewFrame::OnChangeDisplayedImgs) #endif +#ifndef __WXMAC__ EVT_SCROLL_CHANGED(PreviewFrame::OnChangeFOV) - EVT_TOOL(ID_FULL_SCREEN, PreviewFrame::OnFullScreen) +#else + #if wxCHECK_VERSION(2,9,0) + EVT_SCROLL_CHANGED(PreviewFrame::OnChangeFOV) + #else + EVT_SCROLL_THUMBRELEASE(PreviewFrame::OnChangeFOV) + EVT_SCROLL_ENDSCROLL(PreviewFrame::OnChangeFOV) + EVT_SCROLL_THUMBTRACK(PreviewFrame::OnChangeFOV) + #endif +#endif + EVT_TOOL(ID_FULL_SCREEN, PreviewFrame::OnFullScreen) EVT_TOOL(ID_UNDO, PreviewFrame::OnUndo) EVT_TOOL(ID_REDO, PreviewFrame::OnRedo) EVT_BUTTON(PROJ_PARAM_RESET_ID, PreviewFrame::OnProjParameterReset) diff -r c168e07c4ee5 -r 831834a784e8 src/hugin1/hugin/treelistctrl.cpp --- a/src/hugin1/hugin/treelistctrl.cpp Sun Jun 17 16:55:15 2012 +0200 +++ b/src/hugin1/hugin/treelistctrl.cpp Mon Jun 18 18:21:59 2012 +0200 @@ -49,7 +49,11 @@ #include <wx/hashmap.h> #ifdef __WXMAC__ -#include "wx/osx/private.h" +#if wxCHECK_VERSION(2,9,0) + #include "wx/osx/private.h" +#else + #include "wx/mac/private.h" +#endif #endif #include "treelistctrl.h" @@ -2018,7 +2022,8 @@ const wxValidator &validator, const wxString& name) { -/*#ifdef __WXMAC__ +#ifdef __WXMAC__ + #if !wxCHECK_VERSION(2,9,0) if (style & wxTR_HAS_BUTTONS) style |= wxTR_MAC_BUTTONS; if (style & wxTR_HAS_BUTTONS) style &= ~wxTR_HAS_BUTTONS; style &= ~wxTR_LINES_AT_ROOT; @@ -2027,7 +2032,8 @@ int major,minor; wxGetOsVersion( &major, &minor ); if (major < 10) style |= wxTR_ROW_LINES; -#endif */ + #endif +#endif wxScrolledWindow::Create (parent, id, pos, size, style|wxHSCROLL|wxVSCROLL, name); |