summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorSeth ProductEngine <slitovchuk@productengine.com>2012-06-14 17:37:16 +0300
committerSeth ProductEngine <slitovchuk@productengine.com>2012-06-14 17:37:16 +0300
commitd34746b596bad717f7d0c10e263700738a06aa43 (patch)
tree7f8b7ec6a3308be01cada228a6b95c5805b0eac1 /indra
parent569146f27c7350ca2245f1fa7bc4cb9c16a428ea (diff)
CHUI-144 FIXED Residents picker added to Conversations panel + button.
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llimfloatercontainer.cpp26
-rw-r--r--indra/newview/llimfloatercontainer.h3
2 files changed, 29 insertions, 0 deletions
diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp
index 3b6240de44..71b69dfbc8 100644
--- a/indra/newview/llimfloatercontainer.cpp
+++ b/indra/newview/llimfloatercontainer.cpp
@@ -34,8 +34,10 @@
#include "llnearbychat.h"
#include "llagent.h"
+#include "llavataractions.h"
#include "llavatariconctrl.h"
#include "llgroupiconctrl.h"
+#include "llfloateravatarpicker.h"
#include "llimview.h"
#include "lltransientfloatermgr.h"
#include "llviewercontrol.h"
@@ -75,6 +77,8 @@ BOOL LLIMFloaterContainer::postBuild()
mExpandCollapseBtn = getChild<LLButton>("expand_collapse_btn");
mExpandCollapseBtn->setClickedCallback(boost::bind(&LLIMFloaterContainer::onExpandCollapseButtonClicked, this));
+ childSetAction("add_btn", boost::bind(&LLIMFloaterContainer::onAddButtonClicked, this));
+
collapseMessagesPane(gSavedPerAccountSettings.getBOOL("ConversationsMessagePaneCollapsed"));
collapseConversationsPane(gSavedPerAccountSettings.getBOOL("ConversationsListPaneCollapsed"));
@@ -313,4 +317,26 @@ void LLIMFloaterContainer::updateState(bool collapse, S32 delta_width)
setCanMinimize(is_left_pane_expanded || is_right_pane_expanded);
}
+void LLIMFloaterContainer::onAddButtonClicked()
+{
+ LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLIMFloaterContainer::onAvatarPicked, this, _1), TRUE, TRUE);
+ LLFloater* root_floater = gFloaterView->getParentFloater(this);
+ if (picker && root_floater)
+ {
+ root_floater->addDependentFloater(picker);
+ }
+}
+
+void LLIMFloaterContainer::onAvatarPicked(const uuid_vec_t& ids)
+{
+ if (ids.size() == 1)
+ {
+ LLAvatarActions::startIM(ids.back());
+ }
+ else
+ {
+ LLAvatarActions::startConference(ids);
+ }
+}
+
// EOF
diff --git a/indra/newview/llimfloatercontainer.h b/indra/newview/llimfloatercontainer.h
index 92938ff405..7b395fb18f 100644
--- a/indra/newview/llimfloatercontainer.h
+++ b/indra/newview/llimfloatercontainer.h
@@ -80,6 +80,9 @@ private:
void updateState(bool collapse, S32 delta_width);
+ void onAddButtonClicked();
+ void onAvatarPicked(const uuid_vec_t& ids);
+
LLButton* mExpandCollapseBtn;
LLLayoutPanel* mMessagesPane;
LLLayoutPanel* mConversationsPane;