Added three new toasters - private chat, group chat and chat lobby.

Fixed some utf8 issues in toasters and feeds.
Fixed german language.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5065 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2012-03-30 23:02:52 +00:00
parent 0778e8f691
commit 37986e00a3
35 changed files with 1335 additions and 239 deletions

View File

@ -38,14 +38,16 @@ extern RsNotify *rsNotify;
const uint32_t RS_SYS_ERROR = 0x0001; const uint32_t RS_SYS_ERROR = 0x0001;
const uint32_t RS_SYS_WARNING = 0x0002; const uint32_t RS_SYS_WARNING = 0x0002;
const uint32_t RS_SYS_INFO = 0x0004; const uint32_t RS_SYS_INFO = 0x0004;
const uint32_t RS_POPUP_MSG = 0x0001; const uint32_t RS_POPUP_MSG = 0x0001;
//const uint32_t RS_POPUP_CHAT = 0x0002; const uint32_t RS_POPUP_CHAT = 0x0002;
//const uint32_t RS_POPUP_CALL = 0x0004; //const uint32_t RS_POPUP_CALL = 0x0004;
const uint32_t RS_POPUP_CONNECT = 0x0008; const uint32_t RS_POPUP_CONNECT = 0x0008;
const uint32_t RS_SYSTRAY_GROUP_MSG = 0x0010; const uint32_t RS_SYSTRAY_GROUP_MSG = 0x0010;
const uint32_t RS_POPUP_DOWNLOAD = 0x0020; const uint32_t RS_POPUP_DOWNLOAD = 0x0020;
const uint32_t RS_POPUP_GROUPCHAT = 0x0040;
const uint32_t RS_POPUP_CHATLOBBY = 0x0080;
/* CHAT flags are here - so they are in the same place as /* CHAT flags are here - so they are in the same place as
* other Notify flags... not used by libretroshare though * other Notify flags... not used by libretroshare though

View File

@ -25,6 +25,7 @@
#include "util/rsdir.h" #include "util/rsdir.h"
#include "util/rsrandom.h" #include "util/rsrandom.h"
#include "util/rsstring.h"
#include "retroshare/rsiface.h" #include "retroshare/rsiface.h"
#include "retroshare/rspeers.h" #include "retroshare/rspeers.h"
#include "pqi/pqibin.h" #include "pqi/pqibin.h"
@ -848,6 +849,8 @@ bool p3ChatService::handleRecvChatMsgItem(RsChatMsgItem *ci)
bool privateChanged = false; bool privateChanged = false;
time_t now = time(NULL); time_t now = time(NULL);
std::string name;
uint32_t popupChatFlag = RS_POPUP_CHAT;
// check if it's a lobby msg, in which case we replace the peer id by the lobby's virtual peer id. // check if it's a lobby msg, in which case we replace the peer id by the lobby's virtual peer id.
// //
@ -879,6 +882,8 @@ bool p3ChatService::handleRecvChatMsgItem(RsChatMsgItem *ci)
std::string virtual_peer_id ; std::string virtual_peer_id ;
getVirtualPeerId(cli->lobby_id,virtual_peer_id) ; getVirtualPeerId(cli->lobby_id,virtual_peer_id) ;
cli->PeerId(virtual_peer_id) ; cli->PeerId(virtual_peer_id) ;
name = cli->nick;
popupChatFlag = RS_POPUP_CHATLOBBY;
} }
else else
{ {
@ -927,10 +932,14 @@ bool p3ChatService::handleRecvChatMsgItem(RsChatMsgItem *ci)
ci->chatFlags |= RS_CHAT_FLAG_AVATAR_AVAILABLE ; ci->chatFlags |= RS_CHAT_FLAG_AVATAR_AVAILABLE ;
} }
if ((ci->chatFlags & RS_CHAT_FLAG_PRIVATE) == 0) { std::string message;
librs::util::ConvertUtf16ToUtf8(ci->message, message);
if (ci->chatFlags & RS_CHAT_FLAG_PRIVATE) {
/* notify private chat message */
getPqiNotify()->AddPopupMessage(popupChatFlag, ci->PeerId(), name, message);
} else {
/* notify public chat message */ /* notify public chat message */
std::string message; getPqiNotify()->AddPopupMessage(RS_POPUP_GROUPCHAT, ci->PeerId(), "", message);
message.assign(ci->message.begin(), ci->message.end());
getPqiNotify()->AddFeedItem(RS_FEED_ITEM_CHAT_NEW, ci->PeerId(), message, ""); getPqiNotify()->AddFeedItem(RS_FEED_ITEM_CHAT_NEW, ci->PeerId(), message, "");
} }

View File

