Merge remote-tracking branch 'upstream/master' into v0.6-BugFixing_4

This commit is contained in:
csoler 2020-11-28 21:34:32 +01:00
commit d842c6fe52
49 changed files with 2185 additions and 1930 deletions

View File

@ -104,6 +104,7 @@ copy "%RsBuildPath%\retroshare-gui\src\%RsBuildConfig%\RetroShare*.exe" "%RsDepl
copy "%RsBuildPath%\retroshare-nogui\src\%RsBuildConfig%\retroshare*-nogui.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% copy "%RsBuildPath%\retroshare-service\src\%RsBuildConfig%\retroshare*-service.exe" "%RsDeployPath%" %Quite%
copy "%RsBuildPath%\supportlibs\cmark\build\src\libcmark.dll" "%RsDeployPath%" %Quite% copy "%RsBuildPath%\supportlibs\cmark\build\src\libcmark.dll" "%RsDeployPath%" %Quite%
if exist "%RsBuildPath%\libretroshare\src\lib\retroshare.dll" copy "%RsBuildPath%\libretroshare\src\lib\retroshare.dll" "%RsDeployPath%" %Quite%
echo copy extensions echo copy extensions
for /D %%D in ("%RsBuildPath%\plugins\*") do ( for /D %%D in ("%RsBuildPath%\plugins\*") do (
@ -212,8 +213,8 @@ endlocal
exit /B 1 exit /B 1
:copy_extension :copy_extension
if exist "%~1\%RsBuildConfig%\%~n1.dll" ( if exist "%~1\lib\%~n1.dll" (
copy "%~1\%RsBuildConfig%\%~n1.dll" %2 %Quite% copy "%~1\lib\%~n1.dll" %2 %Quite%
) )
goto :EOF goto :EOF

View File

@ -1,10 +1,10 @@
ZLIB_VERSION=1.2.3 ZLIB_VERSION=1.2.3
BZIP2_VERSION=1.0.6 BZIP2_VERSION=1.0.6
MINIUPNPC_VERSION=2.0 MINIUPNPC_VERSION=2.0
OPENSSL_VERSION=1.1.1g OPENSSL_VERSION=1.1.1h
SPEEX_VERSION=1.2.0 SPEEX_VERSION=1.2.0
SPEEXDSP_VERSION=1.2rc3 SPEEXDSP_VERSION=1.2rc3
OPENCV_VERSION=3.4.11 OPENCV_VERSION=4.5.0
LIBXML2_VERSION=2.9.7 LIBXML2_VERSION=2.9.7
LIBXSLT_VERSION=1.1.32 LIBXSLT_VERSION=1.1.32
CURL_VERSION=7.58.0 CURL_VERSION=7.58.0

View File

@ -27,8 +27,8 @@ if exist "%EnvMSYS2Path%\msys%MSYS2Base%\usr\bin\pacman.exe" (
set MSYS2Install=msys2-base-%MSYS2Architecture%-20190524.tar.xz set MSYS2Install=msys2-base-%MSYS2Architecture%-20190524.tar.xz
set MSYS2Url=http://sourceforge.net/projects/msys2/files/Base/%MSYS2Architecture%/%MSYS2Install%/download set MSYS2Url=http://sourceforge.net/projects/msys2/files/Base/%MSYS2Architecture%/%MSYS2Install%/download
set CMakeInstall=cmake-3.1.0-win32-x86.zip set CMakeInstall=cmake-3.19.0-win32-x86.zip
set CMakeUrl=http://www.cmake.org/files/v3.1/%CMakeInstall% set CMakeUrl=https://github.com/Kitware/CMake/releases/download/v3.19.0/%CMakeInstall%
set CMakeUnpackPath=%EnvMSYS2Path%\msys%MSYS2Base% set CMakeUnpackPath=%EnvMSYS2Path%\msys%MSYS2Base%
if exist "%EnvMSYS2Path%\msys%MSYS2Base%" ( if exist "%EnvMSYS2Path%\msys%MSYS2Base%" (

View File

@ -16,9 +16,9 @@ set NSISInstallPath=%EnvToolsPath%\NSIS
set MinGitInstall=MinGit-2.28.0-32-bit.zip set MinGitInstall=MinGit-2.28.0-32-bit.zip
set MinGitUrl=https://github.com/git-for-windows/git/releases/download/v2.28.0.windows.1/%MinGitInstall% set MinGitUrl=https://github.com/git-for-windows/git/releases/download/v2.28.0.windows.1/%MinGitInstall%
set MinGitInstallPath=%EnvToolsPath%\MinGit set MinGitInstallPath=%EnvToolsPath%\MinGit
set CMakeVersion=cmake-3.1.0-win32-x86 set CMakeVersion=cmake-3.19.0-win32-x86
set CMakeInstall=%CMakeVersion%.zip set CMakeInstall=%CMakeVersion%.zip
set CMakeUrl=http://www.cmake.org/files/v3.1/%CMakeInstall% set CMakeUrl=https://github.com/Kitware/CMake/releases/download/v3.19.0/%CMakeInstall%
set CMakeInstallPath=%EnvToolsPath%\cmake set CMakeInstallPath=%EnvToolsPath%\cmake
set TorProjectUrl=https://www.torproject.org set TorProjectUrl=https://www.torproject.org
set TorDownloadIndexUrl=%TorProjectUrl%/download/tor set TorDownloadIndexUrl=%TorProjectUrl%/download/tor

View File

@ -1083,6 +1083,8 @@ bool ftServer::sendTurtleItem(const RsPeerId& peerId,const RsFileHash& hash,RsTu
if(!encryptItem(item, hash, encrypted_item)) if(!encryptItem(item, hash, encrypted_item))
return false ; return false ;
encrypted_item->setPriorityLevel(item->priority_level());
delete item ; delete item ;
mTurtleRouter->sendTurtleData(peerId,encrypted_item) ; mTurtleRouter->sendTurtleData(peerId,encrypted_item) ;

View File

@ -709,44 +709,46 @@ void RsGxsDataAccess::processRequests()
while (!mRequestQueue.empty()) while (!mRequestQueue.empty())
{ {
// Extract the first elements from the request queue. cleanup all other elements marked at terminated. // Extract the first elements from the request queue. cleanup all other elements marked at terminated.
GxsRequest* req = nullptr; GxsRequest* req = nullptr;
{ {
RsStackMutex stack(mDataMutex); /******* LOCKED *******/ RsStackMutex stack(mDataMutex); /******* LOCKED *******/
rstime_t now = time(nullptr); // this is ok while in the loop below rstime_t now = time(nullptr); // this is ok while in the loop below
while(!mRequestQueue.empty() && req == nullptr) while(!mRequestQueue.empty() && req == nullptr)
{ {
if(now > mRequestQueue.begin()->second->reqTime + MAX_REQUEST_AGE) if(now > mRequestQueue.begin()->second->reqTime + MAX_REQUEST_AGE)
{ {
delete mRequestQueue.begin()->second;
mRequestQueue.erase(mRequestQueue.begin()); mRequestQueue.erase(mRequestQueue.begin());
continue; continue;
} }
switch( mRequestQueue.begin()->second->status ) switch( mRequestQueue.begin()->second->status )
{ {
case PARTIAL: case PARTIAL:
RsErr() << "Found partial request in mRequestQueue. This is a bug." << std::endl; // fallthrough RsErr() << "Found partial request in mRequestQueue. This is a bug." << std::endl; // fallthrough
case COMPLETE: case COMPLETE:
case DONE: case DONE:
case FAILED: case FAILED:
case CANCELLED: case CANCELLED:
#ifdef DATA_DEBUG #ifdef DATA_DEBUG
RsDbg() << " request " << mRequestQueue.begin()->second->token << ": status = " << mRequestQueue.begin()->second->status << ": removing from the RequestQueue" << std::endl; RsDbg() << " request " << mRequestQueue.begin()->second->token << ": status = " << mRequestQueue.begin()->second->status << ": removing from the RequestQueue" << std::endl;
#endif #endif
mRequestQueue.erase(mRequestQueue.begin()); delete mRequestQueue.begin()->second;
continue; mRequestQueue.erase(mRequestQueue.begin());
break; continue;
case PENDING: break;
req = mRequestQueue.begin()->second; case PENDING:
req->status = PARTIAL; req = mRequestQueue.begin()->second;
mRequestQueue.erase(mRequestQueue.begin()); // remove it right away from the waiting queue. req->status = PARTIAL;
break; mRequestQueue.erase(mRequestQueue.begin()); // remove it right away from the waiting queue.
} break;
}
} }
} } // END OF MUTEX.
if (!req) if (!req)
break; break;
@ -813,33 +815,33 @@ void RsGxsDataAccess::processRequests()
else else
RsErr() << __PRETTY_FUNCTION__ << " Failed to process request, token: " << req->token << std::endl; RsErr() << __PRETTY_FUNCTION__ << " Failed to process request, token: " << req->token << std::endl;
// We cannot easily remove the request here because the queue may have more elements now and mRequestQueue.begin() is not necessarily the same element. // We cannot easily remove the request here because the queue may have more elements now and mRequestQueue.begin() is not necessarily the same element.
// but we mark it as COMPLETE/FAILED so that it will be removed in the next loop. // but we mark it as COMPLETE/FAILED so that it will be removed in the next loop.
{ {
RsStackMutex stack(mDataMutex); /******* LOCKED *******/ RsStackMutex stack(mDataMutex); /******* LOCKED *******/
if(ok) if(ok)
{ {
// When the request is complete, we move it to the complete list, so that the caller can easily retrieve the request data // When the request is complete, we move it to the complete list, so that the caller can easily retrieve the request data
#ifdef DATA_DEBUG #ifdef DATA_DEBUG
RsDbg() << " Request completed successfully. Marking as COMPLETE." << std::endl; RsDbg() << " Request completed successfully. Marking as COMPLETE." << std::endl;
#endif #endif
req->status = COMPLETE ; req->status = COMPLETE ;
mCompletedRequests[req->token] = req; mCompletedRequests[req->token] = req;
mPublicToken[req->token] = COMPLETE; mPublicToken[req->token] = COMPLETE;
} }
else else
{ {
req->status = FAILED; req->status = FAILED;
mPublicToken[req->token] = FAILED; mPublicToken[req->token] = FAILED;
#ifdef DATA_DEBUG #ifdef DATA_DEBUG
RsDbg() << " Request failed. Marking as FAILED." << std::endl; RsDbg() << " Request failed. Marking as FAILED." << std::endl;
#endif #endif
} }
} } // END OF MUTEX.
} // END OF MUTEX. }
} }

View File

@ -308,7 +308,7 @@ static const uint32_t GROUP_STATS_UPDATE_DELAY = 240; //
static const uint32_t GROUP_STATS_UPDATE_NB_PEERS = 2; // number of peers to which the group stats are asked static const uint32_t GROUP_STATS_UPDATE_NB_PEERS = 2; // number of peers to which the group stats are asked
static const uint32_t MAX_ALLOWED_GXS_MESSAGE_SIZE = 199000; // 200,000 bytes including signature and headers static const uint32_t MAX_ALLOWED_GXS_MESSAGE_SIZE = 199000; // 200,000 bytes including signature and headers
static const uint32_t MIN_DELAY_BETWEEN_GROUP_SEARCH = 40; // dont search same group more than every 40 secs. static const uint32_t MIN_DELAY_BETWEEN_GROUP_SEARCH = 40; // dont search same group more than every 40 secs.
static const uint32_t SAFETY_DELAY_FOR_UNSUCCESSFUL_UPDATE = 1800; // avoid re-sending the same msg list to a peer who asks twice for the same update in less than this time static const uint32_t SAFETY_DELAY_FOR_UNSUCCESSFUL_UPDATE = 0; // avoid re-sending the same msg list to a peer who asks twice for the same update in less than this time
static const uint32_t RS_NXS_ITEM_ENCRYPTION_STATUS_UNKNOWN = 0x00 ; static const uint32_t RS_NXS_ITEM_ENCRYPTION_STATUS_UNKNOWN = 0x00 ;
static const uint32_t RS_NXS_ITEM_ENCRYPTION_STATUS_NO_ERROR = 0x01 ; static const uint32_t RS_NXS_ITEM_ENCRYPTION_STATUS_NO_ERROR = 0x01 ;

View File

@ -1221,9 +1221,12 @@ bool p3GxsTunnelService::locked_sendClearTunnelData(RsGxsTunnelDHPublicKeyItem *
std::cerr << "GxsTunnelService::sendClearTunnelData(): try sending item " << (void*)item << " to peer " << item->PeerId() << std::endl; std::cerr << "GxsTunnelService::sendClearTunnelData(): try sending item " << (void*)item << " to peer " << item->PeerId() << std::endl;
#endif #endif
// make a TurtleGenericData item out of it, and send it in clear. // make a RsTurtleGenericData item out of it, and send it in clear.
// // this is compatible with nodes older than 0.6.6
RsTurtleGenericDataItem *gitem = new RsTurtleGenericDataItem ; RsTurtleGenericDataItem *gitem = new RsTurtleGenericDataItem ;
// force item priority to QOS_PRIORITY_RS_TURTLE_GENERIC_FAST_DATA to make the DH exchange faster on 0.6.6+ nodes
// this will not affect old nodes
gitem->setPriorityLevel(QOS_PRIORITY_RS_TURTLE_GENERIC_FAST_DATA);
RsGxsTunnelSerialiser ser ; RsGxsTunnelSerialiser ser ;

View File

@ -797,13 +797,13 @@ public:
* @jsonapi{development} * @jsonapi{development}
* @param[in] sslId Id of the peer of which we want to generate an invite, * @param[in] sslId Id of the peer of which we want to generate an invite,
* a null id (all 0) is passed, an invite for own node is returned. * a null id (all 0) is passed, an invite for own node is returned.
* @param[in] includeSignatures true to add key signatures to the invite * @param[in] inviteFlags specify extra data to include in the invite
* @param[in] includeExtraLocators false to avoid to add extra locators
* @return invite string * @return invite string
*/ */
virtual std::string GetRetroshareInvite( virtual std::string GetRetroshareInvite(
const RsPeerId& sslId = RsPeerId(), const RsPeerId& sslId = RsPeerId(),
RetroshareInviteFlags = RetroshareInviteFlags::DNS | RetroshareInviteFlags::CURRENT_IP ) = 0; RetroshareInviteFlags inviteFlags =
RetroshareInviteFlags::DNS | RetroshareInviteFlags::CURRENT_IP ) = 0;
/** /**
* @brief Get RetroShare short invite of the given peer * @brief Get RetroShare short invite of the given peer
@ -811,19 +811,19 @@ public:
* @param[out] invite storage for the generated invite * @param[out] invite storage for the generated invite
* @param[in] sslId Id of the peer of which we want to generate an invite, * @param[in] sslId Id of the peer of which we want to generate an invite,
* a null id (all 0) is passed, an invite for own node is returned. * a null id (all 0) is passed, an invite for own node is returned.
* @param[in] formatRadix true to get in base64 format false to get URL. * @param[in] inviteFlags specify extra data to include in the invite and
* @param[in] bareBones true to get smallest invite, which miss also * format.
* the information necessary to attempt an outgoing connection, but still
* enough to accept an incoming one.
* @param[in] baseUrl URL into which to sneak in the RetroShare invite * @param[in] baseUrl URL into which to sneak in the RetroShare invite
* radix, this is primarly useful to trick other applications into making * radix, this is primarly useful to trick other applications into making
* the invite clickable, or to disguise the RetroShare invite into a * the invite clickable, or to disguise the RetroShare invite into a
* "normal" looking web link. Used only if formatRadix is false. * "normal" looking web link. Used only if formatRadix is false.
* @return false if error occurred, true otherwise * @return false if error occurred, true otherwise
*/ */
virtual bool getShortInvite(std::string& invite, const RsPeerId& sslId = RsPeerId(), virtual bool getShortInvite(
RetroshareInviteFlags locator_flags = RetroshareInviteFlags::CURRENT_IP | RetroshareInviteFlags::DNS, std::string& invite, const RsPeerId& sslId = RsPeerId(),
const std::string& baseUrl = "https://retroshare.me/" ) = 0; RetroshareInviteFlags inviteFlags =
RetroshareInviteFlags::CURRENT_IP | RetroshareInviteFlags::DNS,
const std::string& baseUrl = "https://retroshare.me/" ) = 0;
/** /**
* @brief Parse the give short invite to extract contained information * @brief Parse the give short invite to extract contained information

View File

@ -23,7 +23,7 @@
#include <stdint.h> #include <stdint.h>
// This file centralises QoS priorities for all transfer RsItems. // This file centralises QoS priorities for all transfer RsItems
// //
const uint8_t QOS_PRIORITY_UNKNOWN = 0 ; const uint8_t QOS_PRIORITY_UNKNOWN = 0 ;
const uint8_t QOS_PRIORITY_DEFAULT = 3 ; const uint8_t QOS_PRIORITY_DEFAULT = 3 ;
@ -33,63 +33,66 @@ const uint8_t QOS_PRIORITY_TOP = 9 ;
// //
const uint8_t QOS_PRIORITY_RS_TURTLE_OPEN_TUNNEL = 7 ; const uint8_t QOS_PRIORITY_RS_TURTLE_OPEN_TUNNEL = 7 ;
const uint8_t QOS_PRIORITY_RS_TURTLE_TUNNEL_OK = 7 ; const uint8_t QOS_PRIORITY_RS_TURTLE_TUNNEL_OK = 7 ;
const uint8_t QOS_PRIORITY_RS_TURTLE_SEARCH_REQUEST = 7 ;
const uint8_t QOS_PRIORITY_RS_TURTLE_FILE_REQUEST = 5 ; const uint8_t QOS_PRIORITY_RS_TURTLE_SEARCH_REQUEST = 6 ;
const uint8_t QOS_PRIORITY_RS_TURTLE_FILE_CRC_REQUEST = 5 ; const uint8_t QOS_PRIORITY_RS_TURTLE_FILE_REQUEST = 6 ;
const uint8_t QOS_PRIORITY_RS_TURTLE_CHUNK_CRC_REQUEST = 5 ; const uint8_t QOS_PRIORITY_RS_TURTLE_FILE_MAP_REQUEST = 6 ;
const uint8_t QOS_PRIORITY_RS_TURTLE_FILE_MAP_REQUEST = 5 ; const uint8_t QOS_PRIORITY_RS_TURTLE_FILE_CRC_REQUEST = 6 ; // unused
const uint8_t QOS_PRIORITY_RS_TURTLE_CHUNK_CRC_REQUEST = 6 ; // unused
const uint8_t QOS_PRIORITY_RS_TURTLE_FILE_DATA = 5 ; const uint8_t QOS_PRIORITY_RS_TURTLE_FILE_DATA = 5 ;
const uint8_t QOS_PRIORITY_RS_TURTLE_FILE_CRC = 5 ; const uint8_t QOS_PRIORITY_RS_TURTLE_FILE_MAP = 6 ;
const uint8_t QOS_PRIORITY_RS_TURTLE_CHUNK_CRC = 5 ; const uint8_t QOS_PRIORITY_RS_TURTLE_FILE_CRC = 6 ; // unused
const uint8_t QOS_PRIORITY_RS_TURTLE_FILE_MAP = 5 ; const uint8_t QOS_PRIORITY_RS_TURTLE_CHUNK_CRC = 6 ; // unused
const uint8_t QOS_PRIORITY_RS_TURTLE_SEARCH_RESULT = 4 ;
const uint8_t QOS_PRIORITY_RS_TURTLE_GENERIC_ITEM = 3 ;
//const uint8_t QOS_PRIORITY_RS_TURTLE_FORWARD_FILE_DATA= 3 ; // unused
const uint8_t QOS_PRIORITY_RS_TURTLE_GENERIC_DATA = 5 ;
const uint8_t QOS_PRIORITY_RS_TURTLE_GENERIC_FAST_DATA = 7 ; const uint8_t QOS_PRIORITY_RS_TURTLE_GENERIC_FAST_DATA = 7 ;
const uint8_t QOS_PRIORITY_RS_TURTLE_SEARCH_RESULT = 6 ;
const uint8_t QOS_PRIORITY_RS_TURTLE_GENERIC_DATA = 5 ;
const uint8_t QOS_PRIORITY_RS_TURTLE_GENERIC_ITEM = 3 ;
const uint8_t QOS_PRIORITY_RS_TURTLE_FORWARD_FILE_DATA = 3 ; // unused
// File transfer // File transfer
// //
const uint8_t QOS_PRIORITY_RS_FILE_REQUEST = 5 ; const uint8_t QOS_PRIORITY_RS_FILE_REQUEST = 6 ;
const uint8_t QOS_PRIORITY_RS_FILE_CRC_REQUEST = 5 ; const uint8_t QOS_PRIORITY_RS_FILE_MAP_REQUEST = 6 ;
const uint8_t QOS_PRIORITY_RS_CHUNK_CRC_REQUEST = 5 ; const uint8_t QOS_PRIORITY_RS_FILE_CRC_REQUEST = 6 ; // unused
const uint8_t QOS_PRIORITY_RS_FILE_MAP_REQUEST = 5 ; const uint8_t QOS_PRIORITY_RS_CHUNK_CRC_REQUEST = 6 ;
const uint8_t QOS_PRIORITY_RS_FILE_DATA = 5 ;
const uint8_t QOS_PRIORITY_RS_FILE_CRC = 5 ; const uint8_t QOS_PRIORITY_RS_FILE_DATA = 5 ;
const uint8_t QOS_PRIORITY_RS_CHUNK_CRC = 5 ; const uint8_t QOS_PRIORITY_RS_FILE_MAP = 6 ;
const uint8_t QOS_PRIORITY_RS_FILE_MAP = 5 ; const uint8_t QOS_PRIORITY_RS_FILE_CRC = 6 ; // unused
//const uint8_t QOS_PRIORITY_RS_CACHE_ITEM = 3 ; // unused const uint8_t QOS_PRIORITY_RS_CHUNK_CRC = 6 ;
const uint8_t QOS_PRIORITY_RS_CACHE_ITEM = 3 ; // unused
// Discovery // Discovery
// //
const uint8_t QOS_PRIORITY_RS_DISC_HEART_BEAT = 8 ; const uint8_t QOS_PRIORITY_RS_DISC_HEART_BEAT = 8 ;
const uint8_t QOS_PRIORITY_RS_DISC_ASK_INFO = 2 ; const uint8_t QOS_PRIORITY_RS_DISC_ASK_INFO = 2 ;
const uint8_t QOS_PRIORITY_RS_DISC_REPLY = 2 ; const uint8_t QOS_PRIORITY_RS_DISC_REPLY = 2 ;
const uint8_t QOS_PRIORITY_RS_DISC_VERSION = 2 ; const uint8_t QOS_PRIORITY_RS_DISC_VERSION = 2 ;
const uint8_t QOS_PRIORITY_RS_DISC_CONTACT = 2 ; // CONTACT and PGPLIST must have const uint8_t QOS_PRIORITY_RS_DISC_CONTACT = 2 ; // CONTACT and PGPLIST must have
const uint8_t QOS_PRIORITY_RS_DISC_PGP_LIST = 2 ; // same priority. const uint8_t QOS_PRIORITY_RS_DISC_PGP_LIST = 2 ; // same priority
const uint8_t QOS_PRIORITY_RS_DISC_SERVICES = 2 ; const uint8_t QOS_PRIORITY_RS_DISC_SERVICES = 2 ;
const uint8_t QOS_PRIORITY_RS_DISC_PGP_CERT = 2 ; const uint8_t QOS_PRIORITY_RS_DISC_PGP_CERT = 2 ;
// File database // File database
// //
const uint8_t QOS_PRIORITY_RS_FAST_SYNC_REQUEST = 7 ; const uint8_t QOS_PRIORITY_RS_FAST_SYNC_REQUEST = 7 ;
const uint8_t QOS_PRIORITY_RS_SLOW_SYNC_REQUEST = 3 ; const uint8_t QOS_PRIORITY_RS_SLOW_SYNC_REQUEST = 3 ;
// Heartbeat. // Heartbeat
// //
const uint8_t QOS_PRIORITY_RS_HEARTBEAT_PULSE = 8 ; const uint8_t QOS_PRIORITY_RS_HEARTBEAT_PULSE = 8 ;
// Chat/Msgs // Chat/Msgs
// //
const uint8_t QOS_PRIORITY_RS_CHAT_ITEM = 7 ; const uint8_t QOS_PRIORITY_RS_CHAT_ITEM = 7 ;
const uint8_t QOS_PRIORITY_RS_CHAT_AVATAR_ITEM = 2 ; const uint8_t QOS_PRIORITY_RS_CHAT_AVATAR_ITEM = 2 ;
const uint8_t QOS_PRIORITY_RS_MSG_ITEM = 2 ; // depreciated. const uint8_t QOS_PRIORITY_RS_MSG_ITEM = 2 ; // deprecated
const uint8_t QOS_PRIORITY_RS_MAIL_ITEM = 2 ; // new mail service const uint8_t QOS_PRIORITY_RS_MAIL_ITEM = 2 ; // new mail service
const uint8_t QOS_PRIORITY_RS_STATUS_ITEM = 2 ; const uint8_t QOS_PRIORITY_RS_STATUS_ITEM = 2 ;
// RTT // RTT
// //
@ -97,24 +100,26 @@ const uint8_t QOS_PRIORITY_RS_RTT_PING = 9 ;
// BanList // BanList
// //
const uint8_t QOS_PRIORITY_RS_BANLIST_ITEM = 3 ; const uint8_t QOS_PRIORITY_RS_BANLIST_ITEM = 3 ;
// Bandwidth Control. // Bandwidth Control
// //
const uint8_t QOS_PRIORITY_RS_BWCTRL_ALLOWED_ITEM = 9 ; const uint8_t QOS_PRIORITY_RS_BWCTRL_ALLOWED_ITEM = 9 ;
// Dsdv Routing // DsDv Routing
// //
const uint8_t QOS_PRIORITY_RS_DSDV_ROUTE = 4 ; const uint8_t QOS_PRIORITY_RS_DSDV_ROUTE = 4 ;
const uint8_t QOS_PRIORITY_RS_DSDV_DATA = 2 ; const uint8_t QOS_PRIORITY_RS_DSDV_DATA = 2 ;
// GXS // GXS
// //
const uint8_t QOS_PRIORITY_RS_GXS_NET = 6 ; const uint8_t QOS_PRIORITY_RS_GXS_NET = 6 ;
// GXS Reputation. // GXS Reputation
const uint8_t QOS_PRIORITY_RS_GXSREPUTATION_ITEM = 3; //
const uint8_t QOS_PRIORITY_RS_GXSREPUTATION_ITEM = 3 ;
// Service Info / Control. // Service Info / Control
const uint8_t QOS_PRIORITY_RS_SERVICE_INFO_ITEM = 8; //
const uint8_t QOS_PRIORITY_RS_SERVICE_INFO_ITEM = 8 ;

View File

@ -33,11 +33,16 @@
RsItem *RsServiceSerializer::deserialise(void *data, uint32_t *size) RsItem *RsServiceSerializer::deserialise(void *data, uint32_t *size)
{ {
if(!data || !size || !*size) if(!data || !size || *size < 8)
{ {
RsErr() << __PRETTY_FUNCTION__ << " Called with null paramethers data: " RsErr() << __PRETTY_FUNCTION__ << " Called with inconsistent parameters data: " << std::endl;
<< data << " size: " << static_cast<void*>(size) << " *size: " if(data)
<< (size ? *size : 0) << " this should never happen!" RsErr() << "Data is: " << RsUtil::BinToHex(static_cast<uint8_t*>(data),std::min(50u,*size)) << ((*size>50)?"...":"") << std::endl;
else
RsErr() << "Null Data" << std::endl;
RsErr() << " size: " << static_cast<void*>(size) << " *size: " << (size ? *size : 0) << std::endl
<< " this should never happen!"
<< std::endl; << std::endl;
print_stacktrace(); print_stacktrace();
return nullptr; return nullptr;

View File

@ -324,7 +324,7 @@ class RsTurtleGenericTunnelItem: public RsTurtleItem
class RsTurtleGenericDataItem: public RsTurtleGenericTunnelItem class RsTurtleGenericDataItem: public RsTurtleGenericTunnelItem
{ {
public: public:
RsTurtleGenericDataItem() : RsTurtleGenericTunnelItem(RS_TURTLE_SUBTYPE_GENERIC_DATA), data_size(0), data_bytes(0) { setPriorityLevel(QOS_PRIORITY_RS_TURTLE_FILE_REQUEST);} RsTurtleGenericDataItem() : RsTurtleGenericTunnelItem(RS_TURTLE_SUBTYPE_GENERIC_DATA), data_size(0), data_bytes(0) { setPriorityLevel(QOS_PRIORITY_RS_TURTLE_GENERIC_DATA);}
virtual ~RsTurtleGenericDataItem() { if(data_bytes != NULL) free(data_bytes) ; } virtual ~RsTurtleGenericDataItem() { if(data_bytes != NULL) free(data_bytes) ; }
virtual bool shouldStampTunnel() const { return true ; } virtual bool shouldStampTunnel() const { return true ; }

View File

@ -10,7 +10,13 @@ INCLUDEPATH *= $$clean_path($${RS_SRC_PATH}/libretroshare/src)
equals(TARGET, retroshare):equals(TEMPLATE, lib){ equals(TARGET, retroshare):equals(TEMPLATE, lib){
} else { } else {
LIBS *= -L$$clean_path($${RS_BUILD_PATH}/libretroshare/src/lib/) -lretroshare LIBS *= -L$$clean_path($${RS_BUILD_PATH}/libretroshare/src/lib/) -lretroshare
PRE_TARGETDEPS *= $$clean_path($${RS_BUILD_PATH}/libretroshare/src/lib/libretroshare.a) win32-g++|win32-clang-g++:!isEmpty(QMAKE_SH):libretroshare_shared {
# Windows msys2
LIBRETROSHARE_TARGET=libretroshare.dll.a
} else {
LIBRETROSHARE_TARGET=libretroshare.a
}
PRE_TARGETDEPS *= $$clean_path($${RS_BUILD_PATH}/libretroshare/src/lib/$${LIBRETROSHARE_TARGET})
} }
!include("../../openpgpsdk/src/use_openpgpsdk.pri"):error("Including") !include("../../openpgpsdk/src/use_openpgpsdk.pri"):error("Including")

View File

@ -892,6 +892,10 @@ int RsDirUtil::createLockFile(const std::string& lock_file_path, rs_lock_handle_
return 2; return 2;
} }
// Write to lock file our pid
std::string ourPID = std::to_string(::getpid());
write(lock_handle, ourPID.c_str(), sizeof(char)*ourPID.size() );
return 0; return 0;
#else #else
// Suspended. The user should make sure he's not already using the file descriptor. // Suspended. The user should make sure he's not already using the file descriptor.

View File

@ -43,7 +43,13 @@ win32 {
} }
libretroshare_shared { libretroshare_shared {
PRE_TARGETDEPS += $$OUT_PWD/../../libretroshare/src/lib/libretroshare.a win32-g++|win32-clang-g++:!isEmpty(QMAKE_SH) {
# Windows msys2
LIBRETROSHARE_TARGET=libretroshare.dll.a
} else {
LIBRETROSHARE_TARGET=libretroshare.a
}
PRE_TARGETDEPS += $$OUT_PWD/../../libretroshare/src/lib/$${LIBRETROSHARE_TARGET}
LIBS += -L"$$OUT_PWD/../../libretroshare/src/lib" -lretroshare LIBS += -L"$$OUT_PWD/../../libretroshare/src/lib" -lretroshare
} }
@ -69,7 +75,7 @@ win32 {
DEFINES += WINDOWS_SYS WIN32 STATICLIB MINGW WIN32_LEAN_AND_MEAN DEFINES += WINDOWS_SYS WIN32 STATICLIB MINGW WIN32_LEAN_AND_MEAN
#DEFINES += MINIUPNPC_VERSION=13 #DEFINES += MINIUPNPC_VERSION=13
# DESTDIR = lib DESTDIR = lib
# Switch off optimization for release version # Switch off optimization for release version
QMAKE_CXXFLAGS_RELEASE -= -O2 QMAKE_CXXFLAGS_RELEASE -= -O2

View File

@ -22,6 +22,7 @@
#include "ui_FeedReaderConfig.h" #include "ui_FeedReaderConfig.h"
#include "gui/settings/rsharesettings.h" #include "gui/settings/rsharesettings.h"
#include "interface/rsFeedReader.h" #include "interface/rsFeedReader.h"
#include <util/misc.h>
/** Constructor */ /** Constructor */
FeedReaderConfig::FeedReaderConfig(QWidget *parent, Qt::WindowFlags flags) FeedReaderConfig::FeedReaderConfig(QWidget *parent, Qt::WindowFlags flags)
@ -30,12 +31,30 @@ FeedReaderConfig::FeedReaderConfig(QWidget *parent, Qt::WindowFlags flags)
/* Invoke the Qt Designer generated object setup routine */ /* Invoke the Qt Designer generated object setup routine */
ui->setupUi(this); ui->setupUi(this);
connect(ui->useProxyCheckBox, SIGNAL(toggled(bool)), this, SLOT(useProxyToggled()));
ui->proxyAddressLineEdit->setEnabled(false); ui->proxyAddressLineEdit->setEnabled(false);
ui->proxyPortSpinBox->setEnabled(false); ui->proxyPortSpinBox->setEnabled(false);
loaded = false; /* Connect signals */
connect(ui->updateIntervalSpinBox, (void(QSpinBox::*)(int))&QSpinBox::valueChanged, this, [this]() {
rsFeedReader->setStandardUpdateInterval(ui->updateIntervalSpinBox->value() * 60);
});
connect(ui->storageTimeSpinBox, (void(QSpinBox::*)(int))&QSpinBox::valueChanged, this, [this]() {
rsFeedReader->setStandardStorageTime(ui->storageTimeSpinBox->value() * 60 *60 * 24);
});
connect(ui->saveInBackgroundCheckBox, &QCheckBox::toggled, this, [this]() {
rsFeedReader->setSaveInBackground(ui->saveInBackgroundCheckBox->isChecked());
});
connect(ui->setMsgToReadOnActivate, &QCheckBox::toggled, this, [this]() {
Settings->setValueToGroup("FeedReaderDialog", "SetMsgToReadOnActivate", ui->setMsgToReadOnActivate->isChecked());
});
connect(ui->openAllInNewTabCheckBox, &QCheckBox::toggled, this, [this]() {
Settings->setValueToGroup("FeedReaderDialog", "OpenAllInNewTab", ui->openAllInNewTabCheckBox->isChecked());
});
connect(ui->useProxyCheckBox, &QCheckBox::toggled, this, &FeedReaderConfig::updateProxy);
connect(ui->proxyAddressLineEdit, &QLineEdit::textChanged, this, &FeedReaderConfig::updateProxy);
connect(ui->proxyPortSpinBox, (void(QSpinBox::*)(int))&QSpinBox::valueChanged, this, &FeedReaderConfig::updateProxy);
connect(ui->useProxyCheckBox, SIGNAL(toggled(bool)), this, SLOT(useProxyToggled()));
} }
/** Destructor */ /** Destructor */
@ -47,31 +66,21 @@ FeedReaderConfig::~FeedReaderConfig()
/** Loads the settings for this page */ /** Loads the settings for this page */
void FeedReaderConfig::load() void FeedReaderConfig::load()
{ {
ui->updateIntervalSpinBox->setValue(rsFeedReader->getStandardUpdateInterval() / 60); whileBlocking(ui->updateIntervalSpinBox)->setValue(rsFeedReader->getStandardUpdateInterval() / 60);
ui->storageTimeSpinBox->setValue(rsFeedReader->getStandardStorageTime() / (60 * 60 *24)); whileBlocking(ui->storageTimeSpinBox)->setValue(rsFeedReader->getStandardStorageTime() / (60 * 60 *24));
ui->saveInBackgroundCheckBox->setChecked(rsFeedReader->getSaveInBackground()); whileBlocking(ui->saveInBackgroundCheckBox)->setChecked(rsFeedReader->getSaveInBackground());
ui->setMsgToReadOnActivate->setChecked(FeedReaderSetting_SetMsgToReadOnActivate()); whileBlocking(ui->setMsgToReadOnActivate)->setChecked(FeedReaderSetting_SetMsgToReadOnActivate());
ui->openAllInNewTabCheckBox->setChecked(FeedReaderSetting_OpenAllInNewTab()); whileBlocking(ui->openAllInNewTabCheckBox)->setChecked(FeedReaderSetting_OpenAllInNewTab());
std::string proxyAddress; std::string proxyAddress;
uint16_t proxyPort; uint16_t proxyPort;
ui->useProxyCheckBox->setChecked(rsFeedReader->getStandardProxy(proxyAddress, proxyPort)); whileBlocking(ui->useProxyCheckBox)->setChecked(rsFeedReader->getStandardProxy(proxyAddress, proxyPort));
ui->proxyAddressLineEdit->setText(QString::fromUtf8(proxyAddress.c_str())); whileBlocking(ui->proxyAddressLineEdit)->setText(QString::fromUtf8(proxyAddress.c_str()));
ui->proxyPortSpinBox->setValue(proxyPort); whileBlocking(ui->proxyPortSpinBox)->setValue(proxyPort);
loaded = true; loaded = true;
}
bool FeedReaderConfig::save(QString &/*errmsg*/) useProxyToggled();
{
rsFeedReader->setStandardUpdateInterval(ui->updateIntervalSpinBox->value() * 60);
rsFeedReader->setStandardStorageTime(ui->storageTimeSpinBox->value() * 60 *60 * 24);
rsFeedReader->setStandardProxy(ui->useProxyCheckBox->isChecked(), ui->proxyAddressLineEdit->text().toUtf8().constData(), ui->proxyPortSpinBox->value());
rsFeedReader->setSaveInBackground(ui->saveInBackgroundCheckBox->isChecked());
Settings->setValueToGroup("FeedReaderDialog", "SetMsgToReadOnActivate", ui->setMsgToReadOnActivate->isChecked());
Settings->setValueToGroup("FeedReaderDialog", "OpenAllInNewTab", ui->openAllInNewTabCheckBox->isChecked());
return true;
} }
void FeedReaderConfig::useProxyToggled() void FeedReaderConfig::useProxyToggled()
@ -81,3 +90,8 @@ void FeedReaderConfig::useProxyToggled()
ui->proxyAddressLineEdit->setEnabled(enabled); ui->proxyAddressLineEdit->setEnabled(enabled);
ui->proxyPortSpinBox->setEnabled(enabled); ui->proxyPortSpinBox->setEnabled(enabled);
} }
void FeedReaderConfig::updateProxy()
{
rsFeedReader->setStandardProxy(ui->useProxyCheckBox->isChecked(), ui->proxyAddressLineEdit->text().toUtf8().constData(), ui->proxyPortSpinBox->value());
}

View File

@ -40,8 +40,6 @@ public:
/** Default Destructor */ /** Default Destructor */
virtual ~FeedReaderConfig(); virtual ~FeedReaderConfig();
/** Saves the changes on this page */
virtual bool save(QString &errmsg);
/** Loads the settings for this page */ /** Loads the settings for this page */
virtual void load(); virtual void load();
@ -51,10 +49,10 @@ public:
private slots: private slots:
void useProxyToggled(); void useProxyToggled();
void updateProxy();
private: private:
Ui::FeedReaderConfig *ui; Ui::FeedReaderConfig *ui;
bool loaded;
}; };
#endif #endif

View File

@ -65,64 +65,38 @@ win32 {
DEPENDPATH += . $$INC_DIR DEPENDPATH += . $$INC_DIR
INCLUDEPATH += . $$INC_DIR INCLUDEPATH += . $$INC_DIR
OPENCV_VERSION = "341"
USE_PRECOMPILED_LIBS = USE_PRECOMPILED_LIBS =
for(lib, RS_LIB_DIR) { for(lib, RS_LIB_DIR) {
#message(Scanning $$lib) #message(Scanning $$lib)
exists( $$lib/opencv/libopencv_core$${OPENCV_VERSION}.a) { isEmpty(USE_PRECOMPILED_LIBS) {
isEmpty(USE_PRECOMPILED_LIBS) { exists($$lib/opencv/libopencv_core.a) {
message(Get pre-compiled opencv $$OPENCV_VERSION libraries here:) message(Get pre-compiled opencv libraries here:)
message($$lib) message($$lib/opencv)
LIBS += -L"$$lib/opencv" LIBS += -L"$$lib/opencv"
LIBS += -lopencv_core$$OPENCV_VERSION -lopencv_highgui$$OPENCV_VERSION -lopencv_imgproc$$OPENCV_VERSION -lopencv_videoio$$OPENCV_VERSION -lopencv_imgcodecs$$OPENCV_VERSION -llibwebp
USE_PRECOMPILED_LIBS = 1 USE_PRECOMPILED_LIBS = 1
} }
} exists($$lib/libopencv_core.dll.a) {
exists( $$lib/opencv/libopencv_core.a) {
isEmpty(USE_PRECOMPILED_LIBS) {
message(Get pre-compiled opencv libraries here:) message(Get pre-compiled opencv libraries here:)
message($$lib) message($$lib)
LIBS += -L"$$lib/opencv" LIBS += -L"$$lib"
LIBS += -lopencv_core -lopencv_highgui -lopencv_imgproc
USE_PRECOMPILED_LIBS = 1 USE_PRECOMPILED_LIBS = 1
} }
} }
exists( $$lib/libopencv_core.dll.a) {
isEmpty(USE_PRECOMPILED_LIBS) {
message(Get pre-compiled opencv libraries here:)
message($$lib)
LIBS += -L"$$lib/opencv"
LIBS += -lopencv_core -lopencv_highgui -lopencv_imgproc
USE_PRECOMPILED_LIBS = 1
}
}
exists( $$lib/opencv/libopencv_videoio.a) {
message(videoio found in opencv libraries.)
message($$lib)
LIBS += -lopencv_videoio
}
exists( $$lib/libopencv_videoio.dll.a) {
message(videoio found in opencv libraries.)
message($$lib)
LIBS += -lopencv_videoio
}
exists( $$lib/opencv/libopencv_imgcodecs.a) {
message(videoio found in opencv libraries.)
message($$lib)
LIBS += -lopencv_imgcodecs
}
exists( $$lib/opencv/liblibwebp.a) {
message(videoio found in opencv libraries.)
message($$lib)
LIBS += -llibwebp
}
} }
isEmpty(USE_PRECOMPILED_LIBS) { isEmpty(USE_PRECOMPILED_LIBS) {
message(Use system opencv libraries.) message(Use system opencv libraries.)
LIBS += -lopencv_core -lopencv_highgui -lopencv_imgproc
} }
LIBS += -lzlib -lole32 -loleaut32 -luuid -lvfw32 -llibjpeg-turbo -llibtiff -llibpng -llibjasper -lIlmImf
LIBS += -lavifil32 -lavicap32 -lavcodec -lavutil -lswresample LIBS += -lopencv_core -lopencv_highgui -lopencv_imgproc -lopencv_videoio -lopencv_imgcodecs -llibwebp -llibtiff -llibpng -llibopenjp2 -lIlmImf
LIBS += -lole32 -loleaut32 -luuid -lvfw32
# Check for msys2
!isEmpty(PREFIX_MSYS2) {
message(Use msys2 opencv4.)
INCLUDEPATH += "$${PREFIX_MSYS2}/include/opencv4"
} else {
LIBS += -llibjpeg-turbo -lzlib
}
} }
#################################### MacOSX ##################################### #################################### MacOSX #####################################

