Added a label for Connect Attempt after nickname "wants to be friends with you on RetroShare"

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5091 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2012-04-12 15:30:14 +00:00
parent 57260853b7
commit 68c07321ea
2 changed files with 24 additions and 1 deletions

View File

@ -57,6 +57,7 @@ SecurityItem::SecurityItem(FeedHolder *parent, uint32_t feedId, const std::strin
removeFriendButton->hide();
peerDetailsButton->setEnabled(false);
friendRequesttoolButton->hide();
request_label->hide();
/* general ones */
connect( expandButton, SIGNAL( clicked( void ) ), this, SLOT( toggle ( void ) ) );
@ -110,26 +111,34 @@ void SecurityItem::updateItemStatic()
std::cerr << std::endl;
#endif
QString title;
QString requesttext("<span style=\"font-size:14pt; font-weight:500;color:#990033;\">%1</span>");
;
switch(mType)
{
case SEC_TYPE_CONNECT_ATTEMPT:
title = tr("Connect Attempt");
request_label->show();
request_label->setText(requesttext.arg(tr("wants to be friends with you on RetroShare")));
avatar->setDefaultAvatar(":images/avatar_request.png");
break;
case SEC_TYPE_AUTH_DENIED:
title = tr("Not Yet Friends");
request_label->hide();
avatar->setDefaultAvatar(":images/avatar_request.png");
break;
case SEC_TYPE_UNKNOWN_IN:
title = tr("Unknown (Incoming) Connect Attempt");
request_label->hide();
avatar->setDefaultAvatar(":images/avatar_request_unknown.png");
break;
case SEC_TYPE_UNKNOWN_OUT:
title = tr("Unknown (Outgoing) Connect Attempt");
request_label->hide();
break;
default:
title = tr("Unknown Security Issue");
request_label->hide();
break;
}

View File

@ -93,7 +93,7 @@ border-radius: 10px}</string>
</property>
</widget>
</item>
<item row="1" column="0">
<item row="1" column="0" colspan="2">
<widget class="QLabel" name="titleLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
@ -116,6 +116,20 @@ border-radius: 10px}</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="request_label">
<property name="text">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt; color:#000000;&quot;&gt;TextLabel&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="2">