summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llpanelgroup.cpp37
-rw-r--r--indra/newview/llpanelgroup.h4
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml18
3 files changed, 57 insertions, 2 deletions
diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp
index 50f92ef116..daec793d75 100644
--- a/indra/newview/llpanelgroup.cpp
+++ b/indra/newview/llpanelgroup.cpp
@@ -151,6 +151,11 @@ BOOL LLPanelGroup::postBuild()
button->setVisible(true);
button->setEnabled(false);
+ button = getChild<LLButton>("btn_call");
+ button->setClickedCallback(onBtnGroupCallClicked, this);
+
+ button = getChild<LLButton>("btn_chat");
+ button->setClickedCallback(onBtnGroupChatClicked, this);
button = getChild<LLButton>("btn_join");
button->setVisible(false);
@@ -215,6 +220,8 @@ void LLPanelGroup::reposButtons()
reposButton("btn_create");
reposButton("btn_refresh");
reposButton("btn_cancel");
+ reposButton("btn_chat");
+ reposButton("btn_call");
}
void LLPanelGroup::reshape(S32 width, S32 height, BOOL called_from_parent )
@@ -262,6 +269,18 @@ void LLPanelGroup::onBtnApply(void* user_data)
self->apply();
}
+void LLPanelGroup::onBtnGroupCallClicked(void* user_data)
+{
+ LLPanelGroup* self = static_cast<LLPanelGroup*>(user_data);
+ self->callGroup();
+}
+
+void LLPanelGroup::onBtnGroupChatClicked(void* user_data)
+{
+ LLPanelGroup* self = static_cast<LLPanelGroup*>(user_data);
+ self->chatGroup();
+}
+
void LLPanelGroup::onBtnJoin()
{
lldebugs << "joining group: " << mID << llendl;
@@ -349,6 +368,8 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id)
LLButton* button_create = findChild<LLButton>("btn_create");
LLButton* button_join = findChild<LLButton>("btn_join");
LLButton* button_cancel = findChild<LLButton>("btn_cancel");
+ LLButton* button_call = findChild<LLButton>("btn_call");
+ LLButton* button_chat = findChild<LLButton>("btn_chat");
bool is_null_group_id = group_id == LLUUID::null;
@@ -362,6 +383,11 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id)
if(button_cancel)
button_cancel->setVisible(!is_null_group_id);
+ if(button_call)
+ button_call->setVisible(!is_null_group_id);
+ if(button_chat)
+ button_chat->setVisible(!is_null_group_id);
+
getChild<LLUICtrl>("prepend_founded_by")->setVisible(!is_null_group_id);
LLAccordionCtrl* tab_ctrl = findChild<LLAccordionCtrl>("group_accordion");
@@ -431,7 +457,7 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id)
reposButtons();
}
-bool LLPanelGroup::apply(LLPanelGroupTab* tab)
+bool LLPanelGroup::apply(LLPanelGroupTab* tab)
{
if(!tab)
return false;
@@ -499,6 +525,15 @@ void LLPanelGroup::refreshData()
mRefreshTimer.setTimerExpirySec(5);
}
+void LLPanelGroup::callGroup()
+{
+ LLGroupActions::startCall(getID());
+}
+
+void LLPanelGroup::chatGroup()
+{
+ LLGroupActions::startIM(getID());
+}
void LLPanelGroup::showNotice(const std::string& subject,
const std::string& message,
diff --git a/indra/newview/llpanelgroup.h b/indra/newview/llpanelgroup.h
index f6aefdb676..7ea5e67b44 100644
--- a/indra/newview/llpanelgroup.h
+++ b/indra/newview/llpanelgroup.h
@@ -74,6 +74,8 @@ public:
bool apply();
void refreshData();
+ void callGroup();
+ void chatGroup();
virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
@@ -103,6 +105,8 @@ protected:
static void onBtnApply(void*);
static void onBtnRefresh(void*);
+ static void onBtnGroupCallClicked(void*);
+ static void onBtnGroupChatClicked(void*);
void reposButton(const std::string& name);
void reposButtons();
diff --git a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml
index c0db734f8c..8188048821 100644
--- a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml
@@ -216,12 +216,28 @@ background_visible="true"
visible="false"
width="65" />-->
<button
+ follows="bottom|right"
+ label="Group Chat"
+ name="btn_chat"
+ right="-184"
+ left_pad="2"
+ height="22"
+ width="85" />
+ <button
+ follows="bottom|right"
+ label="Group Call"
+ name="btn_call"
+ right="-97"
+ left_pad="2"
+ height="22"
+ width="85" />
+ <button
height="22"
label="Save"
label_selected="Save"
name="btn_apply"
left_pad="10"
right="-10"
- width="100" />
+ width="85" />
</panel>
</panel> \ No newline at end of file