diff --git a/build_scripts/Windows-msys2/build/build.bat b/build_scripts/Windows-msys2/build/build.bat index 97d6e5853..d15e5babc 100644 --- a/build_scripts/Windows-msys2/build/build.bat +++ b/build_scripts/Windows-msys2/build/build.bat @@ -18,7 +18,7 @@ if errorlevel 2 exit /B 2 if errorlevel 1 goto error_env :: Install needed things -%EnvMSYS2Cmd% "pacman --noconfirm --needed -S make git mingw-w64-%RsMSYS2Architecture%-toolchain mingw-w64-%RsMSYS2Architecture%-qt5 mingw-w64-%RsMSYS2Architecture%-miniupnpc mingw-w64-%RsMSYS2Architecture%-sqlcipher mingw-w64-%RsMSYS2Architecture%-libmicrohttpd mingw-w64-%RsMSYS2Architecture%-xapian-core" +%EnvMSYS2Cmd% "pacman --noconfirm --needed -S make git mingw-w64-%RsMSYS2Architecture%-toolchain mingw-w64-%RsMSYS2Architecture%-qt5 mingw-w64-%RsMSYS2Architecture%-miniupnpc mingw-w64-%RsMSYS2Architecture%-sqlcipher mingw-w64-%RsMSYS2Architecture%-libmicrohttpd mingw-w64-%RsMSYS2Architecture%-xapian-core mingw-w64-%RsMSYS2Architecture%-cmake mingw-w64-%RsMSYS2Architecture%-rapidjson" :: Plugins if "%ParamPlugins%"=="1" %EnvMSYS2Cmd% "pacman --noconfirm --needed -S mingw-w64-%RsMSYS2Architecture%-speex mingw-w64-%RsMSYS2Architecture%-speexdsp mingw-w64-%RsMSYS2Architecture%-curl mingw-w64-%RsMSYS2Architecture%-libxslt mingw-w64-%RsMSYS2Architecture%-opencv mingw-w64-%RsMSYS2Architecture%-ffmpeg" diff --git a/build_scripts/Windows-msys2/build/pack.bat b/build_scripts/Windows-msys2/build/pack.bat index 5be0ac56e..e8c9761bc 100644 --- a/build_scripts/Windows-msys2/build/pack.bat +++ b/build_scripts/Windows-msys2/build/pack.bat @@ -99,6 +99,7 @@ copy nul "%RsDeployPath%\portable" %Quite% echo copy binaries copy "%RsBuildPath%\retroshare-gui\src\%RsBuildConfig%\RetroShare*.exe" "%RsDeployPath%" %Quite% copy "%RsBuildPath%\retroshare-nogui\src\%RsBuildConfig%\retroshare*-nogui.exe" "%RsDeployPath%" %Quite% +copy "%RsBuildPath%\retroshare-service\src\%RsBuildConfig%\retroshare*-service.exe" "%RsDeployPath%" %Quite% echo copy extensions for /D %%D in ("%RsBuildPath%\plugins\*") do ( @@ -127,6 +128,9 @@ if exist "%QtSharePath%\plugins\styles\qwindowsvistastyle.dll" ( copy "%QtSharePath%\plugins\imageformats\*.dll" "%RsDeployPath%\imageformats" %Quite% del /Q "%RsDeployPath%\imageformats\*d?.dll" %Quite% +for %%D in ("%RsDeployPath%\imageformats\*.dll") do ( + call :copy_dependencies "%%D" "%RsDeployPath%" +) echo copy qss xcopy /S "%SourcePath%\retroshare-gui\src\qss" "%RsDeployPath%\qss" %Quite% diff --git a/libretroshare/src/chat/p3chatservice.cc b/libretroshare/src/chat/p3chatservice.cc index e446bfdef..67ca8f210 100644 --- a/libretroshare/src/chat/p3chatservice.cc +++ b/libretroshare/src/chat/p3chatservice.cc @@ -341,7 +341,7 @@ bool p3ChatService::sendChat(ChatId destination, std::string msg) message.incoming = false; message.online = true; - if(!isOnline(vpid)) + if(!isOnline(vpid) && !destination.isDistantChatId()) { message.online = false; RsServer::notify()->notifyChatMessage(message); @@ -352,11 +352,15 @@ bool p3ChatService::sendChat(ChatId destination, std::string msg) RsGxsTransId tId = RSRandom::random_u64(); +#ifdef SUSPENDED_CODE + // this part of the code was formerly used to send the traffic over GxsTransport. The problem is that + // gxstunnel takes care of reaching the peer already, so GxsTransport would only be needed when the + // current peer is offline. So we need to fin a way to quickly push the items to friends when quitting RS. + if(destination.isDistantChatId()) { RS_STACK_MUTEX(mDGMutex); - DIDEMap::const_iterator it = - mDistantGxsMap.find(destination.toDistantChatId()); + DIDEMap::const_iterator it = mDistantGxsMap.find(destination.toDistantChatId()); if(it != mDistantGxsMap.end()) { const DistantEndpoints& de(it->second); @@ -371,6 +375,7 @@ bool p3ChatService::sendChat(ChatId destination, std::string msg) << "chat id in mDistantGxsMap this is unxpected!" << std::endl; } +#endif // peer is offline, add to outgoing list { @@ -412,10 +417,10 @@ bool p3ChatService::sendChat(ChatId destination, std::string msg) RsServer::notify()->notifyChatMessage(message); - // cyril: history is temporarily diabled for distant chat, since we need to store the full tunnel ID, but then + // cyril: history is temporarily disabled for distant chat, since we need to store the full tunnel ID, but then // at loading time, the ID is not known so that chat window shows 00000000 as a peer. - if(!message.chat_id.isDistantChatId()) + //if(!message.chat_id.isDistantChatId()) mHistoryMgr->addMessage(message); checkSizeAndSendMessage(ci); @@ -871,10 +876,6 @@ bool p3ChatService::handleRecvChatMsgItem(RsChatMsgItem *& ci) cm.online = true; RsServer::notify()->notifyChatMessage(cm); - // cyril: history is temporarily diabled for distant chat, since we need to store the full tunnel ID, but then - // at loading time, the ID is not known so that chat window shows 00000000 as a peer. - - if(!cm.chat_id.isDistantChatId()) mHistoryMgr->addMessage(cm); return true ; diff --git a/libretroshare/src/gxstunnel/p3gxstunnel.cc b/libretroshare/src/gxstunnel/p3gxstunnel.cc index ba8bcede2..5f75c633b 100644 --- a/libretroshare/src/gxstunnel/p3gxstunnel.cc +++ b/libretroshare/src/gxstunnel/p3gxstunnel.cc @@ -112,6 +112,8 @@ int p3GxsTunnelService::tick() #endif flush() ; + + rstime::rs_usleep(1000*500); return 0 ; } @@ -1294,8 +1296,7 @@ bool p3GxsTunnelService::locked_sendEncryptedTunnelData(RsGxsTunnelItem *item) } if(it->second.status != RS_GXS_TUNNEL_STATUS_CAN_TALK) { - std::cerr << "(EE) Cannot talk to tunnel id " << tunnel_id - << ". Tunnel status is: " << it->second.status << std::endl; + std::cerr << "(EE) Cannot talk to tunnel id " << tunnel_id << ". Tunnel status is: " << it->second.status << std::endl; return false; } diff --git a/libretroshare/src/pqi/p3historymgr.cc b/libretroshare/src/pqi/p3historymgr.cc index fba1711ce..b546da76c 100644 --- a/libretroshare/src/pqi/p3historymgr.cc +++ b/libretroshare/src/pqi/p3historymgr.cc @@ -48,10 +48,13 @@ p3HistoryMgr::p3HistoryMgr() mPublicEnable = false; mPrivateEnable = true; mLobbyEnable = true; + mDistantEnable = true; mPublicSaveCount = 0; mLobbySaveCount = 0; mPrivateSaveCount = 0; + mDistantSaveCount = 0; + mLastCleanTime = 0 ; mMaxStorageDurationSeconds = 10*86400 ; // store for 10 days at most. @@ -99,11 +102,25 @@ void p3HistoryMgr::addMessage(const ChatMessage& cm) enabled = true; } - if(cm.chat_id.isDistantChatId()) + if(cm.chat_id.isDistantChatId()&& mDistantEnable == true) { DistantChatPeerInfo dcpinfo; if (rsMsgs->getDistantChatStatus(cm.chat_id.toDistantChatId(), dcpinfo)) - peerName = cm.chat_id.toPeerId().toStdString(); + { + RsIdentityDetails det; + RsGxsId writer_id = cm.incoming?(dcpinfo.to_id):(dcpinfo.own_id); + + if(rsIdentity->getIdDetails(writer_id,det)) + peerName = det.mNickname; + else + peerName = writer_id.toStdString(); + } + else + { + RsErr() << "Cannot retrieve friend name for distant chat " << cm.chat_id.toDistantChatId() << std::endl; + peerName = ""; + } + enabled = true; } @@ -258,6 +275,10 @@ bool p3HistoryMgr::saveList(bool& cleanup, std::list& saveData) kv.key = "LOBBY_ENABLE"; kv.value = mLobbyEnable ? "TRUE" : "FALSE"; vitem->tlvkvs.pairs.push_back(kv); + + kv.key = "DISTANT_ENABLE"; + kv.value = mDistantEnable ? "TRUE" : "FALSE"; + vitem->tlvkvs.pairs.push_back(kv); kv.key = "MAX_STORAGE_TIME"; rs_sprintf(kv.value,"%d",mMaxStorageDurationSeconds) ; @@ -274,6 +295,10 @@ bool p3HistoryMgr::saveList(bool& cleanup, std::list& saveData) kv.key = "PRIVATE_SAVECOUNT"; rs_sprintf(kv.value, "%lu", mPrivateSaveCount); vitem->tlvkvs.pairs.push_back(kv); + + kv.key = "DISTANT_SAVECOUNT"; + rs_sprintf(kv.value, "%lu", mDistantSaveCount); + vitem->tlvkvs.pairs.push_back(kv); saveData.push_back(vitem); saveCleanupList.push_back(vitem); @@ -343,6 +368,11 @@ bool p3HistoryMgr::loadList(std::list& load) mLobbyEnable = (kit->value == "TRUE") ? true : false; continue; } + + if (kit->key == "DISTANT_ENABLE") { + mDistantEnable = (kit->value == "TRUE") ? true : false; + continue; + } if (kit->key == "MAX_STORAGE_TIME") { uint32_t val ; @@ -367,6 +397,10 @@ bool p3HistoryMgr::loadList(std::list& load) mLobbySaveCount = atoi(kit->value.c_str()); continue; } + if (kit->key == "DISTANT_SAVECOUNT") { + mDistantSaveCount = atoi(kit->value.c_str()); + continue; + } } delete (*it); @@ -444,7 +478,7 @@ bool p3HistoryMgr::getMessages(const ChatId &chatId, std::list &msgs if (chatId.isLobbyId() && mLobbyEnable == true) { enabled = true; } - if (chatId.isDistantChatId() && mPrivateEnable == true) { + if (chatId.isDistantChatId() && mDistantEnable == true) { enabled = true; } @@ -586,6 +620,7 @@ bool p3HistoryMgr::getEnable(uint32_t chat_type) case RS_HISTORY_TYPE_PUBLIC : return mPublicEnable ; case RS_HISTORY_TYPE_LOBBY : return mLobbyEnable ; case RS_HISTORY_TYPE_PRIVATE: return mPrivateEnable ; + case RS_HISTORY_TYPE_DISTANT: return mDistantEnable ; default: std::cerr << "Unexpected value " << chat_type<< " in p3HistoryMgr::getEnable(): this is a bug." << std::endl; return 0 ; @@ -623,6 +658,9 @@ void p3HistoryMgr::setEnable(uint32_t chat_type, bool enable) case RS_HISTORY_TYPE_PRIVATE: oldValue = mPrivateEnable ; mPrivateEnable = enable ; break ; + case RS_HISTORY_TYPE_DISTANT: oldValue = mDistantEnable ; + mDistantEnable = enable ; + break ; default: return; } diff --git a/libretroshare/src/pqi/p3historymgr.h b/libretroshare/src/pqi/p3historymgr.h index d18dc5a45..5f4ac0d98 100644 --- a/libretroshare/src/pqi/p3historymgr.h +++ b/libretroshare/src/pqi/p3historymgr.h @@ -82,10 +82,12 @@ private: bool mPublicEnable; bool mLobbyEnable; bool mPrivateEnable; + bool mDistantEnable; uint32_t mPublicSaveCount; uint32_t mLobbySaveCount; uint32_t mPrivateSaveCount; + uint32_t mDistantSaveCount; uint32_t mMaxStorageDurationSeconds ; rstime_t mLastCleanTime ; diff --git a/libretroshare/src/pqi/p3peermgr.cc b/libretroshare/src/pqi/p3peermgr.cc index b7902e181..e871e4ddd 100644 --- a/libretroshare/src/pqi/p3peermgr.cc +++ b/libretroshare/src/pqi/p3peermgr.cc @@ -1074,26 +1074,22 @@ bool p3PeerMgrIMPL::addFriend(const RsPeerId& input_id, const RsPgpId& input_gpg bool p3PeerMgrIMPL::addSslOnlyFriend( const RsPeerId& sslId, const RsPgpId& pgp_id, const RsPeerDetails& dt ) { - if(sslId.isNull()) + constexpr auto fname = __PRETTY_FUNCTION__; + const auto failure = [&](const std::string& err) { - RsErr() << __PRETTY_FUNCTION__ << " Cannot add a null " - << "ID as SSL-only friend " << std::endl; + RsErr() << fname << " " << err << std::endl; return false; - } + }; + + if(sslId.isNull()) + return failure("Cannot add a null ID as SSL-only friend"); if(pgp_id.isNull()) - { - RsErr() << __PRETTY_FUNCTION__ << " Cannot add as SSL-only friend a " - << "peer with null PGP" << std::endl; - return false; - } + return failure( " Cannot add as SSL-only friend a peer with null PGP"); if(sslId == getOwnId()) - { - RsErr() << __PRETTY_FUNCTION__ << " Cannot add yourself as SSL-only " - << "friend (id=" << sslId << ")" << std::endl; - return false; - } + return failure( "Cannot add yourself as SSL-only friend id:" + + sslId.toStdString() ); bool alreadySslFriend = false; peerState pstate; @@ -1116,13 +1112,10 @@ bool p3PeerMgrIMPL::addSslOnlyFriend( * PGP id we already know, to avoid nasty tricks with malevolently forged * short invites.*/ if(alreadySslFriend && pstate.gpg_id != pgp_id) - { - RsErr() << __PRETTY_FUNCTION__ << " Cannot SSL-only friend for " - << "a pre-existing friend with mismatching PGP-id " - << "known: " << pstate.gpg_id << " new: " << pgp_id - << std::endl; - return false; - } + return failure( "Cannot SSL-only friend for a pre-existing friend with " + "mismatching PGP-id known: " + + pstate.gpg_id.toStdString() + " new: " + + pgp_id.toStdString() ); /* It is very important to be expecially carefull setting * pstate.skip_pgp_signature_validation to true because this effectively @@ -1137,8 +1130,11 @@ bool p3PeerMgrIMPL::addSslOnlyFriend( * connection closed. * Instead if pstate.skip_pgp_signature_validation would have been * superficially set to true the PGP signature verification would have been - * skipped and the attacker connection would be accepted. */ - if(!AuthGPG::getAuthGPG()->isPgpPubKeyAvailable(pgp_id)) + * skipped and the attacker connection would be accepted. + * If the PGP key is available add it as full friend. */ + if(AuthGPG::getAuthGPG()->isPgpPubKeyAvailable(pgp_id)) + AuthGPG::getAuthGPG()->AllowConnection(pgp_id, true); + else pstate.skip_pgp_signature_validation = true; pstate.gpg_id = pgp_id; diff --git a/libretroshare/src/pqi/pqissl.cc b/libretroshare/src/pqi/pqissl.cc index a10e7853a..773c74e50 100644 --- a/libretroshare/src/pqi/pqissl.cc +++ b/libretroshare/src/pqi/pqissl.cc @@ -1078,7 +1078,7 @@ int pqissl::SSL_Connection_Complete() /* if we are passive - then accept! */ int err; - if (sslmode) + if (sslmode == PQISSL_ACTIVE) { #ifdef PQISSL_LOG_DEBUG rslog(RSL_DEBUG_BASIC, pqisslzone, "--------> Active Connect! Client side."); diff --git a/libretroshare/src/pqi/pqissludp.cc b/libretroshare/src/pqi/pqissludp.cc index f8fefc499..9700f7cdc 100644 --- a/libretroshare/src/pqi/pqissludp.cc +++ b/libretroshare/src/pqi/pqissludp.cc @@ -3,7 +3,8 @@ * * * libretroshare: retroshare core library * * * - * Copyright 2004-2006 by Robert Fernie * + * Copyright (C) 2004-2006 Robert Fernie * + * Copyright (C) 2015-2019 Gioacchino Mazzurco * * * * This program is free software: you can redistribute it and/or modify * * it under the terms of the GNU Lesser General Public License as * @@ -50,39 +51,22 @@ static const uint32_t PQI_SSLUDP_DEF_CONN_PERIOD = 300; /* 5 minutes? */ /********** PQI SSL UDP STUFF **************************************/ pqissludp::pqissludp(PQInterface *parent, p3LinkMgr *lm) : - pqissl(NULL, parent, lm), tou_bio(NULL),// listen_checktime(0), - mConnectPeriod(PQI_SSLUDP_DEF_CONN_PERIOD), mConnectFlags(0), - mConnectBandwidth(0) -{ - RS_STACK_MUTEX(mSslMtx); + pqissl(nullptr, parent, lm), tou_bio(nullptr), + mConnectPeriod(PQI_SSLUDP_DEF_CONN_PERIOD), mConnectFlags(0), + mConnectBandwidth(0), mConnectProxyAddr(), mConnectSrcAddr() {} - sockaddr_storage_clear(remote_addr); - sockaddr_storage_clear(mConnectProxyAddr); - sockaddr_storage_clear(mConnectSrcAddr); -} +/* + * No need to call reset() here as it will be called in the upper class, + * pqissludp::reset_locked() just reset a few members to 0 that (that will be + * deleted anyway when this destructor ends), so pqissl::reset_locked() that is + * called by in parent class destructor will do just fine. + * + * DISCLAIMER: do not double free tou_bio here, as it is implicitely freed + * by SSL_free(...) in pqissl::reset() + */ +pqissludp::~pqissludp() = default; -pqissludp::~pqissludp() -{ - rslog(RSL_ALERT, pqissludpzone, - "pqissludp::~pqissludp -> destroying pqissludp"); - - /* must call reset from here, so that the - * virtual functions will still work. - * -> as they stop working in base class destructor. - * - * This means that reset() will be called twice, but this should - * be harmless. - */ - stoplistening(); /* remove from p3proxy listenqueue */ - reset(); - - RS_STACK_MUTEX(mSslMtx); - - if (tou_bio) // this should be in the reset? - BIO_free(tou_bio); -} - int pqissludp::reset_locked() { /* reset for next time.*/ @@ -203,7 +187,7 @@ int pqissludp::Initiate_Connection() out += sockaddr_storage_tostring(remote_addr); out += " "; - if (sslmode) + if (sslmode == PQISSL_ACTIVE) { out += "ACTIVE Connect (SSL_Connect)"; } @@ -430,30 +414,6 @@ int pqissludp::net_internal_SSL_set_fd(SSL *ssl, int fd) return 1; } -int pqissludp::net_internal_fcntl_nonblock(int /*fd*/) -{ - rslog(RSL_DEBUG_BASIC, pqissludpzone, - "pqissludp::net_internal_fcntl_nonblock()"); - return 0; -} - - - // listen fns call the udpproxy. -int pqissludp::listen() -{ - rslog(RSL_DEBUG_BASIC, pqissludpzone, "pqissludp::listen() (NULLOP)"); - - return 1; //udpproxy->listen(); -} - -int pqissludp::stoplistening() -{ - rslog(RSL_DEBUG_BASIC, pqissludpzone, "pqissludp::stoplistening() (NULLOP)"); - - return 1; //udpproxy->stoplistening(); -} - - bool pqissludp::connect_parameter(uint32_t type, uint32_t value) { { diff --git a/libretroshare/src/pqi/pqissludp.h b/libretroshare/src/pqi/pqissludp.h index 9cc5e3b23..b716efb1e 100644 --- a/libretroshare/src/pqi/pqissludp.h +++ b/libretroshare/src/pqi/pqissludp.h @@ -3,7 +3,8 @@ * * * libretroshare: retroshare core library * * * - * Copyright 2004-2006 by Robert Fernie. * + * Copyright (C) 2004-2006 Robert Fernie * + * Copyright (C) 2015-2019 Gioacchino Mazzurco * * * * This program is free software: you can redistribute it and/or modify * * it under the terms of the GNU Lesser General Public License as * @@ -19,42 +20,31 @@ * along with this program. If not, see . * * * *******************************************************************************/ -#ifndef MRK_PQI_SSL_UDP_HEADER -#define MRK_PQI_SSL_UDP_HEADER - -// operating system specific network header. -#include "pqi/pqinetwork.h" +#pragma once #include #include #include "pqi/pqissl.h" +#include "pqi/pqinetwork.h" +#include "util/rsdebug.h" - /* So pqissludp is the special firewall breaking protocol. - * This class will implement the basics of streaming - * ssl over udp using a tcponudp library.... - * and a small extension to ssl. - */ -class pqissludp; -class cert; - -/* This provides a NetBinInterface, which is - * primarily inherited from pqissl. - * fns declared here are different -> all others are identical. +/** + * @brief pqissludp is the special NAT traversal protocol. + * This class will implement the basics of streaming ssl over udp using a + * tcponudp library. + * It provides a NetBinInterface, which is primarily inherited from pqissl. + * Some methods are override all others are identical. */ - class pqissludp: public pqissl { public: pqissludp(PQInterface *parent, p3LinkMgr *lm); + ~pqissludp() override; - virtual ~pqissludp(); - - // NetInterface. - // listen fns call the udpproxy. - virtual int listen(); - virtual int stoplistening(); + int listen() override { return 1; } + int stoplistening() override { return 1; } virtual bool connect_parameter(uint32_t type, uint32_t value); virtual bool connect_additional_address(uint32_t type, const struct sockaddr_storage &addr); @@ -83,20 +73,18 @@ protected: */ virtual int net_internal_close(int fd); virtual int net_internal_SSL_set_fd(SSL *ssl, int fd); - virtual int net_internal_fcntl_nonblock(int fd); + virtual int net_internal_fcntl_nonblock(int /*fd*/) { return 0; } private: BIO *tou_bio; // specific to ssludp. - //long listen_checktime; - uint32_t mConnectPeriod; uint32_t mConnectFlags; uint32_t mConnectBandwidth; struct sockaddr_storage mConnectProxyAddr; struct sockaddr_storage mConnectSrcAddr; -}; -#endif // MRK_PQI_SSL_UDP_HEADER + RS_SET_CONTEXT_DEBUG_LEVEL(2) +}; diff --git a/libretroshare/src/retroshare/rshistory.h b/libretroshare/src/retroshare/rshistory.h index eff72e237..16f942339 100644 --- a/libretroshare/src/retroshare/rshistory.h +++ b/libretroshare/src/retroshare/rshistory.h @@ -39,6 +39,7 @@ extern RsHistory *rsHistory; static const uint32_t RS_HISTORY_TYPE_PUBLIC = 0 ; static const uint32_t RS_HISTORY_TYPE_PRIVATE = 1 ; static const uint32_t RS_HISTORY_TYPE_LOBBY = 2 ; +static const uint32_t RS_HISTORY_TYPE_DISTANT = 3 ; class HistoryMsg { diff --git a/plugins/FeedReader/gui/FeedReaderDialog.ui b/plugins/FeedReader/gui/FeedReaderDialog.ui index 124f3a032..7c77717bb 100644 --- a/plugins/FeedReader/gui/FeedReaderDialog.ui +++ b/plugins/FeedReader/gui/FeedReaderDialog.ui @@ -39,14 +39,23 @@ - + + 0 + + + 0 + + + 0 + + 0 0 - + QFrame::Box @@ -54,7 +63,16 @@ QFrame::Sunken - + + 2 + + + 2 + + + 2 + + 2 @@ -160,6 +178,11 @@ + + StyledLabel + QLabel +
gui/common/StyledLabel.h
+
RSTreeWidget QTreeWidget @@ -171,11 +194,6 @@
gui/common/RSTabWidget.h
1
- - StyledLabel - QLabel -
gui/common/StyledLabel.h
-
diff --git a/retroshare-gui/src/gui/ChatLobbyWidget.ui b/retroshare-gui/src/gui/ChatLobbyWidget.ui index bc8da9d6b..134b50b9a 100644 --- a/retroshare-gui/src/gui/ChatLobbyWidget.ui +++ b/retroshare-gui/src/gui/ChatLobbyWidget.ui @@ -62,7 +62,7 @@ - :/icons/png/chat-lobbies.png + :/icons/png/chats.png true diff --git a/retroshare-gui/src/gui/FileTransfer/TransfersDialog.ui b/retroshare-gui/src/gui/FileTransfer/TransfersDialog.ui index f1685a5d5..d2e7a9ab6 100644 --- a/retroshare-gui/src/gui/FileTransfer/TransfersDialog.ui +++ b/retroshare-gui/src/gui/FileTransfer/TransfersDialog.ui @@ -62,7 +62,7 @@ - :/icons/png/filesharing.png + :/icons/png/fileshare.png true diff --git a/retroshare-gui/src/gui/FriendsDialog.ui b/retroshare-gui/src/gui/FriendsDialog.ui index 1ac4095cc..2ecd9772e 100644 --- a/retroshare-gui/src/gui/FriendsDialog.ui +++ b/retroshare-gui/src/gui/FriendsDialog.ui @@ -62,7 +62,7 @@ - :/icons/png/network.png + :/icons/png/network2.png true diff --git a/retroshare-gui/src/gui/Identity/IdDetailsDialog.cpp b/retroshare-gui/src/gui/Identity/IdDetailsDialog.cpp index e5aae3b49..ad0c261c9 100644 --- a/retroshare-gui/src/gui/Identity/IdDetailsDialog.cpp +++ b/retroshare-gui/src/gui/Identity/IdDetailsDialog.cpp @@ -17,6 +17,7 @@ * along with this program. If not, see . * * * *******************************************************************************/ +#include #include "IdDetailsDialog.h" #include "ui_IdDetailsDialog.h" @@ -53,6 +54,7 @@ IdDetailsDialog::IdDetailsDialog(const RsGxsGroupId& id, QWidget *parent) : mStateHelper->addWidget(IDDETAILSDIALOG_IDDETAILS, ui->lineEdit_GpgId); mStateHelper->addWidget(IDDETAILSDIALOG_IDDETAILS, ui->lineEdit_GpgName); mStateHelper->addWidget(IDDETAILSDIALOG_IDDETAILS, ui->lineEdit_Type); + mStateHelper->addWidget(IDDETAILSDIALOG_IDDETAILS, ui->lineEdit_Created); mStateHelper->addWidget(IDDETAILSDIALOG_IDDETAILS, ui->lineEdit_LastUsed); mStateHelper->addWidget(IDDETAILSDIALOG_IDDETAILS, ui->ownOpinion_CB); mStateHelper->addWidget(IDDETAILSDIALOG_IDDETAILS, ui->overallOpinion_TF); @@ -63,6 +65,7 @@ IdDetailsDialog::IdDetailsDialog(const RsGxsGroupId& id, QWidget *parent) : mStateHelper->addLoadPlaceholder(IDDETAILSDIALOG_IDDETAILS, ui->lineEdit_KeyId); mStateHelper->addLoadPlaceholder(IDDETAILSDIALOG_IDDETAILS, ui->lineEdit_GpgId); mStateHelper->addLoadPlaceholder(IDDETAILSDIALOG_IDDETAILS, ui->lineEdit_Type); + mStateHelper->addLoadPlaceholder(IDDETAILSDIALOG_IDDETAILS, ui->lineEdit_Created); mStateHelper->addLoadPlaceholder(IDDETAILSDIALOG_IDDETAILS, ui->lineEdit_LastUsed); mStateHelper->addLoadPlaceholder(IDDETAILSDIALOG_IDDETAILS, ui->lineEdit_GpgName); @@ -70,6 +73,7 @@ IdDetailsDialog::IdDetailsDialog(const RsGxsGroupId& id, QWidget *parent) : mStateHelper->addClear(IDDETAILSDIALOG_IDDETAILS, ui->lineEdit_KeyId); mStateHelper->addClear(IDDETAILSDIALOG_IDDETAILS, ui->lineEdit_GpgId); mStateHelper->addClear(IDDETAILSDIALOG_IDDETAILS, ui->lineEdit_Type); + mStateHelper->addClear(IDDETAILSDIALOG_IDDETAILS, ui->lineEdit_Created); mStateHelper->addClear(IDDETAILSDIALOG_IDDETAILS, ui->lineEdit_LastUsed); mStateHelper->addClear(IDDETAILSDIALOG_IDDETAILS, ui->lineEdit_GpgName); @@ -80,7 +84,7 @@ IdDetailsDialog::IdDetailsDialog(const RsGxsGroupId& id, QWidget *parent) : Settings->loadWidgetInformation(this); - ui->headerFrame->setHeaderImage(QPixmap(":/images/identity/identity_64.png")); + ui->headerFrame->setHeaderImage(QPixmap(":/icons/png/person.png")); ui->headerFrame->setHeaderText(tr("Person Details")); //connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(changeGroup())); @@ -178,8 +182,10 @@ void IdDetailsDialog::insertIdDetails(uint32_t token) ui->autoBanIdentities_CB->setVisible(!data.mPgpId.isNull()) ; ui->banoption_label->setVisible(!data.mPgpId.isNull()) ; - time_t now = time(NULL) ; - ui->lineEdit_LastUsed->setText(getHumanReadableDuration(now - data.mLastUsageTS)) ; + ui->lineEdit_Created->setText(QDateTime::fromMSecsSinceEpoch(qint64(1000)*data.mMeta.mPublishTs).toString(Qt::SystemLocaleShortDate)); + + time_t now = time(NULL) ; + ui->lineEdit_LastUsed->setText(getHumanReadableDuration(now - data.mLastUsageTS)) ; QPixmap pixmap; diff --git a/retroshare-gui/src/gui/Identity/IdDetailsDialog.ui b/retroshare-gui/src/gui/Identity/IdDetailsDialog.ui index 73e1006f0..3faad4076 100644 --- a/retroshare-gui/src/gui/Identity/IdDetailsDialog.ui +++ b/retroshare-gui/src/gui/Identity/IdDetailsDialog.ui @@ -17,7 +17,7 @@ :/images/logo/logo_32.png:/images/logo/logo_32.png - + 0 @@ -30,6 +30,9 @@ 0 + + 0 + @@ -41,7 +44,7 @@ - + 9 @@ -52,235 +55,99 @@ 9 - 0 + 9 Identity Info - - - - - 6 + + + + + Qt::Vertical - - 6 + + + 20 + 40 + - - 6 - - - 6 - - - - - - 75 - true - - - - Overall: - - - - - - - Friends votes: - - - - - - - Your opinion: - - - - - - - - 0 - 0 - - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans'; font-size:9pt;">Your own opinion about an identity rules the visibility of that identity for yourself and your friend nodes. Your own opinion is shared among friends and used to compute a reputation score: If your opinion about an identity is neutral, the reputation score is the average of your friend's opinions. If not, your own opinion gives the score.</span></p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans'; font-size:9pt;">The overall score is used in chat lobbies, forums and channels to decide on the actions to take for each specific identity. When the overall score is lower than -0.6, the identity is banned, which prevents all messages and forums/channels authored by this identity to be forwarded, both ways. Some forums also have special anti-spam flags that require a higher reputation level, making them more sensitive to bad opinions. Banned identities gradually lose their activity and eventually disappear (after 30 days). </span></p></body></html> - - - 0 - - - - Negative - - - - :/icons/png/thumbs-down.png:/icons/png/thumbs-down.png - - - - - Neutral - - - - :/icons/png/thumbs-neutral.png:/icons/png/thumbs-neutral.png - - - - - Positive - - - - :/icons/png/thumbs-up.png:/icons/png/thumbs-up.png - - - - - - - - <html><head/><body><p>Average opinion of neighbor nodes about this identity. Negative is bad,</p><p>positive is good. Zero is neutral.</p></body></html> - - - true - - - - - - - <html><head/><body><p>Overall reputation score, accounting for yours and your friends'.</p><p>Negative is bad, positive is good. Zero is neutral. If the score is too low,</p><p>the identity is flagged as bad, and will be filtered out in forums, chat lobbies,</p><p>channels, etc.</p></body></html> - - - true - - - - - - - Owner node ID : - - - - - - - Type: - - - - - - - Owner node name : - - - - - - - Identity name : - - - - - - - Identity ID : - - - - - - - Last used: - - - - - - - Ban-option: - - - - - - - Auto-Ban all identities signed by the same node - - - - - - - true - - - true - - - - - - - true - - - true - - - - - - - true - - - true - - - - - - - - - - true - - - true - - - - - - - true - - - true - - - - + - + + + + Ban-option: + + + + + + + <html><head/><body><p>Overall reputation score, accounting for yours and your friends'.</p><p>Negative is bad, positive is good. Zero is neutral. If the score is too low,</p><p>the identity is flagged as bad, and will be filtered out in forums, chat lobbies,</p><p>channels, etc.</p></body></html> + + + true + + + + + + + Auto-Ban all identities signed by the same node + + + + + + + + 75 + true + + + + Overall: + + + + + + + Type: + + + + + + + Identity ID : + + + + + + + + + + Owner node ID : + + + + + + + true + + + true + + + + QLayout::SetDefaultConstraint @@ -426,25 +293,172 @@ p, li { white-space: pre-wrap; } - - - - Qt::Vertical + + + + Owner node name : - - - 20 - 40 - + + + + + + true - + + true + + + + + + + Last used: + + + + + + + true + + + true + + + + + + + Identity name : + + + + + + + true + + + true + + + + + + + true + + + true + + + + + + + Friends votes: + + + + + + + + 0 + 0 + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans'; font-size:9pt;">Your own opinion about an identity rules the visibility of that identity for yourself and your friend nodes. Your own opinion is shared among friends and used to compute a reputation score: If your opinion about an identity is neutral, the reputation score is the average of your friend's opinions. If not, your own opinion gives the score.</span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans'; font-size:9pt;">The overall score is used in chat lobbies, forums and channels to decide on the actions to take for each specific identity. When the overall score is lower than -0.6, the identity is banned, which prevents all messages and forums/channels authored by this identity to be forwarded, both ways. Some forums also have special anti-spam flags that require a higher reputation level, making them more sensitive to bad opinions. Banned identities gradually lose their activity and eventually disappear (after 30 days). </span></p></body></html> + + + 0 + + + + Negative + + + + :/icons/png/thumbs-down.png:/icons/png/thumbs-down.png + + + + + Neutral + + + + :/icons/png/thumbs-neutral.png:/icons/png/thumbs-neutral.png + + + + + Positive + + + + :/icons/png/thumbs-up.png:/icons/png/thumbs-up.png + + + + + + + + Your opinion: + + + + + + + <html><head/><body><p>Average opinion of neighbor nodes about this identity. Negative is bad,</p><p>positive is good. Zero is neutral.</p></body></html> + + + true + + + + + + + true + + + + + + + Created : + + + + + + Qt::Vertical + + + + 20 + 40 + + + + - + 9 @@ -483,19 +497,6 @@ p, li { white-space: pre-wrap; } - - - - Qt::Vertical - - - - 20 - 40 - - - -
diff --git a/retroshare-gui/src/gui/Identity/IdDialog.cpp b/retroshare-gui/src/gui/Identity/IdDialog.cpp index d5b6b799b..5d8c45804 100644 --- a/retroshare-gui/src/gui/Identity/IdDialog.cpp +++ b/retroshare-gui/src/gui/Identity/IdDialog.cpp @@ -2019,7 +2019,9 @@ QString IdDialog::createUsageString(const RsIdentityUsage& u) const case RsIdentityUsage::CHAT_LOBBY_MSG_VALIDATION: // Chat lobby msgs are signed, so each time one comes, or a chat lobby event comes, a signature verificaiton happens. { ChatId id = ChatId(ChatLobbyId(u.mAdditionalId)); - RetroShareLink l = RetroShareLink::createChatRoom(id, QString::fromStdString(id.toStdString())); + ChatLobbyInfo linfo ; + rsMsgs->getChatLobbyInfo(ChatLobbyId(u.mAdditionalId),linfo); + RetroShareLink l = RetroShareLink::createChatRoom(id, QString::fromUtf8(linfo.lobby_name.c_str())); return tr("Message in chat room %1").arg(l.toHtml()) ; } case RsIdentityUsage::GLOBAL_ROUTER_SIGNATURE_CHECK: // Global router message validation diff --git a/retroshare-gui/src/gui/Identity/IdDialog.ui b/retroshare-gui/src/gui/Identity/IdDialog.ui index d49782bd4..4aa73e097 100644 --- a/retroshare-gui/src/gui/Identity/IdDialog.ui +++ b/retroshare-gui/src/gui/Identity/IdDialog.ui @@ -80,7 +80,7 @@ - :/icons/png/people.png + :/icons/png/people2.png true diff --git a/retroshare-gui/src/gui/NewsFeed.ui b/retroshare-gui/src/gui/NewsFeed.ui index 43908f81a..ed40bdccb 100644 --- a/retroshare-gui/src/gui/NewsFeed.ui +++ b/retroshare-gui/src/gui/NewsFeed.ui @@ -59,7 +59,7 @@ - :/icons/png/newsfeed.png + :/icons/png/newsfeed2.png true diff --git a/retroshare-gui/src/gui/Posted/PostedDialog.cpp b/retroshare-gui/src/gui/Posted/PostedDialog.cpp index c312bd8e8..edf09ff20 100644 --- a/retroshare-gui/src/gui/Posted/PostedDialog.cpp +++ b/retroshare-gui/src/gui/Posted/PostedDialog.cpp @@ -99,7 +99,7 @@ QString PostedDialog::icon(IconType type) { switch (type) { case ICON_NAME: - return ":/icons/png/posted.png"; + return ":/icons/png/postedlinks.png"; case ICON_NEW: return ":/icons/png/add.png"; case ICON_YOUR_GROUP: @@ -109,7 +109,7 @@ QString PostedDialog::icon(IconType type) case ICON_POPULAR_GROUP: return ""; case ICON_OTHER_GROUP: - return ":/icons/png/feed-other.png"; + return ""; case ICON_SEARCH: return ":/images/find.png"; case ICON_DEFAULT: diff --git a/retroshare-gui/src/gui/Posted/PostedItem.cpp b/retroshare-gui/src/gui/Posted/PostedItem.cpp index 5e42a1ef6..6b26a1b0f 100644 --- a/retroshare-gui/src/gui/Posted/PostedItem.cpp +++ b/retroshare-gui/src/gui/Posted/PostedItem.cpp @@ -306,7 +306,7 @@ void PostedItem::fill() urlstr += messageName(); urlstr += QString(" "); - QString siteurl = url.scheme() + "://" + url.host(); + QString siteurl = url.toEncoded(); sitestr = QString(" %2 ").arg(siteurl).arg(siteurl); ui->titleLabel->setText(urlstr); diff --git a/retroshare-gui/src/gui/Posted/PostedItem.ui b/retroshare-gui/src/gui/Posted/PostedItem.ui index 250f43007..dc4368992 100644 --- a/retroshare-gui/src/gui/Posted/PostedItem.ui +++ b/retroshare-gui/src/gui/Posted/PostedItem.ui @@ -407,6 +407,9 @@ 0 + + 6 + 3 @@ -539,8 +542,8 @@ Set as read and remove item - - :/images/cancel.png:/images/cancel.png + + :/icons/png/correct.png:/icons/png/correct.png @@ -559,8 +562,8 @@ Remove Item - - :/images/close_normal.png:/images/close_normal.png + + :/icons/svg/exit-red.svg:/icons/svg/exit-red.svg @@ -685,6 +688,7 @@ + diff --git a/retroshare-gui/src/gui/Posted/PostedListWidget.cpp b/retroshare-gui/src/gui/Posted/PostedListWidget.cpp index 2d8d2cfd9..7450680bc 100644 --- a/retroshare-gui/src/gui/Posted/PostedListWidget.cpp +++ b/retroshare-gui/src/gui/Posted/PostedListWidget.cpp @@ -124,6 +124,13 @@ QIcon PostedListWidget::groupIcon() return QIcon(); } +void PostedListWidget::groupIdChanged() +{ + mPostIndex = 0; + GxsMessageFramePostWidget::groupIdChanged(); + updateShowText(); +} + /*****************************************************************************************/ // Overloaded from FeedHolder. QScrollArea *PostedListWidget::getScrollArea() diff --git a/retroshare-gui/src/gui/Posted/PostedListWidget.h b/retroshare-gui/src/gui/Posted/PostedListWidget.h index 9d472c7a5..8184a444c 100644 --- a/retroshare-gui/src/gui/Posted/PostedListWidget.h +++ b/retroshare-gui/src/gui/Posted/PostedListWidget.h @@ -44,6 +44,7 @@ public: /* GxsMessageFrameWidget */ virtual QIcon groupIcon(); + virtual void groupIdChanged(); /* FeedHolder */ virtual QScrollArea *getScrollArea(); diff --git a/retroshare-gui/src/gui/chat/ChatWidget.cpp b/retroshare-gui/src/gui/chat/ChatWidget.cpp index bb7352ffd..cca487b59 100644 --- a/retroshare-gui/src/gui/chat/ChatWidget.cpp +++ b/retroshare-gui/src/gui/chat/ChatWidget.cpp @@ -363,8 +363,8 @@ void ChatWidget::init(const ChatId &chat_id, const QString &title) QString customStateString = QString::fromUtf8(rsMsgs->getCustomStateString(chatId.toPeerId()).c_str()); updatePeersCustomStateString(QString::fromStdString(chatId.toPeerId().toStdString()), customStateString); } else if (chatType() == CHATTYPE_DISTANT){ - hist_chat_type = RS_HISTORY_TYPE_PRIVATE ; - messageCount = Settings->getPrivateChatHistoryCount(); + hist_chat_type = RS_HISTORY_TYPE_DISTANT ; + messageCount = Settings->getDistantChatHistoryCount(); } else if(chatId.isBroadcast()){ hist_chat_type = RS_HISTORY_TYPE_PUBLIC; messageCount = Settings->getPublicChatHistoryCount(); @@ -435,8 +435,8 @@ ChatWidget::ChatType ChatWidget::chatType() void ChatWidget::blockSending(QString msg) { #ifndef RS_ASYNC_CHAT - sendingBlocked = true; - ui->sendButton->setEnabled(false); +// sendingBlocked = true; +// ui->sendButton->setEnabled(false); #endif ui->sendButton->setToolTip(msg); } diff --git a/retroshare-gui/src/gui/chat/ChatWidget.ui b/retroshare-gui/src/gui/chat/ChatWidget.ui index a937bf247..34ee50e53 100644 --- a/retroshare-gui/src/gui/chat/ChatWidget.ui +++ b/retroshare-gui/src/gui/chat/ChatWidget.ui @@ -303,7 +303,7 @@ border-image: url(:/images/closepressed.png) - + QFrame::Box diff --git a/retroshare-gui/src/gui/feeds/ChatMsgItem.ui b/retroshare-gui/src/gui/feeds/ChatMsgItem.ui index 924028ef3..3b52ca54b 100644 --- a/retroshare-gui/src/gui/feeds/ChatMsgItem.ui +++ b/retroshare-gui/src/gui/feeds/ChatMsgItem.ui @@ -7,7 +7,7 @@ 0 0 543 - 201 + 208 @@ -31,70 +31,6 @@ 0 - - - - - - - 254 - 246 - 222 - - - - - - - 254 - 246 - 222 - - - - - - - - - 254 - 246 - 222 - - - - - - - 254 - 246 - 222 - - - - - - - - - 240 - 240 - 240 - - - - - - - 254 - 246 - 222 - - - - - - true @@ -201,8 +137,8 @@ Remove Item - - :/images/close_normal.png:/images/close_normal.png + + :/icons/svg/exit-red.svg:/icons/svg/exit-red.svg @@ -406,20 +342,21 @@ + + StyledLabel + QLabel +
gui/common/StyledLabel.h
+
AvatarWidget QLabel
gui/common/AvatarWidget.h
1
- - StyledLabel - QLabel -
gui/common/StyledLabel.h
-
+ diff --git a/retroshare-gui/src/gui/feeds/GxsChannelGroupItem.cpp b/retroshare-gui/src/gui/feeds/GxsChannelGroupItem.cpp index edc83c586..af3e575dd 100644 --- a/retroshare-gui/src/gui/feeds/GxsChannelGroupItem.cpp +++ b/retroshare-gui/src/gui/feeds/GxsChannelGroupItem.cpp @@ -176,13 +176,13 @@ void GxsChannelGroupItem::doExpand(bool open) if (open) { ui->expandFrame->show(); - ui->expandButton->setIcon(QIcon(QString(":/images/edit_remove24.png"))); + ui->expandButton->setIcon(QIcon(QString(":/icons/png/up-arrow.png"))); ui->expandButton->setToolTip(tr("Hide")); } else { ui->expandFrame->hide(); - ui->expandButton->setIcon(QIcon(QString(":/images/edit_add24.png"))); + ui->expandButton->setIcon(QIcon(QString(":/icons/png/down-arrow.png"))); ui->expandButton->setToolTip(tr("Expand")); } diff --git a/retroshare-gui/src/gui/feeds/GxsChannelGroupItem.ui b/retroshare-gui/src/gui/feeds/GxsChannelGroupItem.ui index bc61fe8b3..e94938020 100644 --- a/retroshare-gui/src/gui/feeds/GxsChannelGroupItem.ui +++ b/retroshare-gui/src/gui/feeds/GxsChannelGroupItem.ui @@ -7,7 +7,7 @@ 0 0 618 - 157 + 161 @@ -125,7 +125,10 @@ - :/images/channels.png + :/icons/png/channel.png + + + true @@ -153,6 +156,12 @@ + + + 75 + true + + name @@ -178,6 +187,25 @@ + + + + + 0 + 0 + + + + Qt::NoFocus + + + Subscribe to Channel + + + Subscribe + + + @@ -200,28 +228,8 @@ Qt::NoFocus - - :/images/copyrslink.png:/images/copyrslink.png - - - - - - - - 0 - 0 - - - - Qt::NoFocus - - - Subscribe to Channel - - - - :/images/directoryadd_24x24_shadow.png:/images/directoryadd_24x24_shadow.png + + :/icons/png/copy.png:/icons/png/copy.png @@ -240,8 +248,8 @@ Expand - - :/images/edit_add24.png:/images/edit_add24.png + + :/icons/png/down-arrow.png:/icons/png/down-arrow.png @@ -260,8 +268,8 @@ Remove Item - - :/images/close_normal.png:/images/close_normal.png + + :/icons/svg/exit-red.svg:/icons/svg/exit-red.svg @@ -329,6 +337,7 @@ + diff --git a/retroshare-gui/src/gui/feeds/GxsChannelPostItem.cpp b/retroshare-gui/src/gui/feeds/GxsChannelPostItem.cpp index 9b70ca191..4807fb175 100644 --- a/retroshare-gui/src/gui/feeds/GxsChannelPostItem.cpp +++ b/retroshare-gui/src/gui/feeds/GxsChannelPostItem.cpp @@ -389,12 +389,26 @@ void GxsChannelPostItem::fill() mInFill = true; QString title; + + float f = QFontMetricsF(font()).height()/14.0 ; if(mPost.mThumbnail.mData != NULL) { - QPixmap thumbnail; + QPixmap thumbnail; + GxsIdDetails::loadPixmapFromData(mPost.mThumbnail.mData, mPost.mThumbnail.mSize, thumbnail,GxsIdDetails::ORIGINAL); // Wiping data - as its been passed to thumbnail. + if( thumbnail.width() < 90 ){ + ui->logoLabel->setMaximumSize(82*f,108*f); + } + else if( thumbnail.width() < 109 ){ + ui->logoLabel->setMinimumSize(108*f,108*f); + ui->logoLabel->setMaximumSize(108*f,108*f); + } + else{ + ui->logoLabel->setMinimumSize(156*f,108*f); + ui->logoLabel->setMaximumSize(156*f,108*f); + } ui->logoLabel->setPixmap(thumbnail); } @@ -687,7 +701,7 @@ void GxsChannelPostItem::doExpand(bool open) if (open) { ui->expandFrame->show(); - ui->expandButton->setIcon(QIcon(QString(":/images/edit_remove24.png"))); + ui->expandButton->setIcon(QIcon(QString(":/icons/png/up-arrow.png"))); ui->expandButton->setToolTip(tr("Hide")); readToggled(false); @@ -695,7 +709,7 @@ void GxsChannelPostItem::doExpand(bool open) else { ui->expandFrame->hide(); - ui->expandButton->setIcon(QIcon(QString(":/images/edit_add24.png"))); + ui->expandButton->setIcon(QIcon(QString(":/icons/png/down-arrow.png"))); ui->expandButton->setToolTip(tr("Expand")); } diff --git a/retroshare-gui/src/gui/feeds/GxsChannelPostItem.ui b/retroshare-gui/src/gui/feeds/GxsChannelPostItem.ui index cd6594674..e81b4ed78 100644 --- a/retroshare-gui/src/gui/feeds/GxsChannelPostItem.ui +++ b/retroshare-gui/src/gui/feeds/GxsChannelPostItem.ui @@ -51,9 +51,15 @@ + + + 0 + 0 + + - 158 + 82 108 @@ -303,8 +309,8 @@ Download - - :/images/download16.png:/images/download16.png + + :/icons/png/download.png:/icons/png/download.png false @@ -320,8 +326,8 @@ Play - - :/images/player_play.png:/images/player_play.png + + :/icons/png/play.png:/icons/png/play.png @@ -330,6 +336,10 @@ Comments + + + :/icons/png/comment.png:/icons/png/comment.png + @@ -367,8 +377,8 @@ Copy RetroShare Link - - :/images/copyrslink.png:/images/copyrslink.png + + :/icons/png/copy.png:/icons/png/copy.png @@ -386,9 +396,8 @@ Unsubscribe From Channel - - - :/images/mail_delete.png:/images/mail_delete.png + + Unsubscribe @@ -407,8 +416,8 @@ Expand - - :/images/edit_add24.png:/images/edit_add24.png + + :/icons/png/down-arrow.png:/icons/png/down-arrow.png @@ -427,8 +436,8 @@ Set as read and remove item - - :/images/cancel.png:/images/cancel.png + + :/icons/png/correct.png:/icons/png/correct.png @@ -447,8 +456,8 @@ Remove Item - - :/images/close_normal.png:/images/close_normal.png + + :/icons/svg/exit-red.svg:/icons/svg/exit-red.svg @@ -558,6 +567,7 @@
+ diff --git a/retroshare-gui/src/gui/feeds/GxsForumGroupItem.cpp b/retroshare-gui/src/gui/feeds/GxsForumGroupItem.cpp index e73f08ca6..1e430638a 100644 --- a/retroshare-gui/src/gui/feeds/GxsForumGroupItem.cpp +++ b/retroshare-gui/src/gui/feeds/GxsForumGroupItem.cpp @@ -132,9 +132,9 @@ void GxsForumGroupItem::fill() ui->descLabel->setText(QString::fromUtf8(mGroup.mDescription.c_str())); if (IS_GROUP_PUBLISHER(mGroup.mMeta.mSubscribeFlags)) { - ui->forumlogo_label->setPixmap(QPixmap(":/images/konv_message64.png")); + ui->forumlogo_label->setPixmap(QPixmap(":/icons/png/forums.png")); } else { - ui->forumlogo_label->setPixmap(QPixmap(":/images/konversation64.png")); + ui->forumlogo_label->setPixmap(QPixmap(":/icons/png/forums-default.png")); } if (IS_GROUP_SUBSCRIBED(mGroup.mMeta.mSubscribeFlags)) { @@ -174,13 +174,13 @@ void GxsForumGroupItem::doExpand(bool open) if (open) { ui->expandFrame->show(); - ui->expandButton->setIcon(QIcon(QString(":/images/edit_remove24.png"))); + ui->expandButton->setIcon(QIcon(QString(":/icons/png/up-arrow.png"))); ui->expandButton->setToolTip(tr("Hide")); } else { ui->expandFrame->hide(); - ui->expandButton->setIcon(QIcon(QString(":/images/edit_add24.png"))); + ui->expandButton->setIcon(QIcon(QString(":/icons/png/down-arrow.png"))); ui->expandButton->setToolTip(tr("Expand")); } diff --git a/retroshare-gui/src/gui/feeds/GxsForumGroupItem.ui b/retroshare-gui/src/gui/feeds/GxsForumGroupItem.ui index 60f306113..066ea2121 100644 --- a/retroshare-gui/src/gui/feeds/GxsForumGroupItem.ui +++ b/retroshare-gui/src/gui/feeds/GxsForumGroupItem.ui @@ -7,7 +7,7 @@ 0 0 618 - 157 + 161 @@ -125,7 +125,10 @@ - :/images/konversation64.png + :/icons/png/forums-default.png + + + true @@ -153,6 +156,12 @@ + + + 75 + true + + name @@ -178,6 +187,25 @@ + + + + + 0 + 0 + + + + Qt::NoFocus + + + Subscribe to Forum + + + Subscribe + + + @@ -200,28 +228,8 @@ Qt::NoFocus - - :/images/copyrslink.png:/images/copyrslink.png - - - - - - - - 0 - 0 - - - - Qt::NoFocus - - - Subscribe to Forum - - - - :/images/directoryadd_24x24_shadow.png:/images/directoryadd_24x24_shadow.png + + :/icons/png/copy.png:/icons/png/copy.png @@ -240,8 +248,8 @@ Expand - - :/images/edit_add24.png:/images/edit_add24.png + + :/icons/png/down-arrow.png:/icons/png/down-arrow.png @@ -260,8 +268,8 @@ Remove Item - - :/images/close_normal.png:/images/close_normal.png + + :/icons/svg/exit-red.svg:/icons/svg/exit-red.svg @@ -330,6 +338,7 @@ + diff --git a/retroshare-gui/src/gui/feeds/GxsForumMsgItem.cpp b/retroshare-gui/src/gui/feeds/GxsForumMsgItem.cpp index d6081bbd8..8e1dba4ea 100644 --- a/retroshare-gui/src/gui/feeds/GxsForumMsgItem.cpp +++ b/retroshare-gui/src/gui/feeds/GxsForumMsgItem.cpp @@ -28,9 +28,12 @@ #include "FeedHolder.h" #include "gui/RetroShareLink.h" +#include "gui/gxs/GxsIdDetails.h" #include "util/HandleRichText.h" #include "util/DateTime.h" +#include + #include /**** @@ -279,9 +282,9 @@ void GxsForumMsgItem::fill() } if (IS_GROUP_PUBLISHER(mGroup.mMeta.mSubscribeFlags)) { - ui->iconLabel->setPixmap(QPixmap(":/images/konv_message64.png")); + ui->iconLabel->setPixmap(QPixmap(":/icons/png/forums.png")); } else { - ui->iconLabel->setPixmap(QPixmap(":/images/konversation64.png")); + ui->iconLabel->setPixmap(QPixmap(":/icons/png/forums-default.png")); } if (!mIsHome) { @@ -289,6 +292,16 @@ void GxsForumMsgItem::fill() mCloseOnRead = true; } } + + RsIdentityDetails idDetails ; + rsIdentity->getIdDetails(mMessage.mMeta.mAuthorId,idDetails); + + QPixmap pixmap ; + + if(idDetails.mAvatar.mSize == 0 || !GxsIdDetails::loadPixmapFromData(idDetails.mAvatar.mData, idDetails.mAvatar.mSize, pixmap,GxsIdDetails::SMALL)) + pixmap = GxsIdDetails::makeDefaultIcon(mMessage.mMeta.mAuthorId,GxsIdDetails::SMALL); + + ui->avatar->setPixmap(pixmap); ui->nameLabel->setId(mMessage.mMeta.mAuthorId); @@ -322,6 +335,16 @@ void GxsForumMsgItem::fill() ui->parentMsgLabel->setText(RsHtml().formatText(NULL, QString::fromUtf8(mParentMessage.mMsg.c_str()), RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS)); ui->parentNameLabel->setId(mParentMessage.mMeta.mAuthorId); + + RsIdentityDetails idDetails ; + rsIdentity->getIdDetails(mParentMessage.mMeta.mAuthorId,idDetails); + + QPixmap pixmap ; + + if(idDetails.mAvatar.mSize == 0 || !GxsIdDetails::loadPixmapFromData(idDetails.mAvatar.mData, idDetails.mAvatar.mSize, pixmap,GxsIdDetails::SMALL)) + pixmap = GxsIdDetails::makeDefaultIcon(mParentMessage.mMeta.mAuthorId,GxsIdDetails::SMALL); + + ui->parentAvatar->setPixmap(pixmap); // if (rsPeers->getPeerName(msgParent.srcId) !="") // { @@ -369,7 +392,7 @@ void GxsForumMsgItem::doExpand(bool open) if (open) { ui->expandFrame->show(); - ui->expandButton->setIcon(QIcon(QString(":/images/edit_remove24.png"))); + ui->expandButton->setIcon(QIcon(QString(":/icons/png/up-arrow.png"))); ui->expandButton->setToolTip(tr("Hide")); if (!mParentMessage.mMeta.mMsgId.isNull()) { @@ -382,7 +405,7 @@ void GxsForumMsgItem::doExpand(bool open) { ui->expandFrame->hide(); ui->parentFrame->hide(); - ui->expandButton->setIcon(QIcon(QString(":/images/edit_add24.png"))); + ui->expandButton->setIcon(QIcon(QString(":/icons/png/down-arrow.png"))); ui->expandButton->setToolTip(tr("Expand")); } diff --git a/retroshare-gui/src/gui/feeds/GxsForumMsgItem.ui b/retroshare-gui/src/gui/feeds/GxsForumMsgItem.ui index 938d44947..47b1457b2 100644 --- a/retroshare-gui/src/gui/feeds/GxsForumMsgItem.ui +++ b/retroshare-gui/src/gui/feeds/GxsForumMsgItem.ui @@ -77,9 +77,95 @@ QFrame::Sunken - - - + + + + + + 70 + 70 + + + + + 70 + 70 + + + + :/icons/png/forums-default.png + + + true + + + Qt::AlignCenter + + + + + + + + + + 0 + 0 + + + + + 75 + true + + + + Forum Name + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + true + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse + + + + + + + Qt::Horizontal + + + + 358 + 20 + + + + + + + + + 75 + true + + + + Timestamp + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + @@ -110,16 +196,13 @@ - + Qt::Horizontal - - QSizePolicy::Expanding - - 10 + 168 20 @@ -139,9 +222,8 @@ Unsubscribe To Forum - - - :/images/mail_delete.png:/images/mail_delete.png + + Unsubscribe @@ -160,8 +242,8 @@ Expand - - :/images/edit_add24.png:/images/edit_add24.png + + :/icons/png/down-arrow.png:/icons/png/down-arrow.png @@ -180,8 +262,8 @@ Set as read and remove item - - :/images/cancel.png:/images/cancel.png + + :/icons/png/correct.png:/icons/png/correct.png @@ -200,238 +282,13 @@ Remove Item - - :/images/close_normal.png:/images/close_normal.png + + :/icons/svg/exit-red.svg:/icons/svg/exit-red.svg - - - - - - - 70 - 70 - - - - - 70 - 70 - - - - :/images/konversation64.png - - - Qt::AlignCenter - - - - - - - - 0 - 0 - - - - - 75 - true - - - - Forum Name - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - true - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse - - - - - - - - - - - Qt::Horizontal - - - - 358 - 20 - - - - - - - - - 75 - true - - - - Timestamp - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - - - - Qt::Horizontal - - - - 518 - 20 - - - - - - - - - - QFrame::Box - - - QFrame::Sunken - - - - - - - 32 - 32 - - - - - 32 - 32 - - - - - - - - - 75 - true - - - - Name - - - true - - - - - - - - - - 0 - 0 - - - - - 75 - true - - - - Subject: - - - - - - - - 0 - 0 - - - - Message is about ??? - - - true - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse - - - - - - - - - Qt::Vertical - - - - 20 - 27 - - - - - - - - - - - 0 - 0 - - - - Current Message.. - - - true - - - true - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse - - - - - - - - @@ -589,6 +446,131 @@ + + + + QFrame::Box + + + QFrame::Sunken + + + + + + + 32 + 32 + + + + + 32 + 32 + + + + + + + + + 75 + true + + + + Name + + + true + + + + + + + + + + 0 + 0 + + + + + 75 + true + + + + Subject: + + + + + + + + 0 + 0 + + + + Message is about ??? + + + true + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse + + + + + + + + + Qt::Vertical + + + + 20 + 27 + + + + + + + + + + + 0 + 0 + + + + Current Message.. + + + true + + + true + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse + + + + + + + + @@ -609,6 +591,7 @@ + diff --git a/retroshare-gui/src/gui/feeds/MsgItem.cpp b/retroshare-gui/src/gui/feeds/MsgItem.cpp index 3e4ae3bb6..c0dd8768e 100644 --- a/retroshare-gui/src/gui/feeds/MsgItem.cpp +++ b/retroshare-gui/src/gui/feeds/MsgItem.cpp @@ -236,7 +236,7 @@ void MsgItem::doExpand(bool open) if (open) { expandFrame->show(); - expandButton->setIcon(QIcon(QString(":/images/edit_remove24.png"))); + expandButton->setIcon(QIcon(QString(":/icons/png/up-arrow.png"))); expandButton->setToolTip(tr("Hide")); mCloseOnRead = false; @@ -246,7 +246,7 @@ void MsgItem::doExpand(bool open) else { expandFrame->hide(); - expandButton->setIcon(QIcon(QString(":/images/edit_add24.png"))); + expandButton->setIcon(QIcon(QString(":/icons/png/down-arrow.png"))); expandButton->setToolTip(tr("Expand")); } diff --git a/retroshare-gui/src/gui/feeds/MsgItem.ui b/retroshare-gui/src/gui/feeds/MsgItem.ui index d273f935d..6e47331d9 100644 --- a/retroshare-gui/src/gui/feeds/MsgItem.ui +++ b/retroshare-gui/src/gui/feeds/MsgItem.ui @@ -31,70 +31,6 @@ 0 - - - - - - - 52 - 177 - 255 - - - - - - - 51 - 174 - 255 - - - - - - - - - 52 - 177 - 255 - - - - - - - 51 - 174 - 255 - - - - - - - - - 240 - 240 - 240 - - - - - - - 51 - 174 - 255 - - - - - - true @@ -215,7 +151,7 @@ - + Qt::NoFocus @@ -229,12 +165,6 @@ :/images/mail_reply.png:/images/mail_reply.png - - Qt::ToolButtonTextBesideIcon - - - false - @@ -265,8 +195,8 @@ Delete Message - - :/images/mail_delete.png:/images/mail_delete.png + + :/icons/png/cancel.png:/icons/png/cancel.png @@ -285,8 +215,8 @@ Play Media - - :/images/startall.png:/images/startall.png + + :/icons/png/play.png:/icons/png/play.png @@ -305,8 +235,8 @@ Expand - - :/images/edit_add24.png:/images/edit_add24.png + + :/icons/png/down-arrow.png:/icons/png/down-arrow.png @@ -325,8 +255,8 @@ Remove Item - - :/images/close_normal.png:/images/close_normal.png + + :/icons/svg/exit-red.svg:/icons/svg/exit-red.svg @@ -493,7 +423,7 @@ - + diff --git a/retroshare-gui/src/gui/feeds/PeerItem.cpp b/retroshare-gui/src/gui/feeds/PeerItem.cpp index 0c0c1d057..c1ccd788e 100644 --- a/retroshare-gui/src/gui/feeds/PeerItem.cpp +++ b/retroshare-gui/src/gui/feeds/PeerItem.cpp @@ -236,13 +236,13 @@ void PeerItem::doExpand(bool open) if (open) { expandFrame->show(); - expandButton->setIcon(QIcon(QString(":/images/edit_remove24.png"))); + expandButton->setIcon(QIcon(QString(":/icons/png/up-arrow.png"))); expandButton->setToolTip(tr("Hide")); } else { expandFrame->hide(); - expandButton->setIcon(QIcon(QString(":/images/edit_add24.png"))); + expandButton->setIcon(QIcon(QString(":/icons/png/down-arrow.png"))); expandButton->setToolTip(tr("Expand")); } diff --git a/retroshare-gui/src/gui/feeds/PeerItem.ui b/retroshare-gui/src/gui/feeds/PeerItem.ui index dc37abc28..b7a18df71 100644 --- a/retroshare-gui/src/gui/feeds/PeerItem.ui +++ b/retroshare-gui/src/gui/feeds/PeerItem.ui @@ -7,7 +7,7 @@ 0 0 476 - 250 + 262 @@ -294,8 +294,8 @@ Expand - - :/images/edit_add24.png:/images/edit_add24.png + + :/icons/png/down-arrow.png:/icons/png/down-arrow.png @@ -314,8 +314,8 @@ Remove Item - - :/images/close_normal.png:/images/close_normal.png + + :/icons/svg/exit-red.svg:/icons/svg/exit-red.svg @@ -581,6 +581,7 @@ + diff --git a/retroshare-gui/src/gui/feeds/PostedGroupItem.cpp b/retroshare-gui/src/gui/feeds/PostedGroupItem.cpp index f0453e4df..1a9ebeb9e 100644 --- a/retroshare-gui/src/gui/feeds/PostedGroupItem.cpp +++ b/retroshare-gui/src/gui/feeds/PostedGroupItem.cpp @@ -189,13 +189,13 @@ void PostedGroupItem::doExpand(bool open) if (open) { ui->expandFrame->show(); - ui->expandButton->setIcon(QIcon(QString(":/images/edit_remove24.png"))); + ui->expandButton->setIcon(QIcon(QString(":/icons/png/up-arrow.png"))); ui->expandButton->setToolTip(tr("Hide")); } else { ui->expandFrame->hide(); - ui->expandButton->setIcon(QIcon(QString(":/images/edit_add24.png"))); + ui->expandButton->setIcon(QIcon(QString(":/icons/png/down-arrow.png"))); ui->expandButton->setToolTip(tr("Expand")); } diff --git a/retroshare-gui/src/gui/feeds/PostedGroupItem.ui b/retroshare-gui/src/gui/feeds/PostedGroupItem.ui index dd2b199bd..3b3a3dbb4 100644 --- a/retroshare-gui/src/gui/feeds/PostedGroupItem.ui +++ b/retroshare-gui/src/gui/feeds/PostedGroupItem.ui @@ -7,7 +7,7 @@ 0 0 618 - 157 + 161 @@ -153,6 +153,12 @@ + + + 75 + true + + name @@ -178,6 +184,25 @@ + + + + + 0 + 0 + + + + Qt::NoFocus + + + Subscribe to Posted + + + Subscribe + + + @@ -200,28 +225,8 @@ Qt::NoFocus - - :/images/copyrslink.png:/images/copyrslink.png - - - - - - - - 0 - 0 - - - - Qt::NoFocus - - - Subscribe to Posted - - - - :/images/directoryadd_24x24_shadow.png:/images/directoryadd_24x24_shadow.png + + :/icons/png/copy.png:/icons/png/copy.png @@ -240,8 +245,8 @@ Expand - - :/images/edit_add24.png:/images/edit_add24.png + + :/icons/png/down-arrow.png:/icons/png/down-arrow.png @@ -260,8 +265,8 @@ Remove Item - - :/images/close_normal.png:/images/close_normal.png + + :/icons/svg/exit-red.svg:/icons/svg/exit-red.svg @@ -330,6 +335,8 @@ + + diff --git a/retroshare-gui/src/gui/feeds/SecurityIpItem.cpp b/retroshare-gui/src/gui/feeds/SecurityIpItem.cpp index 969440a8c..a6a5d2d50 100644 --- a/retroshare-gui/src/gui/feeds/SecurityIpItem.cpp +++ b/retroshare-gui/src/gui/feeds/SecurityIpItem.cpp @@ -203,13 +203,13 @@ void SecurityIpItem::doExpand(bool open) if (open) { ui->expandFrame->show(); - ui->expandButton->setIcon(QIcon(":/images/edit_remove24.png")); + ui->expandButton->setIcon(QIcon(":/icons/png/up-arrow.png")); ui->expandButton->setToolTip(tr("Hide")); } else { ui->expandFrame->hide(); - ui->expandButton->setIcon(QIcon(":/images/edit_add24.png")); + ui->expandButton->setIcon(QIcon(":/icons/png/down-arrow.png")); ui->expandButton->setToolTip(tr("Expand")); } diff --git a/retroshare-gui/src/gui/feeds/SecurityIpItem.ui b/retroshare-gui/src/gui/feeds/SecurityIpItem.ui index a0ee5a55f..defbd39f1 100644 --- a/retroshare-gui/src/gui/feeds/SecurityIpItem.ui +++ b/retroshare-gui/src/gui/feeds/SecurityIpItem.ui @@ -11,7 +11,16 @@ - + + 1 + + + 1 + + + 1 + + 1 @@ -105,10 +114,19 @@ - + 0 - + + 0 + + + 0 + + + 0 + + 0 @@ -215,8 +233,8 @@ Expand - - :/images/edit_add24.png:/images/edit_add24.png + + :/icons/png/down-arrow.png:/icons/png/down-arrow.png @@ -235,8 +253,8 @@ Remove Item - - :/images/close_normal.png:/images/close_normal.png + + :/icons/svg/exit-red.svg:/icons/svg/exit-red.svg @@ -475,6 +493,7 @@ + diff --git a/retroshare-gui/src/gui/feeds/SecurityItem.cpp b/retroshare-gui/src/gui/feeds/SecurityItem.cpp index 6a3f169ec..722296ae5 100644 --- a/retroshare-gui/src/gui/feeds/SecurityItem.cpp +++ b/retroshare-gui/src/gui/feeds/SecurityItem.cpp @@ -294,13 +294,13 @@ void SecurityItem::doExpand(bool open) if (open) { expandFrame->show(); - expandButton->setIcon(QIcon(QString(":/images/edit_remove24.png"))); + expandButton->setIcon(QIcon(QString(":/icons/png/up-arrow.png"))); expandButton->setToolTip(tr("Hide")); } else { expandFrame->hide(); - expandButton->setIcon(QIcon(QString(":/images/edit_add24.png"))); + expandButton->setIcon(QIcon(QString(":/icons/png/down-arrow.png"))); expandButton->setToolTip(tr("Expand")); } diff --git a/retroshare-gui/src/gui/feeds/SecurityItem.ui b/retroshare-gui/src/gui/feeds/SecurityItem.ui index 0b3c2be41..6b62a5aff 100644 --- a/retroshare-gui/src/gui/feeds/SecurityItem.ui +++ b/retroshare-gui/src/gui/feeds/SecurityItem.ui @@ -7,11 +7,20 @@ 0 0 763 - 241 + 246 - + + 1 + + + 1 + + + 1 + + 1 @@ -102,10 +111,19 @@ - + 0 - + + 0 + + + 0 + + + 0 + + 0 @@ -362,8 +380,8 @@ Expand - - :/images/edit_add24.png:/images/edit_add24.png + + :/icons/png/down-arrow.png:/icons/png/down-arrow.png @@ -382,8 +400,8 @@ Remove Item - - :/images/close_normal.png:/images/close_normal.png + + :/icons/svg/exit-red.svg:/icons/svg/exit-red.svg @@ -625,6 +643,7 @@ + diff --git a/retroshare-gui/src/gui/feeds/SubFileItem.cpp b/retroshare-gui/src/gui/feeds/SubFileItem.cpp index 0f542db21..ba81ab9bf 100644 --- a/retroshare-gui/src/gui/feeds/SubFileItem.cpp +++ b/retroshare-gui/src/gui/feeds/SubFileItem.cpp @@ -718,6 +718,7 @@ void SubFileItem::mediatype() /* check if the file is not a media file and change text */ playButton->setText(tr("Open")); playButton->setToolTip(tr("Open File")); + playButton->setIcon(QIcon()); } void SubFileItem::copyLink() diff --git a/retroshare-gui/src/gui/feeds/SubFileItem.ui b/retroshare-gui/src/gui/feeds/SubFileItem.ui index d5c6b7181..6717836b5 100644 --- a/retroshare-gui/src/gui/feeds/SubFileItem.ui +++ b/retroshare-gui/src/gui/feeds/SubFileItem.ui @@ -83,8 +83,8 @@ Cancel Download - - :/images/delete.png:/images/delete.png + + :/icons/png/cancel.png:/icons/png/cancel.png @@ -112,8 +112,8 @@ Download - - :/images/download.png:/images/download.png + + :/icons/png/download.png:/icons/png/download.png @@ -141,8 +141,8 @@ Play - - :/images/player_play.png:/images/player_play.png + + :/icons/png/play.png:/icons/png/play.png @@ -167,8 +167,8 @@ Copy RetroShare Link - - :/images/copyrslink.png:/images/copyrslink.png + + :/icons/png/copy.png:/icons/png/copy.png @@ -242,6 +242,7 @@ + diff --git a/retroshare-gui/src/gui/gxs/GxsCommentDialog.cpp b/retroshare-gui/src/gui/gxs/GxsCommentDialog.cpp index 57fc7031b..f9b8b1dbc 100644 --- a/retroshare-gui/src/gui/gxs/GxsCommentDialog.cpp +++ b/retroshare-gui/src/gui/gxs/GxsCommentDialog.cpp @@ -19,6 +19,7 @@ *******************************************************************************/ #include "gui/gxs/GxsCommentDialog.h" +#include "gui/gxs/GxsCommentTreeWidget.h" #include "ui_GxsCommentDialog.h" #include @@ -50,6 +51,7 @@ GxsCommentDialog::GxsCommentDialog(QWidget *parent, RsTokenService *token_servic connect(ui->idChooser, SIGNAL(currentIndexChanged( int )), this, SLOT(voterSelectionChanged( int ))); connect(ui->idChooser, SIGNAL(idsLoaded()), this, SLOT(idChooserReady())); + connect(ui->commentButton, SIGNAL(clicked()), ui->treeWidget, SLOT(makeComment())); connect(ui->sortBox, SIGNAL(currentIndexChanged(int)), this, SLOT(sortComments(int))); // default sort method "HOT". diff --git a/retroshare-gui/src/gui/gxs/GxsCommentDialog.ui b/retroshare-gui/src/gui/gxs/GxsCommentDialog.ui index 6bf6b1112..c349c6eb7 100644 --- a/retroshare-gui/src/gui/gxs/GxsCommentDialog.ui +++ b/retroshare-gui/src/gui/gxs/GxsCommentDialog.ui @@ -40,6 +40,32 @@ + + + + + 0 + 0 + + + + Comment + + + + :/icons/png/comment.png:/icons/png/comment.png + + + + 20 + 20 + + + + Qt::ToolButtonTextBesideIcon + + + diff --git a/retroshare-gui/src/gui/gxs/GxsGroupDialog.ui b/retroshare-gui/src/gui/gxs/GxsGroupDialog.ui index 9c6a9b662..6a0da2fc2 100644 --- a/retroshare-gui/src/gui/gxs/GxsGroupDialog.ui +++ b/retroshare-gui/src/gui/gxs/GxsGroupDialog.ui @@ -7,7 +7,7 @@ 0 0 600 - 633 + 563 @@ -51,6 +51,9 @@ 0 + + 3 + @@ -64,7 +67,7 @@ 4 - 4 + 0 4 @@ -213,159 +216,6 @@ - - - - - 0 - 0 - - - - Message Distribution - - - - - - - - - 0 - 0 - - - - <html><head/><body><p>Messages will spread way beyond your friend nodes, as long as people subscribe to the channel/forum/posted you're creating.</p></body></html> - - - Public - - - - :/icons/png/network-puplic.png:/icons/png/network-puplic.png - - - - 24 - 24 - - - - - - - - - 0 - 0 - - - - <html><head/><body><p>Messages will spread among Retroshare nodes that host one of the identities listed as member of the circle and who also subscribe the media. Only these nodes will be able to see that this forum/channel/posted media exists. </p></body></html> - - - Restricted to Circle - - - - :/icons/png/circles.png:/icons/png/circles.png - - - - 24 - 24 - - - - - - - - - 0 - 0 - - - - <html><head/><body><p>Messages will only be distributed to the selected subset of your friend nodes. They will not forward messages with each other, but only use your own node as a central hub to distribute them.</p></body></html> - - - Restricted node group - - - - :/icons/png/network.png:/icons/png/network.png - - - - 24 - 24 - - - - - - - - - 0 - 0 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Qt::Horizontal - - - - 68 - 20 - - - - - - - - - 0 - 0 - - - - - - - - - - - - - - - - - - - @@ -601,6 +451,161 @@ + + + + + + + + + + + + + + + 0 + 0 + + + + Message Distribution + + + + 6 + + + 6 + + + + + + 0 + 0 + + + + <html><head/><body><p>Messages will spread way beyond your friend nodes, as long as people subscribe to the channel/forum/posted you're creating.</p></body></html> + + + Public + + + + :/icons/png/network-puplic.png:/icons/png/network-puplic.png + + + + 24 + 24 + + + + + + + + + 0 + 0 + + + + <html><head/><body><p>Messages will spread among Retroshare nodes that host one of the identities listed as member of the circle and who also subscribe the media. Only these nodes will be able to see that this forum/channel/posted media exists. </p></body></html> + + + Restricted to Circle + + + + :/icons/png/circles.png:/icons/png/circles.png + + + + 24 + 24 + + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + <html><head/><body><p>Messages will only be distributed to the selected subset of your friend nodes. They will not forward messages with each other, but only use your own node as a central hub to distribute them.</p></body></html> + + + Restricted node group + + + + :/icons/png/network.png:/icons/png/network.png + + + + 24 + 24 + + + + + + + + + 0 + 0 + + + + + + + + Qt::Horizontal + + + + 0 + 17 + + + + + + + + Qt::Horizontal + + + + 1 + 25 + + + + + + + diff --git a/retroshare-gui/src/gui/gxschannels/GxsChannelDialog.h b/retroshare-gui/src/gui/gxschannels/GxsChannelDialog.h index 3f45a9df4..eedde4833 100644 --- a/retroshare-gui/src/gui/gxschannels/GxsChannelDialog.h +++ b/retroshare-gui/src/gui/gxschannels/GxsChannelDialog.h @@ -23,7 +23,7 @@ #include "gui/gxs/GxsGroupFrameDialog.h" -#define IMAGE_GXSCHANNELS ":/icons/png/channels.png" +#define IMAGE_GXSCHANNELS ":/icons/png/channel.png" class GxsChannelDialog : public GxsGroupFrameDialog { diff --git a/retroshare-gui/src/gui/gxschannels/GxsChannelGroupDialog.cpp b/retroshare-gui/src/gui/gxschannels/GxsChannelGroupDialog.cpp index 369d28778..5732a706a 100644 --- a/retroshare-gui/src/gui/gxschannels/GxsChannelGroupDialog.cpp +++ b/retroshare-gui/src/gui/gxschannels/GxsChannelGroupDialog.cpp @@ -99,11 +99,11 @@ QPixmap GxsChannelGroupDialog::serviceImage() switch (mode()) { case MODE_CREATE: - return QPixmap(":/icons/png/channels.png"); + return QPixmap(":/icons/png/channel.png"); case MODE_SHOW: - return QPixmap(":/icons/png/channels.png"); + return QPixmap(":/icons/png/channel.png"); case MODE_EDIT: - return QPixmap(":/icons/png/channels.png"); + return QPixmap(":/icons/png/channel.png"); } return QPixmap(); diff --git a/retroshare-gui/src/gui/gxschannels/GxsChannelUserNotify.cpp b/retroshare-gui/src/gui/gxschannels/GxsChannelUserNotify.cpp index 63dde30f4..aa82953ed 100644 --- a/retroshare-gui/src/gui/gxschannels/GxsChannelUserNotify.cpp +++ b/retroshare-gui/src/gui/gxschannels/GxsChannelUserNotify.cpp @@ -36,12 +36,12 @@ bool GxsChannelUserNotify::hasSetting(QString *name, QString *group) QIcon GxsChannelUserNotify::getIcon() { - return QIcon(":/icons/png/channels.png"); + return QIcon(":/icons/png/channel.png"); } QIcon GxsChannelUserNotify::getMainIcon(bool hasNew) { - return hasNew ? QIcon(":/icons/png/channels-notify.png") : QIcon(":/icons/png/channels.png"); + return hasNew ? QIcon(":/icons/png/channels-notify.png") : QIcon(":/icons/png/channel.png"); } void GxsChannelUserNotify::iconClicked() diff --git a/retroshare-gui/src/gui/gxsforums/CreateGxsForumMsg.cpp b/retroshare-gui/src/gui/gxsforums/CreateGxsForumMsg.cpp index f10332a30..22db0d97d 100644 --- a/retroshare-gui/src/gui/gxsforums/CreateGxsForumMsg.cpp +++ b/retroshare-gui/src/gui/gxsforums/CreateGxsForumMsg.cpp @@ -117,6 +117,8 @@ CreateGxsForumMsg::CreateGxsForumMsg(const RsGxsGroupId &fId, const RsGxsMessage mForumCircleLoaded = false; newMsg(); + + ui.hashGroupBox->hide(); #ifndef ENABLE_GENERATE ui.generateCheckBox->hide(); @@ -348,10 +350,13 @@ void CreateGxsForumMsg::checkLength() RsHtml::optimizeHtml(ui.forumMessage, text); std::wstring msg = text.toStdWString(); int charRemains = MAX_ALLOWED_GXS_MESSAGE_SIZE - msg.length(); - if(charRemains >= 0) + if(charRemains >= 0) { text = tr("It remains %1 characters after HTML conversion.").arg(charRemains); - else + ui.infoLabel->setStyleSheet("QLabel#infoLabel { }"); + }else{ text = tr("Warning: This message is too big of %1 characters after HTML conversion.").arg((0-charRemains)); + ui.infoLabel->setStyleSheet("QLabel#infoLabel {color: red; font: bold; }"); + } ui.buttonBox->button(QDialogButtonBox::Ok)->setToolTip(text); ui.buttonBox->button(QDialogButtonBox::Ok)->setEnabled(charRemains>=0); ui.infoLabel->setText(text); @@ -506,6 +511,7 @@ void CreateGxsForumMsg::addFile() QStringList files; if (misc::getOpenFileNames(this, RshareSettings::LASTDIR_EXTRAFILE, tr("Add Extra File"), "", files)) { ui.hashBox->addAttachments(files,RS_FILE_REQ_ANONYMOUS_ROUTING); + ui.hashGroupBox->show(); } } @@ -542,6 +548,7 @@ void CreateGxsForumMsg::fileHashingFinished(QList hashedFiles) } ui.forumMessage->setFocus( Qt::OtherFocusReason ); + ui.hashGroupBox->hide(); } void CreateGxsForumMsg::loadForumInfo(const uint32_t &token) diff --git a/retroshare-gui/src/gui/gxsforums/CreateGxsForumMsg.ui b/retroshare-gui/src/gui/gxsforums/CreateGxsForumMsg.ui index 4c6838558..1e3b45abf 100644 --- a/retroshare-gui/src/gui/gxsforums/CreateGxsForumMsg.ui +++ b/retroshare-gui/src/gui/gxsforums/CreateGxsForumMsg.ui @@ -139,14 +139,17 @@ QFrame::Sunken + + 0 + - 1 + 6 1 - 1 + 6 1 @@ -163,8 +166,8 @@ - - :/images/add-share24.png:/images/add-share24.png + + :/icons/png/attach.png:/icons/png/attach.png @@ -186,8 +189,8 @@ - - :/emojione/1F603.png:/emojione/1F603.png + + :/icons/png/smiley.png:/icons/png/smiley.png diff --git a/retroshare-gui/src/gui/gxsforums/GxsForumModel.cpp b/retroshare-gui/src/gui/gxsforums/GxsForumModel.cpp index c032e87ad..851f6fd16 100644 --- a/retroshare-gui/src/gui/gxsforums/GxsForumModel.cpp +++ b/retroshare-gui/src/gui/gxsforums/GxsForumModel.cpp @@ -56,7 +56,10 @@ void RsGxsForumModel::preMods() } void RsGxsForumModel::postMods() { - emit dataChanged(createIndex(0,0,(void*)NULL), createIndex(0,COLUMN_THREAD_NB_COLUMNS-1,(void*)NULL)); + if(mTreeMode == TREE_MODE_FLAT) + emit dataChanged(createIndex(0,0,(void*)NULL), createIndex(mPosts.size(),COLUMN_THREAD_NB_COLUMNS-1,(void*)NULL)); + else + emit dataChanged(createIndex(0,0,(void*)NULL), createIndex(mPosts[0].mChildren.size(),COLUMN_THREAD_NB_COLUMNS-1,(void*)NULL)); } void RsGxsForumModel::setTreeMode(TreeMode mode) @@ -65,7 +68,21 @@ void RsGxsForumModel::setTreeMode(TreeMode mode) return; preMods(); + + if(mode == TREE_MODE_TREE) // means we were in FLAT mode, so the last rows are removed. + { + beginRemoveRows(QModelIndex(),mPosts[0].mChildren.size(),mPosts.size()-1); + endRemoveRows(); + } + mTreeMode = mode; + + if(mode == TREE_MODE_FLAT) // means we were in tree mode, so the last rows are added. + { + beginInsertRows(QModelIndex(),mPosts[0].mChildren.size(),mPosts.size()-1); + endInsertRows(); + } + postMods(); } @@ -264,12 +281,22 @@ void *RsGxsForumModel::getParentRef(void *ref,int& row) const { ForumModelIndex ref_entry; - if(mTreeMode == TREE_MODE_FLAT) - return NULL; - if(!convertRefPointerToTabEntry(ref,ref_entry) || ref_entry >= mPosts.size()) return NULL ; + if(mTreeMode == TREE_MODE_FLAT) + { + if(ref_entry == 0) + { + RsErr() << "getParentRef() shouldn't be asked for the parent of NULL" << std::endl; + row = 0; + } + else + row = ref_entry-1; + + return NULL; + } + ForumModelIndex parent_entry = mPosts[ref_entry].mParent; if(parent_entry == 0) // top level index @@ -296,11 +323,21 @@ int RsGxsForumModel::getChildrenCount(void *ref) const if(mTreeMode == TREE_MODE_FLAT) if(entry == 0) + { +#ifdef DEBUG_FORUMMODEL + std::cerr << "Children count (flat mode): " << mPosts.size()-1 << std::endl; +#endif return ((int)mPosts.size())-1; + } else return 0; else + { +#ifdef DEBUG_FORUMMODEL + std::cerr << "Children count (tree mode): " << mPosts[entry].mChildren.size() << std::endl; +#endif return mPosts[entry].mChildren.size(); + } } QVariant RsGxsForumModel::headerData(int section, Qt::Orientation /*orientation*/, int role) const @@ -699,7 +736,11 @@ void RsGxsForumModel::setPosts(const RsGxsForumGroup& group, const std::vectorsecond.size();++i) if(it->second[i].second == mid) + { postId = it->first; + break; + } - for(uint32_t i=0;iicons/png/add.png icons/png/attach-image.png icons/png/attach.png - icons/png/cert.png + icons/png/cert.png icons/png/channels-notify.png icons/png/channels.png icons/png/chat-bubble-notify.png @@ -105,6 +105,7 @@ icons/png/netgraph.png icons/png/network-notify.png icons/png/network.png + icons/png/network2.png icons/png/network-puplic.png icons/png/newsfeed-notify.png icons/png/newsfeed.png @@ -261,5 +262,20 @@ icons/png/flame.png icons/png/new.png icons/png/top.png + icons/png/copy.png + icons/png/down-arrow.png + icons/png/download.png + icons/png/up-arrow.png + icons/png/play.png + icons/png/cancel.png + icons/png/correct.png + icons/png/comment.png + icons/png/chats.png + icons/png/fileshare.png + icons/png/forum.png + icons/png/message.png + icons/png/newsfeed2.png + icons/png/postedlinks.png + icons/png/people2.png diff --git a/retroshare-gui/src/gui/icons/png/cancel.png b/retroshare-gui/src/gui/icons/png/cancel.png new file mode 100644 index 000000000..4755b642b Binary files /dev/null and b/retroshare-gui/src/gui/icons/png/cancel.png differ diff --git a/retroshare-gui/src/gui/icons/png/channels-notify.png b/retroshare-gui/src/gui/icons/png/channels-notify.png index df46c8857..a916eebbb 100644 Binary files a/retroshare-gui/src/gui/icons/png/channels-notify.png and b/retroshare-gui/src/gui/icons/png/channels-notify.png differ diff --git a/retroshare-gui/src/gui/icons/png/channels.png b/retroshare-gui/src/gui/icons/png/channels.png index f4460cce9..5fdefc95d 100644 Binary files a/retroshare-gui/src/gui/icons/png/channels.png and b/retroshare-gui/src/gui/icons/png/channels.png differ diff --git a/retroshare-gui/src/gui/icons/png/chats.png b/retroshare-gui/src/gui/icons/png/chats.png new file mode 100644 index 000000000..e6237ce90 Binary files /dev/null and b/retroshare-gui/src/gui/icons/png/chats.png differ diff --git a/retroshare-gui/src/gui/icons/png/comment.png b/retroshare-gui/src/gui/icons/png/comment.png new file mode 100644 index 000000000..28d18c2b7 Binary files /dev/null and b/retroshare-gui/src/gui/icons/png/comment.png differ diff --git a/retroshare-gui/src/gui/icons/png/copy.png b/retroshare-gui/src/gui/icons/png/copy.png new file mode 100644 index 000000000..b225ff4aa Binary files /dev/null and b/retroshare-gui/src/gui/icons/png/copy.png differ diff --git a/retroshare-gui/src/gui/icons/png/correct.png b/retroshare-gui/src/gui/icons/png/correct.png new file mode 100644 index 000000000..1d3d3f388 Binary files /dev/null and b/retroshare-gui/src/gui/icons/png/correct.png differ diff --git a/retroshare-gui/src/gui/icons/png/down-arrow.png b/retroshare-gui/src/gui/icons/png/down-arrow.png new file mode 100644 index 000000000..ac5d3a4c7 Binary files /dev/null and b/retroshare-gui/src/gui/icons/png/down-arrow.png differ diff --git a/retroshare-gui/src/gui/icons/png/download.png b/retroshare-gui/src/gui/icons/png/download.png new file mode 100644 index 000000000..38414dfc9 Binary files /dev/null and b/retroshare-gui/src/gui/icons/png/download.png differ diff --git a/retroshare-gui/src/gui/icons/png/fileshare.png b/retroshare-gui/src/gui/icons/png/fileshare.png new file mode 100644 index 000000000..3caa28411 Binary files /dev/null and b/retroshare-gui/src/gui/icons/png/fileshare.png differ diff --git a/retroshare-gui/src/gui/icons/png/forum.png b/retroshare-gui/src/gui/icons/png/forum.png new file mode 100644 index 000000000..a29de6fd8 Binary files /dev/null and b/retroshare-gui/src/gui/icons/png/forum.png differ diff --git a/retroshare-gui/src/gui/icons/png/message.png b/retroshare-gui/src/gui/icons/png/message.png new file mode 100644 index 000000000..ae9da7e01 Binary files /dev/null and b/retroshare-gui/src/gui/icons/png/message.png differ diff --git a/retroshare-gui/src/gui/icons/png/network2.png b/retroshare-gui/src/gui/icons/png/network2.png new file mode 100644 index 000000000..eafc2c095 Binary files /dev/null and b/retroshare-gui/src/gui/icons/png/network2.png differ diff --git a/retroshare-gui/src/gui/icons/png/newsfeed2.png b/retroshare-gui/src/gui/icons/png/newsfeed2.png new file mode 100644 index 000000000..0f1c4f59f Binary files /dev/null and b/retroshare-gui/src/gui/icons/png/newsfeed2.png differ diff --git a/retroshare-gui/src/gui/icons/png/people-notify.png b/retroshare-gui/src/gui/icons/png/people-notify.png index 2a0b75a78..919364920 100644 Binary files a/retroshare-gui/src/gui/icons/png/people-notify.png and b/retroshare-gui/src/gui/icons/png/people-notify.png differ diff --git a/retroshare-gui/src/gui/icons/png/people.png b/retroshare-gui/src/gui/icons/png/people.png index b9eb7e656..7de000c34 100644 Binary files a/retroshare-gui/src/gui/icons/png/people.png and b/retroshare-gui/src/gui/icons/png/people.png differ diff --git a/retroshare-gui/src/gui/icons/png/people2.png b/retroshare-gui/src/gui/icons/png/people2.png new file mode 100644 index 000000000..6934b9ee3 Binary files /dev/null and b/retroshare-gui/src/gui/icons/png/people2.png differ diff --git a/retroshare-gui/src/gui/icons/png/play.png b/retroshare-gui/src/gui/icons/png/play.png new file mode 100644 index 000000000..3268aa2e6 Binary files /dev/null and b/retroshare-gui/src/gui/icons/png/play.png differ diff --git a/retroshare-gui/src/gui/icons/png/postedlinks.png b/retroshare-gui/src/gui/icons/png/postedlinks.png new file mode 100644 index 000000000..16875a376 Binary files /dev/null and b/retroshare-gui/src/gui/icons/png/postedlinks.png differ diff --git a/retroshare-gui/src/gui/icons/png/up-arrow.png b/retroshare-gui/src/gui/icons/png/up-arrow.png new file mode 100644 index 000000000..34de4aba3 Binary files /dev/null and b/retroshare-gui/src/gui/icons/png/up-arrow.png differ diff --git a/retroshare-gui/src/gui/icons/svg/channels-notify.svg b/retroshare-gui/src/gui/icons/svg/channels-notify.svg index 1219e4988..d0a4e0dee 100644 --- a/retroshare-gui/src/gui/icons/svg/channels-notify.svg +++ b/retroshare-gui/src/gui/icons/svg/channels-notify.svg @@ -2,7 +2,6 @@ image/svg+xml \ No newline at end of file + style="fill:#ffffff;stroke-width:0.79999691" + d="m 248.98415,94.44643 -0.0187,0.1875 c -0.34688,3.29687 -3.79998,32.62175 -18.05618,47.53732 -16.47808,17.54368 -35.15926,19.67492 -44.14359,20.69679 -0.74376,0.0844 -1.425,0.1625 -2.03437,0.24375 l -0.71563,0.075 c -54.14979,3.93749 -135.927597,4.47498 -136.746347,4.47811 l -0.07189,0.003 -0.0719,-0.003 c -0.81875,-0.003 -82.59655,-0.54062 -137.233842,-4.4781 l -0.721873,-0.075 c -0.581218,-0.0781 -1.22184,-0.15003 -1.918712,-0.23128 -8.881216,-1.02499 -27.362396,-3.15936 -43.887326,-21.33741 -13.57808,-14.7562 -17.50306,-43.45296 -17.90618,-46.67795 l -0.0469,-0.41875 c -0.12187,-1.37187 -3.01249,-34.031118 -3.01249,-66.818486 v -30.64988 c 0,-32.78738 2.89062,-65.44662 3.01249,-66.82162 l 0.0219,-0.20624 c 0.34687,-3.24374 3.79686,-32.031134 17.98743,-46.952954 15.49369,-16.95618 35.08423,-19.19992 45.621694,-20.40617 1.665619,-0.19063 3.099988,-0.35312 4.078109,-0.525 l 0.946872,-0.13124 c 31.265508,-2.975 129.293238,-4.44061 133.449478,-4.49999 l 0.125,-0.003 0.125,0.003 c 0.81875,0.003 82.593427,0.54063 136.743217,4.47811 l 0.71562,0.075 c 0.68437,0.0906 1.45312,0.17188 2.29687,0.25938 8.83121,0.93749 27.21239,2.88436 43.5092,20.81554 13.57807,14.75932 17.50619,43.456084 17.90618,46.677944 l 0.0469,0.41874 c 0.12188,1.375 3.01562,34.03112 3.01562,66.8185 v 30.64988 c -0.003,32.787408 -2.89375,65.443536 -3.01563,66.818526 z M 227.99362,-3.021936 c 0,-30.34675 -2.65,-61.59976 -2.9,-64.4685 -1.01874,-7.90309 -5.15936,-26.05928 -11.77495,-33.249874 -10.19996,-11.22183 -20.67804,-12.33433 -28.32801,-13.1437 -0.925,-0.0969 -1.78125,-0.19063 -2.55624,-0.2875 -52.3748,-3.78749 -131.065117,-4.36873 -134.690107,-4.39061 -4.06561,0.0594 -100.65898,1.53749 -130.97136,4.35311 -1.553118,0.25313 -3.231236,0.44688 -4.99998,0.64688 -8.97184,1.02811 -21.253043,2.43437 -30.696753,12.82182 l -0.22188,0.2375 c -6.49997,6.771854 -10.52183,23.749914 -11.5437,32.918614 -0.19063,2.16875 -2.90937,33.79051 -2.90937,64.56226 v 30.64988 c 0,30.312376 2.64374,61.531006 2.89999,64.459126 1.21562,9.30934 5.43436,26.36552 11.77496,33.25924 10.51246,11.56246 21.596789,12.8437 28.928009,13.69058 0.699998,0.0812 1.353121,0.15624 1.956244,0.23437 53.13729,3.80623 132.39323,4.37186 135.23697,4.39373 2.84374,-0.0187 82.071557,-0.5875 134.736977,-4.39373 0.64688,-0.0812 1.35312,-0.1625 2.11249,-0.25 7.54059,-0.85937 18.93743,-2.15937 29.39676,-13.31557 l 0.0969,-0.10313 c 6.49997,-6.77185 10.52183,-24.04678 11.5437,-33.39987 0.18125,-2.04686 2.90937,-33.73737 2.90937,-64.574746 z m 0,0" + id="path24" /> \ No newline at end of file diff --git a/retroshare-gui/src/gui/icons/svg/chats.svg b/retroshare-gui/src/gui/icons/svg/chats.svg new file mode 100644 index 000000000..fd8763804 --- /dev/null +++ b/retroshare-gui/src/gui/icons/svg/chats.svg @@ -0,0 +1,64 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/retroshare-gui/src/gui/icons/svg/fileshare.svg b/retroshare-gui/src/gui/icons/svg/fileshare.svg new file mode 100644 index 000000000..bc10e769d --- /dev/null +++ b/retroshare-gui/src/gui/icons/svg/fileshare.svg @@ -0,0 +1,105 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/retroshare-gui/src/gui/icons/svg/forum.svg b/retroshare-gui/src/gui/icons/svg/forum.svg new file mode 100644 index 000000000..38b647f4f --- /dev/null +++ b/retroshare-gui/src/gui/icons/svg/forum.svg @@ -0,0 +1,54 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/retroshare-gui/src/gui/icons/svg/message.svg b/retroshare-gui/src/gui/icons/svg/message.svg new file mode 100644 index 000000000..81fcd8254 --- /dev/null +++ b/retroshare-gui/src/gui/icons/svg/message.svg @@ -0,0 +1,69 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/retroshare-gui/src/gui/icons/svg/newsfeed2.svg b/retroshare-gui/src/gui/icons/svg/newsfeed2.svg new file mode 100644 index 000000000..dc0bc96ea --- /dev/null +++ b/retroshare-gui/src/gui/icons/svg/newsfeed2.svg @@ -0,0 +1,69 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/retroshare-gui/src/gui/icons/svg/people.svg b/retroshare-gui/src/gui/icons/svg/people.svg index 3ea6a2e19..5afff47a8 100644 --- a/retroshare-gui/src/gui/icons/svg/people.svg +++ b/retroshare-gui/src/gui/icons/svg/people.svg @@ -11,7 +11,7 @@ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" id="svg4155" version="1.1" - inkscape:version="0.91 r13725" + inkscape:version="0.92.3 (2405546, 2018-03-11)" xml:space="preserve" width="80" height="80" @@ -19,7 +19,7 @@ sodipodi:docname="people.svg">image/svg+xml \ No newline at end of file + d="m 48.355,17.922 c 3.705,2.323 6.303,6.254 6.776,10.817 1.511,0.706 3.188,1.112 4.966,1.112 6.491,0 11.752,-5.261 11.752,-11.751 0,-6.491 -5.261,-11.752 -11.752,-11.752 -6.429,0.002 -11.644,5.169 -11.742,11.574 z m -7.699,24.062 c 6.491,0 11.752,-5.262 11.752,-11.752 0,-6.49 -5.262,-11.751 -11.752,-11.751 -6.49,0 -11.754,5.262 -11.754,11.752 0,6.49 5.264,11.751 11.754,11.751 z m 4.985,0.801 h -9.972 c -8.297,0 -15.047,6.751 -15.047,15.048 v 12.195 l 0.031,0.191 0.84,0.263 c 7.918,2.474 14.797,3.299 20.459,3.299 11.059,0 17.469,-3.153 17.864,-3.354 l 0.785,-0.397 h 0.084 V 57.833 C 60.688,49.536 53.938,42.785 45.641,42.785 Z M 65.084,30.653 h -9.895 c -0.107,3.959 -1.797,7.524 -4.47,10.088 7.375,2.193 12.771,9.032 12.771,17.11 v 3.758 c 9.77,-0.358 15.4,-3.127 15.771,-3.313 l 0.785,-0.398 H 80.13 V 45.699 c 0,-8.296 -6.75,-15.046 -15.046,-15.046 z m -45.049,-0.8 c 2.299,0 4.438,-0.671 6.25,-1.814 0.576,-3.757 2.59,-7.04 5.467,-9.276 0.012,-0.22 0.033,-0.438 0.033,-0.66 0,-6.491 -5.262,-11.752 -11.75,-11.752 -6.492,0 -11.752,5.261 -11.752,11.752 0,6.488 5.26,11.75 11.752,11.75 z M 30.589,40.741 C 27.929,38.19 26.245,34.644 26.122,30.709 25.755,30.682 25.392,30.653 25.018,30.653 H 15.047 C 6.75,30.653 0,37.403 0,45.699 v 12.197 l 0.031,0.188 0.84,0.265 c 6.352,1.983 12.021,2.897 16.945,3.185 v -3.683 c 0.002,-8.078 5.396,-14.915 12.773,-17.11 z" + id="path2" + style="fill:#f9f9f9" /> \ No newline at end of file diff --git a/retroshare-gui/src/gui/icons/svg/people2.svg b/retroshare-gui/src/gui/icons/svg/people2.svg new file mode 100644 index 000000000..06badb8a1 --- /dev/null +++ b/retroshare-gui/src/gui/icons/svg/people2.svg @@ -0,0 +1,56 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/retroshare-gui/src/gui/icons/svg/postedlinks.svg b/retroshare-gui/src/gui/icons/svg/postedlinks.svg new file mode 100644 index 000000000..e509c7e32 --- /dev/null +++ b/retroshare-gui/src/gui/icons/svg/postedlinks.svg @@ -0,0 +1,74 @@ + +image/svg+xml \ No newline at end of file diff --git a/retroshare-gui/src/gui/msgs/MessagesDialog.ui b/retroshare-gui/src/gui/msgs/MessagesDialog.ui index 134621e7e..8c830e042 100644 --- a/retroshare-gui/src/gui/msgs/MessagesDialog.ui +++ b/retroshare-gui/src/gui/msgs/MessagesDialog.ui @@ -324,7 +324,7 @@ - :/icons/png/messages.png + :/icons/png/message.png true diff --git a/retroshare-gui/src/gui/qss/stylesheet/Standard.qss b/retroshare-gui/src/gui/qss/stylesheet/Standard.qss index 99d4aa59e..05670f863 100644 --- a/retroshare-gui/src/gui/qss/stylesheet/Standard.qss +++ b/retroshare-gui/src/gui/qss/stylesheet/Standard.qss @@ -2,7 +2,7 @@ /* Standard rules */ -QFrame#toolBarFrame { +QFrame#toolBarFrame, QFrame#toolBarFrameTop { background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #FEFEFE, stop:1 #E8E8E8); border: 1px solid #CCCCCC; } diff --git a/retroshare-gui/src/gui/settings/ChatPage.cpp b/retroshare-gui/src/gui/settings/ChatPage.cpp index 1c54000bc..a17aa57d4 100644 --- a/retroshare-gui/src/gui/settings/ChatPage.cpp +++ b/retroshare-gui/src/gui/settings/ChatPage.cpp @@ -166,14 +166,18 @@ void ChatPage::updateHistoryParams() Settings->setPublicChatHistoryCount(ui.publicChatLoadCount->value()); Settings->setPrivateChatHistoryCount(ui.privateChatLoadCount->value()); Settings->setLobbyChatHistoryCount(ui.lobbyChatLoadCount->value()); + Settings->setDistantChatHistoryCount(ui.distantChatLoadCount->value()); rsHistory->setEnable(RS_HISTORY_TYPE_PUBLIC , ui.publicChatEnable->isChecked()); rsHistory->setEnable(RS_HISTORY_TYPE_PRIVATE, ui.privateChatEnable->isChecked()); rsHistory->setEnable(RS_HISTORY_TYPE_LOBBY , ui.lobbyChatEnable->isChecked()); + rsHistory->setEnable(RS_HISTORY_TYPE_DISTANT, ui.distantChatEnable->isChecked()); rsHistory->setSaveCount(RS_HISTORY_TYPE_PUBLIC , ui.publicChatSaveCount->value()); rsHistory->setSaveCount(RS_HISTORY_TYPE_PRIVATE, ui.privateChatSaveCount->value()); rsHistory->setSaveCount(RS_HISTORY_TYPE_LOBBY , ui.lobbyChatSaveCount->value()); + rsHistory->setSaveCount(RS_HISTORY_TYPE_DISTANT, ui.distantChatSaveCount->value()); + } void ChatPage::updatePublicStyle() @@ -247,13 +251,19 @@ ChatPage::ChatPage(QWidget * parent, Qt::WindowFlags flags) connect(ui.publicChatLoadCount, SIGNAL(valueChanged(int)), this, SLOT(updateHistoryParams())); connect(ui.privateChatLoadCount, SIGNAL(valueChanged(int)), this, SLOT(updateHistoryParams())); + connect(ui.distantChatLoadCount, SIGNAL(valueChanged(int)), this, SLOT(updateHistoryParams())); connect(ui.lobbyChatLoadCount, SIGNAL(valueChanged(int)), this, SLOT(updateHistoryParams())); + connect(ui.publicChatEnable, SIGNAL(toggled(bool)), this, SLOT(updateHistoryParams())); connect(ui.privateChatEnable, SIGNAL(toggled(bool)), this, SLOT(updateHistoryParams())); + connect(ui.distantChatEnable, SIGNAL(toggled(bool)), this, SLOT(updateHistoryParams())); connect(ui.lobbyChatEnable, SIGNAL(toggled(bool)), this, SLOT(updateHistoryParams())); + connect(ui.publicChatSaveCount, SIGNAL(valueChanged(int)), this, SLOT(updateHistoryParams())); connect(ui.privateChatSaveCount, SIGNAL(valueChanged(int)), this, SLOT(updateHistoryParams())); connect(ui.lobbyChatSaveCount, SIGNAL(valueChanged(int)), this, SLOT(updateHistoryParams())); + connect(ui.distantChatSaveCount, SIGNAL(valueChanged(int)), this, SLOT(updateHistoryParams())); + connect(ui.publicStyle, SIGNAL(currentIndexChanged(int)), this, SLOT(updatePublicStyle())) ; connect(ui.publicComboBoxVariant, SIGNAL(currentIndexChanged(int)), this, SLOT(updatePublicStyle())) ; @@ -349,14 +359,18 @@ ChatPage::load() whileBlocking(ui.publicChatLoadCount)->setValue(Settings->getPublicChatHistoryCount()); whileBlocking(ui.privateChatLoadCount)->setValue(Settings->getPrivateChatHistoryCount()); whileBlocking(ui.lobbyChatLoadCount)->setValue(Settings->getLobbyChatHistoryCount()); + whileBlocking(ui.distantChatLoadCount)->setValue(Settings->getDistantChatHistoryCount()); whileBlocking(ui.publicChatEnable)->setChecked(rsHistory->getEnable(RS_HISTORY_TYPE_PUBLIC)); whileBlocking(ui.privateChatEnable)->setChecked(rsHistory->getEnable(RS_HISTORY_TYPE_PRIVATE)); whileBlocking(ui.lobbyChatEnable)->setChecked(rsHistory->getEnable(RS_HISTORY_TYPE_LOBBY)); + whileBlocking(ui.distantChatEnable)->setChecked(rsHistory->getEnable(RS_HISTORY_TYPE_DISTANT)); whileBlocking(ui.publicChatSaveCount)->setValue(rsHistory->getSaveCount(RS_HISTORY_TYPE_PUBLIC)); whileBlocking(ui.privateChatSaveCount)->setValue(rsHistory->getSaveCount(RS_HISTORY_TYPE_PRIVATE)); whileBlocking(ui.lobbyChatSaveCount)->setValue(rsHistory->getSaveCount(RS_HISTORY_TYPE_LOBBY)); + whileBlocking(ui.distantChatSaveCount)->setValue(rsHistory->getSaveCount(RS_HISTORY_TYPE_DISTANT)); + // using fontTempChat.rawname() does not always work! // see http://doc.qt.digia.com/qt-maemo/qfont.html#rawName diff --git a/retroshare-gui/src/gui/settings/ChatPage.ui b/retroshare-gui/src/gui/settings/ChatPage.ui index 1d18eb42f..9484cc4c6 100644 --- a/retroshare-gui/src/gui/settings/ChatPage.ui +++ b/retroshare-gui/src/gui/settings/ChatPage.ui @@ -6,8 +6,8 @@ 0 0 - 1216 - 1127 + 800 + 600 @@ -598,8 +598,21 @@ - - + + + + Qt::LeftToRight + + + Enabled: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + 75 @@ -607,7 +620,7 @@ - Group chat + Chatlobbies @@ -624,8 +637,8 @@ - - + + 75 @@ -633,20 +646,7 @@ - Chatlobbies - - - - - - - Qt::LeftToRight - - - Enabled: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + Group chat @@ -657,20 +657,6 @@ - - - - - - - - - - - - - - @@ -681,6 +667,13 @@ + + + + + + + @@ -700,27 +693,15 @@ - - - - - 60 - 16777215 - - - + + + - - - - - 1000000000 - - - + + 60 @@ -761,6 +742,25 @@ + + + + + 60 + 16777215 + + + + + + + + + + 1000000000 + + + @@ -774,7 +774,7 @@ - + @@ -787,6 +787,32 @@ + + + + + 75 + true + + + + Distant chat + + + + + + + + + + + + + + + + @@ -866,7 +892,7 @@ QTabWidget::North - 2 + 0 diff --git a/retroshare-gui/src/gui/settings/rsharesettings.cpp b/retroshare-gui/src/gui/settings/rsharesettings.cpp index f63341e7a..873438d70 100644 --- a/retroshare-gui/src/gui/settings/rsharesettings.cpp +++ b/retroshare-gui/src/gui/settings/rsharesettings.cpp @@ -728,6 +728,16 @@ void RshareSettings::setPrivateChatHistoryCount(int value) setValueToGroup("Chat", "PrivateChatHistoryCount", value); } +int RshareSettings::getDistantChatHistoryCount() +{ + return valueFromGroup("Chat", "DistantChatHistoryCount", 20).toInt(); +} + +void RshareSettings::setDistantChatHistoryCount(int value) +{ + setValueToGroup("Chat", "DistantChatHistoryCount", value); +} + /** Returns true if RetroShare is set to run on system boot. */ bool RshareSettings::runRetroshareOnBoot(bool &minimized) diff --git a/retroshare-gui/src/gui/settings/rsharesettings.h b/retroshare-gui/src/gui/settings/rsharesettings.h index 1102fe28b..32f9f169f 100644 --- a/retroshare-gui/src/gui/settings/rsharesettings.h +++ b/retroshare-gui/src/gui/settings/rsharesettings.h @@ -273,6 +273,9 @@ public: int getLobbyChatHistoryCount(); void setLobbyChatHistoryCount(int value); + + int getDistantChatHistoryCount(); + void setDistantChatHistoryCount(int value); //! Save placement, state and size information of a window. void saveWidgetInformation(QWidget *widget); diff --git a/retroshare-gui/src/gui/statistics/GlobalRouterStatistics.cpp b/retroshare-gui/src/gui/statistics/GlobalRouterStatistics.cpp index 85adb8293..0a992353b 100644 --- a/retroshare-gui/src/gui/statistics/GlobalRouterStatistics.cpp +++ b/retroshare-gui/src/gui/statistics/GlobalRouterStatistics.cpp @@ -18,6 +18,7 @@ * * *******************************************************************************/ +#include #include #include #include @@ -39,6 +40,9 @@ #include "gui/Identity/IdDetailsDialog.h" #include "gui/settings/rsharesettings.h" +#include "gui/gxs/GxsIdDetails.h" +#include "gui/gxs/GxsIdTreeWidgetItem.h" +#include "util/DateTime.h" #include "util/QtVersion.h" #include "util/misc.h" @@ -49,9 +53,11 @@ #define COL_TUNNELSTATUS 4 #define COL_DATASIZE 5 #define COL_DATAHASH 6 -#define COL_RECEIVED 7 -#define COL_SEND 8 +#define COL_RECEIVED 7 +#define COL_SEND 8 #define COL_DUPLICATION_FACTOR 9 +#define COL_RECEIVEDTIME 10 +#define COL_SENDTIME 11 static const int PARTIAL_VIEW_SIZE = 9 ; //static const int MAX_TUNNEL_REQUESTS_DISPLAY = 10 ; @@ -65,7 +71,7 @@ static QColor colorScale(float f) } GlobalRouterStatistics::GlobalRouterStatistics(QWidget *parent) - : RsAutoUpdatePage(2000,parent) + : RsAutoUpdatePage(4000,parent) { setupUi(this) ; @@ -168,7 +174,8 @@ void GlobalRouterStatistics::updateContent() for(uint32_t i=0;iaddTopLevelItem(item); RsIdentityDetails details ; @@ -177,7 +184,13 @@ void GlobalRouterStatistics::updateContent() if(nicknames.isEmpty()) nicknames = tr("Unknown"); - + + QDateTime routingtime; + routingtime.setTime_t(cache_infos[i].routing_time); + QDateTime senttime; + senttime.setTime_t(cache_infos[i].last_sent_time); + + item -> setId(cache_infos[i].destination,COL_NICKNAME, false) ; item -> setData(COL_ID, Qt::DisplayRole, QString::number(cache_infos[i].mid,16).rightJustified(16,'0')); item -> setData(COL_NICKNAME, Qt::DisplayRole, nicknames ) ; item -> setData(COL_DESTINATION, Qt::DisplayRole, QString::fromStdString(cache_infos[i].destination.toStdString())); @@ -185,9 +198,11 @@ void GlobalRouterStatistics::updateContent() item -> setData(COL_TUNNELSTATUS, Qt::DisplayRole, tunnel_status_string[cache_infos[i].tunnel_status % 3]); item -> setData(COL_DATASIZE, Qt::DisplayRole, misc::friendlyUnit(cache_infos[i].data_size)); item -> setData(COL_DATAHASH, Qt::DisplayRole, QString::fromStdString(cache_infos[i].item_hash.toStdString())); - item -> setData(COL_RECEIVED, Qt::DisplayRole, QString::number(now - cache_infos[i].routing_time)); - item -> setData(COL_SEND, Qt::DisplayRole, QString::number(now - cache_infos[i].last_sent_time)); - item -> setData(COL_DUPLICATION_FACTOR, Qt::DisplayRole, QString::number(cache_infos[i].duplication_factor)); + item -> setData(COL_RECEIVED, Qt::DisplayRole, DateTime::formatDateTime(routingtime)); + item -> setData(COL_SEND, Qt::DisplayRole, DateTime::formatDateTime(senttime)); + item -> setData(COL_DUPLICATION_FACTOR, Qt::DisplayRole, QString::number(cache_infos[i].duplication_factor)); + item -> setData(COL_RECEIVEDTIME, Qt::DisplayRole, QString::number(now - cache_infos[i].routing_time)); + item -> setData(COL_SENDTIME, Qt::DisplayRole, QString::number(now - cache_infos[i].last_sent_time)); } } diff --git a/retroshare-gui/src/gui/statistics/GlobalRouterStatistics.ui b/retroshare-gui/src/gui/statistics/GlobalRouterStatistics.ui index 1a5133251..83de70e5b 100644 --- a/retroshare-gui/src/gui/statistics/GlobalRouterStatistics.ui +++ b/retroshare-gui/src/gui/statistics/GlobalRouterStatistics.ui @@ -91,6 +91,21 @@ Data hash + + + Receive time + + + + + Sending time + + + + + Branching factor + + Receive time (secs ago) @@ -101,11 +116,6 @@ Sending time (secs ago) - - - Branching factor - - diff --git a/retroshare-gui/src/gui/statistics/GxsTransportStatistics.cpp b/retroshare-gui/src/gui/statistics/GxsTransportStatistics.cpp index 87b59cb16..b5a42264e 100644 --- a/retroshare-gui/src/gui/statistics/GxsTransportStatistics.cpp +++ b/retroshare-gui/src/gui/statistics/GxsTransportStatistics.cpp @@ -33,7 +33,6 @@ #include #include - #include #include #include @@ -47,6 +46,8 @@ #include "gui/common/UIStateHelper.h" #include "util/misc.h" #include "gui/gxs/GxsIdLabel.h" +#include "gui/gxs/GxsIdDetails.h" +#include "gui/gxs/GxsIdTreeWidgetItem.h" #define COL_PENDING_ID 0 #define COL_PENDING_DESTINATION 1 @@ -55,6 +56,8 @@ #define COL_PENDING_DATAHASH 4 #define COL_PENDING_SEND 5 #define COL_PENDING_GROUP_ID 6 +#define COL_PENDING_SENDTIME 7 +#define COL_PENDING_DESTINATION_ID 8 #define COL_GROUP_GRP_ID 0 #define COL_GROUP_NUM_MSGS 1 @@ -89,9 +92,11 @@ GxsTransportStatistics::GxsTransportStatistics(QWidget *parent) /* Set header resize modes and initial section sizes Uploads TreeView*/ QHeaderView_setSectionResizeMode(treeWidget->header(), QHeaderView::ResizeToContents); + QHeaderView_setSectionResizeMode(groupTreeWidget->header(), QHeaderView::ResizeToContents); connect(treeWidget, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(CustomPopupMenu(QPoint))); - + + treeWidget->setColumnHidden(COL_PENDING_DESTINATION_ID,true); // load settings processSettings(true); @@ -204,6 +209,8 @@ void GxsTransportStatistics::updateContent() //time_t now = time(NULL) ; // 1 - fill the table for pending packets + + time_t now = time(NULL) ; groupBox->setTitle(tr("Pending data items")+": " + QString::number(transinfo.outgoing_records.size()) ); @@ -211,7 +218,8 @@ void GxsTransportStatistics::updateContent() { const RsGxsTransOutgoingRecord& rec(transinfo.outgoing_records[i]) ; - QTreeWidgetItem *item = new QTreeWidgetItem(); + //QTreeWidgetItem *item = new QTreeWidgetItem(); + GxsIdRSTreeWidgetItem *item = new GxsIdRSTreeWidgetItem(NULL,GxsIdDetails::ICON_TYPE_AVATAR) ; treeWidget->addTopLevelItem(item); RsIdentityDetails details ; @@ -221,17 +229,19 @@ void GxsTransportStatistics::updateContent() if(nickname.isEmpty()) nickname = tr("Unknown"); + item -> setId(rec.recipient,COL_PENDING_DESTINATION, false) ; item -> setData(COL_PENDING_ID, Qt::DisplayRole, QString::number(rec.trans_id,16).rightJustified(8,'0')); item -> setData(COL_PENDING_DATASTATUS, Qt::DisplayRole, getStatusString(rec.status)); item -> setData(COL_PENDING_DATASIZE, Qt::DisplayRole, misc::friendlyUnit(rec.data_size)); item -> setData(COL_PENDING_DATAHASH, Qt::DisplayRole, QString::fromStdString(rec.data_hash.toStdString())); item -> setData(COL_PENDING_SEND, Qt::DisplayRole, QDateTime::fromTime_t(rec.send_TS).toString()); item -> setData(COL_PENDING_GROUP_ID, Qt::DisplayRole, QString::fromStdString(rec.group_id.toStdString())); + item -> setData(COL_PENDING_DESTINATION_ID, Qt::DisplayRole, QString::fromStdString(rec.recipient.toStdString())); + item -> setData(COL_PENDING_SENDTIME, Qt::DisplayRole, QString::number(now - rec.send_TS)); - GxsIdLabel *label = new GxsIdLabel() ; - label->setId(rec.recipient) ; + item->setTextAlignment(COL_PENDING_DATASIZE, Qt::AlignRight ); + item->setTextAlignment(COL_PENDING_SEND, Qt::AlignRight ); - treeWidget -> setItemWidget(item,COL_PENDING_DESTINATION, label) ; } // 2 - fill the table for pending group data @@ -293,6 +303,16 @@ void GxsTransportStatistics::updateContent() GxsIdLabel *label = new GxsIdLabel(); label->setId(meta.mAuthorId) ; groupTreeWidget->setItemWidget(sitem,COL_GROUP_GRP_ID,label) ; + + RsIdentityDetails idDetails ; + rsIdentity->getIdDetails(meta.mAuthorId,idDetails); + + QPixmap pixmap ; + + if(idDetails.mAvatar.mSize == 0 || !GxsIdDetails::loadPixmapFromData(idDetails.mAvatar.mData, idDetails.mAvatar.mSize, pixmap,GxsIdDetails::SMALL)) + pixmap = GxsIdDetails::makeDefaultIcon(meta.mAuthorId,GxsIdDetails::SMALL); + + sitem->setIcon(COL_GROUP_GRP_ID, QIcon(pixmap)); sitem->setData(COL_GROUP_UNIQUE_ID, Qt::DisplayRole,QString::fromStdString(meta.mMsgId.toStdString())); sitem->setData(COL_GROUP_NUM_MSGS,Qt::DisplayRole, QDateTime::fromTime_t(meta.mPublishTs).toString()); @@ -303,7 +323,7 @@ void GxsTransportStatistics::updateContent() void GxsTransportStatistics::personDetails() { QTreeWidgetItem *item = treeWidget->currentItem(); - std::string id = item->text(COL_PENDING_DESTINATION).toStdString(); + std::string id = item->text(COL_PENDING_DESTINATION_ID).toStdString(); if (id.empty()) { return; diff --git a/retroshare-gui/src/gui/statistics/GxsTransportStatistics.ui b/retroshare-gui/src/gui/statistics/GxsTransportStatistics.ui index 07b726275..e2c7449c0 100644 --- a/retroshare-gui/src/gui/statistics/GxsTransportStatistics.ui +++ b/retroshare-gui/src/gui/statistics/GxsTransportStatistics.ui @@ -70,7 +70,7 @@ - Sending time (secs ago) + Sending time @@ -78,6 +78,16 @@ Group ID + + + Sending time (secs ago) + + + + + Destination ID + + @@ -95,6 +105,9 @@ Qt::Vertical + + Qt::CustomContextMenu + Group ID / Author diff --git a/retroshare-gui/src/rshare.cpp b/retroshare-gui/src/rshare.cpp index 872273613..3898a899a 100644 --- a/retroshare-gui/src/rshare.cpp +++ b/retroshare-gui/src/rshare.cpp @@ -241,6 +241,11 @@ Rshare::Rshare(QStringList args, int &argc, char **argv, const QString &dir) localServer= new QLocalServer(); QObject::connect(localServer, SIGNAL(newConnection()), this, SLOT(slotConnectionEstablished())); updateLocalServer(); + // clear out any old arguments (race condition?) + QSharedMemory newArgs; + newArgs.setKey(QString(TARGET) + "_newArgs"); + if(newArgs.attach(QSharedMemory::ReadWrite)) + newArgs.detach(); } } @@ -325,20 +330,27 @@ Rshare::~Rshare() */ void Rshare::slotConnectionEstablished() { - QLocalSocket *socket = localServer->nextPendingConnection(); - socket->close(); - delete socket; - QSharedMemory newArgs; newArgs.setKey(QString(TARGET) + "_newArgs"); + QLocalSocket *socket = localServer->nextPendingConnection(); + if (!newArgs.attach()) { - std::cerr << "(EE) Rshare::slotConnectionEstablished() Unable to attach to shared memory segment." - << newArgs.errorString().toStdString() << std::endl; + /* this is not an error. It just means we were notified to check + newArgs, but none had been set yet. + TODO: implement separate ping/take messages + std::cerr << "(EE) Rshare::slotConnectionEstablished() Unable to attach to shared memory segment." + << newArgs.errorString().toStdString() << std::endl; + */ + socket->close(); + delete socket; return; } + socket->close(); + delete socket; + QBuffer buffer; QDataStream in(&buffer); QStringList args; diff --git a/retroshare.pri b/retroshare.pri index b43736a0c..dcb9dc4cb 100644 --- a/retroshare.pri +++ b/retroshare.pri @@ -32,13 +32,13 @@ no_retroshare_gui:CONFIG -= retroshare_gui # Enable GXS distant syncronization CONFIG *= gxsdistsync -# To disable RetroShare-nogui append the following -# assignation to qmake command line "CONFIG+=no_retroshare_nogui" +# To enable RetroShare-nogui append the following +# assignation to qmake command line "CONFIG+=retroshare_nogui" CONFIG *= no_retroshare_nogui retroshare_nogui:CONFIG -= no_retroshare_nogui -# To disable cmark append the following -# assignation to qmake command line "CONFIG+=no_cmark" +# To enable cmark append the following +# assignation to qmake command line "CONFIG+=rs_gui_cmark" CONFIG *= no_rs_gui_cmark rs_gui_cmark:CONFIG -= no_rs_gui_cmark @@ -63,18 +63,19 @@ retroshare_android_notify_service:CONFIG -= no_retroshare_android_notify_service CONFIG *= no_retroshare_qml_app retroshare_qml_app:CONFIG -= no_retroshare_qml_app -# To enable RetroShare service append the following assignation to -# qmake command line "CONFIG+=retroshare_service" +# To disable RetroShare service append the following assignation to +# qmake command line "CONFIG+=no_retroshare_service" CONFIG *= retroshare_service -retroshare_service:CONFIG -= no_retroshare_service +no_retroshare_service:CONFIG -= retroshare_service # To enable libresapi (deprecated) append the following assignation to qmake command line +# "CONFIG+=libresapi" CONFIG+=no_libresapi libresapi:CONFIG -= no_libresapi # To enable libresapi via local socket (unix domain socket or windows named # pipes) append the following assignation to qmake command line -#"CONFIG+=libresapilocalserver" +# "CONFIG+=libresapilocalserver" CONFIG *= no_libresapilocalserver libresapilocalserver:CONFIG -= no_libresapilocalserver @@ -83,8 +84,8 @@ libresapilocalserver:CONFIG -= no_libresapilocalserver CONFIG *= no_libresapi_settings libresapi_settings:CONFIG -= no_libresapi_settings -# To disable libresapi via HTTP (based on libmicrohttpd) append the following -# assignation to qmake command line "CONFIG+=no_libresapihttpserver" +# To enable libresapi via HTTP (based on libmicrohttpd) append the following +# assignation to qmake command line "CONFIG+=libresapihttpserver" CONFIG *= no_libresapihttpserver libresapihttpserver:CONFIG -= no_libresapihttpserver @@ -164,7 +165,8 @@ rs_macos10.14:CONFIG -= rs_macos10.11 CONFIG *= no_rs_jsonapi rs_jsonapi:CONFIG -= no_rs_jsonapi -# To disable deep search append the following assignation to qmake command line +# To enable deep search append the following assignation to qmake command line +# CONFIG *= rs_deep_search CONFIG *= no_rs_deep_search rs_deep_search:CONFIG -= no_rs_deep_search