diff -Nru bmdc-0.1.3/Credits.txt bmdc-0.1.3/Credits.txt --- bmdc-0.1.3/Credits.txt 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/Credits.txt 2017-10-23 19:07:31.000000000 +0000 @@ -1,7 +1,7 @@ -Mank -branec (icons) +BMDC-Team (Mank , branec (icons)) iceman50 (ZLIF & hash password on NMDC) curse (ShellCommand) + troll.freedcpp (FreeDC++) LinuxDC++ autors diff -Nru bmdc-0.1.3/dcpp/ActionRaw.h bmdc-0.1.3/dcpp/ActionRaw.h --- bmdc-0.1.3/dcpp/ActionRaw.h 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/dcpp/ActionRaw.h 2017-10-23 19:07:31.000000000 +0000 @@ -32,13 +32,13 @@ Raw() : name(), raw(),id(0),time(0), enabled(false) { } - Raw(int _id, const std::string& _name, const std::string& _raw, int _time, bool _enabled) + Raw(int _id, const std::string& _name, const std::string& _raw, uint64_t _time, bool _enabled) : name(_name), raw(_raw),id(_id), time(_time), enabled(_enabled) { } GETSET(std::string, name, Name); GETSET(std::string, raw, Raw); GETSET(int, id, Id); - GETSET(int64_t, time, Time); + GETSET(uint64_t, time, Time); GETSET(bool, enabled, Enabled); }; diff -Nru bmdc-0.1.3/dcpp/AdcCommand.cpp bmdc-0.1.3/dcpp/AdcCommand.cpp --- bmdc-0.1.3/dcpp/AdcCommand.cpp 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/dcpp/AdcCommand.cpp 2017-10-23 19:07:31.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2017 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2018 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru bmdc-0.1.3/dcpp/AdcCommand.h bmdc-0.1.3/dcpp/AdcCommand.h --- bmdc-0.1.3/dcpp/AdcCommand.h 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/dcpp/AdcCommand.h 2017-10-23 19:07:31.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2017 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2018 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru bmdc-0.1.3/dcpp/AdcHub.cpp bmdc-0.1.3/dcpp/AdcHub.cpp --- bmdc-0.1.3/dcpp/AdcHub.cpp 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/dcpp/AdcHub.cpp 2017-10-23 19:07:31.000000000 +0000 @@ -154,8 +154,8 @@ if(!c.getParam("NI", 0, nick)) { nick = "[nick unknown]"; } - fire(ClientListener::StatusMessage(), this, autosprintf(_("%s has same CID %s as %s %s,%s, ignoring"),u->getIdentity().getNick().c_str() - ,u->getIdentity().getSIDString().c_str(), sCid.c_str(), nick.c_str(),AdcCommand::fromSID(c.getFrom()).c_str()).c_str() + fire(ClientListener::StatusMessage(), this, autosprintf(_("%s has same CID %s as %s %s,%s, ignoring"), u->getIdentity().getNick().c_str() + , u->getIdentity().getSIDString().c_str(), sCid.c_str(), nick.c_str(),AdcCommand::fromSID(c.getFrom()).c_str()).c_str() ,ClientListener::FLAG_IS_SPAM); return; } @@ -169,17 +169,17 @@ } if(!u) { - dcdebug("AdcHub::INF Unknown user / no ID\n"); LOG(PROTO,"AdcHub::INF Unknown user / no ID"); - DebugManager::getInstance()->SendCommandMessage("AdcHub::INF Unknown user / no ID\n",DebugManager::TYPE_HUB,DebugManager::INCOMING,"Unknow"); + DebugManager::getInstance()->SendCommandMessage("AdcHub::INF Unknown user / no ID\n", DebugManager::TYPE_HUB, DebugManager::INCOMING, "Unknow"); return; } for(auto i = c.getParameters().begin(); i != c.getParameters().end(); ++i) { if(i->length() < 2) continue; - if(*i == "U4") { u->getIdentity().setUdp4Port(Util::toInt(i->substr(2)));continue; } - if(*i == "U6") { u->getIdentity().setUdp6Port(Util::toInt(i->substr(2)));continue; } + + if(*i == "U4") { u->getIdentity().setUdp4Port(Util::toInt(i->substr(2))); continue; } + if(*i == "U6") { u->getIdentity().setUdp6Port(Util::toInt(i->substr(2))); continue; } u->getIdentity().set(i->c_str(), i->substr(2)); } @@ -628,13 +628,13 @@ } // Trigger connection attempt sequence locally ... - string localPort = Util::toString(sock->getLocalPort()); + uint16_t localPort = sock->getLocalPort(); dcdebug("triggering connecting attempt in NAT: remote port = %s, local port = %d\n", port.c_str(), sock->getLocalPort()); ConnectionManager::getInstance()->adcConnect(*u, Util::toInt(port), localPort, BufferedSocket::NAT_CLIENT, token, secure); // ... and signal other client to do likewise. send(AdcCommand(AdcCommand::CMD_RNT, u->getIdentity().getSID(), AdcCommand::TYPE_DIRECT).addParam(protocol). - addParam(localPort).addParam(token)); + addParam(Util::toString(localPort)).addParam(token)); } void AdcHub::handle(AdcCommand::RNT, AdcCommand& c) noexcept { @@ -663,7 +663,7 @@ // Trigger connection attempt sequence locally dcdebug("triggering connecting attempt in RNT: remote port = %s, local port = %d\n", port.c_str(), sock->getLocalPort()); - ConnectionManager::getInstance()->adcConnect(*u, Util::toInt(port), Util::toString(sock->getLocalPort()), BufferedSocket::NAT_SERVER, token, secure); + ConnectionManager::getInstance()->adcConnect(*u, Util::toInt(port), sock->getLocalPort(), BufferedSocket::NAT_SERVER, token, secure); } void AdcHub::handle(AdcCommand::ZON, AdcCommand& c) noexcept { @@ -976,9 +976,8 @@ salt.clear(); } } -//why this is not in AdcHub or AdcCommand class? -static void addParam(StringMap& lastInfoMap, AdcCommand& c, const string& var, const string& value) { +void AdcHub::addParam(StringMap& lastInfoMap, AdcCommand& c, const string& var, const string& value) { StringMap::iterator i = lastInfoMap.find(var); if(i != lastInfoMap.end()) { @@ -996,7 +995,8 @@ } } -void AdcHub::infoImpl() { +void AdcHub::infoImpl() +{ if(state != STATE_IDENTIFY && state != STATE_NORMAL) return; @@ -1024,7 +1024,7 @@ addParam(lastInfoMap, c, "HN", Util::toString(counts[COUNT_NORMAL])); addParam(lastInfoMap, c, "HR", Util::toString(counts[COUNT_REGISTERED])); addParam(lastInfoMap, c, "HO", Util::toString(counts[COUNT_OP])); - addParam(lastInfoMap, c, "AP", APPNAME);//APPNAME + addParam(lastInfoMap, c, "AP", APPNAME); addParam(lastInfoMap, c, "VE", VERSIONSTRING); addParam(lastInfoMap, c, "AW", Util::getAway() ? "1" : Util::emptyString); // RF = ref address from connected... diff -Nru bmdc-0.1.3/dcpp/AdcHub.h bmdc-0.1.3/dcpp/AdcHub.h --- bmdc-0.1.3/dcpp/AdcHub.h 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/dcpp/AdcHub.h 2017-10-23 19:07:31.000000000 +0000 @@ -156,6 +156,9 @@ //TimerManagerListener virtual void on(Second, uint64_t aTick) noexcept; void appendConnectivity(StringMap& lastInfoMap, AdcCommand& c, bool v4, bool v6); + + // + static void addParam(StringMap& lastInfoMap, AdcCommand& c, const string& var, const string& value); }; diff -Nru bmdc-0.1.3/dcpp/AVManager.cpp bmdc-0.1.3/dcpp/AVManager.cpp --- bmdc-0.1.3/dcpp/AVManager.cpp 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/dcpp/AVManager.cpp 2017-10-23 19:07:31.000000000 +0000 @@ -1,5 +1,5 @@ /** - * Copyright (C) 2014-2017 BMDC, freedcpp on seznam point cz + * Copyright (C) 2014-2018 BMDC * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru bmdc-0.1.3/dcpp/BufferedSocket.cpp bmdc-0.1.3/dcpp/BufferedSocket.cpp --- bmdc-0.1.3/dcpp/BufferedSocket.cpp 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/dcpp/BufferedSocket.cpp 2017-10-23 19:07:31.000000000 +0000 @@ -98,10 +98,10 @@ } void BufferedSocket::connect(const string& aAddress, const uint16_t& aPort, bool secure, bool allowUntrusted, bool proxy, const string& expKP) { - connect(aAddress, aPort, Util::emptyString, NAT_NONE, secure, allowUntrusted, proxy, expKP); + connect(aAddress, aPort, 0, NAT_NONE, secure, allowUntrusted, proxy, expKP); } -void BufferedSocket::connect(const string& aAddress, const uint16_t& aPort, const string& localPort, NatRoles natRole, bool secure, bool allowUntrusted, bool proxy, const string& expKP) { +void BufferedSocket::connect(const string& aAddress, const uint16_t& aPort, const uint16_t& localPort, NatRoles natRole, bool secure, bool allowUntrusted, bool proxy, const string& expKP) { dcdebug("BufferedSocket::connect() %p\n", (void*)this); unique_ptr s(secure ? new SSLSocket(natRole == NAT_SERVER ? CryptoManager::SSL_SERVER : CryptoManager::SSL_CLIENT, allowUntrusted, expKP) : new Socket(Socket::TYPE_TCP)); @@ -111,7 +111,7 @@ setSocket(move(s)); Lock l(cs); - addTask(CONNECT, new ConnectInfo(aAddress, aPort, Util::toInt(localPort), natRole, proxy )); + addTask(CONNECT, new ConnectInfo(aAddress, aPort, localPort, natRole, proxy )); } #define LONG_TIMEOUT 30000 diff -Nru bmdc-0.1.3/dcpp/BufferedSocket.h bmdc-0.1.3/dcpp/BufferedSocket.h --- bmdc-0.1.3/dcpp/BufferedSocket.h 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/dcpp/BufferedSocket.h 2017-10-23 19:07:31.000000000 +0000 @@ -76,7 +76,7 @@ void accept(const Socket& srv, bool secure, bool allowUntrusted, const string& expKP = ""); void connect(const string& aAddress, const uint16_t& aPort, bool secure, bool allowUntrusted, bool proxy = false, const string& expKP = ""); - void connect(const string& aAddress, const uint16_t& aPort, const string& localPort, NatRoles natRole, bool secure, bool allowUntrusted, bool proxy = false, const string& expKP = ""); + void connect(const string& aAddress, const uint16_t& aPort, const uint16_t& localPort, NatRoles natRole, bool secure, bool allowUntrusted, bool proxy = false, const string& expKP = ""); /** Sets data mode for aBytes bytes. Must be called within onLine. */ void setDataMode(int64_t aBytes = -1) { mode = MODE_DATA; dataBytes = aBytes; } diff -Nru bmdc-0.1.3/dcpp/ClientManager.cpp bmdc-0.1.3/dcpp/ClientManager.cpp --- bmdc-0.1.3/dcpp/ClientManager.cpp 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/dcpp/ClientManager.cpp 2017-10-23 19:07:31.000000000 +0000 @@ -584,18 +584,6 @@ fire(ClientManagerListener::ClientConnected(), c); } -//void ClientManager::on(UserUpdated, Client*, const OnlineUser& user) noexcept { -// updateNick(user); -// fire(ClientManagerListener::UserUpdated(), user); -//} - -/*void ClientManager::on(UsersUpdated, Client* , const OnlineUserList& l) noexcept { - for(OnlineUserList::const_iterator i = l.begin(), iend = l.end(); i != iend; ++i) { - updateNick(*(*i)); - fire(UsersManagerListener::UserUpdated(), *(*i)); - } -} -*/ void ClientManager::on(HubUpdated, Client* c) noexcept { fire(ClientManagerListener::ClientUpdated(), c); } diff -Nru bmdc-0.1.3/dcpp/ConnectionManager.cpp bmdc-0.1.3/dcpp/ConnectionManager.cpp --- bmdc-0.1.3/dcpp/ConnectionManager.cpp 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/dcpp/ConnectionManager.cpp 2017-10-23 19:07:31.000000000 +0000 @@ -344,7 +344,7 @@ uc->setFlag(UserConnection::FLAG_NMDC); try { - uc->connect(aServer, aPort, Util::emptyString, BufferedSocket::NAT_NONE); + uc->connect(aServer, aPort, 0, BufferedSocket::NAT_NONE); } catch(const Exception&) { putConnection(uc); delete uc; @@ -352,10 +352,10 @@ } void ConnectionManager::adcConnect(const OnlineUser& aUser, const uint16_t& aPort, const string& aToken, bool secure) { - adcConnect(aUser, aPort, Util::emptyString, BufferedSocket::NAT_NONE, aToken, secure); + adcConnect(aUser, aPort, 0, BufferedSocket::NAT_NONE, aToken, secure); } -void ConnectionManager::adcConnect(const OnlineUser& aUser, const uint16_t& aPort, const string& localPort, BufferedSocket::NatRoles natRole, const string& aToken, bool secure) { +void ConnectionManager::adcConnect(const OnlineUser& aUser, const uint16_t& aPort, const uint16_t& localPort, BufferedSocket::NatRoles natRole, const string& aToken, bool secure) { if(shuttingDown) return; diff -Nru bmdc-0.1.3/dcpp/ConnectionManager.h bmdc-0.1.3/dcpp/ConnectionManager.h --- bmdc-0.1.3/dcpp/ConnectionManager.h 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/dcpp/ConnectionManager.h 2017-10-23 19:07:31.000000000 +0000 @@ -111,7 +111,7 @@ void nmdcConnect(const string& aServer, const uint16_t& aPort, const string& aMyNick, const string& hubUrl, const string& encoding); void adcConnect(const OnlineUser& aUser, const uint16_t& aPort, const string& aToken, bool secure); - void adcConnect(const OnlineUser& aUser, const uint16_t& aPort, const string& localPort, BufferedSocket::NatRoles natRole, const string& aToken, bool secure); + void adcConnect(const OnlineUser& aUser, const uint16_t& aPort, const uint16_t& localPort, BufferedSocket::NatRoles natRole, const string& aToken, bool secure); void getDownloadConnection(const HintedUser& aUser); void force(const UserPtr& aUser); diff -Nru bmdc-0.1.3/dcpp/Mapper_MiniUPnPc.cpp bmdc-0.1.3/dcpp/Mapper_MiniUPnPc.cpp --- bmdc-0.1.3/dcpp/Mapper_MiniUPnPc.cpp 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/dcpp/Mapper_MiniUPnPc.cpp 2017-10-23 19:07:31.000000000 +0000 @@ -48,7 +48,7 @@ if(!url.empty()) return true; - UPNPDev* devices = upnpDiscover(2000, localIp.empty() ? nullptr : localIp.c_str(), 0, 0, v6, '2', 0); + UPNPDev* devices = upnpDiscover(2000, localIp.empty() ? nullptr : localIp.c_str(), nullptr, 0, v6, 2, nullptr); if(!devices) return false; @@ -58,7 +58,7 @@ int ret = UPNP_GetValidIGD(devices, &urls, &data, 0, 0); - bool ok = ret == 1; + bool ok = ret != 0; if(ok) { url = urls.controlURL; service = data.first.servicetype; diff -Nru bmdc-0.1.3/dcpp/MappingManager.cpp bmdc-0.1.3/dcpp/MappingManager.cpp --- bmdc-0.1.3/dcpp/MappingManager.cpp 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/dcpp/MappingManager.cpp 2017-10-23 19:07:31.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2016 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2018 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -159,15 +159,13 @@ auto& mappers = v6 ? mappers6 : mappers4; // move the preferred mapper to the top of the stack. - const auto& prefMapper = v6 ? SETTING(MAPPER6) : SETTING(MAPPER); + const string& prefMapper = v6 ? SETTING(MAPPER6) : SETTING(MAPPER); for(auto i = mappers.begin(); i != mappers.end(); ++i) { if(i->first == prefMapper) { - if(i != mappers.begin()) { auto mapper = *i; mappers.erase(i); mappers.insert(mappers.begin(), mapper); - } - break; + break; } } @@ -177,6 +175,7 @@ Mapper& mapper = *pMapper; ScopedFunctor([&mapper] { mapper.uninit(); }); + if(!mapper.init()) { log(autosprintf(_("Failed to initialize the %s interface") ,mapper.getName().c_str()), v6); continue; diff -Nru bmdc-0.1.3/dcpp/NmdcHub.cpp bmdc-0.1.3/dcpp/NmdcHub.cpp --- bmdc-0.1.3/dcpp/NmdcHub.cpp 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/dcpp/NmdcHub.cpp 2017-10-23 19:07:31.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2017 Jacek Sieka, arnetheduck on gmail point com + * Copyright (C) 2001-2018 Jacek Sieka, arnetheduck on gmail point com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -294,15 +294,17 @@ int count = 0; for(auto fi = seekers.begin(); fi != seekers.end(); ++fi) { - if(fi->first == seeker) + if(fi->first == seeker) { count++; + } if(count > 7) { - if( (seeker.size() > 4) && seeker.compare(0, 4, "Hub:") == 0) + if(seeker.compare(0, 4, "Hub:") == 0) { fire(ClientListener::SearchFlood(), this, seeker.substr(4)); - else + } else { fire(ClientListener::SearchFlood(), this, string(seeker+F_(" (Nick unknown)"))); + } flooders.push_back(make_pair(seeker, tick)); return; @@ -1056,13 +1058,13 @@ send(fromUtf8(cmd)); } } - +// 5*60*1000 ms is 5 Minutes? void NmdcHub::clearFlooders(uint64_t aTick) { - while(!seekers.empty() && seekers.front().second + (5 * 1000) < aTick) { + while(!seekers.empty() && ( (seekers.front().second + (5 * 60 * 1000)) < aTick)) { seekers.pop_front(); } - while(!flooders.empty() && flooders.front().second + (120 * 1000) < aTick) { + while(!flooders.empty() && ((flooders.front().second + (120 * 60 * 1000)) < aTick)) { flooders.pop_front(); } } diff -Nru bmdc-0.1.3/dcpp/UserConnection.cpp bmdc-0.1.3/dcpp/UserConnection.cpp --- bmdc-0.1.3/dcpp/UserConnection.cpp 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/dcpp/UserConnection.cpp 2017-10-23 19:07:31.000000000 +0000 @@ -155,7 +155,7 @@ } } -void UserConnection::connect(const string& aServer, const uint16_t& aPort, const string& localPort, BufferedSocket::NatRoles natRole) { +void UserConnection::connect(const string& aServer, const uint16_t& aPort, const uint16_t& localPort, BufferedSocket::NatRoles natRole) { dcassert(!socket); socket = BufferedSocket::getSocket(0); diff -Nru bmdc-0.1.3/dcpp/UserConnection.h bmdc-0.1.3/dcpp/UserConnection.h --- bmdc-0.1.3/dcpp/UserConnection.h 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/dcpp/UserConnection.h 2017-10-23 19:07:31.000000000 +0000 @@ -141,7 +141,7 @@ void setDataMode(int64_t aBytes = -1) { dcassert(socket); socket->setDataMode(aBytes); } void setLineMode(size_t rollback) { dcassert(socket); socket->setLineMode(rollback); } - void connect(const string& aServer, const uint16_t& aPort, const string& localPort, const BufferedSocket::NatRoles natRole); + void connect(const string& aServer, const uint16_t& aPort, const uint16_t& localPort, const BufferedSocket::NatRoles natRole); void accept(const Socket& aServer); template diff -Nru bmdc-0.1.3/dcpp/UserManager.h bmdc-0.1.3/dcpp/UserManager.h --- bmdc-0.1.3/dcpp/UserManager.h 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/dcpp/UserManager.h 2017-10-23 19:07:31.000000000 +0000 @@ -14,7 +14,6 @@ // MA 02110-1301, USA. // - #ifndef USER_MANAGER #define USER_MANAGER #include "format.h" @@ -82,28 +81,29 @@ return lst; } - StringList getNicks(const CID& cid, const string& hintUrl) { - Lock l(cs); - StringList ret; + StringList getNicks(const CID& cid, const string& hintUrl) + { + Lock l(cs); + StringList ret; - OnlinePairC op = onlineUsers.equal_range(cid); - for(auto i = op.first; i != op.second; ++i) { - if(i->second->getClient().getHubUrl() == hintUrl) + OnlinePairC op = onlineUsers.equal_range(cid); + for(auto i = op.first; i != op.second; ++i) { + if(i->second->getClient().getHubUrl() == hintUrl) ret.push_back(i->second->getIdentity().getNick()); - } + } - if(ret.empty()) { - // offline - NickMap::const_iterator i = nicks.find(cid); - if(i != nicks.end()) { - ret.push_back(i->second.first); - } else { - ret.push_back('{' + cid.toBase32() + '}'); + if(ret.empty()) { + // offline + NickMap::const_iterator i = nicks.find(cid); + if(i != nicks.end()) { + ret.push_back(i->second.first); + } else { + ret.push_back('{' + cid.toBase32() + '}'); + } } - } - return ret; -} + return ret; + } @@ -253,13 +253,21 @@ } fire(UsersManagerListener::UserUpdated(),(dynamic_cast(*i->second))); } -}/* -void on(UsersUpdated, Client* , const OnlineUserList& l) noexcept { +} + +void on(ClientListener::UserUpdated, dcpp::Client*, const OnlineUser& user) noexcept { + updateNick(user); + fire(UsersManagerListener::UserUpdated(), user); + +} + + +void on(ClientListener::UsersUpdated, Client* , const OnlineUserList& l) noexcept { for(OnlineUserList::const_iterator i = l.begin(), iend = l.end(); i != iend; ++i) { updateNick(*(*i)); fire(UsersManagerListener::UserUpdated(), *(*i)); } -}*/ +} private: OnlineHubUserMap onlineHubUsers; OnlineMap onlineUsers; diff -Nru bmdc-0.1.3/dcpp/Util.cpp bmdc-0.1.3/dcpp/Util.cpp --- bmdc-0.1.3/dcpp/Util.cpp 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/dcpp/Util.cpp 2017-10-23 19:07:31.000000000 +0000 @@ -31,6 +31,7 @@ #include "version.h" #ifndef _WIN32 + #include #include #include #include @@ -563,54 +564,38 @@ return string(buf); #endif } - +//todo win code? string Util::getLocalIp(bool IsIPv6) { - struct addrinfo hints; - memset(&hints, 0, sizeof(addrinfo)); - hints.ai_family = AF_UNSPEC; - addrinfo *result; - int ret = ::getaddrinfo("localhost",NULL,&hints,&result); - if( ret == 0) - { - struct addrinfo *res; - char buf[INET6_ADDRSTRLEN + 1]; - for(res = result; res != NULL; res = res->ai_next) + struct ifaddrs *ifaddr= NULL,*ifa = NULL; + void *tmp = NULL; + string mAddrIP = string() , mAddrIP6 = string(); + getifaddrs(&ifaddr); + for(ifa = ifaddr;ifa!= NULL;ifa = ifa->ifa_next) { - if ( res->ai_family == AF_INET ) - { - #ifdef _WIN32 - Socket::inet_ntop(&((struct sockaddr_in *)res->ai_addr)->sin_addr,buf,sizeof(buf)); - #else - inet_ntop(AF_INET,&((struct sockaddr_in *)res->ai_addr)->sin_addr,buf,sizeof(buf)); - #endif + if(!ifa->ifa_addr) + continue; - if(Util::isPrivateIp(buf) || strncmp(buf, "169.254", 7) == 0) - { - //local ip can be private ip or 169.254.x? or that wich is set as bindaddr.... - const string& bindAddr = CONNSETTING(BIND_ADDRESS); - if(!bindAddr.empty() && bindAddr != SettingsManager::getInstance()->getDefault(SettingsManager::BIND_ADDRESS)) { - return bindAddr; - } - - break; - } + if(ifa->ifa_addr->sa_family == AF_INET) + { + tmp = &((struct sockaddr_in*)ifa->ifa_addr)->sin_addr; + char address[INET_ADDRSTRLEN]; + inet_ntop(AF_INET,tmp,address, INET_ADDRSTRLEN); + mAddrIP = address; } - else if(IsIPv6) + else if(ifa->ifa_addr->sa_family == AF_INET6) { - #ifdef _WIN32 - Socket::inet_ntop(&((struct sockaddr_in *)res->ai_addr)->sin_addr,buf,sizeof(buf)); - #else - inet_ntop(AF_INET6, &((struct sockaddr_in6 *)res->ai_addr)->sin6_addr, buf, sizeof(buf)); - #endif - //local ip is fe80 for IPv6 - if(strncmp(buf,"fe80",4) == 0) break; - + tmp = &((struct sockaddr_in6*)ifa->ifa_addr)->sin6_addr; + char address[INET_ADDRSTRLEN]; + inet_ntop(AF_INET6,tmp,address, INET_ADDRSTRLEN); + mAddrIP6 = address; } + + } - return buf; - } - return string(); + if(IsIPv6) + mAddrIP = mAddrIP6; + return mAddrIP; /* char buf[256]; gethostname(buf, 255); diff -Nru bmdc-0.1.3/debian/bzr-builder.manifest bmdc-0.1.3/debian/bzr-builder.manifest --- bmdc-0.1.3/debian/bzr-builder.manifest 2017-09-16 18:51:39.000000000 +0000 +++ bmdc-0.1.3/debian/bzr-builder.manifest 2017-10-23 19:07:32.000000000 +0000 @@ -1,2 +1,2 @@ -# bzr-builder format 0.3 deb-version {debupstream}-0ubuntu0~956 -lp:bmdc++ revid:freedcpp@seznam.cz-20170916184942-bpounlansi53dtpj +# bzr-builder format 0.3 deb-version {debupstream}-0ubuntu0~961 +lp:bmdc++ revid:freedcpp@seznam.cz-20171022101129-h3j4xlkikmjvtomk diff -Nru bmdc-0.1.3/debian/changelog bmdc-0.1.3/debian/changelog --- bmdc-0.1.3/debian/changelog 2017-09-16 18:51:39.000000000 +0000 +++ bmdc-0.1.3/debian/changelog 2017-10-23 19:07:32.000000000 +0000 @@ -1,8 +1,8 @@ -bmdc (0.1.3-0ubuntu0~956~ubuntu16.04.1) xenial; urgency=low +bmdc (0.1.3-0ubuntu0~961~ubuntu16.04.1) xenial; urgency=low * Auto build. - -- M@nk Sat, 16 Sep 2017 18:51:39 +0000 + -- M@nk Mon, 23 Oct 2017 19:07:32 +0000 bmdc (0.1.3) trusty; urgency=low diff -Nru bmdc-0.1.3/linux/adlsearch.cc bmdc-0.1.3/linux/adlsearch.cc --- bmdc-0.1.3/linux/adlsearch.cc 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/adlsearch.cc 2017-10-23 19:07:31.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright © 2009-2012 freedcpp, http://code.google.com/p/freedcpp - * Copyright © 2011-2017 Parts (CMD supports) of Code BMDC++ , https://launchpad.net/bmdc++ + * Copyright © Parts (CMD supports) BMDC * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru bmdc-0.1.3/linux/adlsearch.hh bmdc-0.1.3/linux/adlsearch.hh --- bmdc-0.1.3/linux/adlsearch.hh 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/adlsearch.hh 2017-10-23 19:07:31.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright © 2009-2012 freedcpp, http://code.google.com/p/freedcpp - * Copyright © 2011-2017 of Parts (CMD supports) of Code BMDC++ , https://launchpad.net/bmdc++ + * Copyright © 2018 of Parts (CMD supports) BMDC * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru bmdc-0.1.3/linux/bookentry.cc bmdc-0.1.3/linux/bookentry.cc --- bmdc-0.1.3/linux/bookentry.cc 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/bookentry.cc 2017-10-23 19:07:31.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright © 2004-2012 Jens Oknelid, paskharen@gmail.com - * Copyright © 2010-2017 BMDC + * Copyright © 2010-2018 BMDC * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru bmdc-0.1.3/linux/cmddebug.cc bmdc-0.1.3/linux/cmddebug.cc --- bmdc-0.1.3/linux/cmddebug.cc 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/cmddebug.cc 2017-10-23 19:07:31.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright © 2010-2017 BMDC + * Copyright © 2010-2018 BMDC * Copyright © 2010-2011 Eugene Petrov * * This program is free software; you can redistribute it and/or modify diff -Nru bmdc-0.1.3/linux/detectiontab.cc bmdc-0.1.3/linux/detectiontab.cc --- bmdc-0.1.3/linux/detectiontab.cc 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/detectiontab.cc 2017-10-23 19:07:31.000000000 +0000 @@ -1,5 +1,5 @@ // -// Copyright 2011 -2017 BMDC +// Copyright 2011 -2018 BMDC // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff -Nru bmdc-0.1.3/linux/detectiontab.hh bmdc-0.1.3/linux/detectiontab.hh --- bmdc-0.1.3/linux/detectiontab.hh 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/detectiontab.hh 2017-10-23 19:07:31.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright © 2010-2017 BMDC + * Copyright © 2010-2018 BMDC * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru bmdc-0.1.3/linux/dialogentry.hh bmdc-0.1.3/linux/dialogentry.hh --- bmdc-0.1.3/linux/dialogentry.hh 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/dialogentry.hh 2017-10-23 19:07:31.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright © 2004-2017 Jens Oknelid, paskharen@gmail.com + * Copyright © 2004-2018 Jens Oknelid, paskharen@gmail.com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru bmdc-0.1.3/linux/downloadqueue.cc bmdc-0.1.3/linux/downloadqueue.cc --- bmdc-0.1.3/linux/downloadqueue.cc 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/downloadqueue.cc 2017-10-23 19:07:31.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright © 2004-2017 Jens Oknelid, paskharen@gmail.com - * Copyright © 2017 BMDC + * Copyright © 2018 BMDC * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru bmdc-0.1.3/linux/downloadqueue.hh bmdc-0.1.3/linux/downloadqueue.hh --- bmdc-0.1.3/linux/downloadqueue.hh 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/downloadqueue.hh 2017-10-23 19:07:31.000000000 +0000 @@ -1,5 +1,4 @@ /* - * Copyright © 2004-2017 Jens Oknelid, paskharen@gmail.com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru bmdc-0.1.3/linux/emoticons.cc bmdc-0.1.3/linux/emoticons.cc --- bmdc-0.1.3/linux/emoticons.cc 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/emoticons.cc 2017-10-23 19:07:31.000000000 +0000 @@ -57,9 +57,8 @@ if (!SETTING(USE_EMOTS)) return; - string file = currPackName; string path = WulforManager::get()->getPath() + G_DIR_SEPARATOR_S + "emoticons" + G_DIR_SEPARATOR_S; - string packName = file; + string packName = currPackName; /* load current pack */ if (load(path + packName + ".xml")) @@ -73,7 +72,7 @@ for(auto it = files.begin(); it != files.end(); ++it) { - file = Util::getFileName(*it); + string file = Util::getFileName(*it); string::size_type pos = file.rfind('.'); file = file.substr(0, pos); diff -Nru bmdc-0.1.3/linux/emoticonsdialog.cc bmdc-0.1.3/linux/emoticonsdialog.cc --- bmdc-0.1.3/linux/emoticonsdialog.cc 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/emoticonsdialog.cc 2017-10-23 19:07:31.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright © 2009-2017 freedcpp, http://code.google.com/p/freedcpp + * Copyright © 2009-2018 freedcpp, http://code.google.com/p/freedcpp * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru bmdc-0.1.3/linux/emoticonsdialog.hh bmdc-0.1.3/linux/emoticonsdialog.hh --- bmdc-0.1.3/linux/emoticonsdialog.hh 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/emoticonsdialog.hh 2017-10-23 19:07:31.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright © 2009-2017 freedcpp, http://code.google.com/p/freedcpp + * Copyright © 2009-2018 freedcpp, http://code.google.com/p/freedcpp * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru bmdc-0.1.3/linux/emoticons.hh bmdc-0.1.3/linux/emoticons.hh --- bmdc-0.1.3/linux/emoticons.hh 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/emoticons.hh 2017-10-23 19:07:31.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright © 2009-2017 freedcpp, http://code.google.com/p/freedcpp + * Copyright © 2009-2018 freedcpp, http://code.google.com/p/freedcpp * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru bmdc-0.1.3/linux/entry.cc bmdc-0.1.3/linux/entry.cc --- bmdc-0.1.3/linux/entry.cc 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/entry.cc 2017-10-23 19:07:31.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright © 2004-2017 Jens Oknelid, paskharen@gmail.com + * Copyright © 2004-2018 Jens Oknelid, paskharen@gmail.com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -32,10 +32,9 @@ type(type), id(dcpp::Util::toString(type) + ":" + id) { - if(!ui.empty()) + if(!ui.empty()) // Load the Builder XML resource, if applicable { - // Load the Builder XML resource, if applicable - xml = gtk_builder_new_from_resource( (string("/org/bmdc-team/bmdc/ui/") + ui + ".ui").c_str()); + xml = gtk_builder_new_from_resource( (string("/org/bmdc-team/bmdc/ui/") + ui + ".ui").c_str()); } } diff -Nru bmdc-0.1.3/linux/entry.hh bmdc-0.1.3/linux/entry.hh --- bmdc-0.1.3/linux/entry.hh 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/entry.hh 2017-10-23 19:07:31.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright © 2004-2017 Jens Oknelid, paskharen@gmail.com + * Copyright © 2004-2018 Jens Oknelid, paskharen@gmail.com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru bmdc-0.1.3/linux/exportimport.cc bmdc-0.1.3/linux/exportimport.cc --- bmdc-0.1.3/linux/exportimport.cc 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/exportimport.cc 2017-10-23 19:07:31.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright © 2010-2017 BMDC + * Copyright © 2010-2018 BMDC * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru bmdc-0.1.3/linux/exportimport.hh bmdc-0.1.3/linux/exportimport.hh --- bmdc-0.1.3/linux/exportimport.hh 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/exportimport.hh 2017-10-23 19:07:31.000000000 +0000 @@ -1,5 +1,4 @@ /* - * Copyright © 2010-2017 BMDC * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,6 +17,7 @@ * In addition, as a special exception, compiling, linking, and/or * using OpenSSL with this program is allowed. */ + #ifdef HAVE_LIBTAR #ifndef _EXPORT_DIALOG_HH diff -Nru bmdc-0.1.3/linux/FavoriteHubDialog.hh bmdc-0.1.3/linux/FavoriteHubDialog.hh --- bmdc-0.1.3/linux/FavoriteHubDialog.hh 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/FavoriteHubDialog.hh 2017-10-23 19:07:31.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012 - 2017 - BMDC++ + * Copyright (C) BMDC * * BMDC++ is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff -Nru bmdc-0.1.3/linux/favoritehubs.cc bmdc-0.1.3/linux/favoritehubs.cc --- bmdc-0.1.3/linux/favoritehubs.cc 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/favoritehubs.cc 2017-10-23 19:07:31.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright © 2004-2012 Jens Oknelid, paskharen@gmail.com - * Copyright © 2011-2017 BMDC++ + * Copyright © 2011-2018 BMDC * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru bmdc-0.1.3/linux/favoritehubs.hh bmdc-0.1.3/linux/favoritehubs.hh --- bmdc-0.1.3/linux/favoritehubs.hh 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/favoritehubs.hh 2017-10-23 19:07:31.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright © 2004-2014 Jens Oknelid, paskharen@gmail.com - * Copyright © 2011-2017 BMDC + * Copyright © 2011-2018 BMDC * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru bmdc-0.1.3/linux/favoriteusers.cc bmdc-0.1.3/linux/favoriteusers.cc --- bmdc-0.1.3/linux/favoriteusers.cc 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/favoriteusers.cc 2017-10-23 19:07:31.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright © 2009-2017 freedcpp, http://code.google.com/p/freedcpp + * Copyright © 2009-2018 freedcpp, http://code.google.com/p/freedcpp * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -17,8 +17,6 @@ * * In addition, as a special exception, compiling, linking, and/or * using OpenSSL with this program is allowed. - * Changelog @BMDC: - * Added Indepent Favorites * */ #include "favoriteusers.hh" diff -Nru bmdc-0.1.3/linux/favoriteusers.hh bmdc-0.1.3/linux/favoriteusers.hh --- bmdc-0.1.3/linux/favoriteusers.hh 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/favoriteusers.hh 2017-10-23 19:07:31.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright © 2009-2017 freedcpp, http://code.google.com/p/freedcpp + * Copyright © 2009-2018 freedcpp, http://code.google.com/p/freedcpp * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru bmdc-0.1.3/linux/finishedtransfers.cc bmdc-0.1.3/linux/finishedtransfers.cc --- bmdc-0.1.3/linux/finishedtransfers.cc 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/finishedtransfers.cc 2017-10-23 19:07:31.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright © 2004-2017 Jens Oknelid, paskharen@gmail.com + * Copyright © 2004-2018 Jens Oknelid, paskharen@gmail.com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru bmdc-0.1.3/linux/finishedtransfers.hh bmdc-0.1.3/linux/finishedtransfers.hh --- bmdc-0.1.3/linux/finishedtransfers.hh 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/finishedtransfers.hh 2017-10-23 19:07:31.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright © 2004-2017 Jens Oknelid, paskharen@gmail.com + * Copyright © 2004-2018 Jens Oknelid, paskharen@gmail.com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -77,11 +77,11 @@ // Client callbacks virtual void on(dcpp::FinishedManagerListener::AddedFile, bool upload, const std::string &file, const dcpp::FinishedFileItemPtr &item) noexcept; - virtual void on(dcpp::FinishedManagerListener::AddedUser, bool upload, const dcpp::HintedUser &user, const dcpp::FinishedUserItemPtr &item) noexcept;//NOTE: core 0.762 + virtual void on(dcpp::FinishedManagerListener::AddedUser, bool upload, const dcpp::HintedUser &user, const dcpp::FinishedUserItemPtr &item) noexcept; virtual void on(dcpp::FinishedManagerListener::UpdatedFile, bool upload, const std::string &file, const dcpp::FinishedFileItemPtr &item) noexcept; virtual void on(dcpp::FinishedManagerListener::RemovedFile, bool upload, const std::string &file) noexcept; - virtual void on(dcpp::FinishedManagerListener::UpdatedUser, bool upload, const dcpp::HintedUser &user) noexcept;//NOTE: core 0.762 - virtual void on(dcpp::FinishedManagerListener::RemovedUser, bool upload, const dcpp::HintedUser &user) noexcept;//NOTE: core 0.762 + virtual void on(dcpp::FinishedManagerListener::UpdatedUser, bool upload, const dcpp::HintedUser &user) noexcept; + virtual void on(dcpp::FinishedManagerListener::RemovedUser, bool upload, const dcpp::HintedUser &user) noexcept; GtkListStore *fileStore, *userStore; TreeView userView; diff -Nru bmdc-0.1.3/linux/func.hh bmdc-0.1.3/linux/func.hh --- bmdc-0.1.3/linux/func.hh 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/func.hh 2017-10-23 19:07:31.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright © 2004-2017 Jens Oknelid, paskharen@gmail.com + * Copyright © 2004-2018 Jens Oknelid, paskharen@gmail.com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru bmdc-0.1.3/linux/hashdialog.cc bmdc-0.1.3/linux/hashdialog.cc --- bmdc-0.1.3/linux/hashdialog.cc 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/hashdialog.cc 2017-10-23 19:07:31.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright © 2004-2017 Jens Oknelid, paskharen@gmail.com + * Copyright © 2004-2018 Jens Oknelid, paskharen@gmail.com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru bmdc-0.1.3/linux/hashdialog.hh bmdc-0.1.3/linux/hashdialog.hh --- bmdc-0.1.3/linux/hashdialog.hh 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/hashdialog.hh 2017-10-23 19:07:31.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright © 2004-2015 Jens Oknelid, paskharen@gmail.com - * Copyright © 2011-2017 BMDC++ + * Copyright © 2011-2018 BMDC++ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru bmdc-0.1.3/linux/ignoremenu.cc bmdc-0.1.3/linux/ignoremenu.cc --- bmdc-0.1.3/linux/ignoremenu.cc 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/ignoremenu.cc 2017-10-23 19:07:31.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright © 2017 + * Copyright © 2018 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru bmdc-0.1.3/linux/ignoremenu.hh bmdc-0.1.3/linux/ignoremenu.hh --- bmdc-0.1.3/linux/ignoremenu.hh 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/ignoremenu.hh 2017-10-23 19:07:31.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright © 2017 + * Copyright © 2018 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru bmdc-0.1.3/linux/IgnoreTempManager.cc bmdc-0.1.3/linux/IgnoreTempManager.cc --- bmdc-0.1.3/linux/IgnoreTempManager.cc 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/IgnoreTempManager.cc 2017-10-23 19:07:31.000000000 +0000 @@ -80,6 +80,7 @@ removeNick(ix); } } + /*this need check*/ if(ipIgnore.size() >= 1) { diff -Nru bmdc-0.1.3/linux/IgnoreTempManager.hh bmdc-0.1.3/linux/IgnoreTempManager.hh --- bmdc-0.1.3/linux/IgnoreTempManager.hh 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/IgnoreTempManager.hh 2017-10-23 19:07:31.000000000 +0000 @@ -22,38 +22,31 @@ #include "../dcpp/Singleton.h" #include "../dcpp/TimerManager.h" #include -/* -struct IgnoreItem -{ - string nameItem; - uint64_t time; - int type; -}; -*/ class IgnoreTempManager: public dcpp::Singleton, private dcpp::TimerManagerListener { public: IgnoreTempManager(); ~IgnoreTempManager(); - mutable dcpp::CriticalSection cs; - std::map nickIgnore; - std::map > ipIgnore; - std::map > cidIgnore; + uint64_t lastTick;//not used? - uint64_t lastTick; -void addNickIgnored(std::string nick, uint64_t time); -void addIpIgnored(std::string ip,uint64_t time); -void addCidIgnored(std::string cid,uint64_t time); -bool isCidIgnored(std::string cid); -bool isIpIgnored(std::string ip); -bool isNickIgnored(std::string nick); + void addNickIgnored(std::string nick, uint64_t time); + void addIpIgnored(std::string ip,uint64_t time); + void addCidIgnored(std::string cid,uint64_t time); + bool isCidIgnored(std::string cid); + bool isIpIgnored(std::string ip); + bool isNickIgnored(std::string nick); -void removeNick(std::string nick); -void removeIp(std::string ip); -void removeCid(std::string cid); + void removeNick(std::string nick); + void removeIp(std::string ip); + void removeCid(std::string cid); -virtual void on(dcpp::TimerManagerListener::Minute, uint64_t aTick) noexcept; + std::map nickIgnore; + std::map > ipIgnore; + std::map > cidIgnore; + + virtual void on(dcpp::TimerManagerListener::Minute, uint64_t aTick) noexcept; + mutable dcpp::CriticalSection cs; }; #endif diff -Nru bmdc-0.1.3/linux/mainwindow.cc bmdc-0.1.3/linux/mainwindow.cc --- bmdc-0.1.3/linux/mainwindow.cc 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/mainwindow.cc 2017-10-23 19:07:31.000000000 +0000 @@ -785,7 +785,7 @@ void MainWindow::removeBookEntry_gui(BookEntry *entry) { - if(entry == NULL) return;//entry can not be NULL at any rate + if(!entry) return;//entry can not be NULL at any rate string entryID = entry->getID(); Entry::EntryType type = entry->getType(); @@ -2888,7 +2888,7 @@ XScreenSaverQueryInfo(display, DefaultRootWindow(display), _mit_info); if(_idleDetectionPossible) { - //g_print("Detection Part 2"); + //g_debug("Detection Part 2"); long idlesecs = (_mit_info->idle/1000); // in sec //NOTE: (1000 ms = 1s) if (idlesecs > SETTING(AWAY_IDLE)) { @@ -2956,7 +2956,9 @@ void MainWindow::progress(bool progress) { if(progress) + { gtk_progress_bar_pulse (GTK_PROGRESS_BAR (getWidget("progressbar"))); + } else { gtk_widget_set_sensitive(getWidget("buttonok"),TRUE); @@ -3020,7 +3022,7 @@ while(!mw->Hubs.empty()) { Hub *hub = dynamic_cast(mw->Hubs.back()); - if(hub == NULL) continue;//should never hapen but :-D + if(!hub) continue;//should never hapen but :-D typedef Func1 F1; F1 *func = new F1(mw,&MainWindow::removeBookEntry_gui,hub); WulforManager::get()->dispatchGuiFunc(func); @@ -3037,7 +3039,7 @@ for(auto i= mw->privateMessage.begin(); i != mw->privateMessage.end();++i) { PrivateMessage *pm = dynamic_cast(*i); - if(pm == NULL) continue; + if(!pm) continue; typedef Func1 F1; F1 *func = new F1(mw,&MainWindow::removeBookEntry_gui,pm); WulforManager::get()->dispatchGuiFunc(func); @@ -3053,7 +3055,7 @@ for(auto i= mw->Hubs.begin(); i != mw->Hubs.end();++i) { Hub *hub = dynamic_cast(*i); - if(hub != NULL) + if(hub) hub->reconnect_client(); } } @@ -3067,7 +3069,7 @@ { PrivateMessage *pm = dynamic_cast(*i); - if( !(pm == NULL) && pm->getIsOffline()) + if( pm && pm->getIsOffline()) { typedef Func1 F1; F1 *func = new F1(mw,&MainWindow::removeBookEntry_gui,pm); diff -Nru bmdc-0.1.3/linux/mainwindow.hh bmdc-0.1.3/linux/mainwindow.hh --- bmdc-0.1.3/linux/mainwindow.hh 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/mainwindow.hh 2017-10-23 19:07:31.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright © 2004-2012 Jens Oknelid, paskharen@gmail.com - * Copyright © 2010-2017 BMDC + * Copyright © 2010-2018 BMDC * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru bmdc-0.1.3/linux/message.hh bmdc-0.1.3/linux/message.hh --- bmdc-0.1.3/linux/message.hh 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/message.hh 2017-10-23 19:07:31.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright © 2009-2010 freedcpp, http://code.google.com/p/freedcpp - * Copyright © 2011-2017 BMDC++ http://launchpad.net/bmdc++ + * Copyright © 2011-2018 BMDC * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru bmdc-0.1.3/linux/notepad.cc bmdc-0.1.3/linux/notepad.cc --- bmdc-0.1.3/linux/notepad.cc 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/notepad.cc 2017-10-23 19:07:31.000000000 +0000 @@ -1,4 +1,4 @@ -// Copyright 2011 - 2017 Mank +// Copyright BMDC // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff -Nru bmdc-0.1.3/linux/notepad.hh bmdc-0.1.3/linux/notepad.hh --- bmdc-0.1.3/linux/notepad.hh 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/notepad.hh 2017-10-23 19:07:31.000000000 +0000 @@ -1,4 +1,4 @@ -// Copyright 2011 - 2017 BMDC +// Copyright 2018 BMDC // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff -Nru bmdc-0.1.3/linux/notify.cc bmdc-0.1.3/linux/notify.cc --- bmdc-0.1.3/linux/notify.cc 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/notify.cc 2017-10-23 19:07:31.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright © 2009-2018 Leliksan Floyd - * Copyright © 2018 BMDC++ + * Copyright © 2018 BMDC * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru bmdc-0.1.3/linux/previewmenu.cc bmdc-0.1.3/linux/previewmenu.cc --- bmdc-0.1.3/linux/previewmenu.cc 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/previewmenu.cc 2017-10-23 19:07:31.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright © 2009-2017 freedcpp, http://code.google.com/p/freedcpp + * Copyright © 2009-2018 freedcpp, http://code.google.com/p/freedcpp * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru bmdc-0.1.3/linux/previewmenu.hh bmdc-0.1.3/linux/previewmenu.hh --- bmdc-0.1.3/linux/previewmenu.hh 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/previewmenu.hh 2017-10-23 19:07:31.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright © 2009-2017 freedcpp, http://code.google.com/p/freedcpp + * Copyright © 2009-2018 freedcpp, http://code.google.com/p/freedcpp * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru bmdc-0.1.3/linux/privatemessage.cc bmdc-0.1.3/linux/privatemessage.cc --- bmdc-0.1.3/linux/privatemessage.cc 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/privatemessage.cc 2017-10-23 19:07:31.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright © 2004-2017 Jens Oknelid, paskharen@gmail.com - * Copyright © 2011-2018 BMDC++ + * Copyright © 2011-2018 BMDC * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru bmdc-0.1.3/linux/publichubs.cc bmdc-0.1.3/linux/publichubs.cc --- bmdc-0.1.3/linux/publichubs.cc 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/publichubs.cc 2017-10-23 19:07:31.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright © 2004-2013 Jens Oknelid, paskharen@gmail.com - * Copyright © 2011-2017 Mank, freedcpp at seznam dot cz + * Copyright © 2011-2018 BMDC * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru bmdc-0.1.3/linux/publichubs.hh bmdc-0.1.3/linux/publichubs.hh --- bmdc-0.1.3/linux/publichubs.hh 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/publichubs.hh 2017-10-23 19:07:31.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright © 2004-2015 Jens Oknelid, paskharen@gmail.com - * Copyright © 2011-2017 Mank, freedcpp at seznam dot cz + * Copyright © 2011-2018 BMDC * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru bmdc-0.1.3/linux/recenthub.cc bmdc-0.1.3/linux/recenthub.cc --- bmdc-0.1.3/linux/recenthub.cc 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/recenthub.cc 2017-10-23 19:07:31.000000000 +0000 @@ -1,4 +1,4 @@ -// Copyright 2010-2017 BMDC +// Copyright 2010-2018 BMDC // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff -Nru bmdc-0.1.3/linux/recenthub.hh bmdc-0.1.3/linux/recenthub.hh --- bmdc-0.1.3/linux/recenthub.hh 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/recenthub.hh 2017-10-23 19:07:31.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright © 2010-2017 BMDC++, freedcpp at seznam dot cz + * Copyright © 2010-2018 BMDC * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru bmdc-0.1.3/linux/search.cc bmdc-0.1.3/linux/search.cc --- bmdc-0.1.3/linux/search.cc 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/search.cc 2017-10-23 19:07:31.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright © 2004-2017 Jens Oknelid, paskharen@gmail.com + * Copyright © 2004-2018 Jens Oknelid, paskharen@gmail.com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru bmdc-0.1.3/linux/SearchEntry.cc bmdc-0.1.3/linux/SearchEntry.cc --- bmdc-0.1.3/linux/SearchEntry.cc 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/SearchEntry.cc 2017-10-23 19:07:31.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright © 2012-2017 BMDC++ + * Copyright © 2012-2018 BMDC * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff -Nru bmdc-0.1.3/linux/SearchEntry.hh bmdc-0.1.3/linux/SearchEntry.hh --- bmdc-0.1.3/linux/SearchEntry.hh 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/SearchEntry.hh 2017-10-23 19:07:31.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright © 2012-2017 BMDC++ + * Copyright © 2012-2018 BMDC * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff -Nru bmdc-0.1.3/linux/ShellCommand.hh bmdc-0.1.3/linux/ShellCommand.hh --- bmdc-0.1.3/linux/ShellCommand.hh 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/ShellCommand.hh 2017-10-23 19:07:31.000000000 +0000 @@ -1,6 +1,6 @@ //Class to take care of communication with the shell //Author: Irene //@Modified by Mank -// * Copyright © 2012-2017 BMDC++ +// * Copyright © 2012-2018 BMDC #ifndef SHELL_COMMAND_HH #define SHELL_COMMAND_HH diff -Nru bmdc-0.1.3/linux/Shortcuts.hh bmdc-0.1.3/linux/Shortcuts.hh --- bmdc-0.1.3/linux/Shortcuts.hh 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/Shortcuts.hh 2017-10-23 19:07:31.000000000 +0000 @@ -1,3 +1,21 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + * + */ + #pragma once #include "entry.hh" #include "wulformanager.hh" @@ -5,13 +23,18 @@ class ShortCuts: public Entry { public: - ShortCuts() : Entry(Entry::SHORTCUTS,"shortcuts") + ShortCuts(): + Entry(Entry::SHORTCUTS,"shortcuts") { } ~ShortCuts() {} - GtkWidget* getContainer(){return getWidget("shortcuts-bmdc");} + + GtkWidget* getContainer() { + return getWidget("shortcuts-bmdc"); + } + void show() { GtkWidget *overlay = GTK_WIDGET (getWidget("shortcuts-bmdc")); diff -Nru bmdc-0.1.3/linux/sound.cc bmdc-0.1.3/linux/sound.cc --- bmdc-0.1.3/linux/sound.cc 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/sound.cc 2017-10-23 19:07:31.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright © 2009-2012 freedcpp, http://code.google.com/p/freedcpp - * Copyright © 2012-2017 BMDC++ + * Copyright © 2012-2018 BMDC * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru bmdc-0.1.3/linux/Splash.hh bmdc-0.1.3/linux/Splash.hh --- bmdc-0.1.3/linux/Splash.hh 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/Splash.hh 2017-10-23 19:07:31.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011 - 2017 - BMDC + * Copyright (C) 2011 - 2018 - BMDC * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru bmdc-0.1.3/linux/transfers.cc bmdc-0.1.3/linux/transfers.cc --- bmdc-0.1.3/linux/transfers.cc 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/transfers.cc 2017-10-23 19:07:31.000000000 +0000 @@ -614,7 +614,6 @@ progress = (double)(position * 100.0) / totalSize; if (speed > 0) timeLeft = ((GET_TICK() - position )/1000); - //(totalSize - position) / speed; stream << setiosflags(ios::fixed) << setprecision(1); @@ -930,6 +929,7 @@ params[_("Filename")] = "TTH: " + Util::getFileName(tr->getPath()); else params[_("Filename")] = Util::getFileName(tr->getPath()); + params[_("User")] = WulforUtil::getNicks(user); params[_("Hub Name")] = WulforUtil::getHubNames(user); params[_("Path")] = Util::getFilePath(tr->getPath()); diff -Nru bmdc-0.1.3/linux/wulfor.cc bmdc-0.1.3/linux/wulfor.cc --- bmdc-0.1.3/linux/wulfor.cc 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/wulfor.cc 2017-10-23 19:07:31.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright © 2004-2012 Jens Oknelid, paskharen@gmail.com - * Copyright © 2010-2017 BMDC++ + * Copyright © 2010-2018 BMDC++ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru bmdc-0.1.3/linux/wulformanager.cc bmdc-0.1.3/linux/wulformanager.cc --- bmdc-0.1.3/linux/wulformanager.cc 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/wulformanager.cc 2017-10-23 19:07:31.000000000 +0000 @@ -71,18 +71,17 @@ // Initialize sempahore variables g_rw_lock_init(&entryMutex); // Determine path to data files - path = string(g_get_system_data_dirs()[1]) + G_DIR_SEPARATOR_S + g_get_prgname(); - if (!g_file_test(path.c_str(), G_FILE_TEST_EXISTS)) + const gchar* const* g_path = g_get_system_data_dirs(); + int g = 0; + do { - cerr << path << " is inaccessible, falling back to current directory instead.\n"; - } - - path = string(g_get_system_data_dirs()[0]) + G_DIR_SEPARATOR_S + g_get_prgname(); - if (!g_file_test(path.c_str(), G_FILE_TEST_EXISTS)) - { - cerr << path << " is inaccessible, falling back to current directory instead.\n"; - path = "."; - } + path = string(g_path[g]) + G_DIR_SEPARATOR_S + g_get_prgname(); + if (g_file_test(path.c_str(), G_FILE_TEST_EXISTS)) + { + break; + } + g++; + }while(g_path[g] != NULL); // Set the custom icon search path so GTK+ can find our icons const string iconPath = path + G_DIR_SEPARATOR_S + "icons"; diff -Nru bmdc-0.1.3/linux/wulformanager.hh bmdc-0.1.3/linux/wulformanager.hh --- bmdc-0.1.3/linux/wulformanager.hh 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/wulformanager.hh 2017-10-23 19:07:31.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright © 2004-2015 Jens Oknelid, paskharen@gmail.com - * Copyright © 2010-2017 BMDC++ + * Copyright © 2010-2018 BMDC * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru bmdc-0.1.3/linux/WulforUtil.cc bmdc-0.1.3/linux/WulforUtil.cc --- bmdc-0.1.3/linux/WulforUtil.cc 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/linux/WulforUtil.cc 2017-10-23 19:07:31.000000000 +0000 @@ -1473,7 +1473,7 @@ return string(cpu_info); } -void WulforUtil::setTextDeufaults(GtkWidget* widget, std::string strcolor, std::string back_image_path /*= */,bool pm/* = false*/,std::string hubUrl /*= */,std::string where /**/) +void WulforUtil::setTextDeufaults(GtkWidget* widget, string strcolor, string back_image_path /*= */,bool pm/* = false*/,string hubUrl /*= */,string where /**/) { if( (pm == false) && hubUrl.empty()) // Global any hub? gtk_widget_set_name(widget,"Hub"); @@ -1481,7 +1481,7 @@ if( pm == true) gtk_widget_set_name(widget,"pm"); - std::string hubCid; + string hubCid; if(!hubUrl.empty() && (pm == false)) { hubCid = dcpp::CID(hubUrl.c_str()).toBase32(); gtk_widget_set_name(widget,hubCid.c_str()); @@ -1492,7 +1492,7 @@ gtk_widget_set_name(widget,where.c_str()); } // Intialize the chat window - std::string mono = string(); + string mono = string(); if (SETTING(USE_OEM_MONOFONT)) { mono = "Monospace"; @@ -1505,12 +1505,12 @@ GdkDisplay *display = gdk_display_get_default (); GdkScreen *screen = gdk_display_get_default_screen (display); - std::string t_css = std::string("textview#") + (pm ? "pm" : ( hubCid.empty() ? "Hub": hubCid )) + " text {\n" + string t_css = string("textview#") + (pm ? "pm" : ( hubCid.empty() ? "Hub": hubCid )) + " text {\n" " background-image: url('"+back_image_path+"');\n" "}\n\0"; if(!mono.empty()) { - t_css = std::string("textview#") + (pm ? "pm" : ( hubCid.empty() ? "Hub": hubCid )) + " text {\n" + t_css = string("textview#") + (pm ? "pm" : ( hubCid.empty() ? "Hub": hubCid )) + " text {\n" " background-image: url('"+back_image_path+"');\n" " font: "+mono+";\n" "}\n\0"; @@ -1526,13 +1526,13 @@ return; } - std::string strwhat = (pm ? "pm" : ( hubCid.empty() ? "Hub": hubCid )); + string strwhat = (pm ? "pm" : ( hubCid.empty() ? "Hub": hubCid )); if(!where.empty()) strwhat = where; - std::string t_css = std::string("textview#"+strwhat+" text { background: "+strcolor+" ;}\n"); + string t_css = string("textview#"+strwhat+" text { background: "+strcolor+" ;}\n"); if(!mono.empty()) { - t_css = std::string("textview#"+strwhat+" text { background: "+strcolor+" ; font: "+mono+"; }\n"); + t_css = string("textview#"+strwhat+" text { background: "+strcolor+" ; font: "+mono+"; }\n"); } GtkStyleContext *context; @@ -1550,13 +1550,13 @@ } -void WulforUtil::setTextColor(std::string color,std::string where /*= */) +void WulforUtil::setTextColor(string color,string where /*= */) //Note : selected is red, because most themes get white or black { GtkCssProvider *provider = gtk_css_provider_new (); GdkDisplay *display = gdk_display_get_default (); GdkScreen *screen = gdk_display_get_default_screen (display); - std::string t_css = std::string("textview#"+where+" ,textview#"+where+":focus, textview#"+where+":active text { color: "+color+" ;} GtkTextView#"+where+":selected { color: red ; } \n\0"); + string t_css = string("textview#"+where+" ,textview#"+where+":focus, textview#"+where+":active text { color: "+color+" ;} GtkTextView#"+where+":selected { color: red ; } \n\0"); gtk_css_provider_load_from_data (GTK_CSS_PROVIDER (provider),t_css.c_str(),-1, NULL); diff -Nru bmdc-0.1.3/Makefile bmdc-0.1.3/Makefile --- bmdc-0.1.3/Makefile 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/Makefile 2017-10-23 19:07:31.000000000 +0000 @@ -9,15 +9,16 @@ chmod +x ${HOME}/BMDC-release/bin/bmdc Debug: mkdir -p ${HOME}/debug - scons PREFIX=${HOME}/debug/ debug=1 profile=0 libappindicator=0 useStatusIcon=0 libxattr=1 newSettings=0 -j0 + scons PREFIX=${HOME}/debug/ debug=1 profile=0 libappindicator=0 useStatusIcon=0 libxattr=1 newSettings=0 -j8 #scons install cleanrelease: scons -c cleandebug: scons debug=1 -c -#this is realy realy experminetal +#//do not use this unless you know what you doing. meson-build: meson builddir/ + cd builddir/ ninja diff -Nru bmdc-0.1.3/README.md bmdc-0.1.3/README.md --- bmdc-0.1.3/README.md 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/README.md 2017-10-23 19:07:31.000000000 +0000 @@ -1,11 +1,13 @@ Introduction: ------------- -BMDC++ - DC++ client based on FreeDC++ with Ignore Users,... -see BMDC-Changelog.txt for detailed info. +BMDC - Direct Connect client based on FreeDC++ with Ignore Users +and other things . +see bzr log or git log for more detailed changes info. Dependencies: ------------- - scons >= 0.96 + - pkg-config - g++ >= 4.7 - glib >= 2.32 @@ -17,15 +19,14 @@ - libGeoIP >= 1.4.7 --optional-- - - libXss (Note: for idle detection) - libtar (Note: For Backup/Restore options ) - libnotify >= 0.4.1 ( Note: For popups notifications ) - libappindicator3 ( Note: For appindicators) - xattr ( Note: for storing hashes beside files to not always re-hash ) +--suggested-- +- python2-dbus and qdbus for Media Spam (/kaff and /vlc) - Runtime-deps is also glib-networking ( or similar) for open URI -- also python2-dbus and qdbus for Media Spam (/kaff and /vlc) - Compiling: ---------- @@ -44,7 +45,7 @@ Uninstalling: ------------- -To uninstall BMDC++, simply delete the directory you installed it in. To uninstall using scons, run: +To uninstall BMDC, simply delete the directory you installed it in. To uninstall using scons, run: $ scons -c @@ -61,4 +62,5 @@ -------- Website: https://launchpad.net/bmdc++ + https://github.com/bmdcpp/bmdc https://sourceforge.net/projects/freedcppmv/ diff -Nru bmdc-0.1.3/TODO.md bmdc-0.1.3/TODO.md --- bmdc-0.1.3/TODO.md 2017-09-16 18:51:37.000000000 +0000 +++ bmdc-0.1.3/TODO.md 2017-10-23 19:07:31.000000000 +0000 @@ -1,5 +1,5 @@ -[dp] Ignore for 15m-1h -[checkedgvfsworks] Check if works with network share -[ ] Transfer fully to new dialog? +[dp] Ignore for 15m-1h (need more logic?) +[checked] Check if works with network share - share mounted via gvfs on network share work just fine +[consider?] Transfer fully to new dialog? [x] OpenSSL 1.1.0+ -[ ] .... +[ ] Consider move from scons to meson?