linuxdcpp-team team mailing list archive
-
linuxdcpp-team team
-
Mailing list archive
-
Message #01894
[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2236: revert a visibility fix by using lambdas
------------------------------------------------------------
revno: 2236
committer: poy <poy@xxxxxxxxxx>
branch nick: repo
timestamp: Wed 2010-09-08 17:32:07 +0200
message:
revert a visibility fix by using lambdas
modified:
win32/HubFrame.cpp
win32/HubFrame.h
win32/IRecent.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 'win32/HubFrame.cpp'
--- win32/HubFrame.cpp 2010-08-25 12:54:08 +0000
+++ win32/HubFrame.cpp 2010-09-08 15:32:07 +0000
@@ -743,8 +743,9 @@
}
void HubFrame::on(Connecting, Client*) throw() {
- callAsync(std::bind(&HubFrame::addStatus, this, str(TF_("Connecting to %1%...") % Text::toT(client->getHubUrl())), true));
- callAsync(std::bind(&RecentType::setText, this, Text::toT(client->getHubUrl())));
+ tstring hubUrl = Text::toT(client->getHubUrl());
+ callAsync([this, hubUrl]() { addStatus(boost::str(TF_("Connecting to %1%...") % hubUrl), true); });
+ callAsync([this, hubUrl]() { setText(hubUrl); });
}
void HubFrame::on(Connected, Client*) throw() {
callAsync(std::bind(&HubFrame::onConnected, this));
@@ -797,7 +798,8 @@
hubName += " - " + version;
}
#endif
- callAsync(std::bind(&RecentType::setText, this, Text::toT(hubName)));
+ tstring hubNameT = Text::toT(hubName);
+ callAsync([this, hubNameT]() { setText(hubNameT); });
}
void HubFrame::on(Message, Client*, const ChatMessage& message) throw() {
=== modified file 'win32/HubFrame.h'
--- win32/HubFrame.h 2010-08-25 12:54:08 +0000
+++ win32/HubFrame.h 2010-09-08 15:32:07 +0000
@@ -49,8 +49,7 @@
friend class AspectUserInfo<HubFrame>;
friend class AspectUserCommand<HubFrame>;
- typedef IRecent<HubFrame> RecentType;
- using RecentType::setText;
+ using IRecent<HubFrame>::setText;
public:
enum Status {
=== modified file 'win32/IRecent.h'
--- win32/IRecent.h 2010-02-11 21:44:13 +0000
+++ win32/IRecent.h 2010-09-08 15:32:07 +0000
@@ -32,7 +32,6 @@
WindowManager::getInstance()->addRecent(t().getId(), t().getWindowParams());
}
-public:
void setText(const tstring& text) {
t().MDIChildFrame<T>::setText(text);
WindowManager::getInstance()->updateRecent(t().getId(), t().getWindowParams());