Added new widget to display an avatar with or without the status frame - AvatarWidget.
Changed all existing avatars to AvatarWidget. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4589 b45a01b8-16f6-495d-af2f-9b41ad6348cc
@ -315,6 +315,7 @@ HEADERS += rshare.h \
|
||||
gui/common/PopularityDefs.h \
|
||||
gui/common/GroupTreeWidget.h \
|
||||
gui/common/RSTreeView.h \
|
||||
gui/common/AvatarWidget.h \
|
||||
gui/style/RSStyle.h \
|
||||
gui/style/StyleDialog.h \
|
||||
gui/MessagesDialog.h \
|
||||
@ -432,6 +433,7 @@ FORMS += gui/StartDialog.ui \
|
||||
gui/im_history/ImHistoryBrowser.ui \
|
||||
gui/groups/CreateGroup.ui \
|
||||
gui/common/GroupTreeWidget.ui \
|
||||
gui/common/AvatarWidget.ui \
|
||||
gui/style/StyleDialog.ui \
|
||||
gui/dht/DhtWindow.ui \
|
||||
gui/GetStartedDialog.ui
|
||||
@ -536,6 +538,7 @@ SOURCES += main.cpp \
|
||||
gui/common/PopularityDefs.cpp \
|
||||
gui/common/GroupTreeWidget.cpp \
|
||||
gui/common/RSTreeView.cpp \
|
||||
gui/common/AvatarWidget.cpp \
|
||||
gui/style/RSStyle.cpp \
|
||||
gui/style/StyleDialog.cpp \
|
||||
gui/settings/configpage.cpp \
|
||||
|
@ -136,9 +136,7 @@ FriendsDialog::FriendsDialog(QWidget *parent)
|
||||
connect( ui.peertreeWidget, SIGNAL( itemDoubleClicked ( QTreeWidgetItem *, int)), this, SLOT(chatfriend(QTreeWidgetItem *)));
|
||||
connect( ui.peertreeWidget->header(), SIGNAL(sortIndicatorChanged(int,Qt::SortOrder)), this, SLOT(peerSortIndicatorChanged(int,Qt::SortOrder)));
|
||||
|
||||
connect(NotifyQt::getInstance(), SIGNAL(peerStatusChanged(QString,int)), this, SLOT(updateOwnStatus(QString,int)));
|
||||
|
||||
connect( ui.avatartoolButton, SIGNAL(clicked()), SLOT(getAvatar()));
|
||||
connect( ui.mypersonalstatuslabel, SIGNAL(clicked()), SLOT(statusmessage()));
|
||||
connect( ui.actionSet_your_Avatar, SIGNAL(triggered()), this, SLOT(getAvatar()));
|
||||
connect( ui.actionSet_your_Personal_Message, SIGNAL(triggered()), this, SLOT(statusmessage()));
|
||||
@ -151,6 +149,9 @@ FriendsDialog::FriendsDialog(QWidget *parent)
|
||||
connect(ui.actionSort_Peers_Ascending_Order, SIGNAL(triggered()), this, SLOT(sortPeersAscendingOrder()));
|
||||
connect(ui.actionSort_Peers_Descending_Order, SIGNAL(triggered()), this, SLOT(sortPeersDescendingOrder()));
|
||||
|
||||
ui.avatar->setFrameType(AvatarWidget::STATUS_FRAME);
|
||||
ui.avatar->setOwnId();
|
||||
|
||||
ui.peertabWidget->setTabPosition(QTabWidget::North);
|
||||
ui.peertabWidget->addTab(new ProfileWidget(), tr("Profile"));
|
||||
NewsFeed *newsFeed = new NewsFeed();
|
||||
@ -239,7 +240,6 @@ FriendsDialog::FriendsDialog(QWidget *parent)
|
||||
sizes << height() << 100; // Qt calculates the right sizes
|
||||
ui.splitter_2->setSizes(sizes);
|
||||
|
||||
updateAvatar();
|
||||
loadmypersonalstatus();
|
||||
displayMenu();
|
||||
|
||||
@ -1411,18 +1411,6 @@ void FriendsDialog::updateStatusString(const QString& peer_id, const QString& st
|
||||
QTimer::singleShot(5000,this,SLOT(resetStatusBar())) ;
|
||||
}
|
||||
|
||||
void FriendsDialog::updatePeersAvatar(const QString& peer_id)
|
||||
{
|
||||
#ifdef FRIENDS_DEBUG
|
||||
std::cerr << "FriendsDialog: Got notified of new avatar for peer " << peer_id.toStdString() << std::endl ;
|
||||
#endif
|
||||
|
||||
PopupChatDialog *pcd = PopupChatDialog::getPrivateChat(peer_id.toStdString(), 0);
|
||||
if (pcd) {
|
||||
pcd->updatePeerAvatar(peer_id.toStdString());
|
||||
}
|
||||
}
|
||||
|
||||
void FriendsDialog::updatePeerStatusString(const QString& peer_id,const QString& status_string,bool is_private_chat)
|
||||
{
|
||||
if(is_private_chat)
|
||||
@ -1794,15 +1782,6 @@ void FriendsDialog::viewprofile()
|
||||
}
|
||||
#endif
|
||||
|
||||
void FriendsDialog::updateAvatar()
|
||||
{
|
||||
QPixmap avatar;
|
||||
AvatarDefs::getOwnAvatar(avatar, "");
|
||||
ui.avatartoolButton->setIcon(avatar);
|
||||
|
||||
PopupChatDialog::updateAllAvatars();
|
||||
}
|
||||
|
||||
void FriendsDialog::getAvatar()
|
||||
{
|
||||
QByteArray ba;
|
||||
@ -2239,36 +2218,3 @@ void FriendsDialog::newsFeedChanged(int count)
|
||||
ui.peertabWidget->tabBar()->setTabIcon(newsFeedTabIndex, QIcon(IMAGE_NEWSFEED));
|
||||
}
|
||||
}
|
||||
|
||||
void FriendsDialog::updateOwnStatus(const QString &peer_id, int status)
|
||||
{
|
||||
// add self nick + own status
|
||||
if (peer_id.toStdString() == rsPeers->getOwnId())
|
||||
{
|
||||
// my status has changed
|
||||
|
||||
switch (status) {
|
||||
case RS_STATUS_OFFLINE:
|
||||
ui.avatartoolButton->setStyleSheet("QToolButton#avatartoolButton{border-image:url(:/images/mystatus_bg_offline.png); }");
|
||||
break;
|
||||
|
||||
case RS_STATUS_INACTIVE:
|
||||
ui.avatartoolButton->setStyleSheet("QToolButton#avatartoolButton{border-image:url(:/images/mystatus_bg_idle.png); }");
|
||||
break;
|
||||
|
||||
case RS_STATUS_ONLINE:
|
||||
ui.avatartoolButton->setStyleSheet("QToolButton#avatartoolButton{border-image:url(:/images/mystatus_bg_online.png); }");
|
||||
break;
|
||||
|
||||
case RS_STATUS_AWAY:
|
||||
ui.avatartoolButton->setStyleSheet("QToolButton#avatartoolButton{border-image:url(:/images/mystatus_bg_idle.png); }");
|
||||
break;
|
||||
|
||||
case RS_STATUS_BUSY:
|
||||
ui.avatartoolButton->setStyleSheet("QToolButton#avatartoolButton{border-image:url(:/images/mystatus_bg_busy.png); }");
|
||||
break;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -85,9 +85,6 @@ public slots:
|
||||
// called by notifyQt when another peer is typing (in group chant and private chat)
|
||||
void updatePeerStatusString(const QString& peer_id,const QString& status_string,bool is_private_chat) ;
|
||||
|
||||
void updatePeersAvatar(const QString& peer_id);
|
||||
void updateAvatar(); // called by notifyQt to update the avatar when it gets changed by another component
|
||||
|
||||
void groupsChanged(int type);
|
||||
|
||||
protected:
|
||||
@ -148,7 +145,6 @@ private slots:
|
||||
void getFont();
|
||||
|
||||
void getAvatar();
|
||||
void updateOwnStatus(const QString &peer_id, int status);
|
||||
|
||||
void on_actionAdd_Group_activated();
|
||||
void on_actionCreate_New_Forum_activated();
|
||||
|
@ -779,7 +779,7 @@ background: white;}</string>
|
||||
<number>1</number>
|
||||
</property>
|
||||
<item row="0" column="0" rowspan="2">
|
||||
<widget class="QToolButton" name="avatartoolButton">
|
||||
<widget class="AvatarWidget" name="avatar" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>61</width>
|
||||
@ -792,24 +792,6 @@ background: white;}</string>
|
||||
<height>61</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Add or Change your Avatar</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QToolButton#avatartoolButton{border-image: url(:/images/mystatus_bg.png);}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>43</width>
|
||||
<height>43</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" colspan="2">
|
||||
@ -1566,6 +1548,12 @@ background: white;}</string>
|
||||
</action>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>AvatarWidget</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>gui/common/AvatarWidget.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>RSTabWidget</class>
|
||||
<extends>QTabWidget</extends>
|
||||
|
@ -132,11 +132,13 @@ MessengerWindow::MessengerWindow(QWidget* parent, Qt::WFlags flags)
|
||||
m_compareRole = new RSTreeWidgetItemCompareRole;
|
||||
m_compareRole->setRole(COLUMN_NAME, ROLE_SORT);
|
||||
|
||||
ui.avatar->setFrameType(AvatarWidget::STATUS_FRAME);
|
||||
ui.avatar->setOwnId();
|
||||
|
||||
connect( ui.messengertreeWidget, SIGNAL( customContextMenuRequested( QPoint ) ), this, SLOT( messengertreeWidgetCostumPopupMenu( QPoint ) ) );
|
||||
#ifndef MINIMAL_RSGUI
|
||||
connect( ui.messengertreeWidget, SIGNAL(itemDoubleClicked ( QTreeWidgetItem *, int)), this, SLOT(chatfriend(QTreeWidgetItem *)));
|
||||
|
||||
connect( ui.avatarButton, SIGNAL(clicked()), SLOT(getAvatar()));
|
||||
connect( ui.shareButton, SIGNAL(clicked()), SLOT(openShareManager()));
|
||||
connect( ui.addIMAccountButton, SIGNAL(clicked( bool ) ), this , SLOT( addFriend() ) );
|
||||
#endif // MINIMAL_RSGUI
|
||||
@ -214,7 +216,6 @@ MessengerWindow::MessengerWindow(QWidget* parent, Qt::WFlags flags)
|
||||
ui.statusButton->setMenu(pStatusMenu);
|
||||
}
|
||||
|
||||
updateAvatar();
|
||||
loadmystatusmessage();
|
||||
#endif // MINIMAL_RSGUI
|
||||
|
||||
@ -683,7 +684,7 @@ void MessengerWindow::insertPeers()
|
||||
gpg_item -> setText(COLUMN_STATE, StatusDefs::name(it->status));
|
||||
|
||||
QPixmap avatar;
|
||||
AvatarDefs::getAvatarFromSslId(it->id, avatar, ":/images/no_avatar_70.png");
|
||||
AvatarDefs::getAvatarFromSslId(it->id, avatar);
|
||||
QIcon avatar_icon(avatar);
|
||||
gpg_item->setIcon(COLUMN_STATE, avatar_icon);
|
||||
|
||||
@ -1076,25 +1077,6 @@ void MessengerWindow::sendMessage()
|
||||
MessageComposer::msgFriend(id, false);
|
||||
}
|
||||
|
||||
void MessengerWindow::updateAvatar()
|
||||
{
|
||||
QPixmap avatar;
|
||||
AvatarDefs::getOwnAvatar(avatar);
|
||||
ui.avatarButton->setIcon(avatar);
|
||||
}
|
||||
|
||||
void MessengerWindow::getAvatar()
|
||||
{
|
||||
QByteArray ba;
|
||||
if (misc::getOpenAvatarPicture(this, ba))
|
||||
{
|
||||
#ifdef MSG_DEBUG
|
||||
std::cerr << "Avatar image size = " << ba.size() << std::endl ;
|
||||
#endif
|
||||
rsMsgs->setOwnAvatarData((unsigned char *)(ba.data()), ba.size()) ; // last char 0 included.
|
||||
}
|
||||
}
|
||||
|
||||
/** Loads own personal status message */
|
||||
void MessengerWindow::loadmystatusmessage()
|
||||
{
|
||||
@ -1116,28 +1098,6 @@ void MessengerWindow::updateOwnStatus(const QString &peer_id, int status)
|
||||
|
||||
ui.statusButton->setText(m_nickName + " (" + StatusDefs::name(status) + ")");
|
||||
|
||||
switch (status) {
|
||||
case RS_STATUS_OFFLINE:
|
||||
ui.avatarButton->setStyleSheet("QToolButton#avatarButton{border-image:url(:/images/mystatus_bg_offline.png); }");
|
||||
break;
|
||||
|
||||
case RS_STATUS_INACTIVE:
|
||||
ui.avatarButton->setStyleSheet("QToolButton#avatarButton{border-image:url(:/images/mystatus_bg_idle.png); }");
|
||||
break;
|
||||
|
||||
case RS_STATUS_ONLINE:
|
||||
ui.avatarButton->setStyleSheet("QToolButton#avatarButton{border-image:url(:/images/mystatus_bg_online.png); }");
|
||||
break;
|
||||
|
||||
case RS_STATUS_AWAY:
|
||||
ui.avatarButton->setStyleSheet("QToolButton#avatarButton{border-image:url(:/images/mystatus_bg_idle.png); }");
|
||||
break;
|
||||
|
||||
case RS_STATUS_BUSY:
|
||||
ui.avatarButton->setStyleSheet("QToolButton#avatarButton{border-image:url(:/images/mystatus_bg_busy.png); }");
|
||||
break;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -45,7 +45,6 @@ class MessengerWindow : public RWindow
|
||||
public slots:
|
||||
void updateMessengerDisplay() ;
|
||||
#ifndef MINIMAL_RSGUI
|
||||
void updateAvatar();
|
||||
void loadmystatusmessage();
|
||||
#endif // MINIMAL_RSGUI
|
||||
|
||||
@ -88,9 +87,6 @@ private slots:
|
||||
/** Open Shared Manager **/
|
||||
void openShareManager();
|
||||
|
||||
/** get own last stored Avatar**/
|
||||
void getAvatar();
|
||||
|
||||
void updateOwnStatus(const QString &peer_id, int status);
|
||||
|
||||
void savestatusmessage();
|
||||
|
@ -47,7 +47,7 @@
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QToolButton" name="avatarButton">
|
||||
<widget class="AvatarWidget" name="avatar" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>70</width>
|
||||
@ -60,25 +60,6 @@
|
||||
<height>70</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Click to Change your Avatar</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QToolButton#avatarButton{border-image: url(:/images/mystatus_bg.png);}</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="images.qrc">
|
||||
<normaloff>:/images/user/personal64.png</normaloff>:/images/user/personal64.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
@ -401,9 +382,6 @@ border: 1px solid #CCCCCC;
|
||||
<attribute name="headerShowSortIndicator" stdset="0">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<attribute name="headerShowSortIndicator" stdset="0">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
@ -473,6 +451,14 @@ border: 1px solid #CCCCCC;
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>AvatarWidget</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>gui/common/AvatarWidget.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="images.qrc"/>
|
||||
</resources>
|
||||
|
@ -127,12 +127,17 @@ PopupChatDialog::PopupChatDialog(const std::string &id, const QString &name, QWi
|
||||
connect(ui.actionSave_Chat_History, SIGNAL(triggered()), this, SLOT(fileSaveAs()));
|
||||
connect(ui.actionClearOfflineMessages, SIGNAL(triggered()), this, SLOT(clearOfflineMessages()));
|
||||
|
||||
|
||||
connect(NotifyQt::getInstance(), SIGNAL(peerStatusChanged(const QString&, int)), this, SLOT(updateStatus(const QString&, int)));
|
||||
connect(NotifyQt::getInstance(), SIGNAL(peerHasNewCustomStateString(const QString&, const QString&)), this, SLOT(updatePeersCustomStateString(const QString&, const QString&)));
|
||||
|
||||
connect(ui.chattextEdit,SIGNAL(customContextMenuRequested(QPoint)),this,SLOT(contextMenu(QPoint)));
|
||||
|
||||
ui.avatarWidget->setFrameType(AvatarWidget::STATUS_FRAME);
|
||||
ui.avatarWidget->setId(dialogId, false);
|
||||
|
||||
ui.ownAvatarWidget->setFrameType(AvatarWidget::STATUS_FRAME);
|
||||
ui.ownAvatarWidget->setOwnId();
|
||||
|
||||
// Create the status bar
|
||||
resetStatusBar();
|
||||
|
||||
@ -164,9 +169,6 @@ PopupChatDialog::PopupChatDialog(const std::string &id, const QString &name, QWi
|
||||
colorChanged(mCurrentColor);
|
||||
fontChanged(mCurrentFont);
|
||||
|
||||
updateOwnAvatar() ;
|
||||
updatePeerAvatar(id) ;
|
||||
|
||||
// load settings
|
||||
processSettings(true);
|
||||
|
||||
@ -179,11 +181,6 @@ PopupChatDialog::PopupChatDialog(const std::string &id, const QString &name, QWi
|
||||
rsStatus->getStatus(dialogId, peerStatusInfo);
|
||||
updateStatus(QString::fromStdString(dialogId), peerStatusInfo.status);
|
||||
|
||||
StatusInfo ownStatusInfo;
|
||||
if (rsStatus->getOwnStatus(ownStatusInfo)) {
|
||||
updateStatus(QString::fromStdString(ownStatusInfo.id), ownStatusInfo.status);
|
||||
}
|
||||
|
||||
// initialize first custom state string
|
||||
QString customStateString = QString::fromUtf8(rsMsgs->getCustomStateString(dialogId).c_str());
|
||||
updatePeersCustomStateString(QString::fromStdString(dialogId), customStateString);
|
||||
@ -413,12 +410,6 @@ void PopupChatDialog::chatFriend(const std::string &id)
|
||||
}
|
||||
}
|
||||
|
||||
/*static*/ void PopupChatDialog::updateAllAvatars()
|
||||
{
|
||||
for(std::map<std::string, PopupChatDialog *>::const_iterator it(chatDialogs.begin());it!=chatDialogs.end();++it)
|
||||
it->second->updateOwnAvatar() ;
|
||||
}
|
||||
|
||||
void PopupChatDialog::focusDialog()
|
||||
{
|
||||
ui.chattextEdit->setFocus();
|
||||
@ -845,25 +836,6 @@ void PopupChatDialog::on_actionDelete_Chat_History_triggered()
|
||||
}
|
||||
}
|
||||
|
||||
void PopupChatDialog::updatePeerAvatar(const std::string& peer_id)
|
||||
{
|
||||
#ifdef CHAT_DEBUG
|
||||
std::cerr << "popupchatDialog::updatePeerAvatar() updating avatar for peer " << peer_id << std::endl ;
|
||||
std::cerr << "Requesting avatar image for peer " << peer_id << std::endl ;
|
||||
#endif
|
||||
|
||||
QPixmap avatar;
|
||||
AvatarDefs::getAvatarFromSslId(peer_id, avatar);
|
||||
ui.avatarlabel->setPixmap(avatar);
|
||||
}
|
||||
|
||||
void PopupChatDialog::updateOwnAvatar()
|
||||
{
|
||||
QPixmap avatar;
|
||||
AvatarDefs::getOwnAvatar(avatar);
|
||||
ui.myavatarlabel->setPixmap(avatar);
|
||||
}
|
||||
|
||||
void PopupChatDialog::addExtraFile()
|
||||
{
|
||||
QString file;
|
||||
@ -1119,35 +1091,25 @@ void PopupChatDialog::updateStatus(const QString &peer_id, int status)
|
||||
|
||||
switch (status) {
|
||||
case RS_STATUS_OFFLINE:
|
||||
ui.avatarlabel->setStyleSheet("QLabel#avatarlabel{ border-image:url(:/images/avatarstatus_bg_offline.png); }");
|
||||
ui.avatarlabel->setEnabled(false);
|
||||
ui.infoframe->setVisible(true);
|
||||
ui.infolabel->setText(dialogName + " " + tr("apears to be Offline.") +"\n" + tr("Messages you send will be delivered after Friend is again Online"));
|
||||
break;
|
||||
|
||||
case RS_STATUS_INACTIVE:
|
||||
ui.avatarlabel->setStyleSheet("QLabel#avatarlabel{ border-image:url(:/images/avatarstatus_bg_away.png); }");
|
||||
ui.avatarlabel->setEnabled(true);
|
||||
ui.infoframe->setVisible(true);
|
||||
ui.infolabel->setText(dialogName + " " + tr("is Idle and may not reply"));
|
||||
break;
|
||||
|
||||
case RS_STATUS_ONLINE:
|
||||
ui.avatarlabel->setStyleSheet("QLabel#avatarlabel{ border-image:url(:/images/avatarstatus_bg_online.png); }");
|
||||
ui.avatarlabel->setEnabled(true);
|
||||
ui.infoframe->setVisible(false);
|
||||
break;
|
||||
|
||||
case RS_STATUS_AWAY:
|
||||
ui.avatarlabel->setStyleSheet("QLabel#avatarlabel{ border-image:url(:/images/avatarstatus_bg_away.png); }");
|
||||
ui.avatarlabel->setEnabled(true);
|
||||
ui.infolabel->setText(dialogName + " " + tr("is Away and may not reply"));
|
||||
ui.infoframe->setVisible(true);
|
||||
break;
|
||||
|
||||
case RS_STATUS_BUSY:
|
||||
ui.avatarlabel->setStyleSheet("QLabel#avatarlabel{ border-image:url(:/images/avatarstatus_bg_busy.png); }");
|
||||
ui.avatarlabel->setEnabled(true);
|
||||
ui.infolabel->setText(dialogName + " " + tr("is Busy and may not reply"));
|
||||
ui.infoframe->setVisible(true);
|
||||
break;
|
||||
@ -1166,34 +1128,6 @@ void PopupChatDialog::updateStatus(const QString &peer_id, int status)
|
||||
return;
|
||||
}
|
||||
|
||||
if (stdPeerId == rsPeers->getOwnId()) {
|
||||
// my status has changed
|
||||
|
||||
switch (status) {
|
||||
case RS_STATUS_OFFLINE:
|
||||
ui.myavatarlabel->setStyleSheet("QLabel#myavatarlabel{border-image:url(:/images/avatarstatus_bg_offline.png); }");
|
||||
break;
|
||||
|
||||
case RS_STATUS_INACTIVE:
|
||||
ui.myavatarlabel->setStyleSheet("QLabel#myavatarlabel{border-image:url(:/images/avatarstatus_bg_away.png); }");
|
||||
break;
|
||||
|
||||
case RS_STATUS_ONLINE:
|
||||
ui.myavatarlabel->setStyleSheet("QLabel#myavatarlabel{border-image:url(:/images/avatarstatus_bg_online.png); }");
|
||||
break;
|
||||
|
||||
case RS_STATUS_AWAY:
|
||||
ui.myavatarlabel->setStyleSheet("QLabel#myavatarlabel{border-image:url(:/images/avatarstatus_bg_away.png); }");
|
||||
break;
|
||||
|
||||
case RS_STATUS_BUSY:
|
||||
ui.myavatarlabel->setStyleSheet("QLabel#myavatarlabel{border-image:url(:/images/avatarstatus_bg_busy.png); }");
|
||||
break;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// ignore status change
|
||||
}
|
||||
|
||||
|
@ -48,11 +48,9 @@ public:
|
||||
static PopupChatDialog *getPrivateChat(const std::string &id, uint chatflags);
|
||||
static void cleanupChat();
|
||||
static void chatFriend(const std::string &id);
|
||||
static void updateAllAvatars();
|
||||
static void privateChatChanged(int list, int type);
|
||||
|
||||
void updateStatusString(const QString& peer_id, const QString& statusString);
|
||||
void updatePeerAvatar(const std::string&);
|
||||
std::string getPeerId() { return dialogId; }
|
||||
QString getTitle() { return dialogName; }
|
||||
bool hasNewMessages() { return newMessages; }
|
||||
@ -81,8 +79,6 @@ protected:
|
||||
void insertChatMsgs();
|
||||
void addChatMsg(bool incoming, const std::string &id, const QString &name, const QDateTime &sendTime, const QDateTime &recvTime, const QString &message, enumChatType chatType, bool addToHistory);
|
||||
|
||||
void updateOwnAvatar();
|
||||
|
||||
private slots:
|
||||
void pasteLink() ;
|
||||
void contextMenu(QPoint) ;
|
||||
|
@ -139,7 +139,7 @@
|
||||
<number>9</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="avatarlabel">
|
||||
<widget class="AvatarWidget" name="avatarWidget" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>116</width>
|
||||
@ -152,18 +152,6 @@
|
||||
<height>116</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel{
|
||||
border-image: url(:/images/avatarstatus_bg.png);
|
||||
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
@ -180,7 +168,7 @@ border-image: url(:/images/avatarstatus_bg.png);
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="myavatarlabel">
|
||||
<widget class="AvatarWidget" name="ownAvatarWidget" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>116</width>
|
||||
@ -193,18 +181,6 @@ border-image: url(:/images/avatarstatus_bg.png);
|
||||
<height>116</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel{
|
||||
border-image: url(:/images/avatarstatus_bg.png);
|
||||
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
@ -929,6 +905,14 @@ background: white;}</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>AvatarWidget</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>gui/common/AvatarWidget.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="../images.qrc"/>
|
||||
</resources>
|
||||
|
282
retroshare-gui/src/gui/common/AvatarWidget.cpp
Normal file
@ -0,0 +1,282 @@
|
||||
/****************************************************************
|
||||
* This file is distributed under the following license:
|
||||
*
|
||||
* Copyright (c) 2010, RetroShare Team
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
****************************************************************/
|
||||
|
||||
#include <retroshare/rsstatus.h>
|
||||
#include <retroshare/rspeers.h>
|
||||
#include <retroshare/rsmsgs.h>
|
||||
|
||||
#include "gui/notifyqt.h"
|
||||
#include "gui/common/AvatarDefs.h"
|
||||
#include "util/misc.h"
|
||||
|
||||
#include "AvatarWidget.h"
|
||||
#include "ui_AvatarWidget.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
AvatarWidget::AvatarWidget(QWidget *parent) :
|
||||
QWidget(parent), ui(new Ui::AvatarWidget)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
mFlag.isOwnId = false;
|
||||
mFlag.isGpg = false;
|
||||
|
||||
setFrameType(NO_FRAME);
|
||||
|
||||
/* connect signals */
|
||||
connect(NotifyQt::getInstance(), SIGNAL(peerHasNewAvatar(const QString&)), this, SLOT(updateAvatar(const QString&)));
|
||||
connect(NotifyQt::getInstance(), SIGNAL(ownAvatarChanged()), this, SLOT(updateOwnAvatar()));
|
||||
}
|
||||
|
||||
AvatarWidget::~AvatarWidget()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
static bool isSmall(const QSize &size)
|
||||
{
|
||||
if (size.width() <= 70 && size.height() <= 70) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void AvatarWidget::resizeEvent(QResizeEvent *event)
|
||||
{
|
||||
if (mFrameType == NO_FRAME) {
|
||||
return;
|
||||
}
|
||||
|
||||
QSize widgetSize = size();
|
||||
QSize avatarSize;
|
||||
if (isSmall(widgetSize)) {
|
||||
avatarSize = QSize(widgetSize.width() * 50 / 70, widgetSize.height() * 50 / 70);
|
||||
} else {
|
||||
avatarSize = QSize(widgetSize.width() * 96 / 116, widgetSize.height() * 96 / 116);
|
||||
}
|
||||
int x = (widgetSize.width() - avatarSize.width()) / 2;
|
||||
int y = (widgetSize.height() - avatarSize.height()) / 2;
|
||||
ui->avatarFrameLayout->setContentsMargins(x, y, x, y);
|
||||
|
||||
refreshStatus();
|
||||
}
|
||||
|
||||
void AvatarWidget::mouseReleaseEvent(QMouseEvent *event)
|
||||
{
|
||||
if (mFlag.isOwnId) {
|
||||
QByteArray ba;
|
||||
if (misc::getOpenAvatarPicture(this, ba)) {
|
||||
rsMsgs->setOwnAvatarData((unsigned char*)(ba.data()), ba.size()); // last char 0 included.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void AvatarWidget::setFrameType(FrameType type)
|
||||
{
|
||||
mFrameType = type;
|
||||
|
||||
switch (mFrameType) {
|
||||
case NO_FRAME:
|
||||
disconnect(NotifyQt::getInstance(), SIGNAL(peerStatusChanged(QString,int)), this, SLOT(updateStatus(const QString&, int)));
|
||||
ui->avatarFrameLayout->setContentsMargins(0, 0, 0, 0);
|
||||
break;
|
||||
case NORMAL_FRAME:
|
||||
disconnect(NotifyQt::getInstance(), SIGNAL(peerStatusChanged(QString,int)), this, SLOT(updateStatus(const QString&, int)));
|
||||
break;
|
||||
case STATUS_FRAME:
|
||||
connect(NotifyQt::getInstance(), SIGNAL(peerStatusChanged(QString,int)), this, SLOT(updateStatus(const QString&, int)));
|
||||
break;
|
||||
}
|
||||
|
||||
refreshStatus();
|
||||
updateAvatar(QString::fromStdString(mId));
|
||||
}
|
||||
|
||||
void AvatarWidget::setId(const std::string &id, bool isGpg)
|
||||
{
|
||||
mId = id;
|
||||
mFlag.isGpg = isGpg;
|
||||
|
||||
if (mId == rsPeers->getOwnId()) {
|
||||
mFlag.isOwnId = true;
|
||||
ui->avatar->setToolTip(tr("Click to change your avatar"));
|
||||
}
|
||||
|
||||
ui->avatar->setPixmap(QPixmap());
|
||||
|
||||
if (mId.empty()) {
|
||||
ui->avatar->setEnabled(false);
|
||||
}
|
||||
|
||||
refreshStatus();
|
||||
updateAvatar(QString::fromStdString(mId));
|
||||
}
|
||||
|
||||
void AvatarWidget::setOwnId()
|
||||
{
|
||||
setId(rsPeers->getOwnId(), false);
|
||||
}
|
||||
|
||||
void AvatarWidget::refreshStatus()
|
||||
{
|
||||
switch (mFrameType) {
|
||||
case NO_FRAME:
|
||||
ui->avatarFrame->setStyleSheet("");
|
||||
break;
|
||||
case NORMAL_FRAME:
|
||||
ui->avatarFrame->setStyleSheet(isSmall(size()) ? "QFrame#avatarFrame{ border-image:url(:/images/avatarstatus-bg-70.png); }" : "QFrame#avatarFrame{ border-image:url(:/images/avatarstatus-bg-116.png); }");
|
||||
break;
|
||||
case STATUS_FRAME:
|
||||
{
|
||||
StatusInfo statusInfo;
|
||||
|
||||
// No check of return value. Non existing status info is handled as offline.
|
||||
if (mFlag.isOwnId) {
|
||||
rsStatus->getOwnStatus(statusInfo);
|
||||
} else {
|
||||
rsStatus->getStatus(mId, statusInfo);
|
||||
}
|
||||
updateStatus(QString::fromStdString(statusInfo.id), statusInfo.status);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static QString getStatusFrame(bool small, int status)
|
||||
{
|
||||
if (small) {
|
||||
switch (status) {
|
||||
case RS_STATUS_OFFLINE:
|
||||
return "QFrame#avatarFrame{ border-image:url(:/images/avatarstatus-bg-offline-70.png); }";
|
||||
case RS_STATUS_INACTIVE:
|
||||
return "QFrame#avatarFrame{ border-image:url(:/images/avatarstatus-bg-idle-70.png); }";
|
||||
case RS_STATUS_ONLINE:
|
||||
return "QFrame#avatarFrame{ border-image:url(:/images/avatarstatus-bg-online-70.png); }";
|
||||
case RS_STATUS_AWAY:
|
||||
return "QFrame#avatarFrame{ border-image:url(:/images/avatarstatus-bg-away-70.png); }";
|
||||
case RS_STATUS_BUSY:
|
||||
return "QFrame#avatarFrame{ border-image:url(:/images/avatarstatus-bg-busy-70.png); }";
|
||||
}
|
||||
|
||||
return "QFrame#avatarFrame{ border-image:url(:/images/avatarstatus-bg-70.png); }";
|
||||
} else {
|
||||
switch (status) {
|
||||
case RS_STATUS_OFFLINE:
|
||||
return "QFrame#avatarFrame{ border-image:url(:/images/avatarstatus-bg-offline-116.png); }";
|
||||
case RS_STATUS_INACTIVE:
|
||||
return "QFrame#avatarFrame{ border-image:url(:/images/avatarstatus-bg-away-116.png); }";
|
||||
case RS_STATUS_ONLINE:
|
||||
return "QFrame#avatarFrame{ border-image:url(:/images/avatarstatus-bg-online-116.png); }";
|
||||
case RS_STATUS_AWAY:
|
||||
return "QFrame#avatarFrame{ border-image:url(:/images/avatarstatus-bg-away-116.png); }";
|
||||
case RS_STATUS_BUSY:
|
||||
return "QFrame#avatarFrame{ border-image:url(:/images/avatarstatus-bg-busy-116.png); }";
|
||||
}
|
||||
|
||||
return "QFrame#avatarFrame{ border-image:url(:/images/avatarstatus-bg-116.png); }";
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
void AvatarWidget::updateStatus(const QString peerId, int status)
|
||||
{
|
||||
if (mFrameType != STATUS_FRAME) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (mId.empty()) {
|
||||
ui->avatarFrame->setStyleSheet(getStatusFrame(isSmall(size()), RS_STATUS_OFFLINE));
|
||||
return;
|
||||
}
|
||||
|
||||
/* set style for status */
|
||||
if (mId == peerId.toStdString()) {
|
||||
// the peers status has changed
|
||||
|
||||
ui->avatarFrame->setStyleSheet(getStatusFrame(isSmall(size()), status));
|
||||
|
||||
ui->avatar->setEnabled(((uint32_t) status == RS_STATUS_OFFLINE) ? false : true);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// ignore status change
|
||||
}
|
||||
|
||||
void AvatarWidget::updateAvatar(const QString &peerId)
|
||||
{
|
||||
QString defaultAvatar = ":/images/no_avatar_background.png";
|
||||
|
||||
if (mId.empty()) {
|
||||
QPixmap avatar(defaultAvatar);
|
||||
ui->avatar->setPixmap(avatar);
|
||||
return;
|
||||
}
|
||||
|
||||
if (mFlag.isOwnId) {
|
||||
QPixmap avatar;
|
||||
AvatarDefs::getOwnAvatar(avatar);
|
||||
ui->avatar->setPixmap(avatar);
|
||||
return;
|
||||
}
|
||||
|
||||
if (mFlag.isGpg) {
|
||||
if (mId == peerId.toStdString()) {
|
||||
/* called from AvatarWidget with gpg id */
|
||||
QPixmap avatar;
|
||||
AvatarDefs::getAvatarFromGpgId(mId, avatar, defaultAvatar);
|
||||
ui->avatar->setPixmap(avatar);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Is this one of the ssl ids of the gpg id ? */
|
||||
std::list<std::string> sslIds;
|
||||
if (rsPeers->getAssociatedSSLIds(mId, sslIds) == false) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (std::find(sslIds.begin(), sslIds.end(), peerId.toStdString()) != sslIds.end()) {
|
||||
/* One of the ssl ids of the gpg id */
|
||||
QPixmap avatar;
|
||||
AvatarDefs::getAvatarFromGpgId(mId, avatar, defaultAvatar);
|
||||
ui->avatar->setPixmap(avatar);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (mId == peerId.toStdString()) {
|
||||
QPixmap avatar;
|
||||
AvatarDefs::getAvatarFromSslId(mId, avatar, defaultAvatar);
|
||||
ui->avatar->setPixmap(avatar);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void AvatarWidget::updateOwnAvatar()
|
||||
{
|
||||
if (mFlag.isOwnId) {
|
||||
updateAvatar(QString::fromStdString(mId));
|
||||
}
|
||||
}
|
72
retroshare-gui/src/gui/common/AvatarWidget.h
Normal file
@ -0,0 +1,72 @@
|
||||
/****************************************************************
|
||||
* This file is distributed under the following license:
|
||||
*
|
||||
* Copyright (c) 2010, RetroShare Team
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
****************************************************************/
|
||||
|
||||
#ifndef AVATARWIDGET_H
|
||||
#define AVATARWIDGET_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
namespace Ui {
|
||||
class AvatarWidget;
|
||||
}
|
||||
|
||||
class AvatarWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
enum FrameType {
|
||||
NO_FRAME,
|
||||
NORMAL_FRAME,
|
||||
STATUS_FRAME
|
||||
};
|
||||
|
||||
public:
|
||||
AvatarWidget(QWidget *parent = 0);
|
||||
~AvatarWidget();
|
||||
|
||||
void setFrameType(FrameType type);
|
||||
void setId(const std::string& id, bool isGpg);
|
||||
void setOwnId();
|
||||
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent *event);
|
||||
void mouseReleaseEvent(QMouseEvent *event);
|
||||
|
||||
private slots:
|
||||
void updateStatus(const QString peerId, int status);
|
||||
void updateAvatar(const QString& peerId);
|
||||
void updateOwnAvatar();
|
||||
|
||||
private:
|
||||
void refreshStatus();
|
||||
|
||||
Ui::AvatarWidget *ui;
|
||||
|
||||
std::string mId;
|
||||
struct {
|
||||
bool isOwnId : 1;
|
||||
bool isGpg : 1;
|
||||
} mFlag;
|
||||
FrameType mFrameType;
|
||||
};
|
||||
|
||||
#endif // AVATARWIDGET_H
|
46
retroshare-gui/src/gui/common/AvatarWidget.ui
Normal file
@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>AvatarWidget</class>
|
||||
<widget class="QWidget" name="AvatarWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>116</width>
|
||||
<height>116</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QFrame" name="avatarFrame">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QFrame#avatarFrame{ border-image:url(:/images/avatarstatus-bg-116.png); }</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="avatarFrameLayout">
|
||||
<property name="margin">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="avatar">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
@ -79,10 +79,6 @@ ConfCertDialog::ConfCertDialog(const std::string& id, QWidget *parent, Qt::WFlag
|
||||
connect(ui.signKeyButton, SIGNAL(clicked()), this, SLOT(signGPGKey()));
|
||||
connect(ui.trusthelpButton, SIGNAL(clicked()), this, SLOT(showHelpDialog()));
|
||||
|
||||
connect(NotifyQt::getInstance(), SIGNAL(peerHasNewAvatar(const QString&)), this, SLOT(updatePeersAvatar(const QString&)));
|
||||
|
||||
isOnlyGpg = false;
|
||||
|
||||
#ifndef MINIMAL_RSGUI
|
||||
MainWindow *w = MainWindow::getInstance();
|
||||
if (w) {
|
||||
@ -143,8 +139,6 @@ void ConfCertDialog::load()
|
||||
return;
|
||||
}
|
||||
|
||||
isOnlyGpg = detail.isOnlyGPGdetail;
|
||||
|
||||
ui.name->setText(QString::fromUtf8(detail.name.c_str()));
|
||||
ui.peerid->setText(QString::fromStdString(detail.id));
|
||||
|
||||
@ -155,6 +149,7 @@ void ConfCertDialog::load()
|
||||
ui.rsid->setToolTip(link.title());
|
||||
|
||||
if (!detail.isOnlyGPGdetail) {
|
||||
ui.avatar->setId(mId, false);
|
||||
|
||||
ui.loc->setText(QString::fromUtf8(detail.location.c_str()));
|
||||
// Dont Show a timestamp in RS calculate the day
|
||||
@ -199,6 +194,8 @@ void ConfCertDialog::load()
|
||||
ui.rsid->hide();
|
||||
ui.label_rsid->hide();
|
||||
} else {
|
||||
ui.avatar->setId(mId, true);
|
||||
|
||||
ui.rsid->show();
|
||||
ui.label_rsid->show();
|
||||
ui.loc->hide();
|
||||
@ -335,8 +332,6 @@ void ConfCertDialog::load()
|
||||
font.setStyle(QFont::StyleNormal);
|
||||
ui.userCertificateText->setFont(font);
|
||||
ui.userCertificateText->setText(QString::fromUtf8(invite.c_str()));
|
||||
|
||||
updatePeersAvatar(QString::fromStdString(mId));
|
||||
}
|
||||
|
||||
|
||||
@ -450,20 +445,3 @@ void ConfCertDialog::showHelpDialog(const QString &topic)
|
||||
helpBrowser = new HelpBrowser(this);
|
||||
helpBrowser->showWindow(topic);
|
||||
}
|
||||
|
||||
void ConfCertDialog::updatePeersAvatar(const QString& peer_id)
|
||||
{
|
||||
if (isOnlyGpg) {
|
||||
QPixmap avatar;
|
||||
AvatarDefs::getAvatarFromGpgId(mId, avatar);
|
||||
ui.AvatarLabel->setPixmap(avatar);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (mId == peer_id.toStdString()) {
|
||||
QPixmap avatar;
|
||||
AvatarDefs::getAvatarFromSslId(mId, avatar);
|
||||
ui.AvatarLabel->setPixmap(avatar);
|
||||
}
|
||||
}
|
||||
|
@ -60,11 +60,8 @@ private slots:
|
||||
/** Called when a child window requests the given help <b>topic</b>. */
|
||||
void showHelpDialog(const QString &topic);
|
||||
|
||||
void updatePeersAvatar(const QString& peer_id);
|
||||
|
||||
private:
|
||||
std::string mId;
|
||||
bool isOnlyGpg;
|
||||
|
||||
/** Qt Designer generated object */
|
||||
Ui::ConfCertDialog ui;
|
||||
|
@ -32,20 +32,7 @@
|
||||
<string>Details</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="AvatarLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>96</width>
|
||||
<height>96</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" rowspan="2">
|
||||
<item row="0" column="1" rowspan="3">
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="title">
|
||||
<string>Peer Info</string>
|
||||
@ -189,7 +176,7 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<item row="2" column="0">
|
||||
<spacer name="verticalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
@ -202,7 +189,7 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2">
|
||||
<item row="3" column="0" colspan="2">
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Peer Address</string>
|
||||
@ -366,7 +353,7 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2">
|
||||
<item row="4" column="0" colspan="2">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
@ -379,6 +366,37 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QFrame" name="avatarFrame">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::Panel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Sunken</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="AvatarWidget" name="avatar" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>96</width>
|
||||
<height>96</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>96</width>
|
||||
<height>96</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_2">
|
||||
@ -733,6 +751,14 @@ p, li { white-space: pre-wrap; }
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>AvatarWidget</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>gui/common/AvatarWidget.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="../images.qrc"/>
|
||||
</resources>
|
||||
|
@ -66,9 +66,10 @@ ChatMsgItem::ChatMsgItem(FeedHolder *parent, uint32_t feedId, std::string peerId
|
||||
|
||||
connect(NotifyQt::getInstance(), SIGNAL(peerHasNewAvatar(const QString&)), this, SLOT(updateAvatar(const QString&)));
|
||||
|
||||
avatar->setId(mPeerId, false);
|
||||
|
||||
updateItemStatic();
|
||||
updateItem();
|
||||
updateAvatar(QString::fromStdString(mPeerId));
|
||||
insertChat(message);
|
||||
}
|
||||
|
||||
@ -222,18 +223,6 @@ void ChatMsgItem::openChat()
|
||||
}
|
||||
}
|
||||
|
||||
void ChatMsgItem::updateAvatar(const QString &peer_id)
|
||||
{
|
||||
if (peer_id.toStdString() != mPeerId) {
|
||||
/* it 's not me */
|
||||
return;
|
||||
}
|
||||
|
||||
QPixmap avatar;
|
||||
AvatarDefs::getAvatarFromSslId(mPeerId, avatar, ":/images/user/personal64.png");
|
||||
avatar_label->setPixmap(avatar);
|
||||
}
|
||||
|
||||
void ChatMsgItem::togglequickmessage()
|
||||
{
|
||||
if (messageframe->isHidden())
|
||||
|
@ -50,7 +50,6 @@ private slots:
|
||||
void openChat();
|
||||
|
||||
void updateItem();
|
||||
void updateAvatar(const QString &peer_id);
|
||||
|
||||
void togglequickmessage();
|
||||
void sendMessage();
|
||||
|
@ -43,7 +43,7 @@ border-radius: 10px}</string>
|
||||
<item row="0" column="0" rowspan="2">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="avatar_label">
|
||||
<widget class="AvatarWidget" name="avatar" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>70</width>
|
||||
@ -57,19 +57,10 @@ border-radius: 10px}</string>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel#avatar_label{border: 2px solid black;
|
||||
<string notr="true">QWidget#avatar{border: 2px solid black;
|
||||
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
@ -331,6 +322,14 @@ border-radius: 10px}</string>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>AvatarWidget</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>gui/common/AvatarWidget.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="../images.qrc"/>
|
||||
</resources>
|
||||
|
@ -60,8 +60,6 @@ ForumMsgItem::ForumMsgItem(FeedHolder *parent, uint32_t feedId, const std::strin
|
||||
connect( replyButton, SIGNAL( clicked( void ) ), this, SLOT( replyToPost ( void ) ) );
|
||||
connect( sendButton, SIGNAL( clicked( ) ), this, SLOT( sendMsg() ) );
|
||||
|
||||
connect(NotifyQt::getInstance(), SIGNAL(peerHasNewAvatar(const QString&)), this, SLOT(updateAvatar(const QString&)));
|
||||
|
||||
subjectLabel->setMinimumWidth(20);
|
||||
|
||||
small();
|
||||
@ -143,7 +141,7 @@ void ForumMsgItem::updateItemStatic()
|
||||
|
||||
if (mIsTop)
|
||||
{
|
||||
mGpgIdPrev = msg.srcId;
|
||||
avatar->setId(msg.srcId, true);
|
||||
|
||||
if (rsPeers->getPeerName(msg.srcId) !="")
|
||||
{
|
||||
@ -168,7 +166,7 @@ void ForumMsgItem::updateItemStatic()
|
||||
}
|
||||
else
|
||||
{
|
||||
mGpgIdNext = msg.srcId;
|
||||
nextavatar->setId(msg.srcId, true);
|
||||
|
||||
if (rsPeers->getPeerName(msg.srcId) !="")
|
||||
{
|
||||
@ -194,7 +192,7 @@ void ForumMsgItem::updateItemStatic()
|
||||
ForumMsgInfo msgParent;
|
||||
if (rsForums->getForumMessage(mForumId, msg.parentId, msgParent))
|
||||
{
|
||||
mGpgIdPrev = msgParent.srcId;
|
||||
avatar->setId(msgParent.srcId, true);
|
||||
|
||||
RetroShareLink linkParent;
|
||||
linkParent.createForum(msgParent.forumId, msgParent.msgId);
|
||||
@ -234,9 +232,6 @@ void ForumMsgItem::updateItemStatic()
|
||||
}
|
||||
|
||||
unsubscribeButton->hide();
|
||||
|
||||
showAvatar("", true);
|
||||
showAvatar("", false);
|
||||
}
|
||||
|
||||
|
||||
@ -397,59 +392,3 @@ void ForumMsgItem::sendMsg()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ForumMsgItem::updateAvatar(const QString &peer_id)
|
||||
{
|
||||
if (mGpgIdPrev.empty() == false) {
|
||||
/* Is this one of the ssl ids of the gpg id ? */
|
||||
std::list<std::string> sslIds;
|
||||
if (rsPeers->getAssociatedSSLIds(mGpgIdPrev, sslIds) == false) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (std::find(sslIds.begin(), sslIds.end(), peer_id.toStdString()) != sslIds.end()) {
|
||||
/* One of the ssl ids of the gpg id */
|
||||
showAvatar(peer_id.toStdString(), false);
|
||||
}
|
||||
}
|
||||
|
||||
if (mGpgIdNext.empty() == false) {
|
||||
/* Is this one of the ssl ids of the gpg id ? */
|
||||
std::list<std::string> sslIds;
|
||||
if (rsPeers->getAssociatedSSLIds(mGpgIdNext, sslIds) == false) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (std::find(sslIds.begin(), sslIds.end(), peer_id.toStdString()) != sslIds.end()) {
|
||||
/* One of the ssl ids of the gpg id */
|
||||
showAvatar(peer_id.toStdString(), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ForumMsgItem::showAvatar(const std::string &peer_id, bool next)
|
||||
{
|
||||
std::string gpgId = next ? mGpgIdNext : mGpgIdPrev;
|
||||
QLabel *avatarLabel = next ? nextavatarlabel : avatarlabel;
|
||||
|
||||
if (gpgId.empty()) {
|
||||
avatarLabel->setPixmap(QPixmap(":/images/user/personal64.png"));
|
||||
return;
|
||||
}
|
||||
|
||||
QPixmap avatar;
|
||||
|
||||
if (gpgId == rsPeers->getGPGOwnId()) {
|
||||
/* Its me */
|
||||
AvatarDefs::getOwnAvatar(avatar, ":/images/user/personal64.png");
|
||||
} else {
|
||||
if (peer_id.empty()) {
|
||||
/* Show the first available avatar of one of the ssl ids */
|
||||
AvatarDefs::getAvatarFromGpgId(gpgId, avatar, ":/images/user/personal64.png");
|
||||
} else {
|
||||
AvatarDefs::getAvatarFromSslId(peer_id, avatar, ":/images/user/personal64.png");
|
||||
}
|
||||
}
|
||||
|
||||
avatarLabel->setPixmap(avatar);
|
||||
}
|
||||
|
@ -50,21 +50,15 @@ private slots:
|
||||
void replyToPost();
|
||||
void sendMsg();
|
||||
|
||||
|
||||
void updateItem();
|
||||
void updateAvatar(const QString &peer_id);
|
||||
|
||||
private:
|
||||
void showAvatar(const std::string &peer_id, bool next);
|
||||
|
||||
FeedHolder *mParent;
|
||||
uint32_t mFeedId;
|
||||
bool canReply;
|
||||
|
||||
std::string mForumId;
|
||||
std::string mPostId;
|
||||
std::string mGpgIdPrev;
|
||||
std::string mGpgIdNext;
|
||||
bool mIsHome;
|
||||
bool mIsTop;
|
||||
};
|
||||
|
@ -64,7 +64,7 @@ border-radius: 10px}</string>
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap>:/images/konversation.png</pixmap>
|
||||
<pixmap resource="../images.qrc">:/images/konversation.png</pixmap>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
@ -209,7 +209,7 @@ border-radius: 10px}</string>
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/mail_delete.png</normaloff>:/images/mail_delete.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
@ -229,7 +229,7 @@ border-radius: 10px}</string>
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/replymail24.png</normaloff>:/images/replymail24.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
@ -249,7 +249,7 @@ border-radius: 10px}</string>
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/edit_add24.png</normaloff>:/images/edit_add24.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
@ -269,7 +269,7 @@ border-radius: 10px}</string>
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/close_normal.png</normaloff>:/images/close_normal.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
@ -290,7 +290,7 @@ border-radius: 10px}</string>
|
||||
</property>
|
||||
<layout class="QGridLayout">
|
||||
<item row="0" column="0" rowspan="2">
|
||||
<widget class="QLabel" name="avatarlabel">
|
||||
<widget class="AvatarWidget" name="avatar" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>32</width>
|
||||
@ -303,12 +303,6 @@ border-radius: 10px}</string>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
@ -457,7 +451,7 @@ border-radius: 10px}</string>
|
||||
</property>
|
||||
<layout class="QGridLayout">
|
||||
<item row="0" column="0" rowspan="3">
|
||||
<widget class="QLabel" name="nextavatarlabel">
|
||||
<widget class="AvatarWidget" name="nextavatar" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>32</width>
|
||||
@ -470,12 +464,6 @@ border-radius: 10px}</string>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
@ -624,6 +612,16 @@ border-radius: 10px}</string>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>AvatarWidget</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>gui/common/AvatarWidget.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="../images.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
@ -56,12 +56,9 @@ MsgItem::MsgItem(FeedHolder *parent, uint32_t feedId, std::string msgId, bool is
|
||||
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));
|
||||
}
|
||||
|
||||
|
||||
@ -84,6 +81,8 @@ void MsgItem::updateItemStatic()
|
||||
/* get peer Id */
|
||||
mPeerId = mi.srcId;
|
||||
|
||||
avatar->setId(mPeerId, false);
|
||||
|
||||
QString title;
|
||||
QString timestamp;
|
||||
QString srcName = QString::fromUtf8(rsPeers->getPeerName(mi.srcId).c_str());
|
||||
@ -276,16 +275,3 @@ void MsgItem::playMedia()
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
void MsgItem::updateAvatar(const QString &peer_id)
|
||||
{
|
||||
if (peer_id.toStdString() != mPeerId) {
|
||||
/* it 's not me */
|
||||
return;
|
||||
}
|
||||
|
||||
QPixmap avatar;
|
||||
AvatarDefs::getAvatarFromSslId(mPeerId, avatar, ":/images/user/personal64.png");
|
||||
avatarlabel->setPixmap(avatar);
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,6 @@ private slots:
|
||||
void replyMsg();
|
||||
|
||||
void updateItem();
|
||||
void updateAvatar(const QString &peer_id);
|
||||
|
||||
private:
|
||||
FeedHolder *mParent;
|
||||
|
@ -42,7 +42,7 @@ border-radius: 10px}</string>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="avatarlabel">
|
||||
<widget class="AvatarWidget" name="avatar" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>70</width>
|
||||
@ -56,14 +56,10 @@ border-radius: 10px}</string>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel#avatarlabel{border: 2px solid blue;
|
||||
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
|
||||
stop: 0 #2291E0, stop: 1 #3EB3FF);
|
||||
<string notr="true">QWidget#avatar{border: 2px solid blue;
|
||||
background-color: #2291E0;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" colspan="4">
|
||||
@ -275,6 +271,14 @@ stop: 0 #2291E0, stop: 1 #3EB3FF);
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>AvatarWidget</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>gui/common/AvatarWidget.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="../images.qrc"/>
|
||||
</resources>
|
||||
|
@ -64,7 +64,6 @@ PeerItem::PeerItem(FeedHolder *parent, uint32_t feedId, std::string peerId, uint
|
||||
|
||||
connect( sendmsgButton, SIGNAL( clicked( ) ), this, SLOT( sendMessage() ) );
|
||||
|
||||
connect(NotifyQt::getInstance(), SIGNAL(peerHasNewAvatar(const QString&)), this, SLOT(updateAvatar(const QString&)));
|
||||
connect(NotifyQt::getInstance(), SIGNAL(friendsChanged()), this, SLOT(updateItem()));
|
||||
|
||||
QMenu *msgmenu = new QMenu();
|
||||
@ -72,10 +71,11 @@ PeerItem::PeerItem(FeedHolder *parent, uint32_t feedId, std::string peerId, uint
|
||||
|
||||
quickmsgButton->setMenu(msgmenu);
|
||||
|
||||
avatar->setId(mPeerId, false);
|
||||
|
||||
small();
|
||||
updateItemStatic();
|
||||
updateItem();
|
||||
updateAvatar(QString::fromStdString(mPeerId));
|
||||
}
|
||||
|
||||
|
||||
@ -309,18 +309,6 @@ void PeerItem::openChat()
|
||||
}
|
||||
}
|
||||
|
||||
void PeerItem::updateAvatar(const QString &peer_id)
|
||||
{
|
||||
if (peer_id.toStdString() != mPeerId) {
|
||||
/* it 's not me */
|
||||
return;
|
||||
}
|
||||
|
||||
QPixmap avatar;
|
||||
AvatarDefs::getAvatarFromSslId(mPeerId, avatar, ":/images/user/personal64.png");
|
||||
avatar_label->setPixmap(avatar);
|
||||
}
|
||||
|
||||
void PeerItem::togglequickmessage()
|
||||
{
|
||||
if (messageframe->isHidden())
|
||||
|
@ -57,7 +57,6 @@ private slots:
|
||||
void openChat();
|
||||
|
||||
void updateItem();
|
||||
void updateAvatar(const QString &peer_id);
|
||||
|
||||
void togglequickmessage();
|
||||
void sendMessage();
|
||||
|
@ -63,7 +63,7 @@ border-radius: 10px}</string>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0" rowspan="2">
|
||||
<widget class="QLabel" name="avatar_label">
|
||||
<widget class="AvatarWidget" name="avatar" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>70</width>
|
||||
@ -77,20 +77,10 @@ border-radius: 10px}</string>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel#avatar_label{border: 2px solid green;
|
||||
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
|
||||
stop: 0 #BDDF7D, stop: 1 #49881F);
|
||||
<string notr="true">QWidget#avatar{border: 2px solid green;
|
||||
background-color: #BDDF7D;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
@ -575,6 +565,14 @@ border-radius: 10px}</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>AvatarWidget</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>gui/common/AvatarWidget.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="../images.qrc"/>
|
||||
</resources>
|
||||
|
@ -75,7 +75,6 @@ SecurityItem::SecurityItem(FeedHolder *parent, uint32_t feedId, std::string gpgI
|
||||
connect(removeFriendButton, SIGNAL(clicked()), this, SLOT(removeFriend()));
|
||||
connect(peerDetailsButton, SIGNAL(clicked()), this, SLOT(peerDetails()));
|
||||
|
||||
connect(NotifyQt::getInstance(), SIGNAL(peerHasNewAvatar(const QString&)), this, SLOT(updateAvatar(const QString&)));
|
||||
connect(NotifyQt::getInstance(), SIGNAL(friendsChanged()), this, SLOT(updateItem()));
|
||||
|
||||
QMenu *msgmenu = new QMenu();
|
||||
@ -83,10 +82,11 @@ SecurityItem::SecurityItem(FeedHolder *parent, uint32_t feedId, std::string gpgI
|
||||
|
||||
quickmsgButton->setMenu(msgmenu);
|
||||
|
||||
avatar->setId(mSslId, false);
|
||||
|
||||
small();
|
||||
updateItemStatic();
|
||||
updateItem();
|
||||
updateAvatar(QString::fromStdString(mSslId));
|
||||
}
|
||||
|
||||
|
||||
@ -379,18 +379,6 @@ void SecurityItem::openChat()
|
||||
}
|
||||
}
|
||||
|
||||
void SecurityItem::updateAvatar(const QString &peer_id)
|
||||
{
|
||||
if (peer_id.toStdString() != mSslId) {
|
||||
/* it 's not me */
|
||||
return;
|
||||
}
|
||||
|
||||
QPixmap avatar;
|
||||
AvatarDefs::getAvatarFromSslId(mSslId, avatar, ":/images/user/personal64.png");
|
||||
avatar_label->setPixmap(avatar);
|
||||
}
|
||||
|
||||
void SecurityItem::togglequickmessage()
|
||||
{
|
||||
if (messageframe->isHidden())
|
||||
|
@ -57,7 +57,6 @@ private slots:
|
||||
void openChat();
|
||||
|
||||
void updateItem();
|
||||
void updateAvatar(const QString &peer_id);
|
||||
|
||||
void togglequickmessage();
|
||||
void sendMessage();
|
||||
|
@ -60,7 +60,7 @@ border-radius: 10px}</string>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0" rowspan="2">
|
||||
<widget class="QLabel" name="avatar_label">
|
||||
<widget class="AvatarWidget" name="avatar" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>70</width>
|
||||
@ -74,20 +74,10 @@ border-radius: 10px}</string>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel#avatar_label{border: 2px solid green;
|
||||
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
|
||||
stop: 0 #BDDF7D, stop: 1 #49881F);
|
||||
<string notr="true">QWidget#avatar{border: 2px solid red;
|
||||
background-color: #FDBF7D;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
@ -623,6 +613,14 @@ border-radius: 10px}</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>AvatarWidget</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>gui/common/AvatarWidget.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="../images.qrc"/>
|
||||
</resources>
|
||||
|
@ -48,11 +48,16 @@
|
||||
<file>images/admin-48.png</file>
|
||||
<file>images/user/add_group22.png</file>
|
||||
<file>images/user/add_group256.png</file>
|
||||
<file>images/avatarstatus_bg.png</file>
|
||||
<file>images/avatarstatus_bg_online.png</file>
|
||||
<file>images/avatarstatus_bg_away.png</file>
|
||||
<file>images/avatarstatus_bg_busy.png</file>
|
||||
<file>images/avatarstatus_bg_offline.png</file>
|
||||
<file>images/avatarstatus-bg-116.png</file>
|
||||
<file>images/avatarstatus-bg-online-116.png</file>
|
||||
<file>images/avatarstatus-bg-away-116.png</file>
|
||||
<file>images/avatarstatus-bg-busy-116.png</file>
|
||||
<file>images/avatarstatus-bg-offline-116.png</file>
|
||||
<file>images/avatarstatus-bg-70.png</file>
|
||||
<file>images/avatarstatus-bg-online-70.png</file>
|
||||
<file>images/avatarstatus-bg-away-70.png</file>
|
||||
<file>images/avatarstatus-bg-busy-70.png</file>
|
||||
<file>images/avatarstatus-bg-offline-70.png</file>
|
||||
<file>images/browse-looking.gif</file>
|
||||
<file>images/back.png</file>
|
||||
<file>images/backgroundl.png</file>
|
||||
@ -298,18 +303,12 @@
|
||||
<file>images/message.png</file>
|
||||
<file>images/messages_new.png</file>
|
||||
<file>images/messenger.png</file>
|
||||
<file>images/mystatus_bg_idle.png</file>
|
||||
<file>images/mystatus_bg_busy.png</file>
|
||||
<file>images/mystatus_bg_online.png</file>
|
||||
<file>images/mystatus_bg_offline.png</file>
|
||||
<file>images/mystatus_bg.png</file>
|
||||
<file>images/network.png</file>
|
||||
<file>images/network16.png</file>
|
||||
<file>images/network32.png</file>
|
||||
<file>images/new-mail-alert.png</file>
|
||||
<file>images/new_forum16.png</file>
|
||||
<file>images/newmsg.png</file>
|
||||
<file>images/no_avatar.png</file>
|
||||
<file>images/no_avatar_70.png</file>
|
||||
<file>images/no_avatar_background.png</file>
|
||||
<file>images/openimage.png</file>
|
||||
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 3.9 KiB |
@ -220,6 +220,14 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Download abbrechen</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>AvatarWidget</name>
|
||||
<message>
|
||||
<location filename="../gui/common/AvatarWidget.cpp" line="+122"/>
|
||||
<source>Click to change your avatar</source>
|
||||
<translation>Klick zum Ändern deines Avatars</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>BandwidthGraph</name>
|
||||
<message>
|
||||
@ -678,7 +686,7 @@ p, li { white-space: pre-wrap; }
|
||||
<context>
|
||||
<name>CertificatePage</name>
|
||||
<message>
|
||||
<location filename="../gui/connect/ConnectFriendWizard.cpp" line="+682"/>
|
||||
<location filename="../gui/connect/ConnectFriendWizard.cpp" line="+706"/>
|
||||
<source>Certificate files</source>
|
||||
<translation>Zertifikat-Dateien</translation>
|
||||
</message>
|
||||
@ -1069,7 +1077,7 @@ p, li { white-space: pre-wrap; }
|
||||
<context>
|
||||
<name>ChatMsgItem</name>
|
||||
<message>
|
||||
<location filename="../gui/feeds/ChatMsgItem.ui" line="+148"/>
|
||||
<location filename="../gui/feeds/ChatMsgItem.ui" line="+139"/>
|
||||
<source>Remove Item</source>
|
||||
<translation>Eintrag entfernen</translation>
|
||||
</message>
|
||||
@ -1105,7 +1113,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Abbrechen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/feeds/ChatMsgItem.cpp" line="+273"/>
|
||||
<location filename="../gui/feeds/ChatMsgItem.cpp" line="+248"/>
|
||||
<source>Quick Message</source>
|
||||
<translation>Schnelle Nachrricht</translation>
|
||||
</message>
|
||||
@ -1338,7 +1346,7 @@ p, li { white-space: pre-wrap; }
|
||||
<context>
|
||||
<name>ConfCertDialog</name>
|
||||
<message>
|
||||
<location filename="../gui/connect/ConfCertDialog.ui" line="+689"/>
|
||||
<location filename="../gui/connect/ConfCertDialog.ui" line="+746"/>
|
||||
<source>Cancel</source>
|
||||
<translation>Abbrechen</translation>
|
||||
</message>
|
||||
@ -1348,7 +1356,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>OK</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-638"/>
|
||||
<location line="-695"/>
|
||||
<source>Peer Info</source>
|
||||
<translation>Nachbar Info</translation>
|
||||
</message>
|
||||
@ -1368,12 +1376,12 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Peer ID</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+111"/>
|
||||
<location line="+137"/>
|
||||
<source>Peer Address</source>
|
||||
<translation>Adresse des Nachbarn</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+417"/>
|
||||
<location line="+448"/>
|
||||
<source>Deny Friend</source>
|
||||
<translation>Blockiere Freund</translation>
|
||||
</message>
|
||||
@ -1409,7 +1417,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Nachbar Schlüssel ist unterzeichnet von:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-419"/>
|
||||
<location line="-476"/>
|
||||
<source>Last Contact</source>
|
||||
<translation>Letzter Kontakt</translation>
|
||||
</message>
|
||||
@ -1434,7 +1442,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Status</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+30"/>
|
||||
<location line="+56"/>
|
||||
<source>Local Address</source>
|
||||
<translation>Lokale Adresse</translation>
|
||||
</message>
|
||||
@ -1455,7 +1463,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Adressenliste</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+75"/>
|
||||
<location line="+106"/>
|
||||
<source>None </source>
|
||||
<translation>Nicht </translation>
|
||||
</message>
|
||||
@ -1497,14 +1505,14 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Übernehmen und Schliessen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/connect/ConfCertDialog.cpp" line="+133"/>
|
||||
<location line="+207"/>
|
||||
<location filename="../gui/connect/ConfCertDialog.cpp" line="+136"/>
|
||||
<location line="+210"/>
|
||||
<source>RetroShare</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-206"/>
|
||||
<location line="+207"/>
|
||||
<location line="-209"/>
|
||||
<location line="+210"/>
|
||||
<source>Error : cannot get peer details.</source>
|
||||
<translation>Fehler: Kann Peer Details nicht ermitteln.</translation>
|
||||
</message>
|
||||
@ -1571,22 +1579,22 @@ und meinen GPG Schlüssel nicht unterzeichnet</translation>
|
||||
<translation>Vertrauen </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-152"/>
|
||||
<location line="-183"/>
|
||||
<source>Dynamic DNS</source>
|
||||
<translation>Dynamisches DNS</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+272"/>
|
||||
<location line="+303"/>
|
||||
<source>Show Help for Trust Settings and Signing</source>
|
||||
<translation>Zeige Hilfe</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-357"/>
|
||||
<location line="-414"/>
|
||||
<source>RetroShare ID</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+531"/>
|
||||
<location line="+588"/>
|
||||
<source>Certificate</source>
|
||||
<translation>Zertifikat</translation>
|
||||
</message>
|
||||
@ -1594,7 +1602,7 @@ und meinen GPG Schlüssel nicht unterzeichnet</translation>
|
||||
<context>
|
||||
<name>ConnectFriendWizard</name>
|
||||
<message>
|
||||
<location filename="../gui/connect/ConnectFriendWizard.cpp" line="-836"/>
|
||||
<location filename="../gui/connect/ConnectFriendWizard.cpp" line="-860"/>
|
||||
<source>Connect Friend Wizard</source>
|
||||
<translation>Assistent um sich zu einem Freund zu verbinden</translation>
|
||||
</message>
|
||||
@ -2295,6 +2303,21 @@ p, li { white-space: pre-wrap; }
|
||||
<source>Name</source>
|
||||
<translation>Name</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+39"/>
|
||||
<source>check peers you would like to share private publish key with</source>
|
||||
<translation type="unfinished">Wähle die Nachbarn, an die du den privaten Schlüssel verteilen möchtest</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+9"/>
|
||||
<source>Share Key With</source>
|
||||
<translation type="unfinished">Schlüssel verteilen an</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+47"/>
|
||||
<source>Contacts:</source>
|
||||
<translation type="unfinished">Kontakte:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+14"/>
|
||||
<source>Description</source>
|
||||
@ -2306,7 +2329,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Typ:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+12"/>
|
||||
<location line="+9"/>
|
||||
<source>Public - Anyone can read and publish (Shared Publish Key)</source>
|
||||
<translation>Öffentlich - Jeder kann lesen und schreiben (gemeinsamer Veröffentlichungs-Schlüssel)</translation>
|
||||
</message>
|
||||
@ -2322,6 +2345,21 @@ p, li { white-space: pre-wrap; }
|
||||
</message>
|
||||
<message>
|
||||
<location line="+10"/>
|
||||
<source>Key Sharing</source>
|
||||
<translation type="unfinished">Schlüsselverteilung</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+12"/>
|
||||
<source>Key recipients can publish to restricted-type channels, and can view and publish for private-type channels </source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+3"/>
|
||||
<source>Share Private Publish Key</source>
|
||||
<translation type="unfinished">Verteile privaten Schlüssel</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+23"/>
|
||||
<source>Allowed Messages</source>
|
||||
<translation>Erlaubte Nachrichten</translation>
|
||||
</message>
|
||||
@ -2346,7 +2384,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Erstellen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/forums/CreateForum.cpp" line="+73"/>
|
||||
<location filename="../gui/forums/CreateForum.cpp" line="+113"/>
|
||||
<source>Please add a Name</source>
|
||||
<translation>Bitte Name hinzüfügen</translation>
|
||||
</message>
|
||||
@ -3129,7 +3167,7 @@ Das ist nützlich, wenn Du eine externe Festplatte freigibst und die Datei nicht
|
||||
<context>
|
||||
<name>EmailPage</name>
|
||||
<message>
|
||||
<location filename="../gui/connect/ConnectFriendWizard.cpp" line="+1118"/>
|
||||
<location filename="../gui/connect/ConnectFriendWizard.cpp" line="+1142"/>
|
||||
<source>Invite Friends by Email</source>
|
||||
<translation>Lade Freunde per Email ein</translation>
|
||||
</message>
|
||||
@ -3636,13 +3674,13 @@ p, li { white-space: pre-wrap; }
|
||||
</message>
|
||||
<message>
|
||||
<location line="-85"/>
|
||||
<location line="+189"/>
|
||||
<location line="+167"/>
|
||||
<location line="+183"/>
|
||||
<location line="+161"/>
|
||||
<source>Subject: </source>
|
||||
<translation>Betreff:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-311"/>
|
||||
<location line="-299"/>
|
||||
<source>Unsubscribe To Forum</source>
|
||||
<translation>Forum abbestellen</translation>
|
||||
</message>
|
||||
@ -3652,7 +3690,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Antwort</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+383"/>
|
||||
<location line="+371"/>
|
||||
<source>Send</source>
|
||||
<translation>Senden</translation>
|
||||
</message>
|
||||
@ -3662,7 +3700,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Unterzeichnen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/feeds/ForumMsgItem.cpp" line="+93"/>
|
||||
<location filename="../gui/feeds/ForumMsgItem.cpp" line="+92"/>
|
||||
<source>Forum Post</source>
|
||||
<translation>Beitrag</translation>
|
||||
</message>
|
||||
@ -3684,7 +3722,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Als Antwort auf</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+167"/>
|
||||
<location line="+164"/>
|
||||
<source>Please give a Text Message</source>
|
||||
<translation>Bitte Nachricht eingeben</translation>
|
||||
</message>
|
||||
@ -3738,7 +3776,7 @@ p, li { white-space: pre-wrap; }
|
||||
<context>
|
||||
<name>ForumsDialog</name>
|
||||
<message>
|
||||
<location filename="../gui/ForumsDialog.cpp" line="+282"/>
|
||||
<location filename="../gui/ForumsDialog.cpp" line="+283"/>
|
||||
<source>Subscribe to Forum</source>
|
||||
<translation>Forum abonnieren</translation>
|
||||
</message>
|
||||
@ -3764,11 +3802,16 @@ p, li { white-space: pre-wrap; }
|
||||
</message>
|
||||
<message>
|
||||
<location line="+3"/>
|
||||
<source>Share Forum</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+5"/>
|
||||
<source>Restore Publish Rights for Forum</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+6"/>
|
||||
<location line="+5"/>
|
||||
<location line="+103"/>
|
||||
<source>Copy RetroShare Link</source>
|
||||
<translation>Kopiere RetroShare Link</translation>
|
||||
@ -3835,7 +3878,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Du kannst einem anonymen Autor nicht antworten</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-1253"/>
|
||||
<location line="-1257"/>
|
||||
<source>Your Forums</source>
|
||||
<translation>Deine Foren</translation>
|
||||
</message>
|
||||
@ -3977,7 +4020,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Druckvorschau</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/ForumsDialog.cpp" line="+142"/>
|
||||
<location filename="../gui/ForumsDialog.cpp" line="+146"/>
|
||||
<location line="+1032"/>
|
||||
<source>Start New Thread</source>
|
||||
<translation>Erstelle neues Thema</translation>
|
||||
@ -4027,7 +4070,7 @@ p, li { white-space: pre-wrap; }
|
||||
<context>
|
||||
<name>ForumsFillThread</name>
|
||||
<message>
|
||||
<location line="+1393"/>
|
||||
<location line="+1399"/>
|
||||
<location line="+114"/>
|
||||
<source>Anonymous</source>
|
||||
<translation>Anonym</translation>
|
||||
@ -4081,12 +4124,11 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Status</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+63"/>
|
||||
<source>Add or Change your Avatar</source>
|
||||
<translation>Wähle oder ändere dein Avatar Bild</translation>
|
||||
<translation type="obsolete">Wähle oder ändere dein Avatar Bild</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+67"/>
|
||||
<location line="+112"/>
|
||||
<source>Edit Personal message</source>
|
||||
<translation>Statusnachricht ändern</translation>
|
||||
</message>
|
||||
@ -4142,7 +4184,7 @@ p, li { white-space: pre-wrap; }
|
||||
</message>
|
||||
<message>
|
||||
<location line="+9"/>
|
||||
<location filename="../gui/FriendsDialog.cpp" line="+450"/>
|
||||
<location filename="../gui/FriendsDialog.cpp" line="+451"/>
|
||||
<source>Add Friend</source>
|
||||
<translation>Freund hinzufügen</translation>
|
||||
</message>
|
||||
@ -4259,7 +4301,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Löscht den gespeicherten und angezeigten Chat Verlauf</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/FriendsDialog.cpp" line="-296"/>
|
||||
<location filename="../gui/FriendsDialog.cpp" line="-295"/>
|
||||
<source>Profile</source>
|
||||
<translation>Profil</translation>
|
||||
</message>
|
||||
@ -4274,7 +4316,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Willkommen bei RetroShare's Gruppenchat.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+69"/>
|
||||
<location line="+68"/>
|
||||
<source>me</source>
|
||||
<translation>ich</translation>
|
||||
</message>
|
||||
@ -4421,7 +4463,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>tippt...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+135"/>
|
||||
<location line="+123"/>
|
||||
<location line="+2"/>
|
||||
<source>New group chat</source>
|
||||
<translation>Neuer Gruppenchat</translation>
|
||||
@ -4432,7 +4474,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Willst Du wirklich den Nachrichtenverlauf physisch löschen?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+111"/>
|
||||
<location line="+87"/>
|
||||
<source>Add Extra File</source>
|
||||
<translation>Zusätzliche Datei hinzufügen</translation>
|
||||
</message>
|
||||
@ -5754,7 +5796,7 @@ p, li { white-space: pre-wrap; }
|
||||
<context>
|
||||
<name>IntroPage</name>
|
||||
<message>
|
||||
<location filename="../gui/connect/ConnectFriendWizard.cpp" line="-439"/>
|
||||
<location filename="../gui/connect/ConnectFriendWizard.cpp" line="-463"/>
|
||||
<source>&Make friend with selected friends of my friends</source>
|
||||
<translation>&Füge ausgewählte Freunde Deiner Freunde hinzu</translation>
|
||||
</message>
|
||||
@ -6119,7 +6161,7 @@ Bitte gib etwas Speicher frei und drücke OK.</translation>
|
||||
<name>MessageComposer</name>
|
||||
<message>
|
||||
<location filename="../gui/msgs/MessageComposer.ui" line="+17"/>
|
||||
<location filename="../gui/msgs/MessageComposer.cpp" line="+831"/>
|
||||
<location filename="../gui/msgs/MessageComposer.cpp" line="+833"/>
|
||||
<source>Compose</source>
|
||||
<translation>Verfassen</translation>
|
||||
</message>
|
||||
@ -6605,7 +6647,7 @@ Willst Du die Nachricht speichern ?</translation>
|
||||
<translation>Unterstützte Bilddateien (*.png *.jpeg *.jpg *.gif)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+111"/>
|
||||
<location line="+119"/>
|
||||
<source>Add Extra File</source>
|
||||
<translation>Zusätzliche Datei hinzufügen</translation>
|
||||
</message>
|
||||
@ -6626,7 +6668,7 @@ Willst Du die Nachricht speichern ?</translation>
|
||||
<translation>Datei nicht gefunden oder Dateiname nicht akzeptiert.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-2120"/>
|
||||
<location line="-2128"/>
|
||||
<source>Friend Recommendation(s)</source>
|
||||
<translation>Freundempfehlung(en)</translation>
|
||||
</message>
|
||||
@ -7331,7 +7373,7 @@ p, li { white-space: pre-wrap; }
|
||||
<context>
|
||||
<name>MessengerWindow</name>
|
||||
<message>
|
||||
<location filename="../gui/MessengerWindow.cpp" line="+294"/>
|
||||
<location filename="../gui/MessengerWindow.cpp" line="+296"/>
|
||||
<source>Expand all</source>
|
||||
<translation>Alle erweitern</translation>
|
||||
</message>
|
||||
@ -7391,7 +7433,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation><strong>RetroShare Instanz</strong></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+509"/>
|
||||
<location line="+499"/>
|
||||
<source>Save Certificate</source>
|
||||
<translation>Zertifikat speichern</translation>
|
||||
</message>
|
||||
@ -7401,12 +7443,11 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Zertifikate (*.pqi)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/MessengerWindow.ui" line="+64"/>
|
||||
<source>Click to Change your Avatar</source>
|
||||
<translation>Klick zum Ändern deines Avatars</translation>
|
||||
<translation type="obsolete">Klick zum Ändern deines Avatars</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+134"/>
|
||||
<location filename="../gui/MessengerWindow.ui" line="+179"/>
|
||||
<source>Add a Friend</source>
|
||||
<translation>Einen Freund hinzufügen</translation>
|
||||
</message>
|
||||
@ -7421,7 +7462,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Suche Freunde</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+131"/>
|
||||
<location line="+128"/>
|
||||
<location line="+3"/>
|
||||
<source>Sort Descending Order</source>
|
||||
<translation>Absteigend sortieren</translation>
|
||||
@ -7448,22 +7489,22 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Verstecke offline Freunde</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-141"/>
|
||||
<location line="-138"/>
|
||||
<source>Reset</source>
|
||||
<translation>Zurücksetzen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+149"/>
|
||||
<location line="+146"/>
|
||||
<source>Sort by State</source>
|
||||
<translation>Sortiere nach Status</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/MessengerWindow.cpp" line="-559"/>
|
||||
<location filename="../gui/MessengerWindow.cpp" line="-549"/>
|
||||
<source>Recomend this Friend to...</source>
|
||||
<translation>Freund weiterempfehlen...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/MessengerWindow.ui" line="-458"/>
|
||||
<location filename="../gui/MessengerWindow.ui" line="-436"/>
|
||||
<source>RetroShare Messenger</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
@ -7477,7 +7518,7 @@ p, li { white-space: pre-wrap; }
|
||||
<context>
|
||||
<name>MsgItem</name>
|
||||
<message>
|
||||
<location filename="../gui/feeds/MsgItem.ui" line="+139"/>
|
||||
<location filename="../gui/feeds/MsgItem.ui" line="+135"/>
|
||||
<source>Remove Item</source>
|
||||
<translation>Entferne Element</translation>
|
||||
</message>
|
||||
@ -8155,13 +8196,13 @@ p, li { white-space: pre-wrap; }
|
||||
<context>
|
||||
<name>PeerItem</name>
|
||||
<message>
|
||||
<location filename="../gui/feeds/PeerItem.ui" line="+202"/>
|
||||
<location filename="../gui/feeds/PeerItem.ui" line="+192"/>
|
||||
<source>Remove Item</source>
|
||||
<translation>Entferne Element</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-20"/>
|
||||
<location filename="../gui/feeds/PeerItem.cpp" line="+243"/>
|
||||
<location filename="../gui/feeds/PeerItem.cpp" line="+244"/>
|
||||
<source>Expand</source>
|
||||
<translation>Erweitern</translation>
|
||||
</message>
|
||||
@ -8274,7 +8315,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Verbergen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+117"/>
|
||||
<location line="+91"/>
|
||||
<source>Quick Message</source>
|
||||
<translation>Schnelle Nachrricht</translation>
|
||||
</message>
|
||||
@ -8710,7 +8751,7 @@ p, li { white-space: pre-wrap; }
|
||||
<context>
|
||||
<name>PopupChatDialog</name>
|
||||
<message>
|
||||
<location filename="../gui/chat/PopupChatDialog.cpp" line="+748"/>
|
||||
<location filename="../gui/chat/PopupChatDialog.cpp" line="+740"/>
|
||||
<source>Hide Avatar</source>
|
||||
<translation>Avatar verstecken</translation>
|
||||
</message>
|
||||
@ -8725,7 +8766,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Willst Du wirklich den Nachrichtenverlauf physisch löschen?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+75"/>
|
||||
<location line="+18"/>
|
||||
<source>Load Picture File</source>
|
||||
<translation>Lade Bilddatei</translation>
|
||||
</message>
|
||||
@ -8735,12 +8776,12 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Datei nicht gefunden oder Dateiname nicht akzeptiert.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+91"/>
|
||||
<location line="+89"/>
|
||||
<source>Messages you send will be delivered after Friend is again Online</source>
|
||||
<translation>Nachrichten, die Du versendest gehen bei diesem Freund erst wieder ein wenn er Online ist</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/chat/PopupChatDialog.ui" line="+585"/>
|
||||
<location filename="../gui/chat/PopupChatDialog.ui" line="+561"/>
|
||||
<location line="+278"/>
|
||||
<source>Bold</source>
|
||||
<translation>Fett</translation>
|
||||
@ -8813,7 +8854,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Durchgestrichen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/chat/PopupChatDialog.cpp" line="-255"/>
|
||||
<location filename="../gui/chat/PopupChatDialog.cpp" line="-253"/>
|
||||
<source>Add Extra File</source>
|
||||
<translation>Zusätzlich eine Datei hinzufügen</translation>
|
||||
</message>
|
||||
@ -8850,7 +8891,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Text Datei (*.txt );;Alle Dateien (*)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-722"/>
|
||||
<location line="-659"/>
|
||||
<source>Your Friend is offline
|
||||
Do you want to send them a Message instead</source>
|
||||
<translation>Dein Freund ist Offline willst du ihm stattdessen eine Nachricht senden</translation>
|
||||
@ -8861,27 +8902,27 @@ Do you want to send them a Message instead</source>
|
||||
<translation>Bild anhängen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/chat/PopupChatDialog.cpp" line="+765"/>
|
||||
<location filename="../gui/chat/PopupChatDialog.cpp" line="+698"/>
|
||||
<source>is Idle and may not reply</source>
|
||||
<translation>antwortet möglicherweise nicht, da der Status auf "Untätig" gesetzt wurde</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+12"/>
|
||||
<location line="+8"/>
|
||||
<source>is Away and may not reply</source>
|
||||
<translation>antwortet möglicherweise nicht, da der Status auf "Abwesend" gesetzt wurde</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+7"/>
|
||||
<location line="+5"/>
|
||||
<source>is Busy and may not reply</source>
|
||||
<translation>antwortet möglicherweise nicht, da der Status auf "Beschäftigt" gesetzt wurde</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-26"/>
|
||||
<location line="-18"/>
|
||||
<source>apears to be Offline.</source>
|
||||
<translation>ist Offline.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-723"/>
|
||||
<location line="-664"/>
|
||||
<source>Paste RetroShare Link</source>
|
||||
<translation>RetroShare Link einfügen</translation>
|
||||
</message>
|
||||
@ -8896,7 +8937,7 @@ Do you want to send them a Message instead</source>
|
||||
<translation>Schliessen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/chat/PopupChatDialog.cpp" line="-60"/>
|
||||
<location filename="../gui/chat/PopupChatDialog.cpp" line="-54"/>
|
||||
<source>Friend not Online</source>
|
||||
<translation>Freund ist nicht online</translation>
|
||||
</message>
|
||||
@ -9083,7 +9124,7 @@ Do you want to send them a Message instead</source>
|
||||
<context>
|
||||
<name>ProfileView</name>
|
||||
<message>
|
||||
<location filename="../gui/unfinished/profile/ProfileView.cpp" line="+70"/>
|
||||
<location filename="../gui/unfinished/profile/ProfileView.cpp" line="+71"/>
|
||||
<source>Clear Photo</source>
|
||||
<translation>Photo entfernen</translation>
|
||||
</message>
|
||||
@ -9562,7 +9603,7 @@ Lockdatei:
|
||||
<translation>Link ist fehlerhaft.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/elastic/node.cpp" line="+320"/>
|
||||
<location filename="../gui/elastic/node.cpp" line="+346"/>
|
||||
<source>Deny friend</source>
|
||||
<translation>Blockiere Freund</translation>
|
||||
</message>
|
||||
@ -10091,7 +10132,7 @@ p, li { white-space: pre-wrap; }
|
||||
<context>
|
||||
<name>RsidPage</name>
|
||||
<message>
|
||||
<location filename="../gui/connect/ConnectFriendWizard.cpp" line="+958"/>
|
||||
<location filename="../gui/connect/ConnectFriendWizard.cpp" line="+982"/>
|
||||
<source>RetroShare ID</source>
|
||||
<translation>RetroShare ID</translation>
|
||||
</message>
|
||||
@ -10407,8 +10448,8 @@ p, li { white-space: pre-wrap; }
|
||||
<context>
|
||||
<name>SecurityItem</name>
|
||||
<message>
|
||||
<location filename="../gui/feeds/SecurityItem.ui" line="+179"/>
|
||||
<location filename="../gui/feeds/SecurityItem.cpp" line="+285"/>
|
||||
<location filename="../gui/feeds/SecurityItem.ui" line="+169"/>
|
||||
<location filename="../gui/feeds/SecurityItem.cpp" line="+287"/>
|
||||
<source>Expand</source>
|
||||
<translation>Erweitern</translation>
|
||||
</message>
|
||||
@ -10498,7 +10539,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Nachricht schreiben</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/feeds/SecurityItem.cpp" line="-168"/>
|
||||
<location filename="../gui/feeds/SecurityItem.cpp" line="-169"/>
|
||||
<source>Connect Attempt</source>
|
||||
<translation>Verbindungsversuch</translation>
|
||||
</message>
|
||||
@ -10523,7 +10564,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Unbekanntes Sicherheitsproblem</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+45"/>
|
||||
<location line="+46"/>
|
||||
<location line="+5"/>
|
||||
<location line="+1"/>
|
||||
<location line="+1"/>
|
||||
@ -10543,7 +10584,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Willst du diesen Freund entfernen?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+102"/>
|
||||
<location line="+76"/>
|
||||
<source>Quick Message</source>
|
||||
<translation>Schnelle Nachrricht</translation>
|
||||
</message>
|
||||
@ -10843,7 +10884,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Abbrechen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/ShareDialog.cpp" line="+70"/>
|
||||
<location filename="../gui/ShareDialog.cpp" line="+72"/>
|
||||
<source>Select A Folder To Share</source>
|
||||
<translation>Wähle einen Ordner zum Freigeben aus</translation>
|
||||
</message>
|
||||
@ -10907,7 +10948,7 @@ p, li { white-space: pre-wrap; }
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Wähle die Freunde aus, mit denen Du den Kanal teilen möchtest.</span></p></body></html></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/channels/ShareKey.cpp" line="+80"/>
|
||||
<location filename="../gui/channels/ShareKey.cpp" line="+81"/>
|
||||
<source>RetroShare</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
@ -12041,7 +12082,7 @@ p, li { white-space: pre-wrap; }
|
||||
<context>
|
||||
<name>TextPage</name>
|
||||
<message>
|
||||
<location filename="../gui/connect/ConnectFriendWizard.cpp" line="-970"/>
|
||||
<location filename="../gui/connect/ConnectFriendWizard.cpp" line="-994"/>
|
||||
<source>Use text representation of the PGP certificates.</source>
|
||||
<translation>Verwende diesen Text als PGP Zertifikat.</translation>
|
||||
</message>
|
||||
@ -12071,7 +12112,32 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Bereinige Zertifikat</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+123"/>
|
||||
<location line="+78"/>
|
||||
<source>No or misspelled BEGIN tag found</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+2"/>
|
||||
<source>No or misspelled END tag found</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+2"/>
|
||||
<source>No checksum found (the last 5 chars should be separated by a '=' char), or no newline after tag line (e.g. line beginning with Version:)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+3"/>
|
||||
<source>Unknown error. Your cert is probably not even a certificate.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+3"/>
|
||||
<source>Certificate cleaning error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+59"/>
|
||||
<source>Save as...</source>
|
||||
<translation>Speichern unter...</translation>
|
||||
</message>
|
||||
@ -12091,7 +12157,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-181"/>
|
||||
<location line="-205"/>
|
||||
<source>Text certificate</source>
|
||||
<translation>Text-Zertifikat</translation>
|
||||
</message>
|
||||
@ -12106,7 +12172,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Starte das Standard-Emailprogramm</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+114"/>
|
||||
<location line="+138"/>
|
||||
<source>Connect Friend Help</source>
|
||||
<translation>Verbindungshilfe</translation>
|
||||
</message>
|
||||
@ -12121,7 +12187,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Dein Zertiifkat ist in in die Zwischenablage kopiert worden</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-33"/>
|
||||
<location line="-57"/>
|
||||
<source>RetroShare Invite</source>
|
||||
<translation>RetroShare Einladung</translation>
|
||||
</message>
|
||||
@ -12560,7 +12626,12 @@ p, li { white-space: pre-wrap; }
|
||||
<context>
|
||||
<name>TreeStyle_RDM</name>
|
||||
<message>
|
||||
<location filename="../gui/RemoteDirModel.cpp" line="+138"/>
|
||||
<location filename="../gui/RemoteDirModel.cpp" line="+109"/>
|
||||
<source>My files</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+29"/>
|
||||
<location line="+110"/>
|
||||
<source>FILE</source>
|
||||
<translation>DATEI</translation>
|
||||
|
@ -285,8 +285,6 @@ int main(int argc, char *argv[])
|
||||
QObject::connect(notify,SIGNAL(downloadCompleteCountChanged(int)) ,w ,SLOT(updateTransfers(int) ));
|
||||
|
||||
QObject::connect(notify,SIGNAL(chatStatusChanged(const QString&,const QString&,bool)),w->friendsDialog,SLOT(updatePeerStatusString(const QString&,const QString&,bool)));
|
||||
QObject::connect(notify,SIGNAL(peerHasNewAvatar(const QString&)),w->friendsDialog,SLOT(updatePeersAvatar(const QString&)));
|
||||
QObject::connect(notify,SIGNAL(ownAvatarChanged()),w->friendsDialog,SLOT(updateAvatar()));
|
||||
QObject::connect(notify,SIGNAL(ownStatusMessageChanged()),w->friendsDialog,SLOT(loadmypersonalstatus()));
|
||||
|
||||
QObject::connect(notify,SIGNAL(logInfoChanged(const QString&)) ,w->networkDialog,SLOT(setLogInfo(QString))) ;
|
||||
|