diff --git a/source/tools/atlas/AtlasUI/CustomControls/Windows/AtlasWindow.h b/source/tools/atlas/AtlasUI/CustomControls/Windows/AtlasWindow.h index d0498d2a20..a2c64999cd 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/Windows/AtlasWindow.h +++ b/source/tools/atlas/AtlasUI/CustomControls/Windows/AtlasWindow.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2009 Wildfire Games. +/* Copyright (C) 2013 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -25,7 +25,12 @@ #include "wx/filename.h" -#include +#include +#if BOOST_VERSION >= 105400 +# include +#else +# include +#endif class AtObj; @@ -48,7 +53,11 @@ public: AtlasWindow(wxWindow* parent, const wxString& title, const wxSize& size); +#if BOOST_VERSION >= 105400 + boost::signals2::signal sig_FileSaved; +#else boost::signal sig_FileSaved; +#endif private: diff --git a/source/tools/atlas/AtlasUI/General/Observable.h b/source/tools/atlas/AtlasUI/General/Observable.h index ccd422090a..39147701f3 100644 --- a/source/tools/atlas/AtlasUI/General/Observable.h +++ b/source/tools/atlas/AtlasUI/General/Observable.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2011 Wildfire Games. +/* Copyright (C) 2013 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -39,11 +39,17 @@ variable_to_be_watched.NotifyObservers(); */ -#include -#include - +#include +#if BOOST_VERSION >= 105400 +# include +typedef boost::signals2::connection ObservableConnection; +typedef boost::signals2::scoped_connection ObservableScopedConnection; +#else +# include typedef boost::signals::connection ObservableConnection; typedef boost::signals::scoped_connection ObservableScopedConnection; +#endif +#include template class Observable : public T { @@ -90,9 +96,15 @@ public: else { // Temporarily disable conn +#if BOOST_VERSION >= 105400 + boost::signals2::shared_connection_block blocker(conn); +#else conn.block(); +#endif NotifyObservers(); +#if BOOST_VERSION < 105400 conn.unblock(); +#endif } } @@ -103,7 +115,11 @@ public: } private: +#if BOOST_VERSION >= 105400 + boost::signals2::signal m_Signal; +#else boost::signal m_Signal; +#endif }; // A similar thing, but for wrapping pointers instead of objects @@ -163,15 +179,25 @@ public: else { // Temporarily disable conn +#if BOOST_VERSION >= 105400 + boost::signals2::shared_connection_block blocker(conn); +#else conn.block(); +#endif NotifyObservers(); +#if BOOST_VERSION < 105400 conn.unblock(); +#endif } } private: T* m_Ptr; +#if BOOST_VERSION >= 105400 + boost::signals2::signal m_Signal; +#else boost::signal m_Signal; +#endif }; class ObservableScopedConnections diff --git a/source/tools/atlas/AtlasUI/Misc/precompiled.h b/source/tools/atlas/AtlasUI/Misc/precompiled.h index 7b75eb8721..0c205bf77f 100644 --- a/source/tools/atlas/AtlasUI/Misc/precompiled.h +++ b/source/tools/atlas/AtlasUI/Misc/precompiled.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2009 Wildfire Games. +/* Copyright (C) 2013 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -84,7 +84,13 @@ #include #include -#include +#include +#if BOOST_VERSION >= 105400 +// Signals is deprecated since 1.54 +# include +#else +# include +#endif #include // Nicer memory-leak detection: @@ -95,12 +101,12 @@ # endif #endif -#endif // HAVE_PCH +#else // HAVE_PCH -#if !HAVE_PCH // If no PCH, just include the most common headers anyway # include "wx/wx.h" -#endif + +#endif // HAVE_PCH #ifdef _WIN32 # define ATLASDLLIMPEXP extern "C" __declspec(dllexport)