Fixed display of the avatar in MsgItem.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3986 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2011-01-26 23:09:25 +00:00
parent c2a81daf01
commit 4fb593f1b9
4 changed files with 17 additions and 13 deletions

View File

@ -404,7 +404,7 @@ void NewsFeed::addFeedItemChatNew(RsFeedItem &fi)
void NewsFeed::addFeedItemMessage(RsFeedItem &fi)
{
/* make new widget */
MsgItem *mi = new MsgItem(this, NEWSFEED_MESSAGELIST, fi.mId1, fi.mId1, false);
MsgItem *mi = new MsgItem(this, NEWSFEED_MESSAGELIST, fi.mId1, false);
/* store in list */

View File

@ -27,6 +27,7 @@
#include "SubFileItem.h"
#include "gui/msgs/MessageComposer.h"
#include "gui/chat/HandleRichText.h"
#include "gui/notifyqt.h"
#include <retroshare/rsmsgs.h>
#include <retroshare/rspeers.h>
@ -36,8 +37,8 @@
****/
/** Constructor */
MsgItem::MsgItem(FeedHolder *parent, uint32_t feedId, std::string peerId, std::string msgId, bool isHome)
:QWidget(NULL), mParent(parent), mFeedId(feedId), mPeerId(peerId), mMsgId(msgId), mIsHome(isHome)
MsgItem::MsgItem(FeedHolder *parent, uint32_t feedId, std::string msgId, bool isHome)
:QWidget(NULL), mParent(parent), mFeedId(feedId), mMsgId(msgId), mIsHome(isHome)
{
/* Invoke the Qt Designer generated object setup routine */
setupUi(this);
@ -54,11 +55,12 @@ MsgItem::MsgItem(FeedHolder *parent, uint32_t feedId, std::string peerId, std::s
connect( deleteButton, SIGNAL( clicked( void ) ), this, SLOT( deleteMsg ( void ) ) );
connect( replyButton, SIGNAL( clicked( void ) ), this, SLOT( replyMsg ( void ) ) );
connect(NotifyQt::getInstance(), SIGNAL(peerHasNewAvatar(const QString&)), this, SLOT(updateAvatar(const QString&)));
small();
updateItemStatic();
updateItem();
updateAvatar(QString::fromStdString(mPeerId));
}

View File

@ -34,7 +34,7 @@ class MsgItem : public QWidget, private Ui::MsgItem
public:
/** Default Constructor */
MsgItem(FeedHolder *parent, uint32_t feedId, std::string peerId, std::string msgId, bool isHome);
MsgItem(FeedHolder *parent, uint32_t feedId, std::string msgId, bool isHome);
/** Default Destructor */

View File

@ -61,8 +61,8 @@ background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #2291E0, stop: 1 #3EB3FF);
}</string>
</property>
<property name="text">
<string/>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
@ -122,7 +122,7 @@ stop: 0 #2291E0, stop: 1 #3EB3FF);
<string/>
</property>
<property name="icon">
<iconset>
<iconset resource="../images.qrc">
<normaloff>:/images/edit_add24.png</normaloff>:/images/edit_add24.png</iconset>
</property>
</widget>
@ -142,7 +142,7 @@ stop: 0 #2291E0, stop: 1 #3EB3FF);
<string/>
</property>
<property name="icon">
<iconset>
<iconset resource="../images.qrc">
<normaloff>:/images/close_normal.png</normaloff>:/images/close_normal.png</iconset>
</property>
</widget>
@ -174,7 +174,7 @@ stop: 0 #2291E0, stop: 1 #3EB3FF);
<string>Reply Message</string>
</property>
<property name="icon">
<iconset>
<iconset resource="../images.qrc">
<normaloff>:/images/mail_reply.png</normaloff>:/images/mail_reply.png</iconset>
</property>
<property name="toolButtonStyle">
@ -213,7 +213,7 @@ stop: 0 #2291E0, stop: 1 #3EB3FF);
<string/>
</property>
<property name="icon">
<iconset>
<iconset resource="../images.qrc">
<normaloff>:/images/mail_delete.png</normaloff>:/images/mail_delete.png</iconset>
</property>
</widget>
@ -233,7 +233,7 @@ stop: 0 #2291E0, stop: 1 #3EB3FF);
<string/>
</property>
<property name="icon">
<iconset>
<iconset resource="../images.qrc">
<normaloff>:/images/startall.png</normaloff>:/images/startall.png</iconset>
</property>
</widget>
@ -275,6 +275,8 @@ stop: 0 #2291E0, stop: 1 #3EB3FF);
</item>
</layout>
</widget>
<resources/>
<resources>
<include location="../images.qrc"/>
</resources>
<connections/>
</ui>