FIRE-33939: Activate button in Group Profile page

master
PanteraPolnocy 2024-05-27 23:11:20 +02:00
parent 51769ff70b
commit 60620fd014
14 changed files with 241 additions and 48 deletions

View File

@ -232,6 +232,11 @@ BOOL LLPanelGroup::postBuild()
button = getChild<LLButton>("btn_refresh");
button->setClickedCallback(onBtnRefresh, this);
// <FS:PP> FIRE-33939: Activate button
button = getChild<LLButton>("btn_activate");
button->setClickedCallback(onBtnActivateClicked, this);
// <FS:PP>
childSetCommitCallback("back",boost::bind(&LLPanelGroup::onBackBtnClick,this),NULL);
LLPanelGroupTab* panel_general = findChild<LLPanelGroupTab>("group_general_tab_panel");
@ -296,6 +301,7 @@ void LLPanelGroup::reposButtons()
reposButton("btn_cancel");
reposButton("btn_chat");
reposButton("btn_call");
reposButton("btn_activate"); // <FS:PP> 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();
}
// <FS:PP> FIRE-33939: Activate button
void LLPanelGroup::onBtnActivateClicked(void* user_data)
{
LLPanelGroup* self = static_cast<LLPanelGroup*>(user_data);
self->activateGroup();
self->refreshData();
}
// </FS:PP>
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);
// <FS:PP> FIRE-33939: Activate button
LLButton* button_activate = findChild<LLButton>("btn_activate");
if (button_activate)
{
button_activate->setVisible(!is_null_group_id);
button_activate->setEnabled(group_id != gAgent.getGroupID());
}
// </FS:PP>
getChild<LLUICtrl>("prepend_founded_by")->setVisible(!is_null_group_id);
// <FS:Ansariel> TabContainer switch
@ -566,6 +590,10 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id)
button_call->setVisible(false);
if(button_chat)
button_chat->setVisible(false);
// <FS:PP> FIRE-33939: Activate button
if(button_activate)
button_activate->setVisible(false);
// </FS:PP>
}
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);
// <FS:PP> FIRE-33939: Activate button
if(button_activate)
button_activate->setVisible(is_member);
// </FS:PP>
}
// <FS:Ansariel> TabContainer switch
@ -710,6 +742,12 @@ void LLPanelGroup::draw()
mRefreshTimer.stop();
childEnable("btn_refresh");
childEnable("groups_accordion");
// <FS:PP> FIRE-33939: Activate button
if (gAgent.getGroupID() != getID())
{
childEnable("btn_activate");
}
// </FS:PP>
}
LLButton* button_apply = findChild<LLButton>("btn_apply");
@ -741,6 +779,7 @@ void LLPanelGroup::refreshData()
// 5 second timeout
childDisable("btn_refresh");
childDisable("groups_accordion");
childDisable("btn_activate"); // <FS:PP> FIRE-33939: Activate button
mRefreshTimer.start();
mRefreshTimer.setTimerExpirySec(5);
@ -756,6 +795,17 @@ void LLPanelGroup::chatGroup()
LLGroupActions::startIM(getID());
}
// <FS:PP> FIRE-33939: Activate button
void LLPanelGroup::activateGroup()
{
LLUUID group_id = getID();
if (gAgent.getGroupID() != group_id)
{
LLGroupActions::activate(group_id);
}
}
// </FS:PP>
void LLPanelGroup::showNotice(const std::string& subject,
const std::string& message,
const bool& has_inventory,

View File

@ -76,6 +76,7 @@ public:
void refreshData();
void callGroup();
void chatGroup();
void activateGroup(); // <FS:PP> 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*); // <FS:PP> FIRE-33939: Activate button
void reposButton(const std::string& name);
void reposButtons();

View File

@ -219,6 +219,26 @@ background_visible="false"
width="23" />
</layout_panel>
<layout_panel
follows="bottom|left|right"
height="23"
layout="bottomleft"
left_pad="3"
name="btn_activate_lp"
user_resize="false"
auto_resize="true"
width="72">
<button
layout="topleft"
follows="bottom|left|right"
label="Activate"
name="btn_activate"
left="1"
height="23"
top="0"
width="71" />
</layout_panel>
<layout_panel
follows="bottom|left|right"
height="23"
@ -227,7 +247,7 @@ background_visible="false"
name="btn_chat_lp"
user_resize="false"
auto_resize="true"
width="97">
width="72">
<button
layout="topleft"
follows="bottom|left|right"
@ -236,7 +256,7 @@ background_visible="false"
left="1"
height="23"
top="0"
width="96" />
width="71" />
</layout_panel>
<layout_panel
@ -247,7 +267,7 @@ background_visible="false"
name="call_btn_lp"
user_resize="false"
auto_resize="true"
width="97">
width="72">
<button
follows="bottom|left|right"
left="1"
@ -257,7 +277,7 @@ background_visible="false"
layout="topleft"
tool_tip="Call this group"
top="0"
width="96" />
width="71" />
</layout_panel>
<layout_panel
@ -268,7 +288,7 @@ background_visible="false"
name="btn_apply_lp"
user_resize="false"
auto_resize="true"
width="97">
width="72">
<button
follows="bottom|left|right"
height="23"
@ -277,7 +297,7 @@ background_visible="false"
name="btn_apply"
left="1"
top="0"
width="96" />
width="71" />
</layout_panel>
</layout_stack>

View File

@ -256,7 +256,25 @@ background_visible="false"
name="btn_refresh"
width="23" />
</layout_panel>
<layout_panel
follows="bottom|left|right"
height="23"
layout="bottomleft"
left_pad="3"
name="btn_activate_lp"
auto_resize="true"
width="67">
<button
follows="bottom|left|right"
label="Activate"
name="btn_activate"
left="1"
height="23"
top="0"
width="66" />
</layout_panel>
<layout_panel
follows="bottom|left|right"
height="23"
@ -264,7 +282,7 @@ background_visible="false"
left_pad="3"
name="btn_chat_lp"
auto_resize="true"
width="91">
width="67">
<button
follows="bottom|left|right"
label="Chat"
@ -272,7 +290,7 @@ background_visible="false"
left="1"
height="23"
top="0"
width="90" />
width="66" />
</layout_panel>
<layout_panel
@ -282,7 +300,7 @@ background_visible="false"
left_pad="3"
name="call_btn_lp"
auto_resize="true"
width="91">
width="67">
<button
follows="bottom|left|right"
left="1"
@ -292,7 +310,7 @@ background_visible="false"
layout="topleft"
tool_tip="Call this group"
top="0"
width="90" />
width="66" />
</layout_panel>
<layout_panel
@ -302,7 +320,7 @@ background_visible="false"
left_pad="3"
name="btn_apply_lp"
auto_resize="true"
width="91">
width="67">
<button
follows="bottom|left|right"
height="23"
@ -311,7 +329,7 @@ background_visible="false"
name="btn_apply"
left="1"
top="0"
width="90" />
width="66" />
</layout_panel>
</layout_stack>

View File

@ -36,7 +36,7 @@
<button label="Chat" name="btn_chat"/>
</layout_panel>
<layout_panel name="call_btn_lp">
<button label="Chiamata al gruppo" name="btn_call" tool_tip="Avvia una conferenza vocale in questo gruppo"/>
<button label="Chiamata" name="btn_call" tool_tip="Avvia una conferenza vocale in questo gruppo"/>
</layout_panel>
<layout_panel name="btn_apply_lp">
<button label="Salva" label_selected="Salva" name="btn_apply"/>

View File

@ -41,11 +41,14 @@
</layout_panel>
</layout_stack>
<layout_stack name="button_row_ls">
<layout_panel name="btn_activate_lp">
<button label="Aktywuj" name="btn_activate" />
</layout_panel>
<layout_panel name="btn_chat_lp">
<button label="Czat" name="btn_chat"/>
</layout_panel>
<layout_panel name="call_btn_lp">
<button label="Konferencja głosowa" name="btn_call" tool_tip="Rozpocznij konferencję głosową w tej grupie"/>
<button label="Konf. głosowa" name="btn_call" tool_tip="Rozpocznij konferencję głosową w tej grupie"/>
</layout_panel>
<layout_panel name="btn_apply_lp">
<button label="Zapisz" label_selected="Zapisz" name="btn_apply"/>

View File

@ -219,6 +219,26 @@ background_visible="false"
width="23" />
</layout_panel>
<layout_panel
follows="bottom|left|right"
height="23"
layout="bottomleft"
left_pad="3"
name="btn_activate_lp"
user_resize="false"
auto_resize="true"
width="72">
<button
layout="topleft"
follows="bottom|left|right"
label="Activate"
name="btn_activate"
left="1"
height="23"
top="0"
width="71" />
</layout_panel>
<layout_panel
follows="bottom|left|right"
height="23"
@ -227,7 +247,7 @@ background_visible="false"
name="btn_chat_lp"
user_resize="false"
auto_resize="true"
width="97">
width="72">
<button
layout="topleft"
follows="bottom|left|right"
@ -236,7 +256,7 @@ background_visible="false"
left="1"
height="23"
top="0"
width="96" />
width="71" />
</layout_panel>
<layout_panel
@ -247,7 +267,7 @@ background_visible="false"
name="call_btn_lp"
user_resize="false"
auto_resize="true"
width="97">
width="72">
<button
follows="bottom|left|right"
left="1"
@ -257,7 +277,7 @@ background_visible="false"
layout="topleft"
tool_tip="Call this group"
top="0"
width="96" />
width="71" />
</layout_panel>
<layout_panel
@ -268,7 +288,7 @@ background_visible="false"
name="btn_apply_lp"
user_resize="false"
auto_resize="true"
width="97">
width="72">
<button
follows="bottom|left|right"
height="23"
@ -277,7 +297,7 @@ background_visible="false"
name="btn_apply"
left="1"
top="0"
width="96" />
width="71" />
</layout_panel>
</layout_stack>

View File

@ -209,6 +209,25 @@ background_visible="true"
orientation="horizontal"
top_delta="2"
width="445">
<layout_panel
follows="bottom|left|right"
height="23"
layout="bottomleft"
left_pad="3"
name="btn_activate_lp"
user_resize="false"
auto_resize="true"
width="67">
<button
follows="bottom|left|right"
label="Activate"
name="btn_activate"
left="1"
height="23"
top="0"
width="66" />
</layout_panel>
<layout_panel
follows="bottom|left|right"
height="23"
@ -217,7 +236,7 @@ background_visible="true"
name="btn_chat_lp"
user_resize="false"
auto_resize="true"
width="91">
width="67">
<button
follows="bottom|left|right"
label="Chat"
@ -225,7 +244,7 @@ background_visible="true"
left="1"
height="23"
top="0"
width="90" />
width="66" />
</layout_panel>
<layout_panel
@ -236,7 +255,7 @@ background_visible="true"
name="call_btn_lp"
user_resize="false"
auto_resize="true"
width="91">
width="77">
<button
follows="bottom|left|right"
left="1"
@ -246,7 +265,7 @@ background_visible="true"
layout="topleft"
tool_tip="Call this group"
top="0"
width="90" />
width="76" />
</layout_panel>
<layout_panel
@ -257,7 +276,7 @@ background_visible="true"
name="btn_apply_lp"
user_resize="false"
auto_resize="true"
width="91">
width="57">
<button
follows="bottom|left|right"
height="23"
@ -266,7 +285,7 @@ background_visible="true"
name="btn_apply"
left="1"
top="0"
width="90" />
width="56" />
</layout_panel>
</layout_stack>

View File

@ -268,7 +268,25 @@ background_visible="true"
orientation="horizontal"
top_delta="0"
width="279">
<layout_panel
follows="bottom|left|right"
height="23"
layout="bottomleft"
left_pad="3"
name="btn_activate_lp"
auto_resize="true"
width="72">
<button
follows="bottom|left|right"
label="Activate"
name="btn_activate"
left="1"
height="23"
top="0"
width="71" />
</layout_panel>
<layout_panel
follows="bottom|left|right"
height="23"
@ -276,7 +294,7 @@ background_visible="true"
left_pad="3"
name="btn_chat_lp"
auto_resize="true"
width="83">
width="72">
<button
follows="bottom|left|right"
label="Chat"
@ -284,7 +302,7 @@ background_visible="true"
left="1"
height="23"
top="0"
width="82" />
width="71" />
</layout_panel>
<layout_panel
@ -294,7 +312,7 @@ background_visible="true"
left_pad="3"
name="call_btn_lp"
auto_resize="true"
width="113">
width="72">
<button
follows="bottom|left|right"
left="1"
@ -304,7 +322,7 @@ background_visible="true"
layout="topleft"
tool_tip="Call this group"
top="0"
width="112" />
width="71" />
</layout_panel>
<layout_panel
@ -314,7 +332,7 @@ background_visible="true"
left_pad="3"
name="btn_apply_lp"
auto_resize="true"
width="83">
width="72">
<button
follows="bottom|left|right"
height="23"
@ -323,7 +341,7 @@ background_visible="true"
name="btn_apply"
left="1"
top="0"
width="82" />
width="71" />
</layout_panel>
</layout_stack>
<!--<button

View File

@ -43,6 +43,9 @@
<layout_stack name="layout">
<layout_panel name="button_row">
<layout_stack name="button_row_ls">
<layout_panel name="btn_activate_lp">
<button label="Aktywuj" name="btn_activate" />
</layout_panel>
<layout_panel name="btn_chat_lp">
<button label="Czat" name="btn_chat"/>
</layout_panel>

View File

@ -39,7 +39,7 @@
<button label="Чат" name="btn_chat"/>
</layout_panel>
<layout_panel name="call_btn_lp">
<button label="Звонок группе" name="btn_call" tool_tip="Звонок этой группе"/>
<button label="Звонок" name="btn_call" tool_tip="Звонок этой группе"/>
</layout_panel>
<layout_panel name="btn_apply_lp">
<button label="Сохранить" label_selected="Сохранить" name="btn_apply"/>

View File

@ -268,7 +268,25 @@ background_visible="true"
orientation="horizontal"
top_delta="0"
width="279">
<layout_panel
follows="bottom|left|right"
height="23"
layout="bottomleft"
left_pad="3"
name="btn_activate_lp"
auto_resize="true"
width="72">
<button
follows="bottom|left|right"
label="Activate"
name="btn_activate"
left="1"
height="23"
top="0"
width="71" />
</layout_panel>
<layout_panel
follows="bottom|left|right"
height="23"
@ -276,7 +294,7 @@ background_visible="true"
left_pad="3"
name="btn_chat_lp"
auto_resize="true"
width="83">
width="72">
<button
follows="bottom|left|right"
label="Chat"
@ -284,7 +302,7 @@ background_visible="true"
left="1"
height="23"
top="0"
width="82" />
width="71" />
</layout_panel>
<layout_panel
@ -294,7 +312,7 @@ background_visible="true"
left_pad="3"
name="call_btn_lp"
auto_resize="true"
width="113">
width="72">
<button
follows="bottom|left|right"
left="1"
@ -304,7 +322,7 @@ background_visible="true"
layout="topleft"
tool_tip="Call this group"
top="0"
width="112" />
width="71" />
</layout_panel>
<layout_panel
@ -314,7 +332,7 @@ background_visible="true"
left_pad="3"
name="btn_apply_lp"
auto_resize="true"
width="83">
width="72">
<button
follows="bottom|left|right"
height="23"
@ -323,7 +341,7 @@ background_visible="true"
name="btn_apply"
left="1"
top="0"
width="82" />
width="71" />
</layout_panel>
</layout_stack>
<!--<button

View File

@ -43,6 +43,9 @@
<layout_stack name="layout">
<layout_panel name="button_row">
<layout_stack name="button_row_ls">
<layout_panel name="btn_activate_lp">
<button label="Aktywuj" name="btn_activate" />
</layout_panel>
<layout_panel name="btn_chat_lp">
<button label="Czat" name="btn_chat"/>
</layout_panel>

View File

@ -209,6 +209,25 @@ background_visible="true"
orientation="horizontal"
top_delta="2"
width="445">
<layout_panel
follows="bottom|left|right"
height="23"
layout="bottomleft"
left_pad="3"
name="btn_activate_lp"
user_resize="false"
auto_resize="true"
width="67">
<button
follows="bottom|left|right"
label="Activate"
name="btn_activate"
left="1"
height="23"
top="0"
width="66" />
</layout_panel>
<layout_panel
follows="bottom|left|right"
height="23"
@ -217,7 +236,7 @@ background_visible="true"
name="btn_chat_lp"
user_resize="false"
auto_resize="true"
width="91">
width="67">
<button
follows="bottom|left|right"
label="Chat"
@ -225,7 +244,7 @@ background_visible="true"
left="1"
height="23"
top="0"
width="90" />
width="66" />
</layout_panel>
<layout_panel
@ -236,7 +255,7 @@ background_visible="true"
name="call_btn_lp"
user_resize="false"
auto_resize="true"
width="91">
width="67">
<button
follows="bottom|left|right"
left="1"
@ -246,7 +265,7 @@ background_visible="true"
layout="topleft"
tool_tip="Call this group"
top="0"
width="90" />
width="66" />
</layout_panel>
<layout_panel
@ -257,7 +276,7 @@ background_visible="true"
name="btn_apply_lp"
user_resize="false"
auto_resize="true"
width="91">
width="67">
<button
follows="bottom|left|right"
height="23"
@ -266,7 +285,7 @@ background_visible="true"
name="btn_apply"
left="1"
top="0"
width="90" />
width="66" />
</layout_panel>
</layout_stack>