------------------------------------------------------------ revno: 2326 committer: poy <p...@123gen.com> branch nick: trunk timestamp: Fri 2010-12-03 18:26:12 +0100 message: Repurpose blue user icons to identify users with great protocol support modified: changelog.txt dcpp/AdcHub.h dcpp/ConnectionManager.cpp dcpp/NmdcHub.cpp dcpp/User.h help/faq_different_icons.html win32/HubFrame.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 'changelog.txt' --- changelog.txt 2010-12-03 17:09:58 +0000 +++ changelog.txt 2010-12-03 17:26:12 +0000 @@ -45,6 +45,8 @@ * [L#250149] Retry on more possible Coral errors (emtee) * [L#260748] Really readded sfv check (was broken by segmented downloading) (emtee) * Update bzip2 to version 1.0.6 +* Repurpose blue user icons to identify users with great protocol support (poy) +* [ADC] Dispatch the amount of free slots with INF FS (poy) * Repurpose passive user icons to mean "no free slot" (poy) -- 0.770 2010-07-05 -- === modified file 'dcpp/AdcHub.h' --- dcpp/AdcHub.h 2010-11-28 15:52:39 +0000 +++ dcpp/AdcHub.h 2010-12-03 17:26:12 +0000 @@ -53,6 +53,19 @@ static const vector<StringList>& getSearchExts(); static StringList parseSearchExts(int flag); + static const string CLIENT_PROTOCOL; + static const string SECURE_CLIENT_PROTOCOL_TEST; + static const string ADCS_FEATURE; + static const string TCP4_FEATURE; + static const string UDP4_FEATURE; + static const string NAT0_FEATURE; + static const string SEGA_FEATURE; + static const string BASE_SUPPORT; + static const string BAS0_SUPPORT; + static const string TIGR_SUPPORT; + static const string UCM0_SUPPORT; + static const string BLO0_SUPPORT; + private: friend class ClientManager; friend class CommandHandler<AdcHub>; @@ -79,19 +92,6 @@ std::unordered_set<uint32_t> forbiddenCommands; - static const string CLIENT_PROTOCOL; - static const string SECURE_CLIENT_PROTOCOL_TEST; - static const string ADCS_FEATURE; - static const string TCP4_FEATURE; - static const string UDP4_FEATURE; - static const string NAT0_FEATURE; - static const string SEGA_FEATURE; - static const string BASE_SUPPORT; - static const string BAS0_SUPPORT; - static const string TIGR_SUPPORT; - static const string UCM0_SUPPORT; - static const string BLO0_SUPPORT; - static const vector<StringList> searchExts; virtual string checkNick(const string& nick); === modified file 'dcpp/ConnectionManager.cpp' --- dcpp/ConnectionManager.cpp 2010-08-27 13:47:33 +0000 +++ dcpp/ConnectionManager.cpp 2010-12-03 17:26:12 +0000 @@ -520,10 +520,6 @@ } if( CryptoManager::getInstance()->isExtended(aLock) ) { - // Alright, we have an extended protocol, set a user flag for this user and refresh his info... - if( (aPk.find("DCPLUSPLUS") != string::npos) && aSource->getUser() && !aSource->getUser()->isSet(User::DCPLUSPLUS)) { - aSource->getUser()->setFlag(User::DCPLUSPLUS); - } StringList defFeatures = features; if(BOOLSETTING(COMPRESS_TRANSFERS)) { defFeatures.push_back(UserConnection::FEATURE_ZLIB_GET); === modified file 'dcpp/NmdcHub.cpp' --- dcpp/NmdcHub.cpp 2010-10-01 14:24:13 +0000 +++ dcpp/NmdcHub.cpp 2010-12-03 17:26:12 +0000 @@ -569,7 +569,6 @@ OnlineUser& u = getUser(param); if(u.getUser() == getMyIdentity().getUser()) { - u.getUser()->setFlag(User::DCPLUSPLUS); if(ClientManager::getInstance()->isActive()) u.getUser()->unsetFlag(User::PASSIVE); else === modified file 'dcpp/User.h' --- dcpp/User.h 2010-11-18 19:35:18 +0000 +++ dcpp/User.h 2010-12-03 17:26:12 +0000 @@ -35,7 +35,6 @@ public: enum Bits { ONLINE_BIT, - DCPLUSPLUS_BIT, PASSIVE_BIT, NMDC_BIT, BOT_BIT, @@ -48,7 +47,6 @@ /** Each flag is set if it's true in at least one hub */ enum UserFlags { ONLINE = 1<<ONLINE_BIT, - DCPLUSPLUS = 1<<DCPLUSPLUS_BIT, PASSIVE = 1<<PASSIVE_BIT, NMDC = 1<<NMDC_BIT, BOT = 1<<BOT_BIT, === modified file 'help/faq_different_icons.html' --- help/faq_different_icons.html 2010-12-03 17:09:58 +0000 +++ help/faq_different_icons.html 2010-12-03 17:26:12 +0000 @@ -11,7 +11,7 @@ <dt>Green</dt> <dd>Standard user icon (no particular attribute).</dd> <dt>Blue</dt> - <dd>DC++ user (identified on 1st direct connection to this user)</dd> + <dd>The user has great ADC protocol support; it has at least all the features supported by this client.</dd> <dt>With bricks</dt> <dd>The user has no free slot available.</dd> <dt>With a yellow key</dt> === modified file 'win32/HubFrame.cpp' --- win32/HubFrame.cpp 2010-12-03 17:09:58 +0000 +++ win32/HubFrame.cpp 2010-12-03 17:26:12 +0000 @@ -25,9 +25,9 @@ #include "ParamDlg.h" #include "HoldRedraw.h" +#include <dcpp/AdcHub.h> #include <dcpp/ChatMessage.h> #include <dcpp/ClientManager.h> -#include <dcpp/Client.h> #include <dcpp/LogManager.h> #include <dcpp/User.h> #include <dcpp/FavoriteManager.h> @@ -705,8 +705,11 @@ int HubFrame::UserInfo::getImage() const { int image = identity.isOp() ? IMAGE_OP : IMAGE_USER; - if(identity.getUser()->isSet(User::DCPLUSPLUS)) + if(identity.supports(AdcHub::ADCS_FEATURE) && identity.supports(AdcHub::SEGA_FEATURE) && + ((identity.supports(AdcHub::TCP4_FEATURE) && identity.supports(AdcHub::UDP4_FEATURE)) || identity.supports(AdcHub::NAT0_FEATURE))) + { image += 2; + } string freeSlots = identity.get("FS"); if(!freeSlots.empty() && Util::toUInt(freeSlots) == 0) {
_______________________________________________ Mailing list: https://launchpad.net/~linuxdcpp-team Post to : linuxdcpp-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~linuxdcpp-team More help : https://help.launchpad.net/ListHelp