mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-18 05:50:39 -04:00
fixed update notification and display in GxsTransStatistics
This commit is contained in:
parent
9853b53f8b
commit
1766087f71
3 changed files with 14 additions and 15 deletions
|
@ -387,7 +387,7 @@ void p3GxsTrans::service_tick()
|
||||||
|
|
||||||
// now grab collected messages to delete
|
// now grab collected messages to delete
|
||||||
|
|
||||||
if(mCleanupThread != NULL && !mCleanupThread->isDone())
|
if(mCleanupThread != NULL && mCleanupThread->isDone())
|
||||||
{
|
{
|
||||||
GxsMsgReq msgToDel ;
|
GxsMsgReq msgToDel ;
|
||||||
|
|
||||||
|
@ -543,6 +543,7 @@ void p3GxsTrans::notifyChanges(std::vector<RsGxsNotify*>& changes)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
RsGxsIfaceHelper::receiveChanges(changes);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t p3GxsTrans::AuthenPolicy()
|
uint32_t p3GxsTrans::AuthenPolicy()
|
||||||
|
|
|
@ -73,7 +73,7 @@ static const int GXSTRANS_STATISTICS_DELAY_BETWEEN_GROUP_REQ = 30 ; // never req
|
||||||
#define DEBUG_GXSTRANS_STATS 1
|
#define DEBUG_GXSTRANS_STATS 1
|
||||||
|
|
||||||
GxsTransportStatistics::GxsTransportStatistics(QWidget *parent)
|
GxsTransportStatistics::GxsTransportStatistics(QWidget *parent)
|
||||||
: RsAutoUpdatePage(2000,parent)
|
: RsGxsUpdateBroadcastPage(rsGxsTrans,parent)
|
||||||
{
|
{
|
||||||
setupUi(this) ;
|
setupUi(this) ;
|
||||||
|
|
||||||
|
@ -93,6 +93,7 @@ GxsTransportStatistics::GxsTransportStatistics(QWidget *parent)
|
||||||
|
|
||||||
// load settings
|
// load settings
|
||||||
processSettings(true);
|
processSettings(true);
|
||||||
|
updateDisplay(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
GxsTransportStatistics::~GxsTransportStatistics()
|
GxsTransportStatistics::~GxsTransportStatistics()
|
||||||
|
@ -139,19 +140,14 @@ void GxsTransportStatistics::CustomPopupMenu( QPoint )
|
||||||
contextMnu.exec(QCursor::pos());
|
contextMnu.exec(QCursor::pos());
|
||||||
}
|
}
|
||||||
|
|
||||||
void GxsTransportStatistics::updateDisplay()
|
void GxsTransportStatistics::updateDisplay(bool)
|
||||||
{
|
{
|
||||||
time_t now = time(NULL) ;
|
time_t now = time(NULL) ;
|
||||||
|
|
||||||
if(mLastGroupReqTS + GXSTRANS_STATISTICS_DELAY_BETWEEN_GROUP_REQ < now)
|
std::cerr << "GxsTransportStatistics::updateDisplay()" << std::endl;
|
||||||
{
|
|
||||||
requestGroupMeta();
|
|
||||||
mLastGroupReqTS = now ;
|
|
||||||
}
|
|
||||||
|
|
||||||
//_tst_CW->updateContent() ;
|
requestGroupMeta();
|
||||||
|
mLastGroupReqTS = now ;
|
||||||
updateContent();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString GxsTransportStatistics::getPeerName(const RsPeerId &peer_id)
|
QString GxsTransportStatistics::getPeerName(const RsPeerId &peer_id)
|
||||||
|
@ -319,6 +315,8 @@ void GxsTransportStatistics::loadRequest(const TokenQueue *queue, const TokenReq
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
updateContent();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GxsTransportStatistics::requestGroupMeta()
|
void GxsTransportStatistics::requestGroupMeta()
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
#include "util/TokenQueue.h"
|
#include "util/TokenQueue.h"
|
||||||
#include "RsAutoUpdatePage.h"
|
#include "RsAutoUpdatePage.h"
|
||||||
#include "ui_GxsTransportStatistics.h"
|
#include "ui_GxsTransportStatistics.h"
|
||||||
|
#include "gui/gxs/RsGxsUpdateBroadcastPage.h"
|
||||||
|
|
||||||
class GxsTransportStatisticsWidget ;
|
class GxsTransportStatisticsWidget ;
|
||||||
class UIStateHelper;
|
class UIStateHelper;
|
||||||
|
@ -45,7 +46,7 @@ public:
|
||||||
std::vector<RsMsgMetaData> messages_metas ;
|
std::vector<RsMsgMetaData> messages_metas ;
|
||||||
};
|
};
|
||||||
|
|
||||||
class GxsTransportStatistics: public RsAutoUpdatePage, public TokenResponse, public Ui::GxsTransportStatistics
|
class GxsTransportStatistics: public RsGxsUpdateBroadcastPage, public TokenResponse, public Ui::GxsTransportStatistics
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
@ -66,6 +67,7 @@ private slots:
|
||||||
void personDetails();
|
void personDetails();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void updateDisplay(bool complete) ;
|
||||||
void loadGroupMeta(const uint32_t& token);
|
void loadGroupMeta(const uint32_t& token);
|
||||||
void loadGroupStat(const uint32_t& token);
|
void loadGroupStat(const uint32_t& token);
|
||||||
void loadMsgMeta(const uint32_t& token);
|
void loadMsgMeta(const uint32_t& token);
|
||||||
|
@ -77,8 +79,6 @@ private:
|
||||||
void processSettings(bool bLoad);
|
void processSettings(bool bLoad);
|
||||||
bool m_bProcessSettings;
|
bool m_bProcessSettings;
|
||||||
|
|
||||||
virtual void updateDisplay() ;
|
|
||||||
|
|
||||||
GxsTransportStatisticsWidget *_tst_CW ;
|
GxsTransportStatisticsWidget *_tst_CW ;
|
||||||
TokenQueue *mTransQueue ;
|
TokenQueue *mTransQueue ;
|
||||||
UIStateHelper *mStateHelper;
|
UIStateHelper *mStateHelper;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue