------------------------------------------------------------ revno: 2631 committer: poy <[email protected]> branch nick: trunk timestamp: Mon 2011-10-10 22:18:18 +0200 message: require GCC 4.6 & remove hacks for 4.5 removed: dcpp/nullptr.h modified: Compile.txt SConstruct dcpp/compiler.h dwt/src/widgets/RichTextBox.cpp dwt/src/widgets/Splitter.cpp win32/ADLSProperties.cpp win32/AboutDlg.cpp win32/CertificatesPage.cpp win32/CommandDlg.cpp win32/DirectoryListingFrame.cpp win32/DownloadPage.cpp win32/FavHubProperties.cpp win32/HashProgressDlg.cpp win32/HubFrame.cpp win32/LogPage.cpp win32/MDIChildFrame.h win32/MagnetDlg.cpp win32/MainWindow.cpp win32/Mapper_MiniUPnPc.cpp win32/ParamDlg.cpp win32/PrivateFrame.cpp win32/QueueFrame.cpp win32/SettingsDialog.cpp win32/StatsFrame.cpp win32/StringListDlg.cpp win32/Table.cpp win32/UsersFrame.cpp win32/compiler.h
-- lp:dcplusplus https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk Your team Dcplusplus-team is subscribed to branch lp:dcplusplus. To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'Compile.txt' --- Compile.txt 2011-06-12 22:41:02 +0000 +++ Compile.txt 2011-10-10 20:18:18 +0000 @@ -54,7 +54,7 @@ 2. Compiler - a. MinGW (GCC 4.5.2 or later): + a. MinGW (GCC 4.6 or later): <http://sourceforge.net/projects/mingw/files/> The easiest way to install is via mingw-get. Extract it to C:\MinGW and run: === modified file 'SConstruct' --- SConstruct 2011-09-23 11:47:15 +0000 +++ SConstruct 2011-10-10 20:18:18 +0000 @@ -148,12 +148,6 @@ else: env.Append(CCFLAGS = ['-pipe']) -# MinGW seems to choke on member function calls from lambdas, one has to add "this->". -# bug report: <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47169> -# TODO When versions of GCC for MinGW that don't need this workaround are available, remove any -# mention of "GCC_WTF". Until then, use it to facilitate search & replace. -env.Append(CPPDEFINES = ['GCC_WTF="this"']) - if env['pch']: env.Append(CPPDEFINES = ['HAS_PCH']) === modified file 'dcpp/compiler.h' --- dcpp/compiler.h 2011-08-04 09:57:32 +0000 +++ dcpp/compiler.h 2011-10-10 20:18:18 +0000 @@ -20,8 +20,8 @@ #define DCPLUSPLUS_DCPP_COMPILER_H #if defined(__GNUC__) -#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) -#error GCC 4.5 is required +#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) +#error GCC 4.6 is required #endif === removed file 'dcpp/nullptr.h' --- dcpp/nullptr.h 2011-04-13 19:16:51 +0000 +++ dcpp/nullptr.h 1970-01-01 00:00:00 +0000 @@ -1,25 +0,0 @@ -// for compilers that don't support nullptr, use the workaround in section 1.1 of the proposal. - -#ifndef DCPLUSPLUS_DCPP_NULLPTR_H -#define DCPLUSPLUS_DCPP_NULLPTR_H - -#ifdef __GNUC__ -#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) // GCC 4.6 is the first GCC to implement nullptr. - -const // this is a const object... -class { -public: - template<class T> // convertible to any type - operator T*() const // of null non-member - { return 0; } // pointer... - template<class C, class T> // or any type of null - operator T C::*() const // member pointer... - { return 0; } -private: - void operator&() const; // whose address can't be taken -} nullptr = {}; // and whose name is nullptr - -#endif -#endif - -#endif === modified file 'dwt/src/widgets/RichTextBox.cpp' --- dwt/src/widgets/RichTextBox.cpp 2011-06-28 20:07:49 +0000 +++ dwt/src/widgets/RichTextBox.cpp 2011-10-10 20:18:18 +0000 @@ -84,7 +84,7 @@ <http://msdn.microsoft.com/en-us/library/bb787875(VS.85).aspx>, we have to handle the printing by ourselves. this is crucial for taskbar thumbnails and "Aero Peek" previews. */ onPrinting([this, bg](Canvas& canvas) { - Rectangle rect(GCC_WTF->getClientSize()); + Rectangle rect(getClientSize()); // paint a background in case the text doesn't span the whole box. canvas.fill(rect, Brush(bg)); @@ -96,10 +96,10 @@ format.rc.right *= 1440 / canvas.getDeviceCaps(LOGPIXELSX); format.rc.bottom *= 1440 / canvas.getDeviceCaps(LOGPIXELSY); format.rcPage = format.rc; - format.chrg.cpMin = GCC_WTF->lineIndex(GCC_WTF->getFirstVisibleLine()); + format.chrg.cpMin = lineIndex(getFirstVisibleLine()); format.chrg.cpMax = -1; - GCC_WTF->sendMessage(EM_FORMATRANGE, 1, reinterpret_cast<LPARAM>(&format)); - GCC_WTF->sendMessage(EM_FORMATRANGE); // "free the cached information" as MSDN recommends. + sendMessage(EM_FORMATRANGE, 1, reinterpret_cast<LPARAM>(&format)); + sendMessage(EM_FORMATRANGE); // "free the cached information" as MSDN recommends. }); } === modified file 'dwt/src/widgets/Splitter.cpp' --- dwt/src/widgets/Splitter.cpp 2011-06-03 18:55:11 +0000 +++ dwt/src/widgets/Splitter.cpp 2011-10-10 20:18:18 +0000 @@ -47,11 +47,11 @@ BaseType::create(cs); theme.load(VSCLASS_WINDOW, this); - onPainting([this](PaintCanvas& canvas) { GCC_WTF->handlePainting(canvas); }); + onPainting([this](PaintCanvas& canvas) { handlePainting(canvas); }); - onLeftMouseDown([this](const MouseEvent&) { return GCC_WTF->handleLButtonDown(); }); - onMouseMove([this](const MouseEvent& mouseEvent) { return GCC_WTF->handleMouseMove(mouseEvent); }); - onLeftMouseUp([this](const MouseEvent&) { return GCC_WTF->handleLButtonUp(); }); + onLeftMouseDown([this](const MouseEvent&) { return handleLButtonDown(); }); + onMouseMove([this](const MouseEvent& mouseEvent) { return handleMouseMove(mouseEvent); }); + onLeftMouseUp([this](const MouseEvent&) { return handleLButtonUp(); }); WidgetCreator<ToolTip>::create(this, ToolTip::Seed())->setText(Texts::get(Texts::resize)); } @@ -98,10 +98,9 @@ redraw(); ::SetCursor(::LoadCursor(0, horizontal ? IDC_SIZENS : IDC_SIZEWE)); onMouseLeave([this] { - GCC_WTF->hovering = false; - GCC_WTF->redraw(); + hovering = false; + redraw(); ::SetCursor(NULL); - }); } === modified file 'win32/ADLSProperties.cpp' --- win32/ADLSProperties.cpp 2011-05-04 19:32:00 +0000 +++ win32/ADLSProperties.cpp 2011-10-10 20:18:18 +0000 @@ -120,7 +120,7 @@ WinUtil::addDlgButtons(grid, [this] { handleOKClicked(); }, - [this] { GCC_WTF->endDialog(IDCANCEL); }); + [this] { endDialog(IDCANCEL); }); setText(T_("ADLSearch Properties")); === modified file 'win32/AboutDlg.cpp' --- win32/AboutDlg.cpp 2011-10-02 12:14:41 +0000 +++ win32/AboutDlg.cpp 2011-10-10 20:18:18 +0000 @@ -136,8 +136,8 @@ version = grid->addChild(gs)->addChild(ls); WinUtil::addDlgButtons(grid, - [this] { GCC_WTF->endDialog(IDOK); }, - [this] { GCC_WTF->endDialog(IDCANCEL); } + [this] { endDialog(IDOK); }, + [this] { endDialog(IDCANCEL); } ).second->setVisible(false); setText(T_("About DC++")); === modified file 'win32/CertificatesPage.cpp' --- win32/CertificatesPage.cpp 2011-05-04 19:32:00 +0000 +++ win32/CertificatesPage.cpp 2011-10-10 20:18:18 +0000 @@ -63,7 +63,7 @@ items.push_back(Item(box, SettingsManager::TLS_PRIVATE_KEY_FILE, PropPage::T_STR)); box->setHelpId(IDH_SETTINGS_CERTIFICATES_PRIVATE_KEY_FILE); ButtonPtr button = cur->addChild(dots); - button->onClicked([=] { GCC_WTF->handleBrowseFile(box, SettingsManager::TLS_PRIVATE_KEY_FILE); }); + button->onClicked([this, box] { handleBrowseFile(box, SettingsManager::TLS_PRIVATE_KEY_FILE); }); button->setHelpId(IDH_SETTINGS_CERTIFICATES_PRIVATE_KEY_FILE); cur->addChild(Label::Seed(T_("Own certificate file")))->setHelpId(IDH_SETTINGS_CERTIFICATES_CERTIFICATE_FILE); @@ -71,7 +71,7 @@ items.push_back(Item(box, SettingsManager::TLS_CERTIFICATE_FILE, PropPage::T_STR)); box->setHelpId(IDH_SETTINGS_CERTIFICATES_CERTIFICATE_FILE); button = cur->addChild(dots); - button->onClicked([=] { GCC_WTF->handleBrowseFile(box, SettingsManager::TLS_CERTIFICATE_FILE); }); + button->onClicked([this, box] { handleBrowseFile(box, SettingsManager::TLS_CERTIFICATE_FILE); }); button->setHelpId(IDH_SETTINGS_CERTIFICATES_CERTIFICATE_FILE); cur->addChild(Label::Seed(T_("Trusted certificates path")))->setHelpId(IDH_SETTINGS_CERTIFICATES_TRUSTED_CERTIFICATES_PATH); @@ -79,7 +79,7 @@ items.push_back(Item(box, SettingsManager::TLS_TRUSTED_CERTIFICATES_PATH, PropPage::T_STR)); box->setHelpId(IDH_SETTINGS_CERTIFICATES_TRUSTED_CERTIFICATES_PATH); button = cur->addChild(dots); - button->onClicked([=] { GCC_WTF->handleBrowseDir(box, SettingsManager::TLS_TRUSTED_CERTIFICATES_PATH); }); + button->onClicked([this, box] { handleBrowseDir(box, SettingsManager::TLS_TRUSTED_CERTIFICATES_PATH); }); button->setHelpId(IDH_SETTINGS_CERTIFICATES_TRUSTED_CERTIFICATES_PATH); } === modified file 'win32/CommandDlg.cpp' --- win32/CommandDlg.cpp 2011-05-04 19:32:00 +0000 +++ win32/CommandDlg.cpp 2011-10-10 20:18:18 +0000 @@ -162,7 +162,7 @@ WinUtil::addDlgButtons(grid, [this] { handleOKClicked(); }, - [this] { GCC_WTF->endDialog(IDCANCEL); }); + [this] { endDialog(IDCANCEL); }); { ButtonPtr button = grid->addChild(Button::Seed(T_("Help"))); === modified file 'win32/DirectoryListingFrame.cpp' --- win32/DirectoryListingFrame.cpp 2011-09-30 11:33:12 +0000 +++ win32/DirectoryListingFrame.cpp 2011-10-10 20:18:18 +0000 @@ -19,7 +19,6 @@ #include "stdafx.h" #include "DirectoryListingFrame.h" -#include <dcpp/nullptr.h> #include <dcpp/ADLSearch.h> #include <dcpp/ClientManager.h> #include <dcpp/FavoriteManager.h> @@ -290,7 +289,7 @@ WinUtil::makeColumns(files, filesColumns, COLUMN_LAST, SETTING(DIRECTORYLISTINGFRAME_ORDER), SETTING(DIRECTORYLISTINGFRAME_WIDTHS)); files->setSort(COLUMN_FILENAME); - files->onSelectionChanged([this] { GCC_WTF->callAsync([&] { updateStatus(); }); }); + files->onSelectionChanged([this] { callAsync([&] { updateStatus(); }); }); files->onDblClicked([this] { handleDoubleClickFiles(); }); files->onKeyDown([this](int c) { return handleKeyDownFiles(c); }); files->onSysKeyDown([this](int c) { return handleKeyDownFiles(c); }); === modified file 'win32/DownloadPage.cpp' --- win32/DownloadPage.cpp 2011-05-04 19:32:00 +0000 +++ win32/DownloadPage.cpp 2011-10-10 20:18:18 +0000 @@ -58,7 +58,7 @@ box->setHelpId(IDH_SETTINGS_DOWNLOAD_DOWNLOADDIR); ButtonPtr browse = cur->addChild(Button::Seed(T_("Browse..."))); - browse->onClicked([=] { GCC_WTF->handleBrowseDir(box, SettingsManager::DOWNLOAD_DIRECTORY); }); + browse->onClicked([this, box] { handleBrowseDir(box, SettingsManager::DOWNLOAD_DIRECTORY); }); browse->setHelpId(IDH_SETTINGS_DOWNLOAD_DOWNLOADDIR); label = cur->addChild(Label::Seed(T_("Unfinished downloads directory"))); @@ -70,7 +70,7 @@ box->setHelpId(IDH_SETTINGS_DOWNLOAD_TEMP_DOWNLOAD_DIRECTORY); browse = cur->addChild(Button::Seed(T_("Browse..."))); - browse->onClicked([=] { GCC_WTF->handleBrowseDir(box, SettingsManager::TEMP_DOWNLOAD_DIRECTORY); }); + browse->onClicked([this, box] { handleBrowseDir(box, SettingsManager::TEMP_DOWNLOAD_DIRECTORY); }); browse->setHelpId(IDH_SETTINGS_DOWNLOAD_TEMP_DOWNLOAD_DIRECTORY); } === modified file 'win32/FavHubProperties.cpp' --- win32/FavHubProperties.cpp 2011-10-10 19:45:51 +0000 +++ win32/FavHubProperties.cpp 2011-10-10 20:18:18 +0000 @@ -130,7 +130,7 @@ WinUtil::addDlgButtons(grid, [this] { handleOKClicked(); }, - [this] { GCC_WTF->endDialog(IDCANCEL); }); + [this] { endDialog(IDCANCEL); }); fillGroups(); === modified file 'win32/HashProgressDlg.cpp' --- win32/HashProgressDlg.cpp 2011-08-22 19:07:53 +0000 +++ win32/HashProgressDlg.cpp 2011-10-10 20:18:18 +0000 @@ -87,8 +87,8 @@ cur->column(1).align = GridInfo::BOTTOM_RIGHT; pair<ButtonPtr, ButtonPtr> buttons = WinUtil::addDlgButtons(cur, - [this] { GCC_WTF->endDialog(IDOK); }, - [this] { GCC_WTF->endDialog(IDCANCEL); }); + [this] { endDialog(IDOK); }, + [this] { endDialog(IDCANCEL); }); buttons.first->setText(T_("Run in background")); buttons.second->setVisible(false); === modified file 'win32/HubFrame.cpp' --- win32/HubFrame.cpp 2011-09-30 11:33:12 +0000 +++ win32/HubFrame.cpp 2011-10-10 20:18:18 +0000 @@ -181,7 +181,7 @@ WinUtil::makeColumns(users, usersColumns, COLUMN_LAST, SETTING(HUBFRAME_ORDER), SETTING(HUBFRAME_WIDTHS)); users->setSort(COLUMN_NICK); - users->onSelectionChanged([this] { GCC_WTF->callAsync([&] { updateStatus(); }); }); + users->onSelectionChanged([this] { callAsync([&] { updateStatus(); }); }); users->onDblClicked([this] { handleDoubleClickUsers(); }); users->onKeyDown([this](int c) { return handleUsersKeyDown(c); }); users->onContextMenu([this](const dwt::ScreenCoordinate &sc) { return handleUsersContextMenu(sc); }); @@ -224,10 +224,10 @@ status->setHelpId(STATUS_SHARED, IDH_HUB_SHARED); status->setHelpId(STATUS_AVERAGE_SHARED, IDH_HUB_AVERAGE_SHARED); - addAccel(FALT, 'G', [this] { GCC_WTF->handleGetList(); }); + addAccel(FALT, 'G', [this] { handleGetList(); }); addAccel(FCONTROL, 'R', [this] { handleReconnect(); }); addAccel(FCONTROL, 'T', [this] { handleFollow(); }); - addAccel(FALT, 'P', [this] { GCC_WTF->handlePrivateMessage(GCC_WTF->getParent()); }); + addAccel(FALT, 'P', [this] { handlePrivateMessage(getParent()); }); addAccel(FALT, 'U', [this] { users->setFocus(); }); initAccels(); @@ -787,8 +787,8 @@ void HubFrame::on(Connecting, Client*) noexcept { tstring hubUrl = Text::toT(client->getHubUrl()); - callAsync([this, hubUrl]() { addStatus(str(TF_("Connecting to %1%...") % hubUrl), true); }); - callAsync([this, hubUrl]() { GCC_WTF->setText(hubUrl); }); + callAsync([this, hubUrl] { addStatus(str(TF_("Connecting to %1%...") % hubUrl), true); }); + callAsync([this, hubUrl] { setText(hubUrl); }); } void HubFrame::on(Connected, Client*) noexcept { callAsync([this] { onConnected(); }); @@ -842,7 +842,7 @@ } #endif tstring hubNameT = Text::toT(hubName); - callAsync([this, hubNameT]() { GCC_WTF->setText(hubNameT); }); + callAsync([this, hubNameT] { setText(hubNameT); }); } void HubFrame::on(Message, Client*, const ChatMessage& message) noexcept { === modified file 'win32/LogPage.cpp' --- win32/LogPage.cpp 2011-05-04 19:32:00 +0000 +++ win32/LogPage.cpp 2011-10-10 20:18:18 +0000 @@ -77,7 +77,7 @@ dir->setHelpId(IDH_SETTINGS_LOG_DIRECTORY); ButtonPtr browse = cur->addChild(Button::Seed(T_("&Browse..."))); - browse->onClicked([this] { GCC_WTF->handleBrowseDir(dir, SettingsManager::LOG_DIRECTORY); }); + browse->onClicked([this] { handleBrowseDir(dir, SettingsManager::LOG_DIRECTORY); }); browse->setHelpId(IDH_SETTINGS_LOG_DIRECTORY); } === modified file 'win32/MDIChildFrame.h' --- win32/MDIChildFrame.h 2011-06-27 16:46:13 +0000 +++ win32/MDIChildFrame.h 2011-10-10 20:18:18 +0000 @@ -225,7 +225,7 @@ menu->setTitle(escapeMenu(getText()), getParent()->getIcon(this)); tabMenuImpl(menu); - menu->appendItem(T_("&Close"), [this] { GCC_WTF->close(true); }, WinUtil::menuIcon(IDI_EXIT)); + menu->appendItem(T_("&Close"), [this] { close(true); }, WinUtil::menuIcon(IDI_EXIT)); menu->open(pt); return true; === modified file 'win32/MagnetDlg.cpp' --- win32/MagnetDlg.cpp 2011-05-04 19:32:00 +0000 +++ win32/MagnetDlg.cpp 2011-10-10 20:18:18 +0000 @@ -116,7 +116,7 @@ WinUtil::addDlgButtons(bottom->addChild(Grid::Seed(2, 1)), [this] { handleOKClicked(); }, - [this] { GCC_WTF->endDialog(IDCANCEL); }); + [this] { endDialog(IDCANCEL); }); } setText(T_("MAGNET Link detected")); === modified file 'win32/MainWindow.cpp' --- win32/MainWindow.cpp 2011-10-08 15:21:54 +0000 +++ win32/MainWindow.cpp 2011-10-10 20:18:18 +0000 @@ -201,7 +201,7 @@ callAsync([this] { int cmdShow = dwt::Application::instance().getCmdShow(); - ::ShowWindow(GCC_WTF->handle(), (cmdShow == SW_SHOWDEFAULT || cmdShow == SW_SHOWNORMAL) ? SETTING(MAIN_WINDOW_STATE) : cmdShow); + ::ShowWindow(handle(), (cmdShow == SW_SHOWDEFAULT || cmdShow == SW_SHOWNORMAL) ? SETTING(MAIN_WINDOW_STATE) : cmdShow); if(cmdShow == SW_MINIMIZE || cmdShow == SW_SHOWMINIMIZED || cmdShow == SW_SHOWMINNOACTIVE) handleMinimized(); }); @@ -283,7 +283,7 @@ file->appendSeparator(); file->appendItem(T_("GeoIP database update"), [this] { updateGeo(); }); file->appendSeparator(); - file->appendItem(T_("E&xit\tAlt+F4"), [this] { GCC_WTF->close(true); }, WinUtil::menuIcon(IDI_EXIT)); + file->appendItem(T_("E&xit\tAlt+F4"), [this] { close(true); }, WinUtil::menuIcon(IDI_EXIT)); } { @@ -1545,7 +1545,7 @@ fillLimiterMenu(menu->appendPopup(T_("Download limit")), false); fillLimiterMenu(menu->appendPopup(T_("Upload limit")), true); menu->appendSeparator(); - menu->appendItem(T_("Exit"), [this] { GCC_WTF->close(true); }, WinUtil::menuIcon(IDI_EXIT)); + menu->appendItem(T_("Exit"), [this] { close(true); }, WinUtil::menuIcon(IDI_EXIT)); dwt::ScreenCoordinate pt; ::GetCursorPos(&pt.getPoint()); === modified file 'win32/Mapper_MiniUPnPc.cpp' --- win32/Mapper_MiniUPnPc.cpp 2011-10-10 17:43:39 +0000 +++ win32/Mapper_MiniUPnPc.cpp 2011-10-10 20:18:18 +0000 @@ -22,7 +22,6 @@ #include <dcpp/SettingsManager.h> #include <dcpp/Util.h> -#include <dcpp/nullptr.h> extern "C" { #ifndef STATICLIB === modified file 'win32/ParamDlg.cpp' --- win32/ParamDlg.cpp 2011-05-04 19:32:00 +0000 +++ win32/ParamDlg.cpp 2011-10-10 20:18:18 +0000 @@ -105,7 +105,7 @@ WinUtil::addDlgButtons(grid->addChild(Grid::Seed(2, 1)), [this] { okClicked(); }, - [this] { GCC_WTF->endDialog(IDCANCEL); }); + [this] { endDialog(IDCANCEL); }); setText(title); === modified file 'win32/PrivateFrame.cpp' --- win32/PrivateFrame.cpp 2011-09-30 11:33:12 +0000 +++ win32/PrivateFrame.cpp 2011-10-10 20:18:18 +0000 @@ -136,9 +136,9 @@ message->setHelpId(IDH_PM_MESSAGE); addWidget(message, true); - message->onKeyDown([this](int c) { return GCC_WTF->handleMessageKeyDown(c); }); - message->onSysKeyDown([this](int c) { return GCC_WTF->handleMessageKeyDown(c); }); - message->onChar([this](int c) { return GCC_WTF->handleMessageChar(c); }); + message->onKeyDown([this](int c) { return handleMessageKeyDown(c); }); + message->onSysKeyDown([this](int c) { return handleMessageKeyDown(c); }); + message->onChar([this](int c) { return handleMessageChar(c); }); initStatus(); status->onDblClicked(STATUS_STATUS, [this] { openLog(); }); === modified file 'win32/QueueFrame.cpp' --- win32/QueueFrame.cpp 2011-08-05 20:59:14 +0000 +++ win32/QueueFrame.cpp 2011-10-10 20:18:18 +0000 @@ -94,7 +94,7 @@ files->setSort(COLUMN_TARGET); files->onKeyDown([this](int c) { return handleKeyDownFiles(c); }); - files->onSelectionChanged([this] { GCC_WTF->callAsync([&] { updateStatus(); }); }); + files->onSelectionChanged([this] { callAsync([&] { updateStatus(); }); }); files->onContextMenu([this](const dwt::ScreenCoordinate &sc) { return handleFilesContextMenu(sc); }); if(!BOOLSETTING(QUEUEFRAME_SHOW_TREE)) { === modified file 'win32/SettingsDialog.cpp' --- win32/SettingsDialog.cpp 2011-05-04 19:32:00 +0000 +++ win32/SettingsDialog.cpp 2011-10-10 20:18:18 +0000 @@ -136,17 +136,12 @@ auto index = pages.size(); images->add(dwt::Icon(icon, size)); page->onVisibilityChanged([=](bool b) { if(b) { -#ifdef __GNUC__ // MSVC doesn't like the explicit "this"... -#define GCC_WTF2(x) this->x -#else -#define GCC_WTF2(x) x -#endif - GCC_WTF2(setSmallIcon(WinUtil::createIcon(icon, 16))); - GCC_WTF2(setLargeIcon(WinUtil::createIcon(icon, 32))); + setSmallIcon(WinUtil::createIcon(icon, 16)); + setLargeIcon(WinUtil::createIcon(icon, 32)); } }); auto ret = tree->insert(title, parent, reinterpret_cast<LPARAM>(page), true, index); if(index == setting) - GCC_WTF->callAsync([=] { tree->setSelected(ret); tree->ensureVisible(ret); }); + callAsync([=] { tree->setSelected(ret); tree->ensureVisible(ret); }); pages.push_back(page); return ret; }; @@ -209,7 +204,7 @@ WinUtil::addDlgButtons(cur, [this] { handleClosing(); handleOKClicked(); }, - [this] { handleClosing(); GCC_WTF->endDialog(IDCANCEL); }); + [this] { handleClosing(); endDialog(IDCANCEL); }); Button::Seed seed(T_("Help")); seed.padding.x = 10; === modified file 'win32/StatsFrame.cpp' --- win32/StatsFrame.cpp 2011-04-05 19:16:53 +0000 +++ win32/StatsFrame.cpp 2011-10-10 20:18:18 +0000 @@ -50,7 +50,7 @@ return; draw(canvas, rect); }); - onPrinting([this](dwt::Canvas& canvas) { draw(canvas, dwt::Rectangle(GCC_WTF->getClientSize())); }); + onPrinting([this](dwt::Canvas& canvas) { draw(canvas, dwt::Rectangle(getClientSize())); }); initStatus(); === modified file 'win32/StringListDlg.cpp' --- win32/StringListDlg.cpp 2011-09-24 21:13:31 +0000 +++ win32/StringListDlg.cpp 2011-10-10 20:18:18 +0000 @@ -163,7 +163,7 @@ ::SetWindowLongPtr( WinUtil::addDlgButtons(cur, [this] { handleOKClicked(); }, - [this] { GCC_WTF->endDialog(IDCANCEL); }) + [this] { endDialog(IDCANCEL); }) .first->handle(), GWLP_ID, 0); // the def button is the "Add" button } === modified file 'win32/Table.cpp' --- win32/Table.cpp 2011-04-05 19:16:53 +0000 +++ win32/Table.cpp 2011-10-10 20:18:18 +0000 @@ -28,5 +28,5 @@ Table::Table(dwt::Widget* parent) : BaseType(parent) { - addAccel(FCONTROL, 'A', [this] { GCC_WTF->selectAll(); }); + addAccel(FCONTROL, 'A', [this] { selectAll(); }); } === modified file 'win32/UsersFrame.cpp' --- win32/UsersFrame.cpp 2011-08-22 20:33:02 +0000 +++ win32/UsersFrame.cpp 2011-10-10 20:18:18 +0000 @@ -155,7 +155,7 @@ users->setSort(COLUMN_NICK); // TODO check default (browse vs get) - users->onDblClicked([this] { GCC_WTF->handleGetList(); }); + users->onDblClicked([this] { handleGetList(); }); users->onKeyDown([this](int c) { return handleKeyDown(c); }); users->onContextMenu([this](dwt::ScreenCoordinate pt) { return handleContextMenu(pt); }); users->onSelectionChanged([this] { handleSelectionChanged(); }); === modified file 'win32/compiler.h' --- win32/compiler.h 2011-01-27 23:11:24 +0000 +++ win32/compiler.h 2011-10-10 20:18:18 +0000 @@ -17,8 +17,8 @@ */ #if defined(__GNUC__) -#if __GNUC__ < 4 || (__GNUC__ == 4 && (__GNUC_MINOR__ < 5 || (__GNUC_MINOR__ == 5 && __GNUC_PATCHLEVEL__ < 2))) -#error GCC 4.5.2 is required +#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) +#error GCC 4.6 is required #endif #elif defined(_MSC_VER)
_______________________________________________ Mailing list: https://launchpad.net/~linuxdcpp-team Post to : [email protected] Unsubscribe : https://launchpad.net/~linuxdcpp-team More help : https://help.launchpad.net/ListHelp