View File

@ -38,7 +38,7 @@
#include "gui/SoundManager.h" #include "gui/SoundManager.h"
#include "gui/chat/ChatWidget.h" #include "gui/chat/ChatWidget.h"
#include <opencv/cv.h> #include <opencv2/opencv.hpp>
#include <speex/speex.h> #include <speex/speex.h>
#define IMAGE_VOIP ":/images/talking_on.svg" #define IMAGE_VOIP ":/images/talking_on.svg"

View File

@ -18,8 +18,9 @@
* * * *
*******************************************************************************/ *******************************************************************************/
#include <opencv/cv.h> #include <opencv2/opencv.hpp>
#include <opencv/highgui.h> #include <opencv2/highgui.hpp>
#include <opencv2/imgproc/types_c.h>
#include <QTimer> #include <QTimer>
#include <QPainter> #include <QPainter>

View File

@ -473,10 +473,10 @@ FFmpegVideo::FFmpegVideo()
encoding_context->rc_max_rate = 0; encoding_context->rc_max_rate = 0;
encoding_context->rc_buffer_size = 0; encoding_context->rc_buffer_size = 0;
#endif #endif
if (encoding_codec->capabilities & CODEC_CAP_TRUNCATED) if (encoding_codec->capabilities & AV_CODEC_CAP_TRUNCATED)
encoding_context->flags |= CODEC_FLAG_TRUNCATED; encoding_context->flags |= AV_CODEC_FLAG_TRUNCATED;
encoding_context->flags |= CODEC_FLAG_PSNR;//Peak signal-to-noise ratio encoding_context->flags |= AV_CODEC_FLAG_PSNR;//Peak signal-to-noise ratio
encoding_context->flags |= CODEC_CAP_PARAM_CHANGE; encoding_context->flags |= AV_CODEC_CAP_PARAM_CHANGE;
encoding_context->i_quant_factor = 0.769f; encoding_context->i_quant_factor = 0.769f;
encoding_context->b_quant_factor = 1.4f; encoding_context->b_quant_factor = 1.4f;
encoding_context->time_base.num = 1; encoding_context->time_base.num = 1;
@ -569,10 +569,10 @@ FFmpegVideo::FFmpegVideo()
decoding_context->pix_fmt = AV_PIX_FMT_YUV420P; decoding_context->pix_fmt = AV_PIX_FMT_YUV420P;
#endif #endif
if(decoding_codec->capabilities & CODEC_CAP_TRUNCATED) if(decoding_codec->capabilities & AV_CODEC_CAP_TRUNCATED)
decoding_context->flags |= CODEC_FLAG_TRUNCATED; // we do not send complete frames decoding_context->flags |= AV_CODEC_FLAG_TRUNCATED; // we do not send complete frames
//we can receive truncated frames //we can receive truncated frames
decoding_context->flags2 |= CODEC_FLAG2_CHUNKS; decoding_context->flags2 |= AV_CODEC_FLAG2_CHUNKS;
AVDictionary* dictionary = NULL; AVDictionary* dictionary = NULL;
if(avcodec_open2(decoding_context, decoding_codec, &dictionary) < 0) if(avcodec_open2(decoding_context, decoding_codec, &dictionary) < 0)

View File

@ -60,7 +60,7 @@
#define IMAGE_PLAY ":/images/start.png" #define IMAGE_PLAY ":/images/start.png"
#define IMAGE_HASH_BUSY ":/images/settings.png" #define IMAGE_HASH_BUSY ":/images/settings.png"
#define IMAGE_HASH_DONE ":/images/accepted16.png" #define IMAGE_HASH_DONE ":/images/accepted16.png"
#define IMAGE_MSG ":/images/message-mail.png" #define IMAGE_MSG ":/icons/png/message.png"
#define IMAGE_ATTACHMENT ":/icons/png/attachements.png" #define IMAGE_ATTACHMENT ":/icons/png/attachements.png"
#define IMAGE_FRIEND ":/images/peers_16x16.png" #define IMAGE_FRIEND ":/images/peers_16x16.png"
#define IMAGE_COPYLINK ":/images/copyrslink.png" #define IMAGE_COPYLINK ":/images/copyrslink.png"

