From: <arn...@us...> - 2007-12-11 20:00:10
|
Revision: 933 http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=933&view=rev Author: arnetheduck Date: 2007-12-11 12:00:08 -0800 (Tue, 11 Dec 2007) Log Message: ----------- fix adc protocol order, chat focus, pageup/down in private frame Modified Paths: -------------- dcplusplus/trunk/changelog.txt dcplusplus/trunk/dcpp/AdcHub.cpp dcplusplus/trunk/win32/MDIChildFrame.h dcplusplus/trunk/win32/PrivateFrame.cpp Modified: dcplusplus/trunk/changelog.txt =================================================================== --- dcplusplus/trunk/changelog.txt 2007-12-11 18:25:18 UTC (rev 932) +++ dcplusplus/trunk/changelog.txt 2007-12-11 20:00:08 UTC (rev 933) @@ -27,6 +27,7 @@ * Fixed protocol error STA being sent as type C * Fixed a multisource download crash * Fixed state checks for uploads (an invalid sequence could possibly crash client from remote) +* Page up/down in private chat scrolls chat log just as in hub chat -- 0.703 2007-11-08 -- * Fixed invalid strings (thanks james ross) Modified: dcplusplus/trunk/dcpp/AdcHub.cpp =================================================================== --- dcplusplus/trunk/dcpp/AdcHub.cpp 2007-12-11 18:25:18 UTC (rev 932) +++ dcplusplus/trunk/dcpp/AdcHub.cpp 2007-12-11 20:00:08 UTC (rev 933) @@ -469,14 +469,15 @@ proto = &SECURE_CLIENT_PROTOCOL_TEST; } else { // dc++ <= 0.703 has a bug which makes it respond with CSTA to the hub if an unrecognised protocol is used *sigh* - if(true || user.getUser()->isSet(User::NO_ADC_1_0_PROTOCOL)) { - if(user.getUser()->isSet(User::NO_ADC_0_10_PROTOCOL)) { + // so we try 0.10 first... + if(user.getUser()->isSet(User::NO_ADC_0_10_PROTOCOL)) { + if(user.getUser()->isSet(User::NO_ADC_1_0_PROTOCOL)) { /// @todo log return; } + proto = &CLIENT_PROTOCOL; + } else { proto = &CLIENT_PROTOCOL_TEST; - } else { - proto = &CLIENT_PROTOCOL; } } Modified: dcplusplus/trunk/win32/MDIChildFrame.h =================================================================== --- dcplusplus/trunk/win32/MDIChildFrame.h 2007-12-11 18:25:18 UTC (rev 932) +++ dcplusplus/trunk/win32/MDIChildFrame.h 2007-12-11 20:00:08 UTC (rev 933) @@ -97,7 +97,6 @@ if(alwaysFocus || (lastFocus == NULL)) { lastFocus = widget->handle(); - ::SetFocus(lastFocus); } if(alwaysFocus) alwaysSameFocus = true; Modified: dcplusplus/trunk/win32/PrivateFrame.cpp =================================================================== --- dcplusplus/trunk/win32/PrivateFrame.cpp 2007-12-11 18:25:18 UTC (rev 932) +++ dcplusplus/trunk/win32/PrivateFrame.cpp 2007-12-11 20:00:08 UTC (rev 933) @@ -145,8 +145,8 @@ } line += aLine; - int limit = chat->getTextLimit(); - if(chat->length() + static_cast<int>(line.size()) > limit) { + size_t limit = chat->getTextLimit(); + if(chat->length() + line.size() > limit) { HoldRedraw hold(chat); chat->setSelection(0, chat->lineIndex(chat->lineFromChar(limit / 10))); chat->replaceSelection(_T("")); @@ -336,8 +336,14 @@ bool PrivateFrame::handleKeyDown(int c) { if(c == VK_RETURN && enter()) { return true; + } else if(c == VK_PRIOR) { // page up + chat->sendMessage(WM_VSCROLL, SB_PAGEUP); + return true; + } else if(c == VK_NEXT) { // page down + chat->sendMessage(WM_VSCROLL, SB_PAGEDOWN); + return true; } - + return false; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |