mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -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
@ -23,6 +23,7 @@
|
|||||||
#include <QDialogButtonBox>
|
#include <QDialogButtonBox>
|
||||||
#include "FriendSelectionWidget.h"
|
#include "FriendSelectionWidget.h"
|
||||||
#include "ui_FriendSelectionWidget.h"
|
#include "ui_FriendSelectionWidget.h"
|
||||||
|
#include "gui/gxs/GxsIdDetails.h"
|
||||||
#include <retroshare-gui/RsAutoUpdatePage.h>
|
#include <retroshare-gui/RsAutoUpdatePage.h>
|
||||||
#include "gui/notifyqt.h"
|
#include "gui/notifyqt.h"
|
||||||
#include "gui/common/RSTreeWidgetItem.h"
|
#include "gui/common/RSTreeWidgetItem.h"
|
||||||
@ -527,15 +528,17 @@ void FriendSelectionWidget::secured_fillList()
|
|||||||
if (!rsIdentity->getIdDetails(RsGxsId(*gxsIt), detail))
|
if (!rsIdentity->getIdDetails(RsGxsId(*gxsIt), detail))
|
||||||
continue; /* BAD */
|
continue; /* BAD */
|
||||||
|
|
||||||
|
QPixmap identicon = QPixmap::fromImage(GxsIdDetails::makeDefaultIcon(RsGxsId(*gxsIt))) ;
|
||||||
|
|
||||||
// make a widget per friend
|
// make a widget per friend
|
||||||
gxsItem = new RSTreeWidgetItem(mCompareRole, IDTYPE_GXS);
|
gxsItem = new RSTreeWidgetItem(mCompareRole, IDTYPE_GXS);
|
||||||
|
|
||||||
QString name = QString::fromUtf8(detail.mNickname.c_str());
|
QString name = QString::fromUtf8(detail.mNickname.c_str());
|
||||||
gxsItem->setText(COLUMN_NAME, name + " ("+QString::fromStdString( (*gxsIt).toStdString() )+")");
|
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->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_ID, QString::fromStdString(detail.mId.toStdString()));
|
||||||
gxsItem->setData(COLUMN_DATA, ROLE_SORT, "2 " + name);
|
gxsItem->setData(COLUMN_DATA, ROLE_SORT, "2 " + name);
|
||||||
|
|
||||||
|
@ -51,17 +51,18 @@
|
|||||||
#include "gui/common/GroupDefs.h"
|
#include "gui/common/GroupDefs.h"
|
||||||
#include "gui/common/StatusDefs.h"
|
#include "gui/common/StatusDefs.h"
|
||||||
#include "gui/common/PeerDefs.h"
|
#include "gui/common/PeerDefs.h"
|
||||||
|
#include "gui/common/TagDefs.h"
|
||||||
|
#include "gui/common/Emoticons.h"
|
||||||
#include "gui/RetroShareLink.h"
|
#include "gui/RetroShareLink.h"
|
||||||
#include "gui/settings/rsharesettings.h"
|
#include "gui/settings/rsharesettings.h"
|
||||||
#include "gui/common/Emoticons.h"
|
#include "gui/connect/ConfCertDialog.h"
|
||||||
#include "textformat.h"
|
#include "gui/gxs/GxsIdDetails.h"
|
||||||
#include "util/misc.h"
|
#include "util/misc.h"
|
||||||
#include "util/DateTime.h"
|
#include "util/DateTime.h"
|
||||||
#include "TagsMenu.h"
|
|
||||||
#include "gui/common/TagDefs.h"
|
|
||||||
#include "gui/connect/ConfCertDialog.h"
|
|
||||||
#include "util/HandleRichText.h"
|
#include "util/HandleRichText.h"
|
||||||
#include "util/QtVersion.h"
|
#include "util/QtVersion.h"
|
||||||
|
#include "textformat.h"
|
||||||
|
#include "TagsMenu.h"
|
||||||
|
|
||||||
#define IMAGE_GROUP16 ":/images/user/group16.png"
|
#define IMAGE_GROUP16 ":/images/user/group16.png"
|
||||||
#define IMAGE_FRIENDINFO ":/images/peerdetails_16x16.png"
|
#define IMAGE_FRIENDINFO ":/images/peerdetails_16x16.png"
|
||||||
@ -1452,8 +1453,10 @@ void MessageComposer::setRecipientToRow(int row, enumType type, destinationType
|
|||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QPixmap identicon = QPixmap::fromImage(GxsIdDetails::makeDefaultIcon(RsGxsId(gid))) ;
|
||||||
|
|
||||||
name = tr("Distant peer (name: %2, PGP key: %1)").arg(QString::fromStdString(gid.toStdString())).arg(QString::fromUtf8(detail.mNickname.c_str())) ;
|
name = tr("Distant peer (name: %2, PGP key: %1)").arg(QString::fromStdString(gid.toStdString())).arg(QString::fromUtf8(detail.mNickname.c_str())) ;
|
||||||
icon = QIcon(StatusDefs::imageUser(RS_STATUS_ONLINE));
|
icon = QIcon(identicon);
|
||||||
}
|
}
|
||||||
break ;
|
break ;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user