mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-11 02:25:34 -04:00
Enabled to display identity icons for Distant peers on Message Composer and on Friend Selection Widget
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7811 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
57640379a8
commit
d26ea4a642
2 changed files with 15 additions and 9 deletions
|
@ -23,6 +23,7 @@
|
|||
#include <QDialogButtonBox>
|
||||
#include "FriendSelectionWidget.h"
|
||||
#include "ui_FriendSelectionWidget.h"
|
||||
#include "gui/gxs/GxsIdDetails.h"
|
||||
#include <retroshare-gui/RsAutoUpdatePage.h>
|
||||
#include "gui/notifyqt.h"
|
||||
#include "gui/common/RSTreeWidgetItem.h"
|
||||
|
@ -526,6 +527,8 @@ void FriendSelectionWidget::secured_fillList()
|
|||
RsIdentityDetails detail;
|
||||
if (!rsIdentity->getIdDetails(RsGxsId(*gxsIt), detail))
|
||||
continue; /* BAD */
|
||||
|
||||
QPixmap identicon = QPixmap::fromImage(GxsIdDetails::makeDefaultIcon(RsGxsId(*gxsIt))) ;
|
||||
|
||||
// make a widget per friend
|
||||
gxsItem = new RSTreeWidgetItem(mCompareRole, IDTYPE_GXS);
|
||||
|
@ -533,9 +536,9 @@ void FriendSelectionWidget::secured_fillList()
|
|||
QString name = QString::fromUtf8(detail.mNickname.c_str());
|
||||
gxsItem->setText(COLUMN_NAME, name + " ("+QString::fromStdString( (*gxsIt).toStdString() )+")");
|
||||
|
||||
gxsItem->setTextColor(COLUMN_NAME, textColorOnline());
|
||||
//gxsItem->setTextColor(COLUMN_NAME, textColorOnline());
|
||||
gxsItem->setFlags(Qt::ItemIsUserCheckable | gxsItem->flags());
|
||||
gxsItem->setIcon(COLUMN_NAME, QIcon(StatusDefs::imageUser(RS_STATUS_ONLINE)));
|
||||
gxsItem->setIcon(COLUMN_NAME, QIcon(identicon));
|
||||
gxsItem->setData(COLUMN_DATA, ROLE_ID, QString::fromStdString(detail.mId.toStdString()));
|
||||
gxsItem->setData(COLUMN_DATA, ROLE_SORT, "2 " + name);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue