diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llpanelavatar.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llpanelpeople.cpp | 32 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_notes.xml | 1 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_people.xml | 210 |
4 files changed, 93 insertions, 154 deletions
diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index 6413d939f0..3b54f1546e 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -255,7 +255,7 @@ void LLPanelAvatarNotes::onTeleportButtonClick() void LLPanelAvatarNotes::onCallButtonClick() { - //*TODO not implemented. + LLAvatarActions::startCall(getAvatarId()); } void LLPanelAvatarNotes::onShareButtonClick() @@ -544,7 +544,7 @@ void LLPanelAvatarProfile::onTeleportButtonClick() void LLPanelAvatarProfile::onCallButtonClick() { - //*TODO not implemented + LLAvatarActions::startCall(getAvatarId()); } void LLPanelAvatarProfile::onShareButtonClick() diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index bb6cdd2f78..0c66e7155c 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -588,14 +588,9 @@ void LLPanelPeople::updateRecentList() void LLPanelPeople::buttonSetVisible(std::string btn_name, BOOL visible) { - // Currently all bottom buttons are wrapped with layout panels. - // Hiding a button has no effect: the panel still occupies its space. - // So we have to hide the whole panel (along with its button) - // to free some space up. - LLButton* btn = getChild<LLView>("button_bar")->getChild<LLButton>(btn_name); - LLPanel* btn_parent = dynamic_cast<LLPanel*>(btn->getParent()); - if (btn_parent) - btn_parent->setVisible(visible); + // To make sure we're referencing the right widget (a child of the button bar). + LLButton* button = getChild<LLView>("button_bar")->getChild<LLButton>(btn_name); + button->setVisible(visible); } void LLPanelPeople::buttonSetEnabled(const std::string& btn_name, bool enabled) @@ -624,14 +619,16 @@ void LLPanelPeople::updateButtons() std::vector<LLUUID> selected_uuids; getCurrentItemIDs(selected_uuids); bool item_selected = (selected_uuids.size() == 1); + bool multiple_selected = (selected_uuids.size() >= 1); buttonSetVisible("group_info_btn", group_tab_active); buttonSetVisible("chat_btn", group_tab_active); buttonSetVisible("add_friend_btn", nearby_tab_active || recent_tab_active); buttonSetVisible("view_profile_btn", !group_tab_active); buttonSetVisible("im_btn", !group_tab_active); + buttonSetVisible("call_btn", !group_tab_active); buttonSetVisible("teleport_btn", friends_tab_active); - buttonSetVisible("share_btn", !recent_tab_active && false); // not implemented yet + buttonSetVisible("share_btn", nearby_tab_active || friends_tab_active); if (group_tab_active) { @@ -664,8 +661,8 @@ void LLPanelPeople::updateButtons() buttonSetEnabled("teleport_btn", friends_tab_active && item_selected); buttonSetEnabled("view_profile_btn", item_selected); - buttonSetEnabled("im_btn", (selected_uuids.size() >= 1)); // allow starting the friends conference for multiple selection - buttonSetEnabled("call_btn", item_selected && false); // not implemented yet + buttonSetEnabled("im_btn", multiple_selected); // allow starting the friends conference for multiple selection + buttonSetEnabled("call_btn", item_selected); buttonSetEnabled("share_btn", item_selected && false); // not implemented yet bool none_group_selected = item_selected && selected_id.isNull(); @@ -1071,7 +1068,18 @@ bool LLPanelPeople::onRecentViewSortMenuItemCheck(const LLSD& userdata) void LLPanelPeople::onCallButtonClicked() { - // *TODO: not implemented yet + std::vector<LLUUID> selected_uuids; + getCurrentItemIDs(selected_uuids); + + if (selected_uuids.size() == 1) + { + // initiate a P2P voice chat with the selected user + LLAvatarActions::startCall(getCurrentItemID()); + } + else if (selected_uuids.size() > 1) + { + // *NOTE: ad-hoc voice chat not implemented yet + } } void LLPanelPeople::onTeleportButtonClicked() diff --git a/indra/newview/skins/default/xui/en/panel_notes.xml b/indra/newview/skins/default/xui/en/panel_notes.xml index b9c9100ebc..c02dabed2c 100644 --- a/indra/newview/skins/default/xui/en/panel_notes.xml +++ b/indra/newview/skins/default/xui/en/panel_notes.xml @@ -132,7 +132,6 @@ left_pad="5" width="40" /> <button - enabled="false" follows="bottom|left" height="19" label="Call" diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml index d6e2aa64fa..15fdd73bdc 100644 --- a/indra/newview/skins/default/xui/en/panel_people.xml +++ b/indra/newview/skins/default/xui/en/panel_people.xml @@ -329,156 +329,88 @@ background_visible="true" </panel> </panel> </tab_container> - <layout_stack - animate="false" - border_size="0" - follows="left|right|bottom" + <panel + follows="bottom|left" height="25" layout="topleft" left="10" name="button_bar" - orientation="horizontal" width="313"> - <layout_panel - default_tab_group="1" - follows="left|top" - height="25" - layout="topleft" + <button + follows="bottom|left" + font="SansSerifSmall" + top="4" left="0" - name="view_profile_btn_panel" - top="-25" - width="100"> - <button - follows="top|left" - font="SansSerifSmall" - height="19" - label="Profile" - layout="topleft" - name="view_profile_btn" - tool_tip="Show picture, groups, and other residents information" - width="100" /> - </layout_panel> - <layout_panel - default_tab_group="1" - follows="left|top" height="19" + label="Profile" layout="topleft" - left="0" - min_width="80" - name="group_info_btn_panel" - width="100"> - <button - follows="top|left" - font="SansSerifSmall" - height="19" - label="Group Profile" - layout="topleft" - name="group_info_btn" - tool_tip="Show group information" - width="100" /> - </layout_panel> - <layout_panel - default_tab_group="1" - follows="left|top" - height="25" - layout="topleft" - left_pad="5" - min_width="45" - name="chat_btn_panel" - top_delta="0" - width="100"> - <button - follows="top|left" - font="SansSerifSmall" - height="19" - label="Group Chat" - layout="topleft" - name="chat_btn" - tool_tip="Open chat session" - width="100" /> - </layout_panel> - <layout_panel - default_tab_group="1" - follows="left|top|" - height="25" + name="view_profile_btn" + tool_tip="Show picture, groups, and other residents information" + width="70" /> + <button + follows="bottom|left" + font="SansSerifSmall" + top="4" + left_pad="2" + height="19" + label="IM" layout="topleft" - left_pad="5" - min_width="35" - name="im_btn_panel" - top_delta="0" - width="50"> - <button - follows="top|left" - font="SansSerifSmall" - height="19" - label="IM" - layout="topleft" - name="im_btn" - tool_tip="Open instant message session" - width="50" /> - </layout_panel> - <layout_panel - default_tab_group="1" - follows="left|top|right" - height="25" + name="im_btn" + tool_tip="Open instant message session" + width="45" /> + <button + follows="bottom|left" + font="SansSerifSmall" + top="4" + left_pad="2" + height="19" + label="Call" layout="topleft" - left_pad="5" - min_width="40" - name="call_btn_panel" - top_delta="0" - visible="false" - width="40"> - <button - enabled="false" - follows="top|left" - font="SansSerifSmall" - height="19" - label="Call" - layout="topleft" - name="call_btn" - width="50" /> - </layout_panel> - <layout_panel - default_tab_group="1" + name="call_btn" + tool_tip="Call this resident" + width="50" /> + <button follows="left|top" - height="25" + font="SansSerifSmall" + top="4" + left_pad="2" + height="19" + label="Share" layout="topleft" - left_pad="5" - min_width="65" - name="teleport_btn_panel" - top_delta="0" - width="100"> - <button - follows="left|top" - font="SansSerifSmall" - height="19" - label="Teleport" - layout="topleft" - name="teleport_btn" - tool_tip="Offer teleport" - width="100" /> - </layout_panel> - <layout_panel - default_tab_group="1" - enabled="false" - follows="left|top" - height="25" + name="share_btn" + width="60" /> + <button + follows="bottom|left" + font="SansSerifSmall" + top="4" + left_pad="2" + height="19" + label="Teleport" layout="topleft" - left_pad="5" - min_width="50" - name="share_btn_panel" - top_delta="0" - visible="false" - width="80"> - <button - enabled="false" - follows="top|left" - font="SansSerifSmall" - height="19" - label="Share" - layout="topleft" - name="share_btn" - width="80" /> - </layout_panel> - </layout_stack> + name="teleport_btn" + tool_tip="Offer teleport" + width="75" /> + <button + follows="bottom|left" + font="SansSerifSmall" + top="4" + left="0" + height="19" + label="Group Profile" + layout="topleft" + name="group_info_btn" + tool_tip="Show group information" + width="110" /> + <button + follows="bottom|left" + font="SansSerifSmall" + top="4" + left_pad="2" + height="19" + label="Group Chat" + layout="topleft" + name="chat_btn" + tool_tip="Open chat session" + width="110" /> + </panel> </panel> |