From ab689479bae4284af75f29e024bad19b7ef8cb6d Mon Sep 17 00:00:00 2001 From: Ychebotarev ProductEngine Date: Thu, 21 Jan 2010 10:13:44 +0200 Subject: fix normal EXT-4494 [BSI] Group Chat and Group Call buttons are shown even when you are not in the group --HG-- branch : product-engine --- indra/newview/llpanelgroup.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'indra/newview/llpanelgroup.cpp') diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp index 01291c4012..569d3001bf 100644 --- a/indra/newview/llpanelgroup.cpp +++ b/indra/newview/llpanelgroup.cpp @@ -425,6 +425,11 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id) getChild("group_name")->setVisible(false); getChild("group_name_editor")->setVisible(true); + + if(button_call) + button_call->setVisible(false); + if(button_chat) + button_chat->setVisible(false); } else { @@ -452,6 +457,10 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id) if(button_apply) button_apply->setVisible(is_member); + if(button_call) + button_call->setVisible(is_member); + if(button_chat) + button_chat->setVisible(is_member); } reposButtons(); -- cgit v1.2.3 From 682fd146b0978363e6264569c74e018f0cb971fa Mon Sep 17 00:00:00 2001 From: Ychebotarev ProductEngine Date: Fri, 22 Jan 2010 15:25:46 +0200 Subject: fix for normal EXT-4554 [BSI] group join now button goes missing after failure to join due to maximum groups --HG-- branch : product-engine --- indra/newview/llpanelgroup.cpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'indra/newview/llpanelgroup.cpp') diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp index 569d3001bf..c30ef3221d 100644 --- a/indra/newview/llpanelgroup.cpp +++ b/indra/newview/llpanelgroup.cpp @@ -356,13 +356,6 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id) for(std::vector::iterator it = mTabs.begin();it!=mTabs.end();++it) (*it)->setGroupID(group_id); - LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mID); - if(gdatap) - { - childSetValue("group_name", gdatap->mName); - childSetToolTip("group_name",gdatap->mName); - } - LLButton* button_apply = findChild("btn_apply"); LLButton* button_refresh = findChild("btn_refresh"); LLButton* button_create = findChild("btn_create"); @@ -464,6 +457,17 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id) } reposButtons(); + + LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mID); + + if(gdatap) + { + childSetValue("group_name", gdatap->mName); + childSetToolTip("group_name",gdatap->mName); + + //group data is already present, call update manually + update(GC_ALL); + } } bool LLPanelGroup::apply(LLPanelGroupTab* tab) -- cgit v1.2.3 From ab0c9c6754836cb26a520d0a9b2d7bbdd13a5f32 Mon Sep 17 00:00:00 2001 From: Andrew Dyukov Date: Fri, 22 Jan 2010 22:16:57 +0200 Subject: Fixed normal bugs EXT-4450 ([BSI] call buttons enabled when voice is disabled) and EXT-4313 (Should not be able to start a call when voice is disabled). Call buttons state now reacts on voice changes in time. - Added voiceWorking() method to LLVoiceClient to determine real availability of voice, because voiceEnabled() doesn't take into account possible errors. Perhaps there is no need in two methods- some investigation will be made and depending on its results they may become one non-static method. voiceWorking() uses state of voice client(mState) to determine voice availability. Also some states which are not currently counted by voiceWorking() as valid may be added if testing reveals problems. - To enable/disable call buttons in time, LLVoiceClientStatusObserver is used. Its trigger uses states from its enum only to skip updating button in some states(to avoid button blinking), but to determine button state LLVoiceClient's voiceWorking() is used. --HG-- branch : product-engine --- indra/newview/llpanelgroup.cpp | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) (limited to 'indra/newview/llpanelgroup.cpp') diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp index c30ef3221d..1d447a22d7 100644 --- a/indra/newview/llpanelgroup.cpp +++ b/indra/newview/llpanelgroup.cpp @@ -101,6 +101,8 @@ LLPanelGroup::LLPanelGroup() LLPanelGroup::~LLPanelGroup() { LLGroupMgr::getInstance()->removeObserver(this); + if(LLVoiceClient::getInstance()) + LLVoiceClient::getInstance()->removeObserver(this); } void LLPanelGroup::onOpen(const LLSD& key) @@ -188,6 +190,8 @@ BOOL LLPanelGroup::postBuild() if(panel_general) panel_general->setupCtrls(this); + + gVoiceClient->addObserver(this); return TRUE; } @@ -300,6 +304,17 @@ void LLPanelGroup::changed(LLGroupChange gc) update(gc); } +// virtual +void LLPanelGroup::onChange(EStatusType status, const std::string &channelURI, bool proximal) +{ + if(status == STATUS_JOINING || status == STATUS_LEFT_CHANNEL) + { + return; + } + + childSetEnabled("btn_call", LLVoiceClient::voiceEnabled() && gVoiceClient->voiceWorking()); +} + void LLPanelGroup::notifyObservers() { changed(GC_ALL); @@ -356,6 +371,13 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id) for(std::vector::iterator it = mTabs.begin();it!=mTabs.end();++it) (*it)->setGroupID(group_id); + LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mID); + if(gdatap) + { + childSetValue("group_name", gdatap->mName); + childSetToolTip("group_name",gdatap->mName); + } + LLButton* button_apply = findChild("btn_apply"); LLButton* button_refresh = findChild("btn_refresh"); LLButton* button_create = findChild("btn_create"); @@ -457,17 +479,6 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id) } reposButtons(); - - LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mID); - - if(gdatap) - { - childSetValue("group_name", gdatap->mName); - childSetToolTip("group_name",gdatap->mName); - - //group data is already present, call update manually - update(GC_ALL); - } } bool LLPanelGroup::apply(LLPanelGroupTab* tab) -- cgit v1.2.3