diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/app_settings/settings.xml | 11 | ||||
-rw-r--r-- | indra/newview/llavataractions.cpp | 16 | ||||
-rw-r--r-- | indra/newview/llavataractions.h | 12 | ||||
-rw-r--r-- | indra/newview/llavatarlist.cpp | 17 | ||||
-rw-r--r-- | indra/newview/llavatarlist.h | 5 | ||||
-rw-r--r-- | indra/newview/llavatarlistitem.cpp | 99 | ||||
-rw-r--r-- | indra/newview/llavatarlistitem.h | 28 | ||||
-rw-r--r-- | indra/newview/llcallingcard.h | 2 | ||||
-rw-r--r-- | indra/newview/llpanelpeople.cpp | 30 | ||||
-rw-r--r-- | indra/newview/llpanelpeople.h | 1 | ||||
-rw-r--r-- | indra/newview/llpanelpeoplemenus.cpp | 7 | ||||
-rw-r--r-- | indra/newview/skins/default/textures/textures.xml | 7 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_people_friends_view_sort.xml | 8 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_people_nearby_multiselect.xml | 9 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_avatar_list_item.xml | 48 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_people.xml | 2 |
16 files changed, 261 insertions, 41 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 810b2d9a1d..6710a22a76 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -8834,6 +8834,17 @@ <key>Value</key> <integer>1</integer> </map> + <key>FriendsListShowPermissions</key> + <map> + <key>Comment</key> + <string>Show/hide permission icons in the friend list</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> <key>NearbyListShowIcons</key> <map> <key>Comment</key> diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index eedadb962f..b9ae976e58 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -689,6 +689,7 @@ void LLAvatarActions::toggleBlock(const LLUUID& id) LLMuteList::getInstance()->add(mute); } } + // static bool LLAvatarActions::canOfferTeleport(const LLUUID& id) { @@ -704,6 +705,21 @@ bool LLAvatarActions::canOfferTeleport(const LLUUID& id) return true; } +// static +bool LLAvatarActions::canOfferTeleport(const uuid_vec_t& ids) +{ + bool result = true; + for (uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it) + { + if(!canOfferTeleport(*it)) + { + result = false; + break; + } + } + return result; +} + void LLAvatarActions::inviteToGroup(const LLUUID& id) { LLFloaterGroupPicker* widget = LLFloaterReg::showTypedInstance<LLFloaterGroupPicker>("group_picker", LLSD(id)); diff --git a/indra/newview/llavataractions.h b/indra/newview/llavataractions.h index cd8ac3b653..6313ae0759 100644 --- a/indra/newview/llavataractions.h +++ b/indra/newview/llavataractions.h @@ -171,12 +171,18 @@ public: static void csr(const LLUUID& id, std::string name); /** - * Checks whether can offer teleport to the avatar - * Can't offer only for offline friends + * Checks whether we can offer a teleport to the avatar, only offline friends + * cannot be offered a teleport. + * + * @return false if avatar is a friend and not visibly online */ static bool canOfferTeleport(const LLUUID& id); - + /** + * @return false if any one of the specified avatars a friend and not visibly online + */ + static bool canOfferTeleport(const uuid_vec_t& ids); + private: static bool callbackAddFriend(const LLSD& notification, const LLSD& response); static bool callbackAddFriendWithMessage(const LLSD& notification, const LLSD& response); diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp index 76ad9b4afb..f0ae5f3ba5 100644 --- a/indra/newview/llavatarlist.cpp +++ b/indra/newview/llavatarlist.cpp @@ -90,6 +90,20 @@ void LLAvatarList::setSpeakingIndicatorsVisible(bool visible) } } +void LLAvatarList::showPermissions(bool visible) +{ + // Save the value for new items to use. + mShowPermissions = visible; + + // Enable or disable showing permissions icons for all existing items. + std::vector<LLPanel*> items; + getItems(items); + for(std::vector<LLPanel*>::const_iterator it = items.begin(), end_it = items.end(); it != end_it; ++it) + { + static_cast<LLAvatarListItem*>(*it)->setShowPermissions(mShowPermissions); + } +} + static bool findInsensitive(std::string haystack, const std::string& needle_upper) { LLStringUtil::toUpper(haystack); @@ -107,6 +121,7 @@ LLAvatarList::Params::Params() , show_info_btn("show_info_btn", true) , show_profile_btn("show_profile_btn", true) , show_speaking_indicator("show_speaking_indicator", true) +, show_permissions_granted("show_permissions_granted", false) { } @@ -121,6 +136,7 @@ LLAvatarList::LLAvatarList(const Params& p) , mShowInfoBtn(p.show_info_btn) , mShowProfileBtn(p.show_profile_btn) , mShowSpeakingIndicator(p.show_speaking_indicator) +, mShowPermissions(p.show_permissions_granted) { setCommitOnSelectionChange(true); @@ -377,6 +393,7 @@ void LLAvatarList::addNewItem(const LLUUID& id, const std::string& name, BOOL is item->setShowInfoBtn(mShowInfoBtn); item->setShowProfileBtn(mShowProfileBtn); item->showSpeakingIndicator(mShowSpeakingIndicator); + item->setShowPermissions(mShowPermissions); item->setDoubleClickCallback(boost::bind(&LLAvatarList::onItemDoucleClicked, this, _1, _2, _3, _4)); diff --git a/indra/newview/llavatarlist.h b/indra/newview/llavatarlist.h index 84800842e9..823c586feb 100644 --- a/indra/newview/llavatarlist.h +++ b/indra/newview/llavatarlist.h @@ -54,7 +54,8 @@ public: show_last_interaction_time, // show most recent interaction time. *HACK: move this to a derived class show_info_btn, show_profile_btn, - show_speaking_indicator; + show_speaking_indicator, + show_permissions_granted; Params(); }; @@ -78,6 +79,7 @@ public: void toggleIcons(); void setSpeakingIndicatorsVisible(bool visible); + void showPermissions(bool visible); void sortByName(); void setShowIcons(std::string param_name); bool getIconsVisible() const { return mShowIcons; } @@ -115,6 +117,7 @@ private: bool mShowInfoBtn; bool mShowProfileBtn; bool mShowSpeakingIndicator; + bool mShowPermissions; LLTimer* mLITUpdateTimer; // last interaction time update timer std::string mIconParamName; diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp index 706f20404d..a93c2a0a64 100644 --- a/indra/newview/llavatarlistitem.cpp +++ b/indra/newview/llavatarlistitem.cpp @@ -60,12 +60,17 @@ LLAvatarListItem::LLAvatarListItem(bool not_from_ui_factory/* = true*/) mAvatarIcon(NULL), mAvatarName(NULL), mLastInteractionTime(NULL), + mPermissionOnline(NULL), + mPermissionMap(NULL), + mPermissionEditMine(NULL), + mPermissionEditTheirs(NULL), mSpeakingIndicator(NULL), mInfoBtn(NULL), mProfileBtn(NULL), mOnlineStatus(E_UNKNOWN), mShowInfoBtn(true), - mShowProfileBtn(true) + mShowProfileBtn(true), + mShowPermissions(false) { if (not_from_ui_factory) { @@ -86,7 +91,16 @@ BOOL LLAvatarListItem::postBuild() mAvatarIcon = getChild<LLAvatarIconCtrl>("avatar_icon"); mAvatarName = getChild<LLTextBox>("avatar_name"); mLastInteractionTime = getChild<LLTextBox>("last_interaction"); - + + mPermissionOnline = getChild<LLIconCtrl>("permission_online_icon"); + mPermissionMap = getChild<LLIconCtrl>("permission_map_icon"); + mPermissionEditMine = getChild<LLIconCtrl>("permission_edit_mine_icon"); + mPermissionEditTheirs = getChild<LLIconCtrl>("permission_edit_theirs_icon"); + mPermissionOnline->setVisible(false); + mPermissionMap->setVisible(false); + mPermissionEditMine->setVisible(false); + mPermissionEditTheirs->setVisible(false); + mSpeakingIndicator = getChild<LLOutputMonitorCtrl>("speaking_indicator"); mInfoBtn = getChild<LLButton>("info_btn"); mProfileBtn = getChild<LLButton>("profile_btn"); @@ -125,8 +139,10 @@ void LLAvatarListItem::onMouseEnter(S32 x, S32 y, MASK mask) mInfoBtn->setVisible(mShowInfoBtn); mProfileBtn->setVisible(mShowProfileBtn); + mHovered = true; LLPanel::onMouseEnter(x, y, mask); + showPermissions(mShowPermissions); updateChildren(); } @@ -136,8 +152,10 @@ void LLAvatarListItem::onMouseLeave(S32 x, S32 y, MASK mask) mInfoBtn->setVisible(false); mProfileBtn->setVisible(false); + mHovered = false; LLPanel::onMouseLeave(x, y, mask); + showPermissions(false); updateChildren(); } @@ -146,6 +164,12 @@ void LLAvatarListItem::changed(U32 mask) { // no need to check mAvatarId for null in this case setOnline(LLAvatarTracker::instance().isBuddyOnline(mAvatarId)); + + if (mask & LLFriendObserver::POWERS) + { + showPermissions(mShowPermissions && mHovered); + updateChildren(); + } } void LLAvatarListItem::setOnline(bool online) @@ -230,10 +254,7 @@ void LLAvatarListItem::setAvatarId(const LLUUID& id, const LLUUID& session_id, b void LLAvatarListItem::showLastInteractionTime(bool show) { - if (show) - return; - - mLastInteractionTime->setVisible(false); + mLastInteractionTime->setVisible(show); updateChildren(); } @@ -244,17 +265,11 @@ void LLAvatarListItem::setLastInteractionTime(U32 secs_since) void LLAvatarListItem::setShowInfoBtn(bool show) { - // Already done? Then do nothing. - if(mShowInfoBtn == show) - return; mShowInfoBtn = show; } void LLAvatarListItem::setShowProfileBtn(bool show) { - // Already done? Then do nothing. - if(mShowProfileBtn == show) - return; mShowProfileBtn = show; } @@ -273,7 +288,9 @@ void LLAvatarListItem::setAvatarIconVisible(bool visible) { // Already done? Then do nothing. if (mAvatarIcon->getVisible() == (BOOL)visible) + { return; + } // Show/hide avatar icon. mAvatarIcon->setVisible(visible); @@ -322,7 +339,7 @@ const std::string LLAvatarListItem::getAvatarName() const return mAvatarName->getValue(); } -//== PRIVATE SECITON ========================================================== +//== PRIVATE SECTION ========================================================== void LLAvatarListItem::setNameInternal(const std::string& name, const std::string& highlight) { @@ -432,10 +449,22 @@ void LLAvatarListItem::initChildrenWidths(LLAvatarListItem* avatar_item) //info btn width + padding S32 info_btn_width = avatar_item->mProfileBtn->getRect().mLeft - avatar_item->mInfoBtn->getRect().mLeft; + // edit their objects permission icon width + padding + S32 permission_edit_theirs_width = avatar_item->mInfoBtn->getRect().mLeft - avatar_item->mPermissionEditTheirs->getRect().mLeft; + + // edit my objects permission icon width + padding + S32 permission_edit_mine_width = avatar_item->mPermissionEditTheirs->getRect().mLeft - avatar_item->mPermissionEditMine->getRect().mLeft; + + // map permission icon width + padding + S32 permission_map_width = avatar_item->mPermissionEditMine->getRect().mLeft - avatar_item->mPermissionMap->getRect().mLeft; + + // online permission icon width + padding + S32 permission_online_width = avatar_item->mPermissionMap->getRect().mLeft - avatar_item->mPermissionOnline->getRect().mLeft; + // last interaction time textbox width + padding - S32 last_interaction_time_width = avatar_item->mInfoBtn->getRect().mLeft - avatar_item->mLastInteractionTime->getRect().mLeft; + S32 last_interaction_time_width = avatar_item->mPermissionOnline->getRect().mLeft - avatar_item->mLastInteractionTime->getRect().mLeft; - // icon width + padding + // avatar icon width + padding S32 icon_width = avatar_item->mAvatarName->getRect().mLeft - avatar_item->mAvatarIcon->getRect().mLeft; sLeftPadding = avatar_item->mAvatarIcon->getRect().mLeft; @@ -445,9 +474,14 @@ void LLAvatarListItem::initChildrenWidths(LLAvatarListItem* avatar_item) sChildrenWidths[--index] = icon_width; sChildrenWidths[--index] = 0; // for avatar name we don't need its width, it will be calculated as "left available space" sChildrenWidths[--index] = last_interaction_time_width; + sChildrenWidths[--index] = permission_online_width; + sChildrenWidths[--index] = permission_map_width; + sChildrenWidths[--index] = permission_edit_mine_width; + sChildrenWidths[--index] = permission_edit_theirs_width; sChildrenWidths[--index] = info_btn_width; sChildrenWidths[--index] = profile_btn_width; sChildrenWidths[--index] = speaking_indicator_width; + llassert(index == 0); } void LLAvatarListItem::updateChildren() @@ -526,6 +560,27 @@ void LLAvatarListItem::updateChildren() LL_DEBUGS("AvatarItemReshape") << "name rect after: " << name_view_rect << LL_ENDL; } +bool LLAvatarListItem::showPermissions(bool visible) +{ + const LLRelationship* relation = LLAvatarTracker::instance().getBuddyInfo(getAvatarId()); + if(relation && visible) + { + mPermissionOnline->setVisible(relation->isRightGrantedTo(LLRelationship::GRANT_ONLINE_STATUS)); + mPermissionMap->setVisible(relation->isRightGrantedTo(LLRelationship::GRANT_MAP_LOCATION)); + mPermissionEditMine->setVisible(relation->isRightGrantedTo(LLRelationship::GRANT_MODIFY_OBJECTS)); + mPermissionEditTheirs->setVisible(relation->isRightGrantedFrom(LLRelationship::GRANT_MODIFY_OBJECTS)); + } + else + { + mPermissionOnline->setVisible(false); + mPermissionMap->setVisible(false); + mPermissionEditMine->setVisible(false); + mPermissionEditTheirs->setVisible(false); + } + + return NULL != relation; +} + LLView* LLAvatarListItem::getItemChildView(EAvatarListItemChildIndex child_view_index) { LLView* child_view = mAvatarName; @@ -542,7 +597,19 @@ LLView* LLAvatarListItem::getItemChildView(EAvatarListItemChildIndex child_view_ child_view = mLastInteractionTime; break; case ALIC_SPEAKER_INDICATOR: - child_view = mSpeakingIndicator; + child_view = mSpeakingIndicator; + break; + case ALIC_PERMISSION_ONLINE: + child_view = mPermissionOnline; + break; + case ALIC_PERMISSION_MAP: + child_view = mPermissionMap; + break; + case ALIC_PERMISSION_EDIT_MINE: + child_view = mPermissionEditMine; + break; + case ALIC_PERMISSION_EDIT_THEIRS: + child_view = mPermissionEditTheirs; break; case ALIC_INFO_BUTTON: child_view = mInfoBtn; diff --git a/indra/newview/llavatarlistitem.h b/indra/newview/llavatarlistitem.h index e252e69ea9..e89b85ac8a 100644 --- a/indra/newview/llavatarlistitem.h +++ b/indra/newview/llavatarlistitem.h @@ -36,6 +36,7 @@ #include "llcallingcard.h" // for LLFriendObserver class LLAvatarIconCtrl; +class LLIconCtrl; class LLAvatarListItem : public LLPanel, public LLFriendObserver { @@ -94,6 +95,7 @@ public: void setShowProfileBtn(bool show); void setShowInfoBtn(bool show); void showSpeakingIndicator(bool show); + void setShowPermissions(bool show) { mShowPermissions = show; }; void showLastInteractionTime(bool show); void setAvatarIconVisible(bool visible); @@ -113,6 +115,15 @@ protected: LLAvatarIconCtrl* mAvatarIcon; + /// Indicator for permission to see me online. + LLIconCtrl* mPermissionOnline; + /// Indicator for permission to see my position on the map. + LLIconCtrl* mPermissionMap; + /// Indicator for permission to edit my objects. + LLIconCtrl* mPermissionEditMine; + /// Indicator for permission to edit their objects. + LLIconCtrl* mPermissionEditTheirs; + private: typedef enum e_online_status { @@ -132,6 +143,10 @@ private: ALIC_SPEAKER_INDICATOR, ALIC_PROFILE_BUTTON, ALIC_INFO_BUTTON, + ALIC_PERMISSION_EDIT_THEIRS, + ALIC_PERMISSION_EDIT_MINE, + ALIC_PERMISSION_MAP, + ALIC_PERMISSION_ONLINE, ALIC_INTERACTION_TIME, ALIC_NAME, ALIC_ICON, @@ -159,6 +174,13 @@ private: void updateChildren(); /** + * Update visibility of active permissions icons. + * + * Need to call updateChildren() afterwards to sort out their layout. + */ + bool showPermissions(bool visible); + + /** * Gets child view specified by index. * * This method implemented via switch by all EAvatarListItemChildIndex values. @@ -181,6 +203,12 @@ private: bool mShowInfoBtn; bool mShowProfileBtn; + /// indicates whether to show icons representing permissions granted + bool mShowPermissions; + + /// true when the mouse pointer is hovering over this item + bool mHovered; + static bool sStaticInitialized; // this variable is introduced to improve code readability static S32 sLeftPadding; // padding to first left visible child (icon or name) static S32 sRightNamePadding; // right padding from name to next visible child diff --git a/indra/newview/llcallingcard.h b/indra/newview/llcallingcard.h index 617f8fe27b..15ca51743a 100644 --- a/indra/newview/llcallingcard.h +++ b/indra/newview/llcallingcard.h @@ -45,7 +45,7 @@ class LLFriendObserver public: // This enumeration is a way to refer to what changed in a more // human readable format. You can mask the value provided by - // chaged() to see if the observer is interested in the change. + // changed() to see if the observer is interested in the change. enum { NONE = 0, diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 1c4476ca49..196b26f3f5 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -502,8 +502,10 @@ BOOL LLPanelPeople::postBuild() mAllFriendList = getChild<LLPanel>(FRIENDS_TAB_NAME)->getChild<LLAvatarList>("avatars_all"); mOnlineFriendList->setNoItemsCommentText(getString("no_friends_online")); mOnlineFriendList->setShowIcons("FriendsListShowIcons"); + mOnlineFriendList->showPermissions("FriendsListShowPermissions"); mAllFriendList->setNoItemsCommentText(getString("no_friends")); mAllFriendList->setShowIcons("FriendsListShowIcons"); + mAllFriendList->showPermissions("FriendsListShowPermissions"); mNearbyList = getChild<LLPanel>(NEARBY_TAB_NAME)->getChild<LLAvatarList>("avatar_list"); mNearbyList->setNoItemsCommentText(getString("no_one_near")); @@ -754,12 +756,6 @@ void LLPanelPeople::buttonSetAction(const std::string& btn_name, const commit_si button->setClickedCallback(cb); } -bool LLPanelPeople::isFriendOnline(const LLUUID& id) -{ - uuid_vec_t ids = mOnlineFriendList->getIDs(); - return std::find(ids.begin(), ids.end(), id) != ids.end(); -} - void LLPanelPeople::updateButtons() { std::string cur_tab = getActiveTabName(); @@ -821,11 +817,11 @@ void LLPanelPeople::updateButtons() bool enable_calls = LLVoiceClient::getInstance()->isVoiceWorking() && LLVoiceClient::getInstance()->voiceEnabled(); - buttonSetEnabled("teleport_btn", friends_tab_active && item_selected && isFriendOnline(selected_uuids.front())); - buttonSetEnabled("view_profile_btn", item_selected); - buttonSetEnabled("im_btn", multiple_selected); // allow starting the friends conference for multiple selection - buttonSetEnabled("call_btn", multiple_selected && enable_calls); - buttonSetEnabled("share_btn", item_selected); // not implemented yet + buttonSetEnabled("view_profile_btn",item_selected); + buttonSetEnabled("share_btn", item_selected); + buttonSetEnabled("im_btn", multiple_selected); // allow starting the friends conference for multiple selection + buttonSetEnabled("call_btn", multiple_selected && enable_calls); + buttonSetEnabled("teleport_btn", multiple_selected && LLAvatarActions::canOfferTeleport(selected_uuids)); bool none_group_selected = item_selected && selected_id.isNull(); buttonSetEnabled("group_info_btn", !none_group_selected); @@ -1212,6 +1208,14 @@ void LLPanelPeople::onFriendsViewSortMenuItemClicked(const LLSD& userdata) mAllFriendList->toggleIcons(); mOnlineFriendList->toggleIcons(); } + else if (chosen_item == "view_permissions") + { + bool show_permissions = !gSavedSettings.getBOOL("FriendsListShowPermissions"); + gSavedSettings.setBOOL("FriendsListShowPermissions", show_permissions); + + mAllFriendList->showPermissions(show_permissions); + mOnlineFriendList->showPermissions(show_permissions); + } } void LLPanelPeople::onGroupsViewSortMenuItemClicked(const LLSD& userdata) @@ -1329,7 +1333,9 @@ void LLPanelPeople::onGroupCallButtonClicked() void LLPanelPeople::onTeleportButtonClicked() { - LLAvatarActions::offerTeleport(getCurrentItemID()); + uuid_vec_t selected_uuids; + getCurrentItemIDs(selected_uuids); + LLAvatarActions::offerTeleport(selected_uuids); } void LLPanelPeople::onShareButtonClicked() diff --git a/indra/newview/llpanelpeople.h b/indra/newview/llpanelpeople.h index e931537042..b875ac51a6 100644 --- a/indra/newview/llpanelpeople.h +++ b/indra/newview/llpanelpeople.h @@ -72,7 +72,6 @@ private: void updateNearbyList(); void updateRecentList(); - bool isFriendOnline(const LLUUID& id); bool isItemsFreeOfFriends(const uuid_vec_t& uuids); void updateButtons(); diff --git a/indra/newview/llpanelpeoplemenus.cpp b/indra/newview/llpanelpeoplemenus.cpp index efca3ae1c2..f12c4de2f7 100644 --- a/indra/newview/llpanelpeoplemenus.cpp +++ b/indra/newview/llpanelpeoplemenus.cpp @@ -81,6 +81,7 @@ LLContextMenu* NearbyMenu::createMenu() // registrar.add("Avatar.AddFriend", boost::bind(&LLAvatarActions::requestFriendshipDialog, mUUIDs)); // *TODO: unimplemented registrar.add("Avatar.IM", boost::bind(&LLAvatarActions::startConference, mUUIDs)); registrar.add("Avatar.Call", boost::bind(&LLAvatarActions::startAdhocCall, mUUIDs)); + registrar.add("Avatar.OfferTeleport", boost::bind(&NearbyMenu::offerTeleport, this)); registrar.add("Avatar.RemoveFriend",boost::bind(&LLAvatarActions::removeFriendsDialog, mUUIDs)); // registrar.add("Avatar.Share", boost::bind(&LLAvatarActions::startIM, mUUIDs)); // *TODO: unimplemented // registrar.add("Avatar.Pay", boost::bind(&LLAvatarActions::pay, mUUIDs)); // *TODO: unimplemented @@ -168,8 +169,7 @@ bool NearbyMenu::enableContextMenuItem(const LLSD& userdata) } else if(item == std::string("can_offer_teleport")) { - const LLUUID& id = mUUIDs.front(); - return LLAvatarActions::canOfferTeleport(id); + return LLAvatarActions::canOfferTeleport(mUUIDs); } return false; } @@ -191,8 +191,7 @@ void NearbyMenu::offerTeleport() { // boost::bind cannot recognize overloaded method LLAvatarActions::offerTeleport(), // so we have to use a wrapper. - const LLUUID& id = mUUIDs.front(); - LLAvatarActions::offerTeleport(id); + LLAvatarActions::offerTeleport(mUUIDs); } } // namespace LLPanelPeopleMenus diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 082b37d80b..d2478a8ca5 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -358,11 +358,16 @@ with the same filename but different name <texture name="Pause_Off" file_name="icons/Pause_Off.png" preload="false" /> <texture name="Pause_Over" file_name="icons/Pause_Over.png" preload="false" /> <texture name="Pause_Press" file_name="icons/Pause_Press.png" preload="false" /> + + <texture name="Permission_Visible_Online" file_name="ff_visible_online_button.tga" preload="false" /> + <texture name="Permission_Visible_Map" file_name="ff_visible_map_button.tga" preload="false" /> + <texture name="Permission_Edit_Objects_Mine" file_name="ff_edit_mine_button.tga" preload="false" /> + <texture name="Permission_Edit_Objects_Theirs" file_name="ff_edit_theirs_button.tga" preload="false" /> + <texture name="Play_Off" file_name="icons/Play_Off.png" preload="false" /> <texture name="Play_Over" file_name="icons/Play_Over.png" preload="false" /> <texture name="Play_Press" file_name="icons/Play_Press.png" preload="false" /> - <texture name="ProgressBar" file_name="widgets/ProgressBar.png" preload="true" scale.left="4" scale.top="10" scale.right="48" scale.bottom="2" /> <texture name="ProgressTrack" file_name="widgets/ProgressTrack.png" preload="true" scale.left="4" scale.top="13" scale.right="148" scale.bottom="2" /> diff --git a/indra/newview/skins/default/xui/en/menu_people_friends_view_sort.xml b/indra/newview/skins/default/xui/en/menu_people_friends_view_sort.xml index 92752a0fee..22796f7b68 100644 --- a/indra/newview/skins/default/xui/en/menu_people_friends_view_sort.xml +++ b/indra/newview/skins/default/xui/en/menu_people_friends_view_sort.xml @@ -31,6 +31,14 @@ function="CheckControl" parameter="FriendsListShowIcons" /> </menu_item_check> + <menu_item_check name="view_permissions" label="View Permissions Granted"> + <menu_item_check.on_click + function="People.Friends.ViewSort.Action" + parameter="view_permissions" /> + <menu_item_check.on_check + function="CheckControl" + parameter="FriendsListShowPermissions" /> + </menu_item_check> <menu_item_separator layout="topleft" /> <menu_item_call name="show_blocked_list" label="Show Blocked Residents & Objects"> <menu_item_call.on_click function="SideTray.ShowPanel" parameter="panel_block_list_sidetray" /> diff --git a/indra/newview/skins/default/xui/en/menu_people_nearby_multiselect.xml b/indra/newview/skins/default/xui/en/menu_people_nearby_multiselect.xml index 588342595e..5d58a9d289 100644 --- a/indra/newview/skins/default/xui/en/menu_people_nearby_multiselect.xml +++ b/indra/newview/skins/default/xui/en/menu_people_nearby_multiselect.xml @@ -57,4 +57,13 @@ <on_click function="Avatar.Pay" /> </menu_item_call> + <menu_item_call + label="Offer Teleport" + name="teleport"> + <menu_item_call.on_click + function="Avatar.OfferTeleport"/> + <menu_item_call.on_enable + function="Avatar.EnableItem" + parameter="can_offer_teleport"/> + </menu_item_call> </context_menu> diff --git a/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml b/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml index 876ff9961b..7a8c6d1f2e 100644 --- a/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml @@ -65,11 +65,55 @@ height="15" layout="topleft" left_pad="5" - right="-72" + right="-164" name="last_interaction" text_color="LtGray_50" value="0s" width="35" /> + <icon + height="20" + follows="right" + image_name="Permission_Visible_Online" + layout="topleft" + left_pad="3" + right="-141" + name="permission_online_icon" + tool_tip="This friend can see when you're online" + top="2" + width="20" /> + <icon + height="20" + follows="right" + image_name="Permission_Visible_Map" + layout="topleft" + left_pad="3" + tool_tip="This friend can locate you on the map" + right="-118" + name="permission_map_icon" + top_delta="0" + width="20" /> + <icon + height="20" + follows="right" + image_name="Permission_Edit_Objects_Mine" + layout="topleft" + left_pad="3" + right="-95" + name="permission_edit_mine_icon" + tool_tip="This friend can edit, delete or take your objects" + top_delta="0" + width="20" /> + <icon + height="20" + follows="right" + image_name="Permission_Edit_Objects_Theirs" + layout="topleft" + left_pad="3" + right="-72" + name="permission_edit_theirs_icon" + tool_tip="You can edit this friend's objects" + top_delta="0" + width="20" /> <button follows="right" height="16" @@ -79,7 +123,7 @@ left_pad="3" right="-53" name="info_btn" - top_delta="-2" + top_delta="2" width="16" /> <button follows="right" diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml index 7cd0d5b5f0..12bb4cc8c6 100644 --- a/indra/newview/skins/default/xui/en/panel_people.xml +++ b/indra/newview/skins/default/xui/en/panel_people.xml @@ -192,6 +192,7 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M left="0" multi_select="true" name="avatars_online" + show_permissions_granted="true" top="0" width="307" /> </accordion_tab> @@ -208,6 +209,7 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M left="0" multi_select="true" name="avatars_all" + show_permissions_granted="true" top="0" width="307" /> </accordion_tab> |