View File

@ -133,21 +133,22 @@ void NetworkDialog::connectTreeWidgetCostumPopupMenu( QPoint /*point*/ )
contextMnu->addAction(QIcon(IMAGE_PEERDETAILS), tr("Profile details..."), this, SLOT(peerdetails())); contextMnu->addAction(QIcon(IMAGE_PEERDETAILS), tr("Profile details..."), this, SLOT(peerdetails()));
contextMnu->addSeparator() ; contextMnu->addSeparator() ;
contextMnu->addAction(QIcon(), tr("Remove unused keys..."), this, SLOT(removeUnusedKeys())); contextMnu->addAction(QIcon(), tr("Remove unused keys..."), this, SLOT(removeUnusedKeys()));
contextMnu->addAction(QIcon(), tr("Remove this key"), this, SLOT(removeSelectedKeys()));
contextMnu->exec(QCursor::pos()); contextMnu->exec(QCursor::pos());
} }
void NetworkDialog::removeUnusedKeys() void NetworkDialog::removeUnusedKeys()
{ {
std::set<RsPgpId> pre_selected ; std::set<RsPgpId> pre_selected ;
std::list<RsPgpId> ids ; std::list<RsPgpId> ids ;
rsPeers->getGPGAllList(ids) ; rsPeers->getGPGAllList(ids) ;
RsPeerDetails details ; RsPeerDetails details ;
time_t now = time(NULL) ; time_t now = time(NULL) ;
time_t THREE_MONTHS = 3*31*24*60*60 ;//3*DayPerMonth*HoursPerDay*MinPerHour*SecPerMin time_t THREE_MONTHS = 3*31*24*60*60 ;//3*DayPerMonth*HoursPerDay*MinPerHour*SecPerMin
for(std::list<RsPgpId>::const_iterator it(ids.begin());it!=ids.end();++it) for(std::list<RsPgpId>::const_iterator it(ids.begin());it!=ids.end();++it)
{ {
rsPeers->getGPGDetails(*it,details) ; rsPeers->getGPGDetails(*it,details) ;
@ -159,17 +160,34 @@ void NetworkDialog::removeUnusedKeys()
if(now > (time_t) (THREE_MONTHS + details.lastUsed) && !details.accept_connection) if(now > (time_t) (THREE_MONTHS + details.lastUsed) && !details.accept_connection)
{ {
std::cerr << "Adding " << *it << " to pre-selection." << std::endl; std::cerr << "Adding " << *it << " to pre-selection." << std::endl;
pre_selected.insert(*it) ; pre_selected.insert(*it) ;
} }
} }
std::set<RsPgpId> selected = FriendSelectionDialog::selectFriends_PGP(NULL, std::set<RsPgpId> selected = FriendSelectionDialog::selectFriends_PGP(NULL,
tr("Clean keyring"), tr("Clean keyring"),
tr("The selected keys below haven't been used in the last 3 months. \nDo you want to delete them permanently ? \n\nNotes: Your old keyring will be backed up.\n The removal may fail when running multiple Retroshare instances on the same machine."),FriendSelectionWidget::MODUS_CHECK,FriendSelectionWidget::SHOW_GPG | FriendSelectionWidget::SHOW_NON_FRIEND_GPG, tr("The selected keys below haven't been used in the last 3 months. \nDo you want to delete them permanently ? \n\nNotes: Your old keyring will be backed up.\n The removal may fail when running multiple Retroshare instances on the same machine."),FriendSelectionWidget::MODUS_CHECK,FriendSelectionWidget::SHOW_GPG | FriendSelectionWidget::SHOW_NON_FRIEND_GPG,
pre_selected) ; pre_selected) ;
removeKeys(selected);
}
void NetworkDialog::removeSelectedKeys()
{
QModelIndexList l = ui.connectTreeWidget->selectionModel()->selection().indexes();
if(l.empty())
return;
std::set<RsPgpId> selected;
selected.insert(RsPgpId(ui.connectTreeWidget->model()->data(ui.connectTreeWidget->model()->index(l.begin()->row(), COLUMN_PEERID)).toString().toStdString()));
removeKeys(selected);
}
void NetworkDialog::removeKeys(std::set<RsPgpId> selected)
{
std::cerr << "Removing these keys from the keyring: " << std::endl; std::cerr << "Removing these keys from the keyring: " << std::endl;
for(std::set<RsPgpId>::const_iterator it(selected.begin());it!=selected.end();++it) for(std::set<RsPgpId>::const_iterator it(selected.begin());it!=selected.end();++it)
std::cerr << " " << *it << std::endl; std::cerr << " " << *it << std::endl;
std::string backup_file ; std::string backup_file ;
@ -200,7 +218,7 @@ void NetworkDialog::removeUnusedKeys()
} }
QMessageBox::warning(NULL,tr("Keyring info"),tr("Key removal has failed. Your keyring remains intact.\n\nReported error:")+" "+error_string ) ; QMessageBox::warning(NULL,tr("Keyring info"),tr("Key removal has failed. Your keyring remains intact.\n\nReported error:")+" "+error_string ) ;
} }
updateDisplay(); updateDisplay();
// insertConnect() ; // insertConnect() ;
} }

View File

@ -68,6 +68,7 @@ protected:
private slots: private slots:
void removeUnusedKeys() ; void removeUnusedKeys() ;
void removeSelectedKeys() ;
void makeFriend() ; void makeFriend() ;
void denyFriend() ; void denyFriend() ;
void peerdetails(); void peerdetails();
@ -86,6 +87,8 @@ private slots:
private: private:
void removeKeys(std::set<RsPgpId> selected) ;
/* Color definitions (for standard see qss.default) */ /* Color definitions (for standard see qss.default) */
QColor mBackgroundColorSelf; QColor mBackgroundColorSelf;
QColor mBackgroundColorOwnSign; QColor mBackgroundColorOwnSign;

View File

@ -60,29 +60,25 @@ BoardPostDisplayWidgetBase::BoardPostDisplayWidgetBase(const RsPostedPost& post,
void BoardPostDisplayWidgetBase::setCommentsSize(int comNb) void BoardPostDisplayWidgetBase::setCommentsSize(int comNb)
{ {
QString sComButText ; QString sComButText = tr("Comment");
QString sComButTooltip ;
if (comNb == 1) if (comNb == 1)
sComButText = tr("1 comment"); sComButText = tr("1 comment");
else if(comNb > 1) else if(comNb > 1)
sComButText = tr("%1 comments").arg(comNb); sComButText = tr("%1 comments").arg(comNb);
else
sComButText = tr("No comments yet. Click to add one.");
commentButton()->setToolTip(sComButText); if (comNb == 0)
sComButTooltip = tr("No comments yet. Click to add one.");
commentButton()->setToolTip(sComButTooltip);
commentButton()->setText(sComButText);
if(comNb > 0) if(comNb > 0)
commentButton()->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/comments_blue.png")); commentButton()->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/comments_blue.png"));
else else
commentButton()->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/comments.png")); commentButton()->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/comments.png"));
// QString sComButText = tr("Comment");
// if (comNb == 1)
// sComButText = sComButText.append("(1)");
// else if(comNb > 1)
// sComButText = tr("Comments ").append("(%1)").arg(comNb);
//
commentButton()->setText(tr("Comments"));
} }
void BoardPostDisplayWidgetBase::makeDownVote() void BoardPostDisplayWidgetBase::makeDownVote()

View File

@ -460,18 +460,14 @@ p, li { white-space: pre-wrap; }
</item> </item>
</widget> </widget>
</item> </item>
<item>
<widget class="LineEditClear" name="filter_LE">
<property name="placeholderText">
<string>Search</string>
</property>
</widget>
</item>
<item> <item>
<spacer name="horizontalSpacer_2"> <spacer name="horizontalSpacer_2">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeType">
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>40</width> <width>40</width>
@ -480,6 +476,13 @@ p, li { white-space: pre-wrap; }
</property> </property>
</spacer> </spacer>
</item> </item>
<item>
<widget class="LineEditClear" name="filter_LE">
<property name="placeholderText">
<string>Search</string>
</property>
</widget>
</item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_2"> <layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="spacing"> <property name="spacing">

View File

@ -292,6 +292,11 @@ void ChatWidget::addTitleBarWidget(QWidget *w)
ui->pluginTitleFrame->layout()->addWidget(w) ; ui->pluginTitleFrame->layout()->addWidget(w) ;
} }
void ChatWidget::addTopBarWidget(QWidget *w)
{
ui->pluginTopFrame->layout()->addWidget(w) ;
}
void ChatWidget::hideChatText(bool hidden) void ChatWidget::hideChatText(bool hidden)
{ {
ui->chatTextFrame->setHidden(hidden); ; ui->chatTextFrame->setHidden(hidden); ;

View File

@ -115,6 +115,7 @@ public:
// small enough in size. // small enough in size.
void addChatBarWidget(QWidget *w) ; void addChatBarWidget(QWidget *w) ;
void addTitleBarWidget(QWidget *w); void addTitleBarWidget(QWidget *w);
void addTopBarWidget(QWidget *w);
void hideChatText(bool hidden); void hideChatText(bool hidden);
RSButtonOnText* getNewButtonOnTextBrowser(); RSButtonOnText* getNewButtonOnTextBrowser();
RSButtonOnText* getNewButtonOnTextBrowser(QString text); RSButtonOnText* getNewButtonOnTextBrowser(QString text);

View File

@ -26,6 +26,322 @@
<property name="verticalSpacing"> <property name="verticalSpacing">
<number>2</number> <number>2</number>
</property> </property>
<item row="0" column="0">
<layout class="QHBoxLayout" name="titleBarMainHLayout">
<property name="sizeConstraint">
<enum>QLayout::SetMaximumSize</enum>
</property>
<item>
<widget class="QFrame" name="titleBarFrame">
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>64</height>
</size>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<layout class="QHBoxLayout" name="titleBarFrameHLayout">
<property name="leftMargin">
<number>2</number>
</property>
<property name="topMargin">
<number>2</number>
</property>
<property name="rightMargin">
<number>2</number>
</property>
<property name="bottomMargin">
<number>2</number>
</property>
<item>
<layout class="QVBoxLayout" name="titleLayout">
<property name="spacing">
<number>3</number>
</property>
<property name="leftMargin">
<number>2</number>
</property>
<property name="topMargin">
<number>3</number>
</property>
<property name="rightMargin">
<number>3</number>
</property>
<property name="bottomMargin">
<number>3</number>
</property>
<item>
<layout class="QHBoxLayout" name="nameLayout">
<item>
<widget class="StyledLabel" name="titleLabel">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string notr="true">Title</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="StyledLabel" name="statusLabel">
<property name="text">
<string>(Status)</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="statusMessageLabel">
<property name="text">
<string notr="true">Status message</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QFrame" name="pluginTopFrame">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<layout class="QHBoxLayout" name="pluginTitleFrameHLayout_2">
<property name="spacing">
<number>3</number>
</property>
<property name="leftMargin">
<number>2</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>2</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
</layout>
</widget>
</item>
<item>
<spacer name="titleBarHSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>28</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QToolButton" name="searchButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
<property name="icon">
<iconset resource="../icons.qrc">
<normaloff>:/icons/png/search.png</normaloff>:/icons/png/search.png</iconset>
</property>
<property name="iconSize">
<size>
<width>28</width>
<height>28</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="LineEditClear" name="leSearch"/>
</item>
<item>
<widget class="QToolButton" name="markButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="icon">
<iconset resource="../icons.qrc">
<normaloff>:/icons/png/highlight.png</normaloff>:/icons/png/highlight.png</iconset>
</property>
<property name="iconSize">
<size>
<width>28</width>
<height>28</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="searchBefore">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="icon">
<iconset resource="../icons.qrc">
<normaloff>:/icons/png/arrow-left.png</normaloff>:/icons/png/arrow-left.png</iconset>
</property>
<property name="iconSize">
<size>
<width>28</width>
<height>28</height>
</size>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="searchAfter">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="icon">
<iconset resource="../icons.qrc">
<normaloff>:/icons/png/arrow-right.png</normaloff>:/icons/png/arrow-right.png</iconset>
</property>
<property name="iconSize">
<size>
<width>28</width>
<height>28</height>
</size>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="notifyButton">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="icon">
<iconset resource="../icons.qrc">
<normaloff>:/icons/png/chat-bubble-notify.png</normaloff>:/icons/png/chat-bubble-notify.png</iconset>
</property>
<property name="iconSize">
<size>
<width>28</width>
<height>28</height>
</size>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="pushtoolsButton">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Chat menu&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="icon">
<iconset resource="../icons.qrc">
<normaloff>:/icons/png/menu.png</normaloff>:/icons/png/menu.png</iconset>
</property>
<property name="iconSize">
<size>
<width>28</width>
<height>28</height>
</size>
</property>
<property name="popupMode">
<enum>QToolButton::InstantPopup</enum>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QFrame" name="pluginTitleFrame">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<layout class="QHBoxLayout" name="pluginTitleFrameHLayout">
<property name="spacing">
<number>3</number>
</property>
<property name="leftMargin">
<number>2</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>2</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</item>
<item row="1" column="0"> <item row="1" column="0">
<layout class="QHBoxLayout" name="textChatHLayout"> <layout class="QHBoxLayout" name="textChatHLayout">
<property name="spacing"> <property name="spacing">
@ -561,295 +877,6 @@ border-image: url(:/images/closepressed.png)
</item> </item>
</layout> </layout>
</item> </item>
<item row="0" column="0">
<layout class="QHBoxLayout" name="titleBarMainHLayout">
<property name="sizeConstraint">
<enum>QLayout::SetMaximumSize</enum>
</property>
<item>
<widget class="QFrame" name="titleBarFrame">
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>64</height>
</size>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<layout class="QHBoxLayout" name="titleBarFrameHLayout">
<property name="leftMargin">
<number>2</number>
</property>
<property name="topMargin">
<number>2</number>
</property>
<property name="rightMargin">
<number>2</number>
</property>
<property name="bottomMargin">
<number>2</number>
</property>
<item>
<layout class="QVBoxLayout" name="titleLayout">
<property name="spacing">
<number>3</number>
</property>
<property name="leftMargin">
<number>2</number>
</property>
<property name="topMargin">
<number>3</number>
</property>
<property name="rightMargin">
<number>3</number>
</property>
<property name="bottomMargin">
<number>3</number>
</property>
<item>
<layout class="QHBoxLayout" name="nameLayout">
<item>
<widget class="StyledLabel" name="titleLabel">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string notr="true">Title</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="StyledLabel" name="statusLabel">
<property name="text">
<string>(Status)</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="statusMessageLabel">
<property name="text">
<string notr="true">Status message</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="titleBarHSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>28</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QToolButton" name="searchButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
<property name="icon">
<iconset resource="../icons.qrc">
<normaloff>:/icons/png/search.png</normaloff>:/icons/png/search.png</iconset>
</property>
<property name="iconSize">
<size>
<width>28</width>
<height>28</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="LineEditClear" name="leSearch"/>
</item>
<item>
<widget class="QToolButton" name="markButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="icon">
<iconset resource="../icons.qrc">
<normaloff>:/icons/png/highlight.png</normaloff>:/icons/png/highlight.png</iconset>
</property>
<property name="iconSize">
<size>
<width>28</width>
<height>28</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="searchBefore">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="icon">
<iconset resource="../icons.qrc">
<normaloff>:/icons/png/arrow-left.png</normaloff>:/icons/png/arrow-left.png</iconset>
</property>
<property name="iconSize">
<size>
<width>28</width>
<height>28</height>
</size>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="searchAfter">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="icon">
<iconset resource="../icons.qrc">
<normaloff>:/icons/png/arrow-right.png</normaloff>:/icons/png/arrow-right.png</iconset>
</property>
<property name="iconSize">
<size>
<width>28</width>
<height>28</height>
</size>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="notifyButton">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="icon">
<iconset resource="../icons.qrc">
<normaloff>:/icons/png/chat-bubble-notify.png</normaloff>:/icons/png/chat-bubble-notify.png</iconset>
</property>
<property name="iconSize">
<size>
<width>28</width>
<height>28</height>
</size>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="pushtoolsButton">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Chat menu&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="icon">
<iconset resource="../icons.qrc">
<normaloff>:/icons/png/menu.png</normaloff>:/icons/png/menu.png</iconset>
</property>
<property name="iconSize">
<size>
<width>28</width>
<height>28</height>
</size>
</property>
<property name="popupMode">
<enum>QToolButton::InstantPopup</enum>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QFrame" name="pluginTitleFrame">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<layout class="QHBoxLayout" name="pluginTitleFrameHLayout">
<property name="spacing">
<number>3</number>
</property>
<property name="leftMargin">
<number>2</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>2</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</item>
</layout> </layout>
<action name="actionBold"> <action name="actionBold">
<property name="text"> <property name="text">

View File

@ -62,7 +62,7 @@ PopupDistantChatDialog::PopupDistantChatDialog(const DistantChatPeerId& tunnel_i
_update_timer->start() ; _update_timer->start() ;
getChatWidget()->addChatBarWidget(_status_label) ; getChatWidget()->addTopBarWidget(_status_label) ;
updateDisplay() ; updateDisplay() ;
} }

View File

@ -185,7 +185,7 @@ int FriendSelectionWidget::addColumn(const QString &title)
return column; return column;
} }
void FriendSelectionWidget::showEvent(QShowEvent *e) void FriendSelectionWidget::showEvent(QShowEvent */*e*/)
{ {
if(gxsIds.empty()) if(gxsIds.empty())
loadIdentities(); loadIdentities();
@ -838,6 +838,9 @@ void FriendSelectionWidget::contextMenuRequested(const QPoint &/*pos*/)
contextMenu->addAction(QIcon(), tr("Mark all"), this, SLOT(selectAll())); contextMenu->addAction(QIcon(), tr("Mark all"), this, SLOT(selectAll()));
contextMenu->addAction(QIcon(), tr("Mark none"), this, SLOT(deselectAll())); contextMenu->addAction(QIcon(), tr("Mark none"), this, SLOT(deselectAll()));
} }
if (mListModus == MODUS_CHECK) {
contextMenu->addAction(QIcon(), tr("Mark none"), this, SLOT(deselectAll()));
}
if (!mContextMenuActions.isEmpty()) { if (!mContextMenuActions.isEmpty()) {
bool addSeparator = false; bool addSeparator = false;

View File

@ -209,6 +209,9 @@ void GxsChannelPostItem::setup()
ui->scoreLabel->hide(); ui->scoreLabel->hide();
// hide unsubscribe button not necessary
ui->unsubscribeButton->hide();
ui->downloadButton->hide(); ui->downloadButton->hide();
ui->playButton->hide(); ui->playButton->hide();
//ui->warn_image_label->hide(); //ui->warn_image_label->hide();
@ -426,7 +429,7 @@ void GxsChannelPostItem::fill()
mInFill = true; mInFill = true;
QString title; QString title;
QString msgText;
//float f = QFontMetricsF(font()).height()/14.0 ; //float f = QFontMetricsF(font()).height()/14.0 ;
if(mPost.mThumbnail.mData != NULL) if(mPost.mThumbnail.mData != NULL)
@ -465,8 +468,10 @@ void GxsChannelPostItem::fill()
title += link.toHtml(); title += link.toHtml();
ui->titleLabel->setText(title); ui->titleLabel->setText(title);
msgText = tr("Post") + ": ";
RetroShareLink msgLink = RetroShareLink::createGxsMessageLink(RetroShareLink::TYPE_CHANNEL, mPost.mMeta.mGroupId, mPost.mMeta.mMsgId, messageName()); RetroShareLink msgLink = RetroShareLink::createGxsMessageLink(RetroShareLink::TYPE_CHANNEL, mPost.mMeta.mGroupId, mPost.mMeta.mMsgId, messageName());
ui->subjectLabel->setText(msgLink.toHtml()); msgText += msgLink.toHtml();
ui->subjectLabel->setText(msgText);
if (IS_GROUP_SUBSCRIBED(mGroupMeta.mSubscribeFlags) || IS_GROUP_ADMIN(mGroupMeta.mSubscribeFlags)) if (IS_GROUP_SUBSCRIBED(mGroupMeta.mSubscribeFlags) || IS_GROUP_ADMIN(mGroupMeta.mSubscribeFlags))
{ {

View File

@ -77,7 +77,7 @@
<item> <item>
<layout class="QHBoxLayout" name="tilteHLayout"> <layout class="QHBoxLayout" name="tilteHLayout">
<item> <item>
<widget class="StyledElidedLabel" name="titleLabel"> <widget class="QLabel" name="titleLabel">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred"> <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -124,16 +124,6 @@
</item> </item>
</layout> </layout>
</item> </item>
<item>
<widget class="QLabel" name="subjectLabel">
<property name="text">
<string notr="true">TextLabel</string>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
<item> <item>
<spacer name="verticalSpacer_2"> <spacer name="verticalSpacer_2">
<property name="orientation"> <property name="orientation">
@ -147,6 +137,16 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item>
<widget class="QLabel" name="subjectLabel">
<property name="text">
<string notr="true">TextLabel</string>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
<item> <item>
<layout class="QHBoxLayout" name="newCommHLayout"> <layout class="QHBoxLayout" name="newCommHLayout">
<property name="topMargin"> <property name="topMargin">
@ -469,11 +469,6 @@
</layout> </layout>
</widget> </widget>
<customwidgets> <customwidgets>
<customwidget>
<class>StyledElidedLabel</class>
<extends>QLabel</extends>
<header>gui/common/StyledElidedLabel.h</header>
</customwidget>
<customwidget> <customwidget>
<class>ElidedLabel</class> <class>ElidedLabel</class>
<extends>QLabel</extends> <extends>QLabel</extends>

View File

@ -25,6 +25,7 @@
#include "gui/notifyqt.h" #include "gui/notifyqt.h"
#include "gui/Circles/CreateCircleDialog.h" #include "gui/Circles/CreateCircleDialog.h"
#include "gui/gxs/GxsIdDetails.h" #include "gui/gxs/GxsIdDetails.h"
#include "gui/common/FilesDefs.h"
#include <QLabel> #include <QLabel>
#include <QPushButton> #include <QPushButton>
@ -98,8 +99,9 @@ void GxsCircleItem::setup()
ui->gxsIdLabel->setId(mGxsId); ui->gxsIdLabel->setId(mGxsId);
ui->inviteeButton->setHidden(false); ui->inviteeButton->setHidden(false);
ui->inviteeButton->setText(tr("Grant membership")); ui->inviteeButton->setText(tr("Grant membership"));
ui->inviteeButton->setToolTip(tr("Grant membership to this circle, for this identity")); ui->inviteeButton->setToolTip(tr("Grant membership to this circle, for this identity"));
ui->inviteeButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/accepted16.png"));
ui->membershipButton->setHidden(true); ui->membershipButton->setHidden(true);
} }
@ -133,6 +135,7 @@ void GxsCircleItem::setup()
ui->inviteeButton->setHidden(false); ui->inviteeButton->setHidden(false);
ui->inviteeButton->setText(tr("Revoke membership")); ui->inviteeButton->setText(tr("Revoke membership"));
ui->inviteeButton->setToolTip(tr("Revoke membership for that identity")); ui->inviteeButton->setToolTip(tr("Revoke membership for that identity"));
ui->inviteeButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/cancel.png"));
} }
else else
{ {
@ -155,6 +158,7 @@ void GxsCircleItem::setup()
ui->membershipButton->setHidden(false); ui->membershipButton->setHidden(false);
ui->membershipButton->setText(tr("Cancel membership request")); ui->membershipButton->setText(tr("Cancel membership request"));
ui->membershipButton->setToolTip(tr("Cancel your membership request from that circle")); ui->membershipButton->setToolTip(tr("Cancel your membership request from that circle"));
ui->membershipButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/cancel.png"));
ui->inviteeButton->setHidden(true); ui->inviteeButton->setHidden(true);
} }
@ -168,6 +172,7 @@ void GxsCircleItem::setup()
ui->membershipButton->setHidden(false); ui->membershipButton->setHidden(false);
ui->membershipButton->setText(tr("Cancel membership")); ui->membershipButton->setText(tr("Cancel membership"));
ui->membershipButton->setToolTip(tr("Cancel your membership from that circle")); ui->membershipButton->setToolTip(tr("Cancel your membership from that circle"));
ui->membershipButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/cancel.png"));
ui->inviteeButton->setHidden(true); ui->inviteeButton->setHidden(true);
} }

View File

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>618</width> <width>618</width>
<height>217</height> <height>108</height>
</rect> </rect>
</property> </property>
<layout class="QGridLayout" name="GxsCircleItemGLayout"> <layout class="QGridLayout" name="GxsCircleItemGLayout">
@ -133,29 +133,86 @@
<item> <item>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<item> <item>
<widget class="QLabel" name="titleLabel"> <layout class="QHBoxLayout" name="horizontalLayout">
<property name="sizePolicy"> <item>
<sizepolicy hsizetype="Minimum" vsizetype="Minimum"> <widget class="QLabel" name="iconLabel">
<horstretch>0</horstretch> <property name="maximumSize">
<verstretch>0</verstretch> <size>
</sizepolicy> <width>20</width>
</property> <height>20</height>
<property name="font"> </size>
<font> </property>
<weight>75</weight> <property name="text">
<italic>true</italic> <string>TextLabel</string>
<bold>true</bold> </property>
</font> <property name="scaledContents">
</property> <bool>true</bool>
<property name="text"> </property>
<string notr="true">Circle msg</string> </widget>
</property> </item>
</widget> <item>
<widget class="GxsIdLabel" name="gxsIdLabel">
<property name="font">
<font>
<pointsize>10</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string notr="true">name</string>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="titleLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<weight>75</weight>
<italic>true</italic>
<bold>true</bold>
</font>
</property>
<property name="text">
<string notr="true">Circle msg</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>358</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="nameHLayout"> <layout class="QHBoxLayout" name="nameHLayout">
<item> <item>
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
<property name="font">
<font>
<pointsize>10</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text"> <property name="text">
<string>Circle name:</string> <string>Circle name:</string>
</property> </property>
@ -186,56 +243,6 @@
</item> </item>
</layout> </layout>
</item> </item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="forLabel">
<property name="text">
<string>Identity:</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="iconLabel">
<property name="maximumSize">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
<property name="text">
<string>TextLabel</string>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="GxsIdLabel" name="gxsIdLabel">
<property name="text">
<string notr="true">name</string>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>358</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_2"> <layout class="QHBoxLayout" name="horizontalLayout_2">
<item> <item>

View File

@ -118,6 +118,9 @@ void GxsForumMsgItem::setup()
ui->subjectLabel->setMinimumWidth(20); ui->subjectLabel->setMinimumWidth(20);
// hide unsubscribe button not necessary
ui->unsubscribeButton->hide();
ui->expandFrame->hide(); ui->expandFrame->hide();
ui->parentFrame->hide(); ui->parentFrame->hide();
} }

View File

@ -313,7 +313,11 @@ void GxsCommentTreeWidget::setCurrentCommentMsgId(QTreeWidgetItem *current, QTre
mCurrentCommentText = current->text(PCITEM_COLUMN_COMMENT); mCurrentCommentText = current->text(PCITEM_COLUMN_COMMENT);
mCurrentCommentAuthor = current->text(PCITEM_COLUMN_AUTHOR); mCurrentCommentAuthor = current->text(PCITEM_COLUMN_AUTHOR);
mCurrentCommentAuthorId = RsGxsId(current->text(PCITEM_COLUMN_AUTHORID).toStdString()); mCurrentCommentAuthorId = RsGxsId(current->text(PCITEM_COLUMN_AUTHORID).toStdString());
} else {
mCurrentCommentMsgId.clear();
mCurrentCommentText.clear();
mCurrentCommentAuthor.clear();
mCurrentCommentAuthorId.clear();
} }
} }
@ -323,19 +327,22 @@ void GxsCommentTreeWidget::customPopUpMenu(const QPoint& point)
QMenu contextMnu( this ); QMenu contextMnu( this );
QAction* action = contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_REPLY), tr("Reply to Comment"), this, SLOT(replyToComment())); QAction* action = contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_REPLY), tr("Reply to Comment"), this, SLOT(replyToComment()));
action->setDisabled(mCurrentCommentMsgId.isNull()); action->setDisabled(!item || mCurrentCommentMsgId.isNull());
action = contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_MESSAGE), tr("Submit Comment"), this, SLOT(makeComment())); action = contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_MESSAGE), tr("Submit Comment"), this, SLOT(makeComment()));
action->setDisabled(mMsgVersions.empty()); action->setDisabled(mMsgVersions.empty());
action = contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_COPY), tr("Copy Comment"), this, SLOT(copyComment())); action = contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_COPY), tr("Copy Comment"), this, SLOT(copyComment()));
action->setData( item->data(PCITEM_COLUMN_COMMENT,Qt::DisplayRole) ); action->setData( item ? item->data(PCITEM_COLUMN_COMMENT,Qt::DisplayRole) : "" );
action->setDisabled(mCurrentCommentMsgId.isNull()); action->setDisabled(!item || mCurrentCommentMsgId.isNull());
contextMnu.addSeparator(); contextMnu.addSeparator();
action = contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_VOTEUP), tr("Vote Up"), this, SLOT(voteUp())); action = contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_VOTEUP), tr("Vote Up"), this, SLOT(voteUp()));
action->setDisabled(mVoterId.isNull()); action->setDisabled(!item || mCurrentCommentMsgId.isNull() || mVoterId.isNull());
action = contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_VOTEDOWN), tr("Vote Down"), this, SLOT(voteDown())); action = contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_VOTEDOWN), tr("Vote Down"), this, SLOT(voteDown()));
action->setDisabled(mVoterId.isNull()); action->setDisabled(!item || mCurrentCommentMsgId.isNull() || mVoterId.isNull());
if (!mCurrentCommentMsgId.isNull()) if (!mCurrentCommentMsgId.isNull())

View File

