summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llui/CMakeLists.txt2
-rw-r--r--indra/llui/llpanel.cpp1
-rw-r--r--indra/newview/CMakeLists.txt4
-rw-r--r--indra/newview/llagentwearables.cpp1
-rw-r--r--indra/newview/llappviewer.cpp2
-rw-r--r--indra/newview/llassetuploadresponders.cpp1
-rw-r--r--indra/newview/llcallfloater.cpp30
-rw-r--r--indra/newview/llcallingcard.cpp1
-rw-r--r--indra/newview/llchannelmanager.cpp11
-rw-r--r--indra/newview/llchannelmanager.h5
-rw-r--r--indra/newview/llchiclet.cpp5
-rw-r--r--indra/newview/lldelayedgestureerror.cpp1
-rw-r--r--indra/newview/lleventnotifier.cpp1
-rw-r--r--indra/newview/llfirstuse.cpp1
-rw-r--r--indra/newview/llfloaterauction.cpp1
-rw-r--r--indra/newview/llfloaterbuy.cpp1
-rw-r--r--indra/newview/llfloaterbuycontents.cpp1
-rw-r--r--indra/newview/llfloaterbuyland.cpp1
-rw-r--r--indra/newview/llfloaterfriends.cpp1
-rw-r--r--indra/newview/llfloatergodtools.cpp2
-rw-r--r--indra/newview/llfloaterhud.cpp1
-rw-r--r--indra/newview/llfloaterland.cpp1
-rw-r--r--indra/newview/llfloateropenobject.cpp1
-rw-r--r--indra/newview/llfloaterperms.cpp1
-rw-r--r--indra/newview/llfloaterregioninfo.cpp2
-rw-r--r--indra/newview/llfloatersellland.cpp1
-rw-r--r--indra/newview/llgesturemgr.cpp1
-rw-r--r--indra/newview/llimpanel.cpp1
-rw-r--r--indra/newview/llimview.cpp29
-rw-r--r--indra/newview/lllandmarklist.cpp1
-rw-r--r--indra/newview/llmenucommands.cpp1
-rw-r--r--indra/newview/llpanelclassified.cpp1
-rw-r--r--indra/newview/llpanelgrouproles.cpp1
-rw-r--r--indra/newview/llpanellogin.cpp1
-rw-r--r--indra/newview/llpanelteleporthistory.cpp6
-rw-r--r--indra/newview/llpanelteleporthistory.h1
-rw-r--r--indra/newview/llparticipantlist.cpp195
-rw-r--r--indra/newview/llparticipantlist.h65
-rw-r--r--indra/newview/llpreviewgesture.cpp1
-rw-r--r--indra/newview/llpreviewnotecard.cpp1
-rw-r--r--indra/newview/llpreviewscript.cpp1
-rw-r--r--indra/newview/llscreenchannel.cpp37
-rw-r--r--indra/newview/llscreenchannel.h11
-rw-r--r--indra/newview/llstartup.cpp1
-rw-r--r--indra/newview/llstatusbar.cpp1
-rw-r--r--indra/newview/lltoast.h1
-rw-r--r--indra/newview/lltoastalertpanel.cpp6
-rw-r--r--indra/newview/lltoastalertpanel.h19
-rw-r--r--indra/newview/lltoastgroupnotifypanel.cpp1
-rw-r--r--indra/newview/llviewercontrol.cpp5
-rw-r--r--indra/newview/llviewerinventory.cpp1
-rw-r--r--indra/newview/llviewermessage.cpp36
-rw-r--r--indra/newview/llviewerparcelmgr.cpp1
-rw-r--r--indra/newview/llviewertexteditor.cpp1
-rw-r--r--indra/newview/llviewerwindow.cpp9
-rw-r--r--indra/newview/llvoavatar.cpp1
-rw-r--r--indra/newview/llwearablelist.cpp1
-rw-r--r--indra/newview/llweb.cpp4
-rw-r--r--indra/newview/skins/default/xui/en/floater_incoming_call.xml4
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml8
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml3
61 files changed, 358 insertions, 179 deletions
diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt
index 74b49b846e..82ec02d2eb 100644
--- a/indra/llui/CMakeLists.txt
+++ b/indra/llui/CMakeLists.txt
@@ -26,7 +26,6 @@ include_directories(
)
set(llui_SOURCE_FILES
- llalertdialog.cpp
llbutton.cpp
llcheckboxctrl.cpp
llclipboard.cpp
@@ -112,7 +111,6 @@ set(llui_SOURCE_FILES
set(llui_HEADER_FILES
CMakeLists.txt
- llalertdialog.h
llbutton.h
llcallbackmap.h
llcheckboxctrl.h
diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp
index 750b190953..de2b43bf13 100644
--- a/indra/llui/llpanel.cpp
+++ b/indra/llui/llpanel.cpp
@@ -37,7 +37,6 @@
#define LLPANEL_CPP
#include "llpanel.h"
-#include "llalertdialog.h"
#include "llfocusmgr.h"
#include "llfontgl.h"
#include "llrect.h"
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 72630cc413..492d70a956 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -228,7 +228,6 @@ set(viewer_SOURCE_FILES
llgroupactions.cpp
llgrouplist.cpp
llgroupmgr.cpp
- llgroupnotify.cpp
llhomelocationresponder.cpp
llhudeffect.cpp
llhudeffectbeam.cpp
@@ -299,7 +298,6 @@ set(viewer_SOURCE_FILES
llnotificationofferhandler.cpp
llnotificationscripthandler.cpp
llnotificationtiphandler.cpp
- llnotify.cpp
lloutputmonitorctrl.cpp
lloverlaybar.cpp
llpanelavatar.cpp
@@ -738,7 +736,6 @@ set(viewer_HEADER_FILES
llgroupactions.h
llgrouplist.h
llgroupmgr.h
- llgroupnotify.h
llhomelocationresponder.h
llhudeffect.h
llhudeffectbeam.h
@@ -804,7 +801,6 @@ set(viewer_HEADER_FILES
llnetmap.h
llnotificationhandler.h
llnotificationmanager.h
- llnotify.h
lloutputmonitorctrl.h
lloverlaybar.h
llpanelavatar.h
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index 3114a37ada..1e2eac39eb 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -41,7 +41,6 @@
#include "llinventoryobserver.h"
#include "llinventorypanel.h"
#include "llnotificationsutil.h"
-#include "llnotify.h"
#include "llviewerregion.h"
#include "llvoavatarself.h"
#include "llwearable.h"
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 9a1b749ba7..2fc7a630ae 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -39,7 +39,6 @@
#include "llfeaturemanager.h"
#include "lluictrlfactory.h"
#include "lltexteditor.h"
-#include "llalertdialog.h"
#include "llerrorcontrol.h"
#include "llviewertexturelist.h"
#include "llgroupmgr.h"
@@ -109,7 +108,6 @@
#include "apr_dso.h"
#include <boost/lexical_cast.hpp>
-#include "llnotify.h"
#include "llviewerkeyboard.h"
#include "lllfsthread.h"
#include "llworkerthread.h"
diff --git a/indra/newview/llassetuploadresponders.cpp b/indra/newview/llassetuploadresponders.cpp
index 1d03cc8823..a2322e28b4 100644
--- a/indra/newview/llassetuploadresponders.cpp
+++ b/indra/newview/llassetuploadresponders.cpp
@@ -39,7 +39,6 @@
#include "llcompilequeue.h"
#include "llfloaterbuycurrency.h"
#include "llfilepicker.h"
-#include "llnotify.h"
#include "llinventoryobserver.h"
#include "llinventorypanel.h"
#include "llpermissionsflags.h"
diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp
index 895b4ed80e..4ab5ea1812 100644
--- a/indra/newview/llcallfloater.cpp
+++ b/indra/newview/llcallfloater.cpp
@@ -35,6 +35,7 @@
#include "llcallfloater.h"
+#include "llagent.h"
#include "llagentdata.h" // for gAgentID
#include "llavatarlist.h"
#include "llbottomtray.h"
@@ -165,9 +166,19 @@ void LLCallFloater::updateSession()
mVoiceType = VC_PEER_TO_PEER;
break;
case IM_SESSION_CONFERENCE_START:
- mVoiceType = VC_AD_HOC_CHAT;
+ case IM_SESSION_GROUP_START:
+ case IM_SESSION_INVITE:
+ if (gAgent.isInGroup(session_id))
+ {
+ mVoiceType = VC_GROUP_CHAT;
+ }
+ else
+ {
+ mVoiceType = VC_AD_HOC_CHAT;
+ }
break;
default:
+ llwarning("Failed to determine voice call IM type", 0);
mVoiceType = VC_GROUP_CHAT;
break;
}
@@ -263,13 +274,18 @@ void LLCallFloater::updateTitle()
void LLCallFloater::initAgentData()
{
- childSetValue("user_icon", gAgentID);
+ LLPanel* my_panel = getChild<LLPanel> ("my_panel");
- std::string name;
- gCacheName->getFullName(gAgentID, name);
- childSetValue("user_text", name);
+ if ( my_panel )
+ {
+ my_panel->childSetValue("user_icon", gAgentID);
+
+ std::string name;
+ gCacheName->getFullName(gAgentID, name);
+ my_panel->childSetValue("user_text", name);
- LLOutputMonitorCtrl* speaking_indicator = getChild<LLOutputMonitorCtrl>("speaking_indicator");
- speaking_indicator->setSpeakerId(gAgentID);
+ LLOutputMonitorCtrl* speaking_indicator = my_panel->getChild<LLOutputMonitorCtrl>("speaking_indicator");
+ speaking_indicator->setSpeakerId(gAgentID);
+ }
}
//EOF
diff --git a/indra/newview/llcallingcard.cpp b/indra/newview/llcallingcard.cpp
index 714bd20ab8..82413878ad 100644
--- a/indra/newview/llcallingcard.cpp
+++ b/indra/newview/llcallingcard.cpp
@@ -55,7 +55,6 @@
#include "llinventorymodel.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
-#include "llnotify.h"
#include "llresmgr.h"
#include "llimview.h"
#include "llviewercontrol.h"
diff --git a/indra/newview/llchannelmanager.cpp b/indra/newview/llchannelmanager.cpp
index 415c118ff1..cbb566b3a7 100644
--- a/indra/newview/llchannelmanager.cpp
+++ b/indra/newview/llchannelmanager.cpp
@@ -228,3 +228,14 @@ void LLChannelManager::muteAllChannels(bool mute)
}
}
+void LLChannelManager::killToastsFromChannel(const LLUUID& channel_id, const LLScreenChannel::Matcher& matcher)
+{
+ LLScreenChannel
+ * screen_channel =
+ dynamic_cast<LLScreenChannel*> (findChannelByID(channel_id));
+ if (screen_channel != NULL)
+ {
+ screen_channel->killMatchedToasts(matcher);
+ }
+}
+
diff --git a/indra/newview/llchannelmanager.h b/indra/newview/llchannelmanager.h
index 4b66a1ef89..c2be39122f 100644
--- a/indra/newview/llchannelmanager.h
+++ b/indra/newview/llchannelmanager.h
@@ -109,6 +109,11 @@ public:
*/
void muteAllChannels(bool mute);
+ /**
+ * Kills matched toasts from specified toast screen channel.
+ */
+ void killToastsFromChannel(const LLUUID& channel_id, const LLScreenChannel::Matcher& matcher);
+
private:
LLScreenChannel* createChannel(LLChannelManager::Params& p);
diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp
index 30967677e8..9671c048ef 100644
--- a/indra/newview/llchiclet.cpp
+++ b/indra/newview/llchiclet.cpp
@@ -53,6 +53,7 @@
#include "llgroupmgr.h"
#include "llnotificationmanager.h"
#include "lltransientfloatermgr.h"
+#include "llsyswellwindow.h"
static LLDefaultChildRegistry::Register<LLChicletPanel> t1("chiclet_panel");
static LLDefaultChildRegistry::Register<LLIMWellChiclet> t2_0("chiclet_im_well");
@@ -233,6 +234,10 @@ LLNotificationChiclet::LLNotificationChiclet(const Params& p)
connectCounterUpdatersToSignal("notify");
connectCounterUpdatersToSignal("groupnotify");
connectCounterUpdatersToSignal("offer");
+
+ // ensure that notification well window exists, to synchronously
+ // handle toast add/delete events.
+ LLNotificationWellWindow::getInstance();
}
void LLNotificationChiclet::connectCounterUpdatersToSignal(const std::string& notification_type)
diff --git a/indra/newview/lldelayedgestureerror.cpp b/indra/newview/lldelayedgestureerror.cpp
index 411cb331a8..ead377deb0 100644
--- a/indra/newview/lldelayedgestureerror.cpp
+++ b/indra/newview/lldelayedgestureerror.cpp
@@ -36,7 +36,6 @@
#include <list>
#include "llnotificationsutil.h"
-#include "llnotify.h"
#include "llcallbacklist.h"
#include "llinventory.h"
#include "llviewerinventory.h"
diff --git a/indra/newview/lleventnotifier.cpp b/indra/newview/lleventnotifier.cpp
index b64799bd86..edfb9dc864 100644
--- a/indra/newview/lleventnotifier.cpp
+++ b/indra/newview/lleventnotifier.cpp
@@ -37,7 +37,6 @@
#include "llnotificationsutil.h"
#include "message.h"
-#include "llnotify.h"
#include "lleventinfo.h"
#include "llfloaterreg.h"
#include "llfloaterworldmap.h"
diff --git a/indra/newview/llfirstuse.cpp b/indra/newview/llfirstuse.cpp
index 0bcdad5da1..7fd0e070be 100644
--- a/indra/newview/llfirstuse.cpp
+++ b/indra/newview/llfirstuse.cpp
@@ -40,7 +40,6 @@
// viewer includes
#include "llagent.h" // for gAgent.inPrelude()
-#include "llnotify.h"
#include "llviewercontrol.h"
#include "llui.h"
#include "llappviewer.h"
diff --git a/indra/newview/llfloaterauction.cpp b/indra/newview/llfloaterauction.cpp
index b63bcccf6b..c1a4a845e5 100644
--- a/indra/newview/llfloaterauction.cpp
+++ b/indra/newview/llfloaterauction.cpp
@@ -48,7 +48,6 @@
#include "llcombobox.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
-#include "llnotify.h"
#include "llsavedsettingsglue.h"
#include "llviewertexturelist.h"
#include "llviewerparcelmgr.h"
diff --git a/indra/newview/llfloaterbuy.cpp b/indra/newview/llfloaterbuy.cpp
index 16a5bb63e7..fba557c656 100644
--- a/indra/newview/llfloaterbuy.cpp
+++ b/indra/newview/llfloaterbuy.cpp
@@ -41,7 +41,6 @@
#include "llfloaterbuy.h"
#include "llagent.h" // for agent id
-#include "llalertdialog.h"
#include "llinventorymodel.h" // for gInventory
#include "llfloaterreg.h"
#include "llfloaterinventory.h" // for get_item_icon
diff --git a/indra/newview/llfloaterbuycontents.cpp b/indra/newview/llfloaterbuycontents.cpp
index 39c7bc02af..0daef27af2 100644
--- a/indra/newview/llfloaterbuycontents.cpp
+++ b/indra/newview/llfloaterbuycontents.cpp
@@ -43,7 +43,6 @@
#include "llcachename.h"
#include "llagent.h" // for agent id
-#include "llalertdialog.h"
#include "llcheckboxctrl.h"
#include "llinventoryfunctions.h"
#include "llinventorymodel.h" // for gInventory
diff --git a/indra/newview/llfloaterbuyland.cpp b/indra/newview/llfloaterbuyland.cpp
index 3a8c3ab4d2..9b88923e7e 100644
--- a/indra/newview/llfloaterbuyland.cpp
+++ b/indra/newview/llfloaterbuyland.cpp
@@ -49,7 +49,6 @@
#include "lliconctrl.h"
#include "lllineeditor.h"
#include "llnotificationsutil.h"
-#include "llnotify.h"
#include "llparcel.h"
#include "llslurl.h"
#include "llstatusbar.h"
diff --git a/indra/newview/llfloaterfriends.cpp b/indra/newview/llfloaterfriends.cpp
index 1482d3fe21..56291c57a6 100644
--- a/indra/newview/llfloaterfriends.cpp
+++ b/indra/newview/llfloaterfriends.cpp
@@ -50,7 +50,6 @@
#include "llinventorymodel.h"
#include "llnamelistctrl.h"
#include "llnotificationsutil.h"
-#include "llnotify.h"
#include "llresmgr.h"
#include "llscrolllistctrl.h"
#include "llscrolllistitem.h"
diff --git a/indra/newview/llfloatergodtools.cpp b/indra/newview/llfloatergodtools.cpp
index 04ba11530a..e1409b8ad5 100644
--- a/indra/newview/llfloatergodtools.cpp
+++ b/indra/newview/llfloatergodtools.cpp
@@ -45,7 +45,6 @@
#include "message.h"
#include "llagent.h"
-#include "llalertdialog.h"
#include "llbutton.h"
#include "llcheckboxctrl.h"
#include "llcombobox.h"
@@ -69,7 +68,6 @@
#include "llviewerwindow.h"
#include "llworld.h"
#include "llfloateravatarpicker.h"
-#include "llnotify.h"
#include "llxfermanager.h"
#include "llvlcomposition.h"
#include "llsurface.h"
diff --git a/indra/newview/llfloaterhud.cpp b/indra/newview/llfloaterhud.cpp
index 14cff3bcc3..d2ee3e44c5 100644
--- a/indra/newview/llfloaterhud.cpp
+++ b/indra/newview/llfloaterhud.cpp
@@ -37,7 +37,6 @@
// Viewer libs
#include "llviewercontrol.h"
#include "llmediactrl.h"
-#include "llalertdialog.h"
// Linden libs
#include "llnotificationsutil.h"
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index 5b03292b22..66bf5246b0 100644
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -55,7 +55,6 @@
#include "llavataractions.h"
#include "lllineeditor.h"
#include "llnamelistctrl.h"
-#include "llnotify.h"
#include "llpanellandaudio.h"
#include "llpanellandmedia.h"
#include "llradiogroup.h"
diff --git a/indra/newview/llfloateropenobject.cpp b/indra/newview/llfloateropenobject.cpp
index 56a86c2cb7..51c18196f2 100644
--- a/indra/newview/llfloateropenobject.cpp
+++ b/indra/newview/llfloateropenobject.cpp
@@ -44,7 +44,6 @@
#include "llnotificationsutil.h"
#include "lltextbox.h"
-#include "llalertdialog.h"
#include "llinventorybridge.h"
#include "llfloaterinventory.h"
#include "llinventorymodel.h"
diff --git a/indra/newview/llfloaterperms.cpp b/indra/newview/llfloaterperms.cpp
index 17bb8221ad..7edc27d4c3 100644
--- a/indra/newview/llfloaterperms.cpp
+++ b/indra/newview/llfloaterperms.cpp
@@ -32,7 +32,6 @@
*/
#include "llviewerprecompiledheaders.h"
-#include "llalertdialog.h"
#include "llcheckboxctrl.h"
#include "llfloaterperms.h"
#include "llviewercontrol.h"
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index 8a26078f3d..2b1c0979b6 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -46,7 +46,6 @@
#include "message.h"
#include "llagent.h"
-#include "llalertdialog.h"
#include "llappviewer.h"
#include "llfloateravatarpicker.h"
#include "llbutton.h"
@@ -62,7 +61,6 @@
#include "llfloaterwindlight.h"
#include "llinventorymodel.h"
#include "lllineeditor.h"
-#include "llalertdialog.h"
#include "llnamelistctrl.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
diff --git a/indra/newview/llfloatersellland.cpp b/indra/newview/llfloatersellland.cpp
index 49e8f9c956..e5260aa7b9 100644
--- a/indra/newview/llfloatersellland.cpp
+++ b/indra/newview/llfloatersellland.cpp
@@ -39,7 +39,6 @@
#include "lllineeditor.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
-#include "llnotify.h"
#include "llparcel.h"
#include "llselectmgr.h"
#include "lltexturectrl.h"
diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp
index 4f487ddf04..df7aa9eabf 100644
--- a/indra/newview/llgesturemgr.cpp
+++ b/indra/newview/llgesturemgr.cpp
@@ -52,7 +52,6 @@
#include "llagent.h"
#include "lldelayedgestureerror.h"
#include "llinventorymodel.h"
-#include "llnotify.h"
#include "llviewermessage.h"
#include "llvoavatarself.h"
#include "llviewerstats.h"
diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp
index e6ded5f371..8b6762ce38 100644
--- a/indra/newview/llimpanel.cpp
+++ b/indra/newview/llimpanel.cpp
@@ -66,7 +66,6 @@
#include "llimview.h" // for LLIMModel to get other avatar id in chat
#include "llkeyboard.h"
#include "lllineeditor.h"
-#include "llnotify.h"
#include "llpanelimcontrolpanel.h"
#include "llrecentpeople.h"
#include "llresmgr.h"
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 4d2ba16a4c..fbed1494ff 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -72,7 +72,6 @@
#include "llviewerwindow.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
-#include "llnotify.h"
#include "llnearbychat.h"
#include "llviewerregion.h"
#include "llvoicechannel.h"
@@ -1479,26 +1478,34 @@ BOOL LLIncomingCallDialog::postBuild()
{
LLDockableFloater::postBuild();
+ LLUUID session_id = mPayload["session_id"].asUUID();
LLSD caller_id = mPayload["caller_id"];
- EInstantMessage type = (EInstantMessage)mPayload["type"].asInteger();
-
- std::string call_type = getString("VoiceInviteP2P");
std::string caller_name = mPayload["caller_name"].asString();
+
+ std::string call_type;
+ if (gAgent.isInGroup(session_id))
+ {
+ LLStringUtil::format_map_t args;
+ LLGroupData data;
+ if (gAgent.getGroupData(session_id, data))
+ {
+ args["[GROUP]"] = data.mName;
+ call_type = getString(mPayload["notify_box_type"], args);
+ }
+ }
+ else
+ {
+ call_type = getString(mPayload["notify_box_type"]);
+ }
+
if (caller_name == "anonymous")
{
caller_name = getString("anonymous");
}
setTitle(caller_name + " " + call_type);
-
- // If it is not a P2P invite, then it's an AdHoc invite
- if ( type != IM_SESSION_P2P_INVITE )
- {
- call_type = getString("VoiceInviteAdHoc");
- }
// check to see if this is an Avaline call
- LLUUID session_id = mPayload["session_id"].asUUID();
bool is_avatar = LLVoiceClient::getInstance()->isParticipantAvatar(session_id);
childSetVisible("Start IM", is_avatar); // no IM for avaline
diff --git a/indra/newview/lllandmarklist.cpp b/indra/newview/lllandmarklist.cpp
index d613cf6ba4..bd9d22c327 100644
--- a/indra/newview/lllandmarklist.cpp
+++ b/indra/newview/lllandmarklist.cpp
@@ -39,7 +39,6 @@
#include "llappviewer.h"
#include "llagent.h"
-#include "llnotify.h"
#include "llvfile.h"
#include "llviewerstats.h"
diff --git a/indra/newview/llmenucommands.cpp b/indra/newview/llmenucommands.cpp
index 28ddaa61c4..a2aef9ba63 100644
--- a/indra/newview/llmenucommands.cpp
+++ b/indra/newview/llmenucommands.cpp
@@ -49,7 +49,6 @@
#include "llfloaterchat.h"
#include "llfloaterworldmap.h"
#include "lllineeditor.h"
-#include "llnotify.h"
#include "llstatusbar.h"
#include "llimview.h"
#include "lltextbox.h"
diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp
index 70d92442ad..0dae667e7f 100644
--- a/indra/newview/llpanelclassified.cpp
+++ b/indra/newview/llpanelclassified.cpp
@@ -48,7 +48,6 @@
#include "message.h"
#include "llagent.h"
-#include "llalertdialog.h"
#include "llavataractions.h"
#include "llbutton.h"
#include "llcheckboxctrl.h"
diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp
index b6c58808ae..29b647415c 100644
--- a/indra/newview/llpanelgrouproles.cpp
+++ b/indra/newview/llpanelgrouproles.cpp
@@ -44,7 +44,6 @@
#include "llnamelistctrl.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
-#include "llnotify.h"
#include "llpanelgrouproles.h"
#include "llscrolllistctrl.h"
#include "llscrolllistitem.h"
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index a5bfa18851..a9c604b72a 100644
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -62,7 +62,6 @@
#include "llviewermenu.h" // for handle_preferences()
#include "llviewernetwork.h"
#include "llviewerwindow.h" // to link into child list
-#include "llnotify.h"
#include "llurlsimstring.h"
#include "lluictrlfactory.h"
#include "llhttpclient.h"
diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp
index 43f80f6d6a..596bd2909a 100644
--- a/indra/newview/llpanelteleporthistory.cpp
+++ b/indra/newview/llpanelteleporthistory.cpp
@@ -505,7 +505,7 @@ void LLTeleportHistoryPanel::refresh()
tab->setVisible(true);
// Expand all accordion tabs when filtering
- if(!mFilterSubString.empty())
+ if(!sFilterSubString.empty())
{
tab->setDisplayChildren(true);
}
@@ -521,7 +521,7 @@ void LLTeleportHistoryPanel::refresh()
if (curr_flat_view)
{
- LLTeleportHistoryFlatItem* item = new LLTeleportHistoryFlatItem(mCurrentItem, &mContextMenu, items[mCurrentItem].mTitle, mFilterSubString);
+ LLTeleportHistoryFlatItem* item = new LLTeleportHistoryFlatItem(mCurrentItem, &mContextMenu, items[mCurrentItem].mTitle, sFilterSubString);
curr_flat_view->addItem(item);
if (mLastSelectedItemIndex == mCurrentItem)
@@ -569,7 +569,7 @@ void LLTeleportHistoryPanel::replaceItem(S32 removed_index)
LLTeleportHistoryFlatItem* item = new LLTeleportHistoryFlatItem(history_items.size(), // index will be decremented inside loop below
&mContextMenu,
history_items[history_items.size() - 1].mTitle, // Most recent item, it was
- mFilterSubString);
+ sFilterSubString);
// added instead of removed
fv->addItem(item, LLUUID::null, ADD_TOP);
diff --git a/indra/newview/llpanelteleporthistory.h b/indra/newview/llpanelteleporthistory.h
index f646fea355..0c0f891f32 100644
--- a/indra/newview/llpanelteleporthistory.h
+++ b/indra/newview/llpanelteleporthistory.h
@@ -109,7 +109,6 @@ private:
S32 mLastSelectedItemIndex;
bool mDirty;
S32 mCurrentItem;
- std::string mFilterSubString;
typedef LLDynamicArray<LLAccordionCtrlTab*> item_containers_t;
item_containers_t mItemContainers;
diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp
index 48a7a32a3b..e99a9a5d12 100644
--- a/indra/newview/llparticipantlist.cpp
+++ b/indra/newview/llparticipantlist.cpp
@@ -47,6 +47,44 @@
#if LL_MSVC
#pragma warning (disable : 4355) // 'this' used in initializer list: yes, intentionally
#endif
+
+class ModerationResponder : public LLHTTPClient::Responder
+{
+public:
+ ModerationResponder(const LLUUID& session_id)
+ {
+ mSessionID = session_id;
+ }
+
+ virtual void error(U32 status, const std::string& reason)
+ {
+ llwarns << status << ": " << reason << llendl;
+
+ if ( gIMMgr )
+ {
+ //403 == you're not a mod
+ //should be disabled if you're not a moderator
+ if ( 403 == status )
+ {
+ gIMMgr->showSessionEventError(
+ "mute",
+ "not_a_mod_error",
+ mSessionID);
+ }
+ else
+ {
+ gIMMgr->showSessionEventError(
+ "mute",
+ "generic_request_error",
+ mSessionID);
+ }
+ }
+ }
+
+private:
+ LLUUID mSessionID;
+};
+
LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* avatar_list, bool use_context_menu/* = true*/):
mSpeakerMgr(data_source),
mAvatarList(avatar_list),
@@ -57,6 +95,7 @@ LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* av
mSpeakerRemoveListener = new SpeakerRemoveListener(*this);
mSpeakerClearListener = new SpeakerClearListener(*this);
mSpeakerModeratorListener = new SpeakerModeratorUpdateListener(*this);
+ mSpeakerMuteListener = new SpeakerMuteListener(*this);
mSpeakerMgr->addListener(mSpeakerAddListener, "add");
mSpeakerMgr->addListener(mSpeakerRemoveListener, "remove");
@@ -87,6 +126,7 @@ LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* av
for(LLSpeakerMgr::speaker_list_t::iterator it = speaker_list.begin(); it != speaker_list.end(); it++)
{
const LLPointer<LLSpeaker>& speakerp = *it;
+
addAvatarIDExceptAgent(group_members, speakerp->mID);
if ( speakerp->mIsModerator )
{
@@ -248,6 +288,24 @@ bool LLParticipantList::onModeratorUpdateEvent(LLPointer<LLOldEvents::LLEvent> e
return true;
}
+bool LLParticipantList::onSpeakerMuteEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata)
+{
+ LLPointer<LLSpeaker> speakerp = (LLSpeaker*)event->getSource();
+ if (speakerp.isNull()) return false;
+
+ // update UI on confirmation of moderator mutes
+ if (event->getValue().asString() == "voice")
+ {
+ LLAvatarListItem* item = dynamic_cast<LLAvatarListItem*>(mAvatarList->getItemByValue(speakerp->mID));
+ if (item)
+ {
+ LLOutputMonitorCtrl* indicator = item->getChild<LLOutputMonitorCtrl>("speaking_indicator");
+ indicator->setIsMuted(speakerp->mModeratorMutedVoice);
+ }
+ }
+ return true;
+}
+
void LLParticipantList::sort()
{
if ( !mAvatarList )
@@ -264,13 +322,21 @@ void LLParticipantList::sort()
}
}
-// static
void LLParticipantList::addAvatarIDExceptAgent(std::vector<LLUUID>& existing_list, const LLUUID& avatar_id)
{
- if (gAgent.getID() != avatar_id)
- {
- existing_list.push_back(avatar_id);
- }
+ if (gAgent.getID() == avatar_id) return;
+
+ existing_list.push_back(avatar_id);
+ adjustParticipant(avatar_id);
+}
+
+void LLParticipantList::adjustParticipant(const LLUUID& speaker_id)
+{
+ LLPointer<LLSpeaker> speakerp = mSpeakerMgr->findSpeaker(speaker_id);
+ if (speakerp.isNull()) return;
+
+ // add listener to process moderation changes
+ speakerp->addListener(mSpeakerMuteListener);
}
//
@@ -315,6 +381,11 @@ bool LLParticipantList::SpeakerModeratorUpdateListener::handleEvent(LLPointer<LL
return mParent.onModeratorUpdateEvent(event, userdata);
}
+bool LLParticipantList::SpeakerMuteListener::handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata)
+{
+ return mParent.onSpeakerMuteEvent(event, userdata);
+}
+
LLContextMenu* LLParticipantList::LLParticipantListMenu::createMenu()
{
// set up the callbacks for all of the avatar menu items
@@ -341,7 +412,7 @@ void LLParticipantList::LLParticipantListMenu::show(LLView* spawning_view, const
if (uuids.size() == 0) return;
const LLUUID speaker_id = mUUIDs.front();
- BOOL is_muted = LLMuteList::getInstance()->isMuted(speaker_id, LLMute::flagVoiceChat);
+ BOOL is_muted = isMuted(speaker_id);
if (is_muted)
{
@@ -353,7 +424,6 @@ void LLParticipantList::LLParticipantListMenu::show(LLView* spawning_view, const
LLMenuGL::sMenuContainer->childSetVisible("ModerateVoiceUnMuteSelected", false);
LLMenuGL::sMenuContainer->childSetVisible("ModerateVoiceUnMuteOthers", false);
}
-
}
void LLParticipantList::LLParticipantListMenu::toggleAllowTextChat(const LLSD& userdata)
@@ -370,47 +440,10 @@ void LLParticipantList::LLParticipantListMenu::toggleAllowTextChat(const LLSD& u
//current value represents ability to type, so invert
data["params"]["mute_info"]["text"] = !mParent.mSpeakerMgr->findSpeaker(speaker_id)->mModeratorMutedText;
- class MuteTextResponder : public LLHTTPClient::Responder
- {
- public:
- MuteTextResponder(const LLUUID& session_id)
- {
- mSessionID = session_id;
- }
-
- virtual void error(U32 status, const std::string& reason)
- {
- llwarns << status << ": " << reason << llendl;
-
- if ( gIMMgr )
- {
- //403 == you're not a mod
- //should be disabled if you're not a moderator
- if ( 403 == status )
- {
- gIMMgr->showSessionEventError(
- "mute",
- "not_a_moderator",
- mSessionID);
- }
- else
- {
- gIMMgr->showSessionEventError(
- "mute",
- "generic",
- mSessionID);
- }
- }
- }
-
- private:
- LLUUID mSessionID;
- };
-
LLHTTPClient::post(
url,
data,
- new MuteTextResponder(mParent.mSpeakerMgr->getSessionID()));
+ new ModerationResponder(mParent.mSpeakerMgr->getSessionID()));
}
void LLParticipantList::LLParticipantListMenu::toggleMute(const LLSD& userdata, U32 flags)
@@ -450,36 +483,76 @@ void LLParticipantList::LLParticipantListMenu::toggleMuteVoice(const LLSD& userd
toggleMute(userdata, LLMute::flagVoiceChat);
}
+bool LLParticipantList::LLParticipantListMenu::isMuted(const LLUUID& avatar_id)
+{
+ LLPointer<LLSpeaker> selected_speakerp = mParent.mSpeakerMgr->findSpeaker(avatar_id);
+ if (!selected_speakerp) return true;
+
+ return selected_speakerp->mStatus == LLSpeaker::STATUS_MUTED;
+}
+
void LLParticipantList::LLParticipantListMenu::moderateVoice(const LLSD& userdata)
{
+ if (!gAgent.getRegion()) return;
+
+ bool moderate_selected = userdata.asString() == "selected";
+ const LLUUID& selected_avatar_id = mUUIDs.front();
+ bool is_muted = isMuted(selected_avatar_id);
+ if (moderate_selected)
+ {
+ moderateVoiceParticipant(selected_avatar_id, is_muted);
+ }
+ else
+ {
+ moderateVoiceOtherParticipants(selected_avatar_id, is_muted);
+ }
}
-void LLParticipantList::LLParticipantListMenu::moderateVoiceOtherParticipants(const LLSD& userdata)
+
+void LLParticipantList::LLParticipantListMenu::moderateVoiceParticipant(const LLUUID& avatar_id, bool unmute)
+{
+ if (gAgentID == avatar_id) return; // do not process myself
+
+ LLPointer<LLSpeaker> speakerp = mParent.mSpeakerMgr->findSpeaker(avatar_id);
+ if (!speakerp) return;
+
+ // *NOTE: mantipov: probably this condition will be incorrect when avatar will be blocked for
+ // text chat via moderation (LLSpeaker::mModeratorMutedText == TRUE)
+ bool is_in_voice = speakerp->mStatus <= LLSpeaker::STATUS_VOICE_ACTIVE || speakerp->mStatus == LLSpeaker::STATUS_MUTED;
+
+ // do not send voice moderation changes for avatars not in voice channel
+ if (!is_in_voice) return;
+
+ std::string url = gAgent.getRegion()->getCapability("ChatSessionRequest");
+ LLSD data;
+ data["method"] = "mute update";
+ data["session-id"] = mParent.mSpeakerMgr->getSessionID();
+ data["params"] = LLSD::emptyMap();
+ data["params"]["agent_id"] = avatar_id;
+ data["params"]["mute_info"] = LLSD::emptyMap();
+ data["params"]["mute_info"]["voice"] = !unmute;
+
+ LLHTTPClient::post(
+ url,
+ data,
+ new ModerationResponder(mParent.mSpeakerMgr->getSessionID()));
+}
+
+void LLParticipantList::LLParticipantListMenu::moderateVoiceOtherParticipants(const LLUUID& excluded_avatar_id, bool unmute)
{
LLSpeakerMgr::speaker_list_t speakers;
- mParent.mSpeakerMgr->getSpeakerList(&speakers, true);
+ mParent.mSpeakerMgr->getSpeakerList(&speakers, FALSE);
- const LLUUID& excluded_avatar_id = mUUIDs.front();
- bool should_mute = userdata.asString() == "mute";
for (LLSpeakerMgr::speaker_list_t::iterator iter = speakers.begin();
iter != speakers.end(); ++iter)
{
LLSpeaker* speakerp = (*iter).get();
LLUUID speaker_id = speakerp->mID;
- if (excluded_avatar_id == speaker_id) continue;
- LLMute mute(speaker_id, speakerp->mDisplayName, speakerp->mType == LLSpeaker::SPEAKER_AGENT ? LLMute::AGENT : LLMute::OBJECT);
+ if (excluded_avatar_id == speaker_id) continue;
- if (should_mute)
- {
- LLMuteList::getInstance()->add(mute, LLMute::flagVoiceChat);
- }
- else
- {
- LLMuteList::getInstance()->remove(mute, LLMute::flagVoiceChat);
- }
+ moderateVoiceParticipant(speaker_id, unmute);
}
-
}
bool LLParticipantList::LLParticipantListMenu::enableContextMenuItem(const LLSD& userdata)
@@ -516,3 +589,5 @@ bool LLParticipantList::LLParticipantListMenu::checkContextMenuItem(const LLSD&
}
return false;
}
+
+//EOF
diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h
index 83191a5b8d..229769ec09 100644
--- a/indra/newview/llparticipantlist.h
+++ b/indra/newview/llparticipantlist.h
@@ -64,6 +64,7 @@ class LLParticipantList
bool onRemoveItemEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata);
bool onClearListEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata);
bool onModeratorUpdateEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata);
+ bool onSpeakerMuteEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata);
/**
* Sorts the Avatarlist by stored order
@@ -109,6 +110,14 @@ class LLParticipantList
/*virtual*/ bool handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata);
};
+ class SpeakerMuteListener : public BaseSpeakerListner
+ {
+ public:
+ SpeakerMuteListener(LLParticipantList& parent) : BaseSpeakerListner(parent) {}
+
+ /*virtual*/ bool handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata);
+ };
+
/**
* Menu used in the participant list.
*/
@@ -130,8 +139,49 @@ class LLParticipantList
void toggleMuteVoice(const LLSD& userdata);
// Voice moderation support
+ /**
+ * Check whether specified by argument avatar is muted for group chat or not.
+ */
+ bool isMuted(const LLUUID& avatar_id);
+
+ /**
+ * Processes Voice moderation menu items.
+ *
+ * It calls either moderateVoiceParticipant() or moderateVoiceParticipant() depend on
+ * passed parameter.
+ *
+ * @param userdata can be "selected" or "others".
+ *
+ * @see moderateVoiceParticipant()
+ * @see moderateVoiceOtherParticipants()
+ */
void moderateVoice(const LLSD& userdata);
- void moderateVoiceOtherParticipants(const LLSD& userdata);
+
+ /**
+ * Mutes/Unmutes avatar for current group voice chat.
+ *
+ * It only marks avatar as muted for session and does not use local Agent's Block list.
+ * It does not mute Agent itself.
+ *
+ * @param[in] avatar_id UUID of avatar to be processed
+ * @param[in] unmute if true - specified avatar will be muted, otherwise - unmuted.
+ *
+ * @see moderateVoiceOtherParticipants()
+ */
+ void moderateVoiceParticipant(const LLUUID& avatar_id, bool unmute);
+
+ /**
+ * Mutes/Unmutes all avatars except specified for current group voice chat.
+ *
+ * It only marks avatars as muted for session and does not use local Agent's Block list.
+ * It based call moderateVoiceParticipant() for each avatar should be muted/unmuted.
+ *
+ * @param[in] excluded_avatar_id UUID of avatar NOT to be processed
+ * @param[in] unmute if true - avatars will be muted, otherwise - unmuted.
+ *
+ * @see moderateVoiceParticipant()
+ */
+ void moderateVoiceOtherParticipants(const LLUUID& excluded_avatar_id, bool unmute);
};
private:
@@ -140,8 +190,18 @@ class LLParticipantList
/**
* Adds specified avatar ID to the existing list if it is not Agent's ID
+ *
+ * @param[in, out] existing_list - vector with avatars' UUIDs already in the list
+ * @param[in] avatar_id - Avatar UUID to be added into the list
+ */
+ void addAvatarIDExceptAgent(std::vector<LLUUID>& existing_list, const LLUUID& avatar_id);
+
+ /**
+ * Adjusts passed participant to work properly.
+ *
+ * Adds SpeakerMuteListener to process moderation actions.
*/
- static void addAvatarIDExceptAgent(std::vector<LLUUID>& existing_list, const LLUUID& avatar_id);
+ void adjustParticipant(const LLUUID& speaker_id);
LLSpeakerMgr* mSpeakerMgr;
LLAvatarList* mAvatarList;
@@ -153,6 +213,7 @@ class LLParticipantList
LLPointer<SpeakerRemoveListener> mSpeakerRemoveListener;
LLPointer<SpeakerClearListener> mSpeakerClearListener;
LLPointer<SpeakerModeratorUpdateListener> mSpeakerModeratorListener;
+ LLPointer<SpeakerMuteListener> mSpeakerMuteListener;
LLParticipantListMenu* mParticipantListMenu;
diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp
index 30cb21c83c..f1891aa421 100644
--- a/indra/newview/llpreviewgesture.cpp
+++ b/indra/newview/llpreviewgesture.cpp
@@ -59,7 +59,6 @@
#include "llinventorymodel.h"
#include "llkeyboard.h"
#include "lllineeditor.h"
-#include "llnotify.h"
#include "llradiogroup.h"
#include "llscrolllistctrl.h"
#include "llscrolllistitem.h"
diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp
index 5d675fcda6..95756ac5f3 100644
--- a/indra/newview/llpreviewnotecard.cpp
+++ b/indra/newview/llpreviewnotecard.cpp
@@ -44,7 +44,6 @@
#include "llinventorymodel.h"
#include "lllineeditor.h"
#include "llnotificationsutil.h"
-#include "llnotify.h"
#include "llresmgr.h"
#include "roles_constants.h"
#include "llscrollbar.h"
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index 8d80310769..646c9fb6a4 100644
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -61,7 +61,6 @@
#include "llvfile.h"
#include "llagent.h"
-#include "llnotify.h"
#include "llmenugl.h"
#include "roles_constants.h"
#include "llselectmgr.h"
diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp
index f66f725070..790be83e74 100644
--- a/indra/newview/llscreenchannel.cpp
+++ b/indra/newview/llscreenchannel.cpp
@@ -151,6 +151,33 @@ LLScreenChannel::~LLScreenChannel()
}
+std::list<LLToast*> LLScreenChannel::findToasts(const Matcher& matcher)
+{
+ std::list<LLToast*> res;
+
+ // collect stored toasts
+ for (std::vector<ToastElem>::iterator it = mStoredToastList.begin(); it
+ != mStoredToastList.end(); it++)
+ {
+ if (matcher.matches(it->toast->getNotification()))
+ {
+ res.push_back(it->toast);
+ }
+ }
+
+ // collect displayed toasts
+ for (std::vector<ToastElem>::iterator it = mToastList.begin(); it
+ != mToastList.end(); it++)
+ {
+ if (matcher.matches(it->toast->getNotification()))
+ {
+ res.push_back(it->toast);
+ }
+ }
+
+ return res;
+}
+
//--------------------------------------------------------------------------
void LLScreenChannel::updatePositionAndSize(LLRect old_world_rect, LLRect new_world_rect)
{
@@ -375,6 +402,16 @@ void LLScreenChannel::killToastByNotificationID(LLUUID id)
}
}
+void LLScreenChannel::killMatchedToasts(const Matcher& matcher)
+{
+ std::list<LLToast*> to_delete = findToasts(matcher);
+ for (std::list<LLToast*>::iterator it = to_delete.begin(); it
+ != to_delete.end(); it++)
+ {
+ killToastByNotificationID((*it)-> getNotificationID());
+ }
+}
+
//--------------------------------------------------------------------------
void LLScreenChannel::modifyToastByNotificationID(LLUUID id, LLPanel* panel)
{
diff --git a/indra/newview/llscreenchannel.h b/indra/newview/llscreenchannel.h
index b8efbb148f..321fb244a1 100644
--- a/indra/newview/llscreenchannel.h
+++ b/indra/newview/llscreenchannel.h
@@ -151,6 +151,16 @@ public:
LLScreenChannel(LLUUID& id);
virtual ~LLScreenChannel();
+ class Matcher
+ {
+ public:
+ Matcher(){}
+ virtual ~Matcher() {}
+ virtual bool matches(const LLNotificationPtr) const = 0;
+ };
+
+ std::list<LLToast*> findToasts(const Matcher& matcher);
+
// Channel's outfit-functions
// update channel's size and position in the World View
void updatePositionAndSize(LLRect old_world_rect, LLRect new_world_rect);
@@ -162,6 +172,7 @@ public:
void addToast(const LLToast::Params& p);
// kill or modify a toast by its ID
void killToastByNotificationID(LLUUID id);
+ void killMatchedToasts(const Matcher& matcher);
void modifyToastByNotificationID(LLUUID id, LLPanel* panel);
// hide all toasts from screen, but not remove them from a channel
void hideToastsFromScreen();
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 93655eb1f1..539673ab9e 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -121,7 +121,6 @@
#include "lllogininstance.h" // Host the login module.
#include "llpanellogin.h"
#include "llmutelist.h"
-#include "llnotify.h"
#include "llpanelavatar.h"
#include "llavatarpropertiesprocessor.h"
#include "llpanelevent.h"
diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp
index 4915720036..9e72464237 100644
--- a/indra/newview/llstatusbar.cpp
+++ b/indra/newview/llstatusbar.cpp
@@ -50,7 +50,6 @@
#include "llkeyboard.h"
#include "lllineeditor.h"
#include "llmenugl.h"
-#include "llnotify.h"
#include "llimview.h"
#include "llsd.h"
#include "lltextbox.h"
diff --git a/indra/newview/lltoast.h b/indra/newview/lltoast.h
index 0c3c598704..3d25fd4f02 100644
--- a/indra/newview/lltoast.h
+++ b/indra/newview/lltoast.h
@@ -139,6 +139,7 @@ public:
// set whether this toast considered as hidden or not
void setIsHidden( bool is_toast_hidden ) { mIsHidden = is_toast_hidden; }
+ const LLNotificationPtr& getNotification() { return mNotification;}
// Registers signals/callbacks for events
toast_signal_t mOnFadeSignal;
diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp
index a4f5164a8d..c48301fa1e 100644
--- a/indra/newview/lltoastalertpanel.cpp
+++ b/indra/newview/lltoastalertpanel.cpp
@@ -30,10 +30,6 @@
* $/LicenseInfo$
*/
-// *NOTE: this module is a copy-paste of llui/llalertdialog.h
-// Can we re-implement this as a subclass of LLAlertDialog and
-// avoid all this code duplication? It already caused EXT-2232.
-
#include "llviewerprecompiledheaders.h" // must be first include
#include "linden_common.h"
@@ -60,7 +56,7 @@ const F32 DEFAULT_BUTTON_DELAY = 0.5f;
const S32 MSG_PAD = 8;
/*static*/ LLControlGroup* LLToastAlertPanel::sSettings = NULL;
-/*static*/ LLAlertURLLoader* LLToastAlertPanel::sURLLoader;
+/*static*/ LLToastAlertPanel::URLLoader* LLToastAlertPanel::sURLLoader;
//-----------------------------------------------------------------------------
// Private methods
diff --git a/indra/newview/lltoastalertpanel.h b/indra/newview/lltoastalertpanel.h
index 38a635e8a4..875ab82c54 100644
--- a/indra/newview/lltoastalertpanel.h
+++ b/indra/newview/lltoastalertpanel.h
@@ -30,10 +30,6 @@
* $/LicenseInfo$
*/
-// *NOTE: this module is a copy-paste of llui/llalertdialog.h
-// Can we re-implement this as a subclass of LLAlertDialog and
-// avoid all this code duplication? It already caused EXT-2232.
-
#ifndef LL_TOASTALERTPANEL_H
#define LL_TOASTALERTPANEL_H
@@ -41,11 +37,9 @@
#include "llfloater.h"
#include "llui.h"
#include "llnotificationptr.h"
-#include "llalertdialog.h"
class LLButton;
class LLCheckBoxCtrl;
-class LLAlertDialogTemplate;
class LLLineEditor;
/**
@@ -62,7 +56,16 @@ class LLToastAlertPanel
public:
typedef bool (*display_callback_t)(S32 modal);
- static void setURLLoader(LLAlertURLLoader* loader)
+ class URLLoader
+ {
+ public:
+ virtual void load(const std::string& url, bool force_open_externally = 0) = 0;
+ virtual ~URLLoader()
+ {
+ }
+ };
+
+ static void setURLLoader(URLLoader* loader)
{
sURLLoader = loader;
}
@@ -95,7 +98,7 @@ private:
BOOL hasTitleBar() const;
private:
- static LLAlertURLLoader* sURLLoader;
+ static URLLoader* sURLLoader;
static LLControlGroup* sSettings;
struct ButtonData
diff --git a/indra/newview/lltoastgroupnotifypanel.cpp b/indra/newview/lltoastgroupnotifypanel.cpp
index eacc077a65..e49044cdca 100644
--- a/indra/newview/lltoastgroupnotifypanel.cpp
+++ b/indra/newview/lltoastgroupnotifypanel.cpp
@@ -40,7 +40,6 @@
#include "lliconctrl.h"
#include "llinventoryfunctions.h"
#include "llnotifications.h"
-#include "llnotify.h"
#include "llviewertexteditor.h"
#include "lluiconstants.h"
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index 6339d23fa7..91de7d9ba2 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -63,7 +63,6 @@
#include "llviewerjoystick.h"
#include "llviewerparcelmgr.h"
#include "llparcel.h"
-#include "llnotify.h"
#include "lloverlaybar.h"
#include "llkeyboard.h"
#include "llerrorcontrol.h"
@@ -517,14 +516,12 @@ bool toggle_show_snapshot_button(const LLSD& newvalue)
bool toggle_show_navigation_panel(const LLSD& newvalue)
{
LLRect floater_view_rect = gFloaterView->getRect();
- LLRect notify_view_rect = gNotifyBoxView->getRect();
LLNavigationBar* navbar = LLNavigationBar::getInstance();
//if newvalue contains 0 => navbar should turn invisible, so floater_view_rect should get higher,
//and to do this pm=1, else if navbar becomes visible pm=-1 so floater_view_rect gets lower.
int pm=newvalue.asBoolean()?-1:1;
floater_view_rect.mTop += pm*(navbar->getDefNavBarHeight()-navbar->getDefFavBarHeight());
- notify_view_rect.mTop += pm*(navbar->getDefNavBarHeight()-navbar->getDefFavBarHeight());
gFloaterView->setRect(floater_view_rect);
floater_view_rect = gFloaterView->getRect();
navbar->showNavigationPanel(newvalue.asBoolean());
@@ -534,14 +531,12 @@ bool toggle_show_navigation_panel(const LLSD& newvalue)
bool toggle_show_favorites_panel(const LLSD& newvalue)
{
LLRect floater_view_rect = gFloaterView->getRect();
- LLRect notify_view_rect = gNotifyBoxView->getRect();
LLNavigationBar* navbar = LLNavigationBar::getInstance();
//if newvalue contains 0 => favbar should turn invisible, so floater_view_rect should get higher,
//and to do this pm=1, else if favbar becomes visible pm=-1 so floater_view_rect gets lower.
int pm=newvalue.asBoolean()?-1:1;
floater_view_rect.mTop += pm*navbar->getDefFavBarHeight();
- notify_view_rect.mTop += pm*navbar->getDefFavBarHeight();
gFloaterView->setRect(floater_view_rect);
navbar->showFavoritesPanel(newvalue.asBoolean());
return true;
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index 78cee15384..645a73c502 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -43,7 +43,6 @@
#include "llviewercontrol.h"
#include "llconsole.h"
#include "llinventorymodel.h"
-#include "llnotify.h"
#include "llgesturemgr.h"
#include "llinventorybridge.h"
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 31bd264e3a..8fe18c56c9 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -59,7 +59,6 @@
#include "llnearbychat.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
-#include "llnotify.h"
#include "llpanelgrouplandmoney.h"
#include "llpanelplaces.h"
#include "llrecentpeople.h"
@@ -926,34 +925,40 @@ void open_inventory_offer(const std::vector<LLUUID>& items, const std::string& f
void inventory_offer_mute_callback(const LLUUID& blocked_id,
const std::string& first_name,
const std::string& last_name,
- BOOL is_group)
+ BOOL is_group, LLOfferInfo* offer = NULL)
{
std::string from_name;
LLMute::EType type;
-
if (is_group)
{
type = LLMute::GROUP;
from_name = first_name;
}
+ else if(offer && offer->mFromObject)
+ {
+ //we have to block object by name because blocked_id is an id of owner
+ type = LLMute::BY_NAME;
+ from_name = offer->mFromName;
+ }
else
{
type = LLMute::AGENT;
from_name = first_name + " " + last_name;
}
- LLMute mute(blocked_id, from_name, type);
+ // id should be null for BY_NAME mute, see LLMuteList::add for details
+ LLMute mute(type == LLMute::BY_NAME ? LLUUID::null : blocked_id, from_name, type);
if (LLMuteList::getInstance()->add(mute))
{
LLPanelBlockedList::showPanelAndSelect(blocked_id);
}
// purge the message queue of any previously queued inventory offers from the same source.
- class OfferMatcher : public LLNotifyBoxView::Matcher
+ class OfferMatcher : public LLNotificationsUI::LLScreenChannel::Matcher
{
public:
OfferMatcher(const LLUUID& to_block) : blocked_id(to_block) {}
- BOOL matches(const LLNotificationPtr notification) const
+ bool matches(const LLNotificationPtr notification) const
{
if(notification->getName() == "ObjectGiveItem"
|| notification->getName() == "ObjectGiveItemUnknownUser"
@@ -966,7 +971,9 @@ void inventory_offer_mute_callback(const LLUUID& blocked_id,
private:
const LLUUID& blocked_id;
};
- gNotifyBoxView->purgeMessagesMatching(OfferMatcher(blocked_id));
+
+ LLNotificationsUI::LLChannelManager::getInstance()->killToastsFromChannel(LLUUID(
+ gSavedSettings.getString("NotificationChannelUUID")), OfferMatcher(blocked_id));
}
LLOfferInfo::LLOfferInfo(const LLSD& sd)
@@ -1062,7 +1069,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
// * we can't build two messages at once.
if (2 == button)
{
- gCacheName->get(mFromID, mFromGroup, &inventory_offer_mute_callback);
+ gCacheName->get(mFromID, mFromGroup, boost::bind(&inventory_offer_mute_callback,_1,_2,_3,_4,this));
}
std::string from_string; // Used in the pop-up.
@@ -1196,7 +1203,7 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const
// * we can't build two messages at once.
if (2 == button)
{
- gCacheName->get(mFromID, mFromGroup, &inventory_offer_mute_callback);
+ gCacheName->get(mFromID, mFromGroup, boost::bind(&inventory_offer_mute_callback,_1,_2,_3,_4,this));
}
LLMessageSystem* msg = gMessageSystem;
@@ -4831,24 +4838,25 @@ bool script_question_cb(const LLSD& notification, const LLSD& response)
LLMuteList::getInstance()->add(LLMute(item_id, notification["payload"]["object_name"].asString(), LLMute::OBJECT));
// purge the message queue of any previously queued requests from the same source. DEV-4879
- class OfferMatcher : public LLNotifyBoxView::Matcher
+ class OfferMatcher : public LLNotificationsUI::LLScreenChannel::Matcher
{
public:
OfferMatcher(const LLUUID& to_block) : blocked_id(to_block) {}
- BOOL matches(const LLNotificationPtr notification) const
+ bool matches(const LLNotificationPtr notification) const
{
if (notification->getName() == "ScriptQuestionCaution"
|| notification->getName() == "ScriptQuestion")
{
return (notification->getPayload()["item_id"].asUUID() == blocked_id);
}
- return FALSE;
+ return false;
}
private:
const LLUUID& blocked_id;
};
- // should do this via the channel
- gNotifyBoxView->purgeMessagesMatching(OfferMatcher(item_id));
+
+ LLNotificationsUI::LLChannelManager::getInstance()->killToastsFromChannel(LLUUID(
+ gSavedSettings.getString("NotificationChannelUUID")), OfferMatcher(item_id));
}
if (response["Details"])
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp
index 7a1abfd4e8..be68a2ef42 100644
--- a/indra/newview/llviewerparcelmgr.cpp
+++ b/indra/newview/llviewerparcelmgr.cpp
@@ -54,7 +54,6 @@
#include "llfloatergroups.h"
#include "llfloatersellland.h"
#include "llfloatertools.h"
-#include "llnotify.h"
#include "llparcelselection.h"
#include "llresmgr.h"
#include "llsdutil.h"
diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp
index e0091145ce..300aea1620 100644
--- a/indra/newview/llviewertexteditor.cpp
+++ b/indra/newview/llviewertexteditor.cpp
@@ -51,7 +51,6 @@
#include "llmenugl.h"
#include "llnotecard.h"
#include "llnotificationsutil.h"
-#include "llnotify.h"
#include "llpanelplaces.h"
#include "llpreview.h"
#include "llpreviewnotecard.h"
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 8529a93527..79c113f036 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -82,7 +82,6 @@
// newview includes
#include "llagent.h"
-#include "llalertdialog.h"
#include "llbox.h"
#include "llconsole.h"
#include "llviewercontrol.h"
@@ -129,7 +128,6 @@
#include "llmorphview.h"
#include "llmoveview.h"
#include "llnavigationbar.h"
-#include "llnotify.h"
#include "lloverlaybar.h"
#include "llpreviewtexture.h"
#include "llprogressview.h"
@@ -1450,7 +1448,6 @@ void LLViewerWindow::initBase()
gDebugView = getRootView()->getChild<LLDebugView>("DebugView");
gDebugView->init();
- gNotifyBoxView = getRootView()->getChild<LLNotifyBoxView>("notify_container");
gToolTipView = getRootView()->getChild<LLToolTipView>("tooltip view");
// Add the progress bar view (startup view), which overrides everything
@@ -1628,8 +1625,6 @@ void LLViewerWindow::shutdownViews()
gMorphView = NULL;
gHUDView = NULL;
-
- gNotifyBoxView = NULL;
}
void LLViewerWindow::shutdownGL()
@@ -1997,9 +1992,6 @@ void LLViewerWindow::draw()
#if LL_DEBUG
LLView::sIsDrawing = FALSE;
#endif
-
- // UI post-draw Updates
- gNotifyBoxView->updateNotifyBoxView();
}
// Takes a single keydown event, usually when UI is visible
@@ -2595,7 +2587,6 @@ void LLViewerWindow::updateUI()
else if (dynamic_cast<LLUICtrl*>(viewp)
&& viewp != gMenuHolder
&& viewp != gFloaterView
- && viewp != gNotifyBoxView
&& viewp != gConsole)
{
if (dynamic_cast<LLFloater*>(viewp))
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 93b0ad4a5b..8828ebff6a 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -64,7 +64,6 @@
#include "llkeyframewalkmotion.h"
#include "llmutelist.h"
#include "llmoveview.h"
-#include "llnotify.h"
#include "llquantize.h"
#include "llregionhandle.h"
#include "llresmgr.h"
diff --git a/indra/newview/llwearablelist.cpp b/indra/newview/llwearablelist.cpp
index 31047413ef..bd7619f7e5 100644
--- a/indra/newview/llwearablelist.cpp
+++ b/indra/newview/llwearablelist.cpp
@@ -41,7 +41,6 @@
#include "llviewerinventory.h"
#include "llviewerstats.h"
#include "llnotificationsutil.h"
-#include "llnotify.h"
#include "llinventorymodel.h"
#include "lltrans.h"
diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp
index 72431bd22f..c056c84e19 100644
--- a/indra/newview/llweb.cpp
+++ b/indra/newview/llweb.cpp
@@ -42,10 +42,9 @@
#include "llviewercontrol.h"
#include "llfloatermediabrowser.h"
#include "llfloaterreg.h"
-#include "llalertdialog.h"
#include "lltoastalertpanel.h"
-class URLLoader : public LLAlertURLLoader
+class URLLoader : public LLToastAlertPanel::URLLoader
{
virtual void load(const std::string& url , bool force_open_externally)
{
@@ -65,7 +64,6 @@ static URLLoader sAlertURLLoader;
// static
void LLWeb::initClass()
{
- LLAlertDialog::setURLLoader(&sAlertURLLoader);
LLToastAlertPanel::setURLLoader(&sAlertURLLoader);
}
diff --git a/indra/newview/skins/default/xui/en/floater_incoming_call.xml b/indra/newview/skins/default/xui/en/floater_incoming_call.xml
index acd59b6f09..81c54ae55e 100644
--- a/indra/newview/skins/default/xui/en/floater_incoming_call.xml
+++ b/indra/newview/skins/default/xui/en/floater_incoming_call.xml
@@ -26,6 +26,10 @@
name="VoiceInviteAdHoc">
has joined a Voice Chat call with a conference chat.
</floater.string>
+ <floater.string
+ name="VoiceInviteGroup">
+ has joined a Voice Chat call with the group [GROUP].
+ </floater.string>
<avatar_icon
enabled="false"
follows="left|top"
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 3e9cbe91e0..9cf9b9f586 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -5014,13 +5014,13 @@ An object named [OBJECTFROMNAME] owned by (an unknown Resident) has given you [O
name="Keep"
text="Keep"/>
<button
- index="4"
- name="Show"
- text="Show"/>
- <button
index="1"
name="Discard"
text="Discard"/>
+ <button
+ index="2"
+ name="Mute"
+ text="Block"/>
</form>
</notification>
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index c3650c71c3..8ac4ca95b9 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -2900,6 +2900,9 @@ If you continue to receive this message, contact the [SUPPORT_SITE].
<string name="message_session_event">
Unable to send your message to the chat session with [RECIPIENT].
</string>
+ <string name="mute">
+ Error while moderating.
+ </string>
<string name="removed_from_group">
You have been removed from the group.
</string>