------------------------------------------------------------ revno: 25 committer: poy <p...@123gen.com> branch nick: DevPlugin timestamp: Sun 2013-05-05 15:49:41 +0200 message: update dwt modified: dwt/src/Dispatcher.cpp projects/make/Makefile src/GUI.cpp
-- lp:~dcplusplus-team/dcpp-plugin-sdk-cpp/DevPlugin https://code.launchpad.net/~dcplusplus-team/dcpp-plugin-sdk-cpp/DevPlugin Your team Dcplusplus-team is subscribed to branch lp:~dcplusplus-team/dcpp-plugin-sdk-cpp/DevPlugin. To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcpp-plugin-sdk-cpp/DevPlugin/+edit-subscription
=== modified file 'dwt/src/Dispatcher.cpp' --- dwt/src/Dispatcher.cpp 2013-01-29 18:30:27 +0000 +++ dwt/src/Dispatcher.cpp 2013-05-05 13:49:41 +0000 @@ -37,6 +37,12 @@ #include <algorithm> #include <sstream> +#ifdef DWT_SHARED +#include <boost/uuid/uuid.hpp> +#include <boost/uuid/random_generator.hpp> +#include <boost/uuid/uuid_io.hpp> +#endif + namespace dwt { LRESULT CALLBACK WindowProc::initProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { @@ -222,8 +228,12 @@ #ifdef DWT_SHARED /* in a shared library, classes registered by the lib can't clash with those regged by the host - or by other dynamically loaded libs. append a (hopefully unique) string to that end... */ - stream << &Application::instance(); + or by other dynamically loaded libs. append a unique string to that end. */ + static boost::uuids::uuid uuid; + if(uuid.is_nil()) { + uuid = boost::uuids::random_generator()(); + } + stream << uuid; #endif classNames.push_back(stream.str()); === modified file 'projects/make/Makefile' --- projects/make/Makefile 2013-04-26 15:22:25 +0000 +++ projects/make/Makefile 2013-05-05 13:49:41 +0000 @@ -65,7 +65,7 @@ # boost CPPFLAGS += -I../../boost -ifneq ($(findstring mingw, $(shell gcc -dumpmachine)),) +ifneq ($(findstring mingw, $(COMPILER_SPEC)),) CPPFLAGS += -DBOOST_ALL_NO_LIB -DBOOST_USE_WINDOWS_H endif OBJS += \ @@ -90,7 +90,7 @@ # dwt CPPFLAGS += -I../../dwt/include -DDWT_SHARED -ifeq ($(findstring mingw, $(shell gcc -dumpmachine)),) +ifeq ($(findstring mingw, $(COMPILER_SPEC)),) $(error "dwt requires a compiler with Windows as target") else LINKFLAGS += -lcomctl32 -lcomdlg32 -lgdi32 -lole32 -lshlwapi -luuid -luxtheme === modified file 'src/GUI.cpp' --- src/GUI.cpp 2013-04-25 18:35:22 +0000 +++ src/GUI.cpp 2013-05-05 13:49:41 +0000 @@ -21,7 +21,6 @@ #include "Plugin.h" #include <pluginsdk/Config.h> -#include <pluginsdk/Core.h> #include <pluginsdk/Util.h> #include <memory> @@ -30,6 +29,7 @@ #include <dwt/Application.h> #include <dwt/Clipboard.h> +#include <dwt/DWTException.h> #include <dwt/Events.h> #include <dwt/util/HoldRedraw.h> #include <dwt/widgets/Button.h> @@ -50,7 +50,6 @@ #define tstring _tstring using dcapi::Config; -using dcapi::Core; using dcapi::Util; using namespace dwt; @@ -88,8 +87,10 @@ window->create(seed); auto iconPath = Util::toT(Config::getInstallPath() + "DevPlugin.ico"); - window->setSmallIcon(new dwt::Icon(iconPath, dwt::Point(16, 16))); - window->setLargeIcon(new dwt::Icon(iconPath, dwt::Point(32, 32))); + try { + window->setSmallIcon(new dwt::Icon(iconPath, dwt::Point(16, 16))); + window->setLargeIcon(new dwt::Icon(iconPath, dwt::Point(32, 32))); + } catch(const dwt::DWTException&) { } window->onClosing([]() -> bool { window = nullptr;
_______________________________________________ Mailing list: https://launchpad.net/~linuxdcpp-team Post to : linuxdcpp-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~linuxdcpp-team More help : https://help.launchpad.net/ListHelp