@ -75,6 +75,7 @@ CreateGxsChannelMsg::CreateGxsChannelMsg(const RsGxsGroupId &cId, RsGxsMessageId
connect(removeAllFilesButton, SIGNAL(clicked() ), this , SLOT(clearAllAttachments())); connect(removeAllFilesButton, SIGNAL(clicked() ), this , SLOT(clearAllAttachments()));
//connect(addfilepushButton, SIGNAL(clicked() ), this , SLOT(addExtraFile())); //connect(addfilepushButton, SIGNAL(clicked() ), this , SLOT(addExtraFile()));
connect(subjectEdit,SIGNAL(textChanged(const QString&)),this,SLOT(updatePreviewText(const QString&))); connect(subjectEdit,SIGNAL(textChanged(const QString&)),this,SLOT(updatePreviewText(const QString&)));
connect(expandButton, SIGNAL(clicked()), this, SLOT( toggle()));
connect(addThumbnailButton, SIGNAL(clicked() ), this , SLOT(addThumbnail())); connect(addThumbnailButton, SIGNAL(clicked() ), this , SLOT(addThumbnail()));
connect(thumbNailCb, SIGNAL(toggled(bool)), this, SLOT(allowAutoMediaThumbNail(bool))); connect(thumbNailCb, SIGNAL(toggled(bool)), this, SLOT(allowAutoMediaThumbNail(bool)));
@ -86,6 +87,8 @@ CreateGxsChannelMsg::CreateGxsChannelMsg(const RsGxsGroupId &cId, RsGxsMessageId
channelpostButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/comment.png")); channelpostButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/comment.png"));
attachmentsButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/attachements.png")); attachmentsButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/attachements.png"));
addThumbnailButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/add-image.png")); addThumbnailButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/add-image.png"));
expandButton->setIcon(FilesDefs::getIconFromQtResourcePath(QString(":/icons/png/up-arrow.png")));
removeButton->setIcon(FilesDefs::getIconFromQtResourcePath(QString(":/icons/mail/delete.png")));
aspectRatio_CB->setItemIcon(0,FilesDefs::getIconFromQtResourcePath(":/icons/svg/ratio-auto.svg")); aspectRatio_CB->setItemIcon(0,FilesDefs::getIconFromQtResourcePath(":/icons/svg/ratio-auto.svg"));
aspectRatio_CB->setItemIcon(1,FilesDefs::getIconFromQtResourcePath(":/icons/svg/ratio-1-1.svg")); aspectRatio_CB->setItemIcon(1,FilesDefs::getIconFromQtResourcePath(":/icons/svg/ratio-1-1.svg"));
@ -114,6 +117,8 @@ CreateGxsChannelMsg::CreateGxsChannelMsg(const RsGxsGroupId &cId, RsGxsMessageId
generateSpinBox->hide(); generateSpinBox->hide();
#endif #endif
removeButton->hide();
/* load settings */ /* load settings */
processSettings(true); processSettings(true);
} }
@ -824,8 +829,8 @@ void CreateGxsChannelMsg::addThumbnail()
picture = img; picture = img;
// to show the selected // to show the selected
preview_W->setPixmap(picture, aspectRatio_CB->currentIndex()==0); preview_W->setPixmap(picture, aspectRatio_CB->currentIndex()==0);
removeButton->show();
} }
void CreateGxsChannelMsg::loadOriginalChannelPostInfo() void CreateGxsChannelMsg::loadOriginalChannelPostInfo()
@ -869,7 +874,8 @@ void CreateGxsChannelMsg::loadOriginalChannelPostInfo()
if(post.mThumbnail.mData != NULL) if(post.mThumbnail.mData != NULL)
{ {
GxsIdDetails::loadPixmapFromData(post.mThumbnail.mData,post.mThumbnail.mSize,picture,GxsIdDetails::ORIGINAL); GxsIdDetails::loadPixmapFromData(post.mThumbnail.mData,post.mThumbnail.mSize,picture,GxsIdDetails::ORIGINAL);
preview_W->setPixmap(picture,true); preview_W->setPixmap(picture,true);
removeButton->show();
} }
@ -926,3 +932,28 @@ void CreateGxsChannelMsg::on_attachmentsButton_clicked()
{ {
stackedWidget->setCurrentIndex(1); stackedWidget->setCurrentIndex(1);
} }
void CreateGxsChannelMsg::toggle()
{
if (expandButton->isChecked())
{
thumbnailFrame->hide();
gridLayoutTextEdit->setContentsMargins(0,9,0,0);
expandButton->setIcon(FilesDefs::getIconFromQtResourcePath(QString(":/icons/png/down-arrow.png")));
expandButton->setToolTip(tr("Show"));
}
else
{
thumbnailFrame->show();
gridLayoutTextEdit->setContentsMargins(0,0,0,0);
expandButton->setIcon(FilesDefs::getIconFromQtResourcePath(QString(":/icons/png/up-arrow.png")));
expandButton->setToolTip(tr("Hide"));
}
}
void CreateGxsChannelMsg::on_removeButton_clicked()
{
preview_W->setPixmap(FilesDefs::getPixmapFromQtResourcePath(ChannelPostThumbnailView::CHAN_DEFAULT_IMAGE),true);
removeButton->hide();
}

View File

@ -57,6 +57,7 @@ protected:
virtual void dropEvent(QDropEvent *event); virtual void dropEvent(QDropEvent *event);
private slots: private slots:
void toggle() ;
void addExtraFile(); void addExtraFile();
void checkAttachmentReady(); void checkAttachmentReady();
void deleteAttachment(); void deleteAttachment();
@ -74,6 +75,7 @@ private slots:
void on_channelpostButton_clicked(); void on_channelpostButton_clicked();
void on_attachmentsButton_clicked(); void on_attachmentsButton_clicked();
void on_removeButton_clicked();
private: private:
void processSettings(bool load); void processSettings(bool load);
void loadChannelInfo(); void loadChannelInfo();

View File

@ -57,10 +57,16 @@
<property name="verticalSpacing"> <property name="verticalSpacing">
<number>0</number> <number>0</number>
</property> </property>
<item row="0" column="1"> <item row="0" column="0">
<widget class="QPushButton" name="attachmentsButton"> <widget class="QPushButton" name="channelpostButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text"> <property name="text">
<string>Attachments</string> <string>Channel Post</string>
</property> </property>
<property name="iconSize"> <property name="iconSize">
<size> <size>
@ -70,7 +76,58 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="0" colspan="3"> <item row="2" column="0" colspan="4">
<layout class="QHBoxLayout" name="buttonHLayout">
<property name="spacing">
<number>9</number>
</property>
<item>
<widget class="QCheckBox" name="generateCheckBox">
<property name="text">
<string>Generate mass data</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="generateSpinBox">
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>999</number>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="postButton">
<property name="text">
<string>Post</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="cancelButton">
<property name="text">
<string>Cancel</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="0" colspan="4">
<widget class="QStackedWidget" name="stackedWidget"> <widget class="QStackedWidget" name="stackedWidget">
<property name="mouseTracking"> <property name="mouseTracking">
<bool>true</bool> <bool>true</bool>
@ -85,192 +142,250 @@
<number>0</number> <number>0</number>
</property> </property>
<widget class="QWidget" name="stackedWidgetPage1"> <widget class="QWidget" name="stackedWidgetPage1">
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="gridLayout_5">
<property name="leftMargin"> <property name="leftMargin">
<number>0</number> <number>0</number>
</property> </property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin"> <property name="rightMargin">
<number>0</number> <number>0</number>
</property> </property>
<item row="0" column="0" rowspan="4"> <property name="bottomMargin">
<layout class="QVBoxLayout" name="verticalLayout_2"> <number>0</number>
<item> </property>
<widget class="ChannelPostThumbnailView" name="preview_W" native="true"> <item row="0" column="0">
<property name="sizePolicy"> <widget class="QFrame" name="thumbnailFrame">
<sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding"> <property name="frameShape">
<horstretch>0</horstretch> <enum>QFrame::NoFrame</enum>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>1</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="0" column="1">
<layout class="QHBoxLayout" name="channelNameHLayout">
<property name="topMargin">
<number>6</number>
</property> </property>
<item> <property name="frameShadow">
<widget class="QLabel" name="channelNameLabel"> <enum>QFrame::Plain</enum>
<property name="sizePolicy"> </property>
<sizepolicy hsizetype="Preferred" vsizetype="Fixed"> <layout class="QGridLayout" name="gridLayout_3">
<horstretch>0</horstretch> <property name="leftMargin">
<verstretch>0</verstretch> <number>6</number>
</sizepolicy> </property>
</property> <property name="topMargin">
<property name="font"> <number>9</number>
<font> </property>
<weight>75</weight> <property name="rightMargin">
<bold>true</bold> <number>6</number>
</font> </property>
</property> <property name="bottomMargin">
<property name="text"> <number>0</number>
<string>Channel Post to:</string> </property>
</property> <item row="2" column="1">
</widget> <widget class="QLabel" name="channelAttachLabel">
</item> <property name="text">
<item> <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
<widget class="QLineEdit" name="channelName">
<property name="enabled">
<bool>true</bool>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="1">
<widget class="QLabel" name="channelAttachLabel">
<property name="text">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt; &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; } p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;&quot;&gt; &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:10pt; font-weight:600;&quot;&gt;Attachments:&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:10pt; font-weight:600;&quot;&gt;Attachments:&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;img src=&quot;:/images/feedback_arrow.png&quot; /&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt; Use Drag and Drop / Add Files button, to Hash new files.&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;img src=&quot;:/images/feedback_arrow.png&quot; /&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt; Use Drag and Drop / Add Files button, to Hash new files.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;img src=&quot;:/images/feedback_arrow.png&quot; /&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt; Copy/Paste RetroShare links from your shares&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;img src=&quot;:/images/feedback_arrow.png&quot; /&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt; Copy/Paste RetroShare links from your shares&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
</widget>
</item>
<item row="1" column="1">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPushButton" name="addThumbnailButton">
<property name="text">
<string>Add Channel Thumbnail</string>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="aspectRatio_CB">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Choose aspect ratio policy. In 'Auto' mode, the most suitable aspect ratio is chosen for you.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<item>
<property name="text">
<string>Auto</string>
</property>
</item>
<item>
<property name="text">
<string>1:1</string>
</property>
</item>
<item>
<property name="text">
<string>3:4</string>
</property>
</item>
<item>
<property name="text">
<string>16:9</string>
</property>
</item>
</widget>
</item>
<item>
<widget class="QPushButton" name="removeButton">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Remove Thumbnail&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="0" column="1">
<layout class="QHBoxLayout" name="channelNameHLayout">
<property name="spacing">
<number>9</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>6</number>
</property>
<property name="rightMargin">
<number>6</number>
</property>
<item>
<widget class="QLabel" name="channelNameLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Channel Post to:</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="channelName">
<property name="enabled">
<bool>true</bool>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="0" rowspan="4">
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="spacing">
<number>6</number>
</property>
<item>
<widget class="ChannelPostThumbnailView" name="preview_W" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>1</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget> </widget>
</item> </item>
<item row="2" column="1"> <item row="1" column="0">
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QGridLayout" name="gridLayoutTextEdit">
<item>
<widget class="QPushButton" name="addThumbnailButton">
<property name="text">
<string>Add Channel Thumbnail</string>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="aspectRatio_CB">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Choose aspect ratio policy. In 'Auto' mode, the most suitable aspect ratio is chosen for you.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<item>
<property name="text">
<string>Auto</string>
</property>
</item>
<item>
<property name="text">
<string>1:1</string>
</property>
</item>
<item>
<property name="text">
<string>3:4</string>
</property>
</item>
<item>
<property name="text">
<string>16:9</string>
</property>
</item>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="3" column="1">
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="topMargin"> <property name="topMargin">
<number>9</number> <number>6</number>
</property> </property>
<item> <item row="0" column="0">
<widget class="QLineEdit" name="subjectEdit"> <widget class="QLineEdit" name="subjectEdit">
<property name="placeholderText"> <property name="placeholderText">
<string>Title</string> <string>Title</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="0" column="1">
<spacer name="verticalSpacer"> <widget class="QToolButton" name="expandButton">
<property name="orientation"> <property name="toolTip">
<enum>Qt::Vertical</enum> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Hide&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
<property name="sizeHint" stdset="0"> <property name="text">
<size> <string/>
<width>20</width>
<height>40</height>
</size>
</property> </property>
</spacer> <property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0" colspan="2">
<widget class="RichTextEdit" name="RichTextEditWidget" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item> </item>
</layout> </layout>
</item> </item>
<item row="4" column="0" colspan="2">
<widget class="RichTextEdit" name="RichTextEditWidget" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="stackedWidgetPage2"> <widget class="QWidget" name="stackedWidgetPage2">
@ -344,7 +459,7 @@ p, li { white-space: pre-wrap; }
</size> </size>
</property> </property>
<property name="toolTip"> <property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Add File&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Remove File&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
<property name="text"> <property name="text">
<string/> <string/>
@ -393,7 +508,7 @@ p, li { white-space: pre-wrap; }
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>827</width> <width>63</width>
<height>24</height> <height>24</height>
</rect> </rect>
</property> </property>
@ -444,23 +559,16 @@ p, li { white-space: pre-wrap; }
</widget> </widget>
</widget> </widget>
</item> </item>
<item row="0" column="2"> <item row="0" column="1">
<spacer name="horizontalSpacer"> <widget class="QPushButton" name="attachmentsButton">
<property name="orientation"> <property name="sizePolicy">
<enum>Qt::Horizontal</enum> <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
<property name="sizeHint" stdset="0">
<size>
<width>486</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="0">
<widget class="QPushButton" name="channelpostButton">
<property name="text"> <property name="text">
<string>Channel Post</string> <string>Attachments</string>
</property> </property>
<property name="iconSize"> <property name="iconSize">
<size> <size>
@ -470,56 +578,18 @@ p, li { white-space: pre-wrap; }
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="0" colspan="3"> <item row="0" column="2">
<layout class="QHBoxLayout" name="buttonHLayout"> <spacer name="horizontalSpacer">
<property name="spacing"> <property name="orientation">
<number>9</number> <enum>Qt::Horizontal</enum>
</property> </property>
<item> <property name="sizeHint" stdset="0">
<widget class="QCheckBox" name="generateCheckBox"> <size>
<property name="text"> <width>40</width>
<string>Generate mass data</string> <height>20</height>
</property> </size>
</widget> </property>
</item> </spacer>
<item>
<widget class="QSpinBox" name="generateSpinBox">
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>999</number>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="postButton">
<property name="text">
<string>Post</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="cancelButton">
<property name="text">
<string>Cancel</string>
</property>
</widget>
</item>
</layout>
</item> </item>
</layout> </layout>
</widget> </widget>

View File

