Added two new images from defnax to SecurityItem for SEC_TYPE_CONNECT_ATTEMPT and SEC_TYPE_UNKNOWN_IN.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5060 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2012-03-29 20:23:18 +00:00
parent b32fddb3e0
commit fae86aff3b
5 changed files with 13 additions and 2 deletions

View File

@ -39,6 +39,7 @@ AvatarWidget::AvatarWidget(QWidget *parent) :
mFlag.isOwnId = false; mFlag.isOwnId = false;
mFlag.isGpg = false; mFlag.isGpg = false;
defaultAvatar = ":/images/no_avatar_background.png";
setFrameType(NO_FRAME); setFrameType(NO_FRAME);
@ -137,6 +138,12 @@ void AvatarWidget::setOwnId()
setId(rsPeers->getOwnId(), false); setId(rsPeers->getOwnId(), false);
} }
void AvatarWidget::setDefaultAvatar(const QString &avatar)
{
defaultAvatar = avatar;
updateAvatar(QString::fromStdString(mId));
}
void AvatarWidget::refreshStatus() void AvatarWidget::refreshStatus()
{ {
switch (mFrameType) { switch (mFrameType) {
@ -226,8 +233,6 @@ void AvatarWidget::updateStatus(const QString peerId, int status)
void AvatarWidget::updateAvatar(const QString &peerId) void AvatarWidget::updateAvatar(const QString &peerId)
{ {
QString defaultAvatar = ":/images/no_avatar_background.png";
if (mId.empty()) { if (mId.empty()) {
QPixmap avatar(defaultAvatar); QPixmap avatar(defaultAvatar);
ui->avatar->setPixmap(avatar); ui->avatar->setPixmap(avatar);

View File

@ -46,6 +46,7 @@ public:
void setFrameType(FrameType type); void setFrameType(FrameType type);
void setId(const std::string& id, bool isGpg); void setId(const std::string& id, bool isGpg);
void setOwnId(); void setOwnId();
void setDefaultAvatar(const QString &avatar);
protected: protected:
void resizeEvent(QResizeEvent *event); void resizeEvent(QResizeEvent *event);
@ -59,6 +60,7 @@ private slots:
private: private:
void refreshStatus(); void refreshStatus();
QString defaultAvatar;
Ui::AvatarWidget *ui; Ui::AvatarWidget *ui;
std::string mId; std::string mId;

View File

@ -114,12 +114,14 @@ void SecurityItem::updateItemStatic()
{ {
case SEC_TYPE_CONNECT_ATTEMPT: case SEC_TYPE_CONNECT_ATTEMPT:
title = tr("Connect Attempt"); title = tr("Connect Attempt");
avatar->setDefaultAvatar(":images/user/user_request48.png");
break; break;
case SEC_TYPE_AUTH_DENIED: case SEC_TYPE_AUTH_DENIED:
title = tr("Not Yet Friends"); title = tr("Not Yet Friends");
break; break;
case SEC_TYPE_UNKNOWN_IN: case SEC_TYPE_UNKNOWN_IN:
title = tr("Unknown (Incoming) Connect Attempt"); title = tr("Unknown (Incoming) Connect Attempt");
avatar->setDefaultAvatar(":images/user/user_request_unknown48.png");
break; break;
case SEC_TYPE_UNKNOWN_OUT: case SEC_TYPE_UNKNOWN_OUT:
title = tr("Unknown (Outgoing) Connect Attempt"); title = tr("Unknown (Outgoing) Connect Attempt");

View File

@ -464,6 +464,8 @@
<file>images/user/agt_forum128.png</file> <file>images/user/agt_forum128.png</file>
<file>images/user/group16.png</file> <file>images/user/group16.png</file>
<file>images/user/group24.png</file> <file>images/user/group24.png</file>
<file>images/user/user_request48.png</file>
<file>images/user/user_request_unknown48.png</file>
<file>images/up.png</file> <file>images/up.png</file>
<file>images/up0down0.png</file> <file>images/up0down0.png</file>
<file>images/up0down1.png</file> <file>images/up0down1.png</file>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB