diff options
Diffstat (limited to 'linden/indra/newview/llmutelist.cpp')
-rw-r--r-- | linden/indra/newview/llmutelist.cpp | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/linden/indra/newview/llmutelist.cpp b/linden/indra/newview/llmutelist.cpp index 0cdfe83..00ef9c3 100644 --- a/linden/indra/newview/llmutelist.cpp +++ b/linden/indra/newview/llmutelist.cpp | |||
@@ -64,6 +64,7 @@ | |||
64 | #include "llworld.h" //for particle system banning | 64 | #include "llworld.h" //for particle system banning |
65 | #include "llchat.h" | 65 | #include "llchat.h" |
66 | #include "llfloaterchat.h" | 66 | #include "llfloaterchat.h" |
67 | #include "llfloatermute.h" | ||
67 | #include "llimpanel.h" | 68 | #include "llimpanel.h" |
68 | #include "llimview.h" | 69 | #include "llimview.h" |
69 | #include "llnotify.h" | 70 | #include "llnotify.h" |
@@ -245,6 +246,43 @@ BOOL LLMuteList::isLinden(const std::string& name) const | |||
245 | } | 246 | } |
246 | 247 | ||
247 | 248 | ||
249 | void LLMuteList::addMuteAgentConfirm( const LLMute &mute ) | ||
250 | { | ||
251 | LLMute *newmute = new LLMute(mute); | ||
252 | |||
253 | LLStringUtil::format_map_t args; | ||
254 | args["[NAME]"] = newmute->mName; | ||
255 | |||
256 | gViewerWindow->alertXml("ConfirmMuteAgent", args, | ||
257 | LLMuteList::addMuteCallback, | ||
258 | static_cast<void*>(newmute)); | ||
259 | } | ||
260 | |||
261 | void LLMuteList::addMuteObjectConfirm( const LLMute &mute ) | ||
262 | { | ||
263 | LLMute *newmute = new LLMute(mute); | ||
264 | |||
265 | LLStringUtil::format_map_t args; | ||
266 | args["[NAME]"] = newmute->mName; | ||
267 | |||
268 | gViewerWindow->alertXml("ConfirmMuteObject", args, | ||
269 | LLMuteList::addMuteCallback, | ||
270 | static_cast<void*>(newmute)); | ||
271 | } | ||
272 | |||
273 | // static | ||
274 | void LLMuteList::addMuteCallback(S32 option, void *userdata) | ||
275 | { | ||
276 | LLMute *mute = static_cast<LLMute*>(userdata); | ||
277 | if( option == 0 ) | ||
278 | { | ||
279 | // They confirmed it. Here we go! | ||
280 | LLMuteList::getInstance()->add( *mute ); | ||
281 | LLFloaterMute::showInstance(); | ||
282 | } | ||
283 | delete mute; | ||
284 | } | ||
285 | |||
248 | BOOL LLMuteList::add(const LLMute& mute, U32 flags) | 286 | BOOL LLMuteList::add(const LLMute& mute, U32 flags) |
249 | { | 287 | { |
250 | // Can't mute text from Lindens | 288 | // Can't mute text from Lindens |