summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterimsessiontab.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2012-11-21 18:15:24 -0800
committerMerov Linden <merov@lindenlab.com>2012-11-21 18:15:24 -0800
commit7ca2508cc2adcdc5201bd53e814246e156bc6013 (patch)
treee850a6bf72fd34dbca490ebb4cd7f785b2701960 /indra/newview/llfloaterimsessiontab.cpp
parenta12464b9cbc40d4584d6968db2092a56fa3f4bc6 (diff)
CHUI-429 : Completed this though it still doesn't work on Nearby Chat.
Diffstat (limited to 'indra/newview/llfloaterimsessiontab.cpp')
-rw-r--r--indra/newview/llfloaterimsessiontab.cpp26
1 files changed, 15 insertions, 11 deletions
diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index 751b3c9db8..3fb24f52c4 100644
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -71,8 +71,7 @@ LLFloaterIMSessionTab::LLFloaterIMSessionTab(const LLSD& session_id)
boost::bind(&LLFloaterIMSessionTab::onIMShowModesMenuItemEnable, this, _2));
// Right click menu handling
- LLFloaterIMContainer* floater_container = LLFloaterIMContainer::getInstance();
- mEnableCallbackRegistrar.add("Avatar.CheckItem", boost::bind(&LLFloaterIMContainer::checkContextMenuItem, floater_container, _2));
+ mEnableCallbackRegistrar.add("Avatar.CheckItem", boost::bind(&LLFloaterIMSessionTab::checkContextMenuItem, this, _2));
mEnableCallbackRegistrar.add("Avatar.EnableItem", boost::bind(&LLFloaterIMSessionTab::enableContextMenuItem, this, _2));
mCommitCallbackRegistrar.add("Avatar.DoToSelected", boost::bind(&LLFloaterIMSessionTab::doToSelected, this, _2));
}
@@ -774,35 +773,40 @@ bool LLFloaterIMSessionTab::checkIfTornOff()
void LLFloaterIMSessionTab::doToSelected(const LLSD& userdata)
{
// Get the list of selected items in the tab
- // Note: By construction, those can only be participants so we do not check if they are sessions or something else
std::string command = userdata.asString();
uuid_vec_t selected_uuids;
getSelectedUUIDs(selected_uuids);
- llinfos << "Merov debug : doToSelected, command = " << command << ", uuid size = " << selected_uuids.size() << llendl;
-
// Perform the command (IM, profile, etc...) on the list using the general conversation container method
- // *TODO : Move this method to LLAvatarActions
LLFloaterIMContainer* floater_container = LLFloaterIMContainer::getInstance();
+ // Note: By construction, those can only be participants so we can call doToParticipants() directly
floater_container->doToParticipants(command, selected_uuids);
}
bool LLFloaterIMSessionTab::enableContextMenuItem(const LLSD& userdata)
{
// Get the list of selected items in the tab
- // Note: By construction, those can only be participants so we do not check if they are sessions or something else
std::string command = userdata.asString();
uuid_vec_t selected_uuids;
getSelectedUUIDs(selected_uuids);
- llinfos << "Merov debug : enableContextMenuItem, command = " << command << ", uuid size = " << selected_uuids.size() << llendl;
-
- // Perform the command (IM, profile, etc...) on the list using the general conversation container method
- // *TODO : Move this method to LLAvatarActions
+ // Perform the item enable test on the list using the general conversation container method
LLFloaterIMContainer* floater_container = LLFloaterIMContainer::getInstance();
return floater_container->enableContextMenuItem(command, selected_uuids);
}
+bool LLFloaterIMSessionTab::checkContextMenuItem(const LLSD& userdata)
+{
+ // Get the list of selected items in the tab
+ std::string command = userdata.asString();
+ uuid_vec_t selected_uuids;
+ getSelectedUUIDs(selected_uuids);
+
+ // Perform the item check on the list using the general conversation container method
+ LLFloaterIMContainer* floater_container = LLFloaterIMContainer::getInstance();
+ return floater_container->checkContextMenuItem(command, selected_uuids);
+}
+
void LLFloaterIMSessionTab::getSelectedUUIDs(uuid_vec_t& selected_uuids)
{
const std::set<LLFolderViewItem*> selected_items = mConversationsRoot->getSelectionList();