summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llchiclet.cpp27
-rw-r--r--indra/newview/llinspectavatar.cpp19
-rw-r--r--indra/newview/skins/default/xui/en/inspect_avatar.xml12
-rw-r--r--indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml15
-rw-r--r--indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml7
-rw-r--r--indra/newview/skins/default/xui/en/panel_bottomtray.xml2
-rw-r--r--indra/newview/skins/default/xui/en/widgets/talk_button.xml37
7 files changed, 72 insertions, 47 deletions
diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp
index bad61101c1..21514b17d9 100644
--- a/indra/newview/llchiclet.cpp
+++ b/indra/newview/llchiclet.cpp
@@ -51,7 +51,7 @@
#include "lltransientfloatermgr.h"
static LLDefaultChildRegistry::Register<LLChicletPanel> t1("chiclet_panel");
-static LLDefaultChildRegistry::Register<LLTalkButton> t2("chiclet_talk");
+static LLDefaultChildRegistry::Register<LLTalkButton> t2("talk_button");
static LLDefaultChildRegistry::Register<LLNotificationChiclet> t3("chiclet_notification");
static LLDefaultChildRegistry::Register<LLIMP2PChiclet> t4("chiclet_im_p2p");
static LLDefaultChildRegistry::Register<LLIMGroupChiclet> t5("chiclet_im_group");
@@ -1257,30 +1257,7 @@ LLTalkButton::Params::Params()
, show_button("show_button")
, monitor("monitor")
{
- // *TODO Vadim: move hardcoded labels (!) and other params to XUI.
- speak_button.name("left");
- speak_button.label("Speak");
- speak_button.label_selected("Speak");
- speak_button.font(LLFontGL::getFontSansSerifSmall());
- speak_button.tab_stop(false);
- speak_button.is_toggle(true);
- speak_button.picture_style(true);
- // Use default button art. JC
- //speak_button.image_selected(LLUI::getUIImage("SegmentedBtn_Left_Selected"));
- //speak_button.image_unselected(LLUI::getUIImage("SegmentedBtn_Left_Off"));
-
- show_button.name("right");
- show_button.label(LLStringUtil::null);
- show_button.rect(LLRect(0, 0, 20, 0));
- show_button.tab_stop(false);
- show_button.is_toggle(true);
- show_button.picture_style(true);
- show_button.image_selected(LLUI::getUIImage("ComboButton_Selected"));
- show_button.image_unselected(LLUI::getUIImage("ComboButton_Off"));
-
- monitor.name("monitor");
- // *TODO: Make this data driven.
- monitor.rect(LLRect(0, 18, 18, 0));
+ // See widgets/talk_button.xml
}
LLTalkButton::LLTalkButton(const Params& p)
diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp
index bfad2b1624..9989a3b473 100644
--- a/indra/newview/llinspectavatar.cpp
+++ b/indra/newview/llinspectavatar.cpp
@@ -188,7 +188,8 @@ LLInspectAvatar::LLInspectAvatar(const LLSD& sd)
{
mCommitCallbackRegistrar.add("InspectAvatar.ViewProfile", boost::bind(&LLInspectAvatar::onClickViewProfile, this));
mCommitCallbackRegistrar.add("InspectAvatar.AddFriend", boost::bind(&LLInspectAvatar::onClickAddFriend, this));
- mCommitCallbackRegistrar.add("InspectAvatar.IM", boost::bind(&LLInspectAvatar::onClickIM, this));
+ mCommitCallbackRegistrar.add("InspectAvatar.IM",
+ boost::bind(&LLInspectAvatar::onClickIM, this));
mCommitCallbackRegistrar.add("InspectAvatar.Teleport", boost::bind(&LLInspectAvatar::onClickTeleport, this));
mCommitCallbackRegistrar.add("InspectAvatar.InviteToGroup", boost::bind(&LLInspectAvatar::onClickInviteToGroup, this));
mCommitCallbackRegistrar.add("InspectAvatar.Pay", boost::bind(&LLInspectAvatar::onClickPay, this));
@@ -306,7 +307,21 @@ void LLInspectAvatar::requestUpdate()
// You can't re-add someone as a friend if they are already your friend
bool is_friend = LLAvatarTracker::instance().getBuddyInfo(mAvatarID) != NULL;
bool is_self = (mAvatarID == gAgentID);
- childSetEnabled("add_friend_btn", !is_friend && !is_self);
+ if (is_self)
+ {
+ getChild<LLUICtrl>("add_friend_btn")->setVisible(false);
+ getChild<LLUICtrl>("im_btn")->setVisible(false);
+ }
+ else if (is_friend)
+ {
+ getChild<LLUICtrl>("add_friend_btn")->setVisible(false);
+ getChild<LLUICtrl>("im_btn")->setVisible(true);
+ }
+ else
+ {
+ getChild<LLUICtrl>("add_friend_btn")->setVisible(true);
+ getChild<LLUICtrl>("im_btn")->setVisible(false);
+ }
// Use an avatar_icon even though the image id will come down with the
// avatar properties because the avatar_icon code maintains a cache of icons
diff --git a/indra/newview/skins/default/xui/en/inspect_avatar.xml b/indra/newview/skins/default/xui/en/inspect_avatar.xml
index 6b13e2f1c7..e2ae81e0b9 100644
--- a/indra/newview/skins/default/xui/en/inspect_avatar.xml
+++ b/indra/newview/skins/default/xui/en/inspect_avatar.xml
@@ -128,6 +128,8 @@
left_delta="110"
tab_stop="false"
width="18" />
+ <!-- Overlapping buttons for default actions
+ llinspectavatar.cpp makes visible the most likely default action -->
<button
follows="bottom|left"
height="23"
@@ -136,6 +138,16 @@
top="246"
name="add_friend_btn"
width="100" />
+ <button
+ follows="bottom|left"
+ height="23"
+ label="IM"
+ left_delta="0"
+ top_delta="0"
+ name="im_btn"
+ width="100"
+ commit_callback.function="InspectAvatar.IM"
+ />
<menu_button
follows="top|left"
height="18"
diff --git a/indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml b/indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml
index 6049476a43..8ee67b9a02 100644
--- a/indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml
+++ b/indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml
@@ -7,7 +7,6 @@
name="Gear Menu">
<menu_item_call
label="View Profile"
- layout="topleft"
enabled="true"
name="view_profile">
<menu_item_call.on_click
@@ -15,49 +14,42 @@
</menu_item_call>
<menu_item_call
label="Add Friend"
- layout="topleft"
name="add_friend">
<menu_item_call.on_click
function="InspectAvatar.AddFriend"/>
</menu_item_call>
<menu_item_call
label="IM"
- layout="topleft"
name="im">
<menu_item_call.on_click
function="InspectAvatar.IM"/>
</menu_item_call>
<menu_item_call
label="Call"
- layout="topleft"
enabled="true"
name="call">
</menu_item_call>
<menu_item_call
label="Teleport"
- layout="topleft"
name="teleport">
<menu_item_call.on_click
function="InspectAvatar.Teleport"/>
</menu_item_call>
<menu_item_call
label="Invite to Group"
- layout="topleft"
name="invite_to_group">
<menu_item_call.on_click
function="InspectAvatar.InviteToGroup"/>
</menu_item_call>
- <menu_item_separator layout="topleft" />
+ <menu_item_separator />
<menu_item_call
label="Block"
- layout="topleft"
name="block">
<menu_item_call.on_click
function="InspectAvatar.Block"/>
</menu_item_call>
<menu_item_call
label="Report"
- layout="topleft"
name="report">
<menu_item_call.on_click
function="InspectAvatar.Report"/>
@@ -88,7 +80,6 @@
</menu_item_call>
<menu_item_call
label="Find On Map"
- layout="topleft"
name="find_on_map">
<menu_item_call.on_click
function="InspectAvatar.FindOnMap"/>
@@ -97,16 +88,14 @@
</menu_item_call>
<menu_item_call
label="Zoom In"
- layout="topleft"
name="zoom_in">
<menu_item_call.on_click
function="InspectAvatar.ZoomIn"/>
</menu_item_call>
<menu_item_call
label="Pay"
- layout="topleft"
name="pay">
<menu_item_call.on_click
function="InspectAvatar.Pay"/>
</menu_item_call>
-</menu> \ No newline at end of file
+</menu>
diff --git a/indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml b/indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml
index 19c2bf3496..ce5ee83f55 100644
--- a/indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml
+++ b/indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml
@@ -7,7 +7,6 @@
name="Gear Menu">
<menu_item_call
label="Stand Up"
- layout="topleft"
enabled="true"
name="stand_up">
<menu_item_call.on_click
@@ -18,7 +17,6 @@
</menu_item_call>
<menu_item_call
label="My Appearance"
- layout="topleft"
name="my_appearance">
<menu_item_call.on_click
function="ShowFloater"
@@ -28,7 +26,6 @@
</menu_item_call>
<menu_item_call
label="My Profile"
- layout="topleft"
enabled="true"
name="my_profile">
<menu_item_call.on_click
@@ -37,7 +34,6 @@
</menu_item_call>
<menu_item_call
label="My Friends"
- layout="topleft"
name="my_friends">
<menu_item_call.on_click
function="Self.Friends"
@@ -45,9 +41,8 @@
</menu_item_call>
<menu_item_call
label="My Groups"
- layout="topleft"
name="my_groups">
<menu_item_call.on_click
function="Self.Groups" />
</menu_item_call>
-</menu> \ No newline at end of file
+</menu>
diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml
index 61bd1d186e..c183749587 100644
--- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml
+++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml
@@ -60,7 +60,7 @@
min_width="96"
name="speak_panel"
user_resize="false">
- <chiclet_talk
+ <talk_button
follows="right"
height="23"
speak_button.tab_stop="true"
diff --git a/indra/newview/skins/default/xui/en/widgets/talk_button.xml b/indra/newview/skins/default/xui/en/widgets/talk_button.xml
new file mode 100644
index 0000000000..725492052c
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/widgets/talk_button.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<!-- Derives from LLUICtrl -->
+<talk_button>
+ <!-- To make speak button look green when selected set:
+ image_selected="SegmentedBtn_Left_Selected"
+ image_unselected="SegmentedBtn_Left_Off"
+ -->
+ <speak_button
+ name="left"
+ label="Speak"
+ label_selected="Speak"
+ font="SansSerifSmall"
+ tab_stop="false"
+ is_toggle="true"
+ picture_style="true"
+ />
+ <show_button
+ name="right"
+ label=""
+ left="0"
+ top="0"
+ right="20"
+ bottom="0"
+ tab_stop="false"
+ is_toggle="true"
+ picture_style="true"
+ image_selected="ComboButton_Selected"
+ image_unselected="ComboButton_Off"
+ />
+ <monitor
+ name="monitor"
+ left="0"
+ top="18"
+ right="18"
+ bottom="0"
+ />
+</talk_button>