From: <arn...@us...> - 2006-05-13 15:01:01
|
Revision: 602 Author: arnetheduck Date: 2006-05-13 08:00:16 -0700 (Sat, 13 May 2006) ViewCVS: http://svn.sourceforge.net/dcplusplus/?rev=602&view=rev Log Message: ----------- Patches Modified Paths: -------------- dcplusplus/trunk/Example.xml dcplusplus/trunk/changelog.txt dcplusplus/trunk/client/DownloadManager.cpp dcplusplus/trunk/client/SettingsManager.cpp dcplusplus/trunk/client/SettingsManager.h dcplusplus/trunk/client/StringDefs.cpp dcplusplus/trunk/client/StringDefs.h dcplusplus/trunk/client/UploadManager.cpp dcplusplus/trunk/windows/AdvancedPage.cpp Modified: dcplusplus/trunk/Example.xml =================================================================== --- dcplusplus/trunk/Example.xml 2006-05-03 21:47:14 UTC (rev 601) +++ dcplusplus/trunk/Example.xml 2006-05-13 15:00:16 UTC (rev 602) @@ -379,6 +379,7 @@ <String Name="SettingsAutoAway">Auto-away on minimize (and back on restore)</String> <String Name="SettingsAutoFollow">Automatically follow redirects</String> <String Name="SettingsAutoKick">Automatically disconnect users who leave the hub</String> + <String Name="SettingsAutoKickNoFavs">Don't automatically disconnect favorite users who leave the hub</String> <String Name="SettingsAutoSearch">Automatically search for alternative download locations</String> <String Name="SettingsAutoSearchAutoMatch">Automatically match queue for auto search hits</String> <String Name="SettingsAutoSearchLimit">Auto-search limit</String> Modified: dcplusplus/trunk/changelog.txt =================================================================== --- dcplusplus/trunk/changelog.txt 2006-05-03 21:47:14 UTC (rev 601) +++ dcplusplus/trunk/changelog.txt 2006-05-13 15:00:16 UTC (rev 602) @@ -8,6 +8,9 @@ * Added display of CID in a few places * Updated yaSSL to 1.2.2 * Fixed ADC hubname display (thanks ullner) +* Advanced TTH rollback no longer performed if tree is invalid (thanks garg) +* Option not to auto-disconnect favorite users (thanks ullner) +* Fixed auto-disconnect delay (thanks uller) -- 0.689 2006-04-01 -- * Fixed displaying of available bytes when user list is off Modified: dcplusplus/trunk/client/DownloadManager.cpp =================================================================== --- dcplusplus/trunk/client/DownloadManager.cpp 2006-05-03 21:47:14 UTC (rev 601) +++ dcplusplus/trunk/client/DownloadManager.cpp 2006-05-13 15:00:16 UTC (rev 602) @@ -266,7 +266,9 @@ d->setFlag(Download::FLAG_ANTI_FRAG); } - if(BOOLSETTING(ADVANCED_RESUME) && d->getTreeValid() && start > 0) { + if(BOOLSETTING(ADVANCED_RESUME) && d->getTreeValid() && start > 0 && + (d->getTigerTree().getLeaves().size() > 32 || // 32 leaves is 5 levels + d->getTigerTree().getBlockSize() * 10 < d->getSize())) { d->setStartPos(getResumePos(d->getDownloadTarget(), d->getTigerTree(), start)); } else { int rollback = SETTING(ROLLBACK); Modified: dcplusplus/trunk/client/SettingsManager.cpp =================================================================== --- dcplusplus/trunk/client/SettingsManager.cpp 2006-05-03 21:47:14 UTC (rev 601) +++ dcplusplus/trunk/client/SettingsManager.cpp 2006-05-13 15:00:16 UTC (rev 602) @@ -73,7 +73,7 @@ "NoIpOverride", "SearchOnlyFreeSlots", "LastSearchType", "BoldFinishedDownloads", "BoldFinishedUploads", "BoldQueue", "BoldHub", "BoldPm", "BoldSearch", "SocketInBuffer", "SocketOutBuffer", "OnlyDlTthFiles", "OpenWaitingUsers", "BoldWaitingUsers", "OpenSystemLog", "BoldSystemLog", "AutoRefreshTime", - "UseSsl", "AutoSearchLimit", "AltSortOrder", + "UseSsl", "AutoSearchLimit", "AltSortOrder", "AutoKickNoFavs", "SENTRY", // Int64 "TotalUpload", "TotalDownload", @@ -255,6 +255,7 @@ setDefault(USE_SSL, false); setDefault(AUTO_SEARCH_LIMIT, 5); setDefault(ALT_SORT_ORDER, false); + setDefault(AUTO_KICK_NO_FAVS, false); #ifdef _WIN32 setDefault(MAIN_WINDOW_STATE, SW_SHOWNORMAL); Modified: dcplusplus/trunk/client/SettingsManager.h =================================================================== --- dcplusplus/trunk/client/SettingsManager.h 2006-05-03 21:47:14 UTC (rev 601) +++ dcplusplus/trunk/client/SettingsManager.h 2006-05-13 15:00:16 UTC (rev 602) @@ -89,7 +89,7 @@ NO_IP_OVERRIDE, SEARCH_ONLY_FREE_SLOTS, LAST_SEARCH_TYPE, BOLD_FINISHED_DOWNLOADS, BOLD_FINISHED_UPLOADS, BOLD_QUEUE, BOLD_HUB, BOLD_PM, BOLD_SEARCH, SOCKET_IN_BUFFER, SOCKET_OUT_BUFFER, ONLY_DL_TTH_FILES, OPEN_WAITING_USERS, BOLD_WAITING_USERS, OPEN_SYSTEM_LOG, BOLD_SYSTEM_LOG, AUTO_REFRESH_TIME, - USE_SSL, AUTO_SEARCH_LIMIT, ALT_SORT_ORDER, + USE_SSL, AUTO_SEARCH_LIMIT, ALT_SORT_ORDER, AUTO_KICK_NO_FAVS, INT_LAST }; enum Int64Setting { INT64_FIRST = INT_LAST + 1, Modified: dcplusplus/trunk/client/StringDefs.cpp =================================================================== --- dcplusplus/trunk/client/StringDefs.cpp 2006-05-03 21:47:14 UTC (rev 601) +++ dcplusplus/trunk/client/StringDefs.cpp 2006-05-13 15:00:16 UTC (rev 602) @@ -380,6 +380,7 @@ "Auto-away on minimize (and back on restore)", "Automatically follow redirects", "Automatically disconnect users who leave the hub", +"Don't automatically disconnect favorite users who leave the hub", "Automatically search for alternative download locations", "Automatically match queue for auto search hits", "Auto-search limit", @@ -983,6 +984,7 @@ "SettingsAutoAway", "SettingsAutoFollow", "SettingsAutoKick", +"SettingsAutoKickNoFavs", "SettingsAutoSearch", "SettingsAutoSearchAutoMatch", "SettingsAutoSearchLimit", Modified: dcplusplus/trunk/client/StringDefs.h =================================================================== --- dcplusplus/trunk/client/StringDefs.h 2006-05-03 21:47:14 UTC (rev 601) +++ dcplusplus/trunk/client/StringDefs.h 2006-05-13 15:00:16 UTC (rev 602) @@ -383,6 +383,7 @@ SETTINGS_AUTO_AWAY, // "Auto-away on minimize (and back on restore)" SETTINGS_AUTO_FOLLOW, // "Automatically follow redirects" SETTINGS_AUTO_KICK, // "Automatically disconnect users who leave the hub" + SETTINGS_AUTO_KICK_NO_FAVS, // "Don't automatically disconnect favorite users who leave the hub" SETTINGS_AUTO_SEARCH, // "Automatically search for alternative download locations" SETTINGS_AUTO_SEARCH_AUTO_MATCH, // "Automatically match queue for auto search hits" SETTINGS_AUTO_SEARCH_LIMIT, // "Auto-search limit" Modified: dcplusplus/trunk/client/UploadManager.cpp =================================================================== --- dcplusplus/trunk/client/UploadManager.cpp 2006-05-03 21:47:14 UTC (rev 601) +++ dcplusplus/trunk/client/UploadManager.cpp 2006-05-13 15:00:16 UTC (rev 602) @@ -492,14 +492,14 @@ void UploadManager::on(ClientManagerListener::UserDisconnected, const User::Ptr& aUser) throw() { /// @todo Don't kick when /me disconnects - if( BOOLSETTING(AUTO_KICK) ) { + if( BOOLSETTING(AUTO_KICK) && !(BOOLSETTING(AUTO_KICK_NO_FAVS) && FavoriteManager::getInstance()->isFavoriteUser(aUser)) ) { Lock l(cs); for(Upload::Iter i = uploads.begin(); i != uploads.end(); ++i) { Upload* u = *i; if(u->getUser() == aUser) { // Oops...adios... - u->getUserConnection()->disconnect(); + u->getUserConnection()->disconnect(true); // But let's grant him/her a free slot just in case... if (!u->getUserConnection()->isSet(UserConnection::FLAG_HASEXTRASLOT)) reserveSlot(aUser); Modified: dcplusplus/trunk/windows/AdvancedPage.cpp =================================================================== --- dcplusplus/trunk/windows/AdvancedPage.cpp 2006-05-03 21:47:14 UTC (rev 601) +++ dcplusplus/trunk/windows/AdvancedPage.cpp 2006-05-13 15:00:16 UTC (rev 602) @@ -48,6 +48,7 @@ { SettingsManager::ADD_FINISHED_INSTANTLY, ResourceManager::SETTINGS_ADD_FINISHED_INSTANTLY }, { SettingsManager::USE_CTRL_FOR_LINE_HISTORY, ResourceManager::SETTINGS_USE_CTRL_FOR_LINE_HISTORY }, { SettingsManager::USE_SSL, ResourceManager::SETTINGS_USE_SSL }, + { SettingsManager::AUTO_KICK_NO_FAVS, ResourceManager::SETTINGS_AUTO_KICK_NO_FAVS }, { 0, ResourceManager::SETTINGS_AUTO_AWAY } }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |