mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-30 17:59:02 -04:00
Merge pull request #345 from PhenomRetroShare/Update_CircleGraphical
Fix Graphic Circles update.
This commit is contained in:
commit
c9c15e58f2
3 changed files with 64 additions and 40 deletions
|
@ -127,14 +127,16 @@ void IdentityWidget::updateData(const RsPeerDetails &pgp_details)
|
||||||
ui->labelKeyId->setText(_keyId);
|
ui->labelKeyId->setText(_keyId);
|
||||||
ui->labelKeyId->setToolTip(tr("PGP id:").append(" "+_keyId));
|
ui->labelKeyId->setToolTip(tr("PGP id:").append(" "+_keyId));
|
||||||
|
|
||||||
|
if (!_haveGXSId) {
|
||||||
QPixmap avatar;
|
QPixmap avatar;
|
||||||
/*AvatarDefs::getAvatarFromGpgId(_details.gpg_id, avatar);
|
AvatarDefs::getAvatarFromGpgId(_details.gpg_id, avatar);
|
||||||
if (_avatar != avatar.toImage()) {
|
if (_avatar != avatar.toImage()) {
|
||||||
_avatar = avatar.toImage();
|
_avatar = avatar.toImage();
|
||||||
_scene->clear();
|
_scene->clear();
|
||||||
_scene->addPixmap(avatar.scaled(ui->graphicsView->width(),ui->graphicsView->height()));
|
_scene->addPixmap(avatar.scaled(ui->graphicsView->width(),ui->graphicsView->height()));
|
||||||
emit imageUpdated();
|
emit imageUpdated();
|
||||||
}*///if (_avatar != avatar.toImage())
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//}//if (_details != gpg_details)
|
//}//if (_details != gpg_details)
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
#include "gui/settings/rsharesettings.h"
|
#include "gui/settings/rsharesettings.h"
|
||||||
#include "gui/msgs/MessageComposer.h"
|
#include "gui/msgs/MessageComposer.h"
|
||||||
#include "gui/gxs/GxsIdDetails.h"
|
#include "gui/gxs/GxsIdDetails.h"
|
||||||
|
#include "gui/gxs/RsGxsUpdateBroadcastBase.h"
|
||||||
#include "gui/Identity/IdDetailsDialog.h"
|
#include "gui/Identity/IdDetailsDialog.h"
|
||||||
|
|
||||||
#include "retroshare/rspeers.h"
|
#include "retroshare/rspeers.h"
|
||||||
|
@ -60,6 +61,9 @@ PeopleDialog::PeopleDialog(QWidget *parent)
|
||||||
/* Setup TokenQueue */
|
/* Setup TokenQueue */
|
||||||
mIdentityQueue = new TokenQueue(rsIdentity->getTokenService(), this);
|
mIdentityQueue = new TokenQueue(rsIdentity->getTokenService(), this);
|
||||||
mCirclesQueue = new TokenQueue(rsGxsCircles->getTokenService(), this);
|
mCirclesQueue = new TokenQueue(rsGxsCircles->getTokenService(), this);
|
||||||
|
// This is used to grab the broadcast of changes from p3GxsCircles, which is discarded by the current dialog, since it expects data for p3Identity only.
|
||||||
|
mCirclesBroadcastBase = new RsGxsUpdateBroadcastBase(rsGxsCircles, this);
|
||||||
|
connect(mCirclesBroadcastBase, SIGNAL(fillDisplay(bool)), this, SLOT(updateCirclesDisplay(bool)));
|
||||||
|
|
||||||
|
|
||||||
tabWidget->removeTab(1);
|
tabWidget->removeTab(1);
|
||||||
|
@ -115,6 +119,9 @@ PeopleDialog::PeopleDialog(QWidget *parent)
|
||||||
if (geometryInt.isEmpty() == false) {
|
if (geometryInt.isEmpty() == false) {
|
||||||
splitterInternal->restoreState(geometryInt);
|
splitterInternal->restoreState(geometryInt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
reloadAll();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Destructor. */
|
/** Destructor. */
|
||||||
|
@ -378,6 +385,13 @@ void PeopleDialog::requestCirclesList()
|
||||||
mCirclesQueue->requestGroupInfo(token, RS_TOKREQ_ANSTYPE_SUMMARY, opts, PD_CIRCLES);
|
mCirclesQueue->requestGroupInfo(token, RS_TOKREQ_ANSTYPE_SUMMARY, opts, PD_CIRCLES);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PeopleDialog::updateCirclesDisplay(bool)
|
||||||
|
{
|
||||||
|
std::cerr << "!!Updating circles display!" << std::endl;
|
||||||
|
|
||||||
|
requestCirclesList() ;
|
||||||
|
}
|
||||||
|
|
||||||
void PeopleDialog::loadRequest(const TokenQueue * /*queue*/, const TokenRequest &req)
|
void PeopleDialog::loadRequest(const TokenQueue * /*queue*/, const TokenRequest &req)
|
||||||
{
|
{
|
||||||
std::cerr << "IdDialog::loadRequest() UserType: " << req.mUserType;
|
std::cerr << "IdDialog::loadRequest() UserType: " << req.mUserType;
|
||||||
|
@ -404,6 +418,7 @@ void PeopleDialog::loadRequest(const TokenQueue * /*queue*/, const TokenRequest
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
break;
|
break;
|
||||||
}//switch(req.mUserType)
|
}//switch(req.mUserType)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void PeopleDialog::iw_AddButtonClickedExt()
|
void PeopleDialog::iw_AddButtonClickedExt()
|
||||||
|
@ -629,7 +644,9 @@ void PeopleDialog::cw_askForGXSIdentityWidget(RsGxsId gxs_id)
|
||||||
IdentityWidget *idWidget = itFound->second;
|
IdentityWidget *idWidget = itFound->second;
|
||||||
dest->addIdent(idWidget);
|
dest->addIdent(idWidget);
|
||||||
}//if((itFound=_gxs_identity_widgets.find(gxs_id)) != _gxs_identity_widgets.end()) {
|
}//if((itFound=_gxs_identity_widgets.find(gxs_id)) != _gxs_identity_widgets.end()) {
|
||||||
}//if (dest)
|
} else {
|
||||||
|
reloadAll();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PeopleDialog::cw_askForPGPIdentityWidget(RsPgpId pgp_id)
|
void PeopleDialog::cw_askForPGPIdentityWidget(RsPgpId pgp_id)
|
||||||
|
@ -643,7 +660,9 @@ void PeopleDialog::cw_askForPGPIdentityWidget(RsPgpId pgp_id)
|
||||||
IdentityWidget *idWidget = itFound->second;
|
IdentityWidget *idWidget = itFound->second;
|
||||||
dest->addIdent(idWidget);
|
dest->addIdent(idWidget);
|
||||||
}//if((itFound=_pgp_identity_widgets.find(gxs_id)) != _pgp_identity_widgets.end()) {
|
}//if((itFound=_pgp_identity_widgets.find(gxs_id)) != _pgp_identity_widgets.end()) {
|
||||||
}//if (dest)
|
} else {
|
||||||
|
reloadAll();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PeopleDialog::cw_imageUpdatedInt()
|
void PeopleDialog::cw_imageUpdatedInt()
|
||||||
|
|
|
@ -53,7 +53,7 @@ class PeopleDialog : public RsGxsUpdateBroadcastPage, public Ui::PeopleDialog, p
|
||||||
virtual QString pageName() const { return tr("People") ; } //MainPage
|
virtual QString pageName() const { return tr("People") ; } //MainPage
|
||||||
virtual QString helpText() const { return ""; } //MainPage
|
virtual QString helpText() const { return ""; } //MainPage
|
||||||
|
|
||||||
void loadRequest(const TokenQueue * /*queue*/, const TokenRequest &req) ;
|
void loadRequest(const TokenQueue * queue, const TokenRequest &req) ;
|
||||||
|
|
||||||
void requestIdList() ;
|
void requestIdList() ;
|
||||||
void requestCirclesList() ;
|
void requestCirclesList() ;
|
||||||
|
@ -67,6 +67,8 @@ class PeopleDialog : public RsGxsUpdateBroadcastPage, public Ui::PeopleDialog, p
|
||||||
//End RsGxsUpdateBroadcastPage
|
//End RsGxsUpdateBroadcastPage
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
void updateCirclesDisplay(bool);
|
||||||
|
|
||||||
void iw_AddButtonClickedExt();
|
void iw_AddButtonClickedExt();
|
||||||
void iw_AddButtonClickedInt();
|
void iw_AddButtonClickedInt();
|
||||||
void addToCircleExt();
|
void addToCircleExt();
|
||||||
|
@ -95,6 +97,7 @@ private:
|
||||||
|
|
||||||
TokenQueue *mIdentityQueue;
|
TokenQueue *mIdentityQueue;
|
||||||
TokenQueue *mCirclesQueue;
|
TokenQueue *mCirclesQueue;
|
||||||
|
RsGxsUpdateBroadcastBase *mCirclesBroadcastBase ;
|
||||||
|
|
||||||
FlowLayout *_flowLayoutExt;
|
FlowLayout *_flowLayoutExt;
|
||||||
std::map<RsGxsId,IdentityWidget *> _gxs_identity_widgets ;
|
std::map<RsGxsId,IdentityWidget *> _gxs_identity_widgets ;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue