From dcbdb1fee553dd3877447b659e35e158fabc0c47 Mon Sep 17 00:00:00 2001 From: Aimee Linden Date: Thu, 22 Jul 2010 17:35:35 +0100 Subject: EXT-1579 FIXED Show icons representing permissions granted in friends list on roll-over. Needs new icon artwork, currently reusing old 1.23 icons. --- indra/newview/app_settings/settings.xml | 11 +++ indra/newview/llavatarlist.cpp | 17 ++++ indra/newview/llavatarlist.h | 5 +- indra/newview/llavatarlistitem.cpp | 99 ++++++++++++++++++---- indra/newview/llavatarlistitem.h | 28 ++++++ indra/newview/llcallingcard.h | 2 +- indra/newview/llpanelpeople.cpp | 10 +++ indra/newview/skins/default/textures/textures.xml | 7 +- .../xui/en/menu_people_friends_view_sort.xml | 8 ++ .../default/xui/en/panel_avatar_list_item.xml | 48 ++++++++++- .../newview/skins/default/xui/en/panel_people.xml | 2 + 11 files changed, 216 insertions(+), 21 deletions(-) (limited to 'indra/newview') 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 @@ Value 1 + FriendsListShowPermissions + + Comment + Show/hide permission icons in the friend list + Persist + 1 + Type + Boolean + Value + 1 + NearbyListShowIcons Comment 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 items; + getItems(items); + for(std::vector::const_iterator it = items.begin(), end_it = items.end(); it != end_it; ++it) + { + static_cast(*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("avatar_icon"); mAvatarName = getChild("avatar_name"); mLastInteractionTime = getChild("last_interaction"); - + + mPermissionOnline = getChild("permission_online_icon"); + mPermissionMap = getChild("permission_map_icon"); + mPermissionEditMine = getChild("permission_edit_mine_icon"); + mPermissionEditTheirs = getChild("permission_edit_theirs_icon"); + mPermissionOnline->setVisible(false); + mPermissionMap->setVisible(false); + mPermissionEditMine->setVisible(false); + mPermissionEditTheirs->setVisible(false); + mSpeakingIndicator = getChild("speaking_indicator"); mInfoBtn = getChild("info_btn"); mProfileBtn = getChild("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, @@ -158,6 +173,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. * @@ -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 bb202c864d..196b26f3f5 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -502,8 +502,10 @@ BOOL LLPanelPeople::postBuild() mAllFriendList = getChild(FRIENDS_TAB_NAME)->getChild("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(NEARBY_TAB_NAME)->getChild("avatar_list"); mNearbyList->setNoItemsCommentText(getString("no_one_near")); @@ -1206,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) 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 + + + + + + - 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" /> + + + + 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" /> + + + + - + + - + - + - + - + - + - + Date: Mon, 6 Sep 2010 22:56:14 +0300 Subject: VWR-22690 FIXED Implemented save/load of bottomtray button order. - Added methods responsible for saving and loading order of buttons to bottomtray. Order is saved after each drag'n'drop to ensure user's customization of bottomtray is not lost because of crash. - Added additional argument to layoutstack movePanel() method which tells it to move panel to the beginning of mPanels vector without requiring a pointer to panel before which it should be inserted. Reviewed by Vadim Savchuk. --- indra/newview/llbottomtray.cpp | 73 ++++++++++++++++++++++++++++++++++++++++++ indra/newview/llbottomtray.h | 5 +++ 2 files changed, 78 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 9869ae6e2d..053c400e74 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -50,10 +50,13 @@ #include "llviewerparcelmgr.h" #include "llviewerwindow.h" +#include "llsdserialize.h" // Distance from mouse down on which drag'n'drop should be started. #define DRAG_START_DISTANCE 3 +static const std::string SORTING_DATA_FILE_NAME = "bottomtray_buttons_order.xml"; + LLDefaultChildRegistry::Register bottomtray_button("bottomtray_button"); // LLBottomtrayButton methods @@ -549,6 +552,8 @@ BOOL LLBottomTray::postBuild() showWellButton(RS_IM_WELL, !LLIMWellWindow::getInstance()->isWindowEmpty()); showWellButton(RS_NOTIFICATION_WELL, !LLNotificationWellWindow::getInstance()->isWindowEmpty()); + loadButtonsOrder(); + LLViewerParcelMgr::getInstance()->addAgentParcelChangedCallback(boost::bind(&update_build_button_enable_state)); return TRUE; @@ -691,6 +696,74 @@ void LLBottomTray::updateButtonsOrdersAfterDnD() ++it2; } } + + saveButtonsOrder(); +} + +void LLBottomTray::saveButtonsOrder() +{ + std::string user_dir = gDirUtilp->getLindenUserDir(); + if (user_dir.empty()) return; + + std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, SORTING_DATA_FILE_NAME); + LLSD settings_llsd; + int i = 0; + const resize_state_vec_t::const_iterator it_end = mButtonsOrder.end(); + // we use numbers as keys for map which is saved in file and contains resize states as its values + for (resize_state_vec_t::const_iterator it = mButtonsOrder.begin(); it != it_end; ++it, i++) + { + std::string str = llformat("%d", i); + settings_llsd[str] = *it; + } + llofstream file; + file.open(filename); + LLSDSerialize::toPrettyXML(settings_llsd, file); +} + +void LLBottomTray::loadButtonsOrder() +{ + // load per-resident sorting information + std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, SORTING_DATA_FILE_NAME); + + LLSD settings_llsd; + llifstream file; + file.open(filename); + if (!file.is_open()) return; + + LLSDSerialize::fromXML(settings_llsd, file); + + + mButtonsOrder.clear(); + mButtonsProcessOrder.clear(); + int i = 0; + // getting button order from file + for (LLSD::map_const_iterator iter = settings_llsd.beginMap(); + iter != settings_llsd.endMap(); ++iter, ++i) + { + std::string str = llformat("%d", i); + EResizeState state = (EResizeState)settings_llsd[str].asInteger(); + mButtonsOrder.push_back(state); + // RS_BUTTON_SPEAK is skipped, because it shouldn't be in mButtonsProcessOrder (it does not hide or shrink). + if (state != RS_BUTTON_SPEAK) + { + mButtonsProcessOrder.push_back(state); + } + } + + // There are other panels in layout stack order of which is not saved. Also, panels order of which is saved, + // are already in layout stack but in wrong order. The most convenient way to place them is moving them + // to front one by one (because in this case we don't have to pass the panel before which we want to insert our + // panel to movePanel()). So panels are moved in order from the end of mButtonsOrder vector(reverse iterator is used). + const resize_state_vec_t::const_reverse_iterator it_end = mButtonsOrder.rend(); + // placing panels in layout stack according to button order which we loaded in previous for + for (resize_state_vec_t::const_reverse_iterator it = mButtonsOrder.rbegin(); it != it_end; ++it, ++i) + { + LLPanel* panel_to_move = *it == RS_BUTTON_SPEAK ? mSpeakPanel : mStateProcessedObjectMap[*it]; + mToolbarStack->movePanel(panel_to_move, NULL, true); // prepend + } + // Nearbychat is not stored in order settings file, but it must be the first of the panels, so moving it + // manually here + mToolbarStack->movePanel(mNearbyChatBar, NULL, true); } void LLBottomTray::onDraggableButtonMouseUp(LLUICtrl* ctrl, S32 x, S32 y, MASK mask) diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h index 6697d6f679..0973445157 100644 --- a/indra/newview/llbottomtray.h +++ b/indra/newview/llbottomtray.h @@ -188,6 +188,11 @@ private: */ void updateButtonsOrdersAfterDnD(); + // saves order of buttons to file on disk + void saveButtonsOrder(); + // reads order of buttons from file on disk + void loadButtonsOrder(); + /** * Updates child controls size and visibility when it is necessary to reduce total width. * -- cgit v1.2.3 From 497d35af488f25061ea6833539cd8e3c05e4a5b2 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Tue, 7 Sep 2010 10:48:06 -0600 Subject: fix for VWR-22813: crash at [1] LLImageBase::allocateData(int) [secondlife-bin llimage.cpp] --- indra/newview/llviewerwindow.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 13db913f60..fbd21d5fe6 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -3901,7 +3901,14 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei image_buffer_x = llfloor(snapshot_width*scale_factor) ; image_buffer_y = llfloor(snapshot_height *scale_factor) ; } - raw->resize(image_buffer_x, image_buffer_y, 3); + if(image_buffer_x > 0 && image_buffer_y > 0) + { + raw->resize(image_buffer_x, image_buffer_y, 3); + } + else + { + return FALSE ; + } if(raw->isBufferInvalid()) { return FALSE ; -- cgit v1.2.3 From eb10840623b6f0386a7990ee946cfa5879094fb3 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Tue, 7 Sep 2010 18:16:46 +0100 Subject: Fix some build errors. --- indra/newview/llbottomtray.cpp | 3 ++- indra/newview/llbottomtray.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 053c400e74..f3ade83d00 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -655,7 +655,8 @@ void LLBottomTray::updateButtonsOrdersAfterDnD() // Speak button is currently the only draggable button not in mStateProcessedObjectMap, // so if dragged_state is not found in that map, it should be RS_BUTTON_SPEAK. Change this code if any other // exclusions from mStateProcessedObjectMap will become draggable. - EResizeState dragged_state = RS_BUTTON_SPEAK, landing_state; + EResizeState dragged_state = RS_BUTTON_SPEAK; + EResizeState landing_state = RS_NORESIZE; bool landing_state_found = false; // Find states for dragged item and landing tab for (; it != it_end; ++it) diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h index 0973445157..14a29895f5 100644 --- a/indra/newview/llbottomtray.h +++ b/indra/newview/llbottomtray.h @@ -63,7 +63,7 @@ public: /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask); protected: - LLBottomtrayButton::LLBottomtrayButton(const Params& p) + LLBottomtrayButton(const Params& p) : LLButton(p) { -- cgit v1.2.3 From 0b4046ecf1769735aecdcdcc95d78d05d779203d Mon Sep 17 00:00:00 2001 From: Aimee Linden Date: Tue, 7 Sep 2010 21:14:58 +0100 Subject: VWR-20713 SUPPLEMENTARY Double-click Teleport. Correct menu item label. --- indra/newview/skins/default/xui/en/menu_viewer.xml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index ac97932801..19707c1bc9 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -2629,8 +2629,8 @@ function="Advanced.PrintTextureMemoryStats" /> + label="Double-Click Auto-Pilot" + name="Double-Click Auto-Pilot"> @@ -2639,9 +2639,8 @@ parameter="DoubleClickAutoPilot" /> + label="Double-Click Teleport" + name="DoubleClick Teleport"> -- cgit v1.2.3 From bb51a764ece0f48161ddea1c519a7e427ccfdf23 Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Wed, 8 Sep 2010 11:30:50 -0400 Subject: SNOW-606 FIX disable packaging of libuuid Patch taken from JIRA, committing locally to fix our project branch. Code reviewed by Nyx / Brad (transplanted from 06c4d6b5d67f6624d76b5a7f61021ef2d53f44b4) --- indra/newview/viewer_manifest.py | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 08ba8c13b1..c447a977f0 100644 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -922,7 +922,6 @@ class Linux_i686Manifest(LinuxManifest): self.path("libcrypto.so.0.9.7") self.path("libexpat.so.1") self.path("libssl.so.0.9.7") - self.path("libuuid.so.1") self.path("libSDL-1.2.so.0") self.path("libELFIO.so") self.path("libopenjpeg.so.1.3.0", "libopenjpeg.so.1.3") -- cgit v1.2.3 From 074f4c8c59eebbf109c2846c35cdab05f3997db8 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Wed, 8 Sep 2010 13:36:42 -0400 Subject: VWR-22901 FIXED Backwards compatibility for multiattachments Better handling of invalid attachment points. You can now detach points that are incompatible with your viewer, versus having those permanently in the COF> --- indra/newview/llinventorybridge.cpp | 14 +++++++------- indra/newview/llvoavatarself.cpp | 14 +++++++++++++- indra/newview/skins/default/xui/en/strings.xml | 2 +- 3 files changed, 21 insertions(+), 9 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 78b5c10748..ab75b9ef8d 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -3979,22 +3979,22 @@ std::string LLObjectBridge::getLabelSuffix() const { if (get_is_item_worn(mUUID)) { - if (!isAgentAvatarValid()) + if (!isAgentAvatarValid()) // Error condition, can't figure out attach point { return LLItemBridge::getLabelSuffix() + LLTrans::getString("worn"); } - std::string attachment_point_name = gAgentAvatarp->getAttachedPointName(mUUID); - + if (attachment_point_name == LLStringUtil::null) // Error condition, invalid attach point + { + attachment_point_name = "Invalid Attachment"; + } // e.g. "(worn on ...)" / "(attached to ...)" LLStringUtil::format_map_t args; args["[ATTACHMENT_POINT]"] = LLTrans::getString(attachment_point_name); + return LLItemBridge::getLabelSuffix() + LLTrans::getString("WornOnAttachmentPoint", args); } - else - { - return LLItemBridge::getLabelSuffix(); - } + return LLItemBridge::getLabelSuffix(); } void rez_attachment(LLViewerInventoryItem* item, LLViewerJointAttachment* attachment, bool replace) diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index a231afad3f..ec5c95469e 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -1163,12 +1163,24 @@ BOOL LLVOAvatarSelf::detachAttachmentIntoInventory(const LLUUID &item_id) gMessageSystem->addUUIDFast(_PREHASH_ItemID, item_id); gMessageSystem->sendReliable(gAgent.getRegion()->getHost()); - // this object might have been selected, so let the selection manager know it's gone now + // This object might have been selected, so let the selection manager know it's gone now LLViewerObject *found_obj = gObjectList.findObject(item_id); if (found_obj) { LLSelectMgr::getInstance()->remove(found_obj); } + + // Error checking in case this object was attached to an invalid point + // In that case, just remove the item from COF preemptively since detach + // will fail. + if (isAgentAvatarValid()) + { + const LLViewerObject *attached_obj = gAgentAvatarp->getWornAttachment(item_id); + if (!attached_obj) + { + LLAppearanceMgr::instance().removeCOFItemLinks(item_id, false); + } + } return TRUE; } return FALSE; diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index cf040b10c7..72639f08ee 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2019,6 +2019,7 @@ Clears (deletes) the media and all params from the given face. Stomach Left Pec Right Pec + Invalid Attachment Point [AGEYEARS] [AGEMONTHS] old @@ -2182,7 +2183,6 @@ Clears (deletes) the media and all params from the given face. HUD Bottom Left HUD Bottom HUD Bottom Right - Invalid Attachment Point Line [LINE], Column [COLUMN] -- cgit v1.2.3 From 244aa5db98ad828c766d615aad82e25c5cee98d7 Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Wed, 8 Sep 2010 21:23:22 +0300 Subject: VWR-22891 FIXED Fixed inability to share an item while My Inventory SP is undocked. All detached side tray tabs are now wrapped with LLFloaterSideTrayTab that adds them as exceptions to LLTransientFloaterMgr, i.e. as views clicking on which doesn't hide transient floaters. --- indra/newview/CMakeLists.txt | 2 ++ indra/newview/llfloatersidetraytab.cpp | 45 ++++++++++++++++++++++++++++++++ indra/newview/llfloatersidetraytab.h | 47 ++++++++++++++++++++++++++++++++++ indra/newview/llviewerfloaterreg.cpp | 3 ++- 4 files changed, 96 insertions(+), 1 deletion(-) create mode 100644 indra/newview/llfloatersidetraytab.cpp create mode 100644 indra/newview/llfloatersidetraytab.h (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 630902c48f..d6622f164e 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -203,6 +203,7 @@ set(viewer_SOURCE_FILES llfloatersearch.cpp llfloatersellland.cpp llfloatersettingsdebug.cpp + llfloatersidetraytab.cpp llfloatersnapshot.cpp llfloatertelehub.cpp llfloatertestinspectors.cpp @@ -727,6 +728,7 @@ set(viewer_HEADER_FILES llfloatersearch.h llfloatersellland.h llfloatersettingsdebug.h + llfloatersidetraytab.h llfloatersnapshot.h llfloatertelehub.h llfloatertestinspectors.h diff --git a/indra/newview/llfloatersidetraytab.cpp b/indra/newview/llfloatersidetraytab.cpp new file mode 100644 index 0000000000..f13b4db3a0 --- /dev/null +++ b/indra/newview/llfloatersidetraytab.cpp @@ -0,0 +1,45 @@ +/** + * @file llfloatersidetraytab.cpp + * @brief LLFloaterSideTrayTab class definition + * + * $LicenseInfo:firstyear=2010&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llfloatersidetraytab.h" + +// newview includes +#include "lltransientfloatermgr.h" + +LLFloaterSideTrayTab::LLFloaterSideTrayTab(const LLSD& key, const Params& params) +: LLFloater(key, params) +{ + // Prevent transient floaters (e.g. IM windows) from hiding + // when this floater is clicked. + LLTransientFloaterMgr::getInstance()->addControlView(LLTransientFloaterMgr::GLOBAL, this); +} + +LLFloaterSideTrayTab::~LLFloaterSideTrayTab() +{ + LLTransientFloaterMgr::getInstance()->removeControlView(LLTransientFloaterMgr::GLOBAL, this); +} diff --git a/indra/newview/llfloatersidetraytab.h b/indra/newview/llfloatersidetraytab.h new file mode 100644 index 0000000000..e47f82e8ba --- /dev/null +++ b/indra/newview/llfloatersidetraytab.h @@ -0,0 +1,47 @@ +/** + * @file llfloatersidetraytab.h + * @brief LLFloaterSideTrayTab class definition + * + * $LicenseInfo:firstyear=2010&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LL_LLFLOATERSIDETRAYTAB_H +#define LL_LLFLOATERSIDETRAYTAB_H + +#include "llfloater.h" + +/** + * When a side tray tab gets detached, it's wrapped in an instance of this class. + * + * This class helps to make sure that clicking a detached side tray tab doesn't + * make transient floaters (e.g. IM windows) hide, so that it's possible to + * drag an inventory item from detached My Inventory window to a docked IM window, + * i.e. share the item (see VWR-22891). + */ +class LLFloaterSideTrayTab : public LLFloater +{ +public: + LLFloaterSideTrayTab(const LLSD& key, const Params& params = getDefaultParams()); + ~LLFloaterSideTrayTab(); +}; + +#endif // LL_LLFLOATERSIDETRAYTAB_H diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 8728298575..b6f2d34663 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -86,6 +86,7 @@ #include "llfloaterscriptlimits.h" #include "llfloatersellland.h" #include "llfloatersettingsdebug.h" +#include "llfloatersidetraytab.h" #include "llfloatersnapshot.h" #include "llfloatertelehub.h" #include "llfloatertestinspectors.h" @@ -234,7 +235,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("script_limits", "floater_script_limits.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("sell_land", "floater_sell_land.xml", &LLFloaterSellLand::buildFloater); LLFloaterReg::add("settings_debug", "floater_settings_debug.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); - LLFloaterReg::add("side_bar_tab", "floater_side_bar_tab.xml",&LLFloaterReg::build); + LLFloaterReg::add("side_bar_tab", "floater_side_bar_tab.xml", &LLFloaterReg::build); LLFloaterReg::add("stats", "floater_stats.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("start_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("stop_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); -- cgit v1.2.3 From 13f1d6e472ed797a04d2c36cbdeacb505222da50 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 8 Sep 2010 15:55:26 -0400 Subject: dummy whitespace change --- indra/newview/noise.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/noise.cpp b/indra/newview/noise.cpp index 00d04f7be4..5f2c718b49 100644 --- a/indra/newview/noise.cpp +++ b/indra/newview/noise.cpp @@ -30,6 +30,7 @@ #include "llrand.h" + // static #define B 0x100 S32 p[B + B + 2]; -- cgit v1.2.3 From 272b6fea1fad391b18924e63d1fee0b395ab165b Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Wed, 8 Sep 2010 16:16:07 -0400 Subject: TEST whitespace change to verify new repository is working --- indra/newview/llvoavatarself.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h index eb2475f666..23a799ea3a 100644 --- a/indra/newview/llvoavatarself.h +++ b/indra/newview/llvoavatarself.h @@ -33,6 +33,7 @@ struct LocalTextureData; + //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // LLVOAvatarSelf // -- cgit v1.2.3 From 4a8d59367a695fedff21a71d35bcad3f729f6060 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Wed, 8 Sep 2010 16:27:42 -0400 Subject: dummy commit test --- indra/newview/llinventorybridge.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index ab75b9ef8d..f6b7b41314 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -35,7 +35,7 @@ #include "llagentwearables.h" #include "llappearancemgr.h" #include "llattachmentsmgr.h" -#include "llavataractions.h" +#include "llavataractions.h" #include "llfloateropenobject.h" #include "llfloaterreg.h" #include "llfloaterworldmap.h" -- cgit v1.2.3 From f981e5af3fb3d3f575bb40ed67eca83e20acbd2f Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Wed, 8 Sep 2010 17:15:58 -0400 Subject: dummy commit test --- indra/newview/llinventorybridge.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index f6b7b41314..3640dc708b 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -41,7 +41,7 @@ #include "llfloaterworldmap.h" #include "llfriendcard.h" #include "llgesturemgr.h" -#include "llgiveinventory.h" +#include "llgiveinventory.h" #include "llimfloater.h" #include "llimview.h" #include "llinventoryclipboard.h" -- cgit v1.2.3 From 4c667a105132c4a3b6465ae6dfac979b51d3d285 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 9 Sep 2010 13:35:02 +0100 Subject: CID-504 Checker: UNINIT_CTOR Function: LLWearableItemTypeNameComparator::LLWearableTypeOrder::LLWearableTypeOrder() File: /indra/newview/llwearableitemslist.h --- indra/newview/llwearableitemslist.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llwearableitemslist.h b/indra/newview/llwearableitemslist.h index 2b05273dc7..b060c9f076 100644 --- a/indra/newview/llwearableitemslist.h +++ b/indra/newview/llwearableitemslist.h @@ -361,7 +361,7 @@ private: bool mSortWearableTypeByName; LLWearableTypeOrder(ETypeListOrder order_priority, bool sort_asset_by_name, bool sort_wearable_by_name); - LLWearableTypeOrder(){}; + LLWearableTypeOrder() : mOrderPriority(ORDER_RANK_UNKNOWN), mSortAssetTypeByName(false), mSortWearableTypeByName(false) {}; }; ETypeListOrder getTypeListOrder(LLAssetType::EType item_type) const; -- cgit v1.2.3 From 2f7fa7ba205f6f473f816dd2e1b42d49090ddd50 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 9 Sep 2010 13:36:02 +0100 Subject: Backed out changeset 1c8d9c22bf94 --- indra/newview/viewer_manifest.py | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index c447a977f0..08ba8c13b1 100644 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -922,6 +922,7 @@ class Linux_i686Manifest(LinuxManifest): self.path("libcrypto.so.0.9.7") self.path("libexpat.so.1") self.path("libssl.so.0.9.7") + self.path("libuuid.so.1") self.path("libSDL-1.2.so.0") self.path("libELFIO.so") self.path("libopenjpeg.so.1.3.0", "libopenjpeg.so.1.3") -- cgit v1.2.3 From 332f502ede8cc807c75eb2f6ff3c6b6aeab9e473 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 9 Sep 2010 13:56:44 +0100 Subject: CID-503 Checker: REVERSE_INULL Function: LLOutfitsList::refreshList(const LLUUID &) File: /indra/newview/lloutfitslist.cpp --- indra/newview/lloutfitslist.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp index 51f9a03a9c..a0ef43ea80 100644 --- a/indra/newview/lloutfitslist.cpp +++ b/indra/newview/lloutfitslist.cpp @@ -439,6 +439,7 @@ void LLOutfitsList::refreshList(const LLUUID& category_id) static LLXMLNodePtr accordionXmlNode = getAccordionTabXMLNode(); LLAccordionCtrlTab* tab = LLUICtrlFactory::defaultBuilder(accordionXmlNode, NULL, NULL); + if (!tab) continue; tab->setName(name); tab->setTitle(name); @@ -455,10 +456,7 @@ void LLOutfitsList::refreshList(const LLUUID& category_id) mAccordion->removeCollapsibleCtrl(tab); // kill removed tab - if (tab != NULL) - { - tab->die(); - } + tab->die(); continue; } -- cgit v1.2.3 From aadebd91de78ac9ef29c0215c5be8a0d309663a6 Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Thu, 9 Sep 2010 11:25:31 -0400 Subject: VWR-22052 FIX tons of processAvatarAppearance spam, may be flooding server Added a timeout so that we will only send this message a max of once a minute. Investigated cause of server not sending visual params with texture message, it appears it only happens if the sim cannot find the visual params to send. Not sure what causes that condition. Code reviewed by Seraph --- indra/newview/llvoavatar.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index f985ee0c15..cab6fbdc93 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -6835,12 +6835,14 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) llinfos << "AvatarAppearance msg received without any parameters, object: " << getID() << llendl; } + const F32 LOADING_TIMEOUT_SECONDS = 60.f; // this isn't really a problem if we already have a non-default shape - if (visualParamWeightsAreDefault()) + if (visualParamWeightsAreDefault() && mRuthTimer.getElapsedTimeF32() > LOADING_TIMEOUT_SECONDS) { // re-request appearance, hoping that it comes back with a shape next time llinfos << "Re-requesting AvatarAppearance for object: " << getID() << llendl; LLAvatarPropertiesProcessor::getInstance()->sendAvatarTexturesRequest(getID()); + mRuthTimer.reset(); } else { -- cgit v1.2.3 From ac833ac83a8e4e11fea67b4330c9ea52792a9fa9 Mon Sep 17 00:00:00 2001 From: Andrew Dyukov Date: Thu, 9 Sep 2010 20:21:11 +0300 Subject: STORM-94 FIXED Increased minimum width and height allowed for undocked panels. Set minimum width of undocked panels to their width in sidetray (333). Minimum width was set to 440 to make sure expandable textbox in My Profile doesn't spread out from floater if it has maximum height. Reviewed by Vadim Savchuk. --- indra/newview/skins/default/xui/en/floater_side_bar_tab.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/floater_side_bar_tab.xml b/indra/newview/skins/default/xui/en/floater_side_bar_tab.xml index bf0913fde7..9f14e9ae0a 100644 --- a/indra/newview/skins/default/xui/en/floater_side_bar_tab.xml +++ b/indra/newview/skins/default/xui/en/floater_side_bar_tab.xml @@ -2,7 +2,8 @@ -- cgit v1.2.3 From 6b77ce904eedfa8bbcc9e2fd2d9f96e4f0093b95 Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Thu, 9 Sep 2010 21:05:13 +0300 Subject: STORM-92 FIXED Avoid redundant visibility changes when attaching/detaching side tray tabs. Also happens to fix STORM-96 (Empty space appears in the top of Home side panel after redocking). --- indra/newview/llpanelgroup.cpp | 14 +----------- indra/newview/llpanelgroup.h | 2 -- indra/newview/llsidetray.cpp | 49 +++++++++++++++++++++++++++++++----------- indra/newview/llsidetray.h | 13 +++++++---- 4 files changed, 47 insertions(+), 31 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp index e42057e93a..62ed7acb15 100644 --- a/indra/newview/llpanelgroup.cpp +++ b/indra/newview/llpanelgroup.cpp @@ -112,6 +112,7 @@ void LLPanelGroup::onOpen(const LLSD& key) if(!key.has("action")) { setGroupID(group_id); + getChild("groups_accordion")->expandDefaultTab(); return; } @@ -176,11 +177,6 @@ BOOL LLPanelGroup::postBuild() LLPanelGroupTab* panel_notices = findChild("group_notices_tab_panel"); LLPanelGroupTab* panel_land = findChild("group_land_tab_panel"); - if (LLAccordionCtrl* accordion_ctrl = getChild("groups_accordion")) - { - setVisibleCallback(boost::bind(&LLPanelGroup::onVisibilityChange, this, _2, accordion_ctrl)); - } - if(panel_general) mTabs.push_back(panel_general); if(panel_roles) mTabs.push_back(panel_roles); if(panel_notices) mTabs.push_back(panel_notices); @@ -304,14 +300,6 @@ void LLPanelGroup::onBtnCancel() onBackBtnClick(); } -void LLPanelGroup::onVisibilityChange(const LLSD &in_visible_chain, LLAccordionCtrl* accordion_ctrl) -{ - if (in_visible_chain.asBoolean() && accordion_ctrl != NULL) - { - accordion_ctrl->expandDefaultTab(); - } -} - void LLPanelGroup::changed(LLGroupChange gc) { for(std::vector::iterator it = mTabs.begin();it!=mTabs.end();++it) diff --git a/indra/newview/llpanelgroup.h b/indra/newview/llpanelgroup.h index 86875d2da3..b494c7d403 100644 --- a/indra/newview/llpanelgroup.h +++ b/indra/newview/llpanelgroup.h @@ -36,7 +36,6 @@ class LLOfferInfo; const S32 UPDATE_MEMBERS_PER_FRAME = 500; // Forward declares -class LLAccordionCtrl; class LLPanelGroupTab; class LLTabContainer; class LLAgent; @@ -97,7 +96,6 @@ protected: void onBackBtnClick(); void onBtnJoin(); void onBtnCancel(); - void onVisibilityChange(const LLSD &in_visible_chain, LLAccordionCtrl* accordion_ctrl); static void onBtnApply(void*); static void onBtnRefresh(void*); diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp index 7af3ad9896..1d32b58948 100644 --- a/indra/newview/llsidetray.cpp +++ b/indra/newview/llsidetray.cpp @@ -244,9 +244,7 @@ void LLSideTrayTab::toggleTabDocked() LLFloater* floater_tab = LLFloaterReg::getInstance("side_bar_tab", tab_name); if (!floater_tab) return; - LLFloaterReg::toggleInstance("side_bar_tab", tab_name); - - bool docking = !LLFloater::isShown(floater_tab); + bool docking = LLFloater::isShown(floater_tab); // Hide the "Tear Off" button when a tab gets undocked // and show "Dock" button instead. @@ -261,6 +259,10 @@ void LLSideTrayTab::toggleTabDocked() { undock(floater_tab); } + + // Open/close the floater *after* we reparent the tab panel, + // so that it doesn't receive redundant visibility change notifications. + LLFloaterReg::toggleInstance("side_bar_tab", tab_name); } void LLSideTrayTab::dock() @@ -282,7 +284,7 @@ void LLSideTrayTab::dock() if (side_tray->getCollapsed()) { - side_tray->expandSideBar(); + side_tray->expandSideBar(false); } } @@ -291,6 +293,10 @@ void LLSideTrayTab::undock(LLFloater* floater_tab) LLSideTray* side_tray = getSideTray(); if (!side_tray) return; + // Remember whether the tab have been active before detaching + // because removeTab() will change active tab. + bool was_active = side_tray->getActiveTab() == this; + // Remove the tab from Side Tray's tabs list. // We have to do it despite removing the tab from Side Tray's child view tree // by addChild(). Otherwise the tab could be accessed by the pointer in LLSideTray::mTabs. @@ -300,7 +306,12 @@ void LLSideTrayTab::undock(LLFloater* floater_tab) return; } - setVisible(true); // *HACK: restore visibility after being hidden by LLSideTray::selectTabByName(). + // If we're undocking while side tray is collapsed we need to explicitly show the panel. + if (!getVisible()) + { + setVisible(true); + } + floater_tab->addChild(this); floater_tab->setTitle(mTabTitle); @@ -334,7 +345,7 @@ void LLSideTrayTab::undock(LLFloater* floater_tab) side_tray->collapseSideBar(); } - if (side_tray->getActiveTab() != this) + if (!was_active) { // When a tab other then current active tab is detached from Side Tray // onOpen() should be called as tab visibility is changed. @@ -618,8 +629,9 @@ bool LLSideTray::selectTabByIndex(size_t index) return selectTabByName(sidebar_tab->getName()); } -bool LLSideTray::selectTabByName (const std::string& name) +bool LLSideTray::selectTabByName(const std::string& name, bool keep_prev_visible) { + LLSideTrayTab* tab_to_keep_visible = NULL; LLSideTrayTab* new_tab = getTab(name); if (!new_tab) return false; @@ -630,6 +642,8 @@ bool LLSideTray::selectTabByName (const std::string& name) //deselect old tab if (mActiveTab) { + // Keep previously active tab visible if requested. + if (keep_prev_visible) tab_to_keep_visible = mActiveTab; toggleTabButton(mActiveTab); } @@ -650,9 +664,17 @@ bool LLSideTray::selectTabByName (const std::string& name) for ( child_it = mTabs.begin(); child_it != mTabs.end(); ++child_it) { LLSideTrayTab* sidebar_tab = *child_it; + + bool vis = sidebar_tab == mActiveTab; + + // Force keeping the tab visible if requested. + vis |= sidebar_tab == tab_to_keep_visible; + // When the last tab gets detached, for a short moment the "Toggle Sidebar" pseudo-tab // is shown. So, to avoid the flicker we make sure it never gets visible. - sidebar_tab->setVisible(sidebar_tab == mActiveTab && (*child_it)->getName() != "sidebar_openclose"); + vis &= (*child_it)->getName() != "sidebar_openclose"; + + sidebar_tab->setVisible(vis); } return true; } @@ -741,7 +763,7 @@ bool LLSideTray::removeTab(LLSideTrayTab* tab) { child_vector_iter_t next_tab_it = (tab_it < (mTabs.end() - 1)) ? tab_it + 1 : mTabs.begin(); - selectTabByName((*next_tab_it)->getName()); + selectTabByName((*next_tab_it)->getName(), true); // Don't hide the tab being removed. } // Remove the tab. @@ -1016,7 +1038,7 @@ void LLSideTray::collapseSideBar() setFocus( FALSE ); } -void LLSideTray::expandSideBar() +void LLSideTray::expandSideBar(bool open_active) { mCollapsed = false; LLSideTrayTab* openclose_tab = getTab("sidebar_openclose"); @@ -1024,8 +1046,11 @@ void LLSideTray::expandSideBar() { mCollapseButton->setImageOverlay( openclose_tab->mImageSelected ); } - LLSD key;//empty - mActiveTab->onOpen(key); + + if (open_active) + { + mActiveTab->onOpen(LLSD()); + } reflectCollapseChange(); diff --git a/indra/newview/llsidetray.h b/indra/newview/llsidetray.h index 248def8e3d..4e79007c13 100644 --- a/indra/newview/llsidetray.h +++ b/indra/newview/llsidetray.h @@ -76,9 +76,12 @@ public: // interface functions /** - * Select tab with specific name and set it active - */ - bool selectTabByName (const std::string& name); + * Select tab with specific name and set it active + * + * @param name Tab to switch to. + * @param keep_prev_visible Whether to keep the previously selected tab visible. + */ + bool selectTabByName (const std::string& name, bool keep_prev_visible = false); /** * Select tab with specific index and set it active @@ -119,8 +122,10 @@ public: /* * expand SideBar + * + * @param open_active Whether to call onOpen() for the active tab. */ - void expandSideBar (); + void expandSideBar(bool open_active = true); /** -- cgit v1.2.3 From db162193096221674f6ef64049d0c9e10f3def16 Mon Sep 17 00:00:00 2001 From: Andrew Dyukov Date: Thu, 9 Sep 2010 21:18:35 +0300 Subject: STORM-97 FIXED Fixed position of back button in Landmark info panel on width resize Corrected "follows" attribute for button in xml. --- indra/newview/skins/default/xui/en/panel_landmark_info.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/panel_landmark_info.xml b/indra/newview/skins/default/xui/en/panel_landmark_info.xml index c5d6aced7a..f8ae238148 100644 --- a/indra/newview/skins/default/xui/en/panel_landmark_info.xml +++ b/indra/newview/skins/default/xui/en/panel_landmark_info.xml @@ -57,7 +57,7 @@ translate="false" value="Parcel_R_Dark" />