linuxdcpp-team team mailing list archive
-
linuxdcpp-team team
-
Mailing list archive
-
Message #05602
[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2921: Remove addDbgLine and merge to addLine
------------------------------------------------------------
revno: 2921
committer: iceman50 <bdcdevel@xxxxxxxxx>
branch nick: dcplusplus
timestamp: Tue 2012-05-15 16:40:11 -0500
message:
Remove addDbgLine and merge to addLine
modified:
win32/DebugFrame.cpp
win32/DebugFrame.h
win32/MainWindow.cpp
--
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/DebugFrame.cpp'
--- win32/DebugFrame.cpp 2012-05-15 20:17:06 +0000
+++ win32/DebugFrame.cpp 2012-05-15 21:40:11 +0000
@@ -158,19 +158,8 @@
}
}
-void DebugFrame::addLine(const tstring& msg) {
- bool scroll = debug->scrollIsAtEnd();
-
- debug->addText(Text::toT("\r\n[" + Util::getTimeString() + "] ") + msg);
-
- if(scroll)
- debug->scrollToBottom();
-
- setDirty(SettingsManager::BOLD_SYSTEM_LOG);
-}
-
-void DebugFrame::addDbgLine(const string& cmd) {
- cmdList.push_back(cmd);
+void DebugFrame::addLine(const string& msg) {
+ cmdList.push_back(msg);
auto x = Util::emptyString;
{
@@ -179,8 +168,16 @@
x = cmdList.front();
cmdList.pop_front();
- }
- callAsync([=] { addLine(Text::toT(x)); });
+ }
+
+ bool scroll = debug->scrollIsAtEnd();
+
+ debug->addText(Text::toT("\r\n[" + Util::getTimeString() + "] " + msg));
+
+ if(scroll)
+ debug->scrollToBottom();
+
+ setDirty(SettingsManager::BOLD_SYSTEM_LOG);
}
bool DebugFrame::preClosing() {
@@ -245,28 +242,28 @@
if(!showHubMsg)
return;
if(!filterByHub || Text::toT(ip) == url) {
- callAsync([=] { addDbgLine("From Hub:\t\t<" + ip + ">\t \t" + aLine); });
+ callAsync([=] { addLine("From Hub:\t\t<" + ip + ">\t \t" + aLine); });
}
break;
case DebugManager::HUB_OUT:
if(!showHubMsg)
return;
if(!filterByHub || Text::toT(ip) == url) {
- callAsync([=] { addDbgLine("To Hub:\t\t<" + ip + ">\t \t" + aLine); });
+ callAsync([=] { addLine("To Hub:\t\t<" + ip + ">\t \t" + aLine); });
}
break;
case DebugManager::CLIENT_IN:
if(!showClientMsg)
return;
if(!filterByHub || Text::toT(ip) == url) {
- callAsync([=] { addDbgLine("From Client:\t\t<" + ip + ">\t \t" + aLine); });
+ callAsync([=] { addLine("From Client:\t\t<" + ip + ">\t \t" + aLine); });
}
break;
case DebugManager::CLIENT_OUT:
if(!showClientMsg)
return;
if(!filterByHub || Text::toT(ip) == url) {
- callAsync([=] { addDbgLine("To Client:\t\t<" + ip + ">\t \t" + aLine); });
+ callAsync([=] { addLine("To Client:\t\t<" + ip + ">\t \t" + aLine); });
}
break;
default: dcassert(0);
=== modified file 'win32/DebugFrame.h'
--- win32/DebugFrame.h 2012-05-10 19:05:05 +0000
+++ win32/DebugFrame.h 2012-05-15 21:40:11 +0000
@@ -74,8 +74,7 @@
void layout();
void updateStatus();
- void addLine(const tstring& msg);
- void addDbgLine(const string& cmd);
+ void addLine(const string& msg);
bool preClosing();
=== modified file 'win32/MainWindow.cpp'
--- win32/MainWindow.cpp 2012-05-15 20:17:06 +0000
+++ win32/MainWindow.cpp 2012-05-15 21:40:11 +0000
@@ -1707,5 +1707,6 @@
compare_id(SystemFrame);
compare_id(StatsFrame);
compare_id(TextFrame);
+ compare_id(DebugFrame);
#undef compare_id
}