diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp index 208cc149f7..32c4c9aabe 100644 --- a/indra/newview/llpanelgroup.cpp +++ b/indra/newview/llpanelgroup.cpp @@ -232,6 +232,11 @@ BOOL LLPanelGroup::postBuild() button = getChild("btn_refresh"); button->setClickedCallback(onBtnRefresh, this); + // FIRE-33939: Activate button + button = getChild("btn_activate"); + button->setClickedCallback(onBtnActivateClicked, this); + // + childSetCommitCallback("back",boost::bind(&LLPanelGroup::onBackBtnClick,this),NULL); LLPanelGroupTab* panel_general = findChild("group_general_tab_panel"); @@ -296,6 +301,7 @@ void LLPanelGroup::reposButtons() reposButton("btn_cancel"); reposButton("btn_chat"); reposButton("btn_call"); + reposButton("btn_activate"); // FIRE-33939: Activate button } void LLPanelGroup::reshape(S32 width, S32 height, BOOL called_from_parent ) @@ -347,6 +353,15 @@ void LLPanelGroup::onBtnGroupChatClicked(void* user_data) self->chatGroup(); } +// FIRE-33939: Activate button +void LLPanelGroup::onBtnActivateClicked(void* user_data) +{ + LLPanelGroup* self = static_cast(user_data); + self->activateGroup(); + self->refreshData(); +} +// + void LLPanelGroup::onBtnJoin() { if (LLGroupActions::isInGroup(mID)) @@ -486,6 +501,15 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id) if(button_chat) button_chat->setVisible(!is_null_group_id); + // FIRE-33939: Activate button + LLButton* button_activate = findChild("btn_activate"); + if (button_activate) + { + button_activate->setVisible(!is_null_group_id); + button_activate->setEnabled(group_id != gAgent.getGroupID()); + } + // + getChild("prepend_founded_by")->setVisible(!is_null_group_id); // TabContainer switch @@ -566,6 +590,10 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id) button_call->setVisible(false); if(button_chat) button_chat->setVisible(false); + // FIRE-33939: Activate button + if(button_activate) + button_activate->setVisible(false); + // } else { @@ -625,6 +653,10 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id) button_call->setVisible(is_member); if(button_chat) button_chat->setVisible(is_member); + // FIRE-33939: Activate button + if(button_activate) + button_activate->setVisible(is_member); + // } // TabContainer switch @@ -710,6 +742,12 @@ void LLPanelGroup::draw() mRefreshTimer.stop(); childEnable("btn_refresh"); childEnable("groups_accordion"); + // FIRE-33939: Activate button + if (gAgent.getGroupID() != getID()) + { + childEnable("btn_activate"); + } + // } LLButton* button_apply = findChild("btn_apply"); @@ -741,6 +779,7 @@ void LLPanelGroup::refreshData() // 5 second timeout childDisable("btn_refresh"); childDisable("groups_accordion"); + childDisable("btn_activate"); // FIRE-33939: Activate button mRefreshTimer.start(); mRefreshTimer.setTimerExpirySec(5); @@ -756,6 +795,17 @@ void LLPanelGroup::chatGroup() LLGroupActions::startIM(getID()); } +// FIRE-33939: Activate button +void LLPanelGroup::activateGroup() +{ + LLUUID group_id = getID(); + if (gAgent.getGroupID() != group_id) + { + LLGroupActions::activate(group_id); + } +} +// + void LLPanelGroup::showNotice(const std::string& subject, const std::string& message, const bool& has_inventory, diff --git a/indra/newview/llpanelgroup.h b/indra/newview/llpanelgroup.h index ac3a00dce7..998a598d4d 100644 --- a/indra/newview/llpanelgroup.h +++ b/indra/newview/llpanelgroup.h @@ -76,6 +76,7 @@ public: void refreshData(); void callGroup(); void chatGroup(); + void activateGroup(); // FIRE-33939: Activate button virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); @@ -102,6 +103,7 @@ protected: static void onBtnRefresh(void*); static void onBtnGroupCallClicked(void*); static void onBtnGroupChatClicked(void*); + static void onBtnActivateClicked(void*); // FIRE-33939: Activate button void reposButton(const std::string& name); void reposButtons(); diff --git a/indra/newview/skins/ansastorm/xui/en/panel_group_info_sidetray.xml b/indra/newview/skins/ansastorm/xui/en/panel_group_info_sidetray.xml index ae98e142b9..e30d500c06 100644 --- a/indra/newview/skins/ansastorm/xui/en/panel_group_info_sidetray.xml +++ b/indra/newview/skins/ansastorm/xui/en/panel_group_info_sidetray.xml @@ -219,6 +219,26 @@ background_visible="false" width="23" /> + +