@ -908,6 +908,7 @@ void GxsForumThreadWidget::changedThread(QModelIndex index)
return; return;
mThreadId = mOrigThreadId = new_id; mThreadId = mOrigThreadId = new_id;
mLastSelectedPosts[groupId()] = new_id;
#ifdef DEBUG_FORUMS #ifdef DEBUG_FORUMS
std::cerr << "Switched to new thread ID " << mThreadId << std::endl; std::cerr << "Switched to new thread ID " << mThreadId << std::endl;
@ -1492,22 +1493,25 @@ void GxsForumThreadWidget::expandSubtree() {
bool GxsForumThreadWidget::navigate(const RsGxsMessageId &msgId) bool GxsForumThreadWidget::navigate(const RsGxsMessageId &msgId)
{ {
QModelIndex source_index = mThreadModel->getIndexOfMessage(msgId); QModelIndex source_index = mThreadModel->getIndexOfMessage(msgId);
if(!source_index.isValid()) if(!source_index.isValid())
{ {
std::cerr << "(EE) Cannot navigate to msg " << msgId << " in forum " << mForumGroup.mMeta.mGroupId << ": index unknown. Setting mNavigatePendingMsgId." << std::endl; std::cerr << "(EE) Cannot navigate to msg " << msgId << " in forum " << mForumGroup.mMeta.mGroupId << ": index unknown. Setting mNavigatePendingMsgId." << std::endl;
mNavigatePendingMsgId = msgId; // not found. That means the forum may not be loaded yet. So we keep that post in mind, for after loading. mNavigatePendingMsgId = msgId; // not found. That means the forum may not be loaded yet. So we keep that post in mind, for after loading.
return true; // we have to return true here, otherwise the caller will intepret the async loading as an error. return true; // we have to return true here, otherwise the caller will intepret the async loading as an error.
} }
QModelIndex indx = mThreadProxyModel->mapFromSource(source_index); QModelIndex indx = mThreadProxyModel->mapFromSource(source_index);
ui->threadTreeWidget->setCurrentIndex(indx); ui->threadTreeWidget->selectionModel()->setCurrentIndex(indx,QItemSelectionModel::ClearAndSelect);
ui->threadTreeWidget->scrollTo(ui->threadTreeWidget->currentIndex());//May change if model reloaded ui->threadTreeWidget->scrollTo(ui->threadTreeWidget->currentIndex());//May change if model reloaded
ui->threadTreeWidget->setFocus(); ui->threadTreeWidget->setFocus();
return true;
mNavigatePendingMsgId.clear();
return true;
} }
void GxsForumThreadWidget::copyMessageLink() void GxsForumThreadWidget::copyMessageLink()
@ -1797,22 +1801,33 @@ void GxsForumThreadWidget::saveImage()
void GxsForumThreadWidget::changedViewBox() void GxsForumThreadWidget::changedViewBox()
{ {
ui->threadTreeWidget->selectionModel()->clear(); ui->threadTreeWidget->selectionModel()->clear();
ui->threadTreeWidget->selectionModel()->reset(); ui->threadTreeWidget->selectionModel()->reset();
mThreadId.clear(); mThreadId.clear();
// save index // save index
Settings->setValueToGroup("ForumThreadWidget", "viewBox", ui->viewBox->currentIndex()); Settings->setValueToGroup("ForumThreadWidget", "viewBox", ui->viewBox->currentIndex());
if(ui->viewBox->currentIndex() == VIEW_FLAT) if(ui->viewBox->currentIndex() == VIEW_FLAT)
mThreadModel->setTreeMode(RsGxsForumModel::TREE_MODE_FLAT); mThreadModel->setTreeMode(RsGxsForumModel::TREE_MODE_FLAT);
else else
mThreadModel->setTreeMode(RsGxsForumModel::TREE_MODE_TREE); mThreadModel->setTreeMode(RsGxsForumModel::TREE_MODE_TREE);
if(ui->viewBox->currentIndex() == VIEW_LAST_POST) if(ui->viewBox->currentIndex() == VIEW_LAST_POST)
mThreadModel->setSortMode(RsGxsForumModel::SORT_MODE_CHILDREN_PUBLISH_TS); mThreadModel->setSortMode(RsGxsForumModel::SORT_MODE_CHILDREN_PUBLISH_TS);
else else
mThreadModel->setSortMode(RsGxsForumModel::SORT_MODE_PUBLISH_TS); mThreadModel->setSortMode(RsGxsForumModel::SORT_MODE_PUBLISH_TS);
if( (mLastSelectedPosts.count(groupId()) > 0)
&& !mLastSelectedPosts[groupId()].isNull()
&& mThreadModel->getIndexOfMessage(mLastSelectedPosts[groupId()]).isValid())
{
QModelIndex source_index = mThreadModel->getIndexOfMessage(mLastSelectedPosts[groupId()]);
QModelIndex index = mThreadProxyModel->mapFromSource(source_index);
ui->threadTreeWidget->selectionModel()->setCurrentIndex(index,QItemSelectionModel::SelectCurrent | QItemSelectionModel::Rows);
ui->threadTreeWidget->scrollTo(ui->threadTreeWidget->currentIndex());//May change if model reloaded
}
} }
void GxsForumThreadWidget::filterColumnChanged(int column) void GxsForumThreadWidget::filterColumnChanged(int column)
@ -1868,67 +1883,72 @@ void GxsForumThreadWidget::filterItems(const QString& text)
void GxsForumThreadWidget::postForumLoading() void GxsForumThreadWidget::postForumLoading()
{ {
if(groupId().isNull()) if(groupId().isNull())
{ {
ui->nextUnreadButton->setEnabled(false); ui->nextUnreadButton->setEnabled(false);
return; return;
} }
#ifdef DEBUG_FORUMS #ifdef DEBUG_FORUMS
std::cerr << "Post forum loading..." << std::endl; std::cerr << "Post forum loading..." << std::endl;
#endif #endif
if(!mNavigatePendingMsgId.isNull() && mThreadModel->getIndexOfMessage(mNavigatePendingMsgId).isValid())
{ if (!mNavigatePendingMsgId.isNull())
navigate(mNavigatePendingMsgId);
else if( (mLastSelectedPosts.count(groupId()) > 0)
&& !mLastSelectedPosts[groupId()].isNull()
&& mThreadModel->getIndexOfMessage(mLastSelectedPosts[groupId()]).isValid())
{
#ifdef DEBUG_FORUMS #ifdef DEBUG_FORUMS
std::cerr << "Pending msg navigation: " << mNavigatePendingMsgId << ". Using it as new thread Id" << std::endl; std::cerr << "Last selected msg navigation: " << mLastSelectedPosts[groupId()].toStdString() << ". Using it as new thread Id" << std::endl;
#endif #endif
QModelIndex source_index = mThreadModel->getIndexOfMessage(mNavigatePendingMsgId); QModelIndex source_index = mThreadModel->getIndexOfMessage(mLastSelectedPosts[groupId()]);
QModelIndex index = mThreadProxyModel->mapFromSource(source_index); QModelIndex index = mThreadProxyModel->mapFromSource(source_index);
ui->threadTreeWidget->selectionModel()->setCurrentIndex(index,QItemSelectionModel::SelectCurrent | QItemSelectionModel::Rows); ui->threadTreeWidget->selectionModel()->setCurrentIndex(index,QItemSelectionModel::SelectCurrent | QItemSelectionModel::Rows);
ui->threadTreeWidget->scrollTo(ui->threadTreeWidget->currentIndex());//May change if model reloaded ui->threadTreeWidget->scrollTo(ui->threadTreeWidget->currentIndex());//May change if model reloaded
mNavigatePendingMsgId.clear(); }
} else
else {
{
QModelIndex source_index = mThreadModel->getIndexOfMessage(mThreadId); QModelIndex source_index = mThreadModel->getIndexOfMessage(mThreadId);
if(!mThreadId.isNull() && source_index.isValid()) if(!mThreadId.isNull() && source_index.isValid())
{ {
QModelIndex index = mThreadProxyModel->mapFromSource(source_index); QModelIndex index = mThreadProxyModel->mapFromSource(source_index);
ui->threadTreeWidget->selectionModel()->setCurrentIndex(index,QItemSelectionModel::SelectCurrent | QItemSelectionModel::Rows); ui->threadTreeWidget->selectionModel()->setCurrentIndex(index,QItemSelectionModel::SelectCurrent | QItemSelectionModel::Rows);
ui->threadTreeWidget->scrollTo(ui->threadTreeWidget->currentIndex());//May change if model reloaded ui->threadTreeWidget->scrollTo(ui->threadTreeWidget->currentIndex());//May change if model reloaded
#ifdef DEBUG_FORUMS #ifdef DEBUG_FORUMS
std::cerr << " re-selecting index of message " << mThreadId << " to " << source_index.row() << "," << source_index.column() << " " << (void*)source_index.internalPointer() << std::endl; std::cerr << " re-selecting index of message " << mThreadId << " to " << source_index.row() << "," << source_index.column() << " " << (void*)source_index.internalPointer() << std::endl;
#endif #endif
} }
else else
{ {
#ifdef DEBUG_FORUMS #ifdef DEBUG_FORUMS
std::cerr << " previously message " << mThreadId << " not visible anymore -> de-selecting" << std::endl; std::cerr << " previously message " << mThreadId << " not visible anymore -> de-selecting" << std::endl;
#endif #endif
ui->threadTreeWidget->selectionModel()->clear(); ui->threadTreeWidget->selectionModel()->clear();
ui->threadTreeWidget->selectionModel()->reset(); ui->threadTreeWidget->selectionModel()->reset();
mThreadId.clear(); mThreadId.clear();
//blank(); //blank();
} }
// we also need to restore expanded threads // we also need to restore expanded threads
} }
ui->newthreadButton->show(); ui->newthreadButton->show();
ui->forumName->setText(QString::fromUtf8(mForumGroup.mMeta.mGroupName.c_str())); ui->forumName->setText(QString::fromUtf8(mForumGroup.mMeta.mGroupName.c_str()));
ui->threadTreeWidget->sortByColumn(RsGxsForumModel::COLUMN_THREAD_DATE, Qt::DescendingOrder); ui->threadTreeWidget->sortByColumn(RsGxsForumModel::COLUMN_THREAD_DATE, Qt::DescendingOrder);
ui->threadTreeWidget->update(); ui->threadTreeWidget->update();
ui->viewBox->setEnabled(true); ui->viewBox->setEnabled(true);
ui->filterLineEdit->setEnabled(true); ui->filterLineEdit->setEnabled(true);
recursRestoreExpandedItems(mThreadProxyModel->mapFromSource(mThreadModel->root()),mSavedExpandedMessages); recursRestoreExpandedItems(mThreadProxyModel->mapFromSource(mThreadModel->root()),mSavedExpandedMessages);
//mUpdating = false; //mUpdating = false;
ui->nextUnreadButton->setEnabled(true); ui->nextUnreadButton->setEnabled(true);
} }
void GxsForumThreadWidget::updateGroupData() void GxsForumThreadWidget::updateGroupData()

View File

@ -224,6 +224,7 @@ private:
QColor mBackgroundColorPinned; QColor mBackgroundColorPinned;
QColor mBackgroundColorFiltered; QColor mBackgroundColorFiltered;
std::map<RsGxsGroupId,RsGxsMessageId> mLastSelectedPosts;
RsGxsMessageId mNavigatePendingMsgId; RsGxsMessageId mNavigatePendingMsgId;
QList<RsGxsMessageId> mIgnoredMsgId; QList<RsGxsMessageId> mIgnoredMsgId;

View File

@ -169,7 +169,7 @@ ShareManager QPushButton#closeButton {
padding-right: 6px; padding-right: 6px;
} }
ShareManager QPushButton#addButton { ShareManager QPushButton#addButton{
font: bold; font: bold;
font-size: 15px; font-size: 15px;
color: white; color: white;
@ -180,7 +180,25 @@ ShareManager QPushButton#addButton {
padding: 4px; padding: 4px;
} }
ShareManager QPushButton#addButton:hover { ShareManager QPushButton#addButton:hover{
background: #5AD75A;
border-radius: 4px;
min-width: 4em;
padding: 4px;
}
SearchDialog QPushButton#pushButtonSearch {
font: bold;
font-size: 15px;
color: white;
background: #32CD32;
border-radius: 4px;
max-height: 25px;
min-width: 4em;
padding: 4px;
}
SearchDialog QPushButton#pushButtonSearch:hover{
background: #5AD75A; background: #5AD75A;
border-radius: 4px; border-radius: 4px;
min-width: 4em; min-width: 4em;
@ -433,21 +451,28 @@ ChanNewItem QLabel#logoLabel {
} }
GxsChannelPostItem > QFrame#mainFrame[new=false] { GxsChannelPostItem > QFrame#mainFrame[new=false] {
border: 3px solid #D3D3D3; background-color: white;
background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #FFFFFF, stop:1 #F2F2F2);
border-radius: 10px;
} }
GxsChannelPostItem > QFrame#mainFrame[new=true] { GxsChannelPostItem > QFrame#mainFrame[new=true] {
border: 3px solid #82B9F4;
background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #F0F8FD, stop:0.8 #E6F2FD, stop: 0.81 #E6F2FD, stop: 1 #D2E7FD); background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #F0F8FD, stop:0.8 #E6F2FD, stop: 0.81 #E6F2FD, stop: 1 #D2E7FD);
border-radius: 10px;
} }
GxsChannelPostItem QLabel#newLabel { GxsChannelPostItem QLabel#newLabel{
border: 1px solid #167BE7; border: 1px solid #167BE7;
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #2291E0, stop: 1 #3EB3FF); background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #2291E0, stop: 1 #3EB3FF);
border-radius: 3px; border-radius: 3px;
color: white;
}
GxsChannelPostItem QLabel#subjectLabel, GxsChannelPostItem QLabel#titleLabel {
font: 11pt;
font: bold italic;
}
GxsChannelPostItem QFrame#msgFrame {
border: 2px solid #82B9F4;
border-radius: 3px;
} }
GxsChannelPostItem QLabel#logoLabel { GxsChannelPostItem QLabel#logoLabel {
@ -458,6 +483,15 @@ GxsChannelPostItem QLabel#logoLabel {
background-color: black; background-color: black;
} }
GxsCircleItem QFrame#frame {
background-color: white;
}
GxsCircleItem QLabel#nameLabel, QLabel#titleLabel {
font: 11pt;
font: bold italic;
}
ForumNewItem > QFrame#frame, ForumMsgItem > QFrame#frame { ForumNewItem > QFrame#frame, ForumMsgItem > QFrame#frame {
border: 2px solid #CCCCCC; border: 2px solid #CCCCCC;
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #EEEEEE, stop: 1 #CCCCCC); background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #EEEEEE, stop: 1 #CCCCCC);

View File

@ -27,6 +27,7 @@
#include <retroshare/rsmsgs.h> #include <retroshare/rsmsgs.h>
#include <retroshare/rspeers.h> #include <retroshare/rspeers.h>
#include "ChatPage.h" #include "ChatPage.h"
#include "gui/MainWindow.h"
#include <gui/RetroShareLink.h> #include <gui/RetroShareLink.h>
#include "gui/chat/ChatDialog.h" #include "gui/chat/ChatDialog.h"
#include "gui/notifyqt.h" #include "gui/notifyqt.h"
@ -224,7 +225,14 @@ ChatPage::ChatPage(QWidget * parent, Qt::WindowFlags flags)
ui.minimumContrastLabel->hide(); ui.minimumContrastLabel->hide();
ui.minimumContrast->hide(); ui.minimumContrast->hide();
#endif #endif
connect(ui.distantChatComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(distantChatComboBoxChanged(int))); connect(ui.chatLobbies_CountFollowingText, SIGNAL(toggled(bool)),ui.chatLobbies_TextToNotify,SLOT(setEnabled(bool)));
connect(ui.chatLobbies_CountUnRead, SIGNAL(toggled(bool)),this, SLOT(updateChatLobbyUserNotify())) ;
connect(ui.chatLobbies_CheckNickName, SIGNAL(toggled(bool)),this, SLOT(updateChatLobbyUserNotify())) ;
connect(ui.chatLobbies_CountFollowingText, SIGNAL(toggled(bool)),this, SLOT(updateChatLobbyUserNotify())) ;
connect(ui.chatLobbies_TextToNotify, SIGNAL(textChanged(QString)),this, SLOT(updateChatLobbyUserNotify()));
connect(ui.chatLobbies_TextCaseSensitive, SIGNAL(toggled(bool)),this, SLOT(updateChatLobbyUserNotify())) ;
connect(ui.distantChatComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(distantChatComboBoxChanged(int)));
connect(ui.checkBox_emoteprivchat, SIGNAL(toggled(bool)), this, SLOT(updateFontsAndEmotes())); connect(ui.checkBox_emoteprivchat, SIGNAL(toggled(bool)), this, SLOT(updateFontsAndEmotes()));
connect(ui.checkBox_emotegroupchat, SIGNAL(toggled(bool)), this, SLOT(updateFontsAndEmotes())); connect(ui.checkBox_emotegroupchat, SIGNAL(toggled(bool)), this, SLOT(updateFontsAndEmotes()));
@ -286,7 +294,40 @@ ChatPage::ChatPage(QWidget * parent, Qt::WindowFlags flags)
connect(ui.publicStyle, SIGNAL(currentIndexChanged(int)), this,SLOT(on_publicList_currentRowChanged(int))); connect(ui.publicStyle, SIGNAL(currentIndexChanged(int)), this,SLOT(on_publicList_currentRowChanged(int)));
connect(ui.privateStyle, SIGNAL(currentIndexChanged(int)), this,SLOT(on_privateList_currentRowChanged(int))); connect(ui.privateStyle, SIGNAL(currentIndexChanged(int)), this,SLOT(on_privateList_currentRowChanged(int)));
connect(ui.historyStyle, SIGNAL(currentIndexChanged(int)), this,SLOT(on_historyList_currentRowChanged(int))); connect(ui.historyStyle, SIGNAL(currentIndexChanged(int)), this,SLOT(on_historyList_currentRowChanged(int)));
/* Add user notify */
const QList<UserNotify*> &userNotifyList = MainWindow::getInstance()->getUserNotifyList() ;
QList<UserNotify*>::const_iterator it;
mChatLobbyUserNotify = nullptr;
for (it = userNotifyList.begin(); it != userNotifyList.end(); ++it)
{
UserNotify *userNotify = *it;
//To get ChatLobbyUserNotify Settings
if(!mChatLobbyUserNotify)
mChatLobbyUserNotify = dynamic_cast<ChatLobbyUserNotify*>(*it);
}
// hide the broadcast page: it only shows "show/hide emoticons, which is really not much for an entire page
ui.tabWidget->removeTab(3);
} }
void ChatPage::updateChatLobbyUserNotify()
{
if(!mChatLobbyUserNotify)
return ;
mChatLobbyUserNotify->setCountUnRead(ui.chatLobbies_CountUnRead->isChecked()) ;
mChatLobbyUserNotify->setCheckForNickName(ui.chatLobbies_CheckNickName->isChecked()) ;
mChatLobbyUserNotify->setCountSpecificText(ui.chatLobbies_CountFollowingText->isChecked()) ;
mChatLobbyUserNotify->setTextToNotify(ui.chatLobbies_TextToNotify->document()->toPlainText());
mChatLobbyUserNotify->setTextCaseSensitive(ui.chatLobbies_TextCaseSensitive->isChecked());
}
void ChatPage::updateChatFlags() void ChatPage::updateChatFlags()
{ {
uint chatflags = 0; uint chatflags = 0;
@ -423,6 +464,15 @@ ChatPage::load()
ui._collected_contacts_LW->insertItem(0,item) ; ui._collected_contacts_LW->insertItem(0,item) ;
} }
#endif #endif
if (mChatLobbyUserNotify){
whileBlocking(ui.chatLobbies_CountUnRead)->setChecked(mChatLobbyUserNotify->isCountUnRead());
whileBlocking(ui.chatLobbies_CheckNickName)->setChecked(mChatLobbyUserNotify->isCheckForNickName());
whileBlocking(ui.chatLobbies_CountFollowingText)->setChecked(mChatLobbyUserNotify->isCountSpecificText()) ;
whileBlocking(ui.chatLobbies_TextToNotify)->setEnabled(mChatLobbyUserNotify->isCountSpecificText()) ;
whileBlocking(ui.chatLobbies_TextToNotify)->setPlainText(mChatLobbyUserNotify->textToNotify());
whileBlocking(ui.chatLobbies_TextCaseSensitive)->setChecked(mChatLobbyUserNotify->isTextCaseSensitive());
}
} }
void ChatPage::on_pushButtonChangeChatFont_clicked() void ChatPage::on_pushButtonChangeChatFont_clicked()

