From f54bf2a1eac3bc61222e5cceba77755bd340f996 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Thu, 4 Mar 2010 11:35:34 +0200 Subject: =?UTF-8?q?fixed=20EXT-5904=20=E2=80=9COffers=20embedding=20into?= =?UTF-8?q?=20IM=20windows=E2=80=9D,=20made=20all=20type=20offers=20be=20e?= =?UTF-8?q?mbedded=20to=20the=20IM=20floater;=20made=20showing=20offer=20t?= =?UTF-8?q?oast=20if=20IM=20floater=20isn't=20visible;=20corrected=20IM=20?= =?UTF-8?q?message=20counter=20on=20showing=20offer=20toast;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/newview/llimfloater.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'indra/newview/llimfloater.cpp') diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 8cdc50eb70..5f56690d2e 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -648,6 +648,15 @@ void LLIMFloater::updateMessages() if (msg.has("notification_id")) { chat.mNotifId = msg["notification_id"].asUUID(); + // remove embedded notification from channel + LLNotificationsUI::LLScreenChannel* channel = dynamic_cast + (LLNotificationsUI::LLChannelManager::getInstance()-> + findChannelByID(LLUUID(gSavedSettings.getString("NotificationChannelUUID")))); + if (getVisible()) + { + // toast will be automatically closed since it is not storable toast + channel->hideToast(chat.mNotifId); + } } //process text message else @@ -657,6 +666,19 @@ void LLIMFloater::updateMessages() mChatHistory->appendMessage(chat, chat_args); mLastMessageIndex = msg["index"].asInteger(); + + // if it is a notification - next message is a notification history log, so skip it + if (chat.mNotifId.notNull() && LLNotificationsUtil::find(chat.mNotifId) != NULL) + { + if (++iter == iter_end) + { + break; + } + else + { + mLastMessageIndex++; + } + } } } } -- cgit v1.2.3 From e7027a57e17b565f98f401f3f2cd1af8c91f2af7 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Thu, 11 Mar 2010 17:53:49 +0200 Subject: =?UTF-8?q?fixed=20EXT-5904=20=E2=80=9COffers=20embedding=20into?= =?UTF-8?q?=20IM=20windows=E2=80=9D,=20revised=20embedding=20and=20logging?= =?UTF-8?q?=20offer=20notification=20to=20provide=20loading=20log=20entry?= =?UTF-8?q?=20in=20case=20notification=20doesn't=20exist;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/newview/llimfloater.cpp | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) (limited to 'indra/newview/llimfloater.cpp') diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 5f56690d2e..9b5c69d33d 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -648,14 +648,23 @@ void LLIMFloater::updateMessages() if (msg.has("notification_id")) { chat.mNotifId = msg["notification_id"].asUUID(); - // remove embedded notification from channel - LLNotificationsUI::LLScreenChannel* channel = dynamic_cast - (LLNotificationsUI::LLChannelManager::getInstance()-> - findChannelByID(LLUUID(gSavedSettings.getString("NotificationChannelUUID")))); - if (getVisible()) + // if notification exists - embed it + if (LLNotificationsUtil::find(chat.mNotifId) != NULL) { - // toast will be automatically closed since it is not storable toast - channel->hideToast(chat.mNotifId); + // remove embedded notification from channel + LLNotificationsUI::LLScreenChannel* channel = dynamic_cast + (LLNotificationsUI::LLChannelManager::getInstance()-> + findChannelByID(LLUUID(gSavedSettings.getString("NotificationChannelUUID")))); + if (getVisible()) + { + // toast will be automatically closed since it is not storable toast + channel->hideToast(chat.mNotifId); + } + } + // if notification doesn't exist - try to use next message which should be log entry + else + { + continue; } } //process text message -- cgit v1.2.3 From 6e55e90f28f20a42bae87b346630f26ab4c6a0f6 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Fri, 12 Mar 2010 16:54:21 +0200 Subject: =?UTF-8?q?EXT-5904=20=E2=80=9COffers=20embedding=20into=20IM=20wi?= =?UTF-8?q?ndows=E2=80=9D,=20replaced=20unnecessary=20dynamic=20casting=20?= =?UTF-8?q?with=20static=20casting?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/newview/llimfloater.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llimfloater.cpp') diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 9b5c69d33d..881972ceff 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -460,7 +460,7 @@ void LLIMFloater::getAllowedRect(LLRect& rect) void LLIMFloater::setDocked(bool docked, bool pop_on_undock) { // update notification channel state - LLNotificationsUI::LLScreenChannel* channel = dynamic_cast + LLNotificationsUI::LLScreenChannel* channel = static_cast (LLNotificationsUI::LLChannelManager::getInstance()-> findChannelByID(LLUUID(gSavedSettings.getString("NotificationChannelUUID")))); @@ -479,7 +479,7 @@ void LLIMFloater::setDocked(bool docked, bool pop_on_undock) void LLIMFloater::setVisible(BOOL visible) { - LLNotificationsUI::LLScreenChannel* channel = dynamic_cast + LLNotificationsUI::LLScreenChannel* channel = static_cast (LLNotificationsUI::LLChannelManager::getInstance()-> findChannelByID(LLUUID(gSavedSettings.getString("NotificationChannelUUID")))); LLTransientDockableFloater::setVisible(visible); @@ -652,7 +652,7 @@ void LLIMFloater::updateMessages() if (LLNotificationsUtil::find(chat.mNotifId) != NULL) { // remove embedded notification from channel - LLNotificationsUI::LLScreenChannel* channel = dynamic_cast + LLNotificationsUI::LLScreenChannel* channel = static_cast (LLNotificationsUI::LLChannelManager::getInstance()-> findChannelByID(LLUUID(gSavedSettings.getString("NotificationChannelUUID")))); if (getVisible()) -- cgit v1.2.3