diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2012-02-10 12:06:01 -0500 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2012-02-10 12:06:01 -0500 |
commit | 4849173fd87ff9199a0fee86dc6a43afe3936e71 (patch) | |
tree | 7d765b6d9aeba3ba0388ac229a8f63aa7a4af607 /indra/newview/llchiclet.cpp | |
parent | 028a05e79467e0c1fd7d63224fb447a964ab7a0b (diff) | |
parent | 58348bd862163261fb650d8afd50fd1dc5e2695a (diff) |
Merge daggy fix in rev a05866ebfea2 (Linux lib wildcards)
Diffstat (limited to 'indra/newview/llchiclet.cpp')
-rw-r--r-- | indra/newview/llchiclet.cpp | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index 245157923d..aabab0ccb9 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -29,7 +29,7 @@ #include "llagent.h" #include "llavataractions.h" -#include "llbottomtray.h" +#include "llchicletbar.h" #include "lleventtimer.h" #include "llgroupactions.h" #include "lliconctrl.h" @@ -214,10 +214,10 @@ void LLSysWellChiclet::updateWidget(bool is_window_empty) { mButton->setEnabled(!is_window_empty); - LLSD params; - params["well_empty"] = is_window_empty; - params["well_name"] = getName(); - notifyParent(params); + if (LLChicletBar::instanceExists()) + { + LLChicletBar::getInstance()->showWellButton(getName(), !is_window_empty); + } } // virtual BOOL LLSysWellChiclet::handleRightMouseDown(S32 x, S32 y, MASK mask) @@ -250,6 +250,12 @@ LLIMWellChiclet::LLIMWellChiclet(const Params& p) LLIMWellChiclet::~LLIMWellChiclet() { + LLIMWellWindow* im_well_window = LLIMWellWindow::findInstance(); + if (im_well_window) + { + im_well_window->setSysWellChiclet(NULL); + } + LLIMMgr::getInstance()->removeSessionObserver(this); } @@ -296,8 +302,15 @@ void LLIMWellChiclet::createMenu() void LLIMWellChiclet::messageCountChanged(const LLSD& session_data) { + // The singleton class LLChicletBar instance might be already deleted + // so don't create a new one. + if (!LLChicletBar::instanceExists()) + { + return; + } + const LLUUID& session_id = session_data["session_id"]; - const S32 counter = LLBottomTray::getInstance()->getTotalUnreadIMCount(); + const S32 counter = LLChicletBar::getInstance()->getTotalUnreadIMCount(); const bool im_not_visible = !LLFloaterReg::instanceVisible("im_container") && !LLFloaterReg::instanceVisible("impanel", session_id); |