From 5107fbdd0ae308aa219c9bcfe35b40d570de41e1 Mon Sep 17 00:00:00 2001 From: ruchijain Date: Sun, 13 Jun 2010 10:12:56 +0000 Subject: [PATCH] - Changes for Message Toaster git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3118 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- libretroshare/src/pqi/p3notify.cc | 6 ++++-- libretroshare/src/pqi/p3notify.h | 5 +++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/libretroshare/src/pqi/p3notify.cc b/libretroshare/src/pqi/p3notify.cc index 95e48fa35..8306f6715 100644 --- a/libretroshare/src/pqi/p3notify.cc +++ b/libretroshare/src/pqi/p3notify.cc @@ -78,7 +78,7 @@ bool p3Notify::NotifyLogMessage(uint32_t &sysid, uint32_t &type, } -bool p3Notify::NotifyPopupMessage(uint32_t &ptype, std::string &name, std::string &msg) +bool p3Notify::NotifyPopupMessage(uint32_t &ptype, std::string &name, std::string &title, std::string &msg) { RsStackMutex stack(noteMtx); /************* LOCK MUTEX ************/ if (pendingPopupMsgs.size() > 0) @@ -88,6 +88,7 @@ bool p3Notify::NotifyPopupMessage(uint32_t &ptype, std::string &name, std::strin ptype = pmsg.type; name = pmsg.name; + title = pmsg.title; msg = pmsg.msg; return true; @@ -121,7 +122,7 @@ bool p3Notify::SetPopupMessageMode(uint32_t ptype, uint32_t mode) /* Input from libretroshare */ -bool p3Notify::AddPopupMessage(uint32_t ptype, std::string name, std::string msg) +bool p3Notify::AddPopupMessage(uint32_t ptype, std::string name, std::string title, std::string msg) { RsStackMutex stack(noteMtx); /************* LOCK MUTEX ************/ @@ -129,6 +130,7 @@ bool p3Notify::AddPopupMessage(uint32_t ptype, std::string name, std::string msg pmsg.type = ptype; pmsg.name = name; + pmsg.title = title; pmsg.msg = msg; pendingPopupMsgs.push_back(pmsg); diff --git a/libretroshare/src/pqi/p3notify.h b/libretroshare/src/pqi/p3notify.h index 4479a2551..75e95ef57 100644 --- a/libretroshare/src/pqi/p3notify.h +++ b/libretroshare/src/pqi/p3notify.h @@ -57,6 +57,7 @@ class p3NotifyPopupMsg uint32_t type; std::string name; + std::string title; std::string msg; }; @@ -71,7 +72,7 @@ virtual ~p3Notify() { return; } /* Output for retroshare-gui */ virtual bool NotifySysMessage(uint32_t &sysid, uint32_t &type, std::string &title, std::string &msg); -virtual bool NotifyPopupMessage(uint32_t &ptype, std::string &name, std::string &msg); +virtual bool NotifyPopupMessage(uint32_t &ptype, std::string &name, std::string &title, std::string &msg); virtual bool NotifyLogMessage(uint32_t &sysid, uint32_t &type, std::string &title, std::string &msg); /* Control over Messages */ @@ -84,7 +85,7 @@ virtual bool SetPopupMessageMode(uint32_t ptype, uint32_t mode); virtual bool GetFeedItem(RsFeedItem &item); /* Overloaded from pqiNotify */ -virtual bool AddPopupMessage(uint32_t ptype, std::string name, std::string msg); +virtual bool AddPopupMessage(uint32_t ptype, std::string name, std::string title, std::string msg); virtual bool AddSysMessage(uint32_t sysid, uint32_t type, std::string title, std::string msg); virtual bool AddLogMessage(uint32_t sysid, uint32_t type, std::string title, std::string msg); virtual bool AddFeedItem(uint32_t type, std::string id1, std::string id2, std::string id3);