@ -35,6 +35,7 @@
#include "util/rsdebug.h" #include "util/rsdebug.h"
#include "util/rsdir.h" #include "util/rsdir.h"
#include "util/rsstring.h"
#include <sstream> #include <sstream>
#include <iomanip> #include <iomanip>
@ -150,10 +151,10 @@ void p3MsgService::processMsg(RsMsgItem *mi)
pqiNotify *notify = getPqiNotify(); pqiNotify *notify = getPqiNotify();
if (notify) if (notify)
{ {
std::string message , title; std::string title, message;
notify->AddPopupMessage(RS_POPUP_MSG, mi->PeerId(), librs::util::ConvertUtf16ToUtf8(mi->subject, title);
title.assign(mi->subject.begin(), mi->subject.end()), librs::util::ConvertUtf16ToUtf8(mi->message, message);
message.assign(mi->message.begin(),mi->message.end())); notify->AddPopupMessage(RS_POPUP_MSG, mi->PeerId(), title, message);
std::ostringstream out; std::ostringstream out;
out << mi->msgId; out << mi->msgId;

View File

@ -331,6 +331,9 @@ HEADERS += rshare.h \
gui/toaster/MessageToaster.h \ gui/toaster/MessageToaster.h \
gui/toaster/OnlineToaster.h \ gui/toaster/OnlineToaster.h \
gui/toaster/DownloadToaster.h \ gui/toaster/DownloadToaster.h \
gui/toaster/ChatToaster.h \
gui/toaster/GroupChatToaster.h \
gui/toaster/ChatLobbyToaster.h \
gui/common/vmessagebox.h \ gui/common/vmessagebox.h \
gui/common/RsUrlHandler.h \ gui/common/RsUrlHandler.h \
gui/common/RsCollectionFile.h \ gui/common/RsCollectionFile.h \
@ -461,6 +464,9 @@ FORMS += gui/StartDialog.ui \
gui/toaster/MessageToaster.ui \ gui/toaster/MessageToaster.ui \
gui/toaster/OnlineToaster.ui \ gui/toaster/OnlineToaster.ui \
gui/toaster/DownloadToaster.ui \ gui/toaster/DownloadToaster.ui \
gui/toaster/ChatToaster.ui \
gui/toaster/GroupChatToaster.ui \
gui/toaster/ChatLobbyToaster.ui \
gui/advsearch/AdvancedSearchDialog.ui \ gui/advsearch/AdvancedSearchDialog.ui \
gui/advsearch/expressionwidget.ui \ gui/advsearch/expressionwidget.ui \
gui/NewsFeed.ui \ gui/NewsFeed.ui \
@ -633,6 +639,9 @@ SOURCES += main.cpp \
gui/toaster/MessageToaster.cpp \ gui/toaster/MessageToaster.cpp \
gui/toaster/DownloadToaster.cpp \ gui/toaster/DownloadToaster.cpp \
gui/toaster/OnlineToaster.cpp \ gui/toaster/OnlineToaster.cpp \
gui/toaster/ChatToaster.cpp \
gui/toaster/GroupChatToaster.cpp \
gui/toaster/ChatLobbyToaster.cpp \
gui/advsearch/advancedsearchdialog.cpp \ gui/advsearch/advancedsearchdialog.cpp \
gui/advsearch/expressionwidget.cpp \ gui/advsearch/expressionwidget.cpp \
gui/advsearch/guiexprelement.cpp \ gui/advsearch/guiexprelement.cpp \

View File

@ -126,8 +126,8 @@ static void updateItem(QTreeWidgetItem *item, ChatLobbyId id, const std::string
if(topic.empty()) if(topic.empty())
{ {
item->setText(COLUMN_TOPIC, QObject::tr("[No topic provided]")); item->setText(COLUMN_TOPIC, qApp->translate("ChatLobbyWidget", "[No topic provided]"));
item->setData(COLUMN_TOPIC, ROLE_SORT, QObject::tr("[No topic provided]")); item->setData(COLUMN_TOPIC, ROLE_SORT, qApp->translate("ChatLobbyWidget", "[No topic provided]"));
} }
else else
{ {

View File

@ -847,3 +847,29 @@ void FriendsDialog::recommendFriends()
{ {
return instance ? instance->ui.tabWidget : NULL; return instance ? instance->ui.tabWidget : NULL;
} }
/*static*/ bool FriendsDialog::isGroupChatActive()
{
FriendsDialog *friendsDialog = dynamic_cast<FriendsDialog*>(MainWindow::getPage(MainWindow::Friends));
if (!friendsDialog) {
return false;
}
if (friendsDialog->ui.tabWidget->currentWidget() == friendsDialog->ui.groupChatTab) {
return true;
}
return false;
}
/*static*/ void FriendsDialog::groupChatActivate()
{
FriendsDialog *friendsDialog = dynamic_cast<FriendsDialog*>(MainWindow::getPage(MainWindow::Friends));
if (!friendsDialog) {
return;
}
MainWindow::showWindow(MainWindow::Friends);
friendsDialog->ui.tabWidget->setCurrentWidget(friendsDialog->ui.groupChatTab);
friendsDialog->ui.lineEdit->setFocus();
}

View File

@ -47,6 +47,8 @@ public:
virtual void updateDisplay() ; // overloaded from RsAutoUpdatePage virtual void updateDisplay() ; // overloaded from RsAutoUpdatePage
static ChatTabWidget *getTabWidget(); static ChatTabWidget *getTabWidget();
static bool isGroupChatActive();
static void groupChatActivate();
public slots: public slots:

View File

@ -817,7 +817,7 @@ p, li { white-space: pre-wrap; }
<property name="tabsClosable"> <property name="tabsClosable">
<bool>true</bool> <bool>true</bool>
</property> </property>
<widget class="QWidget" name="tab"> <widget class="QWidget" name="groupChatTab">
<attribute name="title"> <attribute name="title">
<string>Group Chat</string> <string>Group Chat</string>
</attribute> </attribute>

View File

@ -947,6 +947,72 @@ void MainWindow::addAction(QAction *action, const char *slot)
connect(action, SIGNAL(triggered()), this, slot); connect(action, SIGNAL(triggered()), this, slot);
} }
#ifdef WINDOWS_SYS
//void SetForegroundWindowInternal(HWND hWnd)
//{
// if (!::IsWindow(hWnd)) return;
// // relation time of SetForegroundWindow lock
// DWORD lockTimeOut = 0;
// HWND hCurrWnd = ::GetForegroundWindow();
// DWORD dwThisTID = ::GetCurrentThreadId(),
// dwCurrTID = ::GetWindowThreadProcessId(hCurrWnd,0);
// // we need to bypass some limitations from Microsoft :)
// if (dwThisTID != dwCurrTID) {
// ::AttachThreadInput(dwThisTID, dwCurrTID, TRUE);
// ::SystemParametersInfo(SPI_GETFOREGROUNDLOCKTIMEOUT,0,&lockTimeOut,0);
// ::SystemParametersInfo(SPI_SETFOREGROUNDLOCKTIMEOUT,0,0,SPIF_SENDWININICHANGE | SPIF_UPDATEINIFILE);
// ::AllowSetForegroundWindow(ASFW_ANY);
// }
// ::SetForegroundWindow(hWnd);
// if(dwThisTID != dwCurrTID) {
// ::SystemParametersInfo(SPI_SETFOREGROUNDLOCKTIMEOUT,0,(PVOID)lockTimeOut,SPIF_SENDWININICHANGE | SPIF_UPDATEINIFILE);
// ::AttachThreadInput(dwThisTID, dwCurrTID, FALSE);
// }
//}
void SetForegroundWindowInternal(HWND hWnd)
{
if (!::IsWindow(hWnd)) return;
BYTE keyState[256] = {0};
// to unlock SetForegroundWindow we need to imitate Alt pressing
if (::GetKeyboardState((LPBYTE)&keyState)) {
if(!(keyState[VK_MENU] & 0x80)) {
::keybd_event(VK_MENU, 0, KEYEVENTF_EXTENDEDKEY | 0, 0);
}
}
::SetForegroundWindow(hWnd);
if (::GetKeyboardState((LPBYTE)&keyState)) {
if(!(keyState[VK_MENU] & 0x80)) {
::keybd_event(VK_MENU, 0, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, 0);
}
}
}
#endif
/*static*/ void MainWindow::raiseWindow()
{
if (_instance == NULL) {
return;
}
/* Show the dialog. */
_instance->show();
_instance->raise();
#ifdef WINDOWS_SYS
SetForegroundWindowInternal(_instance->winId());
#endif
}
/** Shows the MainWindow with focus set to the given page. */ /** Shows the MainWindow with focus set to the given page. */
/*static*/ void MainWindow::showWindow(Page page) /*static*/ void MainWindow::showWindow(Page page)
{ {
@ -955,7 +1021,7 @@ void MainWindow::addAction(QAction *action, const char *slot)
} }
/* Show the dialog. */ /* Show the dialog. */
_instance->show(); raiseWindow();
/* Set the focus to the specified page. */ /* Set the focus to the specified page. */
activatePage (page); activatePage (page);
} }

View File

@ -93,6 +93,7 @@ public:
/** Destructor. */ /** Destructor. */
~MainWindow(); ~MainWindow();
static void raiseWindow();
/** Shows the MainWindow dialog with focus set to the given page. */ /** Shows the MainWindow dialog with focus set to the given page. */
static void showWindow(Page page); static void showWindow(Page page);
/** Set focus to the given page. */ /** Set focus to the given page. */

View File

@ -27,6 +27,7 @@
#include "ChatTabWidget.h" #include "ChatTabWidget.h"
#include "gui/settings/rsharesettings.h" #include "gui/settings/rsharesettings.h"
#include "gui/settings/RsharePeerSettings.h" #include "gui/settings/RsharePeerSettings.h"
#include "gui/MainWindow.h"
#include "gui/FriendsDialog.h" #include "gui/FriendsDialog.h"
#include <retroshare/rsnotify.h> #include <retroshare/rsnotify.h>
@ -219,6 +220,7 @@ bool ChatLobbyDialog::canClose()
void ChatLobbyDialog::showDialog(uint chatflags) void ChatLobbyDialog::showDialog(uint chatflags)
{ {
if (chatflags & RS_CHAT_FOCUS) { if (chatflags & RS_CHAT_FOCUS) {
MainWindow::showWindow(MainWindow::Friends);
ChatTabWidget *tabWidget = FriendsDialog::getTabWidget(); ChatTabWidget *tabWidget = FriendsDialog::getTabWidget();
if (tabWidget) { if (tabWidget) {
tabWidget->setCurrentWidget(this); tabWidget->setCurrentWidget(this);

View File

@ -331,7 +331,7 @@ void ChatWidget::addChatMsg(bool incoming, const QString &name, const QDateTime
if (incoming && chatType == TYPE_NORMAL) { if (incoming && chatType == TYPE_NORMAL) {
emit newMessage(this); emit newMessage(this);
if (!isVisible() || (window() && (!window()->isActiveWindow() || window()->isMinimized()))) { if (!isActive()) {
newMessages = true; newMessages = true;
} }
@ -339,6 +339,15 @@ void ChatWidget::addChatMsg(bool incoming, const QString &name, const QDateTime
} }
} }
bool ChatWidget::isActive()
{
if (!isVisible() || (window() && (!window()->isActiveWindow() || window()->isMinimized()))) {
return false;
}
return true;
}
void ChatWidget::pasteLink() void ChatWidget::pasteLink()
{ {
std::cerr << "In paste link" << std::endl; std::cerr << "In paste link" << std::endl;

View File

@ -75,6 +75,8 @@ public:
void addChatButton(QPushButton *button) ; void addChatButton(QPushButton *button) ;
bool isActive();
private slots: private slots:
void clearChatHistory(); void clearChatHistory();
void deleteChatHistory(); void deleteChatHistory();

View File

@ -36,12 +36,6 @@
</property> </property>
<item> <item>
<widget class="QLabel" name="titleLabel"> <widget class="QLabel" name="titleLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font"> <property name="font">
<font> <font>
<family>Arial</family> <family>Arial</family>

View File

@ -146,7 +146,7 @@ void ChatMsgItem::insertChat(const std::string &message)
QString timestamp = QDateTime::currentDateTime().toString("hh:mm:ss"); QString timestamp = QDateTime::currentDateTime().toString("hh:mm:ss");
timestampLabel->setText(timestamp); timestampLabel->setText(timestamp);
QString formatMsg = QString::fromStdString(message); QString formatMsg = QString::fromUtf8(message.c_str());
unsigned int formatFlag = RSHTML_FORMATTEXT_EMBED_LINKS; unsigned int formatFlag = RSHTML_FORMATTEXT_EMBED_LINKS;

View File

@ -27,12 +27,6 @@
#include "notifyqt.h" #include "notifyqt.h"
#include <retroshare/rsnotify.h> #include <retroshare/rsnotify.h>
#include <retroshare/rspeers.h>
#include <retroshare/rsphoto.h>
#include <retroshare/rsmsgs.h>
#ifdef TURTLE_HOPPING
#include <retroshare/rsturtle.h>
#endif
#include "RsAutoUpdatePage.h" #include "RsAutoUpdatePage.h"
@ -41,8 +35,14 @@
#include "toaster/OnlineToaster.h" #include "toaster/OnlineToaster.h"
#include "toaster/MessageToaster.h" #include "toaster/MessageToaster.h"
#include "toaster/DownloadToaster.h" #include "toaster/DownloadToaster.h"
#include "toaster/ChatToaster.h"
#include "toaster/GroupChatToaster.h"
#include "toaster/ChatLobbyToaster.h"
#endif // MINIMAL_RSGUI #endif // MINIMAL_RSGUI
#include "chat/ChatDialog.h"
#include "chat/ChatWidget.h"
#include "FriendsDialog.h"
#include "gui/settings/rsharesettings.h" #include "gui/settings/rsharesettings.h"
#include "SoundManager.h" #include "SoundManager.h"
@ -468,21 +468,12 @@ void NotifyQt::UpdateGUI()
/* You can set timeToShow, timeToLive and timeToHide or can leave the standard */ /* You can set timeToShow, timeToLive and timeToHide or can leave the standard */
Toaster *toaster = NULL; Toaster *toaster = NULL;
/* id the name */
QString name;
if (type == RS_POPUP_DOWNLOAD) {
/* id = file hash */
} else {
name = QString::fromUtf8(rsPeers->getPeerName(id).c_str());
}
switch(type) switch(type)
{ {
case RS_POPUP_MSG: case RS_POPUP_MSG:
if (popupflags & RS_POPUP_MSG) if (popupflags & RS_POPUP_MSG)
{ {
toaster = new Toaster(new MessageToaster(name, QString::fromUtf8(title.c_str()), QString::fromStdString(msg))); toaster = new Toaster(new MessageToaster(id, QString::fromUtf8(title.c_str()), QString::fromUtf8(msg.c_str())));
} }
break; break;
case RS_POPUP_CONNECT: case RS_POPUP_CONNECT:
@ -490,15 +481,55 @@ void NotifyQt::UpdateGUI()
if (popupflags & RS_POPUP_CONNECT) if (popupflags & RS_POPUP_CONNECT)
{ {
toaster = new Toaster(new OnlineToaster(id, name)); toaster = new Toaster(new OnlineToaster(id));
} }
break; break;
case RS_POPUP_DOWNLOAD: case RS_POPUP_DOWNLOAD:
if (popupflags & RS_POPUP_DOWNLOAD) if (popupflags & RS_POPUP_DOWNLOAD)
{ {
/* id = file hash */
toaster = new Toaster(new DownloadToaster(id, QString::fromUtf8(title.c_str()))); toaster = new Toaster(new DownloadToaster(id, QString::fromUtf8(title.c_str())));
} }
break; break;
case RS_POPUP_CHAT:
if (popupflags & RS_POPUP_CHAT)
{
ChatDialog *chatDialog = ChatDialog::getChat(id, 0);
ChatWidget *chatWidget;
if (chatDialog && (chatWidget = chatDialog->getChatWidget()) && chatWidget->isActive()) {
// do not show when active
break;
}
toaster = new Toaster(new ChatToaster(id, QString::fromUtf8(msg.c_str())));
}
break;
case RS_POPUP_GROUPCHAT:
if (popupflags & RS_POPUP_GROUPCHAT)
{
MainWindow *mainWindow = MainWindow::getInstance();
if (mainWindow && mainWindow->isActiveWindow() && !mainWindow->isMinimized()) {
if (MainWindow::getActivatePage() == MainWindow::Friends) {
if (FriendsDialog::isGroupChatActive()) {
// do not show when active
break;
}
}
}
toaster = new Toaster(new GroupChatToaster(id, QString::fromUtf8(msg.c_str())));
}
break;
case RS_POPUP_CHATLOBBY:
if (popupflags & RS_POPUP_CHATLOBBY)
{
ChatDialog *chatDialog = ChatDialog::getChat(id, 0);
ChatWidget *chatWidget;
if (chatDialog && (chatWidget = chatDialog->getChatWidget()) && chatWidget->isActive()) {
// do not show when active
break;
}
toaster = new Toaster(new ChatLobbyToaster(id, QString::fromUtf8(title.c_str()), QString::fromUtf8(msg.c_str())));
}
break;
} }
if (toaster) { if (toaster) {

View File

@ -69,6 +69,12 @@ NotifyPage::save(QString &/*errmsg*/)
notifyflags |= RS_POPUP_MSG; notifyflags |= RS_POPUP_MSG;
if (ui.popup_DownloadFinished->isChecked()) if (ui.popup_DownloadFinished->isChecked())
notifyflags |= RS_POPUP_DOWNLOAD; notifyflags |= RS_POPUP_DOWNLOAD;
if (ui.popup_PrivateChat->isChecked())
notifyflags |= RS_POPUP_CHAT;
if (ui.popup_GroupChat->isChecked())
notifyflags |= RS_POPUP_GROUPCHAT;
if (ui.popup_ChatLobby->isChecked())
notifyflags |= RS_POPUP_CHATLOBBY;
if (ui.notify_Peers->isChecked()) if (ui.notify_Peers->isChecked())
newsflags |= RS_FEED_TYPE_PEER; newsflags |= RS_FEED_TYPE_PEER;
@ -151,6 +157,9 @@ void NotifyPage::load()
ui.popup_Connect->setChecked(notifyflags & RS_POPUP_CONNECT); ui.popup_Connect->setChecked(notifyflags & RS_POPUP_CONNECT);
ui.popup_NewMsg->setChecked(notifyflags & RS_POPUP_MSG); ui.popup_NewMsg->setChecked(notifyflags & RS_POPUP_MSG);
ui.popup_DownloadFinished->setChecked(notifyflags & RS_POPUP_DOWNLOAD); ui.popup_DownloadFinished->setChecked(notifyflags & RS_POPUP_DOWNLOAD);
ui.popup_PrivateChat->setChecked(notifyflags & RS_POPUP_CHAT);
ui.popup_GroupChat->setChecked(notifyflags & RS_POPUP_GROUPCHAT);
ui.popup_ChatLobby->setChecked(notifyflags & RS_POPUP_CHATLOBBY);
ui.notify_Peers->setChecked(newsflags & RS_FEED_TYPE_PEER); ui.notify_Peers->setChecked(newsflags & RS_FEED_TYPE_PEER);
ui.notify_Channels->setChecked(newsflags & RS_FEED_TYPE_CHAN); ui.notify_Channels->setChecked(newsflags & RS_FEED_TYPE_CHAN);

View File

@ -593,7 +593,7 @@
<item row="0" column="0"> <item row="0" column="0">
<widget class="QCheckBox" name="trayNotify_PrivateChat"> <widget class="QCheckBox" name="trayNotify_PrivateChat">
<property name="text"> <property name="text">
<string>Private Message</string> <string>Private Chat</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -715,6 +715,27 @@
</property> </property>
</widget> </widget>
</item> </item>
<item>
<widget class="QCheckBox" name="popup_PrivateChat">
<property name="text">
<string>Private Chat</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="popup_GroupChat">
<property name="text">
<string>Group Chat</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="popup_ChatLobby">
<property name="text">
<string>Chat Lobby</string>
</property>
</widget>
</item>
<item> <item>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<item row="1" column="0"> <item row="1" column="0">

View File

@ -0,0 +1,62 @@
/****************************************************************
* RetroShare is distributed under the following license:
*
* Copyright (C) 2012 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 "ChatLobbyToaster.h"
#include "gui/chat/ChatDialog.h"
#include "gui/chat/HandleRichText.h"
#include <retroshare/rsmsgs.h>
ChatLobbyToaster::ChatLobbyToaster(const std::string &peerId, const QString &name, const QString &message) : QWidget(NULL)
{
/* Invoke the Qt Designer generated object setup routine */
ui.setupUi(this);
this->peerId = peerId;
connect(ui.chatButton, SIGNAL(clicked()), SLOT(chatButtonSlot()));
connect(ui.closeButton, SIGNAL(clicked()), SLOT(hide()));
/* set informations */
ui.messageLabel->setText(RsHtml::formatText(message, RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS));
QString lobbyName = name;
std::list<ChatLobbyInfo> linfos;
rsMsgs->getChatLobbyList(linfos);
ChatLobbyId lobbyId;
if (rsMsgs->isLobbyId(peerId, lobbyId)) {
for (std::list<ChatLobbyInfo>::const_iterator it(linfos.begin()); it != linfos.end(); ++it) {
if ((*it).lobby_id == lobbyId) {
lobbyName += "@" + QString::fromUtf8((*it).lobby_name.c_str());
break;
}
}
}
ui.nameLabel->setText(lobbyName);
}
void ChatLobbyToaster::chatButtonSlot()
{
ChatDialog::chatFriend(peerId);
hide();
}

View File

@ -0,0 +1,49 @@
/****************************************************************
* RetroShare is distributed under the following license:
*
* Copyright (C) 2012 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 CHATLOBBYTOASTER_H
#define CHATLOBBYTOASTER_H
#include "ui_ChatLobbyToaster.h"
/**
* Shows a toaster when a chat is incoming.
*
*
*/
class ChatLobbyToaster : public QWidget
{
Q_OBJECT
public:
ChatLobbyToaster(const std::string &peerId, const QString &name, const QString &message);
private slots:
void chatButtonSlot();
private:
std::string peerId;
/** Qt Designer generated object */
Ui::ChatLobbyToaster ui;
};
#endif //CHATLOBBYTOASTER_H

View File

@ -0,0 +1,208 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>ChatLobbyToaster</class>
<widget class="QWidget" name="ChatLobbyToaster">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>300</width>
<height>100</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>300</width>
<height>100</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>300</width>
<height>100</height>
</size>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QFrame" name="windowFrame">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout">
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>0</number>
</property>
<item row="0" column="0">
<layout class="QGridLayout" name="_2">
<property name="leftMargin">
<number>6</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>6</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<property name="horizontalSpacing">
<number>6</number>
</property>
<property name="verticalSpacing">
<number>0</number>
</property>
<item row="0" column="3">
<widget class="QPushButton" name="closeButton">
<property name="minimumSize">
<size>
<width>18</width>
<height>18</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>18</width>
<height>18</height>
</size>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/closenormal.png</normaloff>:/images/closenormal.png</iconset>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="nameLabel">
<property name="font">
<font>
<pointsize>9</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string notr="true">Name</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_2">
<property name="minimumSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../images.qrc">:/images/rstray3.png</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="2">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</spacer>
</item>
</layout>
</item>
<item row="1" column="0">
<layout class="QGridLayout" name="_3">
<property name="leftMargin">
<number>4</number>
</property>
<property name="rightMargin">
<number>4</number>
</property>
<property name="spacing">
<number>0</number>
</property>
<item row="0" column="1">
<widget class="QPushButton" name="chatButton">
<property name="font">
<font/>
</property>
<property name="text">
<string>Show Chat Lobby</string>
</property>
</widget>
</item>
<item row="1" column="1" rowspan="2">
<widget class="QLabel" name="messageLabel">
<property name="maximumSize">
<size>
<width>220</width>
<height>47</height>
</size>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="0" rowspan="3">
<widget class="QLabel" name="avatar">
<property name="minimumSize">
<size>
<width>70</width>
<height>70</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>70</width>
<height>70</height>
</size>
</property>
<property name="frameShape">
<enum>QFrame::Panel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
<property name="pixmap">
<pixmap resource="../images.qrc">:/images/user/agt_forum64.png</pixmap>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<resources>
<include location="../images.qrc"/>
</resources>
<connections/>
</ui>

View File

@ -0,0 +1,49 @@
/****************************************************************
* RetroShare is distributed under the following license:
*
* Copyright (C) 2012 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 "ChatToaster.h"
#include "gui/chat/ChatDialog.h"
#include "gui/chat/HandleRichText.h"
#include <retroshare/rspeers.h>
ChatToaster::ChatToaster(const std::string &peerId, const QString &message) : QWidget(NULL)
{
/* Invoke the Qt Designer generated object setup routine */
ui.setupUi(this);
this->peerId = peerId;
connect(ui.chatButton, SIGNAL(clicked()), SLOT(chatButtonSlot()));
connect(ui.closeButton, SIGNAL(clicked()), SLOT(hide()));
/* set informations */
ui.messageLabel->setText(RsHtml::formatText(message, RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS));
ui.nameLabel->setText(QString::fromUtf8(rsPeers->getPeerName(peerId).c_str()));
ui.avatarWidget->setFrameType(AvatarWidget::STATUS_FRAME);
ui.avatarWidget->setId(peerId, false);
}
void ChatToaster::chatButtonSlot()
{
ChatDialog::chatFriend(peerId);
hide();
}

View File

@ -0,0 +1,49 @@
/****************************************************************
* RetroShare is distributed under the following license:
*
* Copyright (C) 2012 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 CHATTOASTER_H
#define CHATTOASTER_H
#include "ui_ChatToaster.h"
/**
* Shows a toaster when a chat is incoming.
*
*
*/
class ChatToaster : public QWidget
{
Q_OBJECT
public:
ChatToaster(const std::string &peerId, const QString &message);
private slots:
void chatButtonSlot();
private:
std::string peerId;
/** Qt Designer generated object */
Ui::ChatToaster ui;
};
#endif //CHATTOASTER_H

View File

@ -0,0 +1,207 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>ChatToaster</class>
<widget class="QWidget" name="ChatToaster">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>300</width>
<height>102</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>300</width>
<height>100</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>300</width>
<height>102</height>
</size>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QFrame" name="windowFrame">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout">
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>0</number>
</property>
<item row="0" column="0">
<layout class="QGridLayout" name="_2">
<property name="leftMargin">
<number>6</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>6</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<property name="horizontalSpacing">
<number>6</number>
</property>
<property name="verticalSpacing">
<number>0</number>
</property>
<item row="0" column="3">
<widget class="QPushButton" name="closeButton">
<property name="minimumSize">
<size>
<width>18</width>
<height>18</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>18</width>
<height>18</height>
</size>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/closenormal.png</normaloff>:/images/closenormal.png</iconset>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="2">
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</spacer>
</item>
<item row="0" column="1">
<widget class="QLabel" name="nameLabel">
<property name="font">
<font>
<pointsize>9</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string notr="true">Name</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_2">
<property name="minimumSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../images.qrc">:/images/rstray3.png</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="0">
<layout class="QGridLayout" name="_3">
<property name="leftMargin">
<number>4</number>
</property>
<property name="rightMargin">
<number>4</number>
</property>
<property name="spacing">
<number>0</number>
</property>
<item row="0" column="1">
<widget class="QPushButton" name="chatButton">
<property name="font">
<font/>
</property>
<property name="text">
<string>Show Chat</string>
</property>
</widget>
</item>
<item row="1" column="1" rowspan="2">
<widget class="QLabel" name="messageLabel">
<property name="maximumSize">
<size>
<width>220</width>
<height>47</height>
</size>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="0" rowspan="3">
<widget class="AvatarWidget" name="avatarWidget" native="true">
<property name="minimumSize">
<size>
<width>70</width>
<height>70</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>70</width>
<height>70</height>
</size>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</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>
<connections/>
</ui>

View File

@ -0,0 +1,48 @@
/*
* RetroShare
* Copyright (C) 2012 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "GroupChatToaster.h"
#include "gui/FriendsDialog.h"
#include "gui/chat/HandleRichText.h"
#include <retroshare/rspeers.h>
GroupChatToaster::GroupChatToaster(const std::string &peerId, const QString &message) : QWidget(NULL)
{
/* Invoke the Qt Designer generated object setup routine */
ui.setupUi(this);
this->peerId = peerId;
connect(ui.chatButton, SIGNAL(clicked()), SLOT(chatButtonSlot()));
connect(ui.closeButton, SIGNAL(clicked()), SLOT(hide()));
/* set informations */
ui.messageLabel->setText(RsHtml::formatText(message, RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS));
ui.nameLabel->setText(QString::fromUtf8(rsPeers->getPeerName(peerId).c_str()));
ui.avatarWidget->setFrameType(AvatarWidget::STATUS_FRAME);
ui.avatarWidget->setDefaultAvatar(":/images/user/personal64.png");
ui.avatarWidget->setId(peerId, false);
}
void GroupChatToaster::chatButtonSlot()
{
FriendsDialog::groupChatActivate();
hide();
}

View File

@ -0,0 +1,47 @@
/*
* RetroShare
* Copyright (C) 2012 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef GROUPCHATTOASTER_H
#define GROUPCHATTOASTER_H
#include "ui_GroupChatToaster.h"
/**
* Shows a toaster when friend is GroupChat .
*
*
*/
class GroupChatToaster : public QWidget
{
Q_OBJECT
public:
GroupChatToaster(const std::string &peerId, const QString &message);
private slots:
void chatButtonSlot();
private:
std::string peerId;
/** Qt Designer generated object */
Ui::GroupChatToaster ui;
};
#endif //GROUPCHATTOASTER_H

View File

@ -0,0 +1,216 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>GroupChatToaster</class>
<widget class="QWidget" name="GroupChatToaster">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>300</width>
<height>100</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>300</width>
<height>100</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>300</width>
<height>100</height>
</size>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QFrame" name="windowFrame">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout">
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>0</number>
</property>
<item row="0" column="0">
<layout class="QGridLayout">
<property name="leftMargin">
<number>6</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>6</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<property name="horizontalSpacing">
<number>6</number>
</property>
<property name="verticalSpacing">
<number>0</number>
</property>
<item row="0" column="3">
<widget class="QPushButton" name="closeButton">
<property name="minimumSize">
<size>
<width>18</width>
<height>18</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>18</width>
<height>18</height>
</size>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/closenormal.png</normaloff>:/images/closenormal.png</iconset>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="nameLabel">
<property name="font">
<font>
<pointsize>9</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string notr="true">Name</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_2">
<property name="minimumSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../images.qrc">:/images/rstray3.png</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="2">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="1" column="0">
<layout class="QGridLayout">
<property name="leftMargin">
<number>4</number>
</property>
<property name="rightMargin">
<number>4</number>
</property>
<property name="spacing">
<number>0</number>
</property>
<item row="0" column="0" rowspan="3">
<widget class="AvatarWidget" name="avatarWidget" native="true">
<property name="minimumSize">
<size>
<width>70</width>
<height>70</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>70</width>
<height>70</height>
</size>
</property>
</widget>
</item>
<item row="1" column="1" rowspan="2">
<widget class="QLabel" name="messageLabel">
<property name="maximumSize">
<size>
<width>220</width>
<height>47</height>
</size>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QPushButton" name="chatButton">
<property name="font">
<font/>
</property>
<property name="text">
<string>Show Group Chat</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>AvatarWidget</class>
<extends>QWidget</extends>
<header>gui/common/AvatarWidget.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>closeButton</tabstop>
</tabstops>
<resources>
<include location="../images.qrc"/>
</resources>
<connections/>
</ui>

View File

@ -20,7 +20,9 @@
#include "MessageToaster.h" #include "MessageToaster.h"
#include "../MainWindow.h" #include "../MainWindow.h"
MessageToaster::MessageToaster(const QString &name, const QString &title, const QString &message) : QWidget(NULL) #include <retroshare/rspeers.h>
MessageToaster::MessageToaster(const std::string &peerId, const QString &title, const QString &message) : QWidget(NULL)
{ {
/* Invoke the Qt Designer generated object setup routine */ /* Invoke the Qt Designer generated object setup routine */
ui.setupUi(this); ui.setupUi(this);
@ -35,7 +37,7 @@ MessageToaster::MessageToaster(const QString &name, const QString &title, const
ui.subjectline->setToolTip(title); ui.subjectline->setToolTip(title);
ui.contentBrowser->setText(message); ui.contentBrowser->setText(message);
ui.contentBrowser->setToolTip(message); ui.contentBrowser->setToolTip(message);
ui.lblTitle->setText(ui.lblTitle->text() + " " + name); ui.lblTitle->setText(ui.lblTitle->text() + " " + QString::fromUtf8(rsPeers->getPeerName(peerId).c_str()));
} }
void MessageToaster::openmessageClicked() void MessageToaster::openmessageClicked()

View File

@ -33,7 +33,7 @@ class MessageToaster : public QWidget
Q_OBJECT Q_OBJECT
public: public:
MessageToaster(const QString &name, const QString &title, const QString &message); MessageToaster(const std::string &peerId, const QString &title, const QString &message);
private slots: private slots:
void openmessageClicked(); void openmessageClicked();

View File

@ -18,12 +18,12 @@
*/ */
#include "OnlineToaster.h" #include "OnlineToaster.h"
#include "gui/settings/rsharesettings.h"
#include "gui/chat/ChatDialog.h" #include "gui/chat/ChatDialog.h"
#include "util/WidgetBackgroundImage.h" #include "util/WidgetBackgroundImage.h"
#include "gui/common/AvatarDefs.h"
OnlineToaster::OnlineToaster(const std::string &peerId, const QString &name) : QWidget(NULL) #include <retroshare/rspeers.h>
OnlineToaster::OnlineToaster(const std::string &peerId) : QWidget(NULL)
{ {
/* Invoke the Qt Designer generated object setup routine */ /* Invoke the Qt Designer generated object setup routine */
ui.setupUi(this); ui.setupUi(this);
@ -35,11 +35,9 @@ OnlineToaster::OnlineToaster(const std::string &peerId, const QString &name) : Q
connect(ui.closeButton, SIGNAL(clicked()), SLOT(hide())); connect(ui.closeButton, SIGNAL(clicked()), SLOT(hide()));
/* set informations */ /* set informations */
ui.messageLabel->setText(name); ui.messageLabel->setText(QString::fromUtf8(rsPeers->getPeerName(peerId).c_str()));
ui.avatarWidget->setFrameType(AvatarWidget::STATUS_FRAME);
QPixmap avatar; ui.avatarWidget->setId(peerId, false);
AvatarDefs::getAvatarFromSslId(peerId, avatar, ":/images/user/personal64.png");
ui.pixmaplabel->setPixmap(avatar);
WidgetBackgroundImage::setBackgroundImage(ui.windowFrame, ":images/toaster/backgroundtoaster.png", WidgetBackgroundImage::AdjustNone); WidgetBackgroundImage::setBackgroundImage(ui.windowFrame, ":images/toaster/backgroundtoaster.png", WidgetBackgroundImage::AdjustNone);
} }

View File

@ -32,7 +32,7 @@ class OnlineToaster : public QWidget
Q_OBJECT Q_OBJECT
public: public:
OnlineToaster(const std::string &peerId, const QString &name); OnlineToaster(const std::string &peerId);
private slots: private slots:
void chatButtonSlot(); void chatButtonSlot();

View File

@ -162,37 +162,6 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="0" rowspan="4">
<widget class="QLabel" name="pixmaplabel">
<property name="minimumSize">
<size>
<width>70</width>
<height>70</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>70</width>
<height>70</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QLabel#pixmaplabel{
border: 2px solid #238;
border-radius: 4px;}
</string>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../images.qrc">:/images/user/personal64.png</pixmap>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="1"> <item row="0" column="1">
<widget class="QPushButton" name="messageButton"> <widget class="QPushButton" name="messageButton">
<property name="font"> <property name="font">
@ -222,6 +191,22 @@ border-radius: 4px;}
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="0" column="0" rowspan="4">
<widget class="AvatarWidget" name="avatarWidget" native="true">
<property name="minimumSize">
<size>
<width>70</width>
<height>70</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>70</width>
<height>70</height>
</size>
</property>
</widget>
</item>
</layout> </layout>
</item> </item>
<item row="2" column="0"> <item row="2" column="0">
@ -242,6 +227,14 @@ border-radius: 4px;}
</item> </item>
</layout> </layout>
</widget> </widget>
<customwidgets>
<customwidget>
<class>AvatarWidget</class>
<extends>QWidget</extends>
<header>gui/common/AvatarWidget.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<tabstops> <tabstops>
<tabstop>closeButton</tabstop> <tabstop>closeButton</tabstop>
</tabstops> </tabstops>

View File

@ -233,7 +233,7 @@ p, li { white-space: pre-wrap; }
<context> <context>
<name>AvatarWidget</name> <name>AvatarWidget</name>
<message> <message>
<location filename="../gui/common/AvatarWidget.cpp" line="+122"/> <location filename="../gui/common/AvatarWidget.cpp" line="+123"/>
<source>Click to change your avatar</source> <source>Click to change your avatar</source>
<translation>Klick zum Ändern deines Avatars</translation> <translation>Klick zum Ändern deines Avatars</translation>
</message> </message>
@ -241,7 +241,7 @@ p, li { white-space: pre-wrap; }
<context> <context>
<name>BandwidthGraph</name> <name>BandwidthGraph</name>
<message> <message>
<location filename="../gui/bwgraph/bwgraph.cpp" line="+203"/> <location filename="../gui/bwgraph/bwgraph.cpp" line="+202"/>
<source>Since:</source> <source>Since:</source>
<translation>Seit:</translation> <translation>Seit:</translation>
</message> </message>
@ -361,7 +361,7 @@ p, li { white-space: pre-wrap; }
<translation>OK</translation> <translation>OK</translation>
</message> </message>
<message> <message>
<location filename="../gui/unfinished/blogs/BlogDetails.cpp" line="+49"/> <location filename="../gui/unfinished/blogs/BlogDetails.cpp" line="+48"/>
<source>Close</source> <source>Close</source>
<translation>Schliessen</translation> <translation>Schliessen</translation>
</message> </message>
@ -696,7 +696,7 @@ p, li { white-space: pre-wrap; }
<context> <context>
<name>CertificatePage</name> <name>CertificatePage</name>
<message> <message>
<location filename="../gui/connect/ConnectFriendWizard.cpp" line="+737"/> <location filename="../gui/connect/ConnectFriendWizard.cpp" line="+738"/>
<source>Certificate files</source> <source>Certificate files</source>
<translation>Zertifikat-Dateien</translation> <translation>Zertifikat-Dateien</translation>
</message> </message>
@ -795,7 +795,7 @@ p, li { white-space: pre-wrap; }
</message> </message>
<message> <message>
<location line="+26"/> <location line="+26"/>
<location filename="../gui/feeds/ChanMsgItem.cpp" line="+322"/> <location filename="../gui/feeds/ChanMsgItem.cpp" line="+315"/>
<source>Expand</source> <source>Expand</source>
<translation>Erweitern</translation> <translation>Erweitern</translation>
</message> </message>
@ -830,12 +830,17 @@ p, li { white-space: pre-wrap; }
<translation>Kopiere RetroShare Link</translation> <translation>Kopiere RetroShare Link</translation>
</message> </message>
<message> <message>
<location filename="../gui/feeds/ChanMsgItem.cpp" line="-215"/> <location filename="../gui/feeds/ChanMsgItem.cpp" line="-211"/>
<source>Channel Feed</source> <source>Channel Feed</source>
<translation>Kanal</translation> <translation>Kanal</translation>
</message> </message>
<message> <message>
<location line="+112"/> <location line="+67"/>
<source>Files</source>
<translation>Dateien</translation>
</message>
<message>
<location line="+41"/>
<source>Warning! You have less than %1 hours and %2 minute before this file is delted Consider saving it.</source> <source>Warning! You have less than %1 hours and %2 minute before this file is delted Consider saving it.</source>
<translation>Warnung! Du hast weniger als %1 Stunden und %2 Minuten bevor die Datei gelöscht wird. Denke daran, sie zu speichern.</translation> <translation>Warnung! Du hast weniger als %1 Stunden und %2 Minuten bevor die Datei gelöscht wird. Denke daran, sie zu speichern.</translation>
</message> </message>
@ -937,7 +942,7 @@ p, li { white-space: pre-wrap; }
<translation>OK</translation> <translation>OK</translation>
</message> </message>
<message> <message>
<location filename="../gui/channels/ChannelDetails.cpp" line="+50"/> <location filename="../gui/channels/ChannelDetails.cpp" line="+49"/>
<source>Close</source> <source>Close</source>
<translation>Schliessen</translation> <translation>Schliessen</translation>
</message> </message>
@ -1112,7 +1117,7 @@ Bitte wähle einen zum chatten aus.</translation>
<context> <context>
<name>ChatLobbyDialog</name> <name>ChatLobbyDialog</name>
<message> <message>
<location filename="../gui/chat/ChatLobbyDialog.cpp" line="+59"/> <location filename="../gui/chat/ChatLobbyDialog.cpp" line="+60"/>
<source>Welcome to lobby %1</source> <source>Welcome to lobby %1</source>
<translation>Willkommen in der Lobby %1</translation> <translation>Willkommen in der Lobby %1</translation>
</message> </message>
@ -1153,7 +1158,7 @@ Bitte wähle einen zum chatten aus.</translation>
<translation>Lobby abbestellen</translation> <translation>Lobby abbestellen</translation>
</message> </message>
<message> <message>
<location line="+23"/> <location line="+24"/>
<source>Hide Participants</source> <source>Hide Participants</source>
<translation>Telnehmer ausblenden</translation> <translation>Telnehmer ausblenden</translation>
</message> </message>
@ -1164,11 +1169,19 @@ Bitte wähle einen zum chatten aus.</translation>
</message> </message>
<message> <message>
<location filename="../gui/chat/ChatLobbyDialog.ui" line="+177"/> <location filename="../gui/chat/ChatLobbyDialog.ui" line="+177"/>
<location filename="../gui/chat/ChatLobbyDialog.cpp" line="-104"/> <location filename="../gui/chat/ChatLobbyDialog.cpp" line="-105"/>
<source>Change nick name</source> <source>Change nick name</source>
<translation>Ändere Spitznamen</translation> <translation>Ändere Spitznamen</translation>
</message> </message>
</context> </context>
<context>
<name>ChatLobbyToaster</name>
<message>
<location filename="../gui/toaster/ChatLobbyToaster.ui" line="+155"/>
<source>Show Chat Lobby</source>
<translation>Zeige Chat Lobbie</translation>
</message>
</context>
<context> <context>
<name>ChatLobbyWidget</name> <name>ChatLobbyWidget</name>
<message> <message>
@ -1230,7 +1243,13 @@ p, li { white-space: pre-wrap; }
<translation>Abonnieren</translation> <translation>Abonnieren</translation>
</message> </message>
<message> <message>
<location line="+265"/> <location line="+23"/>
<location line="+1"/>
<source>[No topic provided]</source>
<translation>[Kein Thema angegeben]</translation>
</message>
<message>
<location line="+241"/>
<source>Invitation to chat lobby</source> <source>Invitation to chat lobby</source>
<translation>Einladung zur Chat Lobby</translation> <translation>Einladung zur Chat Lobby</translation>
</message> </message>
@ -1279,7 +1298,7 @@ p, li { white-space: pre-wrap; }
<translation>Abbrechen</translation> <translation>Abbrechen</translation>
</message> </message>
<message> <message>
<location filename="../gui/feeds/ChatMsgItem.cpp" line="+247"/> <location filename="../gui/feeds/ChatMsgItem.cpp" line="+245"/>
<source>Quick Message</source> <source>Quick Message</source>
<translation>Schnelle Nachrricht</translation> <translation>Schnelle Nachrricht</translation>
</message> </message>
@ -1487,6 +1506,14 @@ p, li { white-space: pre-wrap; }
<translation>Kompakter Stil für den Verlauf</translation> <translation>Kompakter Stil für den Verlauf</translation>
</message> </message>
</context> </context>
<context>
<name>ChatToaster</name>
<message>
<location filename="../gui/toaster/ChatToaster.ui" line="+155"/>
<source>Show Chat</source>
<translation>Zeige Chat</translation>
</message>
</context>
<context> <context>
<name>ChatWidget</name> <name>ChatWidget</name>
<message> <message>
@ -1593,7 +1620,7 @@ p, li { white-space: pre-wrap; }
<translation>Schriftart auf den Standard setzen</translation> <translation>Schriftart auf den Standard setzen</translation>
</message> </message>
<message> <message>
<location filename="../gui/chat/ChatWidget.cpp" line="+355"/> <location filename="../gui/chat/ChatWidget.cpp" line="+364"/>
<source>Paste RetroShare Link</source> <source>Paste RetroShare Link</source>
<translation>RetroShare Link einfügen</translation> <translation>RetroShare Link einfügen</translation>
</message> </message>
@ -1983,7 +2010,7 @@ und meinen GPG Schlüssel nicht unterzeichnet</translation>
<context> <context>
<name>ConnectFriendWizard</name> <name>ConnectFriendWizard</name>
<message> <message>
<location filename="../gui/connect/ConnectFriendWizard.cpp" line="-882"/> <location filename="../gui/connect/ConnectFriendWizard.cpp" line="-883"/>
<source>Certificate Load Failed</source> <source>Certificate Load Failed</source>
<translation>Das Zertifikat konnte nicht geladen werden</translation> <translation>Das Zertifikat konnte nicht geladen werden</translation>
</message> </message>
@ -3144,7 +3171,7 @@ p, li { white-space: pre-wrap; }
<context> <context>
<name>DHTStatus</name> <name>DHTStatus</name>
<message> <message>
<location filename="../gui/statusbar/dhtstatus.cpp" line="+43"/> <location filename="../gui/statusbar/dhtstatus.cpp" line="+42"/>
<source>DHT</source> <source>DHT</source>
<translation>DHT</translation> <translation>DHT</translation>
</message> </message>
@ -3718,7 +3745,7 @@ Das ist nützlich, wenn Du eine externe Festplatte freigibst und die Datei nicht
<context> <context>
<name>EmailPage</name> <name>EmailPage</name>
<message> <message>
<location filename="../gui/connect/ConnectFriendWizard.cpp" line="+1141"/> <location filename="../gui/connect/ConnectFriendWizard.cpp" line="+1142"/>
<source>Invite Friends by Email</source> <source>Invite Friends by Email</source>
<translation>Lade Freunde per Email ein</translation> <translation>Lade Freunde per Email ein</translation>
</message> </message>
@ -3775,7 +3802,7 @@ Bis bald in RetroShare!</translation>
<context> <context>
<name>ExampleDialog</name> <name>ExampleDialog</name>
<message> <message>
<location filename="../gui/unfinished/ExampleDialog.cpp" line="+102"/> <location filename="../gui/unfinished/ExampleDialog.cpp" line="+101"/>
<source>Vote Up</source> <source>Vote Up</source>
<translation>Daumen hoch</translation> <translation>Daumen hoch</translation>
</message> </message>
@ -4106,7 +4133,7 @@ p, li { white-space: pre-wrap; }
<context> <context>
<name>FlatStyle_RDM</name> <name>FlatStyle_RDM</name>
<message> <message>
<location filename="../gui/RemoteDirModel.cpp" line="+646"/> <location filename="../gui/RemoteDirModel.cpp" line="+645"/>
<source>Friends Directories</source> <source>Friends Directories</source>
<translation>Dateien von Freunden</translation> <translation>Dateien von Freunden</translation>
</message> </message>
@ -4263,7 +4290,7 @@ p, li { white-space: pre-wrap; }
<translation>OK</translation> <translation>OK</translation>
</message> </message>
<message> <message>
<location filename="../gui/forums/ForumDetails.cpp" line="+50"/> <location filename="../gui/forums/ForumDetails.cpp" line="+49"/>
<source>Apply and Close</source> <source>Apply and Close</source>
<translation>Annehmen und Schliessen</translation> <translation>Annehmen und Schliessen</translation>
</message> </message>
@ -5126,12 +5153,12 @@ p, li { white-space: pre-wrap; }
<translation type="obsolete">Wähle oder ändere dein Avatar Bild</translation> <translation type="obsolete">Wähle oder ändere dein Avatar Bild</translation>
</message> </message>
<message> <message>
<location line="+321"/> <location line="+164"/>
<source>Edit Personal message</source> <source>Edit Personal message</source>
<translation>Statusnachricht ändern</translation> <translation>Statusnachricht ändern</translation>
</message> </message>
<message> <message>
<location line="+28"/> <location line="+41"/>
<source>Group Chat</source> <source>Group Chat</source>
<translation>Gruppenchat</translation> <translation>Gruppenchat</translation>
</message> </message>
@ -5181,18 +5208,16 @@ p, li { white-space: pre-wrap; }
<translation>Nachrichtenverlauf leeren</translation> <translation>Nachrichtenverlauf leeren</translation>
</message> </message>
<message> <message>
<location line="-619"/> <location line="+9"/>
<location line="+628"/>
<source>Add Friend</source> <source>Add Friend</source>
<translation>Freund hinzufügen</translation> <translation>Freund hinzufügen</translation>
</message> </message>
<message> <message>
<location line="-590"/>
<source>...</source> <source>...</source>
<translation type="unfinished">...</translation> <translation type="obsolete">...</translation>
</message> </message>
<message> <message>
<location line="+599"/> <location line="+9"/>
<source>Create new Profile</source> <source>Create new Profile</source>
<translation>Erstelle neues Profil</translation> <translation>Erstelle neues Profil</translation>
</message> </message>
@ -5255,15 +5280,13 @@ p, li { white-space: pre-wrap; }
<translation>Nachrichtenverlauf speichern</translation> <translation>Nachrichtenverlauf speichern</translation>
</message> </message>
<message> <message>
<location line="-637"/> <location line="+33"/>
<location line="+670"/>
<location line="+3"/> <location line="+3"/>
<source>Create new Chat lobby</source> <source>Create new Chat lobby</source>
<translation>Neue Chat Lobby erstellen</translation> <translation>Neue Chat Lobby erstellen</translation>
</message> </message>
<message> <message>
<location line="-638"/> <location line="+9"/>
<location line="+647"/>
<source>Friend Recommendations</source> <source>Friend Recommendations</source>
<translation>Freundempfehlungen</translation> <translation>Freundempfehlungen</translation>
</message> </message>
@ -5298,8 +5321,7 @@ p, li { white-space: pre-wrap; }
<translation type="obsolete">Status ausblenden</translation> <translation type="obsolete">Status ausblenden</translation>
</message> </message>
<message> <message>
<location line="-727"/> <location line="-46"/>
<location line="+681"/>
<location line="+3"/> <location line="+3"/>
<source>Add a new Group</source> <source>Add a new Group</source>
<translation>Neue Gruppe hinzufügen</translation> <translation>Neue Gruppe hinzufügen</translation>
@ -5327,7 +5349,7 @@ p, li { white-space: pre-wrap; }
<translation>Löscht den gespeicherten und angezeigten Chat Verlauf</translation> <translation>Löscht den gespeicherten und angezeigten Chat Verlauf</translation>
</message> </message>
<message> <message>
<location filename="../gui/FriendsDialog.cpp" line="+104"/> <location filename="../gui/FriendsDialog.cpp" line="+98"/>
<source>Chat lobbies</source> <source>Chat lobbies</source>
<translation>Chat Lobbies</translation> <translation>Chat Lobbies</translation>
</message> </message>
@ -5506,7 +5528,7 @@ p, li { white-space: pre-wrap; }
<context> <context>
<name>GamesDialog</name> <name>GamesDialog</name>
<message> <message>
<location filename="../gui/unfinished/GamesDialog.cpp" line="+337"/> <location filename="../gui/unfinished/GamesDialog.cpp" line="+336"/>
<source>Cancel Game</source> <source>Cancel Game</source>
<translation>Spiel abbrechen</translation> <translation>Spiel abbrechen</translation>
</message> </message>
@ -6284,7 +6306,7 @@ p, li { white-space: pre-wrap; }
<translation type="obsolete">Dein Freund hat RetroShare installiert und möchte, daß du es auch versuchst.</translation> <translation type="obsolete">Dein Freund hat RetroShare installiert und möchte, daß du es auch versuchst.</translation>
</message> </message>
<message> <message>
<location filename="../gui/GetStartedDialog.cpp" line="+262"/> <location filename="../gui/GetStartedDialog.cpp" line="+261"/>
<source>forums and channels, all of which are as secure as the file-sharing.</source> <source>forums and channels, all of which are as secure as the file-sharing.</source>
<translation>Foren, Kanäle, von denen alle ebenso sicher sind wie das Tauschen von Dateien.</translation> <translation>Foren, Kanäle, von denen alle ebenso sicher sind wie das Tauschen von Dateien.</translation>
</message> </message>
@ -6399,6 +6421,14 @@ p, li { white-space: pre-wrap; }
<translation>Klicke und ziehe die Knoten umher, Zoome mit dem Mausrad or den Tasten &apos;+&apos; und &apos;-&apos;</translation> <translation>Klicke und ziehe die Knoten umher, Zoome mit dem Mausrad or den Tasten &apos;+&apos; und &apos;-&apos;</translation>
</message> </message>
</context> </context>
<context>
<name>GroupChatToaster</name>
<message>
<location filename="../gui/toaster/GroupChatToaster.ui" line="+190"/>
<source>Show Group Chat</source>
<translation>Zeige Gruppenchat</translation>
</message>
</context>
<context> <context>
<name>GroupDefs</name> <name>GroupDefs</name>
<message> <message>
@ -7027,7 +7057,7 @@ p, li { white-space: pre-wrap; }
<context> <context>
<name>IntroPage</name> <name>IntroPage</name>
<message> <message>
<location filename="../gui/connect/ConnectFriendWizard.cpp" line="-461"/> <location filename="../gui/connect/ConnectFriendWizard.cpp" line="-462"/>
<source>&amp;Make friend with selected friends of my friends</source> <source>&amp;Make friend with selected friends of my friends</source>
<translation>&amp;Füge ausgewählte Freunde Deiner Freunde hinzu</translation> <translation>&amp;Füge ausgewählte Freunde Deiner Freunde hinzu</translation>
</message> </message>
@ -7069,7 +7099,7 @@ Die folgenden Wege sind möglich:</translation>
<context> <context>
<name>MainWindow</name> <name>MainWindow</name>
<message> <message>
<location filename="../gui/MainWindow.cpp" line="+245"/> <location filename="../gui/MainWindow.cpp" line="+244"/>
<source>Network</source> <source>Network</source>
<translation>Netzwerk</translation> <translation>Netzwerk</translation>
</message> </message>
@ -7167,7 +7197,7 @@ Die folgenden Wege sind möglich:</translation>
<translation>%1 Freunde verbunden</translation> <translation>%1 Freunde verbunden</translation>
</message> </message>
<message> <message>
<location line="+700"/> <location line="+766"/>
<source>It seems to be an old RetroShare link. Please use copy instead.</source> <source>It seems to be an old RetroShare link. Please use copy instead.</source>
<translation>Es scheint ein alter RetroShare Link zu sein. Bitte kopiere den Link stattdessen.</translation> <translation>Es scheint ein alter RetroShare Link zu sein. Bitte kopiere den Link stattdessen.</translation>
</message> </message>
@ -7177,23 +7207,23 @@ Die folgenden Wege sind möglich:</translation>
<translation>Link ist fehlerhaft.</translation> <translation>Link ist fehlerhaft.</translation>
</message> </message>
<message> <message>
<location line="-708"/> <location line="-774"/>
<source>%1 friend connected</source> <source>%1 friend connected</source>
<translation>%1 Freund verbunden</translation> <translation>%1 Freund verbunden</translation>
</message> </message>
<message> <message>
<location line="+341"/> <location line="+407"/>
<source>Internal Error</source> <source>Internal Error</source>
<translation>Interener Fehler</translation> <translation>Interener Fehler</translation>
</message> </message>
<message> <message>
<location filename="../gui/MainWindow.ui" line="+88"/> <location filename="../gui/MainWindow.ui" line="+88"/>
<location filename="../gui/MainWindow.cpp" line="-727"/> <location filename="../gui/MainWindow.cpp" line="-793"/>
<source>Options</source> <source>Options</source>
<translation>Optionen</translation> <translation>Optionen</translation>
</message> </message>
<message> <message>
<location filename="../gui/MainWindow.cpp" line="+760"/> <location filename="../gui/MainWindow.cpp" line="+826"/>
<source>Hide</source> <source>Hide</source>
<translation>Verbergen</translation> <translation>Verbergen</translation>
</message> </message>
@ -7203,7 +7233,7 @@ Die folgenden Wege sind möglich:</translation>
<translation>Zeigen</translation> <translation>Zeigen</translation>
</message> </message>
<message> <message>
<location line="-749"/> <location line="-815"/>
<source>RetroShare</source> <source>RetroShare</source>
<translation></translation> <translation></translation>
</message> </message>
@ -7345,7 +7375,7 @@ Die folgenden Wege sind möglich:</translation>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location line="+864"/> <location line="+930"/>
<source>Do you really want to exit RetroShare ?</source> <source>Do you really want to exit RetroShare ?</source>
<translation>Möchtest du RetroShare wirklich beenden?</translation> <translation>Möchtest du RetroShare wirklich beenden?</translation>
</message> </message>
@ -7355,7 +7385,7 @@ Die folgenden Wege sind möglich:</translation>
<translation>Wirklich beenden?</translation> <translation>Wirklich beenden?</translation>
</message> </message>
<message> <message>
<location line="-746"/> <location line="-812"/>
<source>Low disk space warning</source> <source>Low disk space warning</source>
<translation>Wenig Festplatenspeicher</translation> <translation>Wenig Festplatenspeicher</translation>
</message> </message>
@ -7988,7 +8018,7 @@ Möchtest du die Nachricht speichern ?</translation>
<translation>Betreff</translation> <translation>Betreff</translation>
</message> </message>
<message> <message>
<location filename="../gui/toaster/MessageToaster.cpp" line="+34"/> <location filename="../gui/toaster/MessageToaster.cpp" line="+36"/>
<source>Sub:</source> <source>Sub:</source>
<translation>Betreff:</translation> <translation>Betreff:</translation>
</message> </message>
@ -9235,12 +9265,11 @@ p, li { white-space: pre-wrap; }
<translation>Systray Icon</translation> <translation>Systray Icon</translation>
</message> </message>
<message> <message>
<location line="+8"/>
<source>Private Message</source> <source>Private Message</source>
<translation>Private Nachricht</translation> <translation type="obsolete">Private Nachricht</translation>
</message> </message>
<message> <message>
<location line="+7"/> <location line="+15"/>
<source>Message</source> <source>Message</source>
<translation>Nachricht</translation> <translation>Nachricht</translation>
</message> </message>
@ -9285,7 +9314,17 @@ p, li { white-space: pre-wrap; }
<translation>Neue Nachricht</translation> <translation>Neue Nachricht</translation>
</message> </message>
<message> <message>
<location line="+22"/> <location line="+21"/>
<source>Group Chat</source>
<translation>Gruppenchat</translation>
</message>
<message>
<location line="+7"/>
<source>Chat Lobby</source>
<translation>Chat Lobbie</translation>
</message>
<message>
<location line="+15"/>
<source>Position</source> <source>Position</source>
<translation>Position</translation> <translation>Position</translation>
</message> </message>
@ -9300,7 +9339,9 @@ p, li { white-space: pre-wrap; }
<translation>Abstand Y</translation> <translation>Abstand Y</translation>
</message> </message>
<message> <message>
<location line="+25"/> <location line="-203"/>
<location line="+125"/>
<location line="+103"/>
<source>Private Chat</source> <source>Private Chat</source>
<translation>Privater Chat</translation> <translation>Privater Chat</translation>
</message> </message>
@ -9330,12 +9371,12 @@ p, li { white-space: pre-wrap; }
<translation>Zeige Systemabschnitts-Nachricht an</translation> <translation>Zeige Systemabschnitts-Nachricht an</translation>
</message> </message>
<message> <message>
<location line="-261"/> <location line="-282"/>
<source>Add feeds at end</source> <source>Add feeds at end</source>
<translation>Feeds am Ende anfügen</translation> <translation>Feeds am Ende anfügen</translation>
</message> </message>
<message> <message>
<location filename="../gui/settings/NotifyPage.cpp" line="+188"/> <location filename="../gui/settings/NotifyPage.cpp" line="+197"/>
<source>Top Left</source> <source>Top Left</source>
<translation>Oben Links</translation> <translation>Oben Links</translation>
</message> </message>
@ -9363,7 +9404,7 @@ p, li { white-space: pre-wrap; }
<context> <context>
<name>NotifyQt</name> <name>NotifyQt</name>
<message> <message>
<location filename="../gui/notifyqt.cpp" line="+133"/> <location filename="../gui/notifyqt.cpp" line="+129"/>
<source>GPG key passphrase</source> <source>GPG key passphrase</source>
<translation>GPG Schlüssel Passwort</translation> <translation>GPG Schlüssel Passwort</translation>
</message> </message>
@ -9396,7 +9437,7 @@ p, li { white-space: pre-wrap; }
<context> <context>
<name>OnlineToaster</name> <name>OnlineToaster</name>
<message> <message>
<location filename="../gui/toaster/OnlineToaster.ui" line="+208"/> <location filename="../gui/toaster/OnlineToaster.ui" line="+177"/>
<source>Friend Online</source> <source>Friend Online</source>
<translation>Freund Online</translation> <translation>Freund Online</translation>
</message> </message>
@ -9419,7 +9460,7 @@ p, li { white-space: pre-wrap; }
</message> </message>
<message> <message>
<location line="-20"/> <location line="-20"/>
<location filename="../gui/feeds/PeerItem.cpp" line="+244"/> <location filename="../gui/feeds/PeerItem.cpp" line="+235"/>
<source>Expand</source> <source>Expand</source>
<translation>Erweitern</translation> <translation>Erweitern</translation>
</message> </message>
@ -9489,7 +9530,7 @@ p, li { white-space: pre-wrap; }
<translation>Abbrechen</translation> <translation>Abbrechen</translation>
</message> </message>
<message> <message>
<location filename="../gui/feeds/PeerItem.cpp" line="-143"/> <location filename="../gui/feeds/PeerItem.cpp" line="-136"/>
<source>Friend Connected</source> <source>Friend Connected</source>
<translation>Freund verbunden</translation> <translation>Freund verbunden</translation>
</message> </message>
@ -9527,7 +9568,7 @@ p, li { white-space: pre-wrap; }
<translation>Unbekannter Nachbar</translation> <translation>Unbekannter Nachbar</translation>
</message> </message>
<message> <message>
<location line="+93"/> <location line="+86"/>
<source>Hide</source> <source>Hide</source>
<translation>Verbergen</translation> <translation>Verbergen</translation>
</message> </message>
@ -9540,12 +9581,12 @@ p, li { white-space: pre-wrap; }
<context> <context>
<name>PeerStatus</name> <name>PeerStatus</name>
<message> <message>
<location filename="../gui/statusbar/peerstatus.cpp" line="+41"/> <location filename="../gui/statusbar/peerstatus.cpp" line="+39"/>
<source>Friends: 0/0</source> <source>Friends: 0/0</source>
<translation>Freunde: 0/0</translation> <translation>Freunde: 0/0</translation>
</message> </message>
<message> <message>
<location line="+18"/> <location line="+12"/>
<source>Online Friends/Total Friends</source> <source>Online Friends/Total Friends</source>
<translation>Freunde online / Freunde total</translation> <translation>Freunde online / Freunde total</translation>
</message> </message>
@ -9558,7 +9599,7 @@ p, li { white-space: pre-wrap; }
<context> <context>
<name>PhotoDialog</name> <name>PhotoDialog</name>
<message> <message>
<location filename="../gui/unfinished/PhotoDialog.cpp" line="+145"/> <location filename="../gui/unfinished/PhotoDialog.cpp" line="+144"/>
<source>Insert Show Lists</source> <source>Insert Show Lists</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -10215,7 +10256,7 @@ Do you want to send them a Message instead</source>
<context> <context>
<name>ProfileEdit</name> <name>ProfileEdit</name>
<message> <message>
<location filename="../gui/unfinished/profile/ProfileEdit.cpp" line="+56"/> <location filename="../gui/unfinished/profile/ProfileEdit.cpp" line="+54"/>
<source>Remove Profile Entry</source> <source>Remove Profile Entry</source>
<translation>Profil-Eintrag entfernen</translation> <translation>Profil-Eintrag entfernen</translation>
</message> </message>
@ -10314,7 +10355,7 @@ Do you want to send them a Message instead</source>
<context> <context>
<name>ProfileView</name> <name>ProfileView</name>
<message> <message>
<location filename="../gui/unfinished/profile/ProfileView.cpp" line="+71"/> <location filename="../gui/unfinished/profile/ProfileView.cpp" line="+69"/>
<source>Clear Photo</source> <source>Clear Photo</source>
<translation>Photo entfernen</translation> <translation>Photo entfernen</translation>
</message> </message>
@ -10431,7 +10472,7 @@ p, li { white-space: pre-wrap; }
<message> <message>
<location line="+32"/> <location line="+32"/>
<source>Copy Certificate</source> <source>Copy Certificate</source>
<translation type="unfinished"></translation> <translation>Kopiere Zertifikat</translation>
</message> </message>
<message> <message>
<location line="+49"/> <location line="+49"/>
@ -10616,7 +10657,7 @@ p, li { white-space: pre-wrap; }
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt; color:#76746c;&quot;&gt;Adressliste&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation> &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt; color:#76746c;&quot;&gt;Adressliste&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message> </message>
<message> <message>
<location filename="../gui/profile/ProfileWidget.cpp" line="+129"/> <location filename="../gui/profile/ProfileWidget.cpp" line="+123"/>
<location line="+10"/> <location line="+10"/>
<source>RetroShare</source> <source>RetroShare</source>
<translation type="unfinished">RetroShare</translation> <translation type="unfinished">RetroShare</translation>
@ -11028,12 +11069,6 @@ Reported error is: %2</source>
<translation>Die Kollektion %1 konnte nicht geöffnet werden. <translation>Die Kollektion %1 konnte nicht geöffnet werden.
Fehlermeldung: %2</translation> Fehlermeldung: %2</translation>
</message> </message>
<message>
<location filename="../gui/ChatLobbyWidget.cpp" line="-242"/>
<location line="+1"/>
<source>[No topic provided]</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>QuickStartWizard</name> <name>QuickStartWizard</name>
@ -11383,19 +11418,27 @@ p, li { white-space: pre-wrap; }
<context> <context>
<name>RatesStatus</name> <name>RatesStatus</name>
<message> <message>
<location filename="../gui/statusbar/ratesstatus.cpp" line="+43"/> <location filename="../gui/statusbar/ratesstatus.cpp" line="+42"/>
<source>&lt;strong&gt;Down:&lt;/strong&gt; 0.00 (kB/s) | &lt;strong&gt;Up:&lt;/strong&gt; 0.00 (kB/s) </source> <source>&lt;strong&gt;Down:&lt;/strong&gt; 0.00 (kB/s) | &lt;strong&gt;Up:&lt;/strong&gt; 0.00 (kB/s) </source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location line="+19"/> <location line="+12"/>
<source>&lt;strong&gt;Down:&lt;/strong&gt;</source> <source>Down</source>
<translation>&lt;strong&gt;Runter:&lt;/strong&gt;</translation> <translation type="unfinished">Runter</translation>
</message> </message>
<message> <message>
<location line="+0"/> <location line="+0"/>
<source>Up</source>
<translation type="unfinished">Hoch</translation>
</message>
<message>
<source>&lt;strong&gt;Down:&lt;/strong&gt;</source>
<translation type="obsolete">&lt;strong&gt;Runter:&lt;/strong&gt;</translation>
</message>
<message>
<source>&lt;strong&gt;Up:&lt;/strong&gt;</source> <source>&lt;strong&gt;Up:&lt;/strong&gt;</source>
<translation>&lt;strong&gt;Hoch:&lt;/strong&gt;</translation> <translation type="obsolete">&lt;strong&gt;Hoch:&lt;/strong&gt;</translation>
</message> </message>
</context> </context>
<context> <context>
@ -11667,7 +11710,7 @@ p, li { white-space: pre-wrap; }
<context> <context>
<name>RsidPage</name> <name>RsidPage</name>
<message> <message>
<location filename="../gui/connect/ConnectFriendWizard.cpp" line="+980"/> <location filename="../gui/connect/ConnectFriendWizard.cpp" line="+981"/>
<source>RetroShare ID</source> <source>RetroShare ID</source>
<translation>RetroShare ID</translation> <translation>RetroShare ID</translation>
</message> </message>
@ -11734,7 +11777,7 @@ p, li { white-space: pre-wrap; }
</message> </message>
<message> <message>
<location line="+319"/> <location line="+319"/>
<location filename="../gui/SearchDialog.cpp" line="+299"/> <location filename="../gui/SearchDialog.cpp" line="+285"/>
<source>Download</source> <source>Download</source>
<translation>Herunterladen</translation> <translation>Herunterladen</translation>
</message> </message>
@ -11776,7 +11819,7 @@ p, li { white-space: pre-wrap; }
<translation>Ordner</translation> <translation>Ordner</translation>
</message> </message>
<message> <message>
<location line="+385"/> <location line="+383"/>
<source>New RetroShare Link(s)</source> <source>New RetroShare Link(s)</source>
<translation>Neu(e) RetroShare Link(s)</translation> <translation>Neu(e) RetroShare Link(s)</translation>
</message> </message>
@ -11831,7 +11874,7 @@ p, li { white-space: pre-wrap; }
<translation>Such ID</translation> <translation>Such ID</translation>
</message> </message>
<message> <message>
<location filename="../gui/SearchDialog.cpp" line="-933"/> <location filename="../gui/SearchDialog.cpp" line="-931"/>
<source>Download Notice</source> <source>Download Notice</source>
<translation>Download</translation> <translation>Download</translation>
</message> </message>
@ -11988,8 +12031,8 @@ p, li { white-space: pre-wrap; }
<context> <context>
<name>SecurityItem</name> <name>SecurityItem</name>
<message> <message>
<location filename="../gui/feeds/SecurityItem.ui" line="+169"/> <location filename="../gui/feeds/SecurityItem.ui" line="+167"/>
<location filename="../gui/feeds/SecurityItem.cpp" line="+287"/> <location filename="../gui/feeds/SecurityItem.cpp" line="+280"/>
<source>Expand</source> <source>Expand</source>
<translation>Erweitern</translation> <translation>Erweitern</translation>
</message> </message>
@ -12079,12 +12122,12 @@ p, li { white-space: pre-wrap; }
<translation>Nachricht schreiben</translation> <translation>Nachricht schreiben</translation>
</message> </message>
<message> <message>
<location filename="../gui/feeds/SecurityItem.cpp" line="-169"/> <location filename="../gui/feeds/SecurityItem.cpp" line="-164"/>
<source>Connect Attempt</source> <source>Connect Attempt</source>
<translation>Verbindungsversuch</translation> <translation>Verbindungsversuch</translation>
</message> </message>
<message> <message>
<location line="+3"/> <location line="+4"/>
<source>Not Yet Friends</source> <source>Not Yet Friends</source>
<translation>Noch keine Freunde</translation> <translation>Noch keine Freunde</translation>
</message> </message>
@ -12094,7 +12137,7 @@ p, li { white-space: pre-wrap; }
<translation>Unbekannter (eingehender) Verbindungsversuch</translation> <translation>Unbekannter (eingehender) Verbindungsversuch</translation>
</message> </message>
<message> <message>
<location line="+3"/> <location line="+4"/>
<source>Unknown (Outgoing) Connect Attempt</source> <source>Unknown (Outgoing) Connect Attempt</source>
<translation>Unbekannter (ausgehender) Verbindungsversuch</translation> <translation>Unbekannter (ausgehender) Verbindungsversuch</translation>
</message> </message>
@ -12114,7 +12157,7 @@ p, li { white-space: pre-wrap; }
<translation>Unbekannter Nachbar</translation> <translation>Unbekannter Nachbar</translation>
</message> </message>
<message> <message>
<location line="+96"/> <location line="+89"/>
<source>Hide</source> <source>Hide</source>
<translation>Verbergen</translation> <translation>Verbergen</translation>
</message> </message>
@ -13723,7 +13766,7 @@ p, li { white-space: pre-wrap; }
<context> <context>
<name>TextPage</name> <name>TextPage</name>
<message> <message>
<location filename="../gui/connect/ConnectFriendWizard.cpp" line="-992"/> <location filename="../gui/connect/ConnectFriendWizard.cpp" line="-993"/>
<source>Use text representation of the PGP certificates.</source> <source>Use text representation of the PGP certificates.</source>
<translation>Verwende diesen Text als PGP Zertifikat.</translation> <translation>Verwende diesen Text als PGP Zertifikat.</translation>
</message> </message>
@ -13748,7 +13791,7 @@ p, li { white-space: pre-wrap; }
<translation>Bitte füge das PGP-Zertifikat von Ihre Freunde in das Feld unten ein</translation> <translation>Bitte füge das PGP-Zertifikat von Ihre Freunde in das Feld unten ein</translation>
</message> </message>
<message> <message>
<location line="+16"/> <location line="+17"/>
<source>Clean certificate</source> <source>Clean certificate</source>
<translation>Bereinige Zertifikat</translation> <translation>Bereinige Zertifikat</translation>
</message> </message>
@ -13798,7 +13841,7 @@ p, li { white-space: pre-wrap; }
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location line="-205"/> <location line="-206"/>
<source>Text certificate</source> <source>Text certificate</source>
<translation>Text-Zertifikat</translation> <translation>Text-Zertifikat</translation>
</message> </message>
@ -13813,7 +13856,7 @@ p, li { white-space: pre-wrap; }
<translation>Starte das Standard-Emailprogramm</translation> <translation>Starte das Standard-Emailprogramm</translation>
</message> </message>
<message> <message>
<location line="+136"/> <location line="+137"/>
<source>Connect Friend Help</source> <source>Connect Friend Help</source>
<translation>Verbindungshilfe</translation> <translation>Verbindungshilfe</translation>
</message> </message>
@ -14467,7 +14510,7 @@ Try to be patient!</source>
<context> <context>
<name>TurtleRouterDialog</name> <name>TurtleRouterDialog</name>
<message> <message>
<location filename="../gui/TurtleRouterDialog.cpp" line="+28"/> <location filename="../gui/TurtleRouterDialog.cpp" line="+26"/>
<location line="+126"/> <location line="+126"/>
<source>Search requests</source> <source>Search requests</source>
<translation>Suchanfragen</translation> <translation>Suchanfragen</translation>

View File

@ -163,70 +163,11 @@ bool EventReceiver::winEvent(MSG* message, long* result)
} }
#endif #endif
#ifdef WINDOWS_SYS
//void SetForegroundWindowInternal(HWND hWnd)
//{
// if (!::IsWindow(hWnd)) return;
// // relation time of SetForegroundWindow lock
// DWORD lockTimeOut = 0;
// HWND hCurrWnd = ::GetForegroundWindow();
// DWORD dwThisTID = ::GetCurrentThreadId(),
// dwCurrTID = ::GetWindowThreadProcessId(hCurrWnd,0);
// // we need to bypass some limitations from Microsoft :)
// if (dwThisTID != dwCurrTID) {
// ::AttachThreadInput(dwThisTID, dwCurrTID, TRUE);
// ::SystemParametersInfo(SPI_GETFOREGROUNDLOCKTIMEOUT,0,&lockTimeOut,0);
// ::SystemParametersInfo(SPI_SETFOREGROUNDLOCKTIMEOUT,0,0,SPIF_SENDWININICHANGE | SPIF_UPDATEINIFILE);
// ::AllowSetForegroundWindow(ASFW_ANY);
// }
// ::SetForegroundWindow(hWnd);
// if(dwThisTID != dwCurrTID) {
// ::SystemParametersInfo(SPI_SETFOREGROUNDLOCKTIMEOUT,0,(PVOID)lockTimeOut,SPIF_SENDWININICHANGE | SPIF_UPDATEINIFILE);
// ::AttachThreadInput(dwThisTID, dwCurrTID, FALSE);
// }
//}
void SetForegroundWindowInternal(HWND hWnd)
{
if (!::IsWindow(hWnd)) return;
BYTE keyState[256] = {0};
// to unlock SetForegroundWindow we need to imitate Alt pressing
if (::GetKeyboardState((LPBYTE)&keyState)) {
if(!(keyState[VK_MENU] & 0x80)) {
::keybd_event(VK_MENU, 0, KEYEVENTF_EXTENDEDKEY | 0, 0);
}
}
::SetForegroundWindow(hWnd);
if (::GetKeyboardState((LPBYTE)&keyState)) {
if(!(keyState[VK_MENU] & 0x80)) {
::keybd_event(VK_MENU, 0, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, 0);
}
}
}
#endif
void EventReceiver::received(const QString &url) void EventReceiver::received(const QString &url)
{ {
RetroShareLink link(url); RetroShareLink link(url);
if (link.valid()) { if (link.valid()) {
MainWindow *window = MainWindow::getInstance(); MainWindow::raiseWindow();
if (window) {
window->show();
window->raise();
#ifdef WINDOWS_SYS
SetForegroundWindowInternal(window->winId());
#endif
}
emit linkReceived(link.toUrl()); emit linkReceived(link.toUrl());
} }