View File

@ -23,6 +23,7 @@
#include "retroshare-gui/configpage.h" #include "retroshare-gui/configpage.h"
#include "gui/chat/ChatStyle.h" #include "gui/chat/ChatStyle.h"
#include "gui/chat/ChatLobbyUserNotify.h"
#include "ui_ChatPage.h" #include "ui_ChatPage.h"
#include "gui/common/FilesDefs.h" #include "gui/common/FilesDefs.h"
@ -44,6 +45,7 @@ class ChatPage : public ConfigPage
virtual QString helpText() const { return ""; } virtual QString helpText() const { return ""; }
private slots: private slots:
void updateChatLobbyUserNotify();
void on_historyComboBoxVariant_currentIndexChanged(int index); void on_historyComboBoxVariant_currentIndexChanged(int index);
void on_privateComboBoxVariant_currentIndexChanged(int index); void on_privateComboBoxVariant_currentIndexChanged(int index);
void on_publicComboBoxVariant_currentIndexChanged(int index); void on_publicComboBoxVariant_currentIndexChanged(int index);
@ -87,6 +89,8 @@ class ChatPage : public ConfigPage
/** Qt Designer generated object */ /** Qt Designer generated object */
Ui::ChatPage ui; Ui::ChatPage ui;
ChatLobbyUserNotify* mChatLobbyUserNotify;
}; };
#endif #endif

File diff suppressed because it is too large Load Diff

View File

@ -46,7 +46,6 @@ NotifyPage::NotifyPage(QWidget * parent, Qt::WindowFlags flags)
connect(ui.testToasterButton, SIGNAL(clicked()), this, SLOT(testToaster())); connect(ui.testToasterButton, SIGNAL(clicked()), this, SLOT(testToaster()));
connect(ui.pushButtonDisableAll,SIGNAL(toggled(bool)), NotifyQt::getInstance(), SLOT(SetDisableAll(bool))); connect(ui.pushButtonDisableAll,SIGNAL(toggled(bool)), NotifyQt::getInstance(), SLOT(SetDisableAll(bool)));
connect(NotifyQt::getInstance(),SIGNAL(disableAllChanged(bool)), ui.pushButtonDisableAll, SLOT(setChecked(bool))); connect(NotifyQt::getInstance(),SIGNAL(disableAllChanged(bool)), ui.pushButtonDisableAll, SLOT(setChecked(bool)));
connect(ui.chatLobbies_CountFollowingText,SIGNAL(toggled(bool)),ui.chatLobbies_TextToNotify,SLOT(setEnabled(bool)));
ui.notify_Blogs->hide(); ui.notify_Blogs->hide();
@ -116,41 +115,37 @@ NotifyPage::NotifyPage(QWidget * parent, Qt::WindowFlags flags)
} }
/* Add user notify */ /* Add user notify */
const QList<UserNotify*> &userNotifyList = MainWindow::getInstance()->getUserNotifyList() ; const QList<UserNotify*> &userNotifyList = MainWindow::getInstance()->getUserNotifyList() ;
QList<UserNotify*>::const_iterator it; QList<UserNotify*>::const_iterator it;
rowFeed = 0; rowFeed = 0;
mChatLobbyUserNotify = 0; for (it = userNotifyList.begin(); it != userNotifyList.end(); ++it) {
for (it = userNotifyList.begin(); it != userNotifyList.end(); ++it) { UserNotify *userNotify = *it;
UserNotify *userNotify = *it;
QString name; QString name;
if (!userNotify->hasSetting(&name, NULL)) { if (!userNotify->hasSetting(&name, NULL)) {
continue; continue;
} }
QCheckBox *enabledCheckBox = new QCheckBox(name, this); QCheckBox *enabledCheckBox = new QCheckBox(name, this);
enabledCheckBox->setFont(font); enabledCheckBox->setFont(font);
ui.notifyLayout->addWidget(enabledCheckBox, rowFeed, 0, 0); ui.notifyLayout->addWidget(enabledCheckBox, rowFeed, 0, 0);
connect(enabledCheckBox, SIGNAL(toggled(bool)), this, SLOT(notifyToggled())); connect(enabledCheckBox, SIGNAL(toggled(bool)), this, SLOT(notifyToggled()));
QCheckBox *combinedCheckBox = new QCheckBox(tr("Combined"), this); QCheckBox *combinedCheckBox = new QCheckBox(tr("Combined"), this);
combinedCheckBox->setFont(font); combinedCheckBox->setFont(font);
ui.notifyLayout->addWidget(combinedCheckBox, rowFeed, 1); ui.notifyLayout->addWidget(combinedCheckBox, rowFeed, 1);
QCheckBox *blinkCheckBox = new QCheckBox(tr("Blink"), this); QCheckBox *blinkCheckBox = new QCheckBox(tr("Blink"), this);
blinkCheckBox->setFont(font); blinkCheckBox->setFont(font);
ui.notifyLayout->addWidget(blinkCheckBox, rowFeed++, 2); ui.notifyLayout->addWidget(blinkCheckBox, rowFeed++, 2);
mUserNotifySettingList.push_back(UserNotifySetting(userNotify, enabledCheckBox, combinedCheckBox, blinkCheckBox)); mUserNotifySettingList.push_back(UserNotifySetting(userNotify, enabledCheckBox, combinedCheckBox, blinkCheckBox));
connect(enabledCheckBox,SIGNAL(toggled(bool)),this,SLOT(updateUserNotifySettings())) ; connect(enabledCheckBox,SIGNAL(toggled(bool)),this,SLOT(updateUserNotifySettings())) ;
connect(blinkCheckBox,SIGNAL(toggled(bool)),this,SLOT(updateUserNotifySettings())) ; connect(blinkCheckBox,SIGNAL(toggled(bool)),this,SLOT(updateUserNotifySettings())) ;
connect(combinedCheckBox,SIGNAL(toggled(bool)),this,SLOT(updateUserNotifySettings())) ; connect(combinedCheckBox,SIGNAL(toggled(bool)),this,SLOT(updateUserNotifySettings())) ;
}
//To get ChatLobbyUserNotify Settings
if (!mChatLobbyUserNotify) mChatLobbyUserNotify = dynamic_cast<ChatLobbyUserNotify*>(*it);
}
connect(ui.popup_Connect, SIGNAL(toggled(bool)), this, SLOT(updateNotifyFlags())) ; connect(ui.popup_Connect, SIGNAL(toggled(bool)), this, SLOT(updateNotifyFlags())) ;
connect(ui.popup_NewMsg, SIGNAL(toggled(bool)), this, SLOT(updateNotifyFlags())) ; connect(ui.popup_NewMsg, SIGNAL(toggled(bool)), this, SLOT(updateNotifyFlags())) ;
@ -179,12 +174,6 @@ NotifyPage::NotifyPage(QWidget * parent, Qt::WindowFlags flags)
connect(ui.spinBoxToasterYMargin, SIGNAL(valueChanged(int)), this, SLOT(updateToasterMargin())); connect(ui.spinBoxToasterYMargin, SIGNAL(valueChanged(int)), this, SLOT(updateToasterMargin()));
connect(ui.comboBoxToasterPosition, SIGNAL(currentIndexChanged(int)),this, SLOT(updateToasterPosition())) ; connect(ui.comboBoxToasterPosition, SIGNAL(currentIndexChanged(int)),this, SLOT(updateToasterPosition())) ;
connect(ui.chatLobbies_CountUnRead, SIGNAL(toggled(bool)),this, SLOT(updateChatLobbyUserNotify())) ;
connect(ui.chatLobbies_CheckNickName, SIGNAL(toggled(bool)),this, SLOT(updateChatLobbyUserNotify())) ;
connect(ui.chatLobbies_CountFollowingText, SIGNAL(toggled(bool)),this, SLOT(updateChatLobbyUserNotify())) ;
connect(ui.chatLobbies_TextToNotify, SIGNAL(textChanged(QString)),this, SLOT(updateChatLobbyUserNotify()));
connect(ui.chatLobbies_TextCaseSensitive, SIGNAL(toggled(bool)),this, SLOT(updateChatLobbyUserNotify())) ;
} }
NotifyPage::~NotifyPage() NotifyPage::~NotifyPage()
@ -299,18 +288,6 @@ void NotifyPage::updateToasterPosition()
Settings->setToasterPosition((RshareSettings::enumToasterPosition) ui.comboBoxToasterPosition->itemData(index).toInt()); Settings->setToasterPosition((RshareSettings::enumToasterPosition) ui.comboBoxToasterPosition->itemData(index).toInt());
} }
void NotifyPage::updateChatLobbyUserNotify()
{
if(!mChatLobbyUserNotify)
return ;
mChatLobbyUserNotify->setCountUnRead(ui.chatLobbies_CountUnRead->isChecked()) ;
mChatLobbyUserNotify->setCheckForNickName(ui.chatLobbies_CheckNickName->isChecked()) ;
mChatLobbyUserNotify->setCountSpecificText(ui.chatLobbies_CountFollowingText->isChecked()) ;
mChatLobbyUserNotify->setTextToNotify(ui.chatLobbies_TextToNotify->document()->toPlainText());
mChatLobbyUserNotify->setTextCaseSensitive(ui.chatLobbies_TextCaseSensitive->isChecked());
}
/** Loads the settings for this page */ /** Loads the settings for this page */
void NotifyPage::load() void NotifyPage::load()
{ {
@ -399,14 +376,6 @@ void NotifyPage::load()
notifyToggled() ; notifyToggled() ;
if (mChatLobbyUserNotify){
whileBlocking(ui.chatLobbies_CountUnRead)->setChecked(mChatLobbyUserNotify->isCountUnRead());
whileBlocking(ui.chatLobbies_CheckNickName)->setChecked(mChatLobbyUserNotify->isCheckForNickName());
whileBlocking(ui.chatLobbies_CountFollowingText)->setChecked(mChatLobbyUserNotify->isCountSpecificText()) ;
whileBlocking(ui.chatLobbies_TextToNotify)->setEnabled(mChatLobbyUserNotify->isCountSpecificText()) ;
whileBlocking(ui.chatLobbies_TextToNotify)->setPlainText(mChatLobbyUserNotify->textToNotify());
whileBlocking(ui.chatLobbies_TextCaseSensitive)->setChecked(mChatLobbyUserNotify->isTextCaseSensitive());
}
} }
void NotifyPage::notifyToggled() void NotifyPage::notifyToggled()

View File

@ -100,12 +100,10 @@ private slots:
void updateToasterMargin(); void updateToasterMargin();
void updateToasterPosition(); void updateToasterPosition();
void updateChatLobbyUserNotify();
private: private:
uint getNewsFlags(); uint getNewsFlags();
uint getNotifyFlags(); uint getNotifyFlags();
ChatLobbyUserNotify* mChatLobbyUserNotify;
QList<FeedNotifySetting> mFeedNotifySettingList; QList<FeedNotifySetting> mFeedNotifySettingList;
QList<ToasterNotifySetting> mToasterNotifySettingList; QList<ToasterNotifySetting> mToasterNotifySettingList;

View File

@ -14,7 +14,7 @@
<item> <item>
<widget class="QTabWidget" name="tabWidget"> <widget class="QTabWidget" name="tabWidget">
<property name="currentIndex"> <property name="currentIndex">
<number>0</number> <number>2</number>
</property> </property>
<widget class="QWidget" name="tabFeed"> <widget class="QWidget" name="tabFeed">
<attribute name="title"> <attribute name="title">
@ -443,60 +443,6 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="tabChatLobbies">
<attribute name="title">
<string>Chat Rooms</string>
</attribute>
<layout class="QVBoxLayout" name="tabChatLobbiesVLayout">
<item>
<widget class="QCheckBox" name="chatLobbies_CountUnRead">
<property name="text">
<string>Count all unread messages</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="chatLobbies_CheckNickName">
<property name="text">
<string>Count occurrences of my current identity</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="chatLobbies_CountFollowingText">
<property name="text">
<string>Count occurrences of any of the following texts (separate by newlines):</string>
</property>
</widget>
</item>
<item>
<widget class="QPlainTextEdit" name="chatLobbies_TextToNotify"/>
</item>
<item>
<widget class="QCheckBox" name="chatLobbies_TextCaseSensitive">
<property name="toolTip">
<string>Checked, if the identity and the text above occurrences must be in the same case to trigger count.</string>
</property>
<property name="text">
<string>Case sensitive</string>
</property>
</widget>
</item>
<item>
<spacer name="tabChatLobbiesVSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget> </widget>
</item> </item>
</layout> </layout>
@ -527,10 +473,6 @@
<tabstop>spinBoxToasterYMargin</tabstop> <tabstop>spinBoxToasterYMargin</tabstop>
<tabstop>systray_GroupChat</tabstop> <tabstop>systray_GroupChat</tabstop>
<tabstop>systray_ChatLobby</tabstop> <tabstop>systray_ChatLobby</tabstop>
<tabstop>chatLobbies_CountUnRead</tabstop>
<tabstop>chatLobbies_CheckNickName</tabstop>
<tabstop>chatLobbies_CountFollowingText</tabstop>
<tabstop>chatLobbies_TextToNotify</tabstop>
<tabstop>pushButtonDisableAll</tabstop> <tabstop>pushButtonDisableAll</tabstop>
</tabstops> </tabstops>
<resources/> <resources/>