diff --git a/libretroshare/src/chat/rschatitems.cc b/libretroshare/src/chat/rschatitems.cc index 1074eee1c..90cf78fa6 100644 --- a/libretroshare/src/chat/rschatitems.cc +++ b/libretroshare/src/chat/rschatitems.cc @@ -297,13 +297,13 @@ uint32_t RsChatLobbyConnectChallengeItem::serial_size() } uint32_t RsChatLobbyBouncingObject::serialized_size(bool include_signature) { - uint32_t s = 0 ; // no header! - s += 8 ; // lobby_id - s += 8 ; // msg_id - s += GetTlvStringSize(nick) ; // nick + uint32_t s = 0; // no header! + s += 8; // lobby_id + s += 8; // msg_id + s += GetTlvStringSize(nick); // nick - if(include_signature) - s += signature.TlvSize() ; // signature + if (include_signature) + s += signature.TlvSize(); // signature return s ; } diff --git a/libretroshare/src/file_sharing/directory_storage.cc b/libretroshare/src/file_sharing/directory_storage.cc index d1e70720c..e3b167429 100644 --- a/libretroshare/src/file_sharing/directory_storage.cc +++ b/libretroshare/src/file_sharing/directory_storage.cc @@ -755,12 +755,12 @@ bool LocalDirectoryStorage::serialiseDirEntry(const EntryIndex& indx,RsTlvBinary // serialise directory subfiles, with info for each of them - unsigned char *file_section_data = (unsigned char *)rs_malloc(FL_BASE_TMP_SECTION_SIZE); + unsigned char *file_section_data = (unsigned char *)rs_malloc(FL_BASE_TMP_SECTION_SIZE) ; if(!file_section_data) return false ; - uint32_t file_section_size = FL_BASE_TMP_SECTION_SIZE; + uint32_t file_section_size = FL_BASE_TMP_SECTION_SIZE ; for(uint32_t i=0;isubfiles.size();++i) { @@ -865,12 +865,12 @@ bool RemoteDirectoryStorage::deserialiseUpdateDirEntry(const EntryIndex& indx,co // deserialise directory subfiles, with info for each of them std::vector subfiles_array ; - unsigned char *file_section_data = (unsigned char *)rs_malloc(FL_BASE_TMP_SECTION_SIZE); + unsigned char *file_section_data = (unsigned char *)rs_malloc(FL_BASE_TMP_SECTION_SIZE) ; if(!file_section_data) return false ; - uint32_t file_section_size = FL_BASE_TMP_SECTION_SIZE; + uint32_t file_section_size = FL_BASE_TMP_SECTION_SIZE ; for(uint32_t i=0;ireceipt_item = deserialise_RsGRouterSignedReceiptItem(&((uint8_t*)data)[offset],pktsize - offset); + if (item->receipt_item != NULL) + offset += item->receipt_item->serial_size(); + else // + ok = false; + } + else // + item->receipt_item = NULL; - if(offset < pktsize) - { - item->receipt_item = deserialise_RsGRouterSignedReceiptItem(&((uint8_t*)data)[offset],pktsize - offset) ; - if(item->receipt_item != NULL) - offset += item->receipt_item->serial_size() ; - else - ok = false ; - } - else - item->receipt_item = NULL ; if (offset != rssize || !ok) diff --git a/libretroshare/src/gxs/gxssecurity.cc b/libretroshare/src/gxs/gxssecurity.cc index eb5f38219..59e72573f 100644 --- a/libretroshare/src/gxs/gxssecurity.cc +++ b/libretroshare/src/gxs/gxssecurity.cc @@ -554,10 +554,10 @@ bool GxsSecurity::encrypt(uint8_t *& out, uint32_t &outlen, const uint8_t *in, u if(!EVP_SealInit(&ctx, EVP_aes_128_cbc(), &ek, &eklen, iv, &public_key, 1)) return false; // now assign memory to out accounting for data, and cipher block size, key length, and key length val - out = (uint8_t*)rs_malloc(inlen + cipher_block_size + size_net_ekl + eklen + EVP_MAX_IV_LENGTH); + out = (uint8_t*)rs_malloc(inlen + cipher_block_size + size_net_ekl + eklen + EVP_MAX_IV_LENGTH) ; - if(out == NULL) - return false ; + if (out == NULL) + return false; net_ekl = htonl(eklen); memcpy((unsigned char*)out + out_offset, &net_ekl, size_net_ekl); diff --git a/libretroshare/src/gxs/rsgenexchange.cc b/libretroshare/src/gxs/rsgenexchange.cc index 3ff86cdf6..2e38d4ca1 100644 --- a/libretroshare/src/gxs/rsgenexchange.cc +++ b/libretroshare/src/gxs/rsgenexchange.cc @@ -2226,7 +2226,7 @@ void RsGenExchange::processMessageDelete() } -#warning TODO: notify for deleted messages +#warning csoler: TODO: notify for deleted messages #ifdef SUSPENDED std::list grpDeleted; std::map::iterator mit = toNotify.begin(); @@ -2402,7 +2402,7 @@ void RsGenExchange::publishGrps() { RsTemporaryMemory metaData(mdSize); serialOk = grp->metaData->serialise(metaData, mdSize,RS_GXS_GRP_META_DATA_CURRENT_API_VERSION); -#warning TODO: grp->meta should be renamed grp->public_meta ! +#warning csoler: TODO: grp->meta should be renamed grp->public_meta ! grp->meta.setBinData(metaData, mdSize); } @@ -2419,7 +2419,7 @@ void RsGenExchange::publishGrps() mDataAccess->updateGroupData(grp); else mDataAccess->addGroupData(grp); -#warning this is bad: addGroupData/updateGroupData actially deletes grp. But it may be used below? grp should be a class object and not deleted manually! +#warning csoler: this is bad: addGroupData/updateGroupData actially deletes grp. But it may be used below? grp should be a class object and not deleted manually! groups_to_subscribe.push_back(grpId) ; } diff --git a/libretroshare/src/gxs/rsgxsdataaccess.cc b/libretroshare/src/gxs/rsgxsdataaccess.cc index 65fc7f083..11cb4217e 100644 --- a/libretroshare/src/gxs/rsgxsdataaccess.cc +++ b/libretroshare/src/gxs/rsgxsdataaccess.cc @@ -361,8 +361,9 @@ uint32_t RsGxsDataAccess::requestStatus(uint32_t token) if(mPublicToken.find(token) != mPublicToken.end()) return mPublicToken[token]; } - if(!checkRequestStatus(token, status, reqtype, anstype, ts)) - return RsTokenService::GXS_REQUEST_V2_STATUS_FAILED ; + + if (!checkRequestStatus(token, status, reqtype, anstype, ts)) + return RsTokenService::GXS_REQUEST_V2_STATUS_FAILED; return status; } diff --git a/libretroshare/src/gxs/rsgxsnetservice.cc b/libretroshare/src/gxs/rsgxsnetservice.cc index 0bd8c5b5b..c4e52cde2 100644 --- a/libretroshare/src/gxs/rsgxsnetservice.cc +++ b/libretroshare/src/gxs/rsgxsnetservice.cc @@ -1641,7 +1641,9 @@ void RsGxsNetService::recvNxsItemQueue() default: if(ni->PacketSubType() != RS_PKT_SUBTYPE_NXS_ENCRYPTED_DATA_ITEM) - std::cerr << "Unhandled item subtype " << (uint32_t) ni->PacketSubType() << " in RsGxsNetService: " << std::endl; break; + { + std::cerr << "Unhandled item subtype " << (uint32_t) ni->PacketSubType() << " in RsGxsNetService: " << std::endl ; break ; + } } delete item ; } @@ -3291,8 +3293,8 @@ void RsGxsNetService::locked_genSendGrpsTransaction(NxsTransaction* tr) if(!grps.empty()) mDataStore->retrieveNxsGrps(grps, false, false); - else - return; + else + return; NxsTransaction* newTr = new NxsTransaction(); newTr->mFlag = NxsTransaction::FLAG_STATE_WAITING_CONFIRM; @@ -3304,7 +3306,7 @@ void RsGxsNetService::locked_genSendGrpsTransaction(NxsTransaction* tr) RsPeerId peerId = tr->mTransaction->PeerId(); for(;mit != grps.end(); ++mit) { -#warning Should make sure that no private key information is sneaked in here for the grp +#warning csoler: Should make sure that no private key information is sneaked in here for the grp mit->second->PeerId(peerId); // set so it gets sent to right peer mit->second->transactionNumber = transN; newTr->mItems.push_back(mit->second); diff --git a/libretroshare/src/pgp/pgpkeyutil.cc b/libretroshare/src/pgp/pgpkeyutil.cc index a019c95c8..c324ab37c 100644 --- a/libretroshare/src/pgp/pgpkeyutil.cc +++ b/libretroshare/src/pgp/pgpkeyutil.cc @@ -276,14 +276,14 @@ uint32_t PGPKeyParser::read_125Size(unsigned char *& data) uint8_t b1 = *data ; ++data ; - if(b1 < 192) //192 Size is coded with One Char. See RFC4880 + if (b1 < 192) //192 Size is coded with One Char. See RFC4880 https://tools.ietf.org/html/rfc4880#section-4.2.2.1 return b1 ; uint8_t b2 = *data ; ++data ; - if(b1 < 224)//224 = 0xC0+0x20 Size is coded with Two Chars - return ((b1-192) << 8) + b2 + 192 ; // see RFC4880 + if (b1 < 224)//224 = 0xC0+0x20 Size is coded with Two Chars + return ( (b1-192) << 8 ) + b2 + 192 ; // see RFC4880 if(b1 != 0xFF)// Else Coded with 4 Chars but first == 0xFF throw std::runtime_error("GPG parsing error") ; diff --git a/libretroshare/src/pqi/authssl.cc b/libretroshare/src/pqi/authssl.cc index 4c50a046a..07c12b942 100644 --- a/libretroshare/src/pqi/authssl.cc +++ b/libretroshare/src/pqi/authssl.cc @@ -476,10 +476,10 @@ static int initLib = 0; mOwnCert = new sslcert(x509, mOwnId); - // new locations don't store the name in the cert - // if empty, use the external supplied value - if(mOwnCert->location == "") - mOwnCert->location = alternative_location_name; + // New locations don't store the name in the cert. + // If empty, use the external supplied value. + if (mOwnCert->location == "") + mOwnCert->location = alternative_location_name ; std::cerr << "Inited SSL context: " << std::endl; std::cerr << " Certificate: " << mOwnId << std::endl; diff --git a/libretroshare/src/pqi/p3cfgmgr.cc b/libretroshare/src/pqi/p3cfgmgr.cc index b920cffa8..5f9934d57 100644 --- a/libretroshare/src/pqi/p3cfgmgr.cc +++ b/libretroshare/src/pqi/p3cfgmgr.cc @@ -175,16 +175,16 @@ void p3ConfigMgr::addConfiguration(std::string file, pqiConfig *conf) std::cerr << "\tIgnoring new filename " << filename; std::cerr << std::endl; return; - } - // also check that the filename is not already registered for another config + } + // Also check that the filename is not already registered for another config - for(std::list::const_iterator it = mConfigs.begin();it!= mConfigs.end();++it) - if( (*it)->filename == filename ) - { - std::cerr << "!!!!!!!!!!! Trying to register a config for file \"" << filename << "\" that is already registered" << std::endl; - std::cerr << "!!!!!!!!!!! Please correct the code !" << std::endl; - return ; - } + for(std::list::const_iterator it = mConfigs.begin(); it!= mConfigs.end(); ++it) + if((*it)->filename == filename) + { + std::cerr << "!!!!!!!!!! Trying to register a config for file \"" << filename << "\" that is already registered" << std::endl; + std::cerr << "!!!!!!!!!! Please correct the code !" << std::endl; + return; + } conf->setFilename(filename); mConfigs.push_back(conf); @@ -511,9 +511,8 @@ bool p3GeneralConfig::saveList(bool &cleanup, std::list& savelist) if (item->tlvkvs.pairs.size() > 0) { savelist.push_back(item); - } - else - delete item; + } else + delete item; return true; } diff --git a/libretroshare/src/pqi/p3netmgr.cc b/libretroshare/src/pqi/p3netmgr.cc index bc5a6f12b..1cbabb75c 100644 --- a/libretroshare/src/pqi/p3netmgr.cc +++ b/libretroshare/src/pqi/p3netmgr.cc @@ -812,7 +812,7 @@ void p3NetMgrIMPL::netExtCheck() address_votes[tmpip].n++ ; /* XXX HACK TO FIX */ -#warning "ALLOWING ExtAddrFinder -> ExtAddrStableOk = true (which it is not normally)" +#warning drbob: ALLOWING ExtAddrFinder -> ExtAddrStableOk = true (which it is not normally) mNetFlags.mExtAddrStableOk = true; std::cerr << "ExtAddrFinder reported external address " << sockaddr_storage_iptostring(tmpip) << std::endl; diff --git a/libretroshare/src/pqi/p3peermgr.cc b/libretroshare/src/pqi/p3peermgr.cc index f85edb511..b458b1a47 100644 --- a/libretroshare/src/pqi/p3peermgr.cc +++ b/libretroshare/src/pqi/p3peermgr.cc @@ -2561,7 +2561,7 @@ bool p3PeerMgrIMPL::removeGroup(const RsNodeGroupId& groupId) std::cerr << "(EE) cannot remove standard group with ID " << groupId << std::endl; return false ; } -#warning we need to check that the local group is not used. Otherwise deleting it is going to cause problems! +#warning csoler: we need to check that the local group is not used. Otherwise deleting it is going to cause problems! // else if(!it->second.used_gxs_groups.empty()) // { // std::cerr << "(EE) cannot remove standard group with ID " << groupId << " because it is used in the following groups: " << std::endl; @@ -2619,8 +2619,8 @@ bool p3PeerMgrIMPL::getGroupInfoList(std::list& groupInfoList) { RsStackMutex stack(mPeerMtx); /****** STACK LOCK MUTEX *******/ - for (std::map ::const_iterator groupIt = groupList.begin(); groupIt != groupList.end(); ++groupIt) - groupInfoList.push_back(groupIt->second); + for(std::map ::const_iterator groupIt = groupList.begin(); groupIt != groupList.end(); ++groupIt) + groupInfoList.push_back(groupIt->second) ; return true; } @@ -2845,10 +2845,11 @@ bool p3PeerMgrIMPL::removeUnusedLocations() const time_t now = time(NULL); - std::list pgpList; + std::list pgpList ; + + if (!rsPeers->getGPGAcceptedList(pgpList)) + return false ; - if(!rsPeers->getGPGAcceptedList(pgpList)) - return false; { RsStackMutex stack(mPeerMtx); /****** STACK LOCK MUTEX *******/ @@ -2881,8 +2882,8 @@ bool p3PeerMgrIMPL::removeUnusedLocations() } } - for( std::list::iterator it = toRemove.begin(); it != toRemove.end(); ++it) - removeFriend(*it, false); + for (std::list::iterator it = toRemove.begin(); it != toRemove.end(); ++it) + removeFriend(*it, false) ; return true; } diff --git a/libretroshare/src/pqi/p3servicecontrol.cc b/libretroshare/src/pqi/p3servicecontrol.cc index 6f0545cb4..11dd01520 100644 --- a/libretroshare/src/pqi/p3servicecontrol.cc +++ b/libretroshare/src/pqi/p3servicecontrol.cc @@ -143,13 +143,13 @@ public: ok &= getRawUInt32(data, rssize, &offset, &item->mServiceId); ok &= GetTlvString(data, rssize, &offset, TLV_TYPE_STR_NAME, item->mServiceName); - uint8_t v ; + uint8_t v; ok &= getRawUInt8(data, rssize, &offset, &v) ; - if(v != 0 && v != 1) - ok = false ; - else - item->mDefaultAllowed = (bool)v; + if (v != 0 && v != 1) + ok = false; + else + item->mDefaultAllowed = (bool)v ; uint32_t tmp ; ok &= getRawUInt32(data, rssize, &offset, &tmp); diff --git a/libretroshare/src/pqi/pqiperson.cc b/libretroshare/src/pqi/pqiperson.cc index ea81c7f8c..cade0c39e 100644 --- a/libretroshare/src/pqi/pqiperson.cc +++ b/libretroshare/src/pqi/pqiperson.cc @@ -578,9 +578,9 @@ int pqiperson::gatherStatistics(std::list& out_lst, { RS_STACK_MUTEX(mPersonMtx); - // get the rate from the active one. - if ((!active) || (activepqi == NULL)) - return 0; + // Get the rate from the active one. + if( (!active) || (activepqi == NULL) ) + return 0 ; return activepqi->gatherStatistics(out_lst, in_lst); } diff --git a/libretroshare/src/pqi/pqissl.cc b/libretroshare/src/pqi/pqissl.cc index eae05936a..795691586 100644 --- a/libretroshare/src/pqi/pqissl.cc +++ b/libretroshare/src/pqi/pqissl.cc @@ -1624,10 +1624,10 @@ int pqissl::readdata(void *data, int len) #ifdef PQISSL_DEBUG std::cout << "Reading data thread=" << pthread_self() << ", ssl=" << (void*)this << std::endl ; #endif - // safety check. Apparently this avoids some SIGSEGV. - // - if(ssl_connection == NULL) - return -1; + // Safety check. Apparently this avoids some SIGSEGV. + // + if (ssl_connection == NULL) + return -1 ; // There is a do, because packets can be splitted into multiple ssl buffers // when they are larger than 16384 bytes. Such packets have to be read in diff --git a/libretroshare/src/pqi/pqistreamer.cc b/libretroshare/src/pqi/pqistreamer.cc index aa52ec02c..76f5b1581 100644 --- a/libretroshare/src/pqi/pqistreamer.cc +++ b/libretroshare/src/pqi/pqistreamer.cc @@ -161,20 +161,19 @@ pqistreamer::~pqistreamer() if (mRsSerialiser) delete mRsSerialiser; - free_pend_locked(); + free_pend_locked() ; // clean up incoming. - while(!mIncoming.empty()) + while (!mIncoming.empty()) { RsItem *i = mIncoming.front(); - mIncoming.pop_front(); - --mIncomingSize ; + mIncoming.pop_front() ; + --mIncomingSize; delete i; - } + } - - if(mIncomingSize != 0) - std::cerr << "(EE) inconsistency after deleting pqistreamer queue. Remaining items: " << mIncomingSize << std::endl; + if (mIncomingSize != 0) + std::cerr << "(EE) inconsistency after deleting pqistreamer queue. Remaining items: " << mIncomingSize << std::endl ; return; } diff --git a/libretroshare/src/serialiser/rsbaseserial.cc b/libretroshare/src/serialiser/rsbaseserial.cc index b34c9f1fd..2ef67cd5b 100644 --- a/libretroshare/src/serialiser/rsbaseserial.cc +++ b/libretroshare/src/serialiser/rsbaseserial.cc @@ -231,7 +231,7 @@ uint32_t getRawStringSize(const std::string &outStr) bool getRawString(void *data, uint32_t size, uint32_t *offset, std::string &outStr) { -#warning "I had to change this. It seems like a bug to not clear the string. Should make sure it's not introducing any side effect." +#warning Gio: "I had to change this. It seems like a bug to not clear the string. Should make sure it's not introducing any side effect." outStr.clear(); uint32_t len = 0; diff --git a/libretroshare/src/serialiser/rsgxsrecognitems.cc b/libretroshare/src/serialiser/rsgxsrecognitems.cc index 23a515230..11317ad3c 100644 --- a/libretroshare/src/serialiser/rsgxsrecognitems.cc +++ b/libretroshare/src/serialiser/rsgxsrecognitems.cc @@ -574,8 +574,8 @@ bool RsGxsRecognSerialiser::serialise(RsItem *i, void *data, uint32_t *pktsi RsItem *RsGxsRecognSerialiser::deserialise(void *data, uint32_t *pktsize) { - if(*pktsize < getRsPktBaseSize()) - return NULL; + if (*pktsize < getRsPktBaseSize()) + return NULL ; /* get the type and size */ uint32_t rstype = getRsItemId(data); diff --git a/libretroshare/src/services/p3banlist.cc b/libretroshare/src/services/p3banlist.cc index fd4540f0a..157cc23f8 100644 --- a/libretroshare/src/services/p3banlist.cc +++ b/libretroshare/src/services/p3banlist.cc @@ -249,8 +249,8 @@ void p3BanList::autoFigureOutBanRanges() #endif BanListPeer& peer(mBanRanges[it->first]) ; - if(peer.reason == RSBANLIST_REASON_USER) - continue ; + if (peer.reason == RSBANLIST_REASON_USER) + continue; peer.addr = it->first ; peer.masked_bytes = 1 ; @@ -969,10 +969,10 @@ bool p3BanList::addBanEntry(const RsPeerId &peerId, const struct sockaddr_storag it->second.mLastUpdate = now; updated = true; } - } + } - if(updated) - IndicateConfigChanged(); + if (updated) + IndicateConfigChanged() ; return updated; } @@ -1056,12 +1056,12 @@ int p3BanList::condenseBanSources_locked() struct sockaddr_storage bannedaddr; sockaddr_storage_clear(bannedaddr); - bannedaddr.ss_family = AF_INET ; + bannedaddr.ss_family = AF_INET; sockaddr_storage_copyip(bannedaddr, lit->second.addr); sockaddr_storage_setport(bannedaddr, 0); - if(isWhiteListed_locked(bannedaddr)) - continue ; + if (isWhiteListed_locked(bannedaddr)) + continue; /* check if it exists in the Set already */ std::map::iterator sit; diff --git a/libretroshare/src/services/p3msgservice.cc b/libretroshare/src/services/p3msgservice.cc index d64c020d6..f5dbed520 100644 --- a/libretroshare/src/services/p3msgservice.cc +++ b/libretroshare/src/services/p3msgservice.cc @@ -1645,8 +1645,8 @@ void p3MsgService::initRsMIS(RsMsgItem *msg, MsgInfoSummary &mis) { mis.msgflags = 0; - if (msg->msgFlags & RS_MSG_FLAGS_DISTANT) - mis.msgflags |= RS_MSG_DISTANT; + if(msg->msgFlags & RS_MSG_FLAGS_DISTANT) + mis.msgflags |= RS_MSG_DISTANT ; if (msg->msgFlags & RS_MSG_FLAGS_SIGNED) mis.msgflags |= RS_MSG_SIGNED ; diff --git a/libretroshare/src/turtle/rsturtleitem.cc b/libretroshare/src/turtle/rsturtleitem.cc index 4095eceb1..c1965deee 100644 --- a/libretroshare/src/turtle/rsturtleitem.cc +++ b/libretroshare/src/turtle/rsturtleitem.cc @@ -284,22 +284,19 @@ RsTurtleRegExpSearchRequestItem::RsTurtleRegExpSearchRequestItem(void *data,uint uint32_t n =0 ; ok &= getRawUInt32(data,pktsize,&offset,&n) ; - if(ok) - expr._tokens.resize(n) ; + if(ok) expr._tokens.resize(n) ; for(uint32_t i=0;i(Cookie); - CUPnPControlPoint *upnpCP = CUPnPControlPoint::s_CtrlPoint; + CUPnPControlPoint *upnpCP = CUPnPControlPoint::s_CtrlPoint ; - if(upnpCP == NULL) - return 0 ; + if (upnpCP == NULL) + return 0; //fprintf(stderr, "Callback: %d, Cookie: %p\n", EventType, Cookie); switch (EventType) { diff --git a/libretroshare/src/util/argstream.h b/libretroshare/src/util/argstream.h index 325d76fd5..a628147e0 100644 --- a/libretroshare/src/util/argstream.h +++ b/libretroshare/src/util/argstream.h @@ -296,8 +296,8 @@ namespace const char* desc, bool mandatory) : longName_(l), - value_(&v), valueName_(valueName), + value_(&v), initialValue_(v), description_(desc), mandatory_(mandatory) @@ -310,9 +310,9 @@ namespace const char* desc, bool mandatory) : shortName_(1,s), + valueName_(valueName), value_(&v), initialValue_(v), - valueName_(valueName), description_(desc), mandatory_(mandatory) { diff --git a/libretroshare/src/util/folderiterator.cc b/libretroshare/src/util/folderiterator.cc index 1e7b33798..0f9ffb89f 100644 --- a/libretroshare/src/util/folderiterator.cc +++ b/libretroshare/src/util/folderiterator.cc @@ -113,7 +113,7 @@ bool FolderIterator::updateFileInfo(bool& should_skip) mFullPath = mFolderName + "/" + mFileName ; -#warning should we take care of symbolic links on windows? +#warning cyril soler: should we take care of symbolic links on windows? #ifndef WINDOWS_SYS if( ent->d_type == DT_LNK) { diff --git a/libretroshare/src/util/rsdir.cc b/libretroshare/src/util/rsdir.cc index e89fff8e2..2b7ea22cb 100644 --- a/libretroshare/src/util/rsdir.cc +++ b/libretroshare/src/util/rsdir.cc @@ -483,7 +483,7 @@ bool RsDirUtil::checkCreateDirectory(const std::string& dir) std::string RsDirUtil::removeSymLinks(const std::string& path) { #if defined(WINDOWS_SYS) || defined(__APPLE__) -#warning (Mr.Alice): I don't know how to do this on windows/MacOS. See https://msdn.microsoft.com/en-us/library/windows/desktop/hh707084(v=vs.85).aspx +#warning (Mr.Alice): I don't know how to do this on windows/MacOS. See https://msdn.microsoft.com/en-us/library/windows/desktop/hh707084(v=vs.85).aspx' //if(!S_OK == PathCchCanonicalizeEx(tmp,...) ; return path ; #else diff --git a/libretroshare/src/util/rsrecogn.cc b/libretroshare/src/util/rsrecogn.cc index 17f16d480..f7c51b9e9 100644 --- a/libretroshare/src/util/rsrecogn.cc +++ b/libretroshare/src/util/rsrecogn.cc @@ -327,7 +327,7 @@ bool rsa_sanity_check(RSA *rsa) } -#warning this code should be using GxsSecurity signature code. Not some own made signature call. +#warning csoler: this code should be using GxsSecurity signature code. Not some own made signature call. bool RsRecogn::signTag(EVP_PKEY *signKey, RsGxsRecognTagItem *item) { @@ -375,7 +375,7 @@ bool RsRecogn::signTag(EVP_PKEY *signKey, RsGxsRecognTagItem *item) return true; } -#warning this code should be using GxsSecurity signature code. Not some own made signature call. +#warning csoler: this code should be using GxsSecurity signature code. Not some own made signature call. bool RsRecogn::signSigner(EVP_PKEY *signKey, RsGxsRecognSignerItem *item) { @@ -432,7 +432,7 @@ bool RsRecogn::signSigner(EVP_PKEY *signKey, RsGxsRecognSignerItem *item) return true; } -#warning this code should be using GxsSecurity signature code. Not some own made signature call. +#warning csoler: this code should be using GxsSecurity signature code. Not some own made signature call. bool RsRecogn::signTagRequest(EVP_PKEY *signKey, RsGxsRecognReqItem *item) { diff --git a/plugins/FeedReader/gui/FeedReaderMessageWidget.cpp b/plugins/FeedReader/gui/FeedReaderMessageWidget.cpp index c8e7e9d61..6be569fc5 100644 --- a/plugins/FeedReader/gui/FeedReaderMessageWidget.cpp +++ b/plugins/FeedReader/gui/FeedReaderMessageWidget.cpp @@ -554,7 +554,7 @@ void FeedReaderMessageWidget::updateCurrentMessage() { mTimer->stop(); - long todo; // show link somewhere +#warning FeedReaderMessageWidget.cpp TODO thunder2: show link somewhere std::string msgId = currentMsgId(); diff --git a/plugins/FeedReader/gui/PreviewFeedDialog.ui b/plugins/FeedReader/gui/PreviewFeedDialog.ui index ddda31182..14868c082 100644 --- a/plugins/FeedReader/gui/PreviewFeedDialog.ui +++ b/plugins/FeedReader/gui/PreviewFeedDialog.ui @@ -575,7 +575,6 @@ titleFrame splitter buttonBox - transformationInfoScrollArea diff --git a/plugins/FeedReader/services/p3FeedReaderThread.cc b/plugins/FeedReader/services/p3FeedReaderThread.cc index 8ac64c920..c638304f4 100644 --- a/plugins/FeedReader/services/p3FeedReaderThread.cc +++ b/plugins/FeedReader/services/p3FeedReaderThread.cc @@ -252,7 +252,7 @@ static bool getFavicon(CURLWrapper &CURL, const std::string &url, std::string &i isContentType(contentType, "application/octet-stream") || isContentType(contentType, "text/plain")) { if (!vicon.empty()) { - long todo; // check it +#warning p3FeedReaderThread.cc TODO thunder2: check it result = toBase64(vicon, icon); } } @@ -1299,7 +1299,7 @@ RsFeedReaderErrorState p3FeedReaderThread::processTransformation(const RsFeedRea RsFeedReaderErrorState p3FeedReaderThread::processXPath(const std::list &xpathsToUse, const std::list &xpathsToRemove, HTMLWrapper &html, std::string &errorString) { - long todo_fill_errorString; +#warning p3FeedReaderThread.cc TODO thunder2: fill_errorString; if (xpathsToUse.empty() && xpathsToRemove.empty()) { return RS_FEED_ERRORSTATE_OK; @@ -1410,7 +1410,7 @@ RsFeedReaderErrorState p3FeedReaderThread::processXPath(const std::listextended_data != frame->data) + if (frame->extended_data != frame->data) { av_freep(&frame->extended_data); return; + } frame->extended_data = NULL; get_frame_defaults(frame); @@ -283,7 +284,7 @@ void VideoProcessor::receiveEncodedData(const RsVOIPDataChunk& chunk) // { _decoded_output_device->showFrame(img) ; // _lastTimeToShowFrame = time(NULL) ;//+ 1000/25; -#warning "\plugins\VOIP\gui\VideoProcessor.cpp:210 TODO: Get CPU usage to pass image." +#warning \plugins\VOIP\gui\VideoProcessor.cpp:210 Phenom: TODO: Get CPU usage to pass image. // } } diff --git a/plugins/VOIP/services/p3VOIP.cc b/plugins/VOIP/services/p3VOIP.cc index 859c5bf35..b2c3f27bf 100644 --- a/plugins/VOIP/services/p3VOIP.cc +++ b/plugins/VOIP/services/p3VOIP.cc @@ -770,7 +770,8 @@ bool p3VOIP::loadList(std::list& load) RsConfigKeyValueSet *vitem = dynamic_cast(*it) ; if(vitem != NULL) - for(std::list::const_iterator kit = vitem->tlvkvs.pairs.begin(); kit != vitem->tlvkvs.pairs.end(); ++kit) + { + for(std::list::const_iterator kit = vitem->tlvkvs.pairs.begin(); kit != vitem->tlvkvs.pairs.end(); ++kit) if(kit->key == "P3VOIP_CONFIG_ATRANSMIT") _atransmit = pop_int_value(kit->value) ; else if(kit->key == "P3VOIP_CONFIG_VOICEHOLD") @@ -785,7 +786,7 @@ bool p3VOIP::loadList(std::list& load) _min_loudness = pop_int_value(kit->value) ; else if(kit->key == "P3VOIP_CONFIG_ECHO_CNCL") _echo_cancel = pop_int_value(kit->value) ; - + } delete vitem ; } diff --git a/retroshare-gui/src/gui/FileTransfer/xprogressbar.cpp b/retroshare-gui/src/gui/FileTransfer/xprogressbar.cpp index a4dd414da..5a3f2a8ef 100644 --- a/retroshare-gui/src/gui/FileTransfer/xprogressbar.cpp +++ b/retroshare-gui/src/gui/FileTransfer/xprogressbar.cpp @@ -253,7 +253,7 @@ void xProgressBar::paint() //loop through all chunks represented by the pixel at position i and count the completed chunks //if no incomplete chunk is encountered in this range, continue to count the row of completed chunks //to see whether more than 1 pixel can be drawn at once. - for(j=first_chunk_in_pixel;((j<=last_chunk_in_pixel) || (all_done && (j 0 && pixmap.loadFromData(data.mImage.mData, data.mImage.mSize, "PNG")) - ui->avatarLabel->setPixmap(pixmap); - else - pixmap = QPixmap::fromImage(GxsIdDetails::makeDefaultIcon(RsGxsId(data.mMeta.mGroupId))) ; - ui->avatarLabel->setPixmap(pixmap); // we need to use the default pixmap here, generated from the ID - + if(data.mImage.mSize > 0 && pixmap.loadFromData(data.mImage.mData, data.mImage.mSize, "PNG")) + ui->avatarLabel->setPixmap(pixmap) ; + else + { + pixmap = QPixmap::fromImage(GxsIdDetails::makeDefaultIcon(RsGxsId(data.mMeta.mGroupId)) ) ; + ui->avatarLabel->setPixmap(pixmap) ; // we need to use the default pixmap here, generated from the ID + } + #ifdef ID_DEBUG std::cerr << "Setting header frame image : " << pix.width() << " x " << pix.height() << std::endl; #endif diff --git a/retroshare-gui/src/gui/Identity/IdEditDialog.ui b/retroshare-gui/src/gui/Identity/IdEditDialog.ui index c57c6200b..92baf07e1 100644 --- a/retroshare-gui/src/gui/Identity/IdEditDialog.ui +++ b/retroshare-gui/src/gui/Identity/IdEditDialog.ui @@ -6,8 +6,8 @@ 0 0 - 530 - 518 + 542 + 536 @@ -20,18 +20,27 @@ :/images/identity/identities_32.png:/images/identity/identities_32.png - + 0 - + + 0 + + + 0 + + + 0 + + 0 - + 0 @@ -44,7 +53,7 @@ QFrame::Raised - + @@ -129,18 +138,18 @@ - + - + - + PGP Hash - + Type @@ -193,35 +202,35 @@ - + Nickname - + Key ID - + PGP Id - + PGP Name - + Qt::Horizontal @@ -265,7 +274,7 @@ - + Qt::Vertical @@ -280,7 +289,7 @@ - + @@ -326,7 +335,7 @@ - + Qt::Vertical @@ -448,7 +457,7 @@ - + Qt::Vertical @@ -464,16 +473,25 @@ - + 9 - + + 9 + + + 9 + + + 9 + + 9 - + Qt::Horizontal diff --git a/retroshare-gui/src/gui/MainWindow.cpp b/retroshare-gui/src/gui/MainWindow.cpp index b6f8913df..3160b7b30 100644 --- a/retroshare-gui/src/gui/MainWindow.cpp +++ b/retroshare-gui/src/gui/MainWindow.cpp @@ -330,11 +330,11 @@ MainWindow::~MainWindow() void MainWindow::initStackedPage() { /* WORK OUT IF WE"RE IN ADVANCED MODE OR NOT */ - bool advancedMode = false; - std::string advsetting; - if (rsConfig->getConfigurationOption(RS_CONFIG_ADVANCED, advsetting) && (advsetting == "YES")) { - advancedMode = true; - } + //bool advancedMode = false; + //std::string advsetting; + //if (rsConfig->getConfigurationOption(RS_CONFIG_ADVANCED, advsetting) && (advsetting == "YES")) { + // advancedMode = true; + //} QList > > notify; diff --git a/retroshare-gui/src/gui/Posted/PostedItem.ui b/retroshare-gui/src/gui/Posted/PostedItem.ui index 8e150784f..ac9ea2a72 100644 --- a/retroshare-gui/src/gui/Posted/PostedItem.ui +++ b/retroshare-gui/src/gui/Posted/PostedItem.ui @@ -322,7 +322,6 @@ titleLabel - diff --git a/retroshare-gui/src/gui/RemoteDirModel.cpp b/retroshare-gui/src/gui/RemoteDirModel.cpp index 8584d496a..59e908cb4 100644 --- a/retroshare-gui/src/gui/RemoteDirModel.cpp +++ b/retroshare-gui/src/gui/RemoteDirModel.cpp @@ -386,10 +386,10 @@ QVariant TreeStyle_RDM::displayRole(const DirDetails& details,int coln) const if (details.type == DIR_TYPE_PERSON) /* Person */ { - switch(coln) + switch(coln) { case 0: { - SharedDirStats stats ; + //SharedDirStats stats ; QString res ; if(RemoteMode) @@ -663,13 +663,13 @@ QVariant RetroshareDirModel::data(const QModelIndex &index, int role) const /* get the data from the index */ void *ref = index.internalPointer(); - DirDetails details ; + DirDetails details; - if (!requestDirDetails(ref, RemoteMode,details)) - return QVariant(); + if(!requestDirDetails(ref, RemoteMode,details)) + return QVariant() ; if (role == RetroshareDirModel::FileNameRole) /* end of FileNameRole */ - return QString::fromUtf8(details.name.c_str()); + return QString::fromUtf8(details.name.c_str()) ; if (role == Qt::TextColorRole) { @@ -1327,7 +1327,7 @@ void RetroshareDirModel::getFilePaths(const QModelIndexList &list, std::listgetChatLobbyInfo(chatId.toLobbyId(),lobby)) - return ; + if (! rsMsgs->getChatLobbyInfo(chatId.toLobbyId(),lobby)) + return; QTextCursor cursor = ui->chatTextEdit->textCursor(); @@ -1096,8 +1096,7 @@ void ChatWidget::updateStatusTyping() void ChatWidget::updateLenOfChatTextEdit() { - if(sendingBlocked) - return; + if(sendingBlocked) return; QTextEdit *chatWidget = ui->chatTextEdit; QString text; diff --git a/retroshare-gui/src/gui/chat/PopupDistantChatDialog.cpp b/retroshare-gui/src/gui/chat/PopupDistantChatDialog.cpp index bfc961dad..4992b5ff5 100644 --- a/retroshare-gui/src/gui/chat/PopupDistantChatDialog.cpp +++ b/retroshare-gui/src/gui/chat/PopupDistantChatDialog.cpp @@ -167,7 +167,7 @@ void PopupDistantChatDialog::closeEvent(QCloseEvent *e) PopupChatDialog::closeEvent(e) ; } -QString PopupDistantChatDialog::getPeerName(const ChatId &/*id*/) const +QString PopupDistantChatDialog::getPeerName(const ChatId& /*id*/) const { DistantChatPeerInfo tinfo; diff --git a/retroshare-gui/src/gui/common/AvatarWidget.cpp b/retroshare-gui/src/gui/common/AvatarWidget.cpp index 1b8378bf1..2224b537c 100644 --- a/retroshare-gui/src/gui/common/AvatarWidget.cpp +++ b/retroshare-gui/src/gui/common/AvatarWidget.cpp @@ -179,8 +179,8 @@ void AvatarWidget::refreshStatus() { uint32_t status = 0; - if(mId.isNotSet()) - return ; + if (mId.isNotSet()) + return; if (mFlag.isOwnId) { diff --git a/retroshare-gui/src/gui/common/GroupFlagsWidget.cpp b/retroshare-gui/src/gui/common/GroupFlagsWidget.cpp index 9a24c1300..d9d61043b 100644 --- a/retroshare-gui/src/gui/common/GroupFlagsWidget.cpp +++ b/retroshare-gui/src/gui/common/GroupFlagsWidget.cpp @@ -153,7 +153,7 @@ QString GroupFlagsWidget::groupInfoString(FileStorageFlags flags, const QList:/images/logo/logo_16.png:/images/logo/logo_16.png + + 0 + + + 0 + + + 0 + + + 0 + 6 0 - - 0 - @@ -35,7 +44,6 @@ QFrame::Plain - stabWidget diff --git a/retroshare-gui/src/gui/connect/ConnectFriendWizard.cpp b/retroshare-gui/src/gui/connect/ConnectFriendWizard.cpp index f995029ee..20656567a 100755 --- a/retroshare-gui/src/gui/connect/ConnectFriendWizard.cpp +++ b/retroshare-gui/src/gui/connect/ConnectFriendWizard.cpp @@ -627,6 +627,7 @@ bool ConnectFriendWizard::validateCurrentPage() switch ((Page) currentId()) { case Page_Intro: + case Page_WebMail: break; case Page_Text: { diff --git a/retroshare-gui/src/gui/elastic/graphwidget.cpp b/retroshare-gui/src/gui/elastic/graphwidget.cpp index dd32051da..bb1f9ffb8 100644 --- a/retroshare-gui/src/gui/elastic/graphwidget.cpp +++ b/retroshare-gui/src/gui/elastic/graphwidget.cpp @@ -284,8 +284,8 @@ static void convolveWithGaussian(double *forceMap,unsigned int S,int /*s*/) unsigned long nn[2] = {S,S}; fourn(&forceMap[-1],&nn[-1],2,1) ; - for(unsigned int i=0;igetMessage(mMsgId, mi)) return; - /* get peer Id */ + /* get peer Id */ - if(mi.msgflags & RS_MSG_SIGNED) - avatar->setGxsId(mi.rsgxsid_srcId); - else - avatar->setId(ChatId(mi.rspeerid_srcId)); + if (mi.msgflags & RS_MSG_SIGNED) + avatar->setGxsId(mi.rsgxsid_srcId) ; + else + avatar->setId(ChatId(mi.rspeerid_srcId)) ; QString title; QString srcName; diff --git a/retroshare-gui/src/gui/feeds/MsgItem.ui b/retroshare-gui/src/gui/feeds/MsgItem.ui index ecf475f4e..b53cc3b26 100644 --- a/retroshare-gui/src/gui/feeds/MsgItem.ui +++ b/retroshare-gui/src/gui/feeds/MsgItem.ui @@ -7,10 +7,10 @@ 0 0 643 - 140 + 146 - + 1 @@ -104,11 +104,20 @@ QFrame::Sunken - + - - - + + + + 0 + + + 0 + + + 0 + + 0 @@ -151,7 +160,7 @@ - + Qt::Horizontal @@ -196,7 +205,7 @@ - + @@ -221,7 +230,7 @@ - + Qt::Horizontal @@ -320,7 +329,7 @@ - + diff --git a/retroshare-gui/src/gui/groups/CreateGroup.cpp b/retroshare-gui/src/gui/groups/CreateGroup.cpp index 913b86a38..5756e7946 100644 --- a/retroshare-gui/src/gui/groups/CreateGroup.cpp +++ b/retroshare-gui/src/gui/groups/CreateGroup.cpp @@ -45,10 +45,10 @@ CreateGroup::CreateGroup(const RsNodeGroupId &groupId, QWidget *parent) mGroupId = groupId; - if(!mGroupId.isNull()) - ui.groupId_LE->setText(QString::fromStdString(mGroupId.toStdString())) ; - else - ui.groupId_LE->setText(tr("To be defined")) ; + if (!mGroupId.isNull()) + ui.groupId_LE->setText(QString::fromStdString(mGroupId.toStdString())); + else + ui.groupId_LE->setText(tr("To be defined")); /* Initialize friends list */ ui.friendList->setHeaderText(tr("Friends")); diff --git a/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp b/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp index 6a9c14bc0..0d07d4d0b 100644 --- a/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp +++ b/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp @@ -203,22 +203,22 @@ GxsForumThreadWidget::GxsForumThreadWidget(const RsGxsGroupId &forumId, QWidget setGroupId(forumId); - ui->threadTreeWidget->installEventFilter(this); + ui->threadTreeWidget->installEventFilter(this) ; - ui->postText->clear(); - ui->by_label->setId(RsGxsId()); - ui->time_label->clear() ; - ui->lineRight->hide() ; - ui->lineLeft->hide() ; - ui->by_text_label->hide() ; - ui->by_label->hide() ; - ui->postText->setImageBlockWidget(ui->imageBlockWidget); - ui->postText->resetImagesStatus(Settings->getForumLoadEmbeddedImages()) ; + ui->postText->clear() ; + ui->by_label->setId(RsGxsId()) ; + ui->time_label->clear(); + ui->lineRight->hide(); + ui->lineLeft->hide(); + ui->by_text_label->hide(); + ui->by_label->hide(); + ui->postText->setImageBlockWidget(ui->imageBlockWidget) ; + ui->postText->resetImagesStatus(Settings->getForumLoadEmbeddedImages()); - ui->subscribeToolButton->setToolTip(tr("

Subscribing to the forum will gather \ - available posts from your subscribed friends, and make the \ - forum visible to all other friends.

Afterwards you can unsubscribe from the context menu of the forum list at left.

")); - ui->threadTreeWidget->enableColumnCustomize(true); + ui->subscribeToolButton->setToolTip(tr( "

Subscribing to the forum will gather \ + available posts from your subscribed friends, and make the \ + forum visible to all other friends.

Afterwards you can unsubscribe from the context menu of the forum list at left.

")); + ui->threadTreeWidget->enableColumnCustomize(true); } GxsForumThreadWidget::~GxsForumThreadWidget() @@ -1379,12 +1379,12 @@ void GxsForumThreadWidget::insertMessage() /* blank text, incase we get nothing */ ui->postText->clear(); - ui->by_label->setId(RsGxsId()); - ui->time_label->clear() ; - ui->lineRight->hide() ; - ui->lineLeft->hide() ; - ui->by_text_label->hide() ; - ui->by_label->hide() ; + ui->by_label->setId(RsGxsId()) ; + ui->time_label->clear(); + ui->lineRight->hide(); + ui->lineLeft->hide(); + ui->by_text_label->hide(); + ui->by_label->hide(); /* request Post */ RsGxsGrpMsgIdPair msgId = std::make_pair(groupId(), mThreadId); @@ -1441,28 +1441,27 @@ void GxsForumThreadWidget::insertMessageData(const RsGxsForumMsg &msg) } ui->time_label->setText(DateTime::formatLongDateTime(msg.mMeta.mPublishTs)); - ui->by_label->setId(msg.mMeta.mAuthorId) ; + ui->by_label->setId(msg.mMeta.mAuthorId); + ui->lineRight->show(); + ui->lineLeft->show(); + ui->by_text_label->show(); + ui->by_label->show(); - ui->lineRight->show() ; - ui->lineLeft->show() ; - ui->by_text_label->show() ; - ui->by_label->show() ; + if(redacted) + { + QString extraTxt = tr( "

The author of this message (with ID %1) is banned.").arg(QString::fromStdString(msg.mMeta.mAuthorId.toStdString())) ; + extraTxt += tr( "

  • Messages from this author are not forwarded.
  • ") ; + extraTxt += tr( "
  • Messages from this author are replaced by this text.
") ; + extraTxt += tr( "

You can force the visibility and forwarding of messages by setting a different opinion for that Id in People's tab.

") ; - if(redacted) - { - QString extraTxt = tr("

The author of this message (with ID %1) is banned.").arg(QString::fromStdString(msg.mMeta.mAuthorId.toStdString())) ; - extraTxt += tr("

  • Messages from this author are not forwarded.
  • ") ; - extraTxt += tr("
  • Messages from this author are replaced by this text.
") ; - extraTxt += tr("

You can force the visibility and forwarding of messages by setting a different opinion for that Id in People's tab.

") ; - - ui->postText->setHtml(extraTxt); - } - else - { - QString extraTxt = RsHtml().formatText(ui->postText->document(), QString::fromUtf8(msg.mMsg.c_str()), RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS); - ui->postText->setHtml(extraTxt); - } - //ui->threadTitle->setText(QString::fromUtf8(msg.mMeta.mMsgName.c_str())); + ui->postText->setHtml(extraTxt) ; + } + else + { + QString extraTxt = RsHtml().formatText(ui->postText->document(), QString::fromUtf8(msg.mMsg.c_str()), RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS); + ui->postText->setHtml(extraTxt); + } + // ui->threadTitle->setText(QString::fromUtf8(msg.mMeta.mMsgName.c_str())); } void GxsForumThreadWidget::previousMessage() diff --git a/retroshare-gui/src/gui/msgs/MessageComposer.cpp b/retroshare-gui/src/gui/msgs/MessageComposer.cpp index a190e9c3e..41d019a8d 100644 --- a/retroshare-gui/src/gui/msgs/MessageComposer.cpp +++ b/retroshare-gui/src/gui/msgs/MessageComposer.cpp @@ -413,8 +413,8 @@ void MessageComposer::processSettings(bool bLoad) ui.contactsdockWidget->setVisible(Settings->value("ContactSidebar", true).toBool()); // state of splitter - ui.splitter->restoreState(Settings->value("Splitter").toByteArray()); - ui.splitter_2->restoreState(Settings->value("Splitter2").toByteArray()); + ui.messageSplitter->restoreState(Settings->value("Splitter").toByteArray()); + ui.centralwidgetHSplitter->restoreState(Settings->value("Splitter2").toByteArray()); // state of filter combobox int index = Settings->value("ShowType", 0).toInt(); @@ -431,8 +431,8 @@ void MessageComposer::processSettings(bool bLoad) Settings->setValue("ContactSidebar", ui.contactsdockWidget->isVisible()); // state of splitter - Settings->setValue("Splitter", ui.splitter->saveState()); - Settings->setValue("Splitter2", ui.splitter_2->saveState()); + Settings->setValue("Splitter", ui.messageSplitter->saveState()); + Settings->setValue("Splitter2", ui.centralwidgetHSplitter->saveState()); // state of filter combobox Settings->setValue("ShowType", ui.filterComboBox->currentIndex()); @@ -887,7 +887,7 @@ void MessageComposer::calculateTitle() setWindowTitle(tr("Compose") + ": " + misc::removeNewLine(ui.titleEdit->text())); } -static void calculateGroupsOfSslIds(const std::list &existingGroupInfos, std::list &checkSslIds, std::list &checkGroupIds) +/*static void calculateGroupsOfSslIds(const std::list &existingGroupInfos, std::list &checkSslIds, std::list &checkGroupIds) { checkGroupIds.clear(); @@ -973,6 +973,7 @@ static void calculateGroupsOfSslIds(const std::list &existingGroupI checkGroupIds.push_back(groupInfoIt->id); } } +*/ MessageComposer *MessageComposer::newMsg(const std::string &msgId /* = ""*/) { @@ -2634,10 +2635,11 @@ void MessageComposer::addRecommend() if (sslIds.empty() && gxsIds.empty()) return; - for(std::set ::iterator it = sslIds.begin(); it != sslIds.end(); ++it) - addRecipient(CC, *it); - for (std::set::const_iterator it = gxsIds.begin(); it != gxsIds.end(); ++it) - addRecipient(TO, *it); + for( std::set ::iterator it = sslIds.begin(); it != sslIds.end(); ++it) + addRecipient(CC, *it) ; + + for( std::set::const_iterator it = gxsIds.begin(); it != gxsIds.end(); ++it) + addRecipient(TO, *it) ; QString text = buildRecommendHtml(sslIds); ui.msgText->textCursor().insertHtml(text); diff --git a/retroshare-gui/src/gui/msgs/MessageComposer.ui b/retroshare-gui/src/gui/msgs/MessageComposer.ui index 29a47f9e1..1d8813aa8 100644 --- a/retroshare-gui/src/gui/msgs/MessageComposer.ui +++ b/retroshare-gui/src/gui/msgs/MessageComposer.ui @@ -6,8 +6,8 @@ 0 0 - 935 - 706 + 936 + 714
@@ -18,9 +18,9 @@ :/images/folder-draft.png:/images/folder-draft.png - + - + Qt::Horizontal @@ -59,7 +59,7 @@ Address list: - + 0 @@ -110,9 +110,9 @@ - + - + @@ -155,7 +155,7 @@ - + @@ -176,12 +176,12 @@
- + Qt::Vertical - + 2 @@ -199,7 +199,7 @@ QFrame::Sunken - + 6 @@ -213,7 +213,7 @@ 6 - + 1 @@ -789,7 +789,7 @@ QFrame::Box - + 6 @@ -866,9 +866,9 @@ border-image: url(:/images/closepressed.png)
- + - + @@ -1120,8 +1120,8 @@ border-image: url(:/images/closepressed.png) 0 0 - 935 - 21 + 936 + 19 @@ -1237,17 +1237,17 @@ border-image: url(:/images/closepressed.png) QTextEdit
gui/common/MimeTextEdit.h
+ + GxsIdChooser + QComboBox +
gui/gxs/GxsIdChooser.h
+
FriendSelectionWidget QWidget
gui/common/FriendSelectionWidget.h
1
- - GxsIdChooser - QComboBox -
gui/gxs/GxsIdChooser.h
-
titleEdit @@ -1261,8 +1261,8 @@ border-image: url(:/images/closepressed.png) hashBox - + diff --git a/retroshare-gui/src/gui/settings/AddFileAssociationDialog.h b/retroshare-gui/src/gui/settings/AddFileAssociationDialog.h index b247e8762..edda90013 100755 --- a/retroshare-gui/src/gui/settings/AddFileAssociationDialog.h +++ b/retroshare-gui/src/gui/settings/AddFileAssociationDialog.h @@ -42,7 +42,7 @@ public: //! if (onlyEdit == true), user woll not be able to change file type, //! only command (used for editing existing commands) AddFileAssociationDialog( bool onlyEdit = false, QWidget *parent = 0 ) ; - virtual ~AddFileAssociationDialog(){}; + virtual ~AddFileAssociationDialog(){} void setFileType(QString ft); void setCommand(QString cmd); diff --git a/retroshare-gui/src/gui/settings/FileAssociationsPage.cpp b/retroshare-gui/src/gui/settings/FileAssociationsPage.cpp index e1231c55b..95bd33cf1 100755 --- a/retroshare-gui/src/gui/settings/FileAssociationsPage.cpp +++ b/retroshare-gui/src/gui/settings/FileAssociationsPage.cpp @@ -326,7 +326,7 @@ FileAssociationsPage::addNewItemToTable(int row, int column, void FileAssociationsPage::testButtonClicked() { - AddFileAssociationDialog afad(this);// = new AddFileAssotiationDialog(); + AddFileAssociationDialog afad(true, this);// = new AddFileAssotiationDialog(); // commented code below is a test for // AddFileAssotiationDialog::loadSystemDefaultCommand(QString ft) method diff --git a/retroshare-gui/src/gui/settings/RSPermissionMatrixWidget.cpp b/retroshare-gui/src/gui/settings/RSPermissionMatrixWidget.cpp index fe20584d8..8de51f13d 100644 --- a/retroshare-gui/src/gui/settings/RSPermissionMatrixWidget.cpp +++ b/retroshare-gui/src/gui/settings/RSPermissionMatrixWidget.cpp @@ -103,13 +103,12 @@ void RSPermissionMatrixWidget::mousePressEvent(QMouseEvent *e) { std::cerr << "Peer id: " << peer_id << ", service: " << service_id << std::endl; - // make sure the service is not globally disabled + // Make sure the service is not globally disabled - RsServicePermissions serv_perms ; - rsServiceControl->getServicePermissions(service_id,serv_perms) ; + RsServicePermissions serv_perms; + rsServiceControl->getServicePermissions(service_id,serv_perms); - if(!serv_perms.mDefaultAllowed) - return ; + if (!serv_perms.mDefaultAllowed) return; switchPermission(service_id,peer_id) ; update() ; @@ -335,7 +334,7 @@ void RSPermissionMatrixWidget::paintEvent(QPaintEvent *) int X = matrix_start_x + S*fCOL_SIZE/2 - 2 + i*S*fCOL_SIZE - text_width/2; int height_index = 0 ; - while(last_width[height_index] > X-5 && height_index < last_width.size()-1) + while(last_width[height_index] > X-5 && height_index < ((int)last_width.size()-1) ) ++height_index ; int Y = S*fMATRIX_START_Y - S*fICON_SIZE_Y - 2 - line_height * height_index; diff --git a/retroshare-gui/src/gui/settings/ServerPage.cpp b/retroshare-gui/src/gui/settings/ServerPage.cpp index 9773570bb..8ece6d7cd 100755 --- a/retroshare-gui/src/gui/settings/ServerPage.cpp +++ b/retroshare-gui/src/gui/settings/ServerPage.cpp @@ -231,7 +231,7 @@ void ServerPage::load() ui.iconlabel_upnp->show(); ui.label_nat->show(); - ui.hiddenMode_LB->hide() ; + ui.textlabel_hiddenMode->hide() ; ui.iconlabel_hiddenMode->hide() ; /* set net mode */ @@ -888,7 +888,7 @@ void ServerPage::loadHiddenNode() ui.iconlabel_upnp->hide(); ui.label_nat->hide(); - ui.hiddenMode_LB->show(); + ui.textlabel_hiddenMode->show(); ui.iconlabel_hiddenMode->show() ; ui.iconlabel_hiddenMode->setPixmap(QPixmap(":/images/ledon1.png")); diff --git a/retroshare-gui/src/gui/settings/ServerPage.ui b/retroshare-gui/src/gui/settings/ServerPage.ui index 34a136302..27c6c9a6b 100755 --- a/retroshare-gui/src/gui/settings/ServerPage.ui +++ b/retroshare-gui/src/gui/settings/ServerPage.ui @@ -10,7 +10,7 @@ 568 - + 6 @@ -26,15 +26,15 @@ - 0 + 2 - + Network Configuration - + - + @@ -63,7 +63,7 @@ - + Local Address @@ -84,7 +84,7 @@ - + 50 @@ -97,7 +97,7 @@ - + 50 @@ -145,7 +145,7 @@ - + Port: @@ -171,7 +171,7 @@ - + Port: @@ -249,7 +249,7 @@ - + 6 @@ -285,7 +285,7 @@ - + 6 @@ -346,7 +346,7 @@ - + 6 @@ -379,7 +379,7 @@ - + 6 @@ -403,7 +403,7 @@ - + 75 @@ -427,16 +427,16 @@ - + - + Known / Previous IPs: - + Qt::Horizontal @@ -511,13 +511,12 @@ behind a firewall or a VPN. allowIpDeterminationCB IPServersLV ipAddressList - - + IP Filters - + @@ -526,7 +525,7 @@ behind a firewall or a VPN. - + 0 @@ -701,13 +700,13 @@ behind a firewall or a VPN. - + Manual input - + - + @@ -771,23 +770,23 @@ behind a firewall or a VPN. - + Hidden Service Configuration - + - + Outgoing Connections - + - + - + - + Tor Socks Proxy @@ -812,7 +811,7 @@ behind a firewall or a VPN. - + @@ -830,7 +829,7 @@ behind a firewall or a VPN. - + <html><head/><body><p>This led is green when the port listen on the left is active on your computer. It does not</p><p>mean that your Retroshare traffic transits though Tor. It will do so only if </p><p>you connect to Hidden nodes, or if you are running a Hidden node yourself.</p></body></html> @@ -844,7 +843,7 @@ behind a firewall or a VPN. - + 0 @@ -852,9 +851,9 @@ behind a firewall or a VPN. 0 - + - + I2P Socks Proxy @@ -879,7 +878,7 @@ behind a firewall or a VPN. - + @@ -891,7 +890,7 @@ behind a firewall or a VPN. - + <html><head/><body><p>This led is green when the port listen on the left is active on your computer. It does not</p><p>mean that your Retroshare traffic transits though I2P. It will do so only if </p><p>you connect to Hidden nodes, or if you are running a Hidden node yourself.</p></body></html> @@ -905,7 +904,7 @@ behind a firewall or a VPN. - + 16777215 @@ -943,9 +942,9 @@ You can connect to Hidden Nodes, even if you are running a standard Node, so why Incoming Service Connections - + - + @@ -957,7 +956,7 @@ You can connect to Hidden Nodes, even if you are running a standard Node, so why - + @@ -988,7 +987,7 @@ You can connect to Hidden Nodes, even if you are running a standard Node, so why - + Local Address @@ -1009,7 +1008,7 @@ You can connect to Hidden Nodes, even if you are running a standard Node, so why - + @@ -1041,9 +1040,9 @@ You can connect to Hidden Nodes, even if you are running a standard Node, so why - + - + Expected Configuration: @@ -1083,7 +1082,7 @@ You can connect to Hidden Nodes, even if you are running a standard Node, so why - + 0 @@ -1117,7 +1116,7 @@ If you have issues connecting over Tor check the Tor logs too. - + Qt::Vertical