mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04: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_CHATLOBBY = 0x0080;
|
||||
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
|
||||
* other Notify flags... not used by libretroshare though
|
||||
|
@ -140,7 +140,11 @@ void p3MsgService::processMsg(RsMsgItem *mi, bool incoming)
|
||||
std::string title, message;
|
||||
librs::util::ConvertUtf16ToUtf8(mi->subject, title);
|
||||
librs::util::ConvertUtf16ToUtf8(mi->message, message);
|
||||
notify->AddPopupMessage(RS_POPUP_MSG, mi->PeerId(), title, 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);
|
||||
|
||||
std::string out;
|
||||
rs_sprintf(out, "%lu", mi->msgId);
|
||||
|
@ -775,6 +775,14 @@ void NotifyQt::UpdateGUI()
|
||||
|
||||
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:
|
||||
soundManager->play(SOUND_MESSAGE_ARRIVED);
|
||||
|
||||
@ -925,6 +933,9 @@ void NotifyQt::testToaster(uint notifyFlags, /*RshareSettings::enumToasterPositi
|
||||
|
||||
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:
|
||||
toaster = new Toaster(new MessageToaster(id, title, message));
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user