FIRE-12507: Preserve control panel space in the im floater:

* Tweak the layout of the control panel to make use of the full width of the floater
* Shift Send Info and Show Version controls around, rename ‘Show Viewer Type’ to ‘Show Version’
* Combine Offer TP and Request TP into one togglable menu
Cinders 2013-12-15 14:04:59 -07:00
parent 6d3be76c8c
commit cb8972b35e
8 changed files with 89 additions and 93 deletions

View File

@ -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<LLButton>("teleport_btn")->setEnabled(LLAvatarTracker::instance().isBuddyOnline(mOtherParticipantUUID));
getChild<LLButton>("request_tp_btn")->setEnabled(LLAvatarTracker::instance().isBuddyOnline(mOtherParticipantUUID));
}
}
@ -697,12 +698,6 @@ BOOL FSFloaterIM::postBuild()
button = getChild<LLButton>("share_btn");
button->setClickedCallback(boost::bind(&FSFloaterIM::onShareButtonClicked, this));
button = getChild<LLButton>("teleport_btn");
button->setClickedCallback(boost::bind(&FSFloaterIM::onTeleportButtonClicked, this));
button = getChild<LLButton>("request_tp_btn");
button->setClickedCallback(boost::bind(&FSFloaterIM::onRequestTeleportButtonClicked, this));
button = getChild<LLButton>("pay_btn");
button->setClickedCallback(boost::bind(&FSFloaterIM::onPayButtonClicked, this));
@ -744,7 +739,6 @@ BOOL FSFloaterIM::postBuild()
{
llinfos << "LLAvatarActions::isFriend - tp button" << llendl;
getChild<LLButton>("teleport_btn")->setEnabled(LLAvatarTracker::instance().isBuddyOnline(mOtherParticipantUUID));
getChild<LLButton>("request_tp_btn")->setEnabled(LLAvatarTracker::instance().isBuddyOnline(mOtherParticipantUUID));
}
// support sysinfo button -Zi
@ -763,7 +757,6 @@ BOOL FSFloaterIM::postBuild()
getChild<LLLayoutPanel>("profile_panel")->setVisible(false);
getChild<LLLayoutPanel>("friend_panel")->setVisible(false);
getChild<LLLayoutPanel>("tp_panel")->setVisible(false);
getChild<LLLayoutPanel>("request_tp_panel")->setVisible(false);
getChild<LLLayoutPanel>("share_panel")->setVisible(false);
getChild<LLLayoutPanel>("pay_panel")->setVisible(false);
getChild<LLLayoutPanel>("end_call_btn_panel")->setVisible(false);
@ -780,7 +773,6 @@ BOOL FSFloaterIM::postBuild()
getChild<LLLayoutPanel>("gprofile_panel")->setVisible(false);
getChild<LLLayoutPanel>("friend_panel")->setVisible(false);
getChild<LLLayoutPanel>("tp_panel")->setVisible(false);
getChild<LLLayoutPanel>("request_tp_panel")->setVisible(false);
getChild<LLLayoutPanel>("share_panel")->setVisible(false);
getChild<LLLayoutPanel>("pay_panel")->setVisible(false);
getChild<LLLayoutPanel>("end_call_btn_panel")->setVisible(false);
@ -832,19 +824,19 @@ BOOL FSFloaterIM::postBuild()
LLCheckBoxCtrl* FSPrefixBox = getChild<LLCheckBoxCtrl>("FSSupportGroupChatPrefix_toggle");
BOOL isFSSupportGroup=FSData::getInstance()->isSupportGroup(mSessionID);
BOOL isFSSupportGroup = FSData::getInstance()->isSupportGroup(mSessionID);
FSPrefixBox->setVisible(isFSSupportGroup);
// <FS:Zi> 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));
}
}
// </FS:Zi> Viewer version popup

View File

@ -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();

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

@ -918,7 +918,7 @@ with the same filename but different name
<texture name="call_icon_24x24" file_name="icons/call_icon_24x24.png" preload="false" />
<texture name="call_end_icon_24x24" file_name="icons/call_end_icon_24x24.png" preload="false" />
<texture name="teleport_icon_24x24" file_name="icons/genie_icon_24x24.png" preload="false" />
<texture name="request_tp_icon" file_name="icons/request_tp_icon_24x24.png" preload="false" />
<texture name="teleport_menu" file_name="icons/teleport_menu.png" preload="false" />
<texture name="friends_icon_24x24" file_name="icons/Friends_Icon_24x24.png" preload="false" />
<texture name="gift_icon_24x24" file_name="icons/gift_icon_24x24.png" preload="false" />
<texture name="avatar_in_region" file_name="green_dot.tga" preload="false" />

View File

@ -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">
<button
follows="left|top"
top="0"
<menu_button
menu_filename="menu_fs_im_teleport.xml"
follows="top|left"
height="20"
left_delta="5"
image_overlay="teleport_icon_24x24"
image_overlay="teleport_menu"
image_pressed="PushButton_Press"
image_pressed_selected="PushButton_Selected_Press"
image_selected="PushButton_Selected_Press"
tool_tip="Summon / Teleport this resident"
layout="topleft"
left_delta="5"
name="teleport_btn"
width="24" />
tool_tip="Offer or request a teleport"
top="0"
width="31" />
</layout_panel>
<layout_panel
name="request_tp_panel"
auto_resize="false"
user_resize="false"
top="0"
layout="topleft"
height="24"
width="27"
follows="left|top">
<button
follows="left|top"
top="0"
height="20"
left_delta="5"
image_overlay="request_tp_icon"
image_pressed="PushButton_Press"
image_pressed_selected="PushButton_Selected_Press"
image_selected="PushButton_Selected_Press"
tool_tip="Request a teleport from this resident"
name="request_tp_btn"
width="24" />
</layout_panel>
<layout_panel
name="share_panel"
@ -280,7 +259,7 @@
<button
follows="left|top"
height="20"
left_delta="10"
left_delta="5"
image_pressed="PushButton_Press"
image_pressed_selected="PushButton_Selected_Press"
image_selected="PushButton_Selected_Press"
@ -313,39 +292,45 @@
top="0"
width="25" />
</layout_panel>
<layout_panel
name="send_sysinfo_btn_panel"
auto_resize="false"
user_resize="false"
top="0"
layout="topleft"
height="24"
width="27"
follows="left|top">
<button
follows="left|top"
height="20"
left_delta="5"
image_pressed="Info_Press"
image_pressed_selected="PushButton_Selected_Press"
image_selected="PushButton_Selected_Press"
tool_tip="Send system info"
image_overlay="Info_Off"
name="send_sysinfo_btn"
top="0"
width="25" />
</layout_panel>
</layout_stack>
<!-- Checkbox for FS prefix on support groups -->
<check_box
visible="true"
control_name="FSSupportGroupChatPrefix2"
follows="left|top"
height="18"
label="Specify viewer type"
layout="topleft"
top_delta="4"
left_pad="1"
name="FSSupportGroupChatPrefix_toggle"
tab_group="5"
tool_tip="Adds your current viewer version and skin information to the front of messages sent by you to this group which will assist support staff in correctly diagnosing your issues and improve accuracy in answering your questions"
width="150" />
control_name="FSSupportGroupChatPrefix2"
follows="right|top"
height="18"
label="Specify version"
layout="topleft"
top_delta="9"
left_delta="246"
name="FSSupportGroupChatPrefix_toggle"
tool_tip="Adds your current viewer version and skin information to the front of messages sent by you to this group which will assist support staff in correctly diagnosing your issues and improve accuracy in answering your questions"
width="135" />
<!-- END: FS Prefix -->
<!--button for sending sys info-->
<button
follows="right|top"
height="20"
image_pressed="Info_Press"
image_pressed_selected="PushButton_Selected_Press"
image_selected="PushButton_Selected_Press"
tool_tip="Send System Info"
image_overlay="Info_Off"
name="send_sysinfo_btn"
left_delta="0"
right="-35"
tab_group="5"
width="24" />
<!--End sys info button-->
<layout_stack
animate="false"
follows="all"

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<toggleable_menu
name="menu_teleport"
left="0" bottom="0" visible="false"
mouse_opaque="false">
<menu_item_call
label="Offer teleport"
name="offer_tp">
<menu_item_call.on_click
function="IMSession.Menu.Action"
parameter="offer_tp"/>
</menu_item_call>
<menu_item_call
label="Request teleport"
name="request_tp">
<menu_item_call.on_click
function="IMSession.Menu.Action"
parameter="request_tp"/>
</menu_item_call>
</toggleable_menu>