mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-22 22:21:09 -04:00
Merge remote-tracking branch 'upstream/master' into v0.6-BugFixing_8
This commit is contained in:
commit
faadd24ef3
61 changed files with 1654 additions and 1379 deletions
|
@ -285,6 +285,64 @@ are marked with the custom doxygen command +@jsonapi{RS_VERSION,manualwrapper}+
|
||||||
and their wrappers are not automatically generated but written manually into
|
and their wrappers are not automatically generated but written manually into
|
||||||
+JsonApiServer::JsonApiServer(...)+.
|
+JsonApiServer::JsonApiServer(...)+.
|
||||||
|
|
||||||
|
== Quirks
|
||||||
|
|
||||||
|
=== 64 bits integers handling
|
||||||
|
|
||||||
|
While JSON doesn't have problems representing 64 bits integers JavaScript, Dart
|
||||||
|
and other languages are not capable to handle those numbers natively.
|
||||||
|
To overcome this limitation JSON API output 64 bit integers as an object with
|
||||||
|
two keys, one as proper integer and one as string representation.
|
||||||
|
|
||||||
|
.JSON API 64 bit integer output example
|
||||||
|
[source,json]
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
"lobby_id": { "xint64": 6215642878098695544, "xstr64": "6215642878098695544" }
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
So from languages that have proper 64bit integers support like Python or C++ one
|
||||||
|
better read from `xint64` which is represented as a JSON integer, from languages
|
||||||
|
where there is no proper 64bit integers support like JavaScript one can read from
|
||||||
|
`xstr64` which is represented as JSON string (note that the first is not wrapped
|
||||||
|
in "" while the latter is).
|
||||||
|
|
||||||
|
When one input a 64bit integer into the JSON API it first try to parse it as if
|
||||||
|
it was sent the old way for retrocompatibility.
|
||||||
|
|
||||||
|
.JSON API 64 bit integer deprecated format input example
|
||||||
|
[source,json]
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
"lobby_id":6215642878098695544
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
This way is *DEPRECATED* and may disappear in the future, it is TEMPORALLY kept
|
||||||
|
only for retrocompatibiliy with old clients.
|
||||||
|
|
||||||
|
If retrocompatible parsing attempt fail then it try to parse with the new way
|
||||||
|
with proper JSON integer format.
|
||||||
|
|
||||||
|
.JSON API 64 bit integer new proper integer format input example
|
||||||
|
[source,json]
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
lobby_id": { "xint64": 6215642878098695544 }
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
If this fails then it try to parse with the new way with JSON string format.
|
||||||
|
|
||||||
|
.JSON API 64 bit integer new string format input example
|
||||||
|
[source,json]
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
"lobby_id": { "xstr64": "6215642878098695544" }
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
[WARNING]
|
||||||
|
================================================================================
|
||||||
|
Clients written in languages without proper 64bit integers support must
|
||||||
|
use *ONLY* the string format otherwise they will send approximated values and
|
||||||
|
get unexpected results from the JSON API, because parsing will success but the
|
||||||
|
value will not be exactly the one you believe you sent.
|
||||||
|
================================================================================
|
||||||
|
|
||||||
|
|
||||||
== A bit of history
|
== A bit of history
|
||||||
|
|
||||||
|
|
|
@ -760,7 +760,7 @@ bool ftServer::handleTunnelRequest(const RsFileHash& hash,const RsPeerId& peer_i
|
||||||
// share the file!
|
// share the file!
|
||||||
|
|
||||||
FileChunksInfo info2 ;
|
FileChunksInfo info2 ;
|
||||||
if(rsFiles->FileDownloadChunksDetails(hash, info2))
|
if(rsFiles->FileDownloadChunksDetails(real_hash, info2))
|
||||||
for(uint32_t i=0;i<info2.chunks.size();++i)
|
for(uint32_t i=0;i<info2.chunks.size();++i)
|
||||||
if(info2.chunks[i] == FileChunksInfo::CHUNK_DONE)
|
if(info2.chunks[i] == FileChunksInfo::CHUNK_DONE)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1141,8 +1141,10 @@ bool GxsSecurity::validateNxsGrp(const RsNxsGrp& grp, const RsTlvKeySignature& s
|
||||||
signOk = EVP_VerifyFinal(mdctx, sigbuf, siglen, signKey);
|
signOk = EVP_VerifyFinal(mdctx, sigbuf, siglen, signKey);
|
||||||
EVP_MD_CTX_destroy(mdctx);
|
EVP_MD_CTX_destroy(mdctx);
|
||||||
|
|
||||||
|
#ifdef GXS_SECURITY_DEBUG
|
||||||
if(i>0)
|
if(i>0)
|
||||||
std::cerr << "(WW) Checking group signature with old api version " << i+1 << " : tag " << std::hex << api_versions_to_check[i] << std::dec << " result: " << signOk << std::endl;
|
std::cerr << "(WW) Checking group signature with old api version " << i+1 << " : tag " << std::hex << api_versions_to_check[i] << std::dec << " result: " << signOk << std::endl;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* clean up */
|
/* clean up */
|
||||||
|
|
|
@ -1381,6 +1381,15 @@ bool RsGenExchange::getGroupMeta(const uint32_t &token, std::list<RsGroupMetaDat
|
||||||
m.mVisibleMsgCount = 0 ;
|
m.mVisibleMsgCount = 0 ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// We could save this in the net service, but it's a bit more than that since some services have
|
||||||
|
// specific usage footprints for their groups.
|
||||||
|
|
||||||
|
m.mLastSeen = (IS_GROUP_SUBSCRIBED(gMeta.mSubscribeFlags)) ? time(nullptr) : service_getLastGroupSeenTs(gMeta.mGroupId);
|
||||||
|
|
||||||
|
#ifdef GEN_EXCH_DEBUG
|
||||||
|
std::cerr << "Group: " << gMeta.mGroupId << " name \"" << gMeta.mGroupName << "\" last seen=" << m.mLastSeen << " now=" << time(nullptr) << std::endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
groupInfo.push_back(m);
|
groupInfo.push_back(m);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1556,6 +1565,7 @@ bool RsGenExchange::getGroupData(const uint32_t &token, std::vector<RsGxsGrpItem
|
||||||
|
|
||||||
if((!(IS_GROUP_SUBSCRIBED(gItem->meta.mSubscribeFlags))) || gItem->meta.mLastPost == 0)
|
if((!(IS_GROUP_SUBSCRIBED(gItem->meta.mSubscribeFlags))) || gItem->meta.mLastPost == 0)
|
||||||
gItem->meta.mLastPost = sts.mLastGroupModificationTS ;
|
gItem->meta.mLastPost = sts.mLastGroupModificationTS ;
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1563,6 +1573,14 @@ bool RsGenExchange::getGroupData(const uint32_t &token, std::vector<RsGxsGrpItem
|
||||||
gItem->meta.mVisibleMsgCount = 0;
|
gItem->meta.mVisibleMsgCount = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// We could save this in the net service, but it's a bit more than that since some services have
|
||||||
|
// specific usage footprints for their groups.
|
||||||
|
|
||||||
|
gItem->meta.mLastSeen = (IS_GROUP_SUBSCRIBED(gItem->meta.mSubscribeFlags)) ? time(nullptr) : service_getLastGroupSeenTs(gItem->meta.mGroupId);
|
||||||
|
|
||||||
|
#ifdef GEN_EXCH_DEBUG
|
||||||
|
std::cerr << "Group: " << gItem->meta.mGroupId << " name \"" << gItem->meta.mGroupName << "\" last seen=" << gItem->meta.mLastSeen << " now=" << time(nullptr) << std::endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
// Also check the group privacy flags. A while ago, it as possible to publish a group without privacy flags. Now it is not possible anymore.
|
// Also check the group privacy flags. A while ago, it as possible to publish a group without privacy flags. Now it is not possible anymore.
|
||||||
// As a consequence, it's important to supply a correct value in this flag before the data can be edited/updated.
|
// As a consequence, it's important to supply a correct value in this flag before the data can be edited/updated.
|
||||||
|
|
|
@ -667,6 +667,14 @@ protected:
|
||||||
*/
|
*/
|
||||||
virtual bool service_checkIfGroupIsStillUsed(const RsGxsGrpMetaData& /* meta */) { return true; } // see RsGenExchange
|
virtual bool service_checkIfGroupIsStillUsed(const RsGxsGrpMetaData& /* meta */) { return true; } // see RsGenExchange
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief service_getLastGroupSeenTs
|
||||||
|
* \return
|
||||||
|
* returns the last time a friend sent information (statistics) about this group. That practically means when the
|
||||||
|
* group was still being subscribed by at least one friend. This is used by service_checkIfGroupIsStillUsed() to
|
||||||
|
* help getting rid of dead groups.
|
||||||
|
*/
|
||||||
|
virtual rstime_t service_getLastGroupSeenTs(const RsGxsGroupId&) { return 0; }
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
|
@ -2430,7 +2430,6 @@ void p3PeerMgrIMPL::saveDone()
|
||||||
|
|
||||||
bool p3PeerMgrIMPL::loadList(std::list<RsItem *>& load)
|
bool p3PeerMgrIMPL::loadList(std::list<RsItem *>& load)
|
||||||
{
|
{
|
||||||
|
|
||||||
// DEFAULTS.
|
// DEFAULTS.
|
||||||
bool useExtAddrFinder = true;
|
bool useExtAddrFinder = true;
|
||||||
std::string proxyIpAddressTor = kConfigDefaultProxyServerIpAddr;
|
std::string proxyIpAddressTor = kConfigDefaultProxyServerIpAddr;
|
||||||
|
@ -2679,13 +2678,31 @@ bool p3PeerMgrIMPL::loadList(std::list<RsItem *>& load)
|
||||||
|
|
||||||
groupList[info.id] = info;
|
groupList[info.id] = info;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Also filter out profiles in groups that are not friends. Normally this shouldn't be needed, but it's a precaution
|
||||||
|
|
||||||
|
for(auto group_pair:groupList)
|
||||||
|
{
|
||||||
|
for(auto profileIdIt(group_pair.second.peerIds.begin());profileIdIt!=group_pair.second.peerIds.end();)
|
||||||
|
if(AuthGPG::getAuthGPG()->isGPGAccepted(*profileIdIt) || *profileIdIt == AuthGPG::getAuthGPG()->getGPGOwnId())
|
||||||
|
++profileIdIt;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
std::cerr << "(WW) filtering out profile " << profileIdIt->toStdString() << " from group " << group_pair.first.toStdString() << " because it is not a friend anymore" << std::endl;
|
||||||
|
|
||||||
|
auto tmp = profileIdIt;
|
||||||
|
++tmp;
|
||||||
|
group_pair.second.peerIds.erase(profileIdIt);
|
||||||
|
profileIdIt=tmp;
|
||||||
|
|
||||||
|
IndicateConfigChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we are hidden - don't want ExtAddrFinder - ever!
|
// If we are hidden - don't want ExtAddrFinder - ever!
|
||||||
if (isHidden())
|
if (isHidden())
|
||||||
{
|
|
||||||
useExtAddrFinder = false;
|
useExtAddrFinder = false;
|
||||||
}
|
|
||||||
|
|
||||||
mNetMgr->setIPServersEnabled(useExtAddrFinder);
|
mNetMgr->setIPServersEnabled(useExtAddrFinder);
|
||||||
|
|
||||||
|
|
|
@ -470,18 +470,11 @@ int pqihandler::UpdateRates()
|
||||||
|
|
||||||
// for our up bandwidth we take into account the max down provided by peers via BwCtrl
|
// for our up bandwidth we take into account the max down provided by peers via BwCtrl
|
||||||
// because we don't want to clog our outqueues, the TCP buffers, and the peers inbound queues
|
// because we don't want to clog our outqueues, the TCP buffers, and the peers inbound queues
|
||||||
|
mod -> pqi -> setMaxRate(false, out_max_bw);
|
||||||
if ((rateMap_it = rateMap.find(mod->pqi->PeerId())) != rateMap.end())
|
if ((rateMap_it = rateMap.find(mod->pqi->PeerId())) != rateMap.end())
|
||||||
{
|
|
||||||
if (rateMap_it->second.mAllowedOut > 0)
|
if (rateMap_it->second.mAllowedOut > 0)
|
||||||
{
|
|
||||||
if (out_max_bw > rateMap_it->second.mAllowedOut)
|
if (out_max_bw > rateMap_it->second.mAllowedOut)
|
||||||
mod -> pqi -> setMaxRate(false, rateMap_it->second.mAllowedOut);
|
mod -> pqi -> setMaxRate(false, rateMap_it->second.mAllowedOut);
|
||||||
else
|
|
||||||
mod -> pqi -> setMaxRate(false, out_max_bw);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
mod -> pqi -> setMaxRate(false, out_max_bw);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef UPDATE_RATES_DEBUG
|
#ifdef UPDATE_RATES_DEBUG
|
||||||
|
|
|
@ -863,10 +863,10 @@ int pqissl::Basic_Connection_Complete()
|
||||||
{
|
{
|
||||||
// error - reset socket.
|
// error - reset socket.
|
||||||
// this is a definite bad socket!.
|
// this is a definite bad socket!.
|
||||||
|
#ifdef PQISSL_LOG_DEBUG2
|
||||||
rslog(RSL_WARNING, pqisslzone,
|
rslog(RSL_WARNING, pqisslzone,
|
||||||
"pqissl::Basic_Connection_Complete() Select ERROR(2)");
|
"pqissl::Basic_Connection_Complete() Select ERROR(2)");
|
||||||
|
#endif
|
||||||
net_internal_close(sockfd);
|
net_internal_close(sockfd);
|
||||||
sockfd=-1;
|
sockfd=-1;
|
||||||
//reset();
|
//reset();
|
||||||
|
@ -1598,7 +1598,9 @@ int pqissl::readdata(void *data, int len)
|
||||||
reset_locked();
|
reset_locked();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef PQISSL_LOG_DEBUG2
|
||||||
rslog(RSL_ALERT, pqisslzone, out);
|
rslog(RSL_ALERT, pqisslzone, out);
|
||||||
|
#endif
|
||||||
//std::cerr << out << std::endl ;
|
//std::cerr << out << std::endl ;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,6 +91,7 @@ struct RsGroupMetaData : RsSerializable
|
||||||
uint32_t mPop; // Popularity = number of friend subscribers
|
uint32_t mPop; // Popularity = number of friend subscribers
|
||||||
uint32_t mVisibleMsgCount; // Max messages reported by friends
|
uint32_t mVisibleMsgCount; // Max messages reported by friends
|
||||||
rstime_t mLastPost; // Timestamp for last message. Not used yet.
|
rstime_t mLastPost; // Timestamp for last message. Not used yet.
|
||||||
|
rstime_t mLastSeen; // Last time the group was advertised by friends.
|
||||||
|
|
||||||
uint32_t mGroupStatus;
|
uint32_t mGroupStatus;
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,6 @@
|
||||||
#include "retroshare/rsevents.h"
|
#include "retroshare/rsevents.h"
|
||||||
#include "services/rseventsservice.h"
|
#include "services/rseventsservice.h"
|
||||||
|
|
||||||
|
|
||||||
/*******************
|
/*******************
|
||||||
#define TICK_DEBUG 1
|
#define TICK_DEBUG 1
|
||||||
*******************/
|
*******************/
|
||||||
|
@ -110,14 +109,15 @@ RsServer::RsServer() :
|
||||||
mStatusSrv = NULL;
|
mStatusSrv = NULL;
|
||||||
mGxsTunnels = NULL;
|
mGxsTunnels = NULL;
|
||||||
|
|
||||||
|
/* timers */
|
||||||
mLastts = getCurrentTS();
|
mLastts = getCurrentTS();
|
||||||
mTickInterval = maxTickInterval ;
|
mTickInterval = maxTickInterval ;
|
||||||
mAvgRunDuration = 0;
|
mAvgRunDuration = 0;
|
||||||
mLastRunDuration = 0;
|
mLastRunDuration = 0;
|
||||||
mCycle1 = 0;
|
mCycle1 = mLastts;
|
||||||
mCycle2 = 0;
|
mCycle2 = mLastts;
|
||||||
mCycle3 = 0;
|
mCycle3 = mLastts;
|
||||||
mCycle4 = 0;
|
mCycle4 = mLastts;
|
||||||
|
|
||||||
/* caches (that need ticking) */
|
/* caches (that need ticking) */
|
||||||
|
|
||||||
|
@ -136,10 +136,10 @@ RsServer::~RsServer()
|
||||||
void RsServer::threadTick()
|
void RsServer::threadTick()
|
||||||
{
|
{
|
||||||
#ifdef TICK_DEBUG
|
#ifdef TICK_DEBUG
|
||||||
RsDbg() << "TICK_DEBUG ticking interval "<< mTickInterval << std::endl;
|
RsDbg() << "TICK_DEBUG ticking interval " << std::dec << (int) (1000 * mTickInterval) << " ms";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// we try to tick at a regular interval which depends on the load
|
// we try to tick at a regular interval depending on the load
|
||||||
// if there is time left, we sleep
|
// if there is time left, we sleep
|
||||||
double timeToSleep = mTickInterval - mAvgRunDuration;
|
double timeToSleep = mTickInterval - mAvgRunDuration;
|
||||||
|
|
||||||
|
@ -148,7 +148,7 @@ void RsServer::threadTick()
|
||||||
timeToSleep = 0.050;
|
timeToSleep = 0.050;
|
||||||
|
|
||||||
#ifdef TICK_DEBUG
|
#ifdef TICK_DEBUG
|
||||||
RsDbg() << "TICK_DEBUG will sleep " << (int) (1000 * timeToSleep) << " ms" << std::endl;
|
RsDbg() << "TICK_DEBUG will sleep " << std::dec << (int) (1000 * timeToSleep) << " ms";
|
||||||
#endif
|
#endif
|
||||||
rstime::rs_usleep(timeToSleep * 1000000);
|
rstime::rs_usleep(timeToSleep * 1000000);
|
||||||
|
|
||||||
|
@ -158,22 +158,22 @@ void RsServer::threadTick()
|
||||||
// stuff we do always
|
// stuff we do always
|
||||||
// tick the core
|
// tick the core
|
||||||
#ifdef TICK_DEBUG
|
#ifdef TICK_DEBUG
|
||||||
RsDbg() << "TICK_DEBUG ticking server" << std::endl;
|
RsDbg() << "TICK_DEBUG ticking RS core";
|
||||||
#endif
|
#endif
|
||||||
lockRsCore();
|
lockRsCore();
|
||||||
int moreToTick = pqih->tick();
|
int moreToTick = pqih->tick();
|
||||||
unlockRsCore();
|
unlockRsCore();
|
||||||
// tick the managers
|
// tick the managers
|
||||||
#ifdef TICK_DEBUG
|
#ifdef TICK_DEBUG
|
||||||
RsDbg() << "TICK_DEBUG ticking mPeerMgr" << std::endl;
|
RsDbg() << "TICK_DEBUG ticking mPeerMgr";
|
||||||
#endif
|
#endif
|
||||||
mPeerMgr->tick();
|
mPeerMgr->tick();
|
||||||
#ifdef TICK_DEBUG
|
#ifdef TICK_DEBUG
|
||||||
RsDbg() << "TICK_DEBUG ticking mLinkMgr" << std::endl;
|
RsDbg() << "TICK_DEBUG ticking mLinkMgr";
|
||||||
#endif
|
#endif
|
||||||
mLinkMgr->tick();
|
mLinkMgr->tick();
|
||||||
#ifdef TICK_DEBUG
|
#ifdef TICK_DEBUG
|
||||||
RsDbg() << "TICK_DEBUG ticking mNetMgr" << std::endl;
|
RsDbg() << "TICK_DEBUG ticking mNetMgr";
|
||||||
#endif
|
#endif
|
||||||
mNetMgr->tick();
|
mNetMgr->tick();
|
||||||
|
|
||||||
|
@ -182,11 +182,16 @@ void RsServer::threadTick()
|
||||||
if (ts - mCycle1 > 1)
|
if (ts - mCycle1 > 1)
|
||||||
{
|
{
|
||||||
#ifdef TICK_DEBUG
|
#ifdef TICK_DEBUG
|
||||||
RsDbg() << "TICK_DEBUG every second" << std::endl;
|
RsDbg() << "TICK_DEBUG every second";
|
||||||
#endif
|
#endif
|
||||||
// slow services
|
// slow services
|
||||||
if (rsPlugins)
|
if (rsPlugins)
|
||||||
|
{
|
||||||
|
#ifdef TICK_DEBUG
|
||||||
|
RsDbg() << "TICK_DEBUG ticking slow tick plugins";
|
||||||
|
#endif
|
||||||
rsPlugins->slowTickPlugins((rstime_t)ts);
|
rsPlugins->slowTickPlugins((rstime_t)ts);
|
||||||
|
}
|
||||||
// UDP keepalive
|
// UDP keepalive
|
||||||
// tou_tick_stunkeepalive();
|
// tou_tick_stunkeepalive();
|
||||||
// other stuff to tick
|
// other stuff to tick
|
||||||
|
@ -198,10 +203,8 @@ void RsServer::threadTick()
|
||||||
if (ts - mCycle2 > 5)
|
if (ts - mCycle2 > 5)
|
||||||
{
|
{
|
||||||
#ifdef TICK_DEBUG
|
#ifdef TICK_DEBUG
|
||||||
RsDbg() << "TICK_DEBUG every 5 seconds" << std::endl;
|
RsDbg() << "TICK_DEBUG every 5 seconds";
|
||||||
#endif
|
#endif
|
||||||
// save stuff
|
|
||||||
mConfigMgr->tick();
|
|
||||||
mCycle2 = ts;
|
mCycle2 = ts;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -209,7 +212,7 @@ void RsServer::threadTick()
|
||||||
if (ts - mCycle3 > 60)
|
if (ts - mCycle3 > 60)
|
||||||
{
|
{
|
||||||
#ifdef TICK_DEBUG
|
#ifdef TICK_DEBUG
|
||||||
RsDbg() << "TICK_DEBUG every 60 seconds" << std::endl;
|
RsDbg() << "TICK_DEBUG every 60 seconds";
|
||||||
#endif
|
#endif
|
||||||
// force saving FileTransferStatus TODO
|
// force saving FileTransferStatus TODO
|
||||||
// ftserver->saveFileTransferStatus();
|
// ftserver->saveFileTransferStatus();
|
||||||
|
@ -222,8 +225,13 @@ void RsServer::threadTick()
|
||||||
if (ts - mCycle4 > 3600)
|
if (ts - mCycle4 > 3600)
|
||||||
{
|
{
|
||||||
#ifdef TICK_DEBUG
|
#ifdef TICK_DEBUG
|
||||||
RsDbg() << "TICK_DEBUG every hour" << std::endl;
|
RsDbg() << "TICK_DEBUG every hour";
|
||||||
#endif
|
#endif
|
||||||
|
// save configuration files
|
||||||
|
#ifdef TICK_DEBUG
|
||||||
|
RsDbg() << "TICK_DEBUG ticking mConfigMgr";
|
||||||
|
#endif
|
||||||
|
mConfigMgr->tick();
|
||||||
mCycle4 = ts;
|
mCycle4 = ts;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -237,22 +245,22 @@ void RsServer::threadTick()
|
||||||
mAvgRunDuration = maxTickInterval;
|
mAvgRunDuration = maxTickInterval;
|
||||||
|
|
||||||
#ifdef TICK_DEBUG
|
#ifdef TICK_DEBUG
|
||||||
RsDbg() << "TICK_DEBUG new mLastRunDuration " << mLastRunDuration << " mAvgRunDuration " << mAvgRunDuration << std::endl;
|
RsDbg() << "TICK_DEBUG mLastRunDuration " << std::dec << (int) (1000 * mLastRunDuration) << " ms, mAvgRunDuration " << (int) (1000 * mAvgRunDuration) << " ms";
|
||||||
if (mLastRunDuration > WARN_BIG_CYCLE_TIME)
|
if (mLastRunDuration > WARN_BIG_CYCLE_TIME)
|
||||||
RsDbg() << "TICK_DEBUG excessively long cycle time " << mLastRunDuration << std::endl;
|
RsDbg() << "TICK_DEBUG excessively long cycle time " << std::dec << (int) (1000 * mLastRunDuration) << " ms";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// if the core has returned that there is more to tick we decrease the ticking interval, else we increse it
|
// if the core has returned that there is more to tick we decrease the ticking interval, else we increase it
|
||||||
// this should be studied closer as I dont think that the core ever returns 1
|
// TODO: this should be investigated as it seems that the core never returns 1
|
||||||
#ifdef TICK_DEBUG
|
#ifdef TICK_DEBUG
|
||||||
RsDbg() << "TICK_DEBUG moreToTick " << moreToTick << std::endl;
|
RsDbg() << "TICK_DEBUG moreToTick " << moreToTick;
|
||||||
#endif
|
#endif
|
||||||
if (moreToTick == 1)
|
if (moreToTick == 1)
|
||||||
mTickInterval = 0.9 * mTickInterval;
|
mTickInterval = 0.9 * mTickInterval;
|
||||||
else
|
else
|
||||||
mTickInterval = 1.1 * mTickInterval;
|
mTickInterval = 1.1 * mTickInterval;
|
||||||
#ifdef TICK_DEBUG
|
#ifdef TICK_DEBUG
|
||||||
RsDbg() << "TICK_DEBUG new tick interval " << mTickInterval << std::endl;
|
RsDbg() << "TICK_DEBUG new tick interval " << std::dec << (int) (1000 * mTickInterval) << " ms";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// keep the tick interval target within allowed limits
|
// keep the tick interval target within allowed limits
|
||||||
|
@ -261,7 +269,7 @@ void RsServer::threadTick()
|
||||||
else if (mTickInterval > maxTickInterval)
|
else if (mTickInterval > maxTickInterval)
|
||||||
mTickInterval = maxTickInterval;
|
mTickInterval = maxTickInterval;
|
||||||
#ifdef TICK_DEBUG
|
#ifdef TICK_DEBUG
|
||||||
RsDbg() << "TICK_DEBUG new tick interval after limiter " << mTickInterval << std::endl;
|
RsDbg() << "TICK_DEBUG new tick interval after limiter " << std::dec << (int) (1000 * mTickInterval) << " ms";
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1700,6 +1700,24 @@ bool p3GxsCircles::locked_checkCircleCacheForAutoSubscribe(RsGxsCircleCache& cac
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rstime_t p3GxsCircles::service_getLastGroupSeenTs(const RsGxsGroupId& gid)
|
||||||
|
{
|
||||||
|
rstime_t now = time(nullptr);
|
||||||
|
|
||||||
|
RS_STACK_MUTEX(mKnownCirclesMtx);
|
||||||
|
|
||||||
|
auto it = mKnownCircles.find(gid);
|
||||||
|
bool unknown_posted = (it == mKnownCircles.end());
|
||||||
|
|
||||||
|
if(unknown_posted)
|
||||||
|
{
|
||||||
|
mKnownCircles[gid] = now;
|
||||||
|
IndicateConfigChanged();
|
||||||
|
return now;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return it->second;
|
||||||
|
}
|
||||||
bool p3GxsCircles::service_checkIfGroupIsStillUsed(const RsGxsGrpMetaData& meta)
|
bool p3GxsCircles::service_checkIfGroupIsStillUsed(const RsGxsGrpMetaData& meta)
|
||||||
{
|
{
|
||||||
#ifdef GXSFORUMS_CHANNELS
|
#ifdef GXSFORUMS_CHANNELS
|
||||||
|
|
|
@ -290,6 +290,7 @@ public:
|
||||||
virtual void updateGroup(uint32_t &token, RsGxsCircleGroup &group) override;
|
virtual void updateGroup(uint32_t &token, RsGxsCircleGroup &group) override;
|
||||||
|
|
||||||
virtual bool service_checkIfGroupIsStillUsed(const RsGxsGrpMetaData& meta) override;
|
virtual bool service_checkIfGroupIsStillUsed(const RsGxsGrpMetaData& meta) override;
|
||||||
|
virtual rstime_t service_getLastGroupSeenTs(const RsGxsGroupId&) override;
|
||||||
|
|
||||||
/* membership management for external circles */
|
/* membership management for external circles */
|
||||||
|
|
||||||
|
|
|
@ -417,6 +417,24 @@ void p3GxsForums::service_tick()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rstime_t p3GxsForums::service_getLastGroupSeenTs(const RsGxsGroupId& gid)
|
||||||
|
{
|
||||||
|
rstime_t now = time(nullptr);
|
||||||
|
|
||||||
|
RS_STACK_MUTEX(mKnownForumsMutex);
|
||||||
|
|
||||||
|
auto it = mKnownForums.find(gid);
|
||||||
|
bool unknown_forum = it == mKnownForums.end();
|
||||||
|
|
||||||
|
if(unknown_forum)
|
||||||
|
{
|
||||||
|
mKnownForums[gid] = now;
|
||||||
|
IndicateConfigChanged();
|
||||||
|
return now;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return it->second;
|
||||||
|
}
|
||||||
bool p3GxsForums::service_checkIfGroupIsStillUsed(const RsGxsGrpMetaData& meta)
|
bool p3GxsForums::service_checkIfGroupIsStillUsed(const RsGxsGrpMetaData& meta)
|
||||||
{
|
{
|
||||||
#ifdef GXSFORUMS_DEBUG
|
#ifdef GXSFORUMS_DEBUG
|
||||||
|
|
|
@ -53,6 +53,7 @@ protected:
|
||||||
virtual bool loadList(std::list<RsItem *>& loadList) override; // @see p3Config::loadList(std::list<RsItem *>&)
|
virtual bool loadList(std::list<RsItem *>& loadList) override; // @see p3Config::loadList(std::list<RsItem *>&)
|
||||||
|
|
||||||
virtual bool service_checkIfGroupIsStillUsed(const RsGxsGrpMetaData& meta) override;
|
virtual bool service_checkIfGroupIsStillUsed(const RsGxsGrpMetaData& meta) override;
|
||||||
|
virtual rstime_t service_getLastGroupSeenTs(const RsGxsGroupId&) override;
|
||||||
public:
|
public:
|
||||||
/// @see RsGxsForums::createForumV2
|
/// @see RsGxsForums::createForumV2
|
||||||
bool createForumV2(
|
bool createForumV2(
|
||||||
|
|
|
@ -47,6 +47,7 @@
|
||||||
* #define DEBUG_IDS 1
|
* #define DEBUG_IDS 1
|
||||||
* #define DEBUG_RECOGN 1
|
* #define DEBUG_RECOGN 1
|
||||||
* #define DEBUG_OPINION 1
|
* #define DEBUG_OPINION 1
|
||||||
|
* #define DEBUG_SERVICE_STRING 1
|
||||||
* #define GXSID_GEN_DUMMY_DATA 1
|
* #define GXSID_GEN_DUMMY_DATA 1
|
||||||
****/
|
****/
|
||||||
|
|
||||||
|
@ -102,6 +103,7 @@ RsIdentity* rsIdentity = nullptr;
|
||||||
#define GXSIDREQ_RECOGN 0x0020
|
#define GXSIDREQ_RECOGN 0x0020
|
||||||
#define GXSIDREQ_OPINION 0x0030
|
#define GXSIDREQ_OPINION 0x0030
|
||||||
#define GXSIDREQ_SERIALIZE_TO_MEMORY 0x0040
|
#define GXSIDREQ_SERIALIZE_TO_MEMORY 0x0040
|
||||||
|
#define GXSIDREQ_LOAD_PGPIDDATA 0x0080
|
||||||
|
|
||||||
#define GXSIDREQ_CACHETEST 0x1000
|
#define GXSIDREQ_CACHETEST 0x1000
|
||||||
|
|
||||||
|
@ -166,6 +168,7 @@ p3IdService::p3IdService( RsGeneralDataService *gds
|
||||||
, mMaxKeepKeysBanned(MAX_KEEP_KEYS_BANNED_DEFAULT)
|
, mMaxKeepKeysBanned(MAX_KEEP_KEYS_BANNED_DEFAULT)
|
||||||
{
|
{
|
||||||
mLastKeyCleaningTime = time(NULL) - int(MAX_DELAY_BEFORE_CLEANING * 0.9) ;
|
mLastKeyCleaningTime = time(NULL) - int(MAX_DELAY_BEFORE_CLEANING * 0.9) ;
|
||||||
|
mLastPGPHashProcessTime = 0;
|
||||||
|
|
||||||
// Kick off Cache Testing, + Others.
|
// Kick off Cache Testing, + Others.
|
||||||
RsTickEvent::schedule_now(GXSID_EVENT_CACHEOWNIDS);//First Thing to do
|
RsTickEvent::schedule_now(GXSID_EVENT_CACHEOWNIDS);//First Thing to do
|
||||||
|
@ -587,6 +590,13 @@ void p3IdService::service_tick()
|
||||||
cleanUnusedKeys() ;
|
cleanUnusedKeys() ;
|
||||||
mLastKeyCleaningTime = now ;
|
mLastKeyCleaningTime = now ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(mLastPGPHashProcessTime + PGPHASH_PROC_PERIOD < now && !mGroupsToProcess.empty())
|
||||||
|
{
|
||||||
|
pgphash_process();
|
||||||
|
mLastPGPHashProcessTime=now;
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2377,7 +2387,7 @@ bool SSGxsIdGroup::load(const std::string &input)
|
||||||
// split into parts.
|
// split into parts.
|
||||||
if (3 != sscanf(input.c_str(), "v2 {P:%[^}]}{T:%[^}]}{R:%[^}]}", pgpstr, recognstr, scorestr))
|
if (3 != sscanf(input.c_str(), "v2 {P:%[^}]}{T:%[^}]}{R:%[^}]}", pgpstr, recognstr, scorestr))
|
||||||
{
|
{
|
||||||
#ifdef DEBUG_IDS
|
#ifdef DEBUG_SERVICE_STRING
|
||||||
std::cerr << "SSGxsIdGroup::load() Failed to extract 4 Parts";
|
std::cerr << "SSGxsIdGroup::load() Failed to extract 4 Parts";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
#endif // DEBUG_IDS
|
#endif // DEBUG_IDS
|
||||||
|
@ -2387,14 +2397,14 @@ bool SSGxsIdGroup::load(const std::string &input)
|
||||||
bool ok = true;
|
bool ok = true;
|
||||||
if (pgp.load(pgpstr))
|
if (pgp.load(pgpstr))
|
||||||
{
|
{
|
||||||
#ifdef DEBUG_IDS
|
#ifdef DEBUG_SERVICE_STRING
|
||||||
std::cerr << "SSGxsIdGroup::load() pgpstr: " << pgpstr;
|
std::cerr << "SSGxsIdGroup::load() pgpstr: " << pgpstr;
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
#endif // DEBUG_IDS
|
#endif // DEBUG_IDS
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#ifdef DEBUG_IDS
|
#ifdef DEBUG_SERVICE_STRING
|
||||||
std::cerr << "SSGxsIdGroup::load() Invalid pgpstr: " << pgpstr;
|
std::cerr << "SSGxsIdGroup::load() Invalid pgpstr: " << pgpstr;
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
#endif // DEBUG_IDS
|
#endif // DEBUG_IDS
|
||||||
|
@ -2419,14 +2429,14 @@ bool SSGxsIdGroup::load(const std::string &input)
|
||||||
|
|
||||||
if (score.load(scorestr))
|
if (score.load(scorestr))
|
||||||
{
|
{
|
||||||
#ifdef DEBUG_IDS
|
#ifdef DEBUG_SERVICE_STRING
|
||||||
std::cerr << "SSGxsIdGroup::load() scorestr: " << scorestr;
|
std::cerr << "SSGxsIdGroup::load() scorestr: " << scorestr;
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
#endif // DEBUG_IDS
|
#endif // DEBUG_IDS
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#ifdef DEBUG_IDS
|
#ifdef DEBUG_SERVICE_STRING
|
||||||
std::cerr << "SSGxsIdGroup::load() Invalid scorestr: " << scorestr;
|
std::cerr << "SSGxsIdGroup::load() Invalid scorestr: " << scorestr;
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
#endif // DEBUG_IDS
|
#endif // DEBUG_IDS
|
||||||
|
@ -3450,7 +3460,7 @@ void p3IdService::CacheArbitrationDone(uint32_t mode)
|
||||||
/************************************************************************************/
|
/************************************************************************************/
|
||||||
/************************************************************************************/
|
/************************************************************************************/
|
||||||
|
|
||||||
/* Task to determine GPGHash matches
|
/* Task to determine PGPHash matches
|
||||||
*
|
*
|
||||||
* Info to be stored in GroupServiceString + Cache.
|
* Info to be stored in GroupServiceString + Cache.
|
||||||
*
|
*
|
||||||
|
@ -3695,13 +3705,15 @@ bool p3IdService::pgphash_start()
|
||||||
// Also need to use opts.groupFlags to filter stuff properly to REALID's only.
|
// Also need to use opts.groupFlags to filter stuff properly to REALID's only.
|
||||||
// TODO
|
// TODO
|
||||||
|
|
||||||
uint32_t ansType = RS_TOKREQ_ANSTYPE_DATA;
|
uint32_t ansType = RS_TOKREQ_ANSTYPE_SUMMARY;
|
||||||
RsTokReqOptions opts;
|
RsTokReqOptions opts;
|
||||||
opts.mReqType = GXS_REQUEST_TYPE_GROUP_DATA;
|
opts.mReqType = GXS_REQUEST_TYPE_GROUP_META;
|
||||||
|
|
||||||
uint32_t token = 0;
|
uint32_t token = 0;
|
||||||
|
|
||||||
RsGenExchange::getTokenService()->requestGroupInfo(token, ansType, opts);
|
RsGenExchange::getTokenService()->requestGroupInfo(token, ansType, opts);
|
||||||
GxsTokenQueue::queueRequest(token, GXSIDREQ_PGPHASH);
|
GxsTokenQueue::queueRequest(token, GXSIDREQ_PGPHASH);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3723,44 +3735,52 @@ bool p3IdService::pgphash_handlerequest(uint32_t token)
|
||||||
|
|
||||||
// We Will do this later!
|
// We Will do this later!
|
||||||
|
|
||||||
std::vector<RsGxsIdGroup> groups;
|
std::list<RsGroupMetaData> group_metas;
|
||||||
bool groupsToProcess = false;
|
std::list<RsGxsGroupId> groups_to_process;
|
||||||
bool ok = getGroupData(token, groups);
|
bool ok = getGroupMeta(token, group_metas);
|
||||||
|
|
||||||
if(ok)
|
if(ok)
|
||||||
{
|
{
|
||||||
#ifdef DEBUG_IDS
|
#ifdef DEBUG_IDS
|
||||||
std::cerr << "p3IdService::pgphash_request() Have " << groups.size() << " Groups";
|
std::cerr << "p3IdService::pgphash_request() Have " << group_metas.size() << " Groups" << std::endl;
|
||||||
std::cerr << std::endl;
|
|
||||||
#endif // DEBUG_IDS
|
#endif // DEBUG_IDS
|
||||||
|
|
||||||
std::vector<RsGxsIdGroup>::iterator vit;
|
for(auto vit = group_metas.begin(); vit != group_metas.end(); ++vit)
|
||||||
for(vit = groups.begin(); vit != groups.end(); ++vit)
|
|
||||||
{
|
{
|
||||||
#ifdef DEBUG_IDS
|
#ifdef DEBUG_IDS
|
||||||
std::cerr << "p3IdService::pgphash_request() Group Id: " << vit->mMeta.mGroupId;
|
std::cerr << "p3IdService::pgphash_request() Group Id: " << vit->mGroupId << " ";
|
||||||
std::cerr << std::endl;
|
|
||||||
#endif // DEBUG_IDS
|
#endif // DEBUG_IDS
|
||||||
|
|
||||||
/* Filter based on IdType */
|
/* Filter based on IdType */
|
||||||
if (!(vit->mMeta.mGroupFlags & RSGXSID_GROUPFLAG_REALID_kept_for_compatibility))
|
|
||||||
|
if (!(vit->mGroupFlags & RSGXSID_GROUPFLAG_REALID_kept_for_compatibility))
|
||||||
{
|
{
|
||||||
#ifdef DEBUG_IDS
|
#ifdef DEBUG_IDS
|
||||||
std::cerr << "p3IdService::pgphash_request() discarding AnonID";
|
std::cerr << "p3IdService::pgphash_request() discarding AnonID" << std::endl;
|
||||||
std::cerr << std::endl;
|
|
||||||
#endif // DEBUG_IDS
|
#endif // DEBUG_IDS
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
RsStackMutex stack(mIdMtx); /********** STACK LOCKED MTX ******/
|
||||||
|
if(mGroupsToProcess.find(vit->mGroupId) != mGroupsToProcess.end())
|
||||||
|
{
|
||||||
|
#ifdef DEBUG_IDS
|
||||||
|
std::cerr << " => already in checking list!" << std::endl;
|
||||||
|
#endif
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* now we need to decode the Service String - see what is saved there */
|
/* now we need to decode the Service String - see what is saved there */
|
||||||
SSGxsIdGroup ssdata;
|
SSGxsIdGroup ssdata;
|
||||||
if (ssdata.load(vit->mMeta.mServiceString))
|
|
||||||
|
if (ssdata.load(vit->mServiceString))
|
||||||
{
|
{
|
||||||
if (ssdata.pgp.validatedSignature)
|
if (ssdata.pgp.validatedSignature)
|
||||||
{
|
{
|
||||||
#ifdef DEBUG_IDS
|
#ifdef DEBUG_IDS
|
||||||
std::cerr << "p3IdService::pgphash_request() discarding Already Known";
|
std::cerr << "p3IdService::pgphash_request() discarding Already Known" << std::endl;
|
||||||
std::cerr << std::endl;
|
|
||||||
#endif // DEBUG_IDS
|
#endif // DEBUG_IDS
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -3774,10 +3794,10 @@ bool p3IdService::pgphash_handlerequest(uint32_t token)
|
||||||
#define SECS_PER_DAY (3600 * 24)
|
#define SECS_PER_DAY (3600 * 24)
|
||||||
rstime_t age = time(NULL) - ssdata.pgp.lastCheckTs;
|
rstime_t age = time(NULL) - ssdata.pgp.lastCheckTs;
|
||||||
rstime_t wait_period = ssdata.pgp.checkAttempts * SECS_PER_DAY;
|
rstime_t wait_period = ssdata.pgp.checkAttempts * SECS_PER_DAY;
|
||||||
|
|
||||||
if (wait_period > 30 * SECS_PER_DAY)
|
if (wait_period > 30 * SECS_PER_DAY)
|
||||||
{
|
|
||||||
wait_period = 30 * SECS_PER_DAY;
|
wait_period = 30 * SECS_PER_DAY;
|
||||||
}
|
|
||||||
#ifdef DEBUG_IDS
|
#ifdef DEBUG_IDS
|
||||||
std::cerr << "p3IdService: group " << *vit << " age=" << age << ", attempts=" << ssdata.pgp.checkAttempts << ", wait period = " << wait_period ;
|
std::cerr << "p3IdService: group " << *vit << " age=" << age << ", attempts=" << ssdata.pgp.checkAttempts << ", wait period = " << wait_period ;
|
||||||
#endif
|
#endif
|
||||||
|
@ -3789,20 +3809,17 @@ bool p3IdService::pgphash_handlerequest(uint32_t token)
|
||||||
#endif // DEBUG_IDS
|
#endif // DEBUG_IDS
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef DEBUG_IDS
|
#ifdef DEBUG_IDS
|
||||||
std::cerr << " => recheck!" << std::endl;
|
std::cerr << " => recheck!" << std::endl;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if we get here -> then its to be processed */
|
/* if we get here -> then its to be processed */
|
||||||
#ifdef DEBUG_IDS
|
|
||||||
std::cerr << "p3IdService::pgphash_request() ToProcess Group: " << vit->mMeta.mGroupId;
|
|
||||||
std::cerr << std::endl;
|
|
||||||
#endif // DEBUG_IDS
|
|
||||||
|
|
||||||
RsStackMutex stack(mIdMtx); /********** STACK LOCKED MTX ******/
|
RsStackMutex stack(mIdMtx); /********** STACK LOCKED MTX ******/
|
||||||
mGroupsToProcess.push_back(*vit);
|
groups_to_process.push_back(vit->mGroupId);
|
||||||
groupsToProcess = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -3811,14 +3828,42 @@ bool p3IdService::pgphash_handlerequest(uint32_t token)
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (groupsToProcess)
|
// If they are groups to process, load the data for these groups
|
||||||
|
|
||||||
|
if(!groups_to_process.empty())
|
||||||
{
|
{
|
||||||
// update PgpIdList -> if there are groups to process.
|
uint32_t ansType = RS_TOKREQ_ANSTYPE_DATA;
|
||||||
getPgpIdList();
|
RsTokReqOptions opts;
|
||||||
|
opts.mReqType = GXS_REQUEST_TYPE_GROUP_DATA;
|
||||||
|
uint32_t token = 0;
|
||||||
|
|
||||||
|
RsGenExchange::getTokenService()->requestGroupInfo(token, ansType, opts,groups_to_process);
|
||||||
|
GxsTokenQueue::queueRequest(token, GXSIDREQ_LOAD_PGPIDDATA);
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool p3IdService::pgphash_load_group_data(uint32_t token)
|
||||||
|
{
|
||||||
|
// Update PgpIdList -> if there are groups to process.
|
||||||
|
|
||||||
|
getPgpIdList();
|
||||||
|
std::vector<RsGxsIdGroup> groups;
|
||||||
|
|
||||||
|
// Add the loaded groups into the list of groups to process
|
||||||
|
|
||||||
|
getGroupData(token, groups);
|
||||||
|
|
||||||
|
RsStackMutex stack(mIdMtx); /********** STACK LOCKED MTX ******/
|
||||||
|
for(auto grp:groups)
|
||||||
|
{
|
||||||
|
mGroupsToProcess[grp.mMeta.mGroupId] = grp;
|
||||||
|
#ifdef DEBUG_IDS
|
||||||
|
std::cerr << "pgphash_load_group_data(): loaded group data for group " << grp.mMeta.mGroupId << ". mGroupsToProcess contains " << mGroupsToProcess.size() << " elements." << std::endl;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// Schedule Processing.
|
|
||||||
RsTickEvent::schedule_in(GXSID_EVENT_PGPHASH_PROC, PGPHASH_PROC_PERIOD);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3831,8 +3876,8 @@ bool p3IdService::pgphash_process()
|
||||||
RsStackMutex stack(mIdMtx); /********** STACK LOCKED MTX ******/
|
RsStackMutex stack(mIdMtx); /********** STACK LOCKED MTX ******/
|
||||||
if (!mGroupsToProcess.empty())
|
if (!mGroupsToProcess.empty())
|
||||||
{
|
{
|
||||||
pg = mGroupsToProcess.front();
|
pg = mGroupsToProcess.begin()->second;
|
||||||
mGroupsToProcess.pop_front();
|
mGroupsToProcess.erase(mGroupsToProcess.begin());
|
||||||
|
|
||||||
#ifdef DEBUG_IDS
|
#ifdef DEBUG_IDS
|
||||||
std::cerr << "p3IdService::pgphash_process() Popped Group: " << pg.mMeta.mGroupId;
|
std::cerr << "p3IdService::pgphash_process() Popped Group: " << pg.mMeta.mGroupId;
|
||||||
|
@ -3840,10 +3885,8 @@ bool p3IdService::pgphash_process()
|
||||||
#endif // DEBUG_IDS
|
#endif // DEBUG_IDS
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
isDone = true;
|
isDone = true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (isDone)
|
if (isDone)
|
||||||
{
|
{
|
||||||
|
@ -3911,13 +3954,17 @@ bool p3IdService::pgphash_process()
|
||||||
|
|
||||||
cache_update_if_cached(RsGxsId(pg.mMeta.mGroupId), serviceString);
|
cache_update_if_cached(RsGxsId(pg.mMeta.mGroupId), serviceString);
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
// Schedule Next Processing.
|
|
||||||
RsTickEvent::schedule_in(GXSID_EVENT_PGPHASH_PROC, PGPHASH_PROC_PERIOD);
|
|
||||||
return false; // as there are more items on the queue to process.
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This method allows to have a null issuer ID in the signature, in which case the signature is anonymous.
|
||||||
|
// The correct PGP key to check is looked for by bruteforcing
|
||||||
|
//
|
||||||
|
// grp.mPgpIdHash == SHA1( GroupId | PgpFingerPrint )
|
||||||
|
//
|
||||||
|
// For now, this is probably never used because signed IDs use a clear signature. The advntage of hiding the
|
||||||
|
// ID has not been clearly demonstrated anyway, which allows to directly look for the ID in the list of
|
||||||
|
// known keys instead of computing tons of hashes.
|
||||||
|
|
||||||
bool p3IdService::checkId(const RsGxsIdGroup &grp, RsPgpId &pgpId,bool& error)
|
bool p3IdService::checkId(const RsGxsIdGroup &grp, RsPgpId &pgpId,bool& error)
|
||||||
{
|
{
|
||||||
|
@ -3937,7 +3984,7 @@ bool p3IdService::checkId(const RsGxsIdGroup &grp, RsPgpId &pgpId,bool& error)
|
||||||
#endif // DEBUG_IDS
|
#endif // DEBUG_IDS
|
||||||
|
|
||||||
/* iterate through and check hash */
|
/* iterate through and check hash */
|
||||||
Sha1CheckSum ans = grp.mPgpIdHash;
|
Sha1CheckSum hash;
|
||||||
|
|
||||||
#ifdef DEBUG_IDS
|
#ifdef DEBUG_IDS
|
||||||
std::string esign ;
|
std::string esign ;
|
||||||
|
@ -3945,91 +3992,89 @@ bool p3IdService::checkId(const RsGxsIdGroup &grp, RsPgpId &pgpId,bool& error)
|
||||||
std::cerr << "Checking group signature " << esign << std::endl;
|
std::cerr << "Checking group signature " << esign << std::endl;
|
||||||
#endif
|
#endif
|
||||||
RsPgpId issuer_id ;
|
RsPgpId issuer_id ;
|
||||||
|
RsPgpFingerprint pgp_fingerprint;
|
||||||
|
pgpId.clear() ;
|
||||||
|
|
||||||
if(mPgpUtils->parseSignature((unsigned char *) grp.mPgpIdSign.c_str(), grp.mPgpIdSign.length(),issuer_id))
|
if(mPgpUtils->parseSignature((unsigned char *) grp.mPgpIdSign.c_str(), grp.mPgpIdSign.length(),issuer_id) && !issuer_id.isNull())
|
||||||
|
{
|
||||||
|
RsStackMutex stack(mIdMtx); /********** STACK LOCKED MTX ******/
|
||||||
|
pgpId = issuer_id ;
|
||||||
|
|
||||||
|
auto mit = mPgpFingerprintMap.find(issuer_id);
|
||||||
|
|
||||||
|
if(mit == mPgpFingerprintMap.end())
|
||||||
{
|
{
|
||||||
#ifdef DEBUG_IDS
|
#ifdef DEBUG_IDS
|
||||||
std::cerr << "Issuer found: " << issuer_id << std::endl;
|
std::cerr << "Issuer Id: " << issuer_id << " is not known. Key will be marked as non verified." << std::endl;
|
||||||
#endif
|
#endif
|
||||||
pgpId = issuer_id ;
|
error = false;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
calcPGPHash(RsGxsId(grp.mMeta.mGroupId), mit->second, hash);
|
||||||
|
#ifdef DEBUG_IDS
|
||||||
|
std::cerr << "Issuer from PGP signature: " << issuer_id << " is known. Computed corresponding hash: " << hash << std::endl;
|
||||||
|
#endif
|
||||||
|
if(grp.mPgpIdHash != hash)
|
||||||
|
{
|
||||||
|
std::cerr << "(EE) Unexpected situation: GxsId signature hash (" << hash << ") doesn't correspond to what's listed in the mPgpIdHash field (" << grp.mPgpIdHash << ")." << std::endl;
|
||||||
|
error = true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
pgp_fingerprint = mit->second;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::cerr << "Signature parsing failed!!" << std::endl;
|
|
||||||
pgpId.clear() ;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef DEBUG_IDS
|
|
||||||
std::cerr << "\tExpected Answer: " << ans.toStdString();
|
|
||||||
std::cerr << std::endl;
|
|
||||||
#endif // DEBUG_IDS
|
|
||||||
|
|
||||||
RsStackMutex stack(mIdMtx); /********** STACK LOCKED MTX ******/
|
RsStackMutex stack(mIdMtx); /********** STACK LOCKED MTX ******/
|
||||||
|
|
||||||
std::map<RsPgpId, PGPFingerprintType>::iterator mit;
|
#ifdef DEBUG_IDS
|
||||||
for(mit = mPgpFingerprintMap.begin(); mit != mPgpFingerprintMap.end(); ++mit)
|
std::cerr << "Bruteforcing PGP hash from GxsId mPgpHash: " << grp.mPgpIdHash << std::endl;
|
||||||
|
#endif
|
||||||
|
for(auto mit = mPgpFingerprintMap.begin(); mit != mPgpFingerprintMap.end(); ++mit)
|
||||||
{
|
{
|
||||||
Sha1CheckSum hash;
|
|
||||||
calcPGPHash(RsGxsId(grp.mMeta.mGroupId), mit->second, hash);
|
calcPGPHash(RsGxsId(grp.mMeta.mGroupId), mit->second, hash);
|
||||||
|
|
||||||
|
std::cerr << " profile key " << mit->first << " (" << mit->second << ") : ";
|
||||||
|
|
||||||
if (ans == hash)
|
if (grp.mPgpIdHash == hash)
|
||||||
{
|
{
|
||||||
#ifdef DEBUG_IDS
|
#ifdef DEBUG_IDS
|
||||||
std::cerr << "p3IdService::checkId() HASH MATCH!";
|
std::cerr << "MATCH!" << std::endl;
|
||||||
std::cerr << std::endl;
|
|
||||||
std::cerr << "p3IdService::checkId() Hash : " << hash.toStdString();
|
|
||||||
std::cerr << std::endl;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* miracle match! */
|
|
||||||
/* check signature too */
|
|
||||||
if (mPgpUtils->VerifySignBin((void *) hash.toByteArray(), hash.SIZE_IN_BYTES,
|
|
||||||
(unsigned char *) grp.mPgpIdSign.c_str(), grp.mPgpIdSign.length(),
|
|
||||||
mit->second))
|
|
||||||
{
|
|
||||||
#ifdef DEBUG_IDS
|
|
||||||
std::cerr << "p3IdService::checkId() Signature Okay too!";
|
|
||||||
std::cerr << std::endl;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
pgpId = mit->first;
|
pgpId = mit->first;
|
||||||
|
pgp_fingerprint = mit->second;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
#ifdef DEBUG_IDS
|
||||||
|
else
|
||||||
|
std::cerr << "fails" << std::endl;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Look for the PGP id given by the signature
|
||||||
|
|
||||||
|
#ifdef DEBUG_IDS
|
||||||
|
std::cerr << "Now checking the signature: ";
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (mPgpUtils->VerifySignBin((void *) hash.toByteArray(), hash.SIZE_IN_BYTES, (unsigned char *) grp.mPgpIdSign.c_str(), grp.mPgpIdSign.length(), pgp_fingerprint))
|
||||||
|
{
|
||||||
|
#ifdef DEBUG_IDS
|
||||||
|
std::cerr << " Signature validates!" << std::endl;
|
||||||
|
#endif
|
||||||
|
error = false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
/* error */
|
|
||||||
std::cerr << "p3IdService::checkId() ERROR Signature Failed";
|
|
||||||
std::cerr << std::endl;
|
|
||||||
|
|
||||||
std::cerr << "p3IdService::checkId() Matched PGPID: " << mit->first.toStdString();
|
|
||||||
std::cerr << " Fingerprint: " << mit->second.toStdString();
|
|
||||||
std::cerr << std::endl;
|
|
||||||
|
|
||||||
std::cerr << "p3IdService::checkId() Signature: ";
|
|
||||||
std::string strout;
|
|
||||||
|
|
||||||
/* push binary into string -> really bad! */
|
|
||||||
for(unsigned int i = 0; i < grp.mPgpIdSign.length(); i++)
|
|
||||||
{
|
{
|
||||||
rs_sprintf_append(strout, "%02x", (uint32_t) ((uint8_t) grp.mPgpIdSign[i]));
|
#ifdef DEBUG_IDS
|
||||||
}
|
std::cerr << " Signature fails!" << std::endl;
|
||||||
std::cerr << strout;
|
#endif
|
||||||
std::cerr << std::endl;
|
|
||||||
|
|
||||||
error = true;
|
error = true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG_IDS
|
|
||||||
std::cerr << "p3IdService::checkId() Checked " << mPgpFingerprintMap.size() << " Hashes without Match";
|
|
||||||
std::cerr << std::endl;
|
|
||||||
#endif // DEBUG_IDS
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* worker functions */
|
/* worker functions */
|
||||||
void p3IdService::getPgpIdList()
|
void p3IdService::getPgpIdList()
|
||||||
{
|
{
|
||||||
|
@ -4742,6 +4787,9 @@ void p3IdService::handleResponse(uint32_t token, uint32_t req_type
|
||||||
case GXSIDREQ_OPINION:
|
case GXSIDREQ_OPINION:
|
||||||
if (status == RsTokenService::COMPLETE) opinion_handlerequest(token);
|
if (status == RsTokenService::COMPLETE) opinion_handlerequest(token);
|
||||||
break;
|
break;
|
||||||
|
case GXSIDREQ_LOAD_PGPIDDATA:
|
||||||
|
if (status == RsTokenService::COMPLETE) pgphash_load_group_data(token);
|
||||||
|
break;
|
||||||
case GXSIDREQ_SERIALIZE_TO_MEMORY:
|
case GXSIDREQ_SERIALIZE_TO_MEMORY:
|
||||||
if (status == RsTokenService::COMPLETE) handle_get_serialized_grp(token);
|
if (status == RsTokenService::COMPLETE) handle_get_serialized_grp(token);
|
||||||
break;
|
break;
|
||||||
|
@ -4780,10 +4828,6 @@ void p3IdService::handle_event(uint32_t event_type, const std::string &/*elabel*
|
||||||
pgphash_start();
|
pgphash_start();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GXSID_EVENT_PGPHASH_PROC:
|
|
||||||
pgphash_process();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case GXSID_EVENT_RECOGN:
|
case GXSID_EVENT_RECOGN:
|
||||||
recogn_start();
|
recogn_start();
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -488,6 +488,7 @@ private:
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
bool pgphash_start();
|
bool pgphash_start();
|
||||||
|
bool pgphash_load_group_data(uint32_t token);
|
||||||
bool pgphash_handlerequest(uint32_t token);
|
bool pgphash_handlerequest(uint32_t token);
|
||||||
bool pgphash_process();
|
bool pgphash_process();
|
||||||
|
|
||||||
|
@ -497,7 +498,7 @@ private:
|
||||||
/* MUTEX PROTECTED DATA (mIdMtx - maybe should use a 2nd?) */
|
/* MUTEX PROTECTED DATA (mIdMtx - maybe should use a 2nd?) */
|
||||||
|
|
||||||
std::map<RsPgpId, RsPgpFingerprint> mPgpFingerprintMap;
|
std::map<RsPgpId, RsPgpFingerprint> mPgpFingerprintMap;
|
||||||
std::list<RsGxsIdGroup> mGroupsToProcess;
|
std::map<RsGxsGroupId,RsGxsIdGroup> mGroupsToProcess;
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
* recogn processing.
|
* recogn processing.
|
||||||
|
@ -625,7 +626,7 @@ private:
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PgpAuxUtils *mPgpUtils;
|
PgpAuxUtils *mPgpUtils;
|
||||||
|
rstime_t mLastPGPHashProcessTime ;
|
||||||
rstime_t mLastKeyCleaningTime ;
|
rstime_t mLastKeyCleaningTime ;
|
||||||
rstime_t mLastConfigUpdate ;
|
rstime_t mLastConfigUpdate ;
|
||||||
|
|
||||||
|
|
|
@ -77,8 +77,10 @@ void TS_dumpState() ;
|
||||||
// - The total number of TR per second emmited from self will be MAX_TUNNEL_REQS_PER_SECOND / TIME_BETWEEN_TUNNEL_MANAGEMENT_CALLS = 0.5
|
// - The total number of TR per second emmited from self will be MAX_TUNNEL_REQS_PER_SECOND / TIME_BETWEEN_TUNNEL_MANAGEMENT_CALLS = 0.5
|
||||||
// - I updated forward probabilities to higher values, and min them to 1/nb_connected_friends to prevent blocking tunnels.
|
// - I updated forward probabilities to higher values, and min them to 1/nb_connected_friends to prevent blocking tunnels.
|
||||||
//
|
//
|
||||||
static const rstime_t TUNNEL_REQUESTS_LIFE_TIME = 240 ; /// life time for tunnel requests in the cache.
|
static const rstime_t TUNNEL_REQUESTS_LIFE_TIME = 600 ; /// life time for tunnel requests in the cache.
|
||||||
static const rstime_t SEARCH_REQUESTS_LIFE_TIME = 240 ; /// life time for search requests in the cache
|
static const rstime_t TUNNEL_REQUESTS_RESULT_TIME = 20 ; /// maximum time during which we process/forward results for known tunnel requests
|
||||||
|
static const rstime_t SEARCH_REQUESTS_LIFE_TIME = 600 ; /// life time for search requests in the cache
|
||||||
|
static const rstime_t SEARCH_REQUESTS_RESULT_TIME = 20 ; /// maximum time during which we process/forward results for known search requests
|
||||||
static const rstime_t REGULAR_TUNNEL_DIGGING_TIME = 300 ; /// maximum interval between two tunnel digging campaigns.
|
static const rstime_t REGULAR_TUNNEL_DIGGING_TIME = 300 ; /// maximum interval between two tunnel digging campaigns.
|
||||||
static const rstime_t MAXIMUM_TUNNEL_IDLE_TIME = 60 ; /// maximum life time of an unused tunnel.
|
static const rstime_t MAXIMUM_TUNNEL_IDLE_TIME = 60 ; /// maximum life time of an unused tunnel.
|
||||||
static const rstime_t EMPTY_TUNNELS_DIGGING_TIME = 50 ; /// look into tunnels regularly every 50 sec.
|
static const rstime_t EMPTY_TUNNELS_DIGGING_TIME = 50 ; /// look into tunnels regularly every 50 sec.
|
||||||
|
@ -1163,6 +1165,17 @@ void p3turtle::handleSearchResult(RsTurtleSearchResultItem *item)
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Is this result too old?
|
||||||
|
// Search Requests younger than SEARCH_REQUESTS_LIFE_TIME are kept in the cache, so that they are not duplicated if they bounce in the network
|
||||||
|
// Nevertheless results received for Search Requests older than SEARCH_REQUESTS_RESULT_TIME are considered obsolete and discarded
|
||||||
|
if (time(NULL) > it->second.time_stamp + SEARCH_REQUESTS_RESULT_TIME)
|
||||||
|
{
|
||||||
|
#ifdef P3TURTLE_DEBUG
|
||||||
|
RsDbg() << "TURTLE p3turtle::handleSearchResult Search Request is known, but result arrives too late, dropping";
|
||||||
|
#endif
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Is this result's target actually ours ?
|
// Is this result's target actually ours ?
|
||||||
|
|
||||||
if(it->second.origin == _own_id)
|
if(it->second.origin == _own_id)
|
||||||
|
@ -1873,6 +1886,17 @@ void p3turtle::handleTunnelResult(RsTurtleTunnelOkItem *item)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Is this result too old?
|
||||||
|
// Tunnel Requests younger than TUNNEL_REQUESTS_LIFE_TIME are kept in the cache, so that they are not duplicated if they bounce in the network
|
||||||
|
// Nevertheless results received for Tunnel Requests older than TUNNEL_REQUESTS_RESULT_TIME are considered obsolete and discarded
|
||||||
|
if (time(NULL) > it->second.time_stamp + TUNNEL_REQUESTS_RESULT_TIME)
|
||||||
|
{
|
||||||
|
#ifdef P3TURTLE_DEBUG
|
||||||
|
RsDbg() << "TURTLE p3turtle::handleTunnelResult Tunnel Request is known, but result arrives too late, dropping";
|
||||||
|
#endif
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Is this result's target actually ours ?
|
// Is this result's target actually ours ?
|
||||||
|
|
||||||
if(it->second.origin == _own_id)
|
if(it->second.origin == _own_id)
|
||||||
|
|
|
@ -58,6 +58,7 @@ HomePage::HomePage(QWidget *parent) :
|
||||||
updateCertificate();
|
updateCertificate();
|
||||||
|
|
||||||
connect(ui->addButton, SIGNAL(clicked()), this, SLOT(addFriend()));
|
connect(ui->addButton, SIGNAL(clicked()), this, SLOT(addFriend()));
|
||||||
|
connect(ui->copyIDButton, SIGNAL(clicked()), this, SLOT(copyId()));
|
||||||
|
|
||||||
QAction *WebMailAction = new QAction(QIcon(),tr("Invite via WebMail"), this);
|
QAction *WebMailAction = new QAction(QIcon(),tr("Invite via WebMail"), this);
|
||||||
connect(WebMailAction, SIGNAL(triggered()), this, SLOT(webMail()));
|
connect(WebMailAction, SIGNAL(triggered()), this, SLOT(webMail()));
|
||||||
|
@ -107,9 +108,9 @@ HomePage::HomePage(QWidget *parent) :
|
||||||
<div align=center>\
|
<div align=center>\
|
||||||
<IMG align=\"center\" width=\"%2\" src=\":/images/network_map.png\"/> \
|
<IMG align=\"center\" width=\"%2\" src=\":/images/network_map.png\"/> \
|
||||||
</div>\
|
</div>\
|
||||||
<p>To do so, copy your certificate on this page and send it to friends, and add your friends' certificate.</p> \
|
<p>To do so, copy your Retroshare ID on this page and send it to friends, and add your friends' Retroshare ID.</p> \
|
||||||
<p>Another option is to search the internet for \"Retroshare chat servers\" (independently administrated). These servers allow you to exchange \
|
<p>Another option is to search the internet for \"Retroshare chat servers\" (independently administrated). These servers allow you to exchange \
|
||||||
certificates with a dedicated Retroshare node, through which\
|
Retroshare ID with a dedicated Retroshare node, through which\
|
||||||
you will be able to anonymously meet other people.</p> ").arg(QString::number(2*S)).arg(width()*0.5);
|
you will be able to anonymously meet other people.</p> ").arg(QString::number(2*S)).arg(width()*0.5);
|
||||||
registerHelpButton(ui->helpButton,help_str,"HomePage") ;
|
registerHelpButton(ui->helpButton,help_str,"HomePage") ;
|
||||||
|
|
||||||
|
@ -344,7 +345,7 @@ void HomePage::webMail()
|
||||||
|
|
||||||
void HomePage::openWebHelp()
|
void HomePage::openWebHelp()
|
||||||
{
|
{
|
||||||
QDesktopServices::openUrl(QUrl(QString("https://retroshare.readthedocs.io")));
|
QDesktopServices::openUrl(QUrl(QString("https://retroshare.readthedocs.io/en/latest/")));
|
||||||
}
|
}
|
||||||
|
|
||||||
void HomePage::toggleUseOldFormat()
|
void HomePage::toggleUseOldFormat()
|
||||||
|
|
|
@ -13,8 +13,37 @@
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Form</string>
|
<string>Form</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="0" column="0" colspan="3">
|
<item row="3" column="0" rowspan="7">
|
||||||
|
<spacer name="horizontalSpacer_2">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Preferred</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>50</width>
|
||||||
|
<height>408</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="2">
|
||||||
|
<spacer name="verticalSpacer_2">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0" colspan="5">
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="label">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Maximum">
|
<sizepolicy hsizetype="Expanding" vsizetype="Maximum">
|
||||||
|
@ -33,7 +62,7 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0" colspan="3">
|
<item row="1" column="0" colspan="5">
|
||||||
<widget class="QLabel" name="label_2">
|
<widget class="QLabel" name="label_2">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
|
@ -50,182 +79,25 @@ private and secure decentralized communication platform.
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0" rowspan="4">
|
<item row="4" column="1" colspan="3">
|
||||||
<spacer name="horizontalSpacer_2">
|
<widget class="QFrame" name="retroshareIDframe">
|
||||||
<property name="orientation">
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
<enum>Qt::Horizontal</enum>
|
<property name="leftMargin">
|
||||||
|
<number>9</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeType">
|
<property name="topMargin">
|
||||||
<enum>QSizePolicy::Preferred</enum>
|
<number>9</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="rightMargin">
|
||||||
<size>
|
<number>9</number>
|
||||||
<width>94</width>
|
|
||||||
<height>408</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
<property name="bottomMargin">
|
||||||
</item>
|
<number>9</number>
|
||||||
<item row="2" column="2" rowspan="4">
|
|
||||||
<spacer name="horizontalSpacer_3">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Preferred</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>78</width>
|
|
||||||
<height>388</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1">
|
|
||||||
<widget class="QFrame" name="addframe">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true"/>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_3">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>11</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true"/>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Did you receive a Retroshare id from a friend?</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer">
|
|
||||||
<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="QToolButton" name="addButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Add friend</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="icons.qrc">
|
|
||||||
<normaloff>:/icons/png/invite.png</normaloff>:/icons/png/invite.png</iconset>
|
|
||||||
</property>
|
|
||||||
<property name="iconSize">
|
|
||||||
<size>
|
|
||||||
<width>24</width>
|
|
||||||
<height>24</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="toolButtonStyle">
|
|
||||||
<enum>Qt::ToolButtonTextBesideIcon</enum>
|
|
||||||
</property>
|
|
||||||
<property name="autoRaise">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="1">
|
|
||||||
<widget class="QFrame" name="helpframe">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true"/>
|
|
||||||
</property>
|
|
||||||
<property name="frameShape">
|
|
||||||
<enum>QFrame::StyledPanel</enum>
|
|
||||||
</property>
|
|
||||||
<property name="frameShadow">
|
|
||||||
<enum>QFrame::Raised</enum>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_4">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>11</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Do you need help with Retroshare?</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QToolButton" name="openwebhelp">
|
|
||||||
<property name="text">
|
|
||||||
<string>Open Web Help</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="icons.qrc">
|
|
||||||
<normaloff>:/icons/settings/webinterface.svg</normaloff>:/icons/settings/webinterface.svg</iconset>
|
|
||||||
</property>
|
|
||||||
<property name="iconSize">
|
|
||||||
<size>
|
|
||||||
<width>24</width>
|
|
||||||
<height>24</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="toolButtonStyle">
|
|
||||||
<enum>Qt::ToolButtonTextBesideIcon</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="1">
|
|
||||||
<spacer name="verticalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Expanding</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>40</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
|
||||||
<property name="horizontalSpacing">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="verticalSpacing">
|
<property name="verticalSpacing">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="2" column="0">
|
<item row="1" column="2">
|
||||||
<widget class="QLabel" name="retroshareid">
|
<widget class="QLabel" name="retroshareid">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
@ -247,6 +119,9 @@ private and secure decentralized communication platform.
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
<property name="wordWrap">
|
<property name="wordWrap">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -255,7 +130,85 @@ private and secure decentralized communication platform.
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="2">
|
<item row="1" column="5">
|
||||||
|
<spacer name="horizontalSpacer_5">
|
||||||
|
<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 row="0" column="0" colspan="6">
|
||||||
|
<widget class="QLabel" name="userCertLabel">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>11</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>This is your Retroshare ID. Copy and share with your friends!</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignBottom|Qt::AlignHCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="4">
|
||||||
|
<widget class="QToolButton" name="helpButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>...</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="icons.qrc">
|
||||||
|
<normaloff>:/icons/help_64.png</normaloff>:/icons/help_64.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="autoRaise">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<spacer name="horizontalSpacer_6">
|
||||||
|
<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 row="1" column="1">
|
||||||
|
<widget class="QToolButton" name="copyIDButton">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string><html><head/><body><p>Copy your RetroShare ID to clipboard</p></body></html></string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>...</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="icons.qrc">
|
||||||
|
<normaloff>:/icons/png/copy.png</normaloff>:/icons/png/copy.png</iconset>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="3">
|
||||||
<widget class="QToolButton" name="shareButton">
|
<widget class="QToolButton" name="shareButton">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
|
@ -287,45 +240,206 @@ private and secure decentralized communication platform.
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="0" colspan="2">
|
</layout>
|
||||||
<widget class="QLabel" name="userCertLabel">
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="1" colspan="3">
|
||||||
|
<widget class="QFrame" name="addframe">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true"/>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_4">
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>12</number>
|
||||||
|
</property>
|
||||||
|
<item row="1" column="2">
|
||||||
|
<spacer name="horizontalSpacer_4">
|
||||||
|
<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 row="1" column="0">
|
||||||
|
<spacer name="horizontalSpacer">
|
||||||
|
<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 row="1" column="1">
|
||||||
|
<widget class="QToolButton" name="addButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>Add friend</string>
|
||||||
|
</property>
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>24</width>
|
||||||
|
<height>24</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="toolButtonStyle">
|
||||||
|
<enum>Qt::ToolButtonTextBesideIcon</enum>
|
||||||
|
</property>
|
||||||
|
<property name="autoRaise">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0" colspan="3">
|
||||||
|
<widget class="QLabel" name="label_3">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>11</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true"/>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Did you receive a Retroshare ID from a friend?</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="9" column="1" colspan="3">
|
||||||
|
<spacer name="verticalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Expanding</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="4" rowspan="7">
|
||||||
|
<spacer name="horizontalSpacer_3">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Preferred</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>50</width>
|
||||||
|
<height>408</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="8" column="1" colspan="3">
|
||||||
|
<widget class="QFrame" name="helpframe">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true"/>
|
||||||
|
</property>
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::NoFrame</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Plain</enum>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_3">
|
||||||
|
<property name="verticalSpacing">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<item row="1" column="2">
|
||||||
|
<spacer name="horizontalSpacer_7">
|
||||||
|
<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 row="1" column="1">
|
||||||
|
<widget class="QToolButton" name="openwebhelp">
|
||||||
|
<property name="text">
|
||||||
|
<string>Open Web Help</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="icons.qrc">
|
||||||
|
<normaloff>:/icons/settings/webinterface.svg</normaloff>:/icons/settings/webinterface.svg</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>24</width>
|
||||||
|
<height>24</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="toolButtonStyle">
|
||||||
|
<enum>Qt::ToolButtonTextBesideIcon</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<spacer name="horizontalSpacer_8">
|
||||||
|
<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 row="0" column="0" colspan="3">
|
||||||
|
<widget class="QLabel" name="label_4">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<pointsize>11</pointsize>
|
<pointsize>11</pointsize>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>This is your Retroshare ID. Copy and share with your friends!</string>
|
<string>Do you need help with Retroshare?</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
<set>Qt::AlignCenter</set>
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="3">
|
|
||||||
<widget class="QToolButton" name="helpButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>...</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="icons.qrc">
|
|
||||||
<normaloff>:/icons/help_64.png</normaloff>:/icons/help_64.png</iconset>
|
|
||||||
</property>
|
|
||||||
<property name="checkable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="autoRaise">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
|
@ -366,6 +366,7 @@ IdDialog::IdDialog(QWidget *parent) : MainPage(parent), ui(new Ui::IdDialog)
|
||||||
/* Set header resize modes and initial section sizes */
|
/* Set header resize modes and initial section sizes */
|
||||||
QHeaderView * idheader = ui->idTreeWidget->header();
|
QHeaderView * idheader = ui->idTreeWidget->header();
|
||||||
QHeaderView_setSectionResizeModeColumn(idheader, RSID_COL_VOTES, QHeaderView::ResizeToContents);
|
QHeaderView_setSectionResizeModeColumn(idheader, RSID_COL_VOTES, QHeaderView::ResizeToContents);
|
||||||
|
idheader->setStretchLastSection(true);
|
||||||
|
|
||||||
mStateHelper->setActive(IDDIALOG_IDDETAILS, false);
|
mStateHelper->setActive(IDDIALOG_IDDETAILS, false);
|
||||||
mStateHelper->setActive(IDDIALOG_REPLIST, false);
|
mStateHelper->setActive(IDDIALOG_REPLIST, false);
|
||||||
|
@ -695,7 +696,12 @@ void IdDialog::loadCircles(const std::list<RsGroupMetaData>& groupInfo)
|
||||||
if(am_I_subscribed)
|
if(am_I_subscribed)
|
||||||
tooltip += tr("subscribed (Receive/forward membership requests from others and invite list).") ;
|
tooltip += tr("subscribed (Receive/forward membership requests from others and invite list).") ;
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
if(vit->mLastSeen>0)
|
||||||
|
tooltip += tr("unsubscribed (Only receive invite list). Last seen: %1 days ago.").arg( (time(nullptr)-vit->mLastSeen)/86400 );
|
||||||
|
else
|
||||||
tooltip += tr("unsubscribed (Only receive invite list).");
|
tooltip += tr("unsubscribed (Only receive invite list).");
|
||||||
|
}
|
||||||
|
|
||||||
tooltip += "\n"+tr("Your status: ") ;
|
tooltip += "\n"+tr("Your status: ") ;
|
||||||
|
|
||||||
|
|
|
@ -186,6 +186,11 @@ public:
|
||||||
ToasterDisable *toasterDisableInstance();
|
ToasterDisable *toasterDisableInstance();
|
||||||
SysTrayStatus *sysTrayStatusInstance();
|
SysTrayStatus *sysTrayStatusInstance();
|
||||||
|
|
||||||
|
QString get_nameAndLocation()
|
||||||
|
{
|
||||||
|
return nameAndLocation;
|
||||||
|
}
|
||||||
|
|
||||||
static bool hiddenmode;
|
static bool hiddenmode;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
|
|
@ -162,8 +162,8 @@ void AvatarDialog::loadAvatarWidget()
|
||||||
|
|
||||||
if(stickerTabs.count() == 0) {
|
if(stickerTabs.count() == 0) {
|
||||||
ui->nostickersLabel->setText("");
|
ui->nostickersLabel->setText("");
|
||||||
QString message = "No stickers installed.\nYou can install them by putting images into one of these folders:\n" /*+ stickerFolders.join('\n')*/;
|
QString message = "No Avatars or Stickers installed.\nYou can install them by putting images into one of these folders:\n" + stickerFolders.join('\n');
|
||||||
message += "RetroShare/stickers\n RetroShare/Data/stickers\n RetroShare/Data/Location/stickers";
|
message += "\n RetroShare/stickers\n RetroShare/Data/stickers\n RetroShare/Data/Location/stickers";
|
||||||
ui->nostickersLabel->setText(message);
|
ui->nostickersLabel->setText(message);
|
||||||
} else {
|
} else {
|
||||||
ui->infoframe->hide();
|
ui->infoframe->hide();
|
||||||
|
|
|
@ -34,10 +34,10 @@ ElidedLabel::ElidedLabel(const QString &text, QWidget *parent)
|
||||||
, mElided(false)
|
, mElided(false)
|
||||||
, mOnlyPlainText(false)
|
, mOnlyPlainText(false)
|
||||||
, mContent(text)
|
, mContent(text)
|
||||||
|
, mRectElision(QRect())
|
||||||
, mTextColor(QColor())
|
, mTextColor(QColor())
|
||||||
{
|
{
|
||||||
setStyleSheet("background-color: rgba(0,0,0,0%)");
|
setStyleSheet("ElidedLabel{background-color: rgba(0,0,0,0%)}");
|
||||||
mRectElision = QRect();
|
|
||||||
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
|
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,10 +46,10 @@ ElidedLabel::ElidedLabel(QWidget *parent)
|
||||||
, mElided(false)
|
, mElided(false)
|
||||||
, mOnlyPlainText(false)
|
, mOnlyPlainText(false)
|
||||||
, mContent("")
|
, mContent("")
|
||||||
|
, mRectElision(QRect())
|
||||||
, mTextColor(QColor())
|
, mTextColor(QColor())
|
||||||
{
|
{
|
||||||
setStyleSheet("background-color: rgba(0,0,0,0%)");
|
setStyleSheet("ElidedLabel{background-color: rgba(0,0,0,0%)}");
|
||||||
mRectElision = QRect();
|
|
||||||
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
|
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -256,6 +256,7 @@ void ElidedLabel::mousePressEvent(QMouseEvent *ev)
|
||||||
return; // eat event
|
return; // eat event
|
||||||
}
|
}
|
||||||
QLabel::mousePressEvent(ev);
|
QLabel::mousePressEvent(ev);
|
||||||
|
emit clicked(ev->pos());
|
||||||
}
|
}
|
||||||
|
|
||||||
void ElidedLabel::setTextColor(const QColor &color)
|
void ElidedLabel::setTextColor(const QColor &color)
|
||||||
|
|
|
@ -38,7 +38,7 @@ class ElidedLabel : public QLabel
|
||||||
Q_PROPERTY(QColor textColor READ textColor WRITE setTextColor)
|
Q_PROPERTY(QColor textColor READ textColor WRITE setTextColor)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ElidedLabel(const QString &text, QWidget *parent = 0);
|
explicit ElidedLabel(const QString &text, QWidget *parent = 0);
|
||||||
ElidedLabel(QWidget *parent = 0);
|
ElidedLabel(QWidget *parent = 0);
|
||||||
|
|
||||||
const QString & text() const { return mContent; }
|
const QString & text() const { return mContent; }
|
||||||
|
@ -77,6 +77,7 @@ protected:
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void elisionChanged(bool elided);
|
void elisionChanged(bool elided);
|
||||||
|
void clicked(QPoint pos);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool mElided;
|
bool mElided;
|
||||||
|
|
|
@ -97,11 +97,11 @@ GroupTreeWidget::GroupTreeWidget(QWidget *parent) :
|
||||||
|
|
||||||
QTreeWidgetItem *headerItem = ui->treeWidget->headerItem();
|
QTreeWidgetItem *headerItem = ui->treeWidget->headerItem();
|
||||||
headerItem->setText(GTW_COLUMN_NAME, tr("Name"));
|
headerItem->setText(GTW_COLUMN_NAME, tr("Name"));
|
||||||
headerItem->setText(GTW_COLUMN_UNREAD, tr("Unread"));
|
headerItem->setText(GTW_COLUMN_UNREAD, "");
|
||||||
headerItem->setText(GTW_COLUMN_POSTS, tr("F Posts"));
|
headerItem->setText(GTW_COLUMN_POSTS, "");
|
||||||
headerItem->setText(GTW_COLUMN_POPULARITY, tr("Popularity"));
|
headerItem->setText(GTW_COLUMN_POPULARITY, "");
|
||||||
headerItem->setText(GTW_COLUMN_LAST_POST, tr("Last Post"));
|
headerItem->setText(GTW_COLUMN_LAST_POST, "");
|
||||||
headerItem->setToolTip(GTW_COLUMN_NAME, tr("Name"));
|
headerItem->setToolTip(GTW_COLUMN_NAME, tr("Group Name"));
|
||||||
headerItem->setToolTip(GTW_COLUMN_UNREAD, tr("Number of Unread message"));
|
headerItem->setToolTip(GTW_COLUMN_UNREAD, tr("Number of Unread message"));
|
||||||
headerItem->setToolTip(GTW_COLUMN_POSTS, tr("Friend's Posts"));
|
headerItem->setToolTip(GTW_COLUMN_POSTS, tr("Friend's Posts"));
|
||||||
headerItem->setToolTip(GTW_COLUMN_POPULARITY, tr("Popularity"));
|
headerItem->setToolTip(GTW_COLUMN_POPULARITY, tr("Popularity"));
|
||||||
|
@ -109,9 +109,9 @@ GroupTreeWidget::GroupTreeWidget(QWidget *parent) :
|
||||||
|
|
||||||
/* Set header resize modes and initial section sizes */
|
/* Set header resize modes and initial section sizes */
|
||||||
QHeaderView *header = ui->treeWidget->header ();
|
QHeaderView *header = ui->treeWidget->header ();
|
||||||
header->setStretchLastSection(false);
|
header->setStretchLastSection(true);
|
||||||
QHeaderView_setSectionResizeModeColumn(header, GTW_COLUMN_NAME, QHeaderView::Stretch);
|
QHeaderView_setSectionResizeModeColumn(header, GTW_COLUMN_NAME, QHeaderView::Interactive);
|
||||||
header->resizeSection(GTW_COLUMN_NAME, 10*W) ;
|
header->resizeSection(GTW_COLUMN_NAME, 40*W) ;
|
||||||
QHeaderView_setSectionResizeModeColumn(header, GTW_COLUMN_UNREAD, QHeaderView::Interactive);
|
QHeaderView_setSectionResizeModeColumn(header, GTW_COLUMN_UNREAD, QHeaderView::Interactive);
|
||||||
header->resizeSection(GTW_COLUMN_UNREAD, 3*W+4) ;
|
header->resizeSection(GTW_COLUMN_UNREAD, 3*W+4) ;
|
||||||
QHeaderView_setSectionResizeModeColumn(header, GTW_COLUMN_POSTS, QHeaderView::Interactive);
|
QHeaderView_setSectionResizeModeColumn(header, GTW_COLUMN_POSTS, QHeaderView::Interactive);
|
||||||
|
@ -191,8 +191,6 @@ void GroupTreeWidget::processSettings(bool load)
|
||||||
|
|
||||||
if (load) {
|
if (load) {
|
||||||
// load Settings
|
// load Settings
|
||||||
bool showHeader = Settings->value("GroupShowHeader", false).toBool();
|
|
||||||
actionShowHeader->setChecked(showHeader);
|
|
||||||
|
|
||||||
// state of order
|
// state of order
|
||||||
bool ascSort = Settings->value("GroupAscSort", true).toBool();
|
bool ascSort = Settings->value("GroupAscSort", true).toBool();
|
||||||
|
@ -230,7 +228,6 @@ void GroupTreeWidget::processSettings(bool load)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// save Settings
|
// save Settings
|
||||||
Settings->setValue("GroupShowHeader", !(actionShowHeader && actionShowHeader->isChecked())); //False by default
|
|
||||||
|
|
||||||
// state of order
|
// state of order
|
||||||
Settings->setValue("GroupAscSort", !(actionSortDescending && actionSortDescending->isChecked())); //True by default
|
Settings->setValue("GroupAscSort", !(actionSortDescending && actionSortDescending->isChecked())); //True by default
|
||||||
|
@ -257,10 +254,6 @@ void GroupTreeWidget::initDisplayMenu(QToolButton *toolButton)
|
||||||
displayMenu = new QMenu();
|
displayMenu = new QMenu();
|
||||||
QActionGroup *actionGroupAsc = new QActionGroup(displayMenu);
|
QActionGroup *actionGroupAsc = new QActionGroup(displayMenu);
|
||||||
|
|
||||||
actionShowHeader = displayMenu->addAction(tr("Show Header"));
|
|
||||||
connect(actionShowHeader, SIGNAL(toggled(bool)), this, SLOT(showHeader(bool)));
|
|
||||||
actionShowHeader->setCheckable(true);
|
|
||||||
|
|
||||||
actionSortDescending = displayMenu->addAction(FilesDefs::getIconFromQtResourcePath(":/images/sort_decrease.png"), tr("Sort Descending Order"), this, SLOT(sort()));
|
actionSortDescending = displayMenu->addAction(FilesDefs::getIconFromQtResourcePath(":/images/sort_decrease.png"), tr("Sort Descending Order"), this, SLOT(sort()));
|
||||||
actionSortDescending->setCheckable(true);
|
actionSortDescending->setCheckable(true);
|
||||||
actionSortDescending->setActionGroup(actionGroupAsc);
|
actionSortDescending->setActionGroup(actionGroupAsc);
|
||||||
|
@ -777,11 +770,6 @@ void GroupTreeWidget::distantSearch()
|
||||||
ui->distantSearchLineEdit->clear();
|
ui->distantSearchLineEdit->clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GroupTreeWidget::showHeader(bool toShow)
|
|
||||||
{
|
|
||||||
ui->treeWidget->header()->setVisible(toShow);
|
|
||||||
}
|
|
||||||
|
|
||||||
void GroupTreeWidget::sort()
|
void GroupTreeWidget::sort()
|
||||||
{
|
{
|
||||||
resort(NULL);
|
resort(NULL);
|
||||||
|
|
|
@ -140,7 +140,6 @@ private slots:
|
||||||
void filterChanged();
|
void filterChanged();
|
||||||
void distantSearch();
|
void distantSearch();
|
||||||
|
|
||||||
void showHeader(bool toShow);
|
|
||||||
void sort();
|
void sort();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -152,7 +151,6 @@ private:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QMenu *displayMenu;
|
QMenu *displayMenu;
|
||||||
QAction *actionShowHeader;
|
|
||||||
QAction *actionSortAscending;
|
QAction *actionSortAscending;
|
||||||
QAction *actionSortDescending;
|
QAction *actionSortDescending;
|
||||||
QAction *actionSortByName;
|
QAction *actionSortByName;
|
||||||
|
|
|
@ -91,7 +91,7 @@
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
|
@ -137,7 +137,7 @@
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>LineEditClear</class>
|
<class>LineEditClear</class>
|
||||||
<extends>QLineEdit</extends>
|
<extends>QLineEdit</extends>
|
||||||
<header>gui/common/LineEditClear.h</header>
|
<header location="global">gui/common/LineEditClear.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>RSTreeWidget</class>
|
<class>RSTreeWidget</class>
|
||||||
|
|
|
@ -250,7 +250,7 @@ QMenu *RSTreeWidget::createStandardContextMenu(QMenu *contextMenu)
|
||||||
contextMenu->addSeparator();
|
contextMenu->addSeparator();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!mContextMenuActions.isEmpty() || mEnableColumnCustomize ||!mContextMenuActions.isEmpty() || !mContextMenuMenus.isEmpty()) {
|
if(!mContextMenuActions.isEmpty() || !mContextMenuMenus.isEmpty() || mEnableColumnCustomize) {
|
||||||
QWidget *widget = new QWidget(contextMenu);
|
QWidget *widget = new QWidget(contextMenu);
|
||||||
widget->setStyleSheet( ".QWidget{background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1,stop:0 #FEFEFE, stop:1 #E8E8E8); border: 1px solid #CCCCCC;}");
|
widget->setStyleSheet( ".QWidget{background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1,stop:0 #FEFEFE, stop:1 #E8E8E8); border: 1px solid #CCCCCC;}");
|
||||||
|
|
||||||
|
@ -279,6 +279,10 @@ QMenu *RSTreeWidget::createStandardContextMenu(QMenu *contextMenu)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mEnableColumnCustomize) {
|
if (mEnableColumnCustomize) {
|
||||||
|
QAction *actShowHeader = contextMenu->addAction(QIcon(), tr("Show Header"), this, SLOT(headerVisible()));
|
||||||
|
actShowHeader->setCheckable(true);
|
||||||
|
actShowHeader->setChecked(!isHeaderHidden());
|
||||||
|
|
||||||
QMenu *headerMenu = contextMenu->addMenu(QIcon(),tr("Show column..."));
|
QMenu *headerMenu = contextMenu->addMenu(QIcon(),tr("Show column..."));
|
||||||
|
|
||||||
QTreeWidgetItem *item = headerItem();
|
QTreeWidgetItem *item = headerItem();
|
||||||
|
@ -292,6 +296,8 @@ QMenu *RSTreeWidget::createStandardContextMenu(QMenu *contextMenu)
|
||||||
QString txt = item->text(column) ;
|
QString txt = item->text(column) ;
|
||||||
if(txt == "")
|
if(txt == "")
|
||||||
txt = item->data(column,Qt::UserRole).toString() ;
|
txt = item->data(column,Qt::UserRole).toString() ;
|
||||||
|
if(txt == "")
|
||||||
|
txt = item->data(column,Qt::ToolTipRole).toString() ;
|
||||||
|
|
||||||
if(txt=="")
|
if(txt=="")
|
||||||
txt = tr("[no title]") ;
|
txt = tr("[no title]") ;
|
||||||
|
@ -343,6 +349,19 @@ void RSTreeWidget::headerContextMenuRequested(const QPoint &pos)
|
||||||
delete contextMenu;
|
delete contextMenu;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RSTreeWidget::headerVisible()
|
||||||
|
{
|
||||||
|
QAction *action = dynamic_cast<QAction*>(sender());
|
||||||
|
if (!action) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool visible = action->isChecked();
|
||||||
|
setHeaderHidden(!visible);
|
||||||
|
|
||||||
|
emit headerVisibleChanged(visible);
|
||||||
|
}
|
||||||
|
|
||||||
void RSTreeWidget::columnVisible()
|
void RSTreeWidget::columnVisible()
|
||||||
{
|
{
|
||||||
QAction *action = dynamic_cast<QAction*>(sender());
|
QAction *action = dynamic_cast<QAction*>(sender());
|
||||||
|
|
|
@ -58,6 +58,7 @@ public:
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void signalMouseMiddleButtonClicked(QTreeWidgetItem *item);
|
void signalMouseMiddleButtonClicked(QTreeWidgetItem *item);
|
||||||
|
void headerVisibleChanged(bool visible);
|
||||||
void columnVisibleChanged(int column, bool visible);
|
void columnVisibleChanged(int column, bool visible);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -66,6 +67,7 @@ private:
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void headerContextMenuRequested(const QPoint &pos);
|
void headerContextMenuRequested(const QPoint &pos);
|
||||||
|
void headerVisible();
|
||||||
void columnVisible();
|
void columnVisible();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -365,11 +365,9 @@ void BoardsCommentsItem::setup()
|
||||||
mInFill = false;
|
mInFill = false;
|
||||||
|
|
||||||
/* clear ui */
|
/* clear ui */
|
||||||
//ui->titleLabel->setText(tr("Loading"));
|
|
||||||
ui->datetimeLabel->clear();
|
ui->datetimeLabel->clear();
|
||||||
ui->replyFrame->hide();
|
ui->replyFrame->hide();
|
||||||
|
|
||||||
ui->commentButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/comment.png"));
|
|
||||||
ui->copyLinkButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/copy.png"));
|
ui->copyLinkButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/copy.png"));
|
||||||
ui->expandButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/down-arrow.png"));
|
ui->expandButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/down-arrow.png"));
|
||||||
ui->readAndClearButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/correct.png"));
|
ui->readAndClearButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/correct.png"));
|
||||||
|
@ -379,7 +377,6 @@ void BoardsCommentsItem::setup()
|
||||||
connect(ui->clearButton, SIGNAL(clicked()), this, SLOT(removeItem()));
|
connect(ui->clearButton, SIGNAL(clicked()), this, SLOT(removeItem()));
|
||||||
|
|
||||||
/* specific */
|
/* specific */
|
||||||
connect(ui->commentButton, SIGNAL( clicked()), this, SLOT(loadComments()));
|
|
||||||
connect(ui->voteUpButton, SIGNAL(clicked()), this, SLOT(makeUpVote()));
|
connect(ui->voteUpButton, SIGNAL(clicked()), this, SLOT(makeUpVote()));
|
||||||
connect(ui->voteDownButton, SIGNAL(clicked()), this, SLOT( makeDownVote()));
|
connect(ui->voteDownButton, SIGNAL(clicked()), this, SLOT( makeDownVote()));
|
||||||
connect(ui->expandButton, SIGNAL(clicked()), this, SLOT( toggle()));
|
connect(ui->expandButton, SIGNAL(clicked()), this, SLOT( toggle()));
|
||||||
|
@ -394,7 +391,6 @@ void BoardsCommentsItem::setup()
|
||||||
|
|
||||||
// hide expand button, replies is not implemented yet
|
// hide expand button, replies is not implemented yet
|
||||||
ui->expandButton->hide();
|
ui->expandButton->hide();
|
||||||
ui->unsubscribeButton->hide();
|
|
||||||
|
|
||||||
ui->clearButton->hide();
|
ui->clearButton->hide();
|
||||||
ui->readAndClearButton->hide();
|
ui->readAndClearButton->hide();
|
||||||
|
@ -448,13 +444,14 @@ void BoardsCommentsItem::setCommentsSize(int comNb)
|
||||||
else if(comNb > 1)
|
else if(comNb > 1)
|
||||||
sComButText = tr("Comments ").append("(%1)").arg(comNb);
|
sComButText = tr("Comments ").append("(%1)").arg(comNb);
|
||||||
|
|
||||||
ui->commentButton->setText(sComButText);
|
//ui->commentButton->setText(sComButText);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BoardsCommentsItem::fill()
|
void BoardsCommentsItem::fill()
|
||||||
{
|
{
|
||||||
|
|
||||||
ui->logoLabel->setPixmap( FilesDefs::getPixmapFromQtResourcePath(":/icons/png/comment.png"));
|
ui->logoLabel->hide();
|
||||||
|
//ui->logoLabel->setPixmap( FilesDefs::getPixmapFromQtResourcePath(":/icons/png/comment.png"));
|
||||||
|
|
||||||
//RetroShareLink link = RetroShareLink::createGxsGroupLink(RetroShareLink::TYPE_POSTED, mGroupMeta.mGroupId, groupName());
|
//RetroShareLink link = RetroShareLink::createGxsGroupLink(RetroShareLink::TYPE_POSTED, mGroupMeta.mGroupId, groupName());
|
||||||
//ui->titleLabel->setText(link.toHtml());
|
//ui->titleLabel->setText(link.toHtml());
|
||||||
|
@ -472,9 +469,9 @@ void BoardsCommentsItem::fill()
|
||||||
{
|
{
|
||||||
// feed.
|
// feed.
|
||||||
//frame_comment->show();
|
//frame_comment->show();
|
||||||
ui->commentButton->show();
|
//ui->commentButton->show();
|
||||||
|
|
||||||
if (mPost.mComments)
|
/*if (mPost.mComments)
|
||||||
{
|
{
|
||||||
QString commentText = QString::number(mPost.mComments);
|
QString commentText = QString::number(mPost.mComments);
|
||||||
commentText += " ";
|
commentText += " ";
|
||||||
|
@ -484,7 +481,7 @@ void BoardsCommentsItem::fill()
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ui->commentButton->setText(tr("Comment"));
|
ui->commentButton->setText(tr("Comment"));
|
||||||
}
|
}*/
|
||||||
|
|
||||||
//setReadStatus(IS_MSG_NEW(mPost.mMeta.mMsgStatus), IS_MSG_UNREAD(mPost.mMeta.mMsgStatus) || IS_MSG_NEW(mPost.mMeta.mMsgStatus));
|
//setReadStatus(IS_MSG_NEW(mPost.mMeta.mMsgStatus), IS_MSG_UNREAD(mPost.mMeta.mMsgStatus) || IS_MSG_NEW(mPost.mMeta.mMsgStatus));
|
||||||
}
|
}
|
||||||
|
@ -492,7 +489,6 @@ void BoardsCommentsItem::fill()
|
||||||
{
|
{
|
||||||
// no feed.
|
// no feed.
|
||||||
//frame_comment->hide();
|
//frame_comment->hide();
|
||||||
ui->commentButton->hide();
|
|
||||||
|
|
||||||
ui->readButton->hide();
|
ui->readButton->hide();
|
||||||
}
|
}
|
||||||
|
@ -506,7 +502,6 @@ void BoardsCommentsItem::fill()
|
||||||
{
|
{
|
||||||
ui->clearButton->show();
|
ui->clearButton->show();
|
||||||
ui->readAndClearButton->show();
|
ui->readAndClearButton->show();
|
||||||
ui->titleLabel->hide();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// hide read button not yet functional
|
// hide read button not yet functional
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>755</width>
|
<width>755</width>
|
||||||
<height>201</height>
|
<height>175</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_3">
|
<layout class="QGridLayout" name="gridLayout_3">
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
<property name="bottomMargin">
|
<property name="bottomMargin">
|
||||||
<number>1</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QFrame" name="mainFrame">
|
<widget class="QFrame" name="mainFrame">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
|
@ -41,62 +41,46 @@
|
||||||
<enum>QFrame::Sunken</enum>
|
<enum>QFrame::Sunken</enum>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
<item row="0" column="0" rowspan="4">
|
<property name="topMargin">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<layout class="QHBoxLayout" name="buttonHLayout">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>8</number>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="logoLabel">
|
<widget class="QPushButton" name="readButton">
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>70</width>
|
|
||||||
<height>70</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>70</width>
|
<width>24</width>
|
||||||
<height>70</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="focusPolicy">
|
||||||
<string/>
|
<enum>Qt::NoFocus</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="scaledContents">
|
<property name="toolTip">
|
||||||
|
<string>Toggle Message Read Status</string>
|
||||||
|
</property>
|
||||||
|
<property name="checkable">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="checked">
|
||||||
<set>Qt::AlignCenter</set>
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="flat">
|
||||||
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="verticalSpacer">
|
<widget class="QLabel" name="logoLabel">
|
||||||
<property name="orientation">
|
<property name="text">
|
||||||
<enum>Qt::Vertical</enum>
|
<string>Avatar</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
</widget>
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>40</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<layout class="QHBoxLayout" name="tilteHLayout">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>9</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>9</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="newCommentLabel">
|
<widget class="QLabel" name="newCommentLabel">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
|
@ -135,272 +119,6 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="titleLabel">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
|
||||||
<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">Channel Subject</string>
|
|
||||||
</property>
|
|
||||||
<property name="scaledContents">
|
|
||||||
<bool>false</bool>
|
|
||||||
</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>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="datetimeLabel">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string notr="true">DateTime</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QFrame" name="commentFrame">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true"/>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
|
||||||
<property name="sizeConstraint">
|
|
||||||
<enum>QLayout::SetDefaultConstraint</enum>
|
|
||||||
</property>
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="horizontalSpacing">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="verticalSpacing">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item row="0" column="3">
|
|
||||||
<spacer name="horizontalSpacer_3">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Expanding</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>288</width>
|
|
||||||
<height>17</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<spacer name="verticalSpacer_3">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>40</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="2">
|
|
||||||
<widget class="GxsIdLabel" name="nameLabel">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Name</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="avatarLabel">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>32</width>
|
|
||||||
<height>32</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>32</width>
|
|
||||||
<height>32</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Avatar</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="2" colspan="2">
|
|
||||||
<widget class="QLabel" name="commLabel">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>MS Sans Serif</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Comm value</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="textInteractionFlags">
|
|
||||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<layout class="QHBoxLayout" name="buttonHLayout">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="readButton">
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>24</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="focusPolicy">
|
|
||||||
<enum>Qt::NoFocus</enum>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Toggle Message Read Status</string>
|
|
||||||
</property>
|
|
||||||
<property name="checkable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="checked">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="flat">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="scoreLabel">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>0</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="voteUpButton">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>I like this</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="voteDownButton">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>I dislike this</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="commentButton">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>MS Sans Serif</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Comments</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<spacer name="horizontalSpacer_2">
|
<spacer name="horizontalSpacer_2">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
@ -414,25 +132,6 @@
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="unsubscribeButton">
|
|
||||||
<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="toolTip">
|
|
||||||
<string>Unsubscribe From Channel</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Unsubscribe</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="copyLinkButton">
|
<widget class="QPushButton" name="copyLinkButton">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
|
@ -569,6 +268,200 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="0" column="0" rowspan="4">
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="avatarLabel">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>70</width>
|
||||||
|
<height>70</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>70</width>
|
||||||
|
<height>70</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="scaledContents">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="voteUpButton">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>I like this</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="scoreLabel">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>0</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="voteDownButton">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>I dislike this</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>58</width>
|
||||||
|
<height>10</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QFrame" name="commentFrame">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true"/>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>3</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>3</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item row="0" column="2">
|
||||||
|
<spacer name="horizontalSpacer_3">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Expanding</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>288</width>
|
||||||
|
<height>17</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="3">
|
||||||
|
<widget class="QLabel" name="datetimeLabel">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">DateTime</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0" colspan="2">
|
||||||
|
<widget class="GxsIdLabel" name="nameLabel">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Name</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0" colspan="4">
|
||||||
|
<widget class="QLabel" name="commLabel">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>MS Sans Serif</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Comm value</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="textInteractionFlags">
|
||||||
|
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
|
@ -133,11 +133,11 @@ void ChannelsCommentsItem::setup()
|
||||||
// This is particularly important here because a channel may contain many posts, so duplicating the QImages here is deadly for the
|
// This is particularly important here because a channel may contain many posts, so duplicating the QImages here is deadly for the
|
||||||
// memory.
|
// memory.
|
||||||
|
|
||||||
ui->logoLabel->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/comment.png"));
|
ui->logoLabel->hide();
|
||||||
|
//ui->logoLabel->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/comment.png"));
|
||||||
ui->readButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/message-state-unread.png"));
|
ui->readButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/message-state-unread.png"));
|
||||||
ui->voteUpButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/vote_up.png"));
|
ui->voteUpButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/vote_up.png"));
|
||||||
ui->voteDownButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/vote_down.png"));
|
ui->voteDownButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/vote_down.png"));
|
||||||
ui->commentButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/comment.png"));
|
|
||||||
ui->copyLinkButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/copy.png"));
|
ui->copyLinkButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/copy.png"));
|
||||||
ui->expandButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/down-arrow.png"));
|
ui->expandButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/down-arrow.png"));
|
||||||
ui->readAndClearButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/correct.png"));
|
ui->readAndClearButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/correct.png"));
|
||||||
|
@ -150,8 +150,7 @@ void ChannelsCommentsItem::setup()
|
||||||
mLoaded = false;
|
mLoaded = false;
|
||||||
|
|
||||||
/* clear ui */
|
/* clear ui */
|
||||||
//ui->titleLabel->setText(tr("Loading..."));
|
ui->datetimeLabel->clear();
|
||||||
ui->datetimelabel->clear();
|
|
||||||
|
|
||||||
/* general ones */
|
/* general ones */
|
||||||
connect(ui->expandButton, SIGNAL(clicked()), this, SLOT(toggle()));
|
connect(ui->expandButton, SIGNAL(clicked()), this, SLOT(toggle()));
|
||||||
|
@ -159,13 +158,10 @@ void ChannelsCommentsItem::setup()
|
||||||
|
|
||||||
/* specific */
|
/* specific */
|
||||||
connect(ui->readAndClearButton, SIGNAL(clicked()), this, SLOT(readAndClearItem()));
|
connect(ui->readAndClearButton, SIGNAL(clicked()), this, SLOT(readAndClearItem()));
|
||||||
connect(ui->unsubscribeButton, SIGNAL(clicked()), this, SLOT(unsubscribeChannel()));
|
|
||||||
|
|
||||||
// HACK FOR NOW.
|
// HACK FOR NOW.
|
||||||
ui->commentButton->hide();// hidden until properly enabled.
|
//connect(ui->commentButton, SIGNAL(clicked()), this, SLOT(loadComments()));
|
||||||
connect(ui->commentButton, SIGNAL(clicked()), this, SLOT(loadComments()));
|
|
||||||
connect(ui->copyLinkButton, SIGNAL(clicked()), this, SLOT(copyMessageLink()));
|
connect(ui->copyLinkButton, SIGNAL(clicked()), this, SLOT(copyMessageLink()));
|
||||||
|
|
||||||
connect(ui->readButton, SIGNAL(toggled(bool)), this, SLOT(readToggled(bool)));
|
connect(ui->readButton, SIGNAL(toggled(bool)), this, SLOT(readToggled(bool)));
|
||||||
|
|
||||||
// hide voting buttons, backend is not implemented yet
|
// hide voting buttons, backend is not implemented yet
|
||||||
|
@ -178,9 +174,6 @@ void ChannelsCommentsItem::setup()
|
||||||
|
|
||||||
// hide expand button, replies is not implemented yet
|
// hide expand button, replies is not implemented yet
|
||||||
ui->expandButton->hide();
|
ui->expandButton->hide();
|
||||||
ui->unsubscribeButton->hide();
|
|
||||||
|
|
||||||
//ui->titleLabel->setMinimumWidth(100);
|
|
||||||
|
|
||||||
ui->mainFrame->setProperty("new", false);
|
ui->mainFrame->setProperty("new", false);
|
||||||
ui->mainFrame->style()->unpolish(ui->mainFrame);
|
ui->mainFrame->style()->unpolish(ui->mainFrame);
|
||||||
|
@ -312,12 +305,12 @@ void ChannelsCommentsItem::loadMessage()
|
||||||
|
|
||||||
RsQThreadUtils::postToObject( [cmt,this]()
|
RsQThreadUtils::postToObject( [cmt,this]()
|
||||||
{
|
{
|
||||||
uint32_t autorized_lines = (int)floor((ui->logoLabel->height() - ui->titleLabel->height() - ui->buttonHLayout->sizeHint().height())/QFontMetricsF(ui->subjectLabel->font()).height());
|
uint32_t autorized_lines = (int)floor((ui->logoLabel->height() - ui->buttonHLayout->sizeHint().height())/QFontMetricsF(ui->subjectLabel->font()).height());
|
||||||
|
|
||||||
ui->commLabel->setText(RsHtml().formatText(NULL, RsStringUtil::CopyLines(QString::fromUtf8(cmt.mComment.c_str()), autorized_lines), RSHTML_FORMATTEXT_EMBED_LINKS));
|
ui->commLabel->setText(RsHtml().formatText(NULL, RsStringUtil::CopyLines(QString::fromUtf8(cmt.mComment.c_str()), autorized_lines), RSHTML_FORMATTEXT_EMBED_LINKS));
|
||||||
|
|
||||||
ui->nameLabel->setId(cmt.mMeta.mAuthorId);
|
ui->nameLabel->setId(cmt.mMeta.mAuthorId);
|
||||||
ui->datetimelabel->setText(DateTime::formatLongDateTime(cmt.mMeta.mPublishTs));
|
ui->datetimeLabel->setText(DateTime::formatLongDateTime(cmt.mMeta.mPublishTs));
|
||||||
|
|
||||||
RsIdentityDetails idDetails ;
|
RsIdentityDetails idDetails ;
|
||||||
rsIdentity->getIdDetails(cmt.mMeta.mAuthorId,idDetails);
|
rsIdentity->getIdDetails(cmt.mMeta.mAuthorId,idDetails);
|
||||||
|
@ -381,7 +374,7 @@ void ChannelsCommentsItem::loadComment()
|
||||||
else if(comNb > 1)
|
else if(comNb > 1)
|
||||||
sComButText = tr("Comments ").append("(%1)").arg(comNb);
|
sComButText = tr("Comments ").append("(%1)").arg(comNb);
|
||||||
|
|
||||||
ui->commentButton->setText(sComButText);
|
//ui->commentButton->setText(sComButText);
|
||||||
|
|
||||||
}, this );
|
}, this );
|
||||||
});
|
});
|
||||||
|
@ -403,7 +396,7 @@ void ChannelsCommentsItem::fill()
|
||||||
|
|
||||||
mInFill = true;
|
mInFill = true;
|
||||||
|
|
||||||
QString title;
|
//QString title;
|
||||||
//float f = QFontMetricsF(font()).height()/14.0 ;
|
//float f = QFontMetricsF(font()).height()/14.0 ;
|
||||||
|
|
||||||
if (!mIsHome)
|
if (!mIsHome)
|
||||||
|
@ -421,14 +414,14 @@ void ChannelsCommentsItem::fill()
|
||||||
|
|
||||||
if (IS_GROUP_SUBSCRIBED(mGroupMeta.mSubscribeFlags) || IS_GROUP_ADMIN(mGroupMeta.mSubscribeFlags))
|
if (IS_GROUP_SUBSCRIBED(mGroupMeta.mSubscribeFlags) || IS_GROUP_ADMIN(mGroupMeta.mSubscribeFlags))
|
||||||
{
|
{
|
||||||
ui->unsubscribeButton->setEnabled(true);
|
//ui->unsubscribeButton->setEnabled(true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ui->unsubscribeButton->setEnabled(false);
|
//ui->unsubscribeButton->setEnabled(false);
|
||||||
}
|
}
|
||||||
ui->readButton->hide();
|
ui->readButton->hide();
|
||||||
ui->titleLabel->hide();
|
//ui->titleLabel->hide();
|
||||||
|
|
||||||
if (IS_MSG_NEW(mPost.mMeta.mMsgStatus)) {
|
if (IS_MSG_NEW(mPost.mMeta.mMsgStatus)) {
|
||||||
mCloseOnRead = true;
|
mCloseOnRead = true;
|
||||||
|
@ -439,7 +432,7 @@ void ChannelsCommentsItem::fill()
|
||||||
/* subject */
|
/* subject */
|
||||||
//ui->titleLabel->setText(QString::fromUtf8(mPost.mMeta.mMsgName.c_str()));
|
//ui->titleLabel->setText(QString::fromUtf8(mPost.mMeta.mMsgName.c_str()));
|
||||||
|
|
||||||
uint32_t autorized_lines = (int)floor((ui->logoLabel->height() - ui->titleLabel->height() - ui->buttonHLayout->sizeHint().height())/QFontMetricsF(ui->subjectLabel->font()).height());
|
uint32_t autorized_lines = (int)floor((ui->logoLabel->height() - ui->buttonHLayout->sizeHint().height())/QFontMetricsF(ui->subjectLabel->font()).height());
|
||||||
|
|
||||||
// fill first 4 lines of message. (csoler) Disabled the replacement of smileys and links, because the cost is too crazy
|
// fill first 4 lines of message. (csoler) Disabled the replacement of smileys and links, because the cost is too crazy
|
||||||
//ui->subjectLabel->setText(RsHtml().formatText(NULL, RsStringUtil::CopyLines(QString::fromUtf8(mPost.mMsg.c_str()), autorized_lines), RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS));
|
//ui->subjectLabel->setText(RsHtml().formatText(NULL, RsStringUtil::CopyLines(QString::fromUtf8(mPost.mMsg.c_str()), autorized_lines), RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS));
|
||||||
|
@ -451,12 +444,10 @@ void ChannelsCommentsItem::fill()
|
||||||
|
|
||||||
/* disable buttons: deletion facility not enabled with cache services yet */
|
/* disable buttons: deletion facility not enabled with cache services yet */
|
||||||
ui->clearButton->setEnabled(false);
|
ui->clearButton->setEnabled(false);
|
||||||
ui->unsubscribeButton->setEnabled(false);
|
|
||||||
ui->clearButton->hide();
|
ui->clearButton->hide();
|
||||||
ui->readAndClearButton->hide();
|
ui->readAndClearButton->hide();
|
||||||
ui->unsubscribeButton->hide();
|
|
||||||
ui->copyLinkButton->show();
|
ui->copyLinkButton->show();
|
||||||
ui->titleLabel->hide();
|
//ui->titleLabel->hide();
|
||||||
|
|
||||||
if (IS_GROUP_SUBSCRIBED(mGroupMeta.mSubscribeFlags) || IS_GROUP_ADMIN(mGroupMeta.mSubscribeFlags))
|
if (IS_GROUP_SUBSCRIBED(mGroupMeta.mSubscribeFlags) || IS_GROUP_ADMIN(mGroupMeta.mSubscribeFlags))
|
||||||
{
|
{
|
||||||
|
@ -475,7 +466,7 @@ void ChannelsCommentsItem::fill()
|
||||||
// differences between Feed or Top of Comment.
|
// differences between Feed or Top of Comment.
|
||||||
if (mFeedHolder)
|
if (mFeedHolder)
|
||||||
{
|
{
|
||||||
ui->commentButton->show();
|
//ui->commentButton->show();
|
||||||
|
|
||||||
// Not yet functional
|
// Not yet functional
|
||||||
/*if (mPost.mCommentCount)
|
/*if (mPost.mCommentCount)
|
||||||
|
@ -493,7 +484,7 @@ void ChannelsCommentsItem::fill()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ui->commentButton->hide();
|
//ui->commentButton->hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
// disable voting buttons - if they have already voted.
|
// disable voting buttons - if they have already voted.
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>755</width>
|
<width>755</width>
|
||||||
<height>201</height>
|
<height>173</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_3">
|
<layout class="QGridLayout" name="gridLayout_3">
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
<property name="bottomMargin">
|
<property name="bottomMargin">
|
||||||
<number>1</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QFrame" name="mainFrame">
|
<widget class="QFrame" name="mainFrame">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
|
@ -41,62 +41,46 @@
|
||||||
<enum>QFrame::Sunken</enum>
|
<enum>QFrame::Sunken</enum>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
<item row="0" column="0" rowspan="4">
|
<property name="topMargin">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<layout class="QHBoxLayout" name="buttonHLayout">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>8</number>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="logoLabel">
|
<widget class="QPushButton" name="readButton">
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>70</width>
|
|
||||||
<height>70</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>70</width>
|
<width>24</width>
|
||||||
<height>70</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="focusPolicy">
|
||||||
<string/>
|
<enum>Qt::NoFocus</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="scaledContents">
|
<property name="toolTip">
|
||||||
|
<string>Toggle Message Read Status</string>
|
||||||
|
</property>
|
||||||
|
<property name="checkable">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="checked">
|
||||||
<set>Qt::AlignCenter</set>
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="flat">
|
||||||
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="verticalSpacer">
|
<widget class="QLabel" name="logoLabel">
|
||||||
<property name="orientation">
|
<property name="text">
|
||||||
<enum>Qt::Vertical</enum>
|
<string>Avatar</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
</widget>
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>40</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<layout class="QHBoxLayout" name="tilteHLayout">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>9</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>9</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="newCommentLabel">
|
<widget class="QLabel" name="newCommentLabel">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
|
@ -135,272 +119,6 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="titleLabel">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
|
||||||
<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">Channel Subject</string>
|
|
||||||
</property>
|
|
||||||
<property name="scaledContents">
|
|
||||||
<bool>false</bool>
|
|
||||||
</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>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="datetimelabel">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string notr="true">DateTime</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QFrame" name="commentFrame">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true"/>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
|
||||||
<property name="sizeConstraint">
|
|
||||||
<enum>QLayout::SetDefaultConstraint</enum>
|
|
||||||
</property>
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="horizontalSpacing">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="verticalSpacing">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item row="0" column="3">
|
|
||||||
<spacer name="horizontalSpacer_3">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Expanding</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>288</width>
|
|
||||||
<height>17</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<spacer name="verticalSpacer_3">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>40</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="2">
|
|
||||||
<widget class="GxsIdLabel" name="nameLabel">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Name</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="avatarLabel">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>32</width>
|
|
||||||
<height>32</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>32</width>
|
|
||||||
<height>32</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Avatar</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="2" colspan="2">
|
|
||||||
<widget class="QLabel" name="commLabel">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>MS Sans Serif</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Comm value</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="textInteractionFlags">
|
|
||||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<layout class="QHBoxLayout" name="buttonHLayout">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="readButton">
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>24</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="focusPolicy">
|
|
||||||
<enum>Qt::NoFocus</enum>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Toggle Message Read Status</string>
|
|
||||||
</property>
|
|
||||||
<property name="checkable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="checked">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="flat">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="scoreLabel">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>0</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="voteUpButton">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>I like this</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="voteDownButton">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>I dislike this</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="commentButton">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>MS Sans Serif</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Comments</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<spacer name="horizontalSpacer_2">
|
<spacer name="horizontalSpacer_2">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
@ -414,25 +132,6 @@
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="unsubscribeButton">
|
|
||||||
<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="toolTip">
|
|
||||||
<string>Unsubscribe From Channel</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Unsubscribe</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="copyLinkButton">
|
<widget class="QPushButton" name="copyLinkButton">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
|
@ -569,6 +268,200 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="0" column="0" rowspan="4">
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="avatarLabel">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>70</width>
|
||||||
|
<height>70</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>70</width>
|
||||||
|
<height>70</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="scaledContents">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="voteUpButton">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>I like this</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="scoreLabel">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>0</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="voteDownButton">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>I dislike this</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>58</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1" rowspan="2">
|
||||||
|
<widget class="QFrame" name="commentFrame">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true"/>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>3</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>3</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item row="0" column="2">
|
||||||
|
<spacer name="horizontalSpacer_3">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Expanding</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>288</width>
|
||||||
|
<height>17</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="3">
|
||||||
|
<widget class="QLabel" name="datetimeLabel">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">DateTime</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0" colspan="2">
|
||||||
|
<widget class="GxsIdLabel" name="nameLabel">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Name</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0" colspan="4">
|
||||||
|
<widget class="QLabel" name="commLabel">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>MS Sans Serif</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Comm value</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="textInteractionFlags">
|
||||||
|
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
<number>1</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QFrame" name="frame">
|
<widget class="QFrame" name="mainFrame">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
<number>1</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QFrame" name="frame">
|
<widget class="QFrame" name="mainFrame">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
|
@ -310,7 +310,7 @@
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="pixmap">
|
<property name="pixmap">
|
||||||
<pixmap resource="../images.qrc">:/images/contacts24.png</pixmap>
|
<pixmap>:/images/contacts24.png</pixmap>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
<number>1</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QFrame" name="frame">
|
<widget class="QFrame" name="mainFrame">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
|
@ -310,7 +310,7 @@
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="pixmap">
|
<property name="pixmap">
|
||||||
<pixmap resource="../images.qrc">:/images/contacts24.png</pixmap>
|
<pixmap>:/images/contacts24.png</pixmap>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
|
@ -470,9 +470,9 @@ void GxsForumMsgItem::toggle()
|
||||||
|
|
||||||
void GxsForumMsgItem::setReadStatus(bool isNew, bool /*isUnread*/)
|
void GxsForumMsgItem::setReadStatus(bool isNew, bool /*isUnread*/)
|
||||||
{
|
{
|
||||||
ui->frame->setProperty("new", isNew);
|
ui->mainFrame->setProperty("new", isNew);
|
||||||
ui->frame->style()->unpolish(ui->frame);
|
ui->mainFrame->style()->unpolish(ui->mainFrame);
|
||||||
ui->frame->style()->polish( ui->frame);
|
ui->mainFrame->style()->polish( ui->mainFrame);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*********** SPECIFIC FUNCTIONS ***********************/
|
/*********** SPECIFIC FUNCTIONS ***********************/
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
<number>1</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="2" column="0">
|
<item row="2" column="0">
|
||||||
<widget class="QFrame" name="frame">
|
<widget class="QFrame" name="mainFrame">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
<number>1</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QFrame" name="frame">
|
<widget class="QFrame" name="mainFrame">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
<number>1</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QFrame" name="frame">
|
<widget class="QFrame" name="mainFrame">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
<string><html><head/><body><p>This warning is here to protect you against traffic forwarding attacks. In such a case, the friend you're connected to will not see your external IP, but the attacker's IP. </p><p><br/></p><p>However, if you just changed IPs for some reason (some ISPs regularly force change IPs) this warning just tells you that a friend connected to the new IP before Retroshare figured out the IP changed. Nothing's wrong in this case.</p><p><br/></p><p>You can easily suppress false warnings by white-listing your own IPs (e.g. the range of your ISP), or by completely disabling these warnings in Options-&gt;Notify-&gt;News Feed.</p></body></html></string>
|
<string><html><head/><body><p>This warning is here to protect you against traffic forwarding attacks. In such a case, the friend you're connected to will not see your external IP, but the attacker's IP. </p><p><br/></p><p>However, if you just changed IPs for some reason (some ISPs regularly force change IPs) this warning just tells you that a friend connected to the new IP before Retroshare figured out the IP changed. Nothing's wrong in this case.</p><p><br/></p><p>You can easily suppress false warnings by white-listing your own IPs (e.g. the range of your ISP), or by completely disabling these warnings in Options-&gt;Notify-&gt;News Feed.</p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="autoFillBackground">
|
<property name="autoFillBackground">
|
||||||
<bool>false</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="frameShape">
|
<property name="frameShape">
|
||||||
<enum>QFrame::Box</enum>
|
<enum>QFrame::Box</enum>
|
||||||
|
|
|
@ -277,7 +277,7 @@ GxsForumThreadWidget::GxsForumThreadWidget(const RsGxsGroupId &forumId, QWidget
|
||||||
connect(ui->versions_CB, SIGNAL(currentIndexChanged(int)), this, SLOT(changedVersion()));
|
connect(ui->versions_CB, SIGNAL(currentIndexChanged(int)), this, SLOT(changedVersion()));
|
||||||
connect(ui->threadTreeWidget, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(threadListCustomPopupMenu(QPoint)));
|
connect(ui->threadTreeWidget, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(threadListCustomPopupMenu(QPoint)));
|
||||||
connect(ui->postText, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(contextMenuTextBrowser(QPoint)));
|
connect(ui->postText, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(contextMenuTextBrowser(QPoint)));
|
||||||
connect(ui->forumName, SIGNAL(clicked()), this, SLOT(showForumInfo()));
|
connect(ui->forumName, SIGNAL(clicked(QPoint)), this, SLOT(showForumInfo()));
|
||||||
|
|
||||||
ui->subscribeToolButton->hide() ;
|
ui->subscribeToolButton->hide() ;
|
||||||
connect(ui->subscribeToolButton, SIGNAL(subscribe(bool)), this, SLOT(subscribeGroup(bool)));
|
connect(ui->subscribeToolButton, SIGNAL(subscribe(bool)), this, SLOT(subscribeGroup(bool)));
|
||||||
|
@ -1068,6 +1068,11 @@ void GxsForumThreadWidget::updateForumDescription(bool success)
|
||||||
forum_description += QString("<b>%1: \t</b>%2<br/>").arg(tr("Synchronization"),getDurationString( rsGxsForums->getSyncPeriod(group.mMeta.mGroupId)/86400 )) ;
|
forum_description += QString("<b>%1: \t</b>%2<br/>").arg(tr("Synchronization"),getDurationString( rsGxsForums->getSyncPeriod(group.mMeta.mGroupId)/86400 )) ;
|
||||||
forum_description += QString("<b>%1: \t</b>%2<br/>").arg(tr("Storage"),getDurationString( rsGxsForums->getStoragePeriod(group.mMeta.mGroupId)/86400));
|
forum_description += QString("<b>%1: \t</b>%2<br/>").arg(tr("Storage"),getDurationString( rsGxsForums->getStoragePeriod(group.mMeta.mGroupId)/86400));
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(group.mMeta.mLastSeen > 0)
|
||||||
|
forum_description += QString("<b>%1: \t</b>%2 days ago<br/>").arg(tr("Last seen at friends:"),QString::number((time(nullptr) - group.mMeta.mLastSeen)/86400));
|
||||||
|
}
|
||||||
|
|
||||||
QString distrib_string = tr("[unknown]");
|
QString distrib_string = tr("[unknown]");
|
||||||
switch(static_cast<RsGxsCircleType>(group.mMeta.mCircleType))
|
switch(static_cast<RsGxsCircleType>(group.mMeta.mCircleType))
|
||||||
|
|
|
@ -112,15 +112,18 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="forumName">
|
<widget class="StyledElidedLabel" name="forumName">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string><html><head/><body><p>Click here to clear current selected thread and display more information about this forum.</p></body></html></string>
|
<string><html><head/><body><p>Click here to clear current selected thread and display more information about this forum.</p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>PushButton</string>
|
<string>Forum Name</string>
|
||||||
</property>
|
|
||||||
<property name="flat">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -130,11 +133,11 @@
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeType">
|
<property name="sizeType">
|
||||||
<enum>QSizePolicy::MinimumExpanding</enum>
|
<enum>QSizePolicy::Fixed</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>0</width>
|
<width>1</width>
|
||||||
<height>0</height>
|
<height>0</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
@ -527,6 +530,11 @@
|
||||||
<extends>QLineEdit</extends>
|
<extends>QLineEdit</extends>
|
||||||
<header>gui/common/LineEditClear.h</header>
|
<header>gui/common/LineEditClear.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>StyledElidedLabel</class>
|
||||||
|
<extends>QLabel</extends>
|
||||||
|
<header>gui/common/StyledElidedLabel.h</header>
|
||||||
|
</customwidget>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>SubscribeToolButton</class>
|
<class>SubscribeToolButton</class>
|
||||||
<extends>QToolButton</extends>
|
<extends>QToolButton</extends>
|
||||||
|
@ -545,8 +553,8 @@
|
||||||
</customwidget>
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../images.qrc"/>
|
|
||||||
<include location="../icons.qrc"/>
|
<include location="../icons.qrc"/>
|
||||||
|
<include location="../images.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
|
|
@ -392,7 +392,7 @@ void ImHistoryBrowser::customContextMenuRequested(QPoint /*pos*/)
|
||||||
|
|
||||||
QAction *sendItem = NULL;
|
QAction *sendItem = NULL;
|
||||||
if (textEdit) {
|
if (textEdit) {
|
||||||
sendItem = new QAction(tr("Send"), &contextMnu);
|
sendItem = new QAction(tr("Quote"), &contextMnu);
|
||||||
if (currentItem) {
|
if (currentItem) {
|
||||||
connect(sendItem, SIGNAL(triggered()), this, SLOT(sendMessage()));
|
connect(sendItem, SIGNAL(triggered()), this, SLOT(sendMessage()));
|
||||||
} else {
|
} else {
|
||||||
|
@ -427,23 +427,7 @@ void ImHistoryBrowser::customContextMenuRequested(QPoint /*pos*/)
|
||||||
|
|
||||||
void ImHistoryBrowser::copyMessage()
|
void ImHistoryBrowser::copyMessage()
|
||||||
{
|
{
|
||||||
QListWidgetItem *currentItem = ui.listWidget->currentItem();
|
QApplication::clipboard()->setText(getCurrentItemsQuotedText());
|
||||||
if (currentItem) {
|
|
||||||
uint32_t msgId = currentItem->data(ROLE_MSGID).toString().toInt();
|
|
||||||
HistoryMsg msg;
|
|
||||||
if (rsHistory->getMessage(msgId, msg)) {
|
|
||||||
RsIdentityDetails details;
|
|
||||||
QString name = (rsIdentity->getIdDetails(RsGxsId(msg.peerName), details))
|
|
||||||
? QString::fromUtf8(details.mNickname.c_str())
|
|
||||||
: QString::fromUtf8(msg.peerName.c_str());
|
|
||||||
QDateTime date = msg.incoming
|
|
||||||
? QDateTime::fromTime_t(msg.sendTime)
|
|
||||||
: QDateTime::fromTime_t(msg.recvTime);
|
|
||||||
QTextDocument doc;
|
|
||||||
doc.setHtml(QString::fromUtf8(msg.message.c_str()));
|
|
||||||
QApplication::clipboard()->setText("> " + date.toString() + " " + name + ":" + doc.toPlainText());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ImHistoryBrowser::removeMessages()
|
void ImHistoryBrowser::removeMessages()
|
||||||
|
@ -462,19 +446,36 @@ void ImHistoryBrowser::clearHistory()
|
||||||
void ImHistoryBrowser::sendMessage()
|
void ImHistoryBrowser::sendMessage()
|
||||||
{
|
{
|
||||||
if (textEdit) {
|
if (textEdit) {
|
||||||
|
QString msg =getCurrentItemsQuotedText();
|
||||||
|
QTextCursor cursor = textEdit->textCursor();
|
||||||
|
cursor.movePosition(QTextCursor::End);
|
||||||
|
if (cursor.columnNumber()>0)
|
||||||
|
cursor.insertText("\n");
|
||||||
|
cursor.insertText(msg);
|
||||||
|
textEdit->setFocus();
|
||||||
|
close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
QString ImHistoryBrowser::getCurrentItemsQuotedText()
|
||||||
|
{
|
||||||
QListWidgetItem *currentItem = ui.listWidget->currentItem();
|
QListWidgetItem *currentItem = ui.listWidget->currentItem();
|
||||||
if (currentItem) {
|
if (currentItem) {
|
||||||
uint32_t msgId = currentItem->data(ROLE_MSGID).toString().toInt();
|
uint32_t msgId = currentItem->data(ROLE_MSGID).toString().toInt();
|
||||||
HistoryMsg msg;
|
HistoryMsg msg;
|
||||||
if (rsHistory->getMessage(msgId, msg)) {
|
if (rsHistory->getMessage(msgId, msg)) {
|
||||||
textEdit->clear();
|
RsIdentityDetails details;
|
||||||
textEdit->setText(QString::fromUtf8(msg.message.c_str()));
|
QString name = (rsIdentity->getIdDetails(RsGxsId(msg.peerName), details))
|
||||||
textEdit->setFocus();
|
? QString::fromUtf8(details.mNickname.c_str())
|
||||||
QTextCursor cursor = textEdit->textCursor();
|
: QString::fromUtf8(msg.peerName.c_str());
|
||||||
cursor.movePosition(QTextCursor::End);
|
QDateTime date = msg.incoming
|
||||||
textEdit->setTextCursor(cursor);
|
? QDateTime::fromTime_t(msg.sendTime)
|
||||||
close();
|
: QDateTime::fromTime_t(msg.recvTime);
|
||||||
}
|
QTextDocument doc;
|
||||||
|
doc.setHtml(QString::fromUtf8(msg.message.c_str()));
|
||||||
|
|
||||||
|
return "> " + date.toString() + " " + name + ":" + doc.toPlainText().replace("\n","\n> ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return QString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,6 +73,7 @@ private:
|
||||||
void filterItems(const QString &text, QListWidgetItem *item = NULL);
|
void filterItems(const QString &text, QListWidgetItem *item = NULL);
|
||||||
|
|
||||||
void getSelectedItems(std::list<uint32_t> &items);
|
void getSelectedItems(std::list<uint32_t> &items);
|
||||||
|
QString getCurrentItemsQuotedText();
|
||||||
|
|
||||||
ImHistoryBrowserCreateItemsThread *m_createThread;
|
ImHistoryBrowserCreateItemsThread *m_createThread;
|
||||||
|
|
||||||
|
|
BIN
retroshare-gui/src/gui/images/logo/logo_256.ico
Normal file
BIN
retroshare-gui/src/gui/images/logo/logo_256.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 117 KiB |
|
@ -2,7 +2,7 @@
|
||||||
#include "retroshare_win.rc.h"
|
#include "retroshare_win.rc.h"
|
||||||
#include "retroshare/rsversion.h"
|
#include "retroshare/rsversion.h"
|
||||||
|
|
||||||
IDI_ICON1 ICON "logo/logo_64.ico"
|
IDI_ICON1 ICON "logo/logo_256.ico"
|
||||||
|
|
||||||
#define STRINGIZER(version) #version
|
#define STRINGIZER(version) #version
|
||||||
#define VERSION_STRING(major,minor,mini,extra) STRINGIZER(major) "." STRINGIZER(minor) "." STRINGIZER(mini) STRINGIZER(extra)
|
#define VERSION_STRING(major,minor,mini,extra) STRINGIZER(major) "." STRINGIZER(minor) "." STRINGIZER(mini) STRINGIZER(extra)
|
||||||
|
|
|
@ -373,10 +373,12 @@ uint32_t RsMessageModel::updateFilterStatus(ForumModelIndex /*i*/,int /*column*/
|
||||||
|
|
||||||
void RsMessageModel::setFilter(FilterType filter_type, const QStringList& strings)
|
void RsMessageModel::setFilter(FilterType filter_type, const QStringList& strings)
|
||||||
{
|
{
|
||||||
|
#ifdef DEBUG_MESSAGE_MODEL
|
||||||
std::cerr << "Setting filter to filter_type=" << int(filter_type) << " and strings to " ;
|
std::cerr << "Setting filter to filter_type=" << int(filter_type) << " and strings to " ;
|
||||||
foreach(const QString& str,strings)
|
foreach(const QString& str,strings)
|
||||||
std::cerr << "\"" << str.toStdString() << "\" " ;
|
std::cerr << "\"" << str.toStdString() << "\" " ;
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
preMods();
|
preMods();
|
||||||
|
|
||||||
|
@ -484,7 +486,6 @@ QVariant RsMessageModel::displayRole(const Rs::Msgs::MsgInfoSummary& fmpe,int co
|
||||||
QString text;
|
QString text;
|
||||||
|
|
||||||
// build tag names
|
// build tag names
|
||||||
std::map<uint32_t, std::pair<std::string, uint32_t> >::iterator Tag;
|
|
||||||
for (auto tagit = tagInfo.tagIds.begin(); tagit != tagInfo.tagIds.end(); ++tagit)
|
for (auto tagit = tagInfo.tagIds.begin(); tagit != tagInfo.tagIds.end(); ++tagit)
|
||||||
{
|
{
|
||||||
if (!text.isNull())
|
if (!text.isNull())
|
||||||
|
@ -495,7 +496,7 @@ QVariant RsMessageModel::displayRole(const Rs::Msgs::MsgInfoSummary& fmpe,int co
|
||||||
if (Tag != Tags.types.end())
|
if (Tag != Tags.types.end())
|
||||||
text += TagDefs::name(Tag->first, Tag->second.first);
|
text += TagDefs::name(Tag->first, Tag->second.first);
|
||||||
else
|
else
|
||||||
std::cerr << "(WW) unknown tag " << (int)Tag->first << " in message " << fmpe.msgId << std::endl;
|
RS_WARN("Unknown tag ", (int)Tag->first, " in message ", fmpe.msgId);
|
||||||
}
|
}
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
@ -514,7 +515,6 @@ QVariant RsMessageModel::displayRole(const Rs::Msgs::MsgInfoSummary& fmpe,int co
|
||||||
return QVariant("[ TODO ]");
|
return QVariant("[ TODO ]");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return QVariant("[ERROR]");
|
return QVariant("[ERROR]");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -625,11 +625,12 @@ void RsMessageModel::setQuickViewFilter(QuickViewFilter fn)
|
||||||
{
|
{
|
||||||
if(fn != mQuickViewFilter)
|
if(fn != mQuickViewFilter)
|
||||||
{
|
{
|
||||||
|
#ifdef DEBUG_MESSAGE_MODEL
|
||||||
std::cerr << "Changing new quickview filter to " << fn << std::endl;
|
std::cerr << "Changing new quickview filter to " << fn << std::endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
preMods();
|
|
||||||
mQuickViewFilter = fn ;
|
mQuickViewFilter = fn ;
|
||||||
postMods();
|
updateMessages();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -717,8 +718,10 @@ QModelIndex RsMessageModel::getIndexOfMessage(const std::string& mid) const
|
||||||
return createIndex(it->second,0,ref);
|
return createIndex(it->second,0,ref);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef DEBUG_MESSAGE_MODEL
|
||||||
void RsMessageModel::debug_dump() const
|
void RsMessageModel::debug_dump() const
|
||||||
{
|
{
|
||||||
for(auto it(mMessages.begin());it!=mMessages.end();++it)
|
for(auto& it : mMessages)
|
||||||
std::cerr << "Id: " << it->msgId << ": from " << it->srcId << ": flags=" << it->msgflags << ": title=\"" << it->title << "\"" << std::endl;
|
std::cerr << "Id: " << it.msgId << ": from " << it.srcId << ": flags=" << it.msgflags << ": title=\"" << it.title << "\"" << std::endl;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
|
@ -140,11 +140,13 @@ public:
|
||||||
QVariant textColorRole (const Rs::Msgs::MsgInfoSummary& fmpe, int col) const;
|
QVariant textColorRole (const Rs::Msgs::MsgInfoSummary& fmpe, int col) const;
|
||||||
QVariant backgroundRole(const Rs::Msgs::MsgInfoSummary& fmpe, int col) const;
|
QVariant backgroundRole(const Rs::Msgs::MsgInfoSummary& fmpe, int col) const;
|
||||||
|
|
||||||
|
#ifdef DEBUG_MESSAGE_MODEL
|
||||||
/*!
|
/*!
|
||||||
* \brief debug_dump
|
* \brief debug_dump
|
||||||
* Dumps the hierarchy of posts in the terminal, to allow checking whether the internal representation is correct.
|
* Dumps the hierarchy of posts in the terminal, to allow checking whether the internal representation is correct.
|
||||||
*/
|
*/
|
||||||
void debug_dump() const;
|
void debug_dump() const;
|
||||||
|
#endif
|
||||||
|
|
||||||
// control over message flags and so on. This is handled by the model because it will allow it to update accordingly
|
// control over message flags and so on. This is handled by the model because it will allow it to update accordingly
|
||||||
void setMsgReadStatus(const QModelIndex& i, bool read_status);
|
void setMsgReadStatus(const QModelIndex& i, bool read_status);
|
||||||
|
|
|
@ -797,29 +797,12 @@ ConnectFriendWizard QPlainTextEdit#friendCertEdit {
|
||||||
background: white;
|
background: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
HomePage QPlainTextEdit#userCertEdit {
|
|
||||||
|
|
||||||
background: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
HomePage QFrame#addframe{
|
|
||||||
border: 2px solid #0099cc;
|
|
||||||
border-radius: 6px;
|
|
||||||
background: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
ConnectFriendWizard QFrame#friendFrame {
|
ConnectFriendWizard QFrame#friendFrame {
|
||||||
border: 2px solid #0099cc;
|
border: 2px solid #0099cc;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
background: white;
|
background: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
HomePage QFrame#helpframe{
|
|
||||||
border: 2px solid #009933;
|
|
||||||
border-radius: 6px;
|
|
||||||
background: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
StartDialog QPushButton#loadButton {
|
StartDialog QPushButton#loadButton {
|
||||||
border-image: url(:/images/btn_blue.png) 4;
|
border-image: url(:/images/btn_blue.png) 4;
|
||||||
border-width: 4;
|
border-width: 4;
|
||||||
|
@ -884,7 +867,9 @@ GxsForumThreadWidget QToolButton#subscribeToolButton:hover {
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
GxsForumMsgItem QFrame#frame{
|
GxsForumMsgItem QFrame#mainFrame, PeerItem QFrame#mainFrame, GxsForumGroupItem QFrame#mainFrame,
|
||||||
|
GxsChannelGroupItem QFrame#mainFrame, MsgItem QFrame#mainFrame, ChatMsgItem QFrame#mainFrame
|
||||||
|
SecurityIpItem QFrame#mainFrame {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -958,6 +943,35 @@ PostedGroupItem QFrame#frame {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HomePage QLabel#userCertLabel {
|
||||||
|
color: #0099cc;
|
||||||
|
font: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
HomePage QPlainTextEdit#userCertEdit {
|
||||||
|
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
HomePage QToolButton#addButton {
|
||||||
|
font: bold;
|
||||||
|
font-size: 15pt;
|
||||||
|
color: white;
|
||||||
|
background: #0099cc;
|
||||||
|
border-radius: 4px;
|
||||||
|
max-height: 27px;
|
||||||
|
min-width: 4em;
|
||||||
|
padding: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
HomePage QToolButton#addButton:hover {
|
||||||
|
background: #03b1f3;
|
||||||
|
border-radius: 4px;
|
||||||
|
min-width: 4em;
|
||||||
|
padding: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
PostedItem QFrame#mainFrame {
|
PostedItem QFrame#mainFrame {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
}
|
}
|
||||||
|
@ -1190,4 +1204,3 @@ BoardsCommentsItem QLabel#subjectLabel, QLabel#titleLabel , QLabel#nameLabel {
|
||||||
font: 14px;
|
font: 14px;
|
||||||
font: bold;
|
font: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,11 @@ ChatWidget QLabel#titleLabel, ChatWidget QLabel#statusLabel
|
||||||
qproperty-fontSizeFactor: 125;
|
qproperty-fontSizeFactor: 125;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ChatWidget QFrame#pluginTitleFrame, QFrame#pluginTopFrame
|
||||||
|
{
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
FriendsDialog QLabel#nicknameLabel
|
FriendsDialog QLabel#nicknameLabel
|
||||||
{
|
{
|
||||||
qproperty-fontSizeFactor: 200;
|
qproperty-fontSizeFactor: 200;
|
||||||
|
@ -149,6 +154,13 @@ ForumsDialog, GxsForumThreadWidget
|
||||||
qproperty-backgroundColorFiltered: rgb(255, 240, 210);
|
qproperty-backgroundColorFiltered: rgb(255, 240, 210);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GxsForumThreadWidget StyledElidedLabel#forumName
|
||||||
|
{
|
||||||
|
padding: 2px;
|
||||||
|
font: bold;
|
||||||
|
font-size: 1.5em;
|
||||||
|
}
|
||||||
|
|
||||||
GroupTreeWidget
|
GroupTreeWidget
|
||||||
{
|
{
|
||||||
qproperty-textColorCategory: rgb(79, 79, 79);
|
qproperty-textColorCategory: rgb(79, 79, 79);
|
||||||
|
|
|
@ -136,6 +136,14 @@ void AppearancePage::updateRbtPageOnToolBar()
|
||||||
{
|
{
|
||||||
Settings->setPageButtonLoc(!ui.mainPageButtonType_CB->currentIndex());
|
Settings->setPageButtonLoc(!ui.mainPageButtonType_CB->currentIndex());
|
||||||
Settings->setActionButtonLoc(!ui.mainPageButtonType_CB->currentIndex());
|
Settings->setActionButtonLoc(!ui.mainPageButtonType_CB->currentIndex());
|
||||||
|
|
||||||
|
int index = ui.mainPageButtonType_CB->currentIndex();
|
||||||
|
if (index != 0) {
|
||||||
|
ui.cmboTollButtonsStyle->hide();
|
||||||
|
}else {
|
||||||
|
ui.cmboTollButtonsStyle->show();
|
||||||
|
}
|
||||||
|
|
||||||
NotifyQt::getInstance()->notifySettingsChanged();
|
NotifyQt::getInstance()->notifySettingsChanged();
|
||||||
}
|
}
|
||||||
void AppearancePage::updateStatusToolTip() { MainWindow::getInstance()->toggleStatusToolTip(ui.checkBoxDisableSysTrayToolTip->isChecked()); }
|
void AppearancePage::updateStatusToolTip() { MainWindow::getInstance()->toggleStatusToolTip(ui.checkBoxDisableSysTrayToolTip->isChecked()); }
|
||||||
|
@ -173,11 +181,11 @@ void AppearancePage::updateCmboToolButtonSize()
|
||||||
Settings->setListItemIconSize(16);
|
Settings->setListItemIconSize(16);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
default:
|
|
||||||
Settings->setToolButtonSize(24);
|
Settings->setToolButtonSize(24);
|
||||||
Settings->setListItemIconSize(24);
|
Settings->setListItemIconSize(24);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
|
default:
|
||||||
Settings->setToolButtonSize(32);
|
Settings->setToolButtonSize(32);
|
||||||
Settings->setListItemIconSize(32);
|
Settings->setListItemIconSize(32);
|
||||||
break;
|
break;
|
||||||
|
@ -235,6 +243,13 @@ void AppearancePage::load()
|
||||||
}
|
}
|
||||||
whileBlocking(ui.cmboStyleSheet)->setCurrentIndex(index);
|
whileBlocking(ui.cmboStyleSheet)->setCurrentIndex(index);
|
||||||
|
|
||||||
|
index = ui.mainPageButtonType_CB->findData(Settings->getPageButtonLoc());
|
||||||
|
if (index != 0) {
|
||||||
|
ui.cmboTollButtonsStyle->hide();
|
||||||
|
}else {
|
||||||
|
ui.cmboTollButtonsStyle->show();
|
||||||
|
}
|
||||||
|
|
||||||
whileBlocking(ui.mainPageButtonType_CB)->setCurrentIndex(!Settings->getPageButtonLoc());
|
whileBlocking(ui.mainPageButtonType_CB)->setCurrentIndex(!Settings->getPageButtonLoc());
|
||||||
// ui.menuItemsButtonType_CB->setCurrentIndex(!Settings->getActionButtonLoc());
|
// ui.menuItemsButtonType_CB->setCurrentIndex(!Settings->getActionButtonLoc());
|
||||||
|
|
||||||
|
@ -262,10 +277,10 @@ void AppearancePage::load()
|
||||||
whileBlocking(ui.cmboTollButtonsSize)->setCurrentIndex(1);
|
whileBlocking(ui.cmboTollButtonsSize)->setCurrentIndex(1);
|
||||||
break;
|
break;
|
||||||
case 24:
|
case 24:
|
||||||
default:
|
|
||||||
whileBlocking(ui.cmboTollButtonsSize)->setCurrentIndex(2);
|
whileBlocking(ui.cmboTollButtonsSize)->setCurrentIndex(2);
|
||||||
break;
|
break;
|
||||||
case 32:
|
case 32:
|
||||||
|
default:
|
||||||
whileBlocking(ui.cmboTollButtonsSize)->setCurrentIndex(3);
|
whileBlocking(ui.cmboTollButtonsSize)->setCurrentIndex(3);
|
||||||
break;
|
break;
|
||||||
case 64:
|
case 64:
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>1170</width>
|
<width>662</width>
|
||||||
<height>897</height>
|
<height>585</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="contextMenuPolicy">
|
<property name="contextMenuPolicy">
|
||||||
|
@ -249,6 +249,40 @@
|
||||||
<enum>QFrame::NoFrame</enum>
|
<enum>QFrame::NoFrame</enum>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="frameToolListStyleGLayout">
|
<layout class="QGridLayout" name="frameToolListStyleGLayout">
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QComboBox" name="cmboTollButtonsSize">
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Icon Size = 8x8</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Icon Size = 16x16</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Icon Size = 24x24</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Icon Size = 32x32</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Icon Size = 64x64</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Icon Size = 128x128</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="2" column="0">
|
||||||
<widget class="QComboBox" name="cmboTollButtonsStyle">
|
<widget class="QComboBox" name="cmboTollButtonsStyle">
|
||||||
<item>
|
<item>
|
||||||
|
@ -286,39 +320,18 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="3" column="0">
|
||||||
<widget class="QComboBox" name="cmboTollButtonsSize">
|
<spacer name="verticalSpacer">
|
||||||
<item>
|
<property name="orientation">
|
||||||
<property name="text">
|
<enum>Qt::Vertical</enum>
|
||||||
<string>Icon Size = 8x8</string>
|
|
||||||
</property>
|
</property>
|
||||||
</item>
|
<property name="sizeHint" stdset="0">
|
||||||
<item>
|
<size>
|
||||||
<property name="text">
|
<width>20</width>
|
||||||
<string>Icon Size = 16x16</string>
|
<height>40</height>
|
||||||
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
</spacer>
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Icon Size = 24x24</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Icon Size = 32x32</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Icon Size = 64x64</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Icon Size = 128x128</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
|
@ -267,13 +267,6 @@
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QVBoxLayout" name="testToasterVLayout">
|
<layout class="QVBoxLayout" name="testToasterVLayout">
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="testToasterButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Test</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<spacer name="testToasterVSpacer">
|
<spacer name="testToasterVSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
@ -292,30 +285,43 @@
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
<widget class="QGroupBox" name="groupBox">
|
||||||
|
<property name="title">
|
||||||
|
<string>Toaster position</string>
|
||||||
|
</property>
|
||||||
<layout class="QGridLayout" name="positionGLayout">
|
<layout class="QGridLayout" name="positionGLayout">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<item row="1" column="5">
|
||||||
|
<spacer name="horizontalSpacer">
|
||||||
|
<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 row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QLabel" name="labelToasterPosition">
|
<widget class="QLabel" name="labelToasterPosition">
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Position</string>
|
<string>Position</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1" colspan="3">
|
|
||||||
<widget class="QComboBox" name="comboBoxToasterPosition">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
<item row="2" column="0">
|
||||||
<widget class="QLabel" name="labelToasterXMargin">
|
<widget class="QLabel" name="labelToasterXMargin">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
|
@ -329,20 +335,7 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1">
|
<item row="3" column="0">
|
||||||
<widget class="QSpinBox" name="spinBoxToasterXMargin">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<number>20</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="2">
|
|
||||||
<widget class="QLabel" name="labelToasterYMargin">
|
<widget class="QLabel" name="labelToasterYMargin">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||||
|
@ -355,7 +348,20 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="3">
|
<item row="2" column="1" colspan="2">
|
||||||
|
<widget class="QSpinBox" name="spinBoxToasterXMargin">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>20</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1" colspan="2">
|
||||||
<widget class="QSpinBox" name="spinBoxToasterYMargin">
|
<widget class="QSpinBox" name="spinBoxToasterYMargin">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
|
@ -368,7 +374,25 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="2" column="3">
|
||||||
|
<widget class="QPushButton" name="testToasterButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>Test</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1" colspan="3">
|
||||||
|
<widget class="QComboBox" name="comboBoxToasterPosition">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="tabToastersVSpacer">
|
<spacer name="tabToastersVSpacer">
|
||||||
|
@ -448,7 +472,6 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>tabWidget</tabstop>
|
|
||||||
<tabstop>notify_Peers</tabstop>
|
<tabstop>notify_Peers</tabstop>
|
||||||
<tabstop>notify_Channels</tabstop>
|
<tabstop>notify_Channels</tabstop>
|
||||||
<tabstop>notify_Forums</tabstop>
|
<tabstop>notify_Forums</tabstop>
|
||||||
|
@ -467,10 +490,7 @@
|
||||||
<tabstop>popup_GroupChat</tabstop>
|
<tabstop>popup_GroupChat</tabstop>
|
||||||
<tabstop>popup_ChatLobby</tabstop>
|
<tabstop>popup_ChatLobby</tabstop>
|
||||||
<tabstop>popup_ConnectAttempt</tabstop>
|
<tabstop>popup_ConnectAttempt</tabstop>
|
||||||
<tabstop>testToasterButton</tabstop>
|
|
||||||
<tabstop>comboBoxToasterPosition</tabstop>
|
|
||||||
<tabstop>spinBoxToasterXMargin</tabstop>
|
<tabstop>spinBoxToasterXMargin</tabstop>
|
||||||
<tabstop>spinBoxToasterYMargin</tabstop>
|
|
||||||
<tabstop>systray_GroupChat</tabstop>
|
<tabstop>systray_GroupChat</tabstop>
|
||||||
<tabstop>systray_ChatLobby</tabstop>
|
<tabstop>systray_ChatLobby</tabstop>
|
||||||
<tabstop>pushButtonDisableAll</tabstop>
|
<tabstop>pushButtonDisableAll</tabstop>
|
||||||
|
|
|
@ -266,7 +266,7 @@ int RshareSettings::getToolButtonSize()
|
||||||
{
|
{
|
||||||
static int sizes[6] = { 8,16,24,32,64,128 } ;
|
static int sizes[6] = { 8,16,24,32,64,128 } ;
|
||||||
|
|
||||||
return value(SETTING_TOOLBUTTONSIZE, computeBestIconSize(6,sizes,24)).toInt();
|
return value(SETTING_TOOLBUTTONSIZE, computeBestIconSize(6,sizes,32)).toInt();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Sets the tool button's size.*/
|
/** Sets the tool button's size.*/
|
||||||
|
@ -281,10 +281,10 @@ void RshareSettings::setToolButtonSize(int size)
|
||||||
setValue(SETTING_TOOLBUTTONSIZE, 16);
|
setValue(SETTING_TOOLBUTTONSIZE, 16);
|
||||||
break;
|
break;
|
||||||
case 24:
|
case 24:
|
||||||
default:
|
|
||||||
setValue(SETTING_TOOLBUTTONSIZE, 24);
|
setValue(SETTING_TOOLBUTTONSIZE, 24);
|
||||||
break;
|
break;
|
||||||
case 32:
|
case 32:
|
||||||
|
default:
|
||||||
setValue(SETTING_TOOLBUTTONSIZE, 32);
|
setValue(SETTING_TOOLBUTTONSIZE, 32);
|
||||||
break;
|
break;
|
||||||
case 64:
|
case 64:
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
#include <gui/settings/rsharesettings.h>
|
#include <gui/settings/rsharesettings.h>
|
||||||
#include "gui/common/FilesDefs.h"
|
#include "gui/common/FilesDefs.h"
|
||||||
|
|
||||||
|
#include <gui/MainWindow.h>
|
||||||
#include <gui/statistics/TurtleRouterStatistics.h>
|
#include <gui/statistics/TurtleRouterStatistics.h>
|
||||||
#include <gui/statistics/GlobalRouterStatistics.h>
|
#include <gui/statistics/GlobalRouterStatistics.h>
|
||||||
#include <gui/statistics/GxsIdStatistics.h>
|
#include <gui/statistics/GxsIdStatistics.h>
|
||||||
|
@ -105,6 +106,7 @@ StatisticsWindow::StatisticsWindow(QWidget *parent) :
|
||||||
int toolSize = Settings->getToolButtonSize();
|
int toolSize = Settings->getToolButtonSize();
|
||||||
ui->toolBar->setToolButtonStyle(Settings->getToolButtonStyle());
|
ui->toolBar->setToolButtonStyle(Settings->getToolButtonStyle());
|
||||||
ui->toolBar->setIconSize(QSize(toolSize,toolSize));
|
ui->toolBar->setIconSize(QSize(toolSize,toolSize));
|
||||||
|
setWindowTitle("RetroShare Statistics - " + MainWindow::getInstance()->get_nameAndLocation());
|
||||||
}
|
}
|
||||||
|
|
||||||
StatisticsWindow::~StatisticsWindow()
|
StatisticsWindow::~StatisticsWindow()
|
||||||
|
|
|
@ -2305,3 +2305,21 @@ BoardsCommentsItem QLabel#subjectLabel, QLabel#titleLabel , QLabel#nameLabel {
|
||||||
font: 14px;
|
font: 14px;
|
||||||
font: bold;
|
font: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HomePage QToolButton#addButton {
|
||||||
|
font: bold;
|
||||||
|
font-size: 15pt;
|
||||||
|
color: white;
|
||||||
|
background: #0099cc;
|
||||||
|
border-radius: 4px;
|
||||||
|
max-height: 27px;
|
||||||
|
min-width: 4em;
|
||||||
|
padding: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
HomePage QToolButton#addButton:hover {
|
||||||
|
background: #03b1f3;
|
||||||
|
border-radius: 4px;
|
||||||
|
min-width: 4em;
|
||||||
|
padding: 2px;
|
||||||
|
}
|
||||||
|
|
|
@ -1493,11 +1493,6 @@ RSTextBrowser, MimeTextEdit
|
||||||
qproperty-textColorQuotes: ColorList(#789922 #039bd5 #800000 #800080 #008080 #b10dc9 #85144b #3d9970);
|
qproperty-textColorQuotes: ColorList(#789922 #039bd5 #800000 #800080 #008080 #b10dc9 #85144b #3d9970);
|
||||||
}
|
}
|
||||||
|
|
||||||
ChatWidget QFrame#pluginTitleFrame
|
|
||||||
{
|
|
||||||
background: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
PulseTopLevel QFrame#frame, PulseViewGroup QFrame#frame, PulseReply QFrame#frame {
|
PulseTopLevel QFrame#frame, PulseViewGroup QFrame#frame, PulseReply QFrame#frame {
|
||||||
border: 2px solid #38444d;
|
border: 2px solid #38444d;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
|
@ -1539,3 +1534,21 @@ BoardsCommentsItem QLabel#subjectLabel, QLabel#titleLabel , QLabel#nameLabel {
|
||||||
font: 14px;
|
font: 14px;
|
||||||
font: bold;
|
font: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HomePage QToolButton#addButton {
|
||||||
|
font: bold;
|
||||||
|
font-size: 15pt;
|
||||||
|
color: white;
|
||||||
|
background: #0099cc;
|
||||||
|
border-radius: 4px;
|
||||||
|
max-height: 27px;
|
||||||
|
min-width: 4em;
|
||||||
|
padding: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
HomePage QToolButton#addButton:hover {
|
||||||
|
background: #03b1f3;
|
||||||
|
border-radius: 4px;
|
||||||
|
min-width: 4em;
|
||||||
|
padding: 2px;
|
||||||
|
}
|
||||||
|
|
BIN
retroshare-service/src/logo.ico
Normal file
BIN
retroshare-service/src/logo.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 124 KiB |
|
@ -136,6 +136,8 @@ win32-g++|win32-clang-g++ {
|
||||||
} else {
|
} else {
|
||||||
QMAKE_PRE_LINK = $(CHK_DIR_EXISTS) lib || $(MKDIR) lib
|
QMAKE_PRE_LINK = $(CHK_DIR_EXISTS) lib || $(MKDIR) lib
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RC_FILE = retroshare-service_win.rc
|
||||||
}
|
}
|
||||||
|
|
||||||
################################### COMMON stuff ##################################
|
################################### COMMON stuff ##################################
|
||||||
|
|
4
retroshare-service/src/retroshare-service_win.rc
Normal file
4
retroshare-service/src/retroshare-service_win.rc
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
#include <winver.h>
|
||||||
|
#include "retroshare-service_win.rc.h"
|
||||||
|
|
||||||
|
IDI_ICON1 ICON "logo.ico"
|
22
retroshare-service/src/retroshare-service_win.rc.h
Normal file
22
retroshare-service/src/retroshare-service_win.rc.h
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
/*******************************************************************************
|
||||||
|
* retroshare-service/retroshare-service_win.rc.h *
|
||||||
|
* *
|
||||||
|
* Copyright (C) 2006 by RetroShare team <retroshare.project@gmail.com> *
|
||||||
|
* *
|
||||||
|
* This program is free software: you can redistribute it and/or modify *
|
||||||
|
* it under the terms of the GNU Affero General Public License as *
|
||||||
|
* published by the Free Software Foundation, either version 3 of the *
|
||||||
|
* License, or (at your option) any later version. *
|
||||||
|
* *
|
||||||
|
* This program is distributed in the hope that it will be useful, *
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||||
|
* GNU Affero General Public License for more details. *
|
||||||
|
* *
|
||||||
|
* You should have received a copy of the GNU Affero General Public License *
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
|
||||||
|
* *
|
||||||
|
*******************************************************************************/
|
||||||
|
|
||||||
|
#define IDI_ICON1 101
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue