mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-25 17:21:27 -05:00
fixed display of toaster for distant msgs
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6659 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
8d94ecf9ff
commit
19808587e9
@ -49,6 +49,7 @@ const uint32_t RS_POPUP_DOWNLOAD = 0x0020;
|
|||||||
const uint32_t RS_POPUP_GROUPCHAT = 0x0040;
|
const uint32_t RS_POPUP_GROUPCHAT = 0x0040;
|
||||||
const uint32_t RS_POPUP_CHATLOBBY = 0x0080;
|
const uint32_t RS_POPUP_CHATLOBBY = 0x0080;
|
||||||
const uint32_t RS_POPUP_CONNECT_ATTEMPT = 0x0100;
|
const uint32_t RS_POPUP_CONNECT_ATTEMPT = 0x0100;
|
||||||
|
const uint32_t RS_POPUP_ENCRYPTED_MSG = 0x0200;
|
||||||
|
|
||||||
/* 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
|
||||||
|
@ -140,6 +140,10 @@ void p3MsgService::processMsg(RsMsgItem *mi, bool incoming)
|
|||||||
std::string title, message;
|
std::string title, message;
|
||||||
librs::util::ConvertUtf16ToUtf8(mi->subject, title);
|
librs::util::ConvertUtf16ToUtf8(mi->subject, title);
|
||||||
librs::util::ConvertUtf16ToUtf8(mi->message, message);
|
librs::util::ConvertUtf16ToUtf8(mi->message, message);
|
||||||
|
|
||||||
|
if(mi->msgFlags & RS_MSG_FLAGS_ENCRYPTED)
|
||||||
|
notify->AddPopupMessage(RS_POPUP_ENCRYPTED_MSG, mi->PeerId(), title, message);
|
||||||
|
else
|
||||||
notify->AddPopupMessage(RS_POPUP_MSG, mi->PeerId(), title, message);
|
notify->AddPopupMessage(RS_POPUP_MSG, mi->PeerId(), title, message);
|
||||||
|
|
||||||
std::string out;
|
std::string out;
|
||||||
|
@ -775,6 +775,14 @@ void NotifyQt::UpdateGUI()
|
|||||||
|
|
||||||
switch(type)
|
switch(type)
|
||||||
{
|
{
|
||||||
|
case RS_POPUP_ENCRYPTED_MSG:
|
||||||
|
soundManager->play(SOUND_MESSAGE_ARRIVED);
|
||||||
|
|
||||||
|
if (popupflags & RS_POPUP_MSG)
|
||||||
|
{
|
||||||
|
toaster = new Toaster(new MessageToaster(std::string(), QObject::tr("Unknown title"), QObject::tr("[Encrypted message]")));
|
||||||
|
}
|
||||||
|
break;
|
||||||
case RS_POPUP_MSG:
|
case RS_POPUP_MSG:
|
||||||
soundManager->play(SOUND_MESSAGE_ARRIVED);
|
soundManager->play(SOUND_MESSAGE_ARRIVED);
|
||||||
|
|
||||||
@ -925,6 +933,9 @@ void NotifyQt::testToaster(uint notifyFlags, /*RshareSettings::enumToasterPositi
|
|||||||
|
|
||||||
switch(type)
|
switch(type)
|
||||||
{
|
{
|
||||||
|
case RS_POPUP_ENCRYPTED_MSG:
|
||||||
|
toaster = new Toaster(new MessageToaster(std::string(), tr("Unknown title"), tr("[Encrypted message]")));
|
||||||
|
break;
|
||||||
case RS_POPUP_MSG:
|
case RS_POPUP_MSG:
|
||||||
toaster = new Toaster(new MessageToaster(id, title, message));
|
toaster = new Toaster(new MessageToaster(id, title, message));
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user