diff --git a/indra/newview/fsfloaterim.cpp b/indra/newview/fsfloaterim.cpp index ac3f7adfff..9f0c0d1606 100644 --- a/indra/newview/fsfloaterim.cpp +++ b/indra/newview/fsfloaterim.cpp @@ -133,6 +133,8 @@ FSFloaterIM::FSFloaterIM(const LLUUID& session_id) } } + mCommitCallbackRegistrar.add("IMSession.Menu.Action", boost::bind(&FSFloaterIM::doToSelected, this, _2)); + setOverlapsScreenChannel(true); LLTransientFloaterMgr::getInstance()->addControlView(LLTransientFloaterMgr::IM, this); @@ -452,17 +454,6 @@ void FSFloaterIM::onShareButtonClicked() LLAvatarActions::share(mOtherParticipantUUID); } -void FSFloaterIM::onTeleportButtonClicked() -{ - lldebugs << "FSFloaterIM::onTeleportButtonClicked" << llendl; - LLAvatarActions::offerTeleport(mOtherParticipantUUID); -} - -void FSFloaterIM::onRequestTeleportButtonClicked() -{ - LLAvatarActions::teleportRequest(mOtherParticipantUUID); -} - void FSFloaterIM::onPayButtonClicked() { lldebugs << "FSFloaterIM::onPayButtonClicked" << llendl; @@ -512,6 +503,17 @@ void FSFloaterIM::onHistoryButtonClicked() } } +void FSFloaterIM::doToSelected(const LLSD& userdata) +{ + const std::string command = userdata.asString(); + if (command == "offer_tp") + LLAvatarActions::offerTeleport(mOtherParticipantUUID); + else if (command == "request_tp") + LLAvatarActions::teleportRequest(mOtherParticipantUUID); + else + LL_WARNS("IMFloater") << "Unhandled command '" << command << "'. Ignoring." << LL_ENDL; +} + // support sysinfo button -Zi void FSFloaterIM::onSysinfoButtonClicked() { @@ -525,16 +527,16 @@ void FSFloaterIM::onSysinfoButtonClicked() BOOL FSFloaterIM::onSendSysinfo(const LLSD& notification, const LLSD& response) { - S32 option=LLNotificationsUtil::getSelectedOption(notification,response); + S32 option = LLNotificationsUtil::getSelectedOption(notification,response); - if(option==0) + if (option == 0) { std::string part1 = notification["substitutions"]["Part1"]; std::string part2 = notification["substitutions"]["Part2"]; if (mSessionInitialized) { - LLIMModel::sendMessage(part1, mSessionID,mOtherParticipantUUID,mDialog); - LLIMModel::sendMessage(part2, mSessionID,mOtherParticipantUUID,mDialog); + LLIMModel::sendMessage(part1, mSessionID, mOtherParticipantUUID, mDialog); + LLIMModel::sendMessage(part2, mSessionID, mOtherParticipantUUID, mDialog); } else { @@ -646,7 +648,6 @@ void FSFloaterIM::changed(U32 mask) if(LLAvatarActions::isFriend(mOtherParticipantUUID)) { getChild("teleport_btn")->setEnabled(LLAvatarTracker::instance().isBuddyOnline(mOtherParticipantUUID)); - getChild("request_tp_btn")->setEnabled(LLAvatarTracker::instance().isBuddyOnline(mOtherParticipantUUID)); } } @@ -697,12 +698,6 @@ BOOL FSFloaterIM::postBuild() button = getChild("share_btn"); button->setClickedCallback(boost::bind(&FSFloaterIM::onShareButtonClicked, this)); - button = getChild("teleport_btn"); - button->setClickedCallback(boost::bind(&FSFloaterIM::onTeleportButtonClicked, this)); - - button = getChild("request_tp_btn"); - button->setClickedCallback(boost::bind(&FSFloaterIM::onRequestTeleportButtonClicked, this)); - button = getChild("pay_btn"); button->setClickedCallback(boost::bind(&FSFloaterIM::onPayButtonClicked, this)); @@ -744,7 +739,6 @@ BOOL FSFloaterIM::postBuild() { llinfos << "LLAvatarActions::isFriend - tp button" << llendl; getChild("teleport_btn")->setEnabled(LLAvatarTracker::instance().isBuddyOnline(mOtherParticipantUUID)); - getChild("request_tp_btn")->setEnabled(LLAvatarTracker::instance().isBuddyOnline(mOtherParticipantUUID)); } // support sysinfo button -Zi @@ -763,7 +757,6 @@ BOOL FSFloaterIM::postBuild() getChild("profile_panel")->setVisible(false); getChild("friend_panel")->setVisible(false); getChild("tp_panel")->setVisible(false); - getChild("request_tp_panel")->setVisible(false); getChild("share_panel")->setVisible(false); getChild("pay_panel")->setVisible(false); getChild("end_call_btn_panel")->setVisible(false); @@ -780,7 +773,6 @@ BOOL FSFloaterIM::postBuild() getChild("gprofile_panel")->setVisible(false); getChild("friend_panel")->setVisible(false); getChild("tp_panel")->setVisible(false); - getChild("request_tp_panel")->setVisible(false); getChild("share_panel")->setVisible(false); getChild("pay_panel")->setVisible(false); getChild("end_call_btn_panel")->setVisible(false); @@ -832,19 +824,19 @@ BOOL FSFloaterIM::postBuild() LLCheckBoxCtrl* FSPrefixBox = getChild("FSSupportGroupChatPrefix_toggle"); - BOOL isFSSupportGroup=FSData::getInstance()->isSupportGroup(mSessionID); + BOOL isFSSupportGroup = FSData::getInstance()->isSupportGroup(mSessionID); FSPrefixBox->setVisible(isFSSupportGroup); // Viewer version popup if(isFSSupportGroup) { // check if the dialog was set to ignore - LLNotificationTemplatePtr templatep=LLNotifications::instance().getTemplate("FirstJoinSupportGroup"); + LLNotificationTemplatePtr templatep = LLNotifications::instance().getTemplate("FirstJoinSupportGroup"); if(!templatep.get()->mForm->getIgnored()) { // if not, give the user a choice, whether to enable the version prefix or not LLSD args; - LLNotificationsUtil::add("FirstJoinSupportGroup",args,LLSD(),boost::bind(&FSFloaterIM::enableViewerVersionCallback,this,_1,_2)); + LLNotificationsUtil::add("FirstJoinSupportGroup", args, LLSD(),boost::bind(&FSFloaterIM::enableViewerVersionCallback, this, _1, _2)); } } // Viewer version popup diff --git a/indra/newview/fsfloaterim.h b/indra/newview/fsfloaterim.h index a8db85b387..8e58960f6a 100644 --- a/indra/newview/fsfloaterim.h +++ b/indra/newview/fsfloaterim.h @@ -186,11 +186,10 @@ private: void onViewProfileButtonClicked(); void onAddFriendButtonClicked(); void onShareButtonClicked(); - void onTeleportButtonClicked(); - void onRequestTeleportButtonClicked(); void onPayButtonClicked(); void onGroupInfoButtonClicked(); void onHistoryButtonClicked(); + void doToSelected(const LLSD& userdata); // support sysinfo button -Zi void onSysinfoButtonClicked(); diff --git a/indra/newview/skins/default/textures/icons/Friends_Icon_24x24.png b/indra/newview/skins/default/textures/icons/Friends_Icon_24x24.png index 9c5f5bc6d1..8432ea527a 100644 Binary files a/indra/newview/skins/default/textures/icons/Friends_Icon_24x24.png and b/indra/newview/skins/default/textures/icons/Friends_Icon_24x24.png differ diff --git a/indra/newview/skins/default/textures/icons/request_tp_icon_24x24.png b/indra/newview/skins/default/textures/icons/request_tp_icon_24x24.png deleted file mode 100644 index 793265473b..0000000000 Binary files a/indra/newview/skins/default/textures/icons/request_tp_icon_24x24.png and /dev/null differ diff --git a/indra/newview/skins/default/textures/icons/teleport_menu.png b/indra/newview/skins/default/textures/icons/teleport_menu.png new file mode 100644 index 0000000000..d9527f79a9 Binary files /dev/null and b/indra/newview/skins/default/textures/icons/teleport_menu.png differ diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 4f56310d7a..6233af1588 100755 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -918,7 +918,7 @@ with the same filename but different name - + diff --git a/indra/newview/skins/default/xui/en/floater_fs_im_session.xml b/indra/newview/skins/default/xui/en/floater_fs_im_session.xml index a09019aea1..a47a8d207f 100644 --- a/indra/newview/skins/default/xui/en/floater_fs_im_session.xml +++ b/indra/newview/skins/default/xui/en/floater_fs_im_session.xml @@ -26,7 +26,7 @@ follows="top|left" clip="false" height="27" - width="200" + right="-3" left_pad="0" layout="topleft" orientation="horizontal" @@ -137,44 +137,23 @@ top="0" layout="topleft" height="24" - width="27" + width="33" follows="left|top"> -