diff --git a/retroshare-gui/src/RetroShare.pro b/retroshare-gui/src/RetroShare.pro index 542045420..df2accaef 100644 --- a/retroshare-gui/src/RetroShare.pro +++ b/retroshare-gui/src/RetroShare.pro @@ -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 \ diff --git a/retroshare-gui/src/gui/FriendsDialog.cpp b/retroshare-gui/src/gui/FriendsDialog.cpp index e27ba38b3..86d08cae8 100644 --- a/retroshare-gui/src/gui/FriendsDialog.cpp +++ b/retroshare-gui/src/gui/FriendsDialog.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; - } -} diff --git a/retroshare-gui/src/gui/FriendsDialog.h b/retroshare-gui/src/gui/FriendsDialog.h index 685ac5ea5..b00ed5583 100644 --- a/retroshare-gui/src/gui/FriendsDialog.h +++ b/retroshare-gui/src/gui/FriendsDialog.h @@ -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(); diff --git a/retroshare-gui/src/gui/FriendsDialog.ui b/retroshare-gui/src/gui/FriendsDialog.ui index f062d9ed8..305dc7c3e 100644 --- a/retroshare-gui/src/gui/FriendsDialog.ui +++ b/retroshare-gui/src/gui/FriendsDialog.ui @@ -779,7 +779,7 @@ background: white;} 1 - + 61 @@ -792,24 +792,6 @@ background: white;} 61 - - Add or Change your Avatar - - - QToolButton#avatartoolButton{border-image: url(:/images/mystatus_bg.png);} - - - - - - - 43 - 43 - - - - true - @@ -1566,6 +1548,12 @@ background: white;} + + AvatarWidget + QWidget +
gui/common/AvatarWidget.h
+ 1 +
RSTabWidget QTabWidget diff --git a/retroshare-gui/src/gui/MessengerWindow.cpp b/retroshare-gui/src/gui/MessengerWindow.cpp index 612db2068..871e50a24 100644 --- a/retroshare-gui/src/gui/MessengerWindow.cpp +++ b/retroshare-gui/src/gui/MessengerWindow.cpp @@ -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; } } diff --git a/retroshare-gui/src/gui/MessengerWindow.h b/retroshare-gui/src/gui/MessengerWindow.h index 56de22122..9ab8986b1 100644 --- a/retroshare-gui/src/gui/MessengerWindow.h +++ b/retroshare-gui/src/gui/MessengerWindow.h @@ -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(); @@ -137,4 +133,4 @@ private: Ui::MessengerWindow ui; }; -#endif \ No newline at end of file +#endif diff --git a/retroshare-gui/src/gui/MessengerWindow.ui b/retroshare-gui/src/gui/MessengerWindow.ui index d2146d8fa..93c1bd1c9 100644 --- a/retroshare-gui/src/gui/MessengerWindow.ui +++ b/retroshare-gui/src/gui/MessengerWindow.ui @@ -47,7 +47,7 @@ 6 - + 70 @@ -60,25 +60,6 @@ 70 - - Click to Change your Avatar - - - QToolButton#avatarButton{border-image: url(:/images/mystatus_bg.png);} - - - - :/images/user/personal64.png:/images/user/personal64.png - - - - 50 - 50 - - - - true - @@ -401,9 +382,6 @@ border: 1px solid #CCCCCC; false - - false - @@ -473,6 +451,14 @@ border: 1px solid #CCCCCC; + + + AvatarWidget + QWidget +
gui/common/AvatarWidget.h
+ 1 +
+
diff --git a/retroshare-gui/src/gui/chat/PopupChatDialog.cpp b/retroshare-gui/src/gui/chat/PopupChatDialog.cpp index cff6a5337..9fef26f93 100644 --- a/retroshare-gui/src/gui/chat/PopupChatDialog.cpp +++ b/retroshare-gui/src/gui/chat/PopupChatDialog.cpp @@ -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::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 } diff --git a/retroshare-gui/src/gui/chat/PopupChatDialog.h b/retroshare-gui/src/gui/chat/PopupChatDialog.h index b1dca12ef..0719dee8c 100644 --- a/retroshare-gui/src/gui/chat/PopupChatDialog.h +++ b/retroshare-gui/src/gui/chat/PopupChatDialog.h @@ -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) ; diff --git a/retroshare-gui/src/gui/chat/PopupChatDialog.ui b/retroshare-gui/src/gui/chat/PopupChatDialog.ui index e34c2df43..79fd76df2 100644 --- a/retroshare-gui/src/gui/chat/PopupChatDialog.ui +++ b/retroshare-gui/src/gui/chat/PopupChatDialog.ui @@ -139,7 +139,7 @@ 9 - + 116 @@ -152,18 +152,6 @@ 116 - - QLabel{ -border-image: url(:/images/avatarstatus_bg.png); - -} - - - - - - Qt::AlignCenter - @@ -180,7 +168,7 @@ border-image: url(:/images/avatarstatus_bg.png); - + 116 @@ -193,18 +181,6 @@ border-image: url(:/images/avatarstatus_bg.png); 116 - - QLabel{ -border-image: url(:/images/avatarstatus_bg.png); - -} - - - - - - Qt::AlignCenter - @@ -929,6 +905,14 @@ background: white;} + + + AvatarWidget + QWidget +
gui/common/AvatarWidget.h
+ 1 +
+
diff --git a/retroshare-gui/src/gui/common/AvatarWidget.cpp b/retroshare-gui/src/gui/common/AvatarWidget.cpp new file mode 100644 index 000000000..24d6dd1a9 --- /dev/null +++ b/retroshare-gui/src/gui/common/AvatarWidget.cpp @@ -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 +#include +#include + +#include "gui/notifyqt.h" +#include "gui/common/AvatarDefs.h" +#include "util/misc.h" + +#include "AvatarWidget.h" +#include "ui_AvatarWidget.h" + +#include + +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 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)); + } +} diff --git a/retroshare-gui/src/gui/common/AvatarWidget.h b/retroshare-gui/src/gui/common/AvatarWidget.h new file mode 100644 index 000000000..38cf75bab --- /dev/null +++ b/retroshare-gui/src/gui/common/AvatarWidget.h @@ -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 + +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 diff --git a/retroshare-gui/src/gui/common/AvatarWidget.ui b/retroshare-gui/src/gui/common/AvatarWidget.ui new file mode 100644 index 000000000..4fcdd9605 --- /dev/null +++ b/retroshare-gui/src/gui/common/AvatarWidget.ui @@ -0,0 +1,46 @@ + + + AvatarWidget + + + + 0 + 0 + 116 + 116 + + + + + 0 + + + + + QFrame#avatarFrame{ border-image:url(:/images/avatarstatus-bg-116.png); } + + + + 10 + + + + + true + + + true + + + Qt::AlignCenter + + + + + + + + + + + diff --git a/retroshare-gui/src/gui/connect/ConfCertDialog.cpp b/retroshare-gui/src/gui/connect/ConfCertDialog.cpp index a94c00a04..f236eb955 100644 --- a/retroshare-gui/src/gui/connect/ConfCertDialog.cpp +++ b/retroshare-gui/src/gui/connect/ConfCertDialog.cpp @@ -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); - } -} diff --git a/retroshare-gui/src/gui/connect/ConfCertDialog.h b/retroshare-gui/src/gui/connect/ConfCertDialog.h index 0ab9ae18a..5900a7b8d 100644 --- a/retroshare-gui/src/gui/connect/ConfCertDialog.h +++ b/retroshare-gui/src/gui/connect/ConfCertDialog.h @@ -60,11 +60,8 @@ private slots: /** Called when a child window requests the given help topic. */ void showHelpDialog(const QString &topic); - void updatePeersAvatar(const QString& peer_id); - private: std::string mId; - bool isOnlyGpg; /** Qt Designer generated object */ Ui::ConfCertDialog ui; diff --git a/retroshare-gui/src/gui/connect/ConfCertDialog.ui b/retroshare-gui/src/gui/connect/ConfCertDialog.ui index 10ec06709..899d68197 100644 --- a/retroshare-gui/src/gui/connect/ConfCertDialog.ui +++ b/retroshare-gui/src/gui/connect/ConfCertDialog.ui @@ -32,20 +32,7 @@ Details - - - - - 96 - 96 - - - - - - - - + Peer Info @@ -189,7 +176,7 @@
- + Qt::Vertical @@ -202,7 +189,7 @@ - + Peer Address @@ -366,7 +353,7 @@ - + Qt::Vertical @@ -379,6 +366,37 @@ + + + + QFrame::Panel + + + QFrame::Sunken + + + + 0 + + + + + + 96 + 96 + + + + + 96 + 96 + + + + + + + @@ -733,6 +751,14 @@ p, li { white-space: pre-wrap; } + + + AvatarWidget + QWidget +
gui/common/AvatarWidget.h
+ 1 +
+
diff --git a/retroshare-gui/src/gui/feeds/ChatMsgItem.cpp b/retroshare-gui/src/gui/feeds/ChatMsgItem.cpp index a36b6c8ac..f24be8384 100644 --- a/retroshare-gui/src/gui/feeds/ChatMsgItem.cpp +++ b/retroshare-gui/src/gui/feeds/ChatMsgItem.cpp @@ -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()) diff --git a/retroshare-gui/src/gui/feeds/ChatMsgItem.h b/retroshare-gui/src/gui/feeds/ChatMsgItem.h index afbfbeff2..5446aab36 100644 --- a/retroshare-gui/src/gui/feeds/ChatMsgItem.h +++ b/retroshare-gui/src/gui/feeds/ChatMsgItem.h @@ -50,7 +50,6 @@ private slots: void openChat(); void updateItem(); - void updateAvatar(const QString &peer_id); void togglequickmessage(); void sendMessage(); diff --git a/retroshare-gui/src/gui/feeds/ChatMsgItem.ui b/retroshare-gui/src/gui/feeds/ChatMsgItem.ui index 97ac35efb..8c9078476 100644 --- a/retroshare-gui/src/gui/feeds/ChatMsgItem.ui +++ b/retroshare-gui/src/gui/feeds/ChatMsgItem.ui @@ -43,7 +43,7 @@ border-radius: 10px} - + 70 @@ -57,19 +57,10 @@ border-radius: 10px} - QLabel#avatar_label{border: 2px solid black; + QWidget#avatar{border: 2px solid black; } - - - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - 0 - @@ -331,6 +322,14 @@ border-radius: 10px} + + + AvatarWidget + QWidget +
gui/common/AvatarWidget.h
+ 1 +
+
diff --git a/retroshare-gui/src/gui/feeds/ForumMsgItem.cpp b/retroshare-gui/src/gui/feeds/ForumMsgItem.cpp index 5b0d60cc9..2b3c479e7 100644 --- a/retroshare-gui/src/gui/feeds/ForumMsgItem.cpp +++ b/retroshare-gui/src/gui/feeds/ForumMsgItem.cpp @@ -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(); @@ -142,8 +140,8 @@ void ForumMsgItem::updateItemStatic() link.createForum(msg.forumId, msg.msgId); 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 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 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); -} diff --git a/retroshare-gui/src/gui/feeds/ForumMsgItem.h b/retroshare-gui/src/gui/feeds/ForumMsgItem.h index 4a93a2a5c..20cbbcb5b 100644 --- a/retroshare-gui/src/gui/feeds/ForumMsgItem.h +++ b/retroshare-gui/src/gui/feeds/ForumMsgItem.h @@ -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; }; diff --git a/retroshare-gui/src/gui/feeds/ForumMsgItem.ui b/retroshare-gui/src/gui/feeds/ForumMsgItem.ui index c2e281855..79e5f603a 100644 --- a/retroshare-gui/src/gui/feeds/ForumMsgItem.ui +++ b/retroshare-gui/src/gui/feeds/ForumMsgItem.ui @@ -64,7 +64,7 @@ border-radius: 10px} - :/images/konversation.png + :/images/konversation.png Qt::AlignCenter @@ -209,7 +209,7 @@ border-radius: 10px} - + :/images/mail_delete.png:/images/mail_delete.png @@ -229,7 +229,7 @@ border-radius: 10px} - + :/images/replymail24.png:/images/replymail24.png @@ -249,7 +249,7 @@ border-radius: 10px} - + :/images/edit_add24.png:/images/edit_add24.png @@ -269,7 +269,7 @@ border-radius: 10px} - + :/images/close_normal.png:/images/close_normal.png @@ -290,7 +290,7 @@ border-radius: 10px} - + 32 @@ -303,12 +303,6 @@ border-radius: 10px} 32 - - - - - true - @@ -457,7 +451,7 @@ border-radius: 10px} - + 32 @@ -470,12 +464,6 @@ border-radius: 10px} 32 - - - - - true - @@ -624,6 +612,16 @@ border-radius: 10px} - + + + AvatarWidget + QWidget +
gui/common/AvatarWidget.h
+ 1 +
+
+ + + diff --git a/retroshare-gui/src/gui/feeds/MsgItem.cpp b/retroshare-gui/src/gui/feeds/MsgItem.cpp index 9eff852cc..7f234e225 100644 --- a/retroshare-gui/src/gui/feeds/MsgItem.cpp +++ b/retroshare-gui/src/gui/feeds/MsgItem.cpp @@ -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); -} - diff --git a/retroshare-gui/src/gui/feeds/MsgItem.h b/retroshare-gui/src/gui/feeds/MsgItem.h index d1d220815..2e7f04cc2 100644 --- a/retroshare-gui/src/gui/feeds/MsgItem.h +++ b/retroshare-gui/src/gui/feeds/MsgItem.h @@ -52,7 +52,6 @@ private slots: void replyMsg(); void updateItem(); - void updateAvatar(const QString &peer_id); private: FeedHolder *mParent; diff --git a/retroshare-gui/src/gui/feeds/MsgItem.ui b/retroshare-gui/src/gui/feeds/MsgItem.ui index 99d77348a..870097761 100644 --- a/retroshare-gui/src/gui/feeds/MsgItem.ui +++ b/retroshare-gui/src/gui/feeds/MsgItem.ui @@ -42,7 +42,7 @@ border-radius: 10px} 0 - + 70 @@ -56,14 +56,10 @@ border-radius: 10px} - QLabel#avatarlabel{border: 2px solid blue; -background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, -stop: 0 #2291E0, stop: 1 #3EB3FF); + QWidget#avatar{border: 2px solid blue; +background-color: #2291E0; } - - true - @@ -275,6 +271,14 @@ stop: 0 #2291E0, stop: 1 #3EB3FF);
+ + + AvatarWidget + QWidget +
gui/common/AvatarWidget.h
+ 1 +
+
diff --git a/retroshare-gui/src/gui/feeds/PeerItem.cpp b/retroshare-gui/src/gui/feeds/PeerItem.cpp index 2b69ee7f6..222f707ae 100644 --- a/retroshare-gui/src/gui/feeds/PeerItem.cpp +++ b/retroshare-gui/src/gui/feeds/PeerItem.cpp @@ -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()) diff --git a/retroshare-gui/src/gui/feeds/PeerItem.h b/retroshare-gui/src/gui/feeds/PeerItem.h index 009fe6ab5..012a32f74 100644 --- a/retroshare-gui/src/gui/feeds/PeerItem.h +++ b/retroshare-gui/src/gui/feeds/PeerItem.h @@ -57,7 +57,6 @@ private slots: void openChat(); void updateItem(); - void updateAvatar(const QString &peer_id); void togglequickmessage(); void sendMessage(); diff --git a/retroshare-gui/src/gui/feeds/PeerItem.ui b/retroshare-gui/src/gui/feeds/PeerItem.ui index 7d07769b9..2ecb892ae 100644 --- a/retroshare-gui/src/gui/feeds/PeerItem.ui +++ b/retroshare-gui/src/gui/feeds/PeerItem.ui @@ -63,7 +63,7 @@ border-radius: 10px} 0 - + 70 @@ -77,20 +77,10 @@ border-radius: 10px} - QLabel#avatar_label{border: 2px solid green; - background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, - stop: 0 #BDDF7D, stop: 1 #49881F); + QWidget#avatar{border: 2px solid green; + background-color: #BDDF7D; } - - - - - true - - - 0 - @@ -575,6 +565,14 @@ border-radius: 10px} + + + AvatarWidget + QWidget +
gui/common/AvatarWidget.h
+ 1 +
+
diff --git a/retroshare-gui/src/gui/feeds/SecurityItem.cpp b/retroshare-gui/src/gui/feeds/SecurityItem.cpp index 144608eba..89232a12e 100644 --- a/retroshare-gui/src/gui/feeds/SecurityItem.cpp +++ b/retroshare-gui/src/gui/feeds/SecurityItem.cpp @@ -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()) diff --git a/retroshare-gui/src/gui/feeds/SecurityItem.h b/retroshare-gui/src/gui/feeds/SecurityItem.h index fd9054249..e087b48c3 100644 --- a/retroshare-gui/src/gui/feeds/SecurityItem.h +++ b/retroshare-gui/src/gui/feeds/SecurityItem.h @@ -57,7 +57,6 @@ private slots: void openChat(); void updateItem(); - void updateAvatar(const QString &peer_id); void togglequickmessage(); void sendMessage(); diff --git a/retroshare-gui/src/gui/feeds/SecurityItem.ui b/retroshare-gui/src/gui/feeds/SecurityItem.ui index 43ff63086..46d88328a 100644 --- a/retroshare-gui/src/gui/feeds/SecurityItem.ui +++ b/retroshare-gui/src/gui/feeds/SecurityItem.ui @@ -60,7 +60,7 @@ border-radius: 10px} 0 - + 70 @@ -74,20 +74,10 @@ border-radius: 10px} - QLabel#avatar_label{border: 2px solid green; - background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, - stop: 0 #BDDF7D, stop: 1 #49881F); + QWidget#avatar{border: 2px solid red; + background-color: #FDBF7D; } - - - - - true - - - 0 - @@ -623,6 +613,14 @@ border-radius: 10px} + + + AvatarWidget + QWidget +
gui/common/AvatarWidget.h
+ 1 +
+
diff --git a/retroshare-gui/src/gui/images.qrc b/retroshare-gui/src/gui/images.qrc index 889b7e693..d64a4e210 100644 --- a/retroshare-gui/src/gui/images.qrc +++ b/retroshare-gui/src/gui/images.qrc @@ -48,11 +48,16 @@ images/admin-48.png images/user/add_group22.png images/user/add_group256.png - images/avatarstatus_bg.png - images/avatarstatus_bg_online.png - images/avatarstatus_bg_away.png - images/avatarstatus_bg_busy.png - images/avatarstatus_bg_offline.png + images/avatarstatus-bg-116.png + images/avatarstatus-bg-online-116.png + images/avatarstatus-bg-away-116.png + images/avatarstatus-bg-busy-116.png + images/avatarstatus-bg-offline-116.png + images/avatarstatus-bg-70.png + images/avatarstatus-bg-online-70.png + images/avatarstatus-bg-away-70.png + images/avatarstatus-bg-busy-70.png + images/avatarstatus-bg-offline-70.png images/browse-looking.gif images/back.png images/backgroundl.png @@ -298,18 +303,12 @@ images/message.png images/messages_new.png images/messenger.png - images/mystatus_bg_idle.png - images/mystatus_bg_busy.png - images/mystatus_bg_online.png - images/mystatus_bg_offline.png - images/mystatus_bg.png images/network.png images/network16.png images/network32.png images/new-mail-alert.png images/new_forum16.png images/newmsg.png - images/no_avatar.png images/no_avatar_70.png images/no_avatar_background.png images/openimage.png diff --git a/retroshare-gui/src/gui/images/avatarstatus_bg.png b/retroshare-gui/src/gui/images/avatarstatus-bg-116.png similarity index 100% rename from retroshare-gui/src/gui/images/avatarstatus_bg.png rename to retroshare-gui/src/gui/images/avatarstatus-bg-116.png diff --git a/retroshare-gui/src/gui/images/mystatus_bg.png b/retroshare-gui/src/gui/images/avatarstatus-bg-70.png similarity index 100% rename from retroshare-gui/src/gui/images/mystatus_bg.png rename to retroshare-gui/src/gui/images/avatarstatus-bg-70.png diff --git a/retroshare-gui/src/gui/images/avatarstatus_bg_away.png b/retroshare-gui/src/gui/images/avatarstatus-bg-away-116.png similarity index 100% rename from retroshare-gui/src/gui/images/avatarstatus_bg_away.png rename to retroshare-gui/src/gui/images/avatarstatus-bg-away-116.png diff --git a/retroshare-gui/src/gui/images/mystatus_bg_idle.png b/retroshare-gui/src/gui/images/avatarstatus-bg-away-70.png similarity index 100% rename from retroshare-gui/src/gui/images/mystatus_bg_idle.png rename to retroshare-gui/src/gui/images/avatarstatus-bg-away-70.png diff --git a/retroshare-gui/src/gui/images/avatarstatus_bg_busy.png b/retroshare-gui/src/gui/images/avatarstatus-bg-busy-116.png similarity index 100% rename from retroshare-gui/src/gui/images/avatarstatus_bg_busy.png rename to retroshare-gui/src/gui/images/avatarstatus-bg-busy-116.png diff --git a/retroshare-gui/src/gui/images/mystatus_bg_busy.png b/retroshare-gui/src/gui/images/avatarstatus-bg-busy-70.png similarity index 100% rename from retroshare-gui/src/gui/images/mystatus_bg_busy.png rename to retroshare-gui/src/gui/images/avatarstatus-bg-busy-70.png diff --git a/retroshare-gui/src/gui/images/avatarstatus_bg_offline.png b/retroshare-gui/src/gui/images/avatarstatus-bg-offline-116.png similarity index 100% rename from retroshare-gui/src/gui/images/avatarstatus_bg_offline.png rename to retroshare-gui/src/gui/images/avatarstatus-bg-offline-116.png diff --git a/retroshare-gui/src/gui/images/mystatus_bg_offline.png b/retroshare-gui/src/gui/images/avatarstatus-bg-offline-70.png similarity index 100% rename from retroshare-gui/src/gui/images/mystatus_bg_offline.png rename to retroshare-gui/src/gui/images/avatarstatus-bg-offline-70.png diff --git a/retroshare-gui/src/gui/images/avatarstatus_bg_online.png b/retroshare-gui/src/gui/images/avatarstatus-bg-online-116.png similarity index 100% rename from retroshare-gui/src/gui/images/avatarstatus_bg_online.png rename to retroshare-gui/src/gui/images/avatarstatus-bg-online-116.png diff --git a/retroshare-gui/src/gui/images/mystatus_bg_online.png b/retroshare-gui/src/gui/images/avatarstatus-bg-online-70.png similarity index 100% rename from retroshare-gui/src/gui/images/mystatus_bg_online.png rename to retroshare-gui/src/gui/images/avatarstatus-bg-online-70.png diff --git a/retroshare-gui/src/gui/images/no_avatar.png b/retroshare-gui/src/gui/images/no_avatar.png deleted file mode 100644 index eac675fdd..000000000 Binary files a/retroshare-gui/src/gui/images/no_avatar.png and /dev/null differ diff --git a/retroshare-gui/src/lang/retroshare_de.qm b/retroshare-gui/src/lang/retroshare_de.qm index 8ae9e5929..504143a3d 100644 Binary files a/retroshare-gui/src/lang/retroshare_de.qm and b/retroshare-gui/src/lang/retroshare_de.qm differ diff --git a/retroshare-gui/src/lang/retroshare_de.ts b/retroshare-gui/src/lang/retroshare_de.ts index 2be848e4d..9b4bf73ad 100644 --- a/retroshare-gui/src/lang/retroshare_de.ts +++ b/retroshare-gui/src/lang/retroshare_de.ts @@ -220,6 +220,14 @@ p, li { white-space: pre-wrap; } Download abbrechen + + AvatarWidget + + + Click to change your avatar + Klick zum Ändern deines Avatars + + BandwidthGraph @@ -678,7 +686,7 @@ p, li { white-space: pre-wrap; } CertificatePage - + Certificate files Zertifikat-Dateien @@ -1069,7 +1077,7 @@ p, li { white-space: pre-wrap; } ChatMsgItem - + Remove Item Eintrag entfernen @@ -1105,7 +1113,7 @@ p, li { white-space: pre-wrap; } Abbrechen - + Quick Message Schnelle Nachrricht @@ -1338,7 +1346,7 @@ p, li { white-space: pre-wrap; } ConfCertDialog - + Cancel Abbrechen @@ -1348,7 +1356,7 @@ p, li { white-space: pre-wrap; } OK - + Peer Info Nachbar Info @@ -1368,12 +1376,12 @@ p, li { white-space: pre-wrap; } Peer ID - + Peer Address Adresse des Nachbarn - + Deny Friend Blockiere Freund @@ -1409,7 +1417,7 @@ p, li { white-space: pre-wrap; } Nachbar Schlüssel ist unterzeichnet von: - + Last Contact Letzter Kontakt @@ -1434,7 +1442,7 @@ p, li { white-space: pre-wrap; } Status - + Local Address Lokale Adresse @@ -1455,7 +1463,7 @@ p, li { white-space: pre-wrap; } Adressenliste - + None Nicht @@ -1497,14 +1505,14 @@ p, li { white-space: pre-wrap; } Übernehmen und Schliessen - - + + RetroShare - - + + Error : cannot get peer details. Fehler: Kann Peer Details nicht ermitteln. @@ -1571,22 +1579,22 @@ und meinen GPG Schlüssel nicht unterzeichnet Vertrauen - + Dynamic DNS Dynamisches DNS - + Show Help for Trust Settings and Signing Zeige Hilfe - + RetroShare ID - + Certificate Zertifikat @@ -1594,7 +1602,7 @@ und meinen GPG Schlüssel nicht unterzeichnet ConnectFriendWizard - + Connect Friend Wizard Assistent um sich zu einem Freund zu verbinden @@ -2295,6 +2303,21 @@ p, li { white-space: pre-wrap; } Name Name + + + check peers you would like to share private publish key with + Wähle die Nachbarn, an die du den privaten Schlüssel verteilen möchtest + + + + Share Key With + Schlüssel verteilen an + + + + Contacts: + Kontakte: + Description @@ -2306,7 +2329,7 @@ p, li { white-space: pre-wrap; } Typ: - + Public - Anyone can read and publish (Shared Publish Key) Öffentlich - Jeder kann lesen und schreiben (gemeinsamer Veröffentlichungs-Schlüssel) @@ -2322,6 +2345,21 @@ p, li { white-space: pre-wrap; } + Key Sharing + Schlüsselverteilung + + + + Key recipients can publish to restricted-type channels, and can view and publish for private-type channels + + + + + Share Private Publish Key + Verteile privaten Schlüssel + + + Allowed Messages Erlaubte Nachrichten @@ -2346,7 +2384,7 @@ p, li { white-space: pre-wrap; } Erstellen - + Please add a Name Bitte Name hinzüfügen @@ -3129,7 +3167,7 @@ Das ist nützlich, wenn Du eine externe Festplatte freigibst und die Datei nicht EmailPage - + Invite Friends by Email Lade Freunde per Email ein @@ -3636,13 +3674,13 @@ p, li { white-space: pre-wrap; } - - + + Subject: Betreff: - + Unsubscribe To Forum Forum abbestellen @@ -3652,7 +3690,7 @@ p, li { white-space: pre-wrap; } Antwort - + Send Senden @@ -3662,7 +3700,7 @@ p, li { white-space: pre-wrap; } Unterzeichnen - + Forum Post Beitrag @@ -3684,7 +3722,7 @@ p, li { white-space: pre-wrap; } Als Antwort auf - + Please give a Text Message Bitte Nachricht eingeben @@ -3738,7 +3776,7 @@ p, li { white-space: pre-wrap; } ForumsDialog - + Subscribe to Forum Forum abonnieren @@ -3764,11 +3802,16 @@ p, li { white-space: pre-wrap; } + Share Forum + + + + Restore Publish Rights for Forum - + Copy RetroShare Link Kopiere RetroShare Link @@ -3835,7 +3878,7 @@ p, li { white-space: pre-wrap; } Du kannst einem anonymen Autor nicht antworten - + Your Forums Deine Foren @@ -3977,7 +4020,7 @@ p, li { white-space: pre-wrap; } Druckvorschau - + Start New Thread Erstelle neues Thema @@ -4027,7 +4070,7 @@ p, li { white-space: pre-wrap; } ForumsFillThread - + Anonymous Anonym @@ -4081,12 +4124,11 @@ p, li { white-space: pre-wrap; } Status - Add or Change your Avatar - Wähle oder ändere dein Avatar Bild + Wähle oder ändere dein Avatar Bild - + Edit Personal message Statusnachricht ändern @@ -4142,7 +4184,7 @@ p, li { white-space: pre-wrap; } - + Add Friend Freund hinzufügen @@ -4259,7 +4301,7 @@ p, li { white-space: pre-wrap; } Löscht den gespeicherten und angezeigten Chat Verlauf - + Profile Profil @@ -4274,7 +4316,7 @@ p, li { white-space: pre-wrap; } Willkommen bei RetroShare's Gruppenchat. - + me ich @@ -4421,7 +4463,7 @@ p, li { white-space: pre-wrap; } tippt... - + New group chat Neuer Gruppenchat @@ -4432,7 +4474,7 @@ p, li { white-space: pre-wrap; } Willst Du wirklich den Nachrichtenverlauf physisch löschen? - + Add Extra File Zusätzliche Datei hinzufügen @@ -5754,7 +5796,7 @@ p, li { white-space: pre-wrap; } IntroPage - + &Make friend with selected friends of my friends &Füge ausgewählte Freunde Deiner Freunde hinzu @@ -6119,7 +6161,7 @@ Bitte gib etwas Speicher frei und drücke OK. MessageComposer - + Compose Verfassen @@ -6605,7 +6647,7 @@ Willst Du die Nachricht speichern ? Unterstützte Bilddateien (*.png *.jpeg *.jpg *.gif) - + Add Extra File Zusätzliche Datei hinzufügen @@ -6626,7 +6668,7 @@ Willst Du die Nachricht speichern ? Datei nicht gefunden oder Dateiname nicht akzeptiert. - + Friend Recommendation(s) Freundempfehlung(en) @@ -7331,7 +7373,7 @@ p, li { white-space: pre-wrap; } MessengerWindow - + Expand all Alle erweitern @@ -7391,7 +7433,7 @@ p, li { white-space: pre-wrap; } <strong>RetroShare Instanz</strong> - + Save Certificate Zertifikat speichern @@ -7401,12 +7443,11 @@ p, li { white-space: pre-wrap; } Zertifikate (*.pqi) - Click to Change your Avatar - Klick zum Ändern deines Avatars + Klick zum Ändern deines Avatars - + Add a Friend Einen Freund hinzufügen @@ -7421,7 +7462,7 @@ p, li { white-space: pre-wrap; } Suche Freunde - + Sort Descending Order Absteigend sortieren @@ -7448,22 +7489,22 @@ p, li { white-space: pre-wrap; } Verstecke offline Freunde - + Reset Zurücksetzen - + Sort by State Sortiere nach Status - + Recomend this Friend to... Freund weiterempfehlen... - + RetroShare Messenger @@ -7477,7 +7518,7 @@ p, li { white-space: pre-wrap; } MsgItem - + Remove Item Entferne Element @@ -8155,13 +8196,13 @@ p, li { white-space: pre-wrap; } PeerItem - + Remove Item Entferne Element - + Expand Erweitern @@ -8274,7 +8315,7 @@ p, li { white-space: pre-wrap; } Verbergen - + Quick Message Schnelle Nachrricht @@ -8710,7 +8751,7 @@ p, li { white-space: pre-wrap; } PopupChatDialog - + Hide Avatar Avatar verstecken @@ -8725,7 +8766,7 @@ p, li { white-space: pre-wrap; } Willst Du wirklich den Nachrichtenverlauf physisch löschen? - + Load Picture File Lade Bilddatei @@ -8735,12 +8776,12 @@ p, li { white-space: pre-wrap; } Datei nicht gefunden oder Dateiname nicht akzeptiert. - + Messages you send will be delivered after Friend is again Online Nachrichten, die Du versendest gehen bei diesem Freund erst wieder ein wenn er Online ist - + Bold Fett @@ -8813,7 +8854,7 @@ p, li { white-space: pre-wrap; } Durchgestrichen - + Add Extra File Zusätzlich eine Datei hinzufügen @@ -8850,7 +8891,7 @@ p, li { white-space: pre-wrap; } Text Datei (*.txt );;Alle Dateien (*) - + Your Friend is offline Do you want to send them a Message instead Dein Freund ist Offline willst du ihm stattdessen eine Nachricht senden @@ -8861,27 +8902,27 @@ Do you want to send them a Message instead Bild anhängen - + is Idle and may not reply antwortet möglicherweise nicht, da der Status auf "Untätig" gesetzt wurde - + is Away and may not reply antwortet möglicherweise nicht, da der Status auf "Abwesend" gesetzt wurde - + is Busy and may not reply antwortet möglicherweise nicht, da der Status auf "Beschäftigt" gesetzt wurde - + apears to be Offline. ist Offline. - + Paste RetroShare Link RetroShare Link einfügen @@ -8896,7 +8937,7 @@ Do you want to send them a Message instead Schliessen - + Friend not Online Freund ist nicht online @@ -9083,7 +9124,7 @@ Do you want to send them a Message instead ProfileView - + Clear Photo Photo entfernen @@ -9562,7 +9603,7 @@ Lockdatei: Link ist fehlerhaft. - + Deny friend Blockiere Freund @@ -10091,7 +10132,7 @@ p, li { white-space: pre-wrap; } RsidPage - + RetroShare ID RetroShare ID @@ -10407,8 +10448,8 @@ p, li { white-space: pre-wrap; } SecurityItem - - + + Expand Erweitern @@ -10498,7 +10539,7 @@ p, li { white-space: pre-wrap; } Nachricht schreiben - + Connect Attempt Verbindungsversuch @@ -10523,7 +10564,7 @@ p, li { white-space: pre-wrap; } Unbekanntes Sicherheitsproblem - + @@ -10543,7 +10584,7 @@ p, li { white-space: pre-wrap; } Willst du diesen Freund entfernen? - + Quick Message Schnelle Nachrricht @@ -10843,7 +10884,7 @@ p, li { white-space: pre-wrap; } Abbrechen - + Select A Folder To Share Wähle einen Ordner zum Freigeben aus @@ -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> - + RetroShare @@ -12041,7 +12082,7 @@ p, li { white-space: pre-wrap; } TextPage - + Use text representation of the PGP certificates. Verwende diesen Text als PGP Zertifikat. @@ -12071,7 +12112,32 @@ p, li { white-space: pre-wrap; } Bereinige Zertifikat - + + No or misspelled BEGIN tag found + + + + + No or misspelled END tag found + + + + + 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:) + + + + + Unknown error. Your cert is probably not even a certificate. + + + + + Certificate cleaning error + + + + Save as... Speichern unter... @@ -12091,7 +12157,7 @@ p, li { white-space: pre-wrap; } - + Text certificate Text-Zertifikat @@ -12106,7 +12172,7 @@ p, li { white-space: pre-wrap; } Starte das Standard-Emailprogramm - + Connect Friend Help Verbindungshilfe @@ -12121,7 +12187,7 @@ p, li { white-space: pre-wrap; } Dein Zertiifkat ist in in die Zwischenablage kopiert worden - + RetroShare Invite RetroShare Einladung @@ -12560,7 +12626,12 @@ p, li { white-space: pre-wrap; } TreeStyle_RDM - + + My files + + + + FILE DATEI diff --git a/retroshare-gui/src/main.cpp b/retroshare-gui/src/main.cpp index e86012f56..93dfee507 100644 --- a/retroshare-gui/src/main.cpp +++ b/retroshare-gui/src/main.cpp @@ -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))) ;