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) void NewsFeed::addFeedItemMessage(RsFeedItem &fi)
{ {
/* make new widget */ /* 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 */ /* store in list */

View File

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

View File

@ -34,7 +34,7 @@ class MsgItem : public QWidget, private Ui::MsgItem
public: public:
/** Default Constructor */ /** 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 */ /** 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); stop: 0 #2291E0, stop: 1 #3EB3FF);
}</string> }</string>
</property> </property>
<property name="text"> <property name="scaledContents">
<string/> <bool>true</bool>
</property> </property>
</widget> </widget>
</item> </item>
@ -122,7 +122,7 @@ stop: 0 #2291E0, stop: 1 #3EB3FF);
<string/> <string/>
</property> </property>
<property name="icon"> <property name="icon">
<iconset> <iconset resource="../images.qrc">
<normaloff>:/images/edit_add24.png</normaloff>:/images/edit_add24.png</iconset> <normaloff>:/images/edit_add24.png</normaloff>:/images/edit_add24.png</iconset>
</property> </property>
</widget> </widget>
@ -142,7 +142,7 @@ stop: 0 #2291E0, stop: 1 #3EB3FF);
<string/> <string/>
</property> </property>
<property name="icon"> <property name="icon">
<iconset> <iconset resource="../images.qrc">
<normaloff>:/images/close_normal.png</normaloff>:/images/close_normal.png</iconset> <normaloff>:/images/close_normal.png</normaloff>:/images/close_normal.png</iconset>
</property> </property>
</widget> </widget>
@ -174,7 +174,7 @@ stop: 0 #2291E0, stop: 1 #3EB3FF);
<string>Reply Message</string> <string>Reply Message</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset> <iconset resource="../images.qrc">
<normaloff>:/images/mail_reply.png</normaloff>:/images/mail_reply.png</iconset> <normaloff>:/images/mail_reply.png</normaloff>:/images/mail_reply.png</iconset>
</property> </property>
<property name="toolButtonStyle"> <property name="toolButtonStyle">
@ -213,7 +213,7 @@ stop: 0 #2291E0, stop: 1 #3EB3FF);
<string/> <string/>
</property> </property>
<property name="icon"> <property name="icon">
<iconset> <iconset resource="../images.qrc">
<normaloff>:/images/mail_delete.png</normaloff>:/images/mail_delete.png</iconset> <normaloff>:/images/mail_delete.png</normaloff>:/images/mail_delete.png</iconset>
</property> </property>
</widget> </widget>
@ -233,7 +233,7 @@ stop: 0 #2291E0, stop: 1 #3EB3FF);
<string/> <string/>
</property> </property>
<property name="icon"> <property name="icon">
<iconset> <iconset resource="../images.qrc">
<normaloff>:/images/startall.png</normaloff>:/images/startall.png</iconset> <normaloff>:/images/startall.png</normaloff>:/images/startall.png</iconset>
</property> </property>
</widget> </widget>
@ -275,6 +275,8 @@ stop: 0 #2291E0, stop: 1 #3EB3FF);
</item> </item>
</layout> </layout>
</widget> </widget>
<resources/> <resources>
<include location="../images.qrc"/>
</resources>
<connections/> <connections/>
</ui> </ui>