diff --git a/retroshare-gui/src/gui/feeds/GxsCircleItem.cpp b/retroshare-gui/src/gui/feeds/GxsCircleItem.cpp index 3fd34d1cb..8fe52b6b4 100644 --- a/retroshare-gui/src/gui/feeds/GxsCircleItem.cpp +++ b/retroshare-gui/src/gui/feeds/GxsCircleItem.cpp @@ -68,9 +68,13 @@ void GxsCircleItem::setup() RsIdentityDetails idDetails ; QString idName ; if(rsIdentity->getIdDetails(mGxsId, idDetails)) - idName = tr("for identity ")+QString::fromUtf8(idDetails.mNickname.c_str()) + " (ID=" + QString::fromStdString(mGxsId.toStdString()) + ")" ; + idName = QString::fromUtf8(idDetails.mNickname.c_str()) + " (ID=" + QString::fromStdString(mGxsId.toStdString()) + ")" ; else - idName = tr("for identity ")+QString::fromStdString(mGxsId.toStdString()) ; + idName = QString::fromStdString(mGxsId.toStdString()) ; + + QPixmap pixmap ; + if(idDetails.mAvatar.mSize == 0 || !GxsIdDetails::loadPixmapFromData(idDetails.mAvatar.mData, idDetails.mAvatar.mSize, pixmap,GxsIdDetails::SMALL)) + pixmap = GxsIdDetails::makeDefaultIcon(mGxsId,GxsIdDetails::SMALL); /* update circle information */ @@ -84,6 +88,10 @@ void GxsCircleItem::setup() ui->titleLabel->setText(tr("You received a membership request for circle:")); ui->nameLabel->setText(QString::fromUtf8(circleDetails.mCircleName.c_str())); ui->gxsIdLabel->setText(idName); + ui->iconLabel->setPixmap(pixmap); + ui->gxsIdLabel->setId(mGxsId); + + ui->acceptButton->setToolTip(tr("Grant membership request")); ui->revokeButton->setToolTip(tr("Revoke membership request")); @@ -95,6 +103,8 @@ void GxsCircleItem::setup() ui->titleLabel->setText(tr("You received an invitation for circle:")); ui->nameLabel->setText(QString::fromUtf8(circleDetails.mCircleName.c_str())); ui->gxsIdLabel->setText(idName); + ui->iconLabel->setPixmap(pixmap); + ui->gxsIdLabel->setId(mGxsId); ui->acceptButton->setToolTip(tr("Accept invitation")); connect(ui->acceptButton, SIGNAL(clicked()), this, SLOT(acceptCircleSubscription())); @@ -107,6 +117,7 @@ void GxsCircleItem::setup() ui->titleLabel->setText(tr("Received event from unknown Circle:")); ui->nameLabel->setText(QString::fromStdString(mCircleId.toStdString())); ui->gxsIdLabel->setText(idName); + ui->gxsIdLabel->setId(mGxsId); } /* Setup TokenQueue */ diff --git a/retroshare-gui/src/gui/feeds/GxsCircleItem.ui b/retroshare-gui/src/gui/feeds/GxsCircleItem.ui index 141d49e4c..408781e9b 100644 --- a/retroshare-gui/src/gui/feeds/GxsCircleItem.ui +++ b/retroshare-gui/src/gui/feeds/GxsCircleItem.ui @@ -7,7 +7,7 @@ 0 0 618 - 96 + 104 @@ -104,184 +104,222 @@ QFrame::Sunken - - - - - - - - 70 - 70 - + + + + + + 70 + 70 + + + + + 70 + 70 + + + + + + + :/icons/svg/circles.svg + + + true + + + + + + + + + for identity + + + + - 70 - 70 + 20 + 20 - - - - :/icons/svg/circles.svg + TextLabel true - - - - - - - 0 - 0 - - - - - 75 - true - true - - - - Circle - - - - - - - name - - - true - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - + + + + name + + + true + + - - - - - - name - - - true - - - - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 254 - 28 - - - - - - - - - 0 - 0 - - - - Qt::NoFocus - - - - :/images/accepted16.png:/images/accepted16.png - - - - - - - - 0 - 0 - - - - Qt::NoFocus - - - - :/images/cancel.png:/images/cancel.png - - - - - - - - 0 - 0 - - - - Qt::NoFocus - - - Details - - - - :/images/edit_add24.png:/images/edit_add24.png - - - - - - - - 0 - 0 - - - - Qt::NoFocus - - - Remove Item - - - - :/images/close_normal.png:/images/close_normal.png - - - - + + + + Qt::Horizontal + + + + 358 + 20 + + + + + + + + + + + 0 + 0 + + + + Qt::NoFocus + + + Accept + + + + :/images/accepted16.png:/images/accepted16.png + + + + + + + + 0 + 0 + + + + Qt::NoFocus + + + Revoke + + + + :/images/cancel.png:/images/cancel.png + + + + + + + + 0 + 0 + + + + Qt::NoFocus + + + Details + + + + :/images/informations_24x24.png:/images/informations_24x24.png + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 285 + 18 + + + + + + + + + 0 + 0 + + + + Qt::NoFocus + + + Remove Item + + + + :/icons/png/exit2.png:/icons/png/exit2.png + + + + + + + + + + 0 + 0 + + + + + 75 + true + true + + + + Circle + + + + + + + name + + + true + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + @@ -290,6 +328,13 @@ + + + GxsIdLabel + QLabel +
gui/gxs/GxsIdLabel.h
+
+