From fa21f7d42233bd36bb1ed14997250d6bd8874f67 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Fri, 30 Apr 2010 17:55:18 -0700 Subject: finer granularity on volume sliders --- .../skins/default/xui/en/panel_preferences_sound.xml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml index e03ecd8f04..65c78ad333 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml @@ -14,7 +14,7 @@ follows="left|top" font.style="BOLD" height="15" - increment="0.05" + increment="0.025" initial_value="0.5" label="Master volume" label_width="120" @@ -57,7 +57,7 @@ disabled_control="MuteAudio" follows="left|top" height="15" - increment="0.05" + increment="0.025" initial_value="0.5" label="Buttons" label_width="120" @@ -91,7 +91,7 @@ disabled_control="MuteAudio" follows="left|top" height="15" - increment="0.05" + increment="0.025" initial_value="0.5" label="Ambient" label_width="120" @@ -125,7 +125,7 @@ disabled_control="MuteAudio" follows="left|top" height="15" - increment="0.05" + increment="0.025" initial_value="0.5" label="Sound Effects" label_width="120" @@ -159,7 +159,7 @@ disabled_control="MuteAudio" follows="left|top" height="15" - increment="0.05" + increment="0.025" initial_value="0.5" label="Streaming music" label_width="120" @@ -202,7 +202,7 @@ disabled_control="MuteAudio" follows="left|top" height="16" - increment="0.05" + increment="0.025" initial_value="0.5" label="Media" label_width="120" @@ -247,7 +247,7 @@ disabled_control="MuteAudio" follows="left|top" height="16" - increment="0.05" + increment="0.025" initial_value="0.5" label="Voice Chat" label_width="120" @@ -454,7 +454,7 @@ control_name="AudioLevelMic" follows="left|top" height="17" - increment="0.05" + increment="0.025" initial_value="1.0" layout="topleft" left="160" -- cgit v1.2.3 From 61316403aa7cd430d4bffac8ae517e5563598898 Mon Sep 17 00:00:00 2001 From: Andrew Polunin Date: Fri, 14 May 2010 13:03:44 +0300 Subject: EXT-7221 FIXED Now the 'Get More >>' link exists exactly before the 'View All >>' link in the Gestures list - Added new setting GesturesMarketplaceURL in settings.xml to represent URL which points to the Gesture's Marketplace. - Added mGetMoreItemIndex instance variable (similar to mViewAllItemIndex which was already there). - Added mGetMoreItemIndex handling in the LLGestureComboList::onCommitGesture() (again, similar to mViewAllItemIndex). - Added new string in strings.xml with name GetMoreGestures to represent Gesture's list item. Reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/386/ --HG-- branch : product-engine --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llnearbychatbar.cpp | 16 +++++++++++++--- indra/newview/llnearbychatbar.h | 1 + indra/newview/skins/default/xui/en/strings.xml | 1 + 4 files changed, 26 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 4e4c0274e7..f71662a7c8 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3578,6 +3578,17 @@ Value 1024 + GesturesMarketplaceURL + + Comment + URL to the Gestures Marketplace + Persist + 0 + Type + String + Value + https://www.xstreetsl.com/modules.php?name=Marketplace&CategoryID=233 + GridCrossSections Comment diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index 1507b7d324..bd504906d5 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -79,6 +79,7 @@ LLGestureComboList::LLGestureComboList(const LLGestureComboList::Params& p) : LLUICtrl(p) , mLabel(p.label) , mViewAllItemIndex(0) + , mGetMoreItemIndex(0) { LLButton::Params button_params = p.combo_button; button_params.follows.flags(FOLLOWS_LEFT|FOLLOWS_BOTTOM|FOLLOWS_RIGHT); @@ -260,9 +261,12 @@ void LLGestureComboList::refreshGestures() sortByName(); - // store index followed by the last added Gesture and add View All item at bottom - mViewAllItemIndex = idx; - + // store indices for Get More and View All items (idx is the index followed by the last added Gesture) + mGetMoreItemIndex = idx; + mViewAllItemIndex = idx + 1; + + // add Get More and View All items at the bottom + mList->addSimpleElement(LLTrans::getString("GetMoreGestures"), ADD_BOTTOM, LLSD(mGetMoreItemIndex)); mList->addSimpleElement(LLTrans::getString("ViewAllGestures"), ADD_BOTTOM, LLSD(mViewAllItemIndex)); // Insert label after sorting, at top, with separator below it @@ -318,6 +322,12 @@ void LLGestureComboList::onCommitGesture() return; } + if (mGetMoreItemIndex == index) + { + LLWeb::loadURLExternal(gSavedSettings.getString("GesturesMarketplaceURL")); + return; + } + LLMultiGesture* gesture = mGestures.at(index); if(gesture) { diff --git a/indra/newview/llnearbychatbar.h b/indra/newview/llnearbychatbar.h index dd467d7978..5af3152662 100644 --- a/indra/newview/llnearbychatbar.h +++ b/indra/newview/llnearbychatbar.h @@ -62,6 +62,7 @@ protected: std::vector mGestures; std::string mLabel; LLSD::Integer mViewAllItemIndex; + LLSD::Integer mGetMoreItemIndex; public: diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 6d80b17ac6..e028ef2077 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -1894,6 +1894,7 @@ Clears (deletes) the media and all params from the given face. + -- cgit v1.2.3 From 5088d01be115f4f9ded71da2313ee08af01f6616 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Fri, 14 May 2010 17:04:45 +0300 Subject: EXT-6994 FIXED Enabled context menu for expandable text control. reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/387/ --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/widgets/expandable_text.xml | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/widgets/expandable_text.xml b/indra/newview/skins/default/xui/en/widgets/expandable_text.xml index 6190ea7872..216c4dea95 100644 --- a/indra/newview/skins/default/xui/en/widgets/expandable_text.xml +++ b/indra/newview/skins/default/xui/en/widgets/expandable_text.xml @@ -11,6 +11,7 @@ read_only="true" use_ellipses="true" word_wrap="true" + show_context_menu="true" tab_stop="true" v_pad="3" h_pad="4" > -- cgit v1.2.3 From 4b9b5c1d38a234d4127c2c38df5f6f1f902190b2 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Fri, 14 May 2010 17:15:28 +0300 Subject: EXT-7104 WIP added 4 buttons to bottom tray, added "Show button" menu support. * Added 4 buttons with tooltips: ** Build - Shows/hides Build Tools ** Search - Shows/hides Search ** Map - Shows/hides World Map ** Mini-Map - Shows/hides Mini-Map * Made their width and minimal width the same as "Move" and "View" buttons (increased default total width of the bottom tray to make Layout Stack initialize its panels with default values from xml) * Added appropriate menu items in context menu to Show these buttons in the bottom tray (with functionality) * Set on click actions for this buttons. ("Build" temporary made disabled because default toggle registration is not enough for this floater.) Dev Notes: * Improved LLBottomTray::initResizeStateContainers to fill mObjectDefaultWidthMap using mStateProcessedObjectMap & mButtonsProcessOrder container * Improved LLBottomTray::canButtonBeShown to process variable number of buttons that can be hidden on resize QA Notes: Resize behavior with new buttons can already be tested. Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/381/ --HG-- branch : product-engine --- indra/newview/llbottomtray.cpp | 106 +++++++++++++---- indra/newview/llbottomtray.h | 34 ++++++ .../skins/default/xui/en/menu_bottomtray.xml | 44 +++++++ .../skins/default/xui/en/panel_bottomtray.xml | 132 ++++++++++++++++++++- 4 files changed, 291 insertions(+), 25 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 226d5593c9..7f528c88b2 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -479,6 +479,10 @@ BOOL LLBottomTray::postBuild() initResizeStateContainers(); + setButtonsControlsAndListeners(); + + initButtonsVisibility(); + // update wells visibility: showWellButton(RS_IM_WELL, !LLIMWellWindow::getInstance()->isWindowEmpty()); showWellButton(RS_NOTIFICATION_WELL, !LLNotificationWellWindow::getInstance()->isWindowEmpty()); @@ -1091,52 +1095,108 @@ void LLBottomTray::processExtendButton(EResizeState processed_object_type, S32& bool LLBottomTray::canButtonBeShown(EResizeState processed_object_type) const { + // 0. Check if passed button was previously hidden on resize bool can_be_shown = mResizeState & processed_object_type; if (can_be_shown) { - static MASK MOVEMENT_PREVIOUS_BUTTONS_MASK = RS_BUTTON_GESTURES; - static MASK CAMERA_PREVIOUS_BUTTONS_MASK = RS_BUTTON_GESTURES | RS_BUTTON_MOVEMENT; - static MASK SNAPSHOT_PREVIOUS_BUTTONS_MASK = RS_BUTTON_GESTURES | RS_BUTTON_MOVEMENT | RS_BUTTON_CAMERA; + // Yes, it was. Lets now check that all buttons before it (that can be hidden on resize) + // are already shown + + // process buttons in direct order (from left to right) + resize_state_vec_t::const_iterator it = mButtonsProcessOrder.begin(); + const resize_state_vec_t::const_iterator it_end = mButtonsProcessOrder.end(); - switch(processed_object_type) + // 1. Find and accumulate all buttons types before one passed into the method. + MASK buttons_before_mask = RS_NORESIZE; + for (; it != it_end; ++it) { - case RS_BUTTON_GESTURES: // Gestures should be shown first - break; - case RS_BUTTON_MOVEMENT: // Move only if gesture is shown - can_be_shown = !(MOVEMENT_PREVIOUS_BUTTONS_MASK & mResizeState); - break; - case RS_BUTTON_CAMERA: - can_be_shown = !(CAMERA_PREVIOUS_BUTTONS_MASK & mResizeState); - break; - case RS_BUTTON_SNAPSHOT: - can_be_shown = !(SNAPSHOT_PREVIOUS_BUTTONS_MASK & mResizeState); - break; - default: // nothing to do here - break; + const EResizeState button_type = *it; + if (button_type == processed_object_type) break; + + buttons_before_mask |= button_type; } + + // 2. Check if some previous buttons are still hidden on resize + can_be_shown = !(buttons_before_mask & mResizeState); } return can_be_shown; } void LLBottomTray::initResizeStateContainers() { + // *TODO: get rid of mGesturePanel, mMovementPanel, mCamPanel, mSnapshotPanel instance members // init map with objects should be processed for each type mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_GESTURES, mGesturePanel)); mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_MOVEMENT, mMovementPanel)); mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_CAMERA, mCamPanel)); mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_SNAPSHOT, mSnapshotPanel)); - - // init default widths - mObjectDefaultWidthMap[RS_BUTTON_GESTURES] = mGesturePanel->getRect().getWidth(); - mObjectDefaultWidthMap[RS_BUTTON_MOVEMENT] = mMovementPanel->getRect().getWidth(); - mObjectDefaultWidthMap[RS_BUTTON_CAMERA] = mCamPanel->getRect().getWidth(); - mObjectDefaultWidthMap[RS_BUTTON_SPEAK] = mSpeakPanel->getRect().getWidth(); + mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_BUILD, getChild("build_btn_panel"))); + mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_SEARCH, getChild("search_btn_panel"))); + mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_WORLD_MAP, getChild("world_map_btn_panel"))); + mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_MINI_MAP, getChild("mini_map_btn_panel"))); // init an order of processed buttons mButtonsProcessOrder.push_back(RS_BUTTON_GESTURES); mButtonsProcessOrder.push_back(RS_BUTTON_MOVEMENT); mButtonsProcessOrder.push_back(RS_BUTTON_CAMERA); mButtonsProcessOrder.push_back(RS_BUTTON_SNAPSHOT); + mButtonsProcessOrder.push_back(RS_BUTTON_BUILD); + mButtonsProcessOrder.push_back(RS_BUTTON_SEARCH); + mButtonsProcessOrder.push_back(RS_BUTTON_WORLD_MAP); + mButtonsProcessOrder.push_back(RS_BUTTON_MINI_MAP); + + // init default widths + + // process buttons that can be hidden on resize... + resize_state_vec_t::const_iterator it = mButtonsProcessOrder.begin(); + const resize_state_vec_t::const_iterator it_end = mButtonsProcessOrder.end(); + + for (; it != it_end; ++it) + { + const EResizeState button_type = *it; + // is there an appropriate object? + if (0 == mStateProcessedObjectMap.count(button_type)) continue; + + // set default width for it. + mObjectDefaultWidthMap[button_type] = mStateProcessedObjectMap[button_type]->getRect().getWidth(); + } + + // ... and add Speak button because it also can be shrunk. + mObjectDefaultWidthMap[RS_BUTTON_SPEAK] = mSpeakPanel->getRect().getWidth(); + +} + +void LLBottomTray::initButtonsVisibility() +{ + // *TODO: move control settings of other buttons here + setTrayButtonVisibleIfPossible(RS_BUTTON_BUILD, gSavedSettings.getBOOL("ShowBuildButton")); + setTrayButtonVisibleIfPossible(RS_BUTTON_SEARCH, gSavedSettings.getBOOL("ShowSearchButton")); + setTrayButtonVisibleIfPossible(RS_BUTTON_WORLD_MAP, gSavedSettings.getBOOL("ShowWorldMapButton")); + setTrayButtonVisibleIfPossible(RS_BUTTON_MINI_MAP, gSavedSettings.getBOOL("ShowMiniMapButton")); +} + +void LLBottomTray::setButtonsControlsAndListeners() +{ + // *TODO: move control settings of other buttons here + gSavedSettings.declareBOOL("ShowBuildButton", TRUE, "Shows/Hides Build button in the bottom tray. (Declared in code)"); + gSavedSettings.declareBOOL("ShowSearchButton", TRUE, "Shows/Hides Search button in the bottom tray. (Declared in code)"); + gSavedSettings.declareBOOL("ShowWorldMapButton", TRUE, "Shows/Hides Map button in the bottom tray. (Declared in code)"); + gSavedSettings.declareBOOL("ShowMiniMapButton", TRUE, "Shows/Hides Mini-Map button in the bottom tray. (Declared in code)"); + + + gSavedSettings.getControl("ShowBuildButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_BUILD, _2)); + gSavedSettings.getControl("ShowSearchButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_SEARCH, _2)); + gSavedSettings.getControl("ShowWorldMapButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_WORLD_MAP, _2)); + gSavedSettings.getControl("ShowMiniMapButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_MINI_MAP, _2)); +} + +bool LLBottomTray::toggleShowButton(LLBottomTray::EResizeState button_type, const LLSD& new_visibility) +{ + if (LLBottomTray::instanceExists()) + { + LLBottomTray::getInstance()->setTrayButtonVisibleIfPossible(button_type, new_visibility.asBoolean()); + } + return true; } void LLBottomTray::setTrayButtonVisible(EResizeState shown_object_type, bool visible) diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h index e9d59e82ba..5588aefb42 100644 --- a/indra/newview/llbottomtray.h +++ b/indra/newview/llbottomtray.h @@ -120,12 +120,24 @@ private: , RS_BUTTON_SPEAK = 0x0040 , RS_IM_WELL = 0x0080 , RS_NOTIFICATION_WELL = 0x0100 + , RS_BUTTON_BUILD = 0x0200 + , RS_BUTTON_SEARCH = 0x0400 + , RS_BUTTON_WORLD_MAP = 0x0800 + , RS_BUTTON_MINI_MAP = 0x1000 + + /* + Once new button that can be hidden on resize is added don't forget to update related places: + - RS_BUTTONS_CAN_BE_HIDDEN enum value below. + - initResizeStateContainers(): mStateProcessedObjectMap and mButtonsProcessOrder + */ /** * Specifies buttons which can be hidden when bottom tray is shrunk. * They are: Gestures, Movement (Move), Camera (View), Snapshot + * new: Build, Search, Map, World Map, Mini-Map. */ , RS_BUTTONS_CAN_BE_HIDDEN = RS_BUTTON_SNAPSHOT | RS_BUTTON_CAMERA | RS_BUTTON_MOVEMENT | RS_BUTTON_GESTURES + | RS_BUTTON_BUILD | RS_BUTTON_SEARCH | RS_BUTTON_WORLD_MAP | RS_BUTTON_MINI_MAP }EResizeState; /** @@ -271,6 +283,28 @@ private: */ void initResizeStateContainers(); + /** + * Initializes buttons' visibility depend on stored Control Settings. + */ + void initButtonsVisibility(); + + /** + * Initializes listeners of Control Settings to toggle appropriate buttons' visibility. + * + * @see toggleShowButton() + */ + void setButtonsControlsAndListeners(); + + /** + * Toggles visibility of specified button depend on passed value. + * + * @param button_type - type of button to be toggled + * @param new_visibility - new visibility of the button + * + * @see setButtonsControlsAndListeners() + */ + static bool toggleShowButton(EResizeState button_type, const LLSD& new_visibility); + /** * Sets passed visibility to object specified by resize type. */ diff --git a/indra/newview/skins/default/xui/en/menu_bottomtray.xml b/indra/newview/skins/default/xui/en/menu_bottomtray.xml index 7ef91a1d85..5beafef4e4 100644 --- a/indra/newview/skins/default/xui/en/menu_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/menu_bottomtray.xml @@ -52,6 +52,50 @@ function="CheckControl" parameter="ShowSnapshotButton" /> + + + + + + + + + + + + + + + + + width="1310"> @@ -28,7 +28,7 @@ name="toolbar_stack" orientation="horizontal" top="0" - width="1000"> + width="1310"> + + + + + + + + + + + + + Date: Fri, 14 May 2010 18:52:20 +0300 Subject: EXT-7203 ADDITIONAL FIX Deleted autoresize of filter panel for proper scaling while resizing --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/panel_outfit_edit.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml index 7961664516..f661d7e237 100644 --- a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml +++ b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml @@ -260,7 +260,7 @@ top_pad="5" left="0"> Date: Fri, 14 May 2010 17:31:56 -0400 Subject: EXT-7353 FIXED short cuts (links) to textures should show up in the texture picker Links in general will now show up for all filtered inventory views of their associated types. --- indra/newview/llinventorybridge.cpp | 14 +------------- indra/newview/llinventoryfilter.h | 7 ++++++- indra/newview/llinventorymodel.h | 2 +- indra/newview/llinventorypanel.cpp | 5 +++++ indra/newview/llinventorypanel.h | 3 ++- indra/newview/llviewerinventory.cpp | 14 ++++++++++++++ indra/newview/llviewerinventory.h | 1 + 7 files changed, 30 insertions(+), 16 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 973257b19c..b9b4fa8b03 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -143,7 +143,6 @@ const std::string& LLInvFVBridge::getDisplayName() const // Folders have full perms PermissionMask LLInvFVBridge::getPermissionMask() const { - return PERM_ALL; } @@ -1219,18 +1218,7 @@ PermissionMask LLItemBridge::getPermissionMask() const { LLViewerInventoryItem* item = getItem(); PermissionMask perm_mask = 0; - if(item) - { - BOOL copy = item->getPermissions().allowCopyBy(gAgent.getID()); - BOOL mod = item->getPermissions().allowModifyBy(gAgent.getID()); - BOOL xfer = item->getPermissions().allowOperationBy(PERM_TRANSFER, - gAgent.getID()); - - if (copy) perm_mask |= PERM_COPY; - if (mod) perm_mask |= PERM_MODIFY; - if (xfer) perm_mask |= PERM_TRANSFER; - - } + if (item) perm_mask = item->getPermissionMask(); return perm_mask; } diff --git a/indra/newview/llinventoryfilter.h b/indra/newview/llinventoryfilter.h index 2376ba5d22..3ef51baefc 100644 --- a/indra/newview/llinventoryfilter.h +++ b/indra/newview/llinventoryfilter.h @@ -98,11 +98,15 @@ public: void setHoursAgo(U32 hours); U32 getHoursAgo() const; + void setIncludeLinks(BOOL include_links); + BOOL getIncludeLinks() const; + // +-------------------------------------------------------------------+ // + Execution And Results // +-------------------------------------------------------------------+ BOOL check(const LLFolderViewItem* item); - BOOL checkAgainstFilterType(const LLFolderViewItem* item); + BOOL checkAgainstFilterType(const LLFolderViewItem* item) const; + BOOL checkAgainstPermissions(const LLFolderViewItem* item) const; std::string::size_type getStringMatchOffset() const; // +-------------------------------------------------------------------+ @@ -172,6 +176,7 @@ private: U32 mHoursAgo; EFolderShow mShowFolderState; PermissionMask mPermissions; + BOOL mIncludeLinks; }; U32 mOrder; diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h index 5f5d4d6118..1f7bd50328 100644 --- a/indra/newview/llinventorymodel.h +++ b/indra/newview/llinventorymodel.h @@ -256,7 +256,7 @@ public: // updateCategory() method to actually modify values. LLViewerInventoryCategory* getCategory(const LLUUID& id) const; - // Get the inventoryID that this item points to, else just return item_id. + // Get the inventoryID or item that this item points to, else just return object_id const LLUUID& getLinkedItemID(const LLUUID& object_id) const; private: mutable LLPointer mLastItem; // cache recent lookups diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 000bcdd265..4766c1c227 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -248,6 +248,11 @@ void LLInventoryPanel::setHoursAgo(U32 hours) getFilter()->setHoursAgo(hours); } +void LLInventoryPanel::setIncludeLinks(BOOL include_links) +{ + getFilter()->setIncludeLinks(include_links); +} + void LLInventoryPanel::setShowFolderState(LLInventoryFilter::EFolderShow show) { getFilter()->setShowFolderState(show); diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h index 160a3d6f23..4373cedf66 100644 --- a/indra/newview/llinventorypanel.h +++ b/indra/newview/llinventorypanel.h @@ -141,7 +141,8 @@ public: void setSinceLogoff(BOOL sl); void setHoursAgo(U32 hours); BOOL getSinceLogoff(); - + void setIncludeLinks(BOOL include_links); + void setShowFolderState(LLInventoryFilter::EFolderShow show); LLInventoryFilter::EFolderShow getShowFolderState(); void setAllowMultiSelect(BOOL allow) { mFolderRoot->setAllowMultiSelect(allow); } diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 49748c59e8..ac70be029a 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -1653,6 +1653,20 @@ bool LLViewerInventoryItem::checkPermissionsSet(PermissionMask mask) const return ((curr_mask & mask) == mask); } +PermissionMask LLViewerInventoryItem::getPermissionMask() const +{ + const LLPermissions& permissions = getPermissions(); + + BOOL copy = permissions.allowCopyBy(gAgent.getID()); + BOOL mod = permissions.allowModifyBy(gAgent.getID()); + BOOL xfer = permissions.allowOperationBy(PERM_TRANSFER, gAgent.getID()); + PermissionMask perm_mask = 0; + if (copy) perm_mask |= PERM_COPY; + if (mod) perm_mask |= PERM_MODIFY; + if (xfer) perm_mask |= PERM_TRANSFER; + return perm_mask; +} + //---------- void LLViewerInventoryItem::onCallingCardNameLookup(const LLUUID& id, const std::string& first_name, const std::string& last_name) diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h index f0dc7bcb67..8ab7c9710d 100644 --- a/indra/newview/llviewerinventory.h +++ b/indra/newview/llviewerinventory.h @@ -159,6 +159,7 @@ public: // Checks the items permissions (for owner, group, or everyone) and returns true if all mask bits are set. bool checkPermissionsSet(PermissionMask mask) const; + PermissionMask getPermissionMask() const; // callback void onCallingCardNameLookup(const LLUUID& id, const std::string& first_name, const std::string& last_name); -- cgit v1.2.3 From 53a5b74af12ec772a2a69cff49b2e52da51c5c8f Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Sat, 15 May 2010 14:40:15 +0300 Subject: EXT-7241 FIXED Changed all "Edit Appearance" links to "Change Outfit" and pointed them to the My Outfits tab. Renamed the following menu items to "Change Outfit" and made them open My Outfits tab: - Avatar in-world context menu -> My Appearance. - Avatar inspector menu -> My Appearance. - Me -> My Appearance. To enable the Appearance SP switch to My outfits I cleaned up the logic of switching between my outfits <-> edit outfit <-> edit wearable panels. Also done the following cleanups and minor improvements: - Removed unused LLSidepanelAppearance::mEditBtn and mLookInfoType members. - Removed empty LLSidepanelAppearance::updateVerbs() method. - Made the "params" argument of LLSideTray::showPanel() and togglePanel() optional. Reviewed by Nyx at https://codereview.productengine.com/secondlife/r/389/ --HG-- branch : product-engine --- indra/newview/llpaneloutfitsinventory.cpp | 5 - indra/newview/llsidepanelappearance.cpp | 102 +++++++++------------ indra/newview/llsidepanelappearance.h | 11 +-- indra/newview/llsidetray.h | 4 +- indra/newview/llviewermenu.cpp | 5 +- .../skins/default/xui/en/menu_attachment_self.xml | 4 +- .../skins/default/xui/en/menu_avatar_self.xml | 4 +- .../default/xui/en/menu_inspect_self_gear.xml | 4 +- indra/newview/skins/default/xui/en/menu_viewer.xml | 4 +- 9 files changed, 55 insertions(+), 88 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index 660615df5a..ea75c16c56 100644 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -134,11 +134,6 @@ void LLPanelOutfitsInventory::onOpen(const LLSD& key) void LLPanelOutfitsInventory::updateVerbs() { - if (mParent) - { - mParent->updateVerbs(); - } - if (mListCommands) { updateListCommands(); diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp index 0086c6aec4..658a7b52e3 100644 --- a/indra/newview/llsidepanelappearance.cpp +++ b/indra/newview/llsidepanelappearance.cpp @@ -118,9 +118,6 @@ BOOL LLSidepanelAppearance::postBuild() childSetAction("edit_outfit_btn", boost::bind(&LLSidepanelAppearance::onEditOutfitButtonClicked, this)); - mEditBtn = getChild("edit_btn"); - mEditBtn->setClickedCallback(boost::bind(&LLSidepanelAppearance::onEditButtonClicked, this)); - mNewOutfitBtn = getChild("newlook_btn"); mNewOutfitBtn->setClickedCallback(boost::bind(&LLSidepanelAppearance::onNewOutfitButtonClicked, this)); mNewOutfitBtn->setEnabled(false); @@ -172,24 +169,24 @@ void LLSidepanelAppearance::onOpen(const LLSD& key) { fetchInventory(); refreshCurrentOutfitName(); - updateVerbs(); if (mPanelOutfitsInventory) { mPanelOutfitsInventory->onOpen(key); } - if(key.size() == 0) + if (!key.has("type")) return; - - toggleOutfitEditPanel(TRUE); - updateVerbs(); - - mLookInfoType = key["type"].asString(); - if (mLookInfoType == "edit_outfit") + // Switch to the requested panel. + std::string type = key["type"].asString(); + if (type == "my_outfits") { - mOutfitEdit->displayCurrentOutfit(); + showOutfitsInventoryPanel(); + } + else if (type == "edit_outfit") + { + showOutfitEditPanel(/*update = */ true); } } @@ -233,6 +230,7 @@ void LLSidepanelAppearance::onOpenOutfitButtonClicked() } } +// *TODO: obsolete? void LLSidepanelAppearance::onEditAppearanceButtonClicked() { if (gAgentWearables.areWearablesLoaded()) @@ -248,19 +246,6 @@ void LLSidepanelAppearance::onEditOutfitButtonClicked() LLSideTray::getInstance()->showPanel("sidepanel_appearance", key); } -void LLSidepanelAppearance::onEditButtonClicked() -{ - toggleOutfitEditPanel(FALSE); - toggleWearableEditPanel(TRUE, NULL); - /*if (mOutfitEdit->getVisible()) - { - } - else - { - mPanelOutfitsInventory->onEdit(); - }*/ -} - void LLSidepanelAppearance::onNewOutfitButtonClicked() { if (!mOutfitEdit->getVisible()) @@ -271,33 +256,27 @@ void LLSidepanelAppearance::onNewOutfitButtonClicked() void LLSidepanelAppearance::onEditWearBackClicked() { - mEditWearable->saveChanges(); - toggleWearableEditPanel(FALSE, NULL); - toggleOutfitEditPanel(TRUE); + showOutfitEditPanel(/* update = */ false); } void LLSidepanelAppearance::showOutfitsInventoryPanel() { - mOutfitEdit->setVisible(FALSE); - - mPanelOutfitsInventory->setVisible(TRUE); - - mFilterEditor->setVisible(TRUE); - mEditBtn->setVisible(TRUE); - mNewOutfitBtn->setVisible(TRUE); - mCurrOutfitPanel->setVisible(TRUE); + toggleWearableEditPanel(FALSE); + toggleOutfitEditPanel(FALSE); } -void LLSidepanelAppearance::showOutfitEditPanel() +void LLSidepanelAppearance::showOutfitEditPanel(bool update) { - mOutfitEdit->setVisible(TRUE); - - mPanelOutfitsInventory->setVisible(FALSE); + if (!mOutfitEdit) + return; + + toggleWearableEditPanel(FALSE); + toggleOutfitEditPanel(TRUE); - mFilterEditor->setVisible(FALSE); - mEditBtn->setVisible(FALSE); - mNewOutfitBtn->setVisible(FALSE); - mCurrOutfitPanel->setVisible(FALSE); + if (update) + { + mOutfitEdit->displayCurrentOutfit(); + } } void LLSidepanelAppearance::toggleOutfitEditPanel(BOOL visible) @@ -305,16 +284,27 @@ void LLSidepanelAppearance::toggleOutfitEditPanel(BOOL visible) if (!mOutfitEdit) return; + if (mOutfitEdit->getVisible() == visible) + { + // visibility isn't changing, hence nothing to do + return; + } + mOutfitEdit->setVisible(visible); if (mPanelOutfitsInventory) mPanelOutfitsInventory->setVisible(!visible); mFilterEditor->setVisible(!visible); - mEditBtn->setVisible(!visible); mNewOutfitBtn->setVisible(!visible); mCurrOutfitPanel->setVisible(!visible); } void LLSidepanelAppearance::toggleWearableEditPanel(BOOL visible, LLWearable *wearable) { + if (mEditWearable->getVisible() == visible) + { + // visibility isn't changing, hence nothing to do + return; + } + if (!wearable) { wearable = gAgentWearables.getWearable(LLWearableType::WT_SHAPE, 0); @@ -324,6 +314,13 @@ void LLSidepanelAppearance::toggleWearableEditPanel(BOOL visible, LLWearable *we return; } + // Save changes if closing. + if (!visible) + { + mEditWearable->saveChanges(); + } + + // Toggle panel visibility. mCurrOutfitPanel->setVisible(!visible); mEditWearable->setVisible(visible); @@ -332,21 +329,6 @@ void LLSidepanelAppearance::toggleWearableEditPanel(BOOL visible, LLWearable *we mPanelOutfitsInventory->setVisible(!visible); } -void LLSidepanelAppearance::updateVerbs() -{ - bool is_look_info_visible = mOutfitEdit->getVisible(); - - if (mPanelOutfitsInventory && !is_look_info_visible) - { -// const bool is_correct_type = (mPanelOutfitsInventory->getCorrectListenerForAction() != NULL); -// mEditBtn->setEnabled(is_correct_type); - } - else - { - mEditBtn->setEnabled(FALSE); - } -} - void LLSidepanelAppearance::refreshCurrentOutfitName(const std::string& name) { // Set current outfit status (wearing/unsaved). diff --git a/indra/newview/llsidepanelappearance.h b/indra/newview/llsidepanelappearance.h index 2900831099..a919b07ed6 100644 --- a/indra/newview/llsidepanelappearance.h +++ b/indra/newview/llsidepanelappearance.h @@ -60,11 +60,10 @@ public: void fetchInventory(); void inventoryFetched(); - void updateVerbs(); void onNewOutfitButtonClicked(); void showOutfitsInventoryPanel(); - void showOutfitEditPanel(); + void showOutfitEditPanel(bool update); void setWearablesLoading(bool val); private: @@ -73,12 +72,11 @@ private: void onOpenOutfitButtonClicked(); void onEditAppearanceButtonClicked(); void onEditOutfitButtonClicked(); - void onEditButtonClicked(); void onEditWearBackClicked(); //@deprecated use showXXX() methods instead void toggleOutfitEditPanel(BOOL visible); - void toggleWearableEditPanel(BOOL visible, LLWearable* wearable); + void toggleWearableEditPanel(BOOL visible, LLWearable* wearable = NULL); LLFilterEditor* mFilterEditor; LLPanelOutfitsInventory* mPanelOutfitsInventory; @@ -87,7 +85,6 @@ private: LLButton* mOpenOutfitBtn; LLButton* mEditAppearanceBtn; - LLButton* mEditBtn; LLButton* mNewOutfitBtn; LLPanel* mCurrOutfitPanel; @@ -103,10 +100,6 @@ private: // Search string for filtering landmarks and teleport // history locations std::string mFilterSubString; - - // Information type currently shown in Look Information panel - std::string mLookInfoType; - }; #endif //LL_LLSIDEPANELAPPEARANCE_H diff --git a/indra/newview/llsidetray.h b/indra/newview/llsidetray.h index 140a9c818a..e8fdee9430 100644 --- a/indra/newview/llsidetray.h +++ b/indra/newview/llsidetray.h @@ -94,7 +94,7 @@ public: * if no such tab - return NULL, otherwise a pointer to the panel * Pass params as array, or they may be overwritten(example - params["name"]="nearby") */ - LLPanel* showPanel (const std::string& panel_name, const LLSD& params); + LLPanel* showPanel (const std::string& panel_name, const LLSD& params = LLSD()); /** * Toggling Side Tray tab which contains "sub_panel" child of "panel_name" panel. @@ -102,7 +102,7 @@ public: * otherwise Side Tray is collapsed. * params are passed to "panel_name" panel onOpen(). */ - void togglePanel (LLPanel* &sub_panel, const std::string& panel_name, const LLSD& params); + void togglePanel (LLPanel* &sub_panel, const std::string& panel_name, const LLSD& params = LLSD()); /* * get the panel (don't show it or do anything else with it) diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 42428bab03..c245650d51 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -5597,10 +5597,7 @@ void handle_viewer_disable_message_log(void*) void handle_customize_avatar() { - if (gAgentWearables.areWearablesLoaded()) - { - gAgentCamera.changeCameraToCustomizeAvatar(); - } + LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "my_outfits")); } void handle_report_abuse() diff --git a/indra/newview/skins/default/xui/en/menu_attachment_self.xml b/indra/newview/skins/default/xui/en/menu_attachment_self.xml index 5c30b9ee94..dc51ae8b92 100644 --- a/indra/newview/skins/default/xui/en/menu_attachment_self.xml +++ b/indra/newview/skins/default/xui/en/menu_attachment_self.xml @@ -68,8 +68,8 @@ function="Self.EnableStandUp" /> + label="Change Outfit" + name="Change Outfit"> + name="Chenge Outfit"> + label="Change Outfit" + name="change_outfit"> + label="Change Outfit" + name="ChangeOutfit"> Date: Mon, 17 May 2010 09:20:57 +0300 Subject: EXT-6941 FIX setup global EditMenu handle setup global EditMenu handle when pressing mouse on FolderView. --HG-- branch : product-engine --- indra/newview/llfolderview.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index 2ae11aa2b5..a87f7288fa 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -1744,6 +1744,8 @@ BOOL LLFolderView::handleMouseDown( S32 x, S32 y, MASK mask ) mParentPanel->setFocus(TRUE); + LLEditMenuHandler::gEditMenuHandler = this; + return LLView::handleMouseDown( x, y, mask ); } -- cgit v1.2.3 From e462c90db6063ee67b95ea376c65089dd0061f6d Mon Sep 17 00:00:00 2001 From: Yuri Chebotarev Date: Mon, 17 May 2010 09:22:08 +0300 Subject: EXT-7051 FIX Add more server hardcoded strings to localization dict. --HG-- branch : product-engine --- indra/newview/llviewerinventory.cpp | 35 ++++++++++++++++++++++++++ indra/newview/skins/default/xui/en/strings.xml | 30 ++++++++++++++++++++++ 2 files changed, 65 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 49748c59e8..da8832b1a2 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -95,6 +95,41 @@ public: mInventoryItemsDict["New Script"] = LLTrans::getString("New Script"); mInventoryItemsDict["New Folder"] = LLTrans::getString("New Folder"); mInventoryItemsDict["Contents"] = LLTrans::getString("Contents"); + + mInventoryItemsDict["Gesture"] = LLTrans::getString("Gesture"); + mInventoryItemsDict["Male Gestures"] = LLTrans::getString("Male Gestures"); + mInventoryItemsDict["Female Gestures"] = LLTrans::getString("Female Gestures"); + mInventoryItemsDict["Other Gestures"] = LLTrans::getString("Other Gestures"); + mInventoryItemsDict["Speech Gestures"] = LLTrans::getString("Speech Gestures"); + + //predefined gestures + + //male + mInventoryItemsDict["Male - Excuse me"] = LLTrans::getString("Male - Excuse me"); + mInventoryItemsDict["Male - Get lost"] = LLTrans::getString("Male - Get lost"); + mInventoryItemsDict["Male - Blow kiss"] = LLTrans::getString("Male - Blow kiss"); + mInventoryItemsDict["Male - Boo"] = LLTrans::getString("Male - Boo"); + mInventoryItemsDict["Male - Bored"] = LLTrans::getString("Male - Bored"); + mInventoryItemsDict["Male - Hey"] = LLTrans::getString("Male - Hey"); + mInventoryItemsDict["Male - Laugh"] = LLTrans::getString("Male - Laugh"); + mInventoryItemsDict["Male - Repulsed"] = LLTrans::getString("Male - Repulsed"); + mInventoryItemsDict["Male - Shrug"] = LLTrans::getString("Male - Shrug"); + mInventoryItemsDict["Male - Stick tougue out"] = LLTrans::getString("Male - Stick tougue out"); + mInventoryItemsDict["Male - Wow"] = LLTrans::getString("Male - Wow"); + + //female + mInventoryItemsDict["FeMale - Excuse me"] = LLTrans::getString("FeMale - Excuse me"); + mInventoryItemsDict["FeMale - Get lost"] = LLTrans::getString("FeMale - Get lost"); + mInventoryItemsDict["FeMale - Blow kiss"] = LLTrans::getString("FeMale - Blow kiss"); + mInventoryItemsDict["FeMale - Boo"] = LLTrans::getString("FeMale - Boo"); + mInventoryItemsDict["Female - Bored"] = LLTrans::getString("Female - Bored"); + mInventoryItemsDict["Female - Hey"] = LLTrans::getString("Female - Hey"); + mInventoryItemsDict["Female - Laugh"] = LLTrans::getString("Female - Laugh"); + mInventoryItemsDict["Female - Repulsed"] = LLTrans::getString("Female - Repulsed"); + mInventoryItemsDict["Female - Shrug"] = LLTrans::getString("Female - Shrug"); + mInventoryItemsDict["Female - Stick tougue out"]= LLTrans::getString("Female - Stick tougue out"); + mInventoryItemsDict["Female - Wow"] = LLTrans::getString("Female - Wow"); + } }; diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index e028ef2077..bf28e78cf6 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -3137,6 +3137,36 @@ Abuse Report New Script New Folder Contents + Gesture + Male Gestures + Female Gestures + Other Gestures + Speech Gestures + + + Male - Excuse me + Male - Get lost + Male - Blow kiss + Male - Boo + Male - Bored + Male - Hey + Male - Laugh + Male - Repulsed + Male - Shrug + Male - Stick tougue out + Male - Wow + + FeMale - Excuse me + FeMale - Get lost + FeMale - Blow kiss + FeMale - Boo + Female - Bored + Female - Hey + Female - Laugh + Female - Repulsed + Female - Shrug + Female - Stick tougue out + Female - Wow [mthnum,datetime,slt]/[day,datetime,slt]/[year,datetime,slt] -- cgit v1.2.3 From f9dff766a8fbd6e8ee8db486c1d76ededdac7ed4 Mon Sep 17 00:00:00 2001 From: Yuri Chebotarev Date: Mon, 17 May 2010 09:49:33 +0300 Subject: EXT-7000 FIX "eat" TAB key while menu is active Two problems: 1. AvatarList didn't hide popup menu when goes invisible. 2. (Real problem) MenuHolder View didn't process TAB key. Which leads to changing active ("focused") control. Which leads to the ability (for example) to switch tabs and hide popup menu parent view. --HG-- branch : product-engine --- indra/newview/llavatarlist.cpp | 9 +++++++++ indra/newview/llavatarlist.h | 2 ++ indra/newview/llavatarlistitem.h | 1 + 3 files changed, 12 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp index 47ec5270c3..72ee289c91 100644 --- a/indra/newview/llavatarlist.cpp +++ b/indra/newview/llavatarlist.cpp @@ -399,6 +399,15 @@ BOOL LLAvatarList::handleRightMouseDown(S32 x, S32 y, MASK mask) return handled; } +void LLAvatarList::setVisible(BOOL visible) +{ + if ( visible == FALSE && mContextMenu ) + { + mContextMenu->hide(); + } + LLFlatListViewEx::setVisible(visible); +} + void LLAvatarList::computeDifference( const uuid_vec_t& vnew_unsorted, uuid_vec_t& vadded, diff --git a/indra/newview/llavatarlist.h b/indra/newview/llavatarlist.h index ff090f3a34..a9320055ca 100644 --- a/indra/newview/llavatarlist.h +++ b/indra/newview/llavatarlist.h @@ -70,6 +70,8 @@ public: virtual void clear(); + virtual void setVisible(BOOL visible); + void setNameFilter(const std::string& filter); void setDirty(bool val = true, bool force_refresh = false); uuid_vec_t& getIDs() { return mIDs; } diff --git a/indra/newview/llavatarlistitem.h b/indra/newview/llavatarlistitem.h index 3ba2c7a3e3..c6fac7a9f1 100644 --- a/indra/newview/llavatarlistitem.h +++ b/indra/newview/llavatarlistitem.h @@ -71,6 +71,7 @@ public: { public: virtual void show(LLView* spawning_view, const uuid_vec_t& selected_uuids, S32 x, S32 y) = 0; + virtual void hide() = 0; }; /** -- cgit v1.2.3 From 8739d0469ba5a766693664ca6dae0421d217ee38 Mon Sep 17 00:00:00 2001 From: Yuri Chebotarev Date: Mon, 17 May 2010 09:57:20 +0300 Subject: EXT-7106 FIX Change from commit callback to validate callback, remove some cyclic tab panel switches. Problem was caused by incorrect use on Commit callback (which didn't actually prevent from tab switching) which leads to cyclic tab switching. Validate callback actually prevents tab switching. Reviwed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/385/ --HG-- branch : product-engine --- indra/newview/llpanelgrouproles.cpp | 63 +++++++++++++------------------------ indra/newview/llpanelgrouproles.h | 3 +- 2 files changed, 22 insertions(+), 44 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index a77ba0c69c..93fbecfd3f 100644 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -118,8 +118,7 @@ LLPanelGroupRoles::LLPanelGroupRoles() mCurrentTab(NULL), mRequestedTab( NULL ), mSubTabContainer( NULL ), - mFirstUse( TRUE ), - mIgnoreTransition( FALSE ) + mFirstUse( TRUE ) { } @@ -153,8 +152,8 @@ BOOL LLPanelGroupRoles::postBuild() //subtabp->addObserver(this); } - // Add click callbacks to all the tabs. - mSubTabContainer->setCommitCallback(boost::bind(&LLPanelGroupRoles::handleClickSubTab, this)); + // Add click callbacks to tab switching. + mSubTabContainer->setValidateBeforeCommit(boost::bind(&LLPanelGroupRoles::handleSubTabSwitch, this, _1)); // Set the current tab to whatever is currently being shown. mCurrentTab = (LLPanelGroupTab*) mSubTabContainer->getCurrentPanel(); @@ -196,30 +195,20 @@ BOOL LLPanelGroupRoles::isVisibleByAgent(LLAgent* agentp) } -void LLPanelGroupRoles::handleClickSubTab() +bool LLPanelGroupRoles::handleSubTabSwitch(const LLSD& data) { - // If we are already handling a transition, - // ignore this. - if (mIgnoreTransition) - { - return; - } - - mRequestedTab = (LLPanelGroupTab*) mSubTabContainer->getCurrentPanel(); + std::string panel_name = data.asString(); + + LLPanelGroupTab* activating_tab = static_cast(mSubTabContainer->getPanelByName(panel_name)); - // Make sure they aren't just clicking the same tab... - if (mRequestedTab == mCurrentTab) + if(activating_tab == mCurrentTab + || activating_tab == mRequestedTab) { - return; + return true; } - // Try to switch from the current panel to the panel the user selected. - attemptTransition(); -} - -BOOL LLPanelGroupRoles::attemptTransition() -{ - // Check if the current tab needs to be applied. + mRequestedTab = activating_tab; + std::string mesg; if (mCurrentTab && mCurrentTab->needsApply(mesg)) { @@ -235,16 +224,10 @@ BOOL LLPanelGroupRoles::attemptTransition() LLNotificationsUtil::add("PanelGroupApply", args, LLSD(), boost::bind(&LLPanelGroupRoles::handleNotifyCallback, this, _1, _2)); mHasModal = TRUE; - // We need to reselect the current tab, since it isn't finished. - if (mSubTabContainer) - { - mIgnoreTransition = TRUE; - mSubTabContainer->selectTabPanel( mCurrentTab ); - mIgnoreTransition = FALSE; - } + // Returning FALSE will block a close action from finishing until // we get a response back from the user. - return FALSE; + return false; } else { @@ -253,7 +236,7 @@ BOOL LLPanelGroupRoles::attemptTransition() { transitionToTab(); } - return TRUE; + return true; } } @@ -271,6 +254,7 @@ void LLPanelGroupRoles::transitionToTab() // This is now the current tab; mCurrentTab = mRequestedTab; mCurrentTab->activate(); + mRequestedTab = 0; } } @@ -278,6 +262,7 @@ bool LLPanelGroupRoles::handleNotifyCallback(const LLSD& notification, const LLS { S32 option = LLNotificationsUtil::getSelectedOption(notification, response); mHasModal = FALSE; + LLPanelGroupTab* transition_tab = mRequestedTab; switch (option) { case 0: // "Apply Changes" @@ -297,26 +282,20 @@ bool LLPanelGroupRoles::handleNotifyCallback(const LLSD& notification, const LLS // Skip switching tabs. break; } - - // This panel's info successfully applied. - // Switch to the next panel. - // No break! Continue into 'Ignore Changes' which just switches tabs. - mIgnoreTransition = TRUE; - mSubTabContainer->selectTabPanel( mRequestedTab ); - mIgnoreTransition = FALSE; transitionToTab(); + mSubTabContainer->selectTabPanel( transition_tab ); + break; } case 1: // "Ignore Changes" // Switch to the requested panel without applying changes cancel(); - mIgnoreTransition = TRUE; - mSubTabContainer->selectTabPanel( mRequestedTab ); - mIgnoreTransition = FALSE; transitionToTab(); + mSubTabContainer->selectTabPanel( transition_tab ); break; case 2: // "Cancel" default: + mRequestedTab = NULL; // Do nothing. The user is canceling the action. break; } diff --git a/indra/newview/llpanelgrouproles.h b/indra/newview/llpanelgrouproles.h index 98cebe9882..a877402041 100644 --- a/indra/newview/llpanelgrouproles.h +++ b/indra/newview/llpanelgrouproles.h @@ -65,7 +65,7 @@ public: virtual BOOL isVisibleByAgent(LLAgent* agentp); - void handleClickSubTab(); + bool handleSubTabSwitch(const LLSD& data); // Checks if the current tab needs to be applied, and tries to switch to the requested tab. BOOL attemptTransition(); @@ -93,7 +93,6 @@ protected: LLPanelGroupTab* mRequestedTab; LLTabContainer* mSubTabContainer; BOOL mFirstUse; - BOOL mIgnoreTransition; std::string mDefaultNeedsApplyMesg; std::string mWantApplyMesg; -- cgit v1.2.3 From 3d4cb72f327eca1bf6b5af366e9e403392e8abc8 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Mon, 17 May 2010 12:04:22 +0300 Subject: EXT-7085 FIXED Corrected visibility of "Moderator Options Separator" reviewed by Mike Antipov --HG-- branch : product-engine --- indra/newview/llparticipantlist.cpp | 1 + indra/newview/skins/default/xui/en/menu_participant_list.xml | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index daf116d255..1117ae05d7 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -655,6 +655,7 @@ LLContextMenu* LLParticipantList::LLParticipantListMenu::createMenu() bool is_sort_visible = (mParent.mAvatarList && mParent.mAvatarList->size() > 1); main_menu->setItemVisible("SortByName", is_sort_visible); main_menu->setItemVisible("SortByRecentSpeakers", is_sort_visible); + main_menu->setItemVisible("Moderator Options Separator", isGroupModerator()); main_menu->setItemVisible("Moderator Options", isGroupModerator()); main_menu->setItemVisible("View Icons Separator", mParent.mAvatarListToggleIconsConnection.connected()); main_menu->setItemVisible("View Icons", mParent.mAvatarListToggleIconsConnection.connected()); diff --git a/indra/newview/skins/default/xui/en/menu_participant_list.xml b/indra/newview/skins/default/xui/en/menu_participant_list.xml index f126431263..4ed5807808 100644 --- a/indra/newview/skins/default/xui/en/menu_participant_list.xml +++ b/indra/newview/skins/default/xui/en/menu_participant_list.xml @@ -127,7 +127,8 @@ parameter="can_mute_text" /> + layout="topleft" + name="Moderator Options Separator"/> Date: Mon, 17 May 2010 16:40:08 +0300 Subject: EXT-7363 FIXED Added missing conversion of SLURL parameters string to query parameters map. reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/397/ --HG-- branch : product-engine --- indra/newview/llurldispatcher.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llurldispatcher.cpp b/indra/newview/llurldispatcher.cpp index a31c3a0f1b..9efa6c4108 100644 --- a/indra/newview/llurldispatcher.cpp +++ b/indra/newview/llurldispatcher.cpp @@ -151,8 +151,9 @@ bool LLURLDispatcherImpl::dispatchApp(const LLSLURL& slurl, bool trusted_browser) { llinfos << "cmd: " << slurl.getAppCmd() << " path: " << slurl.getAppPath() << " query: " << slurl.getAppQuery() << llendl; + const LLSD& query_map = LLURI::queryMap(slurl.getAppQuery()); bool handled = LLCommandDispatcher::dispatch( - slurl.getAppCmd(), slurl.getAppPath(), slurl.getAppQuery(), web, trusted_browser); + slurl.getAppCmd(), slurl.getAppPath(), query_map, web, trusted_browser); // alert if we didn't handle this secondlife:///app/ SLURL // (but still return true because it is a valid app SLURL) -- cgit v1.2.3 From bf197d4f410b686a80bd66ab7a3fcc761e8591ca Mon Sep 17 00:00:00 2001 From: Andrew Polunin Date: Mon, 17 May 2010 16:52:44 +0300 Subject: EXT-7199 FIXED (Enable dragging items from inventory view to current outfit in Outfit Editor) - HandleDragAndDrop() method was overridden in the LLPanelOutfitEdit class to handle drag and drop operations of the Clothing, Body Parts and Attachments. - In panel_outfit_edit.xml parameter allow_multi_select was set to true to allow multiple selections. - Added class LLCOFDragAndDropObserver to implement the drag and drop. - Class LLInventoryMoveFromWorldObserver renamed to LLInventoryAddItemByAssetObserver. Drag and drop reimplemented using functionality of the LLInventoryAddItemByAssetObserver. Reviewed by Neal Orman and Mike Antipov at https://codereview.productengine.com/secondlife/r/373/ --HG-- branch : product-engine --- indra/newview/llinventoryobserver.cpp | 6 +- indra/newview/llinventoryobserver.h | 4 +- indra/newview/llpaneloutfitedit.cpp | 89 +++++++++++++++++++++- indra/newview/llpaneloutfitedit.h | 9 +++ indra/newview/llviewermessage.cpp | 4 +- .../skins/default/xui/en/panel_outfit_edit.xml | 2 +- 6 files changed, 105 insertions(+), 9 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp index c24d2ee0ea..8557548887 100644 --- a/indra/newview/llinventoryobserver.cpp +++ b/indra/newview/llinventoryobserver.cpp @@ -493,7 +493,7 @@ void LLInventoryExistenceObserver::changed(U32 mask) } } -void LLInventoryMoveFromWorldObserver::changed(U32 mask) +void LLInventoryAddItemByAssetObserver::changed(U32 mask) { if(!(mask & LLInventoryObserver::ADD)) { @@ -535,7 +535,7 @@ void LLInventoryMoveFromWorldObserver::changed(U32 mask) } } -void LLInventoryMoveFromWorldObserver::watchAsset(const LLUUID& asset_id) +void LLInventoryAddItemByAssetObserver::watchAsset(const LLUUID& asset_id) { if(asset_id.notNull()) { @@ -551,7 +551,7 @@ void LLInventoryMoveFromWorldObserver::watchAsset(const LLUUID& asset_id) } } -bool LLInventoryMoveFromWorldObserver::isAssetWatched( const LLUUID& asset_id ) +bool LLInventoryAddItemByAssetObserver::isAssetWatched( const LLUUID& asset_id ) { return std::find(mWatchedAssets.begin(), mWatchedAssets.end(), asset_id) != mWatchedAssets.end(); } diff --git a/indra/newview/llinventoryobserver.h b/indra/newview/llinventoryobserver.h index 036e6ca40d..6d5a86a6fc 100644 --- a/indra/newview/llinventoryobserver.h +++ b/indra/newview/llinventoryobserver.h @@ -180,10 +180,10 @@ protected: // something useful. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -class LLInventoryMoveFromWorldObserver : public LLInventoryObserver +class LLInventoryAddItemByAssetObserver : public LLInventoryObserver { public: - LLInventoryMoveFromWorldObserver() : mIsDirty(false) {} + LLInventoryAddItemByAssetObserver() : mIsDirty(false) {} virtual void changed(U32 mask); void watchAsset(const LLUUID& asset_id); diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index c04be85174..44832ac496 100644 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -169,14 +169,48 @@ protected: S32 mBaseOutfitLastVersion; }; +class LLCOFDragAndDropObserver : public LLInventoryAddItemByAssetObserver +{ +public: + LLCOFDragAndDropObserver(LLInventoryModel* model); + + virtual ~LLCOFDragAndDropObserver(); + + virtual void done(); + +private: + LLInventoryModel* mModel; +}; + +inline LLCOFDragAndDropObserver::LLCOFDragAndDropObserver(LLInventoryModel* model): + mModel(model) +{ + if (model != NULL) + { + model->addObserver(this); + } +} + +inline LLCOFDragAndDropObserver::~LLCOFDragAndDropObserver() +{ + if (mModel != NULL && mModel->containsObserver(this)) + { + mModel->removeObserver(this); + } +} +void LLCOFDragAndDropObserver::done() +{ + LLAppearanceMgr::instance().updateAppearanceFromCOF(); +} LLPanelOutfitEdit::LLPanelOutfitEdit() : LLPanel(), mSearchFilter(NULL), mCOFWearables(NULL), mInventoryItemsPanel(NULL), - mCOFObserver(NULL) + mCOFObserver(NULL), + mCOFDragAndDropObserver(NULL) { mSavedFolderState = new LLSaveFolderState(); mSavedFolderState->setApply(FALSE); @@ -197,6 +231,7 @@ LLPanelOutfitEdit::~LLPanelOutfitEdit() delete mSavedFolderState; delete mCOFObserver; + delete mCOFDragAndDropObserver; } BOOL LLPanelOutfitEdit::postBuild() @@ -234,6 +269,8 @@ BOOL LLPanelOutfitEdit::postBuild() mInventoryItemsPanel->setSelectCallback(boost::bind(&LLPanelOutfitEdit::onInventorySelectionChange, this, _1, _2)); mInventoryItemsPanel->getRootFolder()->setReshapeCallback(boost::bind(&LLPanelOutfitEdit::onInventorySelectionChange, this, _1, _2)); + mCOFDragAndDropObserver = new LLCOFDragAndDropObserver(mInventoryItemsPanel->getModel()); + LLComboBox* type_filter = getChild("filter_wearables_combobox"); type_filter->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onTypeFilterChanged, this, _1)); type_filter->removeall(); @@ -522,6 +559,56 @@ void LLPanelOutfitEdit::update() updateVerbs(); } +BOOL LLPanelOutfitEdit::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + EDragAndDropType cargo_type, + void* cargo_data, + EAcceptance* accept, + std::string& tooltip_msg) +{ + if (cargo_data == NULL) + { + llwarns << "cargo_data is NULL" << llendl; + return TRUE; + } + + switch (cargo_type) + { + case DAD_BODYPART: + case DAD_CLOTHING: + case DAD_OBJECT: + case DAD_LINK: + *accept = ACCEPT_YES_MULTI; + break; + default: + *accept = ACCEPT_NO; + } + + if (drop) + { + LLInventoryItem* item = static_cast(cargo_data); + + if (LLAssetType::lookupIsAssetIDKnowable(item->getType())) + { + mCOFDragAndDropObserver->watchAsset(item->getAssetUUID()); + + /* + * Adding request to wear item. If the item is a link, then getLinkedUUID() will + * return the ID of the linked item. Otherwise it will return the item's ID. The + * second argument is used to delay the appearance update until all dragged items + * are added to optimize user experience. + */ + LLAppearanceMgr::instance().addCOFItemLink(item->getLinkedUUID(), false); + } + else + { + // if asset id is not available for the item we must wear it immediately (attachments only) + LLAppearanceMgr::instance().addCOFItemLink(item->getLinkedUUID(), true); + } + } + + return TRUE; +} + void LLPanelOutfitEdit::displayCurrentOutfit() { if (!getVisible()) diff --git a/indra/newview/llpaneloutfitedit.h b/indra/newview/llpaneloutfitedit.h index cb8283fca3..953a70785c 100644 --- a/indra/newview/llpaneloutfitedit.h +++ b/indra/newview/llpaneloutfitedit.h @@ -50,6 +50,7 @@ class LLCOFWearables; class LLTextBox; class LLInventoryCategory; class LLCOFObserver; +class LLCOFDragAndDropObserver; class LLInventoryPanel; class LLSaveFolderState; class LLFolderViewItem; @@ -114,6 +115,12 @@ public: */ bool switchPanels(LLPanel* switch_from_panel, LLPanel* switch_to_panel); + virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + EDragAndDropType cargo_type, + void* cargo_data, + EAcceptance* accept, + std::string& tooltip_msg); + private: @@ -134,6 +141,8 @@ private: LLPanel* mWearableItemsPanel; LLCOFObserver* mCOFObserver; + LLCOFDragAndDropObserver* mCOFDragAndDropObserver; + std::vector mLookItemTypes; LLCOFWearables* mCOFWearables; diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 86e040692c..fb87e2d3b9 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -774,11 +774,11 @@ private: * We can't create it each time items are moved because "drop" event is sent separately for each * element even while multi-dragging. We have to have the only instance of the observer. See EXT-4347. */ -class LLViewerInventoryMoveFromWorldObserver : public LLInventoryMoveFromWorldObserver +class LLViewerInventoryMoveFromWorldObserver : public LLInventoryAddItemByAssetObserver { public: LLViewerInventoryMoveFromWorldObserver() - : LLInventoryMoveFromWorldObserver() + : LLInventoryAddItemByAssetObserver() , mActivePanel(NULL) { diff --git a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml index f661d7e237..9072418329 100644 --- a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml +++ b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml @@ -292,7 +292,7 @@ width="311" user_resize="true"> Date: Mon, 17 May 2010 15:02:34 +0100 Subject: EXT-6964 FIXED Added back the secondlife:///app/appearance SLapp handler. This was removed inadvertantly in change 1fc92fc19c98. --- indra/newview/llappearancemgr.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index bcaba34921..be840cc348 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -55,6 +55,25 @@ char ORDER_NUMBER_SEPARATOR('@'); +// support for secondlife:///app/appearance SLapps +class LLAppearanceHandler : public LLCommandHandler +{ +public: + // requests will be throttled from a non-trusted browser + LLAppearanceHandler() : LLCommandHandler("appearance", UNTRUSTED_THROTTLE) {} + + bool handle(const LLSD& params, const LLSD& query_map, LLMediaCtrl* web) + { + // support secondlife:///app/appearance/show, but for now we just + // make all secondlife:///app/appearance SLapps behave this way + LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD()); + return true; + } +}; + +LLAppearanceHandler gAppearanceHandler; + + LLUUID findDescendentCategoryIDByName(const LLUUID& parent_id, const std::string& name) { LLInventoryModel::cat_array_t cat_array; -- cgit v1.2.3 From 4683283a666e3c34b6df52951b96c342a44679a8 Mon Sep 17 00:00:00 2001 From: Yuri Chebotarev Date: Mon, 17 May 2010 18:36:53 +0300 Subject: EXT-7045 FIX miss one more texture setup place. Also remove redundant variable and do some refactoring. Reviwed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/391/ --HG-- branch : product-engine --- indra/newview/llpanelgroupgeneral.cpp | 14 ++------------ indra/newview/llpanelgroupgeneral.h | 1 - indra/newview/lltexturectrl.cpp | 14 ++++++++++++++ indra/newview/lltexturectrl.h | 4 +++- 4 files changed, 19 insertions(+), 14 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp index ddd41a1791..555248e31a 100644 --- a/indra/newview/llpanelgroupgeneral.cpp +++ b/indra/newview/llpanelgroupgeneral.cpp @@ -212,7 +212,6 @@ void LLPanelGroupGeneral::setupCtrls(LLPanel* panel_group) if (mInsignia) { mInsignia->setCommitCallback(onCommitAny, this); - mDefaultIconID = mInsignia->getImageAssetID(); } mFounderName = getChild("founder_name"); @@ -656,7 +655,7 @@ void LLPanelGroupGeneral::update(LLGroupChange gc) } else { - mInsignia->setImageAssetID(mDefaultIconID); + mInsignia->setImageAssetName(mInsignia->getDefaultImageName()); } } @@ -846,16 +845,7 @@ void LLPanelGroupGeneral::reset() mInsignia->setEnabled(true); - LLPointer imagep = LLUI::getUIImage(mInsignia->getDefaultImageName()); - if(imagep) - { - LLViewerFetchedTexture* pTexture = dynamic_cast(imagep->getImage().get()); - if(pTexture) - { - LLUUID id = pTexture->getID(); - mInsignia->setImageAssetID(id); - } - } + mInsignia->setImageAssetName(mInsignia->getDefaultImageName()); { std::string empty_str = ""; diff --git a/indra/newview/llpanelgroupgeneral.h b/indra/newview/llpanelgroupgeneral.h index 6245018871..6f4fa994da 100644 --- a/indra/newview/llpanelgroupgeneral.h +++ b/indra/newview/llpanelgroupgeneral.h @@ -95,7 +95,6 @@ private: BOOL mChanged; BOOL mFirstUse; std::string mIncompleteMemberDataStr; - LLUUID mDefaultIconID; // Group information (include any updates in updateChanged) LLLineEditor *mGroupNameEditor; diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index a1b3c8dabd..6165d309c3 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -1137,6 +1137,20 @@ void LLTextureCtrl::onFloaterCommit(ETexturePickOp op) } } +void LLTextureCtrl::setImageAssetName(const std::string& name) +{ + LLPointer imagep = LLUI::getUIImage(name); + if(imagep) + { + LLViewerFetchedTexture* pTexture = dynamic_cast(imagep->getImage().get()); + if(pTexture) + { + LLUUID id = pTexture->getID(); + setImageAssetID(id); + } + } +} + void LLTextureCtrl::setImageAssetID( const LLUUID& asset_id ) { if( mImageAssetID != asset_id ) diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h index 837f837430..bcd0a083f2 100644 --- a/indra/newview/lltexturectrl.h +++ b/indra/newview/lltexturectrl.h @@ -128,7 +128,7 @@ public: virtual void clear(); // Takes a UUID, wraps get/setImageAssetID - virtual void setValue(const LLSD& value ); + virtual void setValue(const LLSD& value); virtual LLSD getValue() const; // LLTextureCtrl interface @@ -142,6 +142,8 @@ public: const LLUUID& getImageItemID() { return mImageItemID; } + virtual void setImageAssetName(const std::string& name); + void setImageAssetID(const LLUUID &image_asset_id); const LLUUID& getImageAssetID() const { return mImageAssetID; } -- cgit v1.2.3 From fcea61df76ce69b438d26037df4bafc3380f129d Mon Sep 17 00:00:00 2001 From: Yuri Chebotarev Date: Mon, 17 May 2010 18:39:11 +0300 Subject: EXT-7266 FIX change default icon id tofrom object icon to id that comes with message Reviwed by Igor Borovkov at https://codereview.productengine.com/secondlife/r/371/ --HG-- branch : product-engine --- indra/newview/llchatitemscontainerctrl.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp index 5b6a99e793..35a244c461 100644 --- a/indra/newview/llchatitemscontainerctrl.cpp +++ b/indra/newview/llchatitemscontainerctrl.cpp @@ -326,12 +326,14 @@ void LLNearbyChatToastPanel::draw() if(icon) { icon->setDrawTooltip(mSourceType == CHAT_SOURCE_AGENT); - if(mSourceType == CHAT_SOURCE_AGENT) - icon->setValue(mFromID); + if(mSourceType == CHAT_SOURCE_OBJECT) + icon->setValue(LLSD("OBJECT_Icon")); else if(mSourceType == CHAT_SOURCE_SYSTEM) icon->setValue(LLSD("SL_Logo")); - else - icon->setValue(LLSD("OBJECT_Icon")); + else if(mSourceType == CHAT_SOURCE_AGENT) + icon->setValue(mFromID); + else if(!mFromID.isNull()) + icon->setValue(mFromID); } mIsDirty = false; } -- cgit v1.2.3 From d8b989a87b94fd851404b42094e88c0a0c213ac8 Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Mon, 17 May 2010 18:57:03 +0300 Subject: EXT-7158 ADDITIONAL FIX Optimization and implementation fix - Fixed issue with filter not applied to outfit newly added while filtering is active. - Optimization of refreshing outfit list when filter is applied - list is not refreshed on every list visibility change. Reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/394/ --HG-- branch : product-engine --- indra/newview/llinventoryitemslist.cpp | 10 +++++----- indra/newview/llinventoryitemslist.h | 8 +++++++- indra/newview/lloutfitslist.cpp | 35 +++++++++++++++++++++++++++++----- indra/newview/lloutfitslist.h | 2 +- 4 files changed, 43 insertions(+), 12 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventoryitemslist.cpp b/indra/newview/llinventoryitemslist.cpp index 2d1d401cd4..9b592e79af 100644 --- a/indra/newview/llinventoryitemslist.cpp +++ b/indra/newview/llinventoryitemslist.cpp @@ -322,7 +322,7 @@ LLInventoryItemsList::Params::Params() LLInventoryItemsList::LLInventoryItemsList(const LLInventoryItemsList::Params& p) : LLFlatListViewEx(p) , mNeedsRefresh(false) -, mPrevVisibility(false) +, mForceRefresh(false) { // TODO: mCommitOnSelectionChange is set to "false" in LLFlatListView // but reset to true in all derived classes. This settings might need to @@ -356,14 +356,13 @@ boost::signals2::connection LLInventoryItemsList::setRefreshCompleteCallback(con void LLInventoryItemsList::doIdle() { - bool cur_visibility = getVisible(); - if(cur_visibility != mPrevVisibility || mNeedsRefresh) + if (!mNeedsRefresh) return; + + if (isInVisibleChain() || mForceRefresh) { refresh(); mRefreshCompleteSignal(this, LLSD()); - - mPrevVisibility = getVisible(); } } @@ -414,6 +413,7 @@ void LLInventoryItemsList::refresh() bool needs_refresh = add_limit_exceeded; setNeedsRefresh(needs_refresh); + setForceRefresh(needs_refresh); } void LLInventoryItemsList::computeDifference( diff --git a/indra/newview/llinventoryitemslist.h b/indra/newview/llinventoryitemslist.h index 60cccc0f4f..a3863b511c 100644 --- a/indra/newview/llinventoryitemslist.h +++ b/indra/newview/llinventoryitemslist.h @@ -221,6 +221,12 @@ public: bool getNeedsRefresh(){ return mNeedsRefresh; } + /** + * Sets the flag indicating that the list needs to be refreshed even if it is + * not currently visible. + */ + void setForceRefresh(bool force_refresh){ mForceRefresh = force_refresh; } + /** * Idle routine used to refresh the list regardless of the current list * visibility, unlike draw() which is called only for the visible list. @@ -259,7 +265,7 @@ private: // Will be used in refresh() to determine added and removed ids bool mNeedsRefresh; - bool mPrevVisibility; + bool mForceRefresh; commit_signal_t mRefreshCompleteSignal; }; diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp index 12d5203429..43b7e15977 100644 --- a/indra/newview/lloutfitslist.cpp +++ b/indra/newview/lloutfitslist.cpp @@ -170,7 +170,7 @@ void LLOutfitsList::refreshList(const LLUUID& category_id) list->setCommitCallback(boost::bind(&LLOutfitsList::onSelectionChange, this, _1)); // Setting list refresh callback to apply filter on list change. - list->setRefreshCompleteCallback(boost::bind(&LLOutfitsList::onWearableItemsListRefresh, this, _1)); + list->setRefreshCompleteCallback(boost::bind(&LLOutfitsList::onFilteredWearableItemsListRefresh, this, _1)); // Fetch the new outfit contents. cat->fetch(); @@ -178,6 +178,21 @@ void LLOutfitsList::refreshList(const LLUUID& category_id) // Refresh the list of outfit items after fetch(). // Further list updates will be triggered by the category observer. list->updateList(cat_id); + + // If filter is currently applied we store the initial tab state and + // open it to show matched items if any. + if (!mFilterSubString.empty()) + { + tab->notifyChildren(LLSD().with("action","store_state")); + tab->setDisplayChildren(true); + + // Setting mForceRefresh flag will make the list refresh its contents + // even if it is not currently visible. This is required to apply the + // filter to the newly added list. + list->setForceRefresh(true); + + list->setFilterSubString(mFilterSubString); + } } // Handle removed tabs. @@ -327,7 +342,7 @@ void LLOutfitsList::changeOutfitSelection(LLWearableItemsList* list, const LLUUI mSelectedOutfitUUID = category_id; } -void LLOutfitsList::onWearableItemsListRefresh(LLUICtrl* ctrl) +void LLOutfitsList::onFilteredWearableItemsListRefresh(LLUICtrl* ctrl) { if (!ctrl || mFilterSubString.empty()) return; @@ -338,7 +353,7 @@ void LLOutfitsList::onWearableItemsListRefresh(LLUICtrl* ctrl) iter != iter_end; ++iter) { LLAccordionCtrlTab* tab = iter->second; - if (tab) continue; + if (!tab) continue; LLWearableItemsList* list = dynamic_cast(tab->getAccordionView()); if (list != ctrl) continue; @@ -395,8 +410,6 @@ void LLOutfitsList::applyFilter(const std::string& new_filter_substring) if (!new_filter_substring.empty()) { - tab->setDisplayChildren(true); - std::string title = tab->getTitle(); LLStringUtil::toUpper(title); @@ -413,6 +426,18 @@ void LLOutfitsList::applyFilter(const std::string& new_filter_substring) { tab->setTitle(tab->getTitle(), cur_filter); } + + if (tab->getVisible()) + { + // Open tab if it has passed the filter. + tab->setDisplayChildren(true); + } + else + { + // Set force refresh flag to refresh not visible list + // when some changes occur in it. + list->setForceRefresh(true); + } } else { diff --git a/indra/newview/lloutfitslist.h b/indra/newview/lloutfitslist.h index bcb393b12a..8eaa39e6f1 100644 --- a/indra/newview/lloutfitslist.h +++ b/indra/newview/lloutfitslist.h @@ -98,7 +98,7 @@ private: * Called upon list refresh event to update tab visibility depending on * the results of applying filter to the title and list items of the tab. */ - void onWearableItemsListRefresh(LLUICtrl* ctrl); + void onFilteredWearableItemsListRefresh(LLUICtrl* ctrl); /** * Highlights filtered items and hides tabs which haven't passed filter. -- cgit v1.2.3 From 05a44d78ff6f83388945999c4f84954a0a900879 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Mon, 17 May 2010 12:13:02 -0400 Subject: EXT-7353 FIXED short cuts (links) to textures should show up in the texture picker Added flag for controlling whether links show up in filtered lists. --- indra/newview/llinventoryfilter.cpp | 50 +++++++++++++++++++++++++++++++------ 1 file changed, 43 insertions(+), 7 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index 901a570487..c90919e8fd 100644 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -41,6 +41,7 @@ #include "llinventorymodelbackgroundfetch.h" #include "llviewercontrol.h" #include "llfolderview.h" +#include "llinventorybridge.h" // linden library includes #include "lltrans.h" @@ -54,7 +55,8 @@ LLInventoryFilter::FilterOps::FilterOps() : mShowFolderState(SHOW_NON_EMPTY_FOLDERS), mPermissions(PERM_NONE), mFilterTypes(FILTERTYPE_OBJECT), - mFilterUUID(LLUUID::null) + mFilterUUID(LLUUID::null), + mIncludeLinks(TRUE) { } @@ -97,23 +99,23 @@ BOOL LLInventoryFilter::check(const LLFolderViewItem* item) return TRUE; } - const LLFolderViewEventListener* listener = item->getListener(); mSubStringMatchOffset = mFilterSubString.size() ? item->getSearchableLabel().find(mFilterSubString) : std::string::npos; const BOOL passed_filtertype = checkAgainstFilterType(item); - const BOOL passed = passed_filtertype && - (mFilterSubString.size() == 0 || mSubStringMatchOffset != std::string::npos) && - ((listener->getPermissionMask() & mFilterOps.mPermissions) == mFilterOps.mPermissions); + const BOOL passed_permissions = checkAgainstPermissions(item); + const BOOL passed = (passed_filtertype && + passed_permissions && + (mFilterSubString.size() == 0 || mSubStringMatchOffset != std::string::npos)); return passed; } -BOOL LLInventoryFilter::checkAgainstFilterType(const LLFolderViewItem* item) +BOOL LLInventoryFilter::checkAgainstFilterType(const LLFolderViewItem* item) const { const LLFolderViewEventListener* listener = item->getListener(); if (!listener) return FALSE; - const LLInventoryType::EType object_type = listener->getInventoryType(); + LLInventoryType::EType object_type = listener->getInventoryType(); const LLUUID object_id = listener->getUUID(); const LLInventoryObject *object = gInventory.getObject(object_id); @@ -128,7 +130,9 @@ BOOL LLInventoryFilter::checkAgainstFilterType(const LLFolderViewItem* item) if (object_type == LLInventoryType::IT_NONE) { if (object && object->getIsLinkType()) + { return FALSE; + } } else if ((1LL << object_type & mFilterOps.mFilterObjectTypes) == U64(0)) { @@ -203,6 +207,22 @@ BOOL LLInventoryFilter::checkAgainstFilterType(const LLFolderViewItem* item) return TRUE; } +BOOL LLInventoryFilter::checkAgainstPermissions(const LLFolderViewItem* item) const +{ + const LLFolderViewEventListener* listener = item->getListener(); + if (!listener) return FALSE; + + PermissionMask perm = listener->getPermissionMask(); + const LLInvFVBridge *bridge = dynamic_cast(item->getListener()); + if (bridge && bridge->isLink()) + { + const LLUUID& linked_uuid = gInventory.getLinkedItemID(bridge->getUUID()); + const LLViewerInventoryItem *linked_item = gInventory.getItem(linked_uuid); + if (linked_item) + perm = linked_item->getPermissionMask(); + } + return (perm & mFilterOps.mPermissions) == mFilterOps.mPermissions; +} const std::string& LLInventoryFilter::getFilterSubString(BOOL trim) const { @@ -451,6 +471,18 @@ void LLInventoryFilter::setHoursAgo(U32 hours) mFilterOps.mFilterTypes |= FILTERTYPE_DATE; } +void LLInventoryFilter::setIncludeLinks(BOOL include_links) +{ + if (mFilterOps.mIncludeLinks != include_links) + { + if (!mFilterOps.mIncludeLinks) + setModified(FILTER_LESS_RESTRICTIVE); + else + setModified(FILTER_MORE_RESTRICTIVE); + } + mFilterOps.mIncludeLinks = include_links; +} + void LLInventoryFilter::setShowFolderState(EFolderShow state) { if (mFilterOps.mShowFolderState != state) @@ -826,6 +858,10 @@ U32 LLInventoryFilter::getHoursAgo() const { return mFilterOps.mHoursAgo; } +BOOL LLInventoryFilter::getIncludeLinks() const +{ + return mFilterOps.mIncludeLinks; +} LLInventoryFilter::EFolderShow LLInventoryFilter::getShowFolderState() const { return mFilterOps.mShowFolderState; -- cgit v1.2.3 From 01eca6f45ee3abf599e669cdf90f4316899f8a22 Mon Sep 17 00:00:00 2001 From: Eli Linden Date: Mon, 17 May 2010 16:33:56 -0700 Subject: ND-46735 WIP JA linguistic --- indra/newview/skins/default/xui/ja/strings.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/ja/strings.xml b/indra/newview/skins/default/xui/ja/strings.xml index 560465f808..261c49931e 100644 --- a/indra/newview/skins/default/xui/ja/strings.xml +++ b/indra/newview/skins/default/xui/ja/strings.xml @@ -1630,25 +1630,25 @@ が渡しました - You decline + 拒否: - from + 送信元: 合計 - は購入しました + 購入: - があなたに支払いました + あなたに支払い: paid into - bought pass to + 入場許可を購入: がイベント用の費用を支払いました -- cgit v1.2.3 From f8e01d512af0a05cf5006bc974f1725c7151f785 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Mon, 17 May 2010 20:40:46 -0400 Subject: EXT-7384 FIXED Aesthetic changes to debug textures floater Texture floater now scrolls appropriately. --- .../default/xui/en/floater_avatar_textures.xml | 47 ++++++++++++++-------- 1 file changed, 30 insertions(+), 17 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/floater_avatar_textures.xml b/indra/newview/skins/default/xui/en/floater_avatar_textures.xml index e30e958543..6690e9748a 100644 --- a/indra/newview/skins/default/xui/en/floater_avatar_textures.xml +++ b/indra/newview/skins/default/xui/en/floater_avatar_textures.xml @@ -1,16 +1,39 @@ + width="1240" + can_resize="true"> INVALID AVATAR + + + Baked Textures @@ -43,27 +66,17 @@ top_delta="0" width="150" /> - + width="1230"> + Date: Mon, 17 May 2010 20:41:30 -0400 Subject: EXT-7385 FIXED Show load and discard level for loading textures More debugging information is now shown for loading textures --- indra/newview/lltexturectrl.cpp | 40 ++++++++++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 8 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index a1b3c8dabd..f6479bd004 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -1248,25 +1248,49 @@ void LLTextureCtrl::draw() mTentativeLabel->setVisible( !mTexturep.isNull() && getTentative() ); - // Show "Loading..." string on the top left corner while this texture is loading. // Using the discard level, do not show the string if the texture is almost but not // fully loaded. - if ( mTexturep.notNull() && - (!mTexturep->isFullyLoaded()) && - (mShowLoadingPlaceholder == TRUE) && - (mTexturep->getDiscardLevel() != 1) && - (mTexturep->getDiscardLevel() != 0)) + if (mTexturep.notNull() && + (!mTexturep->isFullyLoaded()) && + (mShowLoadingPlaceholder == TRUE) && + (mTexturep->getDiscardLevel() != 1) && + (mTexturep->getDiscardLevel() != 0)) { + U32 v_offset = 25; LLFontGL* font = LLFontGL::getFontSansSerif(); font->renderUTF8( - mLoadingPlaceholderString, 0, + mLoadingPlaceholderString, + 0, llfloor(interior.mLeft+3), - llfloor(interior.mTop-25), + llfloor(interior.mTop-v_offset), LLColor4::white, LLFontGL::LEFT, LLFontGL::BASELINE, LLFontGL::DROP_SHADOW); + + // Show more detailed information if this agent is god. + if (gAgent.isGodlike()) + { + LLFontGL* font = LLFontGL::getFontSansSerif(); + std::string tdesc; + // Show what % the texture has loaded (0 to 100%, 100 is highest), and what level of detail (5 to 0, 0 is best). + + v_offset += 12; + tdesc = llformat(" PK : %d%%", U32(mTexturep->getDownloadProgress()*100.0)); + font->renderUTF8(tdesc, 0, llfloor(interior.mLeft+3), llfloor(interior.mTop-v_offset), + LLColor4::white, LLFontGL::LEFT, LLFontGL::BASELINE, LLFontGL::DROP_SHADOW); + + v_offset += 12; + tdesc = llformat(" LVL: %d", mTexturep->getDiscardLevel()); + font->renderUTF8(tdesc, 0, llfloor(interior.mLeft+3), llfloor(interior.mTop-v_offset), + LLColor4::white, LLFontGL::LEFT, LLFontGL::BASELINE, LLFontGL::DROP_SHADOW); + + v_offset += 12; + tdesc = llformat(" ID : %s...", (mImageAssetID.asString().substr(0,10)).c_str()); + font->renderUTF8(tdesc, 0, llfloor(interior.mLeft+3), llfloor(interior.mTop-v_offset), + LLColor4::white, LLFontGL::LEFT, LLFontGL::BASELINE, LLFontGL::DROP_SHADOW); + } } LLUICtrl::draw(); -- cgit v1.2.3 From e9d3fcbbb9c99ba2711980f4d70dc76ed05fb65c Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Tue, 18 May 2010 11:47:16 +0300 Subject: EXT-7365 FIXED Added alert toast panel to GLOBAL group of exclude list of transient floater manager(the same as sidebar); reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/396/ --HG-- branch : product-engine --- indra/newview/lltoastalertpanel.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp index 2b529a4e50..6c6eda2e68 100644 --- a/indra/newview/lltoastalertpanel.cpp +++ b/indra/newview/lltoastalertpanel.cpp @@ -50,6 +50,7 @@ #include "llnotifications.h" #include "llfunctorregistry.h" #include "llrootview.h" +#include "lltransientfloatermgr.h" #include "llviewercontrol.h" // for gSavedSettings const S32 MAX_ALLOWED_MSG_WIDTH = 400; @@ -324,6 +325,9 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal mDefaultBtnTimer.start(); mDefaultBtnTimer.setTimerExpirySec(DEFAULT_BUTTON_DELAY); } + + LLTransientFloaterMgr::instance().addControlView( + LLTransientFloaterMgr::GLOBAL, this); } bool LLToastAlertPanel::setCheckBox( const std::string& check_title, const std::string& check_control ) @@ -377,6 +381,8 @@ void LLToastAlertPanel::setVisible( BOOL visible ) LLToastAlertPanel::~LLToastAlertPanel() { + LLTransientFloaterMgr::instance().removeControlView( + LLTransientFloaterMgr::GLOBAL, this); } BOOL LLToastAlertPanel::hasTitleBar() const -- cgit v1.2.3 From 8ea6cc7dc235184267f265234228981d97e835f9 Mon Sep 17 00:00:00 2001 From: Andrew Polunin Date: Tue, 18 May 2010 14:15:52 +0300 Subject: EXT-7362 FIXED (World Map - make teleport button green) Default value for button's attribute 'image_unselected' was overriden: image_unselected=\"PushButton_On\". Reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/399/ --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/floater_world_map.xml | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/floater_world_map.xml b/indra/newview/skins/default/xui/en/floater_world_map.xml index 233ab2c1b2..fa5a0b77f9 100644 --- a/indra/newview/skins/default/xui/en/floater_world_map.xml +++ b/indra/newview/skins/default/xui/en/floater_world_map.xml @@ -538,6 +538,7 @@ + + + + Date: Wed, 19 May 2010 15:26:05 +0300 Subject: EXT-7320 FIXED Moved date time stamp template to localized xml. reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/406/ --HG-- branch : product-engine --- indra/newview/llfloaterland.cpp | 7 +++++-- indra/newview/skins/default/xui/en/floater_about_land.xml | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 256796aa80..abdb55ec17 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -646,9 +646,12 @@ void LLPanelLandGeneral::refresh() } // Display claim date - // *TODO:Localize (Time format may need Translating) time_t claim_date = parcel->getClaimDate(); - mTextClaimDate->setText(formatted_time(claim_date)); + std::string claim_date_str = getString("time_stamp_template"); + LLSD substitution; + substitution["datetime"] = (S32) claim_date; + LLStringUtil::format (claim_date_str, substitution); + mTextClaimDate->setText(claim_date_str); mTextClaimDate->setEnabled(is_leased); BOOL enable_auction = (gAgent.getGodLevel() >= GOD_LIAISON) diff --git a/indra/newview/skins/default/xui/en/floater_about_land.xml b/indra/newview/skins/default/xui/en/floater_about_land.xml index 40c6b14a4a..20e7c28db0 100644 --- a/indra/newview/skins/default/xui/en/floater_about_land.xml +++ b/indra/newview/skins/default/xui/en/floater_about_land.xml @@ -108,6 +108,9 @@ name="no_selection_text"> No parcel selected. + + [wkday,datetime,local] [mth,datetime,local] [day,datetime,local] [hour,datetime,local]:[min,datetime,local]:[second,datetime,local] [year,datetime,local] + Date: Wed, 19 May 2010 15:32:25 +0300 Subject: EXT-7104 WIP Implemented reaction on Sidebar button click Implementation details: * Added new setting SidebarWithButtonsVisibility * Sidebar bottom tray button changes its value on click (toggle state - value is TRUE) * SideTray listens changes of this setting's value and change its and its buttons visibility * expand/collapse Sidebar state is stored between changes of the setting. Reviewed by Yuri Chebotarev at https://codereview.productengine.com/secondlife/r/403/ --HG-- branch : product-engine --- indra/newview/app_settings/settings.xml | 11 ++++ indra/newview/llsidetray.cpp | 59 ++++++++++++++++++++-- indra/newview/llsidetray.h | 10 ++++ .../skins/default/xui/en/panel_bottomtray.xml | 5 +- 4 files changed, 76 insertions(+), 9 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index cae4a14eed..7156af57ec 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -8682,6 +8682,17 @@ Value 0 + SidebarWithButtonsVisibility + + Comment + Sets visibility of sidebar with its tabs' buttons + Persist + 1 + Type + Boolean + Value + 1 + SkinCurrent Comment diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp index 3ec1855484..9159f42968 100644 --- a/indra/newview/llsidetray.cpp +++ b/indra/newview/llsidetray.cpp @@ -66,6 +66,21 @@ static const std::string TAB_PANEL_CAPTION_TITLE_BOX = "sidetray_tab_title"; LLSideTray* LLSideTray::sInstance = 0; +/** + * Updates visibility of sidetray tabs buttons according to "SidebarWithButtonsVisibility" setting + * + * @param force_set_visible if true method ignores setting value and set buttons visible. + */ +static void update_tabs_buttons_visibility(bool force_set_visible = false) +{ + LLView* side_bar_tabs = gViewerWindow->getRootView()->getChildView("side_bar_tabs"); + if (side_bar_tabs) + { + BOOL visible = LLUI::sSettingGroups["config"]->getBOOL("SidebarWithButtonsVisibility"); + side_bar_tabs->setVisible(force_set_visible || visible); + } +} + LLSideTray* LLSideTray::getInstance() { if (!sInstance) @@ -258,6 +273,8 @@ LLSideTray::LLSideTray(Params& params) p.name = "buttons_panel"; p.mouse_opaque = false; mButtonsPanel = LLUICtrlFactory::create(p); + + initControlSettings(); } @@ -547,6 +564,7 @@ void LLSideTray::collapseSideBar() reflectCollapseChange(); setFocus( FALSE ); + update_tabs_buttons_visibility(); } void LLSideTray::expandSideBar() @@ -572,6 +590,7 @@ void LLSideTray::expandSideBar() btn->setImageOverlay( mActiveTab->mImageSelected ); } + update_tabs_buttons_visibility(true); } void LLSideTray::highlightFocused() @@ -638,6 +657,9 @@ LLPanel* LLSideTray::showPanel (const std::string& panel_name, const LLSD& para { panel->onOpen(params); } + + update_tabs_buttons_visibility(true); + return panel; } } @@ -720,11 +742,6 @@ bool LLSideTray::isPanelActive(const std::string& panel_name) return (panel->getName() == panel_name); } - -// *TODO: Eliminate magic constants. -static const S32 fake_offset = 132; -static const S32 fake_top_offset = 18; - void LLSideTray::updateSidetrayVisibility() { // set visibility of parent container based on collapsed state @@ -734,3 +751,35 @@ void LLSideTray::updateSidetrayVisibility() } } +void LLSideTray::initControlSettings() +{ + // set listeners to process runtime setting changes + LLUI::sSettingGroups["config"]->getControl("SidebarWithButtonsVisibility")->getSignal()->connect(boost::bind(&LLSideTray::toggleSidetrayAndTabButtonsVisibility, this, _2)); + + // update visibility according to current value + toggleSidetrayAndTabButtonsVisibility(LLUI::sSettingGroups["config"]->getBOOL("SidebarWithButtonsVisibility")); +} + +// sidebar visibility is implemented via its expanding/collapsing +void LLSideTray::toggleSidetrayAndTabButtonsVisibility(const LLSD::Boolean& new_visibility) +{ + // If new_visibility==FALSE it gets invisible but still can be expanded in other ways (Ctrl+I to see My Inventory) + + // store collapsed state to restore it properly on next call + static bool was_collapsed = false; + + if (!new_visibility && !mCollapsed) + { + collapseSideBar(); + was_collapsed = true; + } + // should be visible: expand only if it was expanded when has been collapsed on previous call + else if (new_visibility && was_collapsed) + { + if (mCollapsed) expandSideBar(); + was_collapsed = false; + } + + update_tabs_buttons_visibility(new_visibility); +} + diff --git a/indra/newview/llsidetray.h b/indra/newview/llsidetray.h index e8fdee9430..ed6b376d5c 100644 --- a/indra/newview/llsidetray.h +++ b/indra/newview/llsidetray.h @@ -179,6 +179,16 @@ private: LLSideTray::getInstance()->setEnabled(FALSE); } + /** + * Initializes listener of SidebarWithButtonsVisibility setting and updates state according to it. + */ + void initControlSettings(); + + /** + * Updates Sidebar and its Tab Buttons visibility according to passed value. + */ + void toggleSidetrayAndTabButtonsVisibility(const LLSD::Boolean& new_visibility); + private: LLPanel* mButtonsPanel; diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml index dd813f5813..2ba7bef502 100644 --- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml @@ -228,7 +228,7 @@ Disabled for now. --> Date: Wed, 19 May 2010 17:55:58 +0300 Subject: EXT-7157 FIXED Implemented outfit items sorting in "My Outfits" tab. - Moved wearable item name comparator from llcofwearables to llwearableitemslist. - Added wearable item type comparator. - Added item type and description getters to wearable item base class LLPanelInventoryListItemBase. Reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/407/ --HG-- branch : product-engine --- indra/newview/llcofwearables.cpp | 12 ----- indra/newview/llcofwearables.h | 57 +++------------------- indra/newview/llinventoryitemslist.h | 9 ++++ indra/newview/llwearableitemslist.cpp | 82 ++++++++++++++++++++++++++++++- indra/newview/llwearableitemslist.h | 92 +++++++++++++++++++++++++++++++++++ 5 files changed, 189 insertions(+), 63 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp index 8d4430a9ea..7c4ceb3458 100644 --- a/indra/newview/llcofwearables.cpp +++ b/indra/newview/llcofwearables.cpp @@ -49,18 +49,6 @@ const LLSD REARRANGE = LLSD().with("rearrange", LLSD()); static const LLWearableItemNameComparator WEARABLE_NAME_COMPARATOR; -bool LLWearableItemNameComparator::doCompare(const LLPanelWearableListItem* wearable_item1, const LLPanelWearableListItem* wearable_item2) const -{ - std::string name1 = wearable_item1->getItemName(); - std::string name2 = wearable_item2->getItemName(); - - LLStringUtil::toUpper(name1); - LLStringUtil::toUpper(name2); - - return name1 < name2; -} - - LLCOFWearables::LLCOFWearables() : LLPanel(), mAttachments(NULL), mClothing(NULL), diff --git a/indra/newview/llcofwearables.h b/indra/newview/llcofwearables.h index 612bb103d2..583ee96247 100644 --- a/indra/newview/llcofwearables.h +++ b/indra/newview/llcofwearables.h @@ -33,59 +33,16 @@ #ifndef LL_LLCOFWEARABLES_H #define LL_LLCOFWEARABLES_H +// llui +#include "llflatlistview.h" #include "llpanel.h" -#include "llinventorymodel.h" -#include "llappearancemgr.h" -#include "llwearableitemslist.h" - -class LLFlatListView; - - -/** Abstract comparator of wearable list items */ -class LLWearableListItemComparator : public LLFlatListView::ItemComparator -{ - LOG_CLASS(LLWearableListItemComparator); - -public: - LLWearableListItemComparator() {}; - virtual ~LLWearableListItemComparator() {}; - - virtual bool compare(const LLPanel* item1, const LLPanel* item2) const - { - const LLPanelWearableListItem* wearable_item1 = dynamic_cast(item1); - const LLPanelWearableListItem* wearable_item2 = dynamic_cast(item2); - - if (!wearable_item1 || !wearable_item2) - { - llwarning("item1 and item2 cannot be null", 0); - return true; - } - - return doCompare(wearable_item1, wearable_item2); - } -protected: - - /** - * Returns true if wearable_item1 < wearable_item2, false otherwise - * Implement this method in your particular comparator. - */ - virtual bool doCompare(const LLPanelWearableListItem* wearable_item1, const LLPanelWearableListItem* wearable_item2) const = 0; -}; - - -class LLWearableItemNameComparator : public LLWearableListItemComparator -{ - LOG_CLASS(LLWearableItemNameComparator); - -public: - LLWearableItemNameComparator() {}; - virtual ~LLWearableItemNameComparator() {}; - -protected: - virtual bool doCompare(const LLPanelWearableListItem* wearable_item1, const LLPanelWearableListItem* wearable_item2) const; -}; +#include "llappearancemgr.h" +#include "llinventorymodel.h" +class LLPanelClothingListItem; +class LLPanelBodyPartsListItem; +class LLPanelDeletableWearableListItem; /** * Adaptor between LLAccordionCtrlTab and LLFlatListView to facilitate communication between them diff --git a/indra/newview/llinventoryitemslist.h b/indra/newview/llinventoryitemslist.h index a3863b511c..807952948b 100644 --- a/indra/newview/llinventoryitemslist.h +++ b/indra/newview/llinventoryitemslist.h @@ -124,6 +124,15 @@ public: /** Get the name of a corresponding inventory item */ const std::string& getItemName() const { return mItem->getName(); } + /** Get the asset type of a corresponding inventory item */ + LLAssetType::EType getType() const { return mItem->getType(); } + + /** Get the wearable type of a corresponding inventory item */ + LLWearableType::EType getWearableType() const { return mItem->getWearableType(); } + + /** Get the description of a corresponding inventory item */ + const std::string& getDescription() const { return mItem->getDescription(); } + virtual ~LLPanelInventoryListItemBase(){} protected: diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp index bac66d966a..b209dfecce 100644 --- a/indra/newview/llwearableitemslist.cpp +++ b/indra/newview/llwearableitemslist.cpp @@ -296,6 +296,84 @@ std::string LLPanelDummyClothingListItem::wearableTypeToString(LLWearableType::E ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// +/*virtual*/ +bool LLWearableItemNameComparator::doCompare(const LLPanelInventoryListItemBase* wearable_item1, const LLPanelInventoryListItemBase* wearable_item2) const +{ + std::string name1 = wearable_item1->getItemName(); + std::string name2 = wearable_item2->getItemName(); + + LLStringUtil::toUpper(name1); + LLStringUtil::toUpper(name2); + + return name1 < name2; +} + +/*virtual*/ +bool LLWearableItemTypeNameComparator::doCompare(const LLPanelInventoryListItemBase* wearable_item1, const LLPanelInventoryListItemBase* wearable_item2) const +{ + const LLAssetType::EType item_type1 = wearable_item1->getType(); + const LLAssetType::EType item_type2 = wearable_item2->getType(); + + LLWearableItemTypeNameComparator::ETypeListOrder item_type_order1 = getTypeListOrder(item_type1); + LLWearableItemTypeNameComparator::ETypeListOrder item_type_order2 = getTypeListOrder(item_type2); + + if (item_type_order1 != item_type_order2) + { + // If items are of different asset types we can compare them + // by types order in the list. + return item_type_order1 < item_type_order2; + } + + if (item_type_order1 & TLO_NOT_CLOTHING) + { + // If both items are of the same asset type except AT_CLOTHING + // we can compare them by name. + return LLWearableItemNameComparator::doCompare(wearable_item1, wearable_item2); + } + + const LLWearableType::EType item_wearable_type1 = wearable_item1->getWearableType(); + const LLWearableType::EType item_wearable_type2 = wearable_item2->getWearableType(); + + if (item_wearable_type1 != item_wearable_type2) + { + // If items are of different clothing types they are compared + // by clothing types order determined in LLWearableType::EType. + return item_wearable_type1 < item_wearable_type2; + } + else + { + // If both items are of the same clothing type they are compared + // by description and place in reverse order i.e. outer layer item + // on top. + return wearable_item1->getDescription() > wearable_item2->getDescription(); + } +} + +// static +LLWearableItemTypeNameComparator::ETypeListOrder LLWearableItemTypeNameComparator::getTypeListOrder(LLAssetType::EType item_type) +{ + switch (item_type) + { + case LLAssetType::AT_OBJECT: + return TLO_ATTACHMENT; + + case LLAssetType::AT_CLOTHING: + return TLO_CLOTHING; + + case LLAssetType::AT_BODYPART: + return TLO_BODYPART; + + default: + return TLO_UNKNOWN; + } +} + +////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// + +static const LLWearableItemTypeNameComparator WEARABLE_TYPE_NAME_COMPARATOR; + static const LLDefaultChildRegistry::Register r("wearable_items_list"); LLWearableItemsList::Params::Params() @@ -303,7 +381,9 @@ LLWearableItemsList::Params::Params() LLWearableItemsList::LLWearableItemsList(const LLWearableItemsList::Params& p) : LLInventoryItemsList(p) -{} +{ + setComparator(&WEARABLE_TYPE_NAME_COMPARATOR); +} // virtual LLWearableItemsList::~LLWearableItemsList() diff --git a/indra/newview/llwearableitemslist.h b/indra/newview/llwearableitemslist.h index 5e3202c687..2cab5a07a2 100644 --- a/indra/newview/llwearableitemslist.h +++ b/indra/newview/llwearableitemslist.h @@ -171,6 +171,98 @@ private: LLWearableType::EType mWearableType; }; +/** + * @class LLWearableListItemComparator + * + * Abstract comparator of wearable list items. + */ +class LLWearableListItemComparator : public LLFlatListView::ItemComparator +{ + LOG_CLASS(LLWearableListItemComparator); + +public: + LLWearableListItemComparator() {}; + virtual ~LLWearableListItemComparator() {}; + + virtual bool compare(const LLPanel* item1, const LLPanel* item2) const + { + const LLPanelInventoryListItemBase* wearable_item1 = dynamic_cast(item1); + const LLPanelInventoryListItemBase* wearable_item2 = dynamic_cast(item2); + + if (!wearable_item1 || !wearable_item2) + { + llwarning("item1 and item2 cannot be null", 0); + return true; + } + + return doCompare(wearable_item1, wearable_item2); + } + +protected: + + /** + * Returns true if wearable_item1 < wearable_item2, false otherwise + * Implement this method in your particular comparator. + */ + virtual bool doCompare(const LLPanelInventoryListItemBase* wearable_item1, const LLPanelInventoryListItemBase* wearable_item2) const = 0; +}; + +/** + * @class LLWearableItemNameComparator + * + * Comparator for sorting wearable list items by name. + */ +class LLWearableItemNameComparator : public LLWearableListItemComparator +{ + LOG_CLASS(LLWearableItemNameComparator); + +public: + LLWearableItemNameComparator() {}; + virtual ~LLWearableItemNameComparator() {}; + +protected: + /*virtual*/ bool doCompare(const LLPanelInventoryListItemBase* wearable_item1, const LLPanelInventoryListItemBase* wearable_item2) const; +}; + +/** + * @class LLWearableItemTypeNameComparator + * + * Comparator for sorting wearable list items by type and name. + */ +class LLWearableItemTypeNameComparator : public LLWearableItemNameComparator +{ + LOG_CLASS(LLWearableItemTypeNameComparator); + +public: + LLWearableItemTypeNameComparator() {}; + virtual ~LLWearableItemTypeNameComparator() {}; + +protected: + /** + * Returns "true" if wearable_item1 is placed before wearable_item2 sorted by the following: + * - Attachments (abc order) + * - Clothing + * - by type (types order determined in LLWearableType::EType) + * - outer layer on top + * - Body Parts (abc order), + * "false" otherwise. + */ + /*virtual*/ bool doCompare(const LLPanelInventoryListItemBase* wearable_item1, const LLPanelInventoryListItemBase* wearable_item2) const; + +private: + enum ETypeListOrder + { + TLO_ATTACHMENT = 0x01, + TLO_CLOTHING = 0x02, + TLO_BODYPART = 0x04, + TLO_UNKNOWN = 0x08, + + TLO_NOT_CLOTHING = TLO_ATTACHMENT | TLO_BODYPART | TLO_UNKNOWN + }; + + static LLWearableItemTypeNameComparator::ETypeListOrder getTypeListOrder(LLAssetType::EType item_type); +}; + /** * @class LLWearableItemsList * -- cgit v1.2.3 From 46fc55fca546ee8ac0db8cf69b136bc3e344eed1 Mon Sep 17 00:00:00 2001 From: Nyx Linden Date: Wed, 19 May 2010 12:16:20 -0400 Subject: EXT-7208 FIX add color / tint to tattoos Adds a color swatch to tattoo wearable that allows users to color their tattoos. Defaults to white so should not affect existing tattoo wearables. Code reviewed by Vir. --- indra/newview/character/avatar_lad.xml | 264 +++++++++++++++++++++ indra/newview/llpaneleditwearable.cpp | 3 +- indra/newview/llvoavatar.cpp | 12 +- .../skins/default/xui/en/panel_edit_tattoo.xml | 14 ++ 4 files changed, 290 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/character/avatar_lad.xml b/indra/newview/character/avatar_lad.xml index 448e20b382..5efd997ab7 100644 --- a/indra/newview/character/avatar_lad.xml +++ b/indra/newview/character/avatar_lad.xml @@ -6623,6 +6623,60 @@ render_pass="bump"> name="head_tattoo"> + + + + + + + + + + + + + + + + + + + + + + + + @@ -6745,6 +6799,61 @@ render_pass="bump"> name="upper_tattoo"> + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7942,6 +8051,61 @@ render_pass="bump"> name="lower_tattoo"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index 5ad68ea4db..f8dbc91036 100644 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -227,7 +227,7 @@ LLEditWearableDictionary::Wearables::Wearables() addEntry(LLWearableType::WT_UNDERPANTS, new WearableEntry(LLWearableType::WT_UNDERPANTS,"edit_underpants_title","underpants_desc_text",1,1,1, TEX_LOWER_UNDERPANTS, TEX_LOWER_UNDERPANTS, SUBPART_UNDERPANTS)); addEntry(LLWearableType::WT_SKIRT, new WearableEntry(LLWearableType::WT_SKIRT,"edit_skirt_title","skirt_desc_text",1,1,1, TEX_SKIRT, TEX_SKIRT, SUBPART_SKIRT)); addEntry(LLWearableType::WT_ALPHA, new WearableEntry(LLWearableType::WT_ALPHA,"edit_alpha_title","alpha_desc_text",0,5,1, TEX_LOWER_ALPHA, TEX_UPPER_ALPHA, TEX_HEAD_ALPHA, TEX_EYES_ALPHA, TEX_HAIR_ALPHA, SUBPART_ALPHA)); - addEntry(LLWearableType::WT_TATTOO, new WearableEntry(LLWearableType::WT_TATTOO,"edit_tattoo_title","tattoo_desc_text",0,3,1, TEX_LOWER_TATTOO, TEX_UPPER_TATTOO, TEX_HEAD_TATTOO, SUBPART_TATTOO)); + addEntry(LLWearableType::WT_TATTOO, new WearableEntry(LLWearableType::WT_TATTOO,"edit_tattoo_title","tattoo_desc_text",1,3,1, TEX_HEAD_TATTOO, TEX_LOWER_TATTOO, TEX_UPPER_TATTOO, TEX_HEAD_TATTOO, SUBPART_TATTOO)); } LLEditWearableDictionary::WearableEntry::WearableEntry(LLWearableType::EType type, @@ -331,6 +331,7 @@ LLEditWearableDictionary::ColorSwatchCtrls::ColorSwatchCtrls() addEntry ( TEX_UPPER_GLOVES, new PickerControlEntry (TEX_UPPER_GLOVES, "Color/Tint" )); addEntry ( TEX_UPPER_UNDERSHIRT, new PickerControlEntry (TEX_UPPER_UNDERSHIRT, "Color/Tint" )); addEntry ( TEX_LOWER_UNDERPANTS, new PickerControlEntry (TEX_LOWER_UNDERPANTS, "Color/Tint" )); + addEntry ( TEX_HEAD_TATTOO, new PickerControlEntry(TEX_HEAD_TATTOO, "Color/Tint" )); } LLEditWearableDictionary::TextureCtrls::TextureCtrls() diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 0f4623c678..4371396629 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -4886,7 +4886,7 @@ BOOL LLVOAvatar::loadAvatar() } // Uncomment to enable avatar_lad.xml debugging. -/* std::ofstream file; + std::ofstream file; file.open("avatar_lad.log"); for( LLViewerVisualParam* param = (LLViewerVisualParam*) getFirstVisualParam(); param; @@ -4896,7 +4896,7 @@ BOOL LLVOAvatar::loadAvatar() file << std::endl; } - file.close();*/ + file.close(); return TRUE; } @@ -6355,6 +6355,14 @@ BOOL LLVOAvatar::teToColorParams( ETextureIndex te, U32 *param_name ) param_name[2] = 923; //"skirt_blue"; break; + case TEX_HEAD_TATTOO: + case TEX_LOWER_TATTOO: + case TEX_UPPER_TATTOO: + param_name[0] = 1071; //"tattoo_red"; + param_name[1] = 1072; //"tattoo_green"; + param_name[2] = 1073; //"tattoo_blue"; + break; + default: llassert(0); return FALSE; diff --git a/indra/newview/skins/default/xui/en/panel_edit_tattoo.xml b/indra/newview/skins/default/xui/en/panel_edit_tattoo.xml index ed990eb095..6d02dd41de 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_tattoo.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_tattoo.xml @@ -57,6 +57,20 @@ tool_tip="Click to choose a picture" top_pad="10" width="94" /> + + + -- cgit v1.2.3 From 0924e3397cf86a3e7e986da9aeb29e98baace35c Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Wed, 19 May 2010 13:54:37 -0400 Subject: AVP-72 FIXED Debug settings for gathering Welcome Island Rez time statistics Added outfit baking notification. Cleaned up some code around notifications. Added some more clarity to notification message wording. --- indra/newview/llvoavatar.h | 13 +++- indra/newview/llvoavatarself.cpp | 87 +++++++++++++--------- indra/newview/llvoavatarself.h | 31 +++++--- .../newview/skins/default/xui/en/notifications.xml | 25 +++++-- 4 files changed, 99 insertions(+), 57 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index d74b4fe7b2..86a7cdae02 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -260,8 +260,6 @@ private: S32 mFullyLoadedFrameCounter; LLFrameTimer mFullyLoadedTimer; LLFrameTimer mRuthTimer; - LLFrameTimer mRuthDebugTimer; // For tracking how long it takes for av to rez - LLFrameTimer mDebugExistenceTimer; // Debugging for how long the avatar has been in memory. /** State ** ** @@ -894,6 +892,9 @@ private: ** DIAGNOSTICS **/ + //-------------------------------------------------------------------- + // General + //-------------------------------------------------------------------- public: static void dumpArchetypeXML(void*); static void dumpBakedStatus(); @@ -913,6 +914,14 @@ private: F32 mAdjustedPixelArea; std::string mDebugText; + + //-------------------------------------------------------------------- + // Avatar Rez Metrics + //-------------------------------------------------------------------- +protected: + LLFrameTimer mRuthDebugTimer; // For tracking how long it takes for av to rez + LLFrameTimer mDebugExistenceTimer; // Debugging for how long the avatar has been in memory. + /** Diagnostics ** ** *******************************************************************************/ diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 8bf082ad45..f329ec83b0 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -49,12 +49,14 @@ #include "llhudeffecttrail.h" #include "llhudmanager.h" #include "llinventoryfunctions.h" +#include "llnotificationsutil.h" #include "llselectmgr.h" #include "lltoolgrab.h" // for needsRenderBeam #include "lltoolmgr.h" // for needsRenderBeam #include "lltoolmorph.h" #include "lltrans.h" #include "llviewercamera.h" +#include "llviewercontrol.h" #include "llviewermenu.h" #include "llviewerobjectlist.h" #include "llviewerstats.h" @@ -149,7 +151,7 @@ void LLVOAvatarSelf::initInstance() LLVOAvatar::initInstance(); llinfos << "Self avatar object created. Starting timer." << llendl; - mSelfLoadTimer.reset(); + mDebugSelfLoadTimer.reset(); // clear all times to -1 for debugging for (U32 i =0; i < LLVOAvatarDefines::TEX_NUM_INDICES; ++i) { @@ -1396,6 +1398,7 @@ void LLVOAvatarSelf::invalidateAll() { invalidateComposite(mBakedTextureDatas[i].mTexLayerSet, TRUE); } + mDebugSelfLoadTimer.reset(); } //----------------------------------------------------------------------------- @@ -1780,7 +1783,7 @@ if (index < 0 || index >= TEX_NUM_INDICES) if (discard_level >=0 && discard_level <= MAX_DISCARD_LEVEL) // ignore discard level -1, as it means we have no data. { - mTextureLoadTimes[(U32)index][(U32)discard_level] = mSelfLoadTimer.getElapsedTimeF32(); + mTextureLoadTimes[(U32)index][(U32)discard_level] = mDebugSelfLoadTimer.getElapsedTimeF32(); } if (final) { @@ -1795,7 +1798,7 @@ void LLVOAvatarSelf::bakedTextureUpload(EBakedTextureIndex index, BOOL finished) { done = 1; } - mBakedTextureTimes[index][done] = mSelfLoadTimer.getElapsedTimeF32(); + mBakedTextureTimes[index][done] = mDebugSelfLoadTimer.getElapsedTimeF32(); } const LLUUID& LLVOAvatarSelf::grabLocalTexture(ETextureIndex type, U32 index) const @@ -1969,42 +1972,56 @@ void LLVOAvatarSelf::setNewBakedTexture( ETextureIndex te, const LLUUID& uuid ) if (!hasPendingBakedUploads()) { gAgent.sendAgentSetAppearance(); - F32 final_time = mSelfLoadTimer.getElapsedTimeF32(); - llinfos << "REZTIME: Myself rez stats:" << llendl; - llinfos << "\t Time from avatar creation to load wearables: " << (S32)mTimeWearablesLoaded << llendl; - llinfos << "\t Time from avatar creation to de-cloud: " << (S32)mTimeAvatarVisible << llendl; - llinfos << "\t Time from avatar creation to de-cloud for others: " << (S32)final_time << llendl; - llinfos << "\t Load time for each texture: " << llendl; - for (U32 i = 0; i < LLVOAvatarDefines::TEX_NUM_INDICES; ++i) - { - std::stringstream out; - out << "\t\t (" << i << ") "; - U32 j=0; - for (j=0; j <= MAX_DISCARD_LEVEL; j++) - { - out << "\t"; - S32 load_time = (S32)mTextureLoadTimes[i][j]; - if (load_time == -1) - { - out << "*"; - if (j == 0) - break; - } - else - { - out << load_time; - } - } - // Don't print out non-existent textures. - if (j != 0) - llinfos << out.str() << llendl; + if (gSavedSettings.getBOOL("DebugAvatarRezTime")) + { + LLSD args; + args["EXISTENCE"] = llformat("%d",(U32)mDebugExistenceTimer.getElapsedTimeF32()); + args["TIME"] = (U32)mDebugSelfLoadTimer.getElapsedTimeF32(); + LLNotificationsUtil::add("AvatarRezSelfNotification",args); } - llinfos << "\t Time points for each upload (start / finish)" << llendl; - for (U32 i = 0; i < LLVOAvatarDefines::BAKED_NUM_INDICES; ++i) + + outputRezDiagnostics(); + } +} + +void LLVOAvatarSelf::outputRezDiagnostics() const +{ + const F32 final_time = mDebugSelfLoadTimer.getElapsedTimeF32(); + llinfos << "REZTIME: Myself rez stats:" << llendl; + llinfos << "\t Time from avatar creation to load wearables: " << (S32)mTimeWearablesLoaded << llendl; + llinfos << "\t Time from avatar creation to de-cloud: " << (S32)mTimeAvatarVisible << llendl; + llinfos << "\t Time from avatar creation to de-cloud for others: " << (S32)final_time << llendl; + llinfos << "\t Load time for each texture: " << llendl; + for (U32 i = 0; i < LLVOAvatarDefines::TEX_NUM_INDICES; ++i) + { + std::stringstream out; + out << "\t\t (" << i << ") "; + U32 j=0; + for (j=0; j <= MAX_DISCARD_LEVEL; j++) { - llinfos << "\t\t (" << i << ") \t" << (S32)mBakedTextureTimes[i][0] << " / " << (S32)mBakedTextureTimes[i][1] << llendl; + out << "\t"; + S32 load_time = (S32)mTextureLoadTimes[i][j]; + if (load_time == -1) + { + out << "*"; + if (j == 0) + break; + } + else + { + out << load_time; + } } + + // Don't print out non-existent textures. + if (j != 0) + llinfos << out.str() << llendl; + } + llinfos << "\t Time points for each upload (start / finish)" << llendl; + for (U32 i = 0; i < LLVOAvatarDefines::BAKED_NUM_INDICES; ++i) + { + llinfos << "\t\t (" << i << ") \t" << (S32)mBakedTextureTimes[i][0] << " / " << (S32)mBakedTextureTimes[i][1] << llendl; } } diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h index 03856b3a3b..9dc38c953e 100644 --- a/indra/newview/llvoavatarself.h +++ b/indra/newview/llvoavatarself.h @@ -126,25 +126,14 @@ public: /*virtual*/ BOOL getIsCloud(); void bakedTextureUpload(LLVOAvatarDefines::EBakedTextureIndex index, BOOL finished); static void onTimingLocalTexLoaded(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata); - void wearablesLoaded() { mTimeWearablesLoaded = mSelfLoadTimer.getElapsedTimeF32(); } - void avatarVisible() { mTimeAvatarVisible = mSelfLoadTimer.getElapsedTimeF32(); } - -private: //-------------------------------------------------------------------- // Region state //-------------------------------------------------------------------- +private: U64 mLastRegionHandle; LLFrameTimer mRegionCrossingTimer; S32 mRegionCrossingCount; - LLFrameTimer mSelfLoadTimer; - F32 mTimeWearablesLoaded; - F32 mTimeAvatarVisible; - F32 mTextureLoadTimes[LLVOAvatarDefines::TEX_NUM_INDICES][MAX_DISCARD_LEVEL+1]; // stores load time for each texture, - // at each discard level - F32 mBakedTextureTimes[LLVOAvatarDefines::BAKED_NUM_INDICES][2]; // stores time to start upload and finish upload of each baked texture - - void timingLocalTexLoaded(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata); /** State ** ** @@ -336,11 +325,29 @@ public: ** DIAGNOSTICS **/ + //-------------------------------------------------------------------- + // General + //-------------------------------------------------------------------- public: static void dumpTotalLocalTextureByteCount(); void dumpLocalTextures() const; static void dumpScratchTextureByteCount(); + //-------------------------------------------------------------------- + // Avatar Rez Metrics + //-------------------------------------------------------------------- +public: + void wearablesLoaded() { mTimeWearablesLoaded = mDebugSelfLoadTimer.getElapsedTimeF32(); } + void avatarVisible() { mTimeAvatarVisible = mDebugSelfLoadTimer.getElapsedTimeF32(); } + void outputRezDiagnostics() const; +private: + LLFrameTimer mDebugSelfLoadTimer; + F32 mTimeWearablesLoaded; + F32 mTimeAvatarVisible; + F32 mTextureLoadTimes[LLVOAvatarDefines::TEX_NUM_INDICES][MAX_DISCARD_LEVEL+1]; // load time for each texture at each discard level + F32 mBakedTextureTimes[LLVOAvatarDefines::BAKED_NUM_INDICES][2]; // time to start upload and finish upload of each baked texture + void timingLocalTexLoaded(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata); + /** Diagnostics ** ** *******************************************************************************/ diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 300437b3c9..999f804e71 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -6129,15 +6129,24 @@ Deed to group failed. icon="notifytip.tga" name="AvatarRezNotification" type="notifytip"> -( [EXISTENCE] seconds ) -Avatar '[NAME]' rezzed in [TIME] seconds. +( [EXISTENCE] seconds alive ) +Avatar '[NAME]' declouded in [TIME] seconds. + +( [EXISTENCE] seconds alive ) +You finished baking your outfit in [TIME] seconds. + + + -( [EXISTENCE] seconds ) +( [EXISTENCE] seconds alive ) Avatar '[NAME]' became cloud. @@ -6145,7 +6154,7 @@ Avatar '[NAME]' became cloud. icon="notifytip.tga" name="AvatarRezArrivedNotification" type="notifytip"> -( [EXISTENCE] seconds ) +( [EXISTENCE] seconds alive ) Avatar '[NAME]' appeared. @@ -6153,7 +6162,7 @@ Avatar '[NAME]' appeared. icon="notifytip.tga" name="AvatarRezLeftCloudNotification" type="notifytip"> -( [EXISTENCE] seconds ) +( [EXISTENCE] seconds alive ) Avatar '[NAME]' left after [TIME] seconds as cloud. @@ -6161,7 +6170,7 @@ Avatar '[NAME]' left after [TIME] seconds as cloud. icon="notifytip.tga" name="AvatarRezEnteredAppearanceNotification" type="notifytip"> -( [EXISTENCE] seconds ) +( [EXISTENCE] seconds alive ) Avatar '[NAME]' entered appearance mode. @@ -6169,7 +6178,7 @@ Avatar '[NAME]' entered appearance mode. icon="notifytip.tga" name="AvatarRezLeftAppearanceNotification" type="notifytip"> -( [EXISTENCE] seconds ) +( [EXISTENCE] seconds alive ) Avatar '[NAME]' left appearance mode. @@ -6177,7 +6186,7 @@ Avatar '[NAME]' left appearance mode. icon="notifytip.tga" name="AvatarRezLeftNotification" type="notifytip"> -( [EXISTENCE] seconds ) +( [EXISTENCE] seconds alive ) Avatar '[NAME]' left as fully loaded. -- cgit v1.2.3 From d43ac77d1b6d1952fe3369079f6461b124466b38 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Wed, 19 May 2010 13:56:39 -0400 Subject: AVP-72 FIXED Debug settings for gathering Welcome Island Rez time statistics Fix for ambiguity around LLSD usage. --- indra/newview/llvoavatarself.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index f329ec83b0..da99b212f0 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -1977,7 +1977,7 @@ void LLVOAvatarSelf::setNewBakedTexture( ETextureIndex te, const LLUUID& uuid ) { LLSD args; args["EXISTENCE"] = llformat("%d",(U32)mDebugExistenceTimer.getElapsedTimeF32()); - args["TIME"] = (U32)mDebugSelfLoadTimer.getElapsedTimeF32(); + args["TIME"] = llformat("%d",(U32)mDebugSelfLoadTimer.getElapsedTimeF32()); LLNotificationsUtil::add("AvatarRezSelfNotification",args); } -- cgit v1.2.3 From a4c364561bfe92a0b1610a1a732de7489f54b06e Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Wed, 19 May 2010 16:18:09 -0400 Subject: AVP-72 FIXED Debug settings for gathering Welcome Island Rez time statistics Fix for scoping error leading to compile error. --- indra/newview/llvoavatarself.h | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h index 9dc38c953e..32a180be5d 100644 --- a/indra/newview/llvoavatarself.h +++ b/indra/newview/llvoavatarself.h @@ -337,6 +337,15 @@ public: // Avatar Rez Metrics //-------------------------------------------------------------------- public: + struct LLAvatarTexData + { + LLAvatarTexData(const LLUUID& id, LLVOAvatarDefines::ETextureIndex index) : + mAvatarID(id), + mIndex(index) + {} + LLUUID mAvatarID; + LLVOAvatarDefines::ETextureIndex mIndex; + }; void wearablesLoaded() { mTimeWearablesLoaded = mDebugSelfLoadTimer.getElapsedTimeF32(); } void avatarVisible() { mTimeAvatarVisible = mDebugSelfLoadTimer.getElapsedTimeF32(); } void outputRezDiagnostics() const; @@ -352,16 +361,6 @@ private: ** ** *******************************************************************************/ -struct LLAvatarTexData -{ - LLAvatarTexData(const LLUUID& id, LLVOAvatarDefines::ETextureIndex index) : - mAvatarID(id), - mIndex(index) - {} - LLUUID mAvatarID; - LLVOAvatarDefines::ETextureIndex mIndex; -}; - }; extern LLVOAvatarSelf *gAgentAvatarp; -- cgit v1.2.3 From ca9737d6d6efac7ce9aba1f9686a86b7f6863636 Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Wed, 19 May 2010 15:22:46 -0700 Subject: The certificate hostname verification was not taking into account changes in hostname due to a redirect which is handled via curl. I turned off the secapi hostname verification just allowing libcurls hostname verification, as it's better anyway (it handles alt names) --- indra/newview/llsecapi.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llsecapi.cpp b/indra/newview/llsecapi.cpp index 89b799f297..1caeec5b04 100644 --- a/indra/newview/llsecapi.cpp +++ b/indra/newview/llsecapi.cpp @@ -121,7 +121,10 @@ int secapiSSLCertVerifyCallback(X509_STORE_CTX *ctx, void *param) validation_params[CERT_HOSTNAME] = uri.hostName(); try { - chain->validate(VALIDATION_POLICY_SSL, store, validation_params); + // we rely on libcurl to validate the hostname, as libcurl does more extensive validation + // leaving our hostname validation call mechanism for future additions with respect to + // OS native (Mac keyring, windows CAPI) validation. + chain->validate(VALIDATION_POLICY_SSL & (~VALIDATION_POLICY_HOSTNAME), store, validation_params); } catch (LLCertValidationTrustException& cert_exception) { -- cgit v1.2.3 From f67e0d801ddcfaa1cc154a1c40118718a8067532 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Wed, 19 May 2010 16:22:31 -0700 Subject: EXT-6364 - Ctrl-Alt-F1 doesn't currently hide all the viewer UI reviewed by leyla --- indra/newview/llviewerwindow.cpp | 570 ++++++++++++++++++++------------------- 1 file changed, 300 insertions(+), 270 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 56d22a0608..d8277b0681 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -621,107 +621,112 @@ BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK x = llround((F32)x / mDisplayScale.mV[VX]); y = llround((F32)y / mDisplayScale.mV[VY]); - if (down) - { - buttonstatestr = "down" ; - } - else - { - buttonstatestr = "up" ; - } - - switch (clicktype) - { - case LLMouseHandler::CLICK_LEFT: - mLeftMouseDown = down; - buttonname = "Left"; - break; - case LLMouseHandler::CLICK_RIGHT: - mRightMouseDown = down; - buttonname = "Right"; - break; - case LLMouseHandler::CLICK_MIDDLE: - mMiddleMouseDown = down; - buttonname = "Middle"; - break; - case LLMouseHandler::CLICK_DOUBLELEFT: - mLeftMouseDown = down; - buttonname = "Left Double Click"; - break; - } - - LLView::sMouseHandlerMessage.clear(); + // only send mouse clicks to UI if UI is visible + if(gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI)) + { - if (gMenuBarView) - { - // stop ALT-key access to menu - gMenuBarView->resetMenuTrigger(); - } + if (down) + { + buttonstatestr = "down" ; + } + else + { + buttonstatestr = "up" ; + } + + switch (clicktype) + { + case LLMouseHandler::CLICK_LEFT: + mLeftMouseDown = down; + buttonname = "Left"; + break; + case LLMouseHandler::CLICK_RIGHT: + mRightMouseDown = down; + buttonname = "Right"; + break; + case LLMouseHandler::CLICK_MIDDLE: + mMiddleMouseDown = down; + buttonname = "Middle"; + break; + case LLMouseHandler::CLICK_DOUBLELEFT: + mLeftMouseDown = down; + buttonname = "Left Double Click"; + break; + } + + LLView::sMouseHandlerMessage.clear(); - if (gDebugClicks) - { - llinfos << "ViewerWindow " << buttonname << " mouse " << buttonstatestr << " at " << x << "," << y << llendl; - } + if (gMenuBarView) + { + // stop ALT-key access to menu + gMenuBarView->resetMenuTrigger(); + } - // Make sure we get a corresponding mouseup event, even if the mouse leaves the window - if (down) - mWindow->captureMouse(); - else - mWindow->releaseMouse(); + if (gDebugClicks) + { + llinfos << "ViewerWindow " << buttonname << " mouse " << buttonstatestr << " at " << x << "," << y << llendl; + } - // Indicate mouse was active - LLUI::resetMouseIdleTimer(); + // Make sure we get a corresponding mouseup event, even if the mouse leaves the window + if (down) + mWindow->captureMouse(); + else + mWindow->releaseMouse(); - // Don't let the user move the mouse out of the window until mouse up. - if( LLToolMgr::getInstance()->getCurrentTool()->clipMouseWhenDown() ) - { - mWindow->setMouseClipping(down); - } + // Indicate mouse was active + LLUI::resetMouseIdleTimer(); - LLMouseHandler* mouse_captor = gFocusMgr.getMouseCapture(); - if( mouse_captor ) - { - S32 local_x; - S32 local_y; - mouse_captor->screenPointToLocal( x, y, &local_x, &local_y ); - if (LLView::sDebugMouseHandling) + // Don't let the user move the mouse out of the window until mouse up. + if( LLToolMgr::getInstance()->getCurrentTool()->clipMouseWhenDown() ) { - llinfos << buttonname << " Mouse " << buttonstatestr << " handled by captor " << mouse_captor->getName() << llendl; + mWindow->setMouseClipping(down); } - return mouse_captor->handleAnyMouseClick(local_x, local_y, mask, clicktype, down); - } - - // Topmost view gets a chance before the hierarchy - //LLUICtrl* top_ctrl = gFocusMgr.getTopCtrl(); - //if (top_ctrl) - //{ - // S32 local_x, local_y; - // top_ctrl->screenPointToLocal( x, y, &local_x, &local_y ); - // if (top_ctrl->pointInView(local_x, local_y)) - // { - // return top_ctrl->handleAnyMouseClick(local_x, local_y, mask, clicktype, down) ; - // } - // else - // { - // if (down) - // { - // gFocusMgr.setTopCtrl(NULL); - // } - // } - //} - - // Give the UI views a chance to process the click - if( mRootView->handleAnyMouseClick(x, y, mask, clicktype, down) ) - { - if (LLView::sDebugMouseHandling) + + LLMouseHandler* mouse_captor = gFocusMgr.getMouseCapture(); + if( mouse_captor ) { - llinfos << buttonname << " Mouse " << buttonstatestr << " " << LLView::sMouseHandlerMessage << llendl; + S32 local_x; + S32 local_y; + mouse_captor->screenPointToLocal( x, y, &local_x, &local_y ); + if (LLView::sDebugMouseHandling) + { + llinfos << buttonname << " Mouse " << buttonstatestr << " handled by captor " << mouse_captor->getName() << llendl; + } + return mouse_captor->handleAnyMouseClick(local_x, local_y, mask, clicktype, down); + } + + // Topmost view gets a chance before the hierarchy + //LLUICtrl* top_ctrl = gFocusMgr.getTopCtrl(); + //if (top_ctrl) + //{ + // S32 local_x, local_y; + // top_ctrl->screenPointToLocal( x, y, &local_x, &local_y ); + // if (top_ctrl->pointInView(local_x, local_y)) + // { + // return top_ctrl->handleAnyMouseClick(local_x, local_y, mask, clicktype, down) ; + // } + // else + // { + // if (down) + // { + // gFocusMgr.setTopCtrl(NULL); + // } + // } + //} + + // Give the UI views a chance to process the click + if( mRootView->handleAnyMouseClick(x, y, mask, clicktype, down) ) + { + if (LLView::sDebugMouseHandling) + { + llinfos << buttonname << " Mouse " << buttonstatestr << " " << LLView::sMouseHandlerMessage << llendl; + } + return TRUE; + } + else if (LLView::sDebugMouseHandling) + { + llinfos << buttonname << " Mouse " << buttonstatestr << " not handled by view" << llendl; } - return TRUE; - } - else if (LLView::sDebugMouseHandling) - { - llinfos << buttonname << " Mouse " << buttonstatestr << " not handled by view" << llendl; } // Do not allow tool manager to handle mouseclicks if we have disconnected @@ -2458,7 +2463,9 @@ void LLViewerWindow::updateUI() // animate layout stacks so we have up to date rect for world view LLLayoutStack::updateClass(); - updateWorldViewRect(); + // use full window for world view when not rendering UI + bool world_view_uses_full_window = !gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI); + updateWorldViewRect(world_view_uses_full_window); LLView::sMouseHandlerMessage.clear(); @@ -2508,28 +2515,55 @@ void LLViewerWindow::updateUI() root_view = mRootView; } - // include all ancestors of captor_view as automatically having mouse - if (captor_view) + // only update mouse hover set when UI is visible (since we shouldn't send hover events to invisible UI + if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI)) { - LLView* captor_parent_view = captor_view->getParent(); - while(captor_parent_view) + // include all ancestors of captor_view as automatically having mouse + if (captor_view) { - mouse_hover_set.insert(captor_parent_view->getHandle()); - captor_parent_view = captor_parent_view->getParent(); + LLView* captor_parent_view = captor_view->getParent(); + while(captor_parent_view) + { + mouse_hover_set.insert(captor_parent_view->getHandle()); + captor_parent_view = captor_parent_view->getParent(); + } } - } - // aggregate visible views that contain mouse cursor in display order - LLPopupView::popup_list_t popups = mPopupView->getCurrentPopups(); + // aggregate visible views that contain mouse cursor in display order + LLPopupView::popup_list_t popups = mPopupView->getCurrentPopups(); - for(LLPopupView::popup_list_t::iterator popup_it = popups.begin(); popup_it != popups.end(); ++popup_it) - { - LLView* popup = popup_it->get(); - if (popup && popup->calcScreenBoundingRect().pointInRect(x, y)) + for(LLPopupView::popup_list_t::iterator popup_it = popups.begin(); popup_it != popups.end(); ++popup_it) + { + LLView* popup = popup_it->get(); + if (popup && popup->calcScreenBoundingRect().pointInRect(x, y)) + { + // iterator over contents of top_ctrl, and throw into mouse_hover_set + for (LLView::tree_iterator_t it = popup->beginTreeDFS(); + it != popup->endTreeDFS(); + ++it) + { + LLView* viewp = *it; + if (viewp->getVisible() + && viewp->calcScreenBoundingRect().pointInRect(x, y)) + { + // we have a view that contains the mouse, add it to the set + mouse_hover_set.insert(viewp->getHandle()); + } + else + { + // skip this view and all of its children + it.skipDescendants(); + } + } + } + } + + // while the top_ctrl contains the mouse cursor, only it and its descendants will receive onMouseEnter events + if (top_ctrl && top_ctrl->calcScreenBoundingRect().pointInRect(x, y)) { // iterator over contents of top_ctrl, and throw into mouse_hover_set - for (LLView::tree_iterator_t it = popup->beginTreeDFS(); - it != popup->endTreeDFS(); + for (LLView::tree_iterator_t it = top_ctrl->beginTreeDFS(); + it != top_ctrl->endTreeDFS(); ++it) { LLView* viewp = *it; @@ -2546,57 +2580,34 @@ void LLViewerWindow::updateUI() } } } - } - - // while the top_ctrl contains the mouse cursor, only it and its descendants will receive onMouseEnter events - if (top_ctrl && top_ctrl->calcScreenBoundingRect().pointInRect(x, y)) - { - // iterator over contents of top_ctrl, and throw into mouse_hover_set - for (LLView::tree_iterator_t it = top_ctrl->beginTreeDFS(); - it != top_ctrl->endTreeDFS(); - ++it) - { - LLView* viewp = *it; - if (viewp->getVisible() - && viewp->calcScreenBoundingRect().pointInRect(x, y)) - { - // we have a view that contains the mouse, add it to the set - mouse_hover_set.insert(viewp->getHandle()); - } - else - { - // skip this view and all of its children - it.skipDescendants(); - } - } - } - else - { - // walk UI tree in depth-first order - for (LLView::tree_iterator_t it = root_view->beginTreeDFS(); - it != root_view->endTreeDFS(); - ++it) + else { - LLView* viewp = *it; - // calculating the screen rect involves traversing the parent, so this is less than optimal - if (viewp->getVisible() - && viewp->calcScreenBoundingRect().pointInRect(x, y)) + // walk UI tree in depth-first order + for (LLView::tree_iterator_t it = root_view->beginTreeDFS(); + it != root_view->endTreeDFS(); + ++it) { + LLView* viewp = *it; + // calculating the screen rect involves traversing the parent, so this is less than optimal + if (viewp->getVisible() + && viewp->calcScreenBoundingRect().pointInRect(x, y)) + { - // if this view is mouse opaque, nothing behind it should be in mouse_hover_set - if (viewp->getMouseOpaque()) + // if this view is mouse opaque, nothing behind it should be in mouse_hover_set + if (viewp->getMouseOpaque()) + { + // constrain further iteration to children of this widget + it = viewp->beginTreeDFS(); + } + + // we have a view that contains the mouse, add it to the set + mouse_hover_set.insert(viewp->getHandle()); + } + else { - // constrain further iteration to children of this widget - it = viewp->beginTreeDFS(); + // skip this view and all of its children + it.skipDescendants(); } - - // we have a view that contains the mouse, add it to the set - mouse_hover_set.insert(viewp->getHandle()); - } - else - { - // skip this view and all of its children - it.skipDescendants(); } } } @@ -2640,156 +2651,170 @@ void LLViewerWindow::updateUI() // store resulting hover set for next frame swap(mMouseHoverViews, mouse_hover_set); - if( mouse_captor ) - { - // Pass hover events to object capturing mouse events. - S32 local_x; - S32 local_y; - mouse_captor->screenPointToLocal( x, y, &local_x, &local_y ); - handled = mouse_captor->handleHover(local_x, local_y, mask); - if (LLView::sDebugMouseHandling) - { - llinfos << "Hover handled by captor " << mouse_captor->getName() << llendl; - } + // only handle hover events when UI is enabled + if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI)) + { - if( !handled ) + if( mouse_captor ) { - lldebugst(LLERR_USER_INPUT) << "hover not handled by mouse captor" << llendl; + // Pass hover events to object capturing mouse events. + S32 local_x; + S32 local_y; + mouse_captor->screenPointToLocal( x, y, &local_x, &local_y ); + handled = mouse_captor->handleHover(local_x, local_y, mask); + if (LLView::sDebugMouseHandling) + { + llinfos << "Hover handled by captor " << mouse_captor->getName() << llendl; + } + + if( !handled ) + { + lldebugst(LLERR_USER_INPUT) << "hover not handled by mouse captor" << llendl; + } } - } - else - { - if (top_ctrl) + else { - S32 local_x, local_y; - top_ctrl->screenPointToLocal( x, y, &local_x, &local_y ); - handled = top_ctrl->pointInView(local_x, local_y) && top_ctrl->handleHover(local_x, local_y, mask); - handled_by_top_ctrl = TRUE; - } + if (top_ctrl) + { + S32 local_x, local_y; + top_ctrl->screenPointToLocal( x, y, &local_x, &local_y ); + handled = top_ctrl->pointInView(local_x, local_y) && top_ctrl->handleHover(local_x, local_y, mask); + handled_by_top_ctrl = TRUE; + } - if ( !handled ) - { - // x and y are from last time mouse was in window - // mMouseInWindow tracks *actual* mouse location - if (mMouseInWindow && mRootView->handleHover(x, y, mask) ) + if ( !handled ) { - if (LLView::sDebugMouseHandling && LLView::sMouseHandlerMessage != last_handle_msg) + // x and y are from last time mouse was in window + // mMouseInWindow tracks *actual* mouse location + if (mMouseInWindow && mRootView->handleHover(x, y, mask) ) + { + if (LLView::sDebugMouseHandling && LLView::sMouseHandlerMessage != last_handle_msg) + { + last_handle_msg = LLView::sMouseHandlerMessage; + llinfos << "Hover" << LLView::sMouseHandlerMessage << llendl; + } + handled = TRUE; + } + else if (LLView::sDebugMouseHandling) { - last_handle_msg = LLView::sMouseHandlerMessage; - llinfos << "Hover" << LLView::sMouseHandlerMessage << llendl; + if (last_handle_msg != LLStringUtil::null) + { + last_handle_msg.clear(); + llinfos << "Hover not handled by view" << llendl; + } } - handled = TRUE; } - else if (LLView::sDebugMouseHandling) + + if (!handled) { - if (last_handle_msg != LLStringUtil::null) + LLTool *tool = LLToolMgr::getInstance()->getCurrentTool(); + + if(mMouseInWindow && tool) { - last_handle_msg.clear(); - llinfos << "Hover not handled by view" << llendl; + handled = tool->handleHover(x, y, mask); } } } - if (!handled) + // Show a new tool tip (or update one that is already shown) + BOOL tool_tip_handled = FALSE; + std::string tool_tip_msg; + if( handled + && !mWindow->isCursorHidden()) { - LLTool *tool = LLToolMgr::getInstance()->getCurrentTool(); + LLRect screen_sticky_rect = mRootView->getLocalRect(); + S32 local_x, local_y; - if(mMouseInWindow && tool) + if (gSavedSettings.getBOOL("DebugShowXUINames")) { - handled = tool->handleHover(x, y, mask); - } - } - } - - // Show a new tool tip (or update one that is already shown) - BOOL tool_tip_handled = FALSE; - std::string tool_tip_msg; - if( handled - && !mWindow->isCursorHidden()) - { - LLRect screen_sticky_rect = mRootView->getLocalRect(); - S32 local_x, local_y; - - if (gSavedSettings.getBOOL("DebugShowXUINames")) - { - LLToolTip::Params params; + LLToolTip::Params params; - LLView* tooltip_view = mRootView; - LLView::tree_iterator_t end_it = mRootView->endTreeDFS(); - for (LLView::tree_iterator_t it = mRootView->beginTreeDFS(); it != end_it; ++it) - { - LLView* viewp = *it; - LLRect screen_rect; - viewp->localRectToScreen(viewp->getLocalRect(), &screen_rect); - if (!(viewp->getVisible() - && screen_rect.pointInRect(x, y))) - { - it.skipDescendants(); - } - // only report xui names for LLUICtrls, - // and blacklist the various containers we don't care about - else if (dynamic_cast(viewp) - && viewp != gMenuHolder - && viewp != gFloaterView - && viewp != gConsole) + LLView* tooltip_view = mRootView; + LLView::tree_iterator_t end_it = mRootView->endTreeDFS(); + for (LLView::tree_iterator_t it = mRootView->beginTreeDFS(); it != end_it; ++it) { - if (dynamic_cast(viewp)) + LLView* viewp = *it; + LLRect screen_rect; + viewp->localRectToScreen(viewp->getLocalRect(), &screen_rect); + if (!(viewp->getVisible() + && screen_rect.pointInRect(x, y))) { - // constrain search to descendants of this (frontmost) floater - // by resetting iterator - it = viewp->beginTreeDFS(); + it.skipDescendants(); } - - // if we are in a new part of the tree (not a descendent of current tooltip_view) - // then push the results for tooltip_view and start with a new potential view - // NOTE: this emulates visiting only the leaf nodes that meet our criteria - if (!viewp->hasAncestor(tooltip_view)) + // only report xui names for LLUICtrls, + // and blacklist the various containers we don't care about + else if (dynamic_cast(viewp) + && viewp != gMenuHolder + && viewp != gFloaterView + && viewp != gConsole) { - append_xui_tooltip(tooltip_view, params); - screen_sticky_rect.intersectWith(tooltip_view->calcScreenRect()); + if (dynamic_cast(viewp)) + { + // constrain search to descendants of this (frontmost) floater + // by resetting iterator + it = viewp->beginTreeDFS(); + } + + // if we are in a new part of the tree (not a descendent of current tooltip_view) + // then push the results for tooltip_view and start with a new potential view + // NOTE: this emulates visiting only the leaf nodes that meet our criteria + if (!viewp->hasAncestor(tooltip_view)) + { + append_xui_tooltip(tooltip_view, params); + screen_sticky_rect.intersectWith(tooltip_view->calcScreenRect()); + } + tooltip_view = viewp; } - tooltip_view = viewp; } - } - append_xui_tooltip(tooltip_view, params); - screen_sticky_rect.intersectWith(tooltip_view->calcScreenRect()); - - params.sticky_rect = screen_sticky_rect; - params.max_width = 400; + append_xui_tooltip(tooltip_view, params); + screen_sticky_rect.intersectWith(tooltip_view->calcScreenRect()); + + params.sticky_rect = screen_sticky_rect; + params.max_width = 400; - LLToolTipMgr::instance().show(params); - } - // if there is a mouse captor, nothing else gets a tooltip - else if (mouse_captor) - { - mouse_captor->screenPointToLocal(x, y, &local_x, &local_y); - tool_tip_handled = mouse_captor->handleToolTip(local_x, local_y, mask); - } - else - { - // next is top_ctrl - if (!tool_tip_handled && top_ctrl) - { - top_ctrl->screenPointToLocal(x, y, &local_x, &local_y); - tool_tip_handled = top_ctrl->handleToolTip(local_x, local_y, mask ); + LLToolTipMgr::instance().show(params); } - - if (!tool_tip_handled) + // if there is a mouse captor, nothing else gets a tooltip + else if (mouse_captor) { - local_x = x; local_y = y; - tool_tip_handled = mRootView->handleToolTip(local_x, local_y, mask ); + mouse_captor->screenPointToLocal(x, y, &local_x, &local_y); + tool_tip_handled = mouse_captor->handleToolTip(local_x, local_y, mask); } - - LLTool* current_tool = LLToolMgr::getInstance()->getCurrentTool(); - if (!tool_tip_handled && current_tool) + else { - current_tool->screenPointToLocal(x, y, &local_x, &local_y); - tool_tip_handled = current_tool->handleToolTip(local_x, local_y, mask ); + // next is top_ctrl + if (!tool_tip_handled && top_ctrl) + { + top_ctrl->screenPointToLocal(x, y, &local_x, &local_y); + tool_tip_handled = top_ctrl->handleToolTip(local_x, local_y, mask ); + } + + if (!tool_tip_handled) + { + local_x = x; local_y = y; + tool_tip_handled = mRootView->handleToolTip(local_x, local_y, mask ); + } + + LLTool* current_tool = LLToolMgr::getInstance()->getCurrentTool(); + if (!tool_tip_handled && current_tool) + { + current_tool->screenPointToLocal(x, y, &local_x, &local_y); + tool_tip_handled = current_tool->handleToolTip(local_x, local_y, mask ); + } } + } + } + else + { // just have tools handle hover when UI is turned off + LLTool *tool = LLToolMgr::getInstance()->getCurrentTool(); + + if(mMouseInWindow && tool) + { + handled = tool->handleHover(x, y, mask); } - } - + } + updateLayout(); mLastMousePoint = mCurrentMousePoint; @@ -2905,6 +2930,11 @@ void LLViewerWindow::updateMouseDelta() void LLViewerWindow::updateKeyboardFocus() { + if (!gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI)) + { + gFocusMgr.setKeyboardFocus(NULL); + } + // clean up current focus LLUICtrl* cur_focus = dynamic_cast(gFocusMgr.getKeyboardFocus()); if (cur_focus) -- cgit v1.2.3 From 8487341b0f255e65044c3f7e3dc09461b4e2351e Mon Sep 17 00:00:00 2001 From: Nyx Linden Date: Wed, 19 May 2010 19:48:23 -0400 Subject: AVP-44 WIP Back-end support for multiwearables Changed a lot of areas of code that were not dealing with multiwearables properly. Little functionality changed, as the support mechanisms that were out of date were subtle, but getting closer to no further areas of code that don't properly support multi-wearables. Code reviewed by Vir. --- indra/newview/llagent.cpp | 15 +-- indra/newview/llagentwearables.cpp | 190 ++++-------------------------------- indra/newview/llagentwearables.h | 22 +---- indra/newview/llappearancemgr.cpp | 13 ++- indra/newview/llinventorybridge.cpp | 26 ++--- indra/newview/llviewermenu.cpp | 56 +++++------ indra/newview/llvoavatarself.cpp | 28 +++--- indra/newview/llvoavatarself.h | 6 +- 8 files changed, 100 insertions(+), 256 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 529ce950e4..f96a59e97a 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -3583,12 +3583,15 @@ void LLAgent::sendAgentSetAppearance() { // LLWearableType::EType wearable_type = gBakedWearableMap[baked_index][wearable_num]; const LLWearableType::EType wearable_type = baked_dict->mWearables[i]; - // MULTI-WEARABLE: fixed to 0th - extend to everything once messaging works. - const LLWearable* wearable = gAgentWearables.getWearable(wearable_type,0); - if (wearable) - { - hash ^= wearable->getAssetID(); - } + for (U8 wearable_index =0; wearable_index < gAgentWearables.getWearableCount(wearable_type); ++wearable_index) + { + const LLWearable* wearable = gAgentWearables.getWearable(wearable_type,wearable_index); + if (wearable) + { + // MULTI-WEARABLE: make order-dependent (use MD5 hash) + hash ^= wearable->getAssetID(); + } + } } if (hash.notNull()) { diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 3e73bbef15..545c5b845b 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -125,7 +125,6 @@ void LLAgentWearables::dump() } } -// MULTI-WEARABLE: debugging struct LLAgentDumper { LLAgentDumper(std::string name): @@ -191,7 +190,7 @@ LLAgentWearables::sendAgentWearablesUpdateCallback::~sendAgentWearablesUpdateCal * @param todo Bitmask of actions to take on completion. */ LLAgentWearables::addWearableToAgentInventoryCallback::addWearableToAgentInventoryCallback( - LLPointer cb, S32 type, U32 index, LLWearable* wearable, U32 todo) : + LLPointer cb, LLWearableType::EType type, U32 index, LLWearable* wearable, U32 todo) : mType(type), mIndex(index), mWearable(wearable), @@ -240,7 +239,7 @@ void LLAgentWearables::addWearableToAgentInventoryCallback::fire(const LLUUID& i } } -void LLAgentWearables::addWearabletoAgentInventoryDone(const S32 type, +void LLAgentWearables::addWearabletoAgentInventoryDone(const LLWearableType::EType type, const U32 index, const LLUUID& item_id, LLWearable* wearable) @@ -250,7 +249,7 @@ void LLAgentWearables::addWearabletoAgentInventoryDone(const S32 type, if (item_id.isNull()) return; - LLUUID old_item_id = getWearableItemID((LLWearableType::EType)type,index); + LLUUID old_item_id = getWearableItemID(type,index); if (wearable) { @@ -259,11 +258,11 @@ void LLAgentWearables::addWearabletoAgentInventoryDone(const S32 type, if (old_item_id.notNull()) { gInventory.addChangedMask(LLInventoryObserver::LABEL, old_item_id); - setWearable((LLWearableType::EType)type,index,wearable); + setWearable(type,index,wearable); } else { - pushWearable((LLWearableType::EType)type,wearable); + pushWearable(type,wearable); } } @@ -285,13 +284,12 @@ void LLAgentWearables::addWearabletoAgentInventoryDone(const S32 type, void LLAgentWearables::sendAgentWearablesUpdate() { - // MULTI-WEARABLE: call i "type" or something. // First make sure that we have inventory items for each wearable for (S32 type=0; type < LLWearableType::WT_COUNT; ++type) { - for (U32 j=0; j < getWearableCount((LLWearableType::EType)type); ++j) + for (U32 index=0; index < getWearableCount((LLWearableType::EType)type); ++index) { - LLWearable* wearable = getWearable((LLWearableType::EType)type,j); + LLWearable* wearable = getWearable((LLWearableType::EType)type,index); if (wearable) { if (wearable->getItemID().isNull()) @@ -299,8 +297,8 @@ void LLAgentWearables::sendAgentWearablesUpdate() LLPointer cb = new addWearableToAgentInventoryCallback( LLPointer(NULL), - type, - j, + (LLWearableType::EType)type, + index, wearable, addWearableToAgentInventoryCallback::CALL_NONE); addWearableToAgentInventory(cb, wearable); @@ -325,7 +323,7 @@ void LLAgentWearables::sendAgentWearablesUpdate() gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); lldebugs << "sendAgentWearablesUpdate()" << llendl; - // MULTI-WEARABLE: update for multi-wearables after server-side support is in. + // MULTI-WEARABLE: DEPRECATED: HACK: index to 0- server database tables don't support concept of multiwearables. for (S32 type=0; type < LLWearableType::WT_COUNT; ++type) { gMessageSystem->nextBlockFast(_PREHASH_WearableData); @@ -333,7 +331,6 @@ void LLAgentWearables::sendAgentWearablesUpdate() U8 type_u8 = (U8)type; gMessageSystem->addU8Fast(_PREHASH_WearableType, type_u8); - // MULTI-WEARABLE: TODO: hacked index to 0, needs to loop over all once messages support this. LLWearable* wearable = getWearable((LLWearableType::EType)type, 0); if (wearable) { @@ -405,7 +402,7 @@ void LLAgentWearables::saveWearable(const LLWearableType::EType type, const U32 LLPointer cb = new addWearableToAgentInventoryCallback( LLPointer(NULL), - (S32)type, + type, index, new_wearable, todo); @@ -871,7 +868,7 @@ BOOL LLAgentWearables::isWearingItem(const LLUUID& item_id) const return FALSE; } -// MULTI-WEARABLE: update for multiple +// MULTI-WEARABLE: DEPRECATED (see backwards compatibility) // static // ! BACKWARDS COMPATIBILITY ! When we stop supporting viewer1.23, we can assume // that viewers have a Current Outfit Folder and won't need this message, and thus @@ -909,7 +906,7 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs //lldebugs << "processAgentInitialWearablesUpdate()" << llendl; // Add wearables - // MULTI-WEARABLE: TODO: update once messages change. Currently use results to populate the zeroth element. + // MULTI-WEARABLE: DEPRECATED: Message only supports one wearable per type, will be ignored in future. gAgentWearables.mItemsAwaitingWearableUpdate.clear(); for (S32 i=0; i < num_wearables; i++) { @@ -939,10 +936,10 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs continue; } - // MULTI-WEARABLE: TODO: update once messages change. Currently use results to populate the zeroth element. + // MULTI-WEARABLE: DEPRECATED: this message only supports one wearable per type. Should be ignored in future versions // Store initial wearables data until we know whether we have the current outfit folder or need to use the data. - LLInitialWearablesFetch::InitialWearableData wearable_data(type, item_id, asset_id); // MULTI-WEARABLE: update + LLInitialWearablesFetch::InitialWearableData wearable_data(type, item_id, asset_id); outfit->add(wearable_data); } @@ -977,7 +974,6 @@ void LLAgentWearables::recoverMissingWearable(const LLWearableType::EType type, lldebugs << "Wearable " << LLWearableType::getTypeLabel(type) << " could not be downloaded. Replaced inventory item with default wearable." << llendl; LLWearable* new_wearable = LLWearableList::instance().createNewWearable(type); - S32 type_s32 = (S32) type; setWearable(type,index,new_wearable); //new_wearable->writeToAvatar(TRUE); @@ -988,7 +984,7 @@ void LLAgentWearables::recoverMissingWearable(const LLWearableType::EType type, LLPointer cb = new addWearableToAgentInventoryCallback( LLPointer(NULL), - type_s32, + type, index, new_wearable, addWearableToAgentInventoryCallback::CALL_RECOVERDONE); @@ -1172,158 +1168,6 @@ void LLAgentWearables::createStandardWearablesAllDone() gAgentAvatarp->onFirstTEMessageReceived(); } -// MULTI-WEARABLE: Properly handle multiwearables later. -void LLAgentWearables::getAllWearablesArray(LLDynamicArray& wearables) -{ - for( S32 i = 0; i < LLWearableType::WT_COUNT; ++i ) - { - if (getWearableCount((LLWearableType::EType) i) != 0) - { - wearables.push_back(i); - } - } -} - -// Note: wearables_to_include should be a list of LLWearableType::EType types -// attachments_to_include should be a list of attachment points -void LLAgentWearables::makeNewOutfit(const std::string& new_folder_name, - const LLDynamicArray& wearables_to_include, - const LLDynamicArray& attachments_to_include, - BOOL rename_clothing) -{ - if (!isAgentAvatarValid()) return; - - // First, make a folder in the Clothes directory. - LLUUID folder_id = gInventory.createNewCategory( - gInventory.findCategoryUUIDForType(LLFolderType::FT_CLOTHING), - LLFolderType::FT_NONE, - new_folder_name); - - bool found_first_item = false; - - /////////////////// - // Wearables - - if (wearables_to_include.count()) - { - // Then, iterate though each of the wearables and save copies of them in the folder. - S32 i; - S32 count = wearables_to_include.count(); - LLDynamicArray delete_items; - LLPointer cbdone = NULL; - for (i = 0; i < count; ++i) - { - const S32 type = wearables_to_include[i]; - for (U32 j=0; jgetTypeLabel()); - LLStringUtil::truncate(new_name, DB_INV_ITEM_NAME_STR_LEN); - new_wearable->setName(new_name); - } - - LLViewerInventoryItem* item = gInventory.getItem(getWearableItemID((LLWearableType::EType)type,j)); - S32 todo = addWearableToAgentInventoryCallback::CALL_NONE; - if (!found_first_item) - { - found_first_item = true; - /* set the focus to the first item */ - todo |= addWearableToAgentInventoryCallback::CALL_MAKENEWOUTFITDONE; - /* send the agent wearables update when done */ - cbdone = new sendAgentWearablesUpdateCallback; - } - LLPointer cb = - new addWearableToAgentInventoryCallback( - cbdone, - type, - j, - new_wearable, - todo); - llassert(item); - if (item) - { - if (isWearableCopyable((LLWearableType::EType)type, j)) - { - copy_inventory_item( - gAgent.getID(), - item->getPermissions().getOwner(), - item->getUUID(), - folder_id, - new_name, - cb); - } - else - { - move_inventory_item( - gAgent.getID(), - gAgent.getSessionID(), - item->getUUID(), - folder_id, - new_name, - cb); - } - } - } - } - } - gInventory.notifyObservers(); - } - - - /////////////////// - // Attachments - - if (attachments_to_include.count()) - { - BOOL msg_started = FALSE; - LLMessageSystem* msg = gMessageSystem; - for (S32 i = 0; i < attachments_to_include.count(); i++) - { - S32 attachment_pt = attachments_to_include[i]; - LLViewerJointAttachment* attachment = get_if_there(gAgentAvatarp->mAttachmentPoints, attachment_pt, (LLViewerJointAttachment*)NULL); - if (!attachment) continue; - for (LLViewerJointAttachment::attachedobjs_vec_t::iterator attachment_iter = attachment->mAttachedObjects.begin(); - attachment_iter != attachment->mAttachedObjects.end(); - ++attachment_iter) - { - LLViewerObject *attached_object = (*attachment_iter); - if(!attached_object) continue; - const LLUUID& item_id = (*attachment_iter)->getItemID(); - if(item_id.isNull()) continue; - LLInventoryItem* item = gInventory.getItem(item_id); - if(!item) continue; - if(!msg_started) - { - msg_started = TRUE; - msg->newMessage("CreateNewOutfitAttachments"); - msg->nextBlock("AgentData"); - msg->addUUID("AgentID", gAgent.getID()); - msg->addUUID("SessionID", gAgent.getSessionID()); - msg->nextBlock("HeaderData"); - msg->addUUID("NewFolderID", folder_id); - } - msg->nextBlock("ObjectData"); - msg->addUUID("OldItemID", item_id); - msg->addUUID("OldFolderID", item->getParentUUID()); - } - } - - if (msg_started) - { - gAgent.sendReliableMessage(); - } - - } -} class LLShowCreatedOutfit: public LLInventoryCallback { @@ -2010,7 +1854,7 @@ BOOL LLAgentWearables::areWearablesLoaded() const return mWearablesLoaded; } -// MULTI-WEARABLE: update for multiple indices. +// MULTI-WEARABLE: DEPRECATED: item pending count relies on old messages that don't support multi-wearables. do not trust to be accurate void LLAgentWearables::updateWearablesLoaded() { mWearablesLoaded = (itemUpdatePendingCount()==0); diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h index def16e4e85..27453b5b25 100644 --- a/indra/newview/llagentwearables.h +++ b/indra/newview/llagentwearables.h @@ -62,7 +62,6 @@ public: void cleanup(); void dump(); protected: - // MULTI-WEARABLE: assuming one per type. Type is called index - rename. void createStandardWearablesDone(S32 type, U32 index/* = 0*/); void createStandardWearablesAllDone(); @@ -93,7 +92,6 @@ public: const LLWearable* getWearableFromItemID(const LLUUID& item_id) const; LLWearable* getWearableFromAssetID(const LLUUID& asset_id); LLInventoryItem* getWearableInventoryItem(LLWearableType::EType type, U32 index /*= 0*/); - // MULTI-WEARABLE: assuming one per type. static BOOL selfHasWearable(LLWearableType::EType type); LLWearable* getWearable(const LLWearableType::EType type, U32 index /*= 0*/); const LLWearable* getWearable(const LLWearableType::EType type, U32 index /*= 0*/) const; @@ -128,7 +126,7 @@ protected: LLWearable* wearable, const LLUUID& category_id = LLUUID::null, BOOL notify = TRUE); - void addWearabletoAgentInventoryDone(const S32 type, + void addWearabletoAgentInventoryDone(const LLWearableType::EType type, const U32 index, const LLUUID& item_id, LLWearable* wearable); @@ -163,15 +161,6 @@ protected: // Outfits //-------------------------------------------------------------------- public: - void getAllWearablesArray(LLDynamicArray& wearables); - - // Note: wearables_to_include should be a list of LLWearableType::EType types - // attachments_to_include should be a list of attachment points - void makeNewOutfit(const std::string& new_folder_name, - const LLDynamicArray& wearables_to_include, - const LLDynamicArray& attachments_to_include, - BOOL rename_clothing); - // Should only be called if we *know* we've never done so before, since users may // not want the Library outfits to stay in their quick outfit selector and can delete them. @@ -184,7 +173,6 @@ private: // Save Wearables //-------------------------------------------------------------------- public: - // MULTI-WEARABLE: assumes one per type. void saveWearableAs(const LLWearableType::EType type, const U32 index, const std::string& new_name, BOOL save_in_lost_and_found); void saveWearable(const LLWearableType::EType type, const U32 index, BOOL send_update = TRUE); void saveAllWearables(); @@ -249,7 +237,7 @@ private: class addWearableToAgentInventoryCallback : public LLInventoryCallback { public: - enum EType + enum ETodo { CALL_NONE = 0, CALL_UPDATE = 1, @@ -259,16 +247,14 @@ private: CALL_WEARITEM = 16 }; - // MULTI-WEARABLE: index is an LLWearableType::EType - more confusing usage. - // MULTI-WEARABLE: need to have type and index args both? addWearableToAgentInventoryCallback(LLPointer cb, - S32 type, + LLWearableType::EType type, U32 index, LLWearable* wearable, U32 todo = CALL_NONE); virtual void fire(const LLUUID& inv_item); private: - S32 mType; + LLWearableType::EType mType; U32 mIndex; LLWearable* mWearable; U32 mTodo; diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 4aef72ab0b..7d39ba30f0 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -1469,14 +1469,21 @@ void LLAppearanceMgr::addCOFItemLink(const LLInventoryItem *item, bool do_update { // Are these links to the same object? const LLViewerInventoryItem* inv_item = item_array.get(i).get(); + const LLWearableType::EType wearable_type = inv_item->getWearableType(); + + const bool is_body_part = (wearable_type == LLWearableType::WT_SHAPE) + || (wearable_type == LLWearableType::WT_HAIR) + || (wearable_type == LLWearableType::WT_EYES) + || (wearable_type == LLWearableType::WT_SKIN); + if (inv_item->getLinkedUUID() == vitem->getLinkedUUID()) { linked_already = true; } - // Are these links to different items of the same wearable + // Are these links to different items of the same body part // type? If so, new item will replace old. - // MULTI-WEARABLES: revisit if more than one per type is allowed. - else if (FALSE/*areMatchingWearables(vitem,inv_item)*/) + // TODO: MULTI-WEARABLE: check for wearable limit for clothing types + else if (is_body_part) { if (inv_item->getIsLinkType()) { diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index b9b4fa8b03..ab7eeae3e8 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -4980,18 +4980,20 @@ void LLWearableBridge::removeAllClothesFromAvatar() if (itype == LLWearableType::WT_SHAPE || itype == LLWearableType::WT_SKIN || itype == LLWearableType::WT_HAIR || itype == LLWearableType::WT_EYES) continue; - // MULTI-WEARABLES: fixed to index 0 - LLViewerInventoryItem *item = dynamic_cast( - gAgentWearables.getWearableInventoryItem((LLWearableType::EType)itype, 0)); - if (!item) - continue; - const LLUUID &item_id = gInventory.getLinkedItemID(item->getUUID()); - const LLWearable *wearable = gAgentWearables.getWearableFromItemID(item_id); - if (!wearable) - continue; - - // Find and remove this item from the COF. - LLAppearanceMgr::instance().removeCOFItemLinks(item_id,false); + for (S32 index = gAgentWearables.getWearableCount(itype)-1; index >= 0 ; --index) + { + LLViewerInventoryItem *item = dynamic_cast( + gAgentWearables.getWearableInventoryItem((LLWearableType::EType)itype, index)); + if (!item) + continue; + const LLUUID &item_id = gInventory.getLinkedItemID(item->getUUID()); + const LLWearable *wearable = gAgentWearables.getWearableFromItemID(item_id); + if (!wearable) + continue; + + // Find and remove this item from the COF. + LLAppearanceMgr::instance().removeCOFItemLinks(item_id,false); + } } gInventory.notifyObservers(); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index c245650d51..729424353f 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -292,8 +292,8 @@ void handle_toggle_pg(void*); void handle_dump_attachments(void *); void handle_dump_avatar_local_textures(void*); void handle_debug_avatar_textures(void*); -void handle_grab_texture(void*); -BOOL enable_grab_texture(void*); +void handle_grab_baked_texture(void*); +BOOL enable_grab_baked_texture(void*); void handle_dump_region_object_cache(void*); BOOL enable_save_into_inventory(void*); @@ -1460,28 +1460,28 @@ class LLAdvancedGrabBakedTexture : public view_listener_t std::string texture_type = userdata.asString(); if ("iris" == texture_type) { - handle_grab_texture( (void*)TEX_EYES_BAKED ); + handle_grab_baked_texture( (void*)BAKED_EYES ); } else if ("head" == texture_type) { - handle_grab_texture( (void*)TEX_HEAD_BAKED ); + handle_grab_baked_texture( (void*)BAKED_HEAD ); } else if ("upper" == texture_type) { - handle_grab_texture( (void*)TEX_UPPER_BAKED ); + handle_grab_baked_texture( (void*)BAKED_UPPER ); } else if ("lower" == texture_type) { - handle_grab_texture( (void*)TEX_SKIRT_BAKED ); + handle_grab_baked_texture( (void*)BAKED_LOWER ); } else if ("skirt" == texture_type) { - handle_grab_texture( (void*)TEX_SKIRT_BAKED ); + handle_grab_baked_texture( (void*)BAKED_SKIRT ); } else if ("hair" == texture_type) { - handle_grab_texture( (void*)TEX_HAIR_BAKED ); -} + handle_grab_baked_texture( (void*)BAKED_HAIR ); + } return true; } @@ -1496,23 +1496,27 @@ class LLAdvancedEnableGrabBakedTexture : public view_listener_t if ("iris" == texture_type) { - new_value = enable_grab_texture( (void*)TEX_EYES_BAKED ); + new_value = enable_grab_baked_texture( (void*)BAKED_EYES ); } else if ("head" == texture_type) { - new_value = enable_grab_texture( (void*)TEX_HEAD_BAKED ); + new_value = enable_grab_baked_texture( (void*)BAKED_HEAD ); } else if ("upper" == texture_type) { - new_value = enable_grab_texture( (void*)TEX_UPPER_BAKED ); + new_value = enable_grab_baked_texture( (void*)BAKED_UPPER ); } else if ("lower" == texture_type) { - new_value = enable_grab_texture( (void*)TEX_LOWER_BAKED ); + new_value = enable_grab_baked_texture( (void*)BAKED_LOWER ); } else if ("skirt" == texture_type) { - new_value = enable_grab_texture( (void*)TEX_SKIRT_BAKED ); + new_value = enable_grab_baked_texture( (void*)BAKED_SKIRT ); + } + else if ("hair" == texture_type) + { + new_value = enable_grab_baked_texture( (void*)BAKED_HAIR ); } return new_value; @@ -6933,27 +6937,20 @@ void handle_debug_avatar_textures(void*) } } -void handle_grab_texture(void* data) +void handle_grab_baked_texture(void* data) { - ETextureIndex tex_index = (ETextureIndex)((intptr_t)data); + EBakedTextureIndex baked_tex_index = (EBakedTextureIndex)((intptr_t)data); if (!isAgentAvatarValid()) return; - // MULTI-WEARABLE: change to support an index - const LLUUID& asset_id = gAgentAvatarp->grabLocalTexture(tex_index, 0); + const LLUUID& asset_id = gAgentAvatarp->grabBakedTexture(baked_tex_index); LL_INFOS("texture") << "Adding baked texture " << asset_id << " to inventory." << llendl; LLAssetType::EType asset_type = LLAssetType::AT_TEXTURE; LLInventoryType::EType inv_type = LLInventoryType::IT_TEXTURE; const LLUUID folder_id = gInventory.findCategoryUUIDForType(LLFolderType::assetTypeToFolderType(asset_type)); if(folder_id.notNull()) { - std::string name = "Unknown"; - const LLVOAvatarDictionary::TextureEntry *texture_dict = LLVOAvatarDictionary::getInstance()->getTexture(tex_index); - if (texture_dict->mIsBakedTexture) - { - EBakedTextureIndex baked_index = texture_dict->mBakedTextureIndex; - name = "Baked " + LLVOAvatarDictionary::getInstance()->getBakedTexture(baked_index)->mNameCapitalized; - } - name += " Texture"; + std::string name; + name = "Baked " + LLVOAvatarDictionary::getInstance()->getBakedTexture(baked_tex_index)->mNameCapitalized + " Texture"; LLUUID item_id; item_id.generate(); @@ -7006,13 +7003,12 @@ void handle_grab_texture(void* data) } } -BOOL enable_grab_texture(void* data) +BOOL enable_grab_baked_texture(void* data) { - ETextureIndex index = (ETextureIndex)((intptr_t)data); + EBakedTextureIndex index = (EBakedTextureIndex)((intptr_t)data); if (isAgentAvatarValid()) { - // MULTI-WEARABLE: - return gAgentAvatarp->canGrabLocalTexture(index,0); + return gAgentAvatarp->canGrabBakedTexture(index); } return FALSE; } diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 8bf082ad45..ac7adebb3a 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -1798,21 +1798,31 @@ void LLVOAvatarSelf::bakedTextureUpload(EBakedTextureIndex index, BOOL finished) mBakedTextureTimes[index][done] = mSelfLoadTimer.getElapsedTimeF32(); } -const LLUUID& LLVOAvatarSelf::grabLocalTexture(ETextureIndex type, U32 index) const +const LLUUID& LLVOAvatarSelf::grabBakedTexture(EBakedTextureIndex baked_index) const { - if (canGrabLocalTexture(type, index)) + if (canGrabBakedTexture(baked_index)) { - return getTEImage( type )->getID(); + ETextureIndex tex_index = LLVOAvatarDictionary::bakedToLocalTextureIndex(baked_index); + if (tex_index == TEX_NUM_INDICES) + { + return LLUUID::null; + } + return getTEImage( tex_index )->getID(); } return LLUUID::null; } -BOOL LLVOAvatarSelf::canGrabLocalTexture(ETextureIndex type, U32 index) const +BOOL LLVOAvatarSelf::canGrabBakedTexture(EBakedTextureIndex baked_index) const { + ETextureIndex tex_index = LLVOAvatarDictionary::bakedToLocalTextureIndex(baked_index); + if (tex_index == TEX_NUM_INDICES) + { + return FALSE; + } // Check if the texture hasn't been baked yet. - if (!isTextureDefined(type, index)) + if (!isTextureDefined(tex_index, 0)) { - lldebugs << "getTEImage( " << (U32) type << ", " << index << " )->getID() == IMG_DEFAULT_AVATAR" << llendl; + lldebugs << "getTEImage( " << (U32) tex_index << " )->getID() == IMG_DEFAULT_AVATAR" << llendl; return FALSE; } @@ -1822,13 +1832,7 @@ BOOL LLVOAvatarSelf::canGrabLocalTexture(ETextureIndex type, U32 index) const // Check permissions of textures that show up in the // baked texture. We don't want people copying people's // work via baked textures. - /* switch(type) - case TEX_EYES_BAKED: - textures.push_back(TEX_EYES_IRIS); */ - const LLVOAvatarDictionary::TextureEntry *texture_dict = LLVOAvatarDictionary::getInstance()->getTexture(type); - if (!texture_dict->mIsUsedByBakedTexture) return FALSE; - const EBakedTextureIndex baked_index = texture_dict->mBakedTextureIndex; const LLVOAvatarDictionary::BakedEntry *baked_dict = LLVOAvatarDictionary::getInstance()->getBakedTexture(baked_index); for (texture_vec_t::const_iterator iter = baked_dict->mLocalTextures.begin(); iter != baked_dict->mLocalTextures.end(); diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h index 03856b3a3b..587c2363f6 100644 --- a/indra/newview/llvoavatarself.h +++ b/indra/newview/llvoavatarself.h @@ -201,8 +201,6 @@ public: LLViewerFetchedTexture* getLocalTextureGL(LLVOAvatarDefines::ETextureIndex type, U32 index) const; const LLUUID& getLocalTextureID(LLVOAvatarDefines::ETextureIndex type, U32 index) const; void setLocalTextureTE(U8 te, LLViewerTexture* image, U32 index); - const LLUUID& grabLocalTexture(LLVOAvatarDefines::ETextureIndex type, U32 index) const; - BOOL canGrabLocalTexture(LLVOAvatarDefines::ETextureIndex type, U32 index) const; /*virtual*/ void setLocalTexture(LLVOAvatarDefines::ETextureIndex type, LLViewerTexture* tex, BOOL baked_version_exits, U32 index); protected: /*virtual*/ void setBakedReady(LLVOAvatarDefines::ETextureIndex type, BOOL baked_version_exists, U32 index); @@ -252,6 +250,10 @@ public: void setupComposites(); void updateComposites(); + const LLUUID& grabBakedTexture(LLVOAvatarDefines::EBakedTextureIndex baked_index) const; + BOOL canGrabBakedTexture(LLVOAvatarDefines::EBakedTextureIndex baked_index) const; + + //-------------------------------------------------------------------- // Scratch textures (used for compositing) //-------------------------------------------------------------------- -- cgit v1.2.3 From 47a398e52f70b9501e1d62512fd40398092b47a6 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Wed, 19 May 2010 17:11:28 -0700 Subject: EXT-6534 FIXED Snapshot to Disk ... causes snapshot of the active window with a background to the correct size but the window the same size as original --- indra/newview/llviewerwindow.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index d8277b0681..11e8f0de77 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -4007,9 +4007,6 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei // PRE SNAPSHOT gDisplaySwapBuffers = FALSE; - // if not showing ui, use full window to render world view - updateWorldViewRect(!show_ui); - glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); setCursor(UI_CURSOR_WAIT); @@ -4082,6 +4079,9 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei //else: keep the current scene scale, re-scale it if necessary after reading out. } + // if not showing ui, use full window to render world view + updateWorldViewRect(!show_ui); + S32 buffer_x_offset = llfloor(((window_width - snapshot_width) * scale_factor) / 2.f); S32 buffer_y_offset = llfloor(((window_height - snapshot_height) * scale_factor) / 2.f); -- cgit v1.2.3 From da09b1dde1e09cd5c43114321479da3b22df1355 Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Wed, 19 May 2010 18:36:51 -0700 Subject: EXT-7388 - --grid command line argument doesn't do anything. Grid selection code was looking up the grid by grid host id not grid label. As SLE grids use their dns name as their lable, it worked there. However, the beta grids use a short label. --- indra/newview/llviewernetwork.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewernetwork.cpp b/indra/newview/llviewernetwork.cpp index 7812867667..c76eee80f7 100644 --- a/indra/newview/llviewernetwork.cpp +++ b/indra/newview/llviewernetwork.cpp @@ -257,7 +257,11 @@ void LLGridManager::initialize(const std::string& grid_file) // load a grid from the command line. // if the actual grid name is specified from the command line, // set it as the 'selected' grid. - mGrid = gSavedSettings.getString("CmdLineGridChoice"); + std::string cmd_line_grid = gSavedSettings.getString("CmdLineGridChoice"); + if(!cmd_line_grid.empty()) + { + mGrid = getGridByLabel(cmd_line_grid); + } LL_INFOS("GridManager") << "Grid Name: " << mGrid << LL_ENDL; // If a command line login URI was passed in, so we should add the command -- cgit v1.2.3 From d4b37309cb00108a761259d570ae9057658ad215 Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Thu, 20 May 2010 00:02:26 -0700 Subject: EXT-6734 - Unable to run several copies of viewer On startup, a piece of code in llappviewer.cpp checks for the existence and validity of a slurl entered on the command line. If there is a slurl, then the slurl is sent to another instance of the viewer if one is running (for windows and linux only.) After the SLE refactor of slurls, the startup slurl was set to LAST by default. As this is a valid slurl the call to pass the slurl to another viewer was made, ignoring the codepath that checks for multiple viewer launches. The fix defaults the startup slurl to INVALID. Now, when no slurl is passed in on the command line, the code that sends the slurl to another instance is skipped and the 'multiple' flag is checked appropriately. --- indra/newview/llslurl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llslurl.h b/indra/newview/llslurl.h index 28c23561cf..1210c398f1 100644 --- a/indra/newview/llslurl.h +++ b/indra/newview/llslurl.h @@ -65,7 +65,7 @@ public: }; - LLSLURL(): mType(LAST_LOCATION) { } + LLSLURL(): mType(INVALID) { } LLSLURL(const std::string& slurl); LLSLURL(const std::string& grid, const std::string& region); LLSLURL(const std::string& region, const LLVector3& position); -- cgit v1.2.3 From 1e48e25558e657d82f711578e54304c745fa9347 Mon Sep 17 00:00:00 2001 From: Yuri Chebotarev Date: Thu, 20 May 2010 10:45:39 +0300 Subject: EXT-7051 additional fix - add more hardcoded words to translated dictionary reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/414/ --HG-- branch : product-engine --- indra/newview/llviewerinventory.cpp | 1 + indra/newview/skins/default/xui/en/strings.xml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index a2331bd69a..f0532d5a31 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -101,6 +101,7 @@ public: mInventoryItemsDict["Female Gestures"] = LLTrans::getString("Female Gestures"); mInventoryItemsDict["Other Gestures"] = LLTrans::getString("Other Gestures"); mInventoryItemsDict["Speech Gestures"] = LLTrans::getString("Speech Gestures"); + mInventoryItemsDict["Common Gestures"] = LLTrans::getString("Common Gestures"); //predefined gestures diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index bf28e78cf6..f8bb36b88a 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -3142,7 +3142,7 @@ Abuse Report Female Gestures Other Gestures Speech Gestures - + Common Gestures Male - Excuse me Male - Get lost -- cgit v1.2.3 From 56e88c6b2e656a28b25154e27c05e7ced65d90a8 Mon Sep 17 00:00:00 2001 From: Yuri Chebotarev Date: Thu, 20 May 2010 10:49:15 +0300 Subject: EXT-7367 FIX - eat sroll wheel above gesture popup list reviwed by Mike Antipov at https://codereview.productengine.com/secondlife/r/411 --HG-- branch : product-engine --- indra/newview/llnearbychatbar.cpp | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index bd504906d5..7a525596a0 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -69,6 +69,25 @@ static LLChatTypeTrigger sChatTypeTriggers[] = { { "/shout" , CHAT_TYPE_SHOUT} }; +//ext-7367 +//Problem: gesture list control (actually LLScrollListCtrl) didn't actually process mouse wheel message. +// introduce new gesture list subclass to "eat" mouse wheel messages (and probably some other messages) +class LLGestureScrollListCtrl: public LLScrollListCtrl +{ +protected: + friend class LLUICtrlFactory; + LLGestureScrollListCtrl(const LLScrollListCtrl::Params& params) + :LLScrollListCtrl(params) + { + } +public: + BOOL handleScrollWheel(S32 x, S32 y, S32 clicks) + { + LLScrollListCtrl::handleScrollWheel( x, y, clicks ); + return TRUE; + } +}; + LLGestureComboList::Params::Params() : combo_button("combo_button"), combo_list("combo_list") @@ -90,13 +109,14 @@ LLGestureComboList::LLGestureComboList(const LLGestureComboList::Params& p) addChild(mButton); - LLScrollListCtrl::Params params = p.combo_list; + LLGestureScrollListCtrl::Params params(p.combo_list); + params.name("GestureComboList"); params.commit_callback.function(boost::bind(&LLGestureComboList::onItemSelected, this, _2)); params.visible(false); params.commit_on_keyboard_movement(false); - mList = LLUICtrlFactory::create(params); + mList = LLUICtrlFactory::create(params); addChild(mList); //****************************Gesture Part********************************/ -- cgit v1.2.3 From 13d2501c847929ce9ee155dbb4dcfcf166710d3e Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 20 May 2010 11:38:57 +0100 Subject: SNOW-207/DEV-42245 : FIXED : Texture loading on sculpty plants is failing making content appear to be of poor quality. Patch by Thickbrick, reviewed by me. --- indra/newview/llface.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index a1336815f7..e0e5b32299 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -1376,9 +1376,18 @@ F32 LLFace::getTextureVirtualSize() texel_area = 1.f; } - //apply texel area to face area to get accurate ratio - //face_area /= llclamp(texel_area, 1.f/64.f, 16.f); - F32 face_area = mPixelArea / llclamp(texel_area, 0.015625f, 128.f); + F32 face_area; + if (mVObjp->isSculpted() && texel_area > 1.f) + { + //sculpts can break assumptions about texel area + face_area = mPixelArea; + } + else + { + //apply texel area to face area to get accurate ratio + //face_area /= llclamp(texel_area, 1.f/64.f, 16.f); + face_area = mPixelArea / llclamp(texel_area, 0.015625f, 128.f); + } if(face_area > LLViewerTexture::sMaxSmallImageSize) { -- cgit v1.2.3 From 49a79a3f68dccd985d2f0f2462eabc210d215736 Mon Sep 17 00:00:00 2001 From: Andrew Dyukov Date: Thu, 20 May 2010 14:31:31 +0300 Subject: EXT-7200 FIXED Integrated art missing from appearance. Most changes are in xml, but changing of view buttons overlay icons in lists from add wearables is implemented in code. Dragbar icon was only added as file, it will be integrated in EXT-7255 (There is no dragbar between 'Edit Outfit' and 'Add to Outfit:' panels). Reviewed by Neal Orman at https://codereview.productengine.com/secondlife/r/410/ --HG-- branch : product-engine --- indra/newview/llpaneloutfitedit.cpp | 4 +++ .../skins/default/textures/icons/DownArrow_Off.png | Bin 0 -> 217 bytes .../skins/default/textures/icons/Edit_Wrench.png | Bin 0 -> 724 bytes .../textures/icons/Hierarchy_View_Disabled.png | Bin 0 -> 178 bytes .../default/textures/icons/Hierarchy_View_On.png | Bin 0 -> 183 bytes .../default/textures/icons/List_View_Disabled.png | Bin 0 -> 158 bytes .../skins/default/textures/icons/List_View_On.png | Bin 0 -> 160 bytes .../skins/default/textures/icons/Locked_Icon.png | Bin 0 -> 306 bytes .../skins/default/textures/icons/Search_Icon.png | Bin 0 -> 552 bytes .../skins/default/textures/icons/Shirt_Large.png | Bin 0 -> 471 bytes .../skins/default/textures/icons/UpArrow_Off.png | Bin 0 -> 219 bytes indra/newview/skins/default/textures/textures.xml | 17 +++++++++++ .../skins/default/textures/windows/Dragbar.png | Bin 0 -> 348 bytes .../default/xui/en/panel_body_parts_list_item.xml | 11 ++++--- .../default/xui/en/panel_clothing_list_item.xml | 19 +++++------- .../xui/en/panel_dummy_clothing_list_item.xml | 2 +- .../skins/default/xui/en/panel_outfit_edit.xml | 33 ++++++++++++++------- .../skins/default/xui/en/sidepanel_appearance.xml | 2 +- 18 files changed, 59 insertions(+), 29 deletions(-) create mode 100644 indra/newview/skins/default/textures/icons/DownArrow_Off.png create mode 100644 indra/newview/skins/default/textures/icons/Edit_Wrench.png create mode 100644 indra/newview/skins/default/textures/icons/Hierarchy_View_Disabled.png create mode 100644 indra/newview/skins/default/textures/icons/Hierarchy_View_On.png create mode 100644 indra/newview/skins/default/textures/icons/List_View_Disabled.png create mode 100644 indra/newview/skins/default/textures/icons/List_View_On.png create mode 100644 indra/newview/skins/default/textures/icons/Locked_Icon.png create mode 100644 indra/newview/skins/default/textures/icons/Search_Icon.png create mode 100644 indra/newview/skins/default/textures/icons/Shirt_Large.png create mode 100644 indra/newview/skins/default/textures/icons/UpArrow_Off.png create mode 100644 indra/newview/skins/default/textures/windows/Dragbar.png (limited to 'indra/newview') diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index 4178fd9c90..4f3f73beca 100644 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -350,6 +350,8 @@ void LLPanelOutfitEdit::showFilteredWearablesPanel() if(switchPanels(mInventoryItemsPanel, mWearableItemsPanel)) { mFolderViewBtn->setToggleState(FALSE); + mFolderViewBtn->setImageOverlay(getString("folder_view_off"), mFolderViewBtn->getImageOverlayHAlign()); + mListViewBtn->setImageOverlay(getString("list_view_on"), mListViewBtn->getImageOverlayHAlign()); } mListViewBtn->setToggleState(TRUE); } @@ -359,6 +361,8 @@ void LLPanelOutfitEdit::showFilteredFolderWearablesPanel() if(switchPanels(mWearableItemsPanel, mInventoryItemsPanel)) { mListViewBtn->setToggleState(FALSE); + mListViewBtn->setImageOverlay(getString("list_view_off"), mListViewBtn->getImageOverlayHAlign()); + mFolderViewBtn->setImageOverlay(getString("folder_view_on"), mFolderViewBtn->getImageOverlayHAlign()); } mFolderViewBtn->setToggleState(TRUE); } diff --git a/indra/newview/skins/default/textures/icons/DownArrow_Off.png b/indra/newview/skins/default/textures/icons/DownArrow_Off.png new file mode 100644 index 0000000000..60f62eed4a Binary files /dev/null and b/indra/newview/skins/default/textures/icons/DownArrow_Off.png differ diff --git a/indra/newview/skins/default/textures/icons/Edit_Wrench.png b/indra/newview/skins/default/textures/icons/Edit_Wrench.png new file mode 100644 index 0000000000..1c43960d02 Binary files /dev/null and b/indra/newview/skins/default/textures/icons/Edit_Wrench.png differ diff --git a/indra/newview/skins/default/textures/icons/Hierarchy_View_Disabled.png b/indra/newview/skins/default/textures/icons/Hierarchy_View_Disabled.png new file mode 100644 index 0000000000..fb370f98d5 Binary files /dev/null and b/indra/newview/skins/default/textures/icons/Hierarchy_View_Disabled.png differ diff --git a/indra/newview/skins/default/textures/icons/Hierarchy_View_On.png b/indra/newview/skins/default/textures/icons/Hierarchy_View_On.png new file mode 100644 index 0000000000..c590a5a5d3 Binary files /dev/null and b/indra/newview/skins/default/textures/icons/Hierarchy_View_On.png differ diff --git a/indra/newview/skins/default/textures/icons/List_View_Disabled.png b/indra/newview/skins/default/textures/icons/List_View_Disabled.png new file mode 100644 index 0000000000..155dee5047 Binary files /dev/null and b/indra/newview/skins/default/textures/icons/List_View_Disabled.png differ diff --git a/indra/newview/skins/default/textures/icons/List_View_On.png b/indra/newview/skins/default/textures/icons/List_View_On.png new file mode 100644 index 0000000000..9127c92c3b Binary files /dev/null and b/indra/newview/skins/default/textures/icons/List_View_On.png differ diff --git a/indra/newview/skins/default/textures/icons/Locked_Icon.png b/indra/newview/skins/default/textures/icons/Locked_Icon.png new file mode 100644 index 0000000000..8ead280794 Binary files /dev/null and b/indra/newview/skins/default/textures/icons/Locked_Icon.png differ diff --git a/indra/newview/skins/default/textures/icons/Search_Icon.png b/indra/newview/skins/default/textures/icons/Search_Icon.png new file mode 100644 index 0000000000..541aa8f52a Binary files /dev/null and b/indra/newview/skins/default/textures/icons/Search_Icon.png differ diff --git a/indra/newview/skins/default/textures/icons/Shirt_Large.png b/indra/newview/skins/default/textures/icons/Shirt_Large.png new file mode 100644 index 0000000000..0f3846bccc Binary files /dev/null and b/indra/newview/skins/default/textures/icons/Shirt_Large.png differ diff --git a/indra/newview/skins/default/textures/icons/UpArrow_Off.png b/indra/newview/skins/default/textures/icons/UpArrow_Off.png new file mode 100644 index 0000000000..00015bce20 Binary files /dev/null and b/indra/newview/skins/default/textures/icons/UpArrow_Off.png differ diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index f4206dc2e5..0788a0ca9e 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -110,6 +110,8 @@ with the same filename but different name + + @@ -119,6 +121,7 @@ with the same filename but different name + @@ -145,6 +148,9 @@ with the same filename but different name + + + @@ -255,9 +261,14 @@ with the same filename but different name + + + + + @@ -410,6 +421,8 @@ with the same filename but different name + + @@ -432,6 +445,8 @@ with the same filename but different name + + @@ -523,6 +538,8 @@ with the same filename but different name + + diff --git a/indra/newview/skins/default/textures/windows/Dragbar.png b/indra/newview/skins/default/textures/windows/Dragbar.png new file mode 100644 index 0000000000..d94dda1aae Binary files /dev/null and b/indra/newview/skins/default/textures/windows/Dragbar.png differ diff --git a/indra/newview/skins/default/xui/en/panel_body_parts_list_item.xml b/indra/newview/skins/default/xui/en/panel_body_parts_list_item.xml index 115964e5f2..e3f6045e27 100644 --- a/indra/newview/skins/default/xui/en/panel_body_parts_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_body_parts_list_item.xml @@ -52,18 +52,17 @@ name="btn_lock" layout="topleft" follows="top|right" - image_name="Lock2" - top="0" + image_name="Locked_Icon" + top="2" left="0" - height="20" - width="20" + height="13" + width="9" tab_stop="false" /> -- cgit v1.2.3 From 265f77747f9ae7719c338bd9b3e76ba59b130b68 Mon Sep 17 00:00:00 2001 From: Yuri Chebotarev Date: Thu, 20 May 2010 16:55:06 +0300 Subject: EXT-6598 FIX Handle tooltip message for separator reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/417/ --HG-- branch : product-engine --- indra/newview/llnearbychatbar.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index 7a525596a0..680ed35fa2 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -70,7 +70,7 @@ static LLChatTypeTrigger sChatTypeTriggers[] = { }; //ext-7367 -//Problem: gesture list control (actually LLScrollListCtrl) didn't actually process mouse wheel message. +//Problem: gesture list control (actually LLScrollListCtrl) didn't actually process mouse wheel message. // introduce new gesture list subclass to "eat" mouse wheel messages (and probably some other messages) class LLGestureScrollListCtrl: public LLScrollListCtrl { @@ -86,6 +86,14 @@ public: LLScrollListCtrl::handleScrollWheel( x, y, clicks ); return TRUE; } + //See EXT-6598 + //Mouse hover over separator will result in not processing tooltip message + //So eat this message + BOOL handleToolTip(S32 x, S32 y, MASK mask) + { + LLScrollListCtrl::handleToolTip( x, y, mask ); + return TRUE; + } }; LLGestureComboList::Params::Params() -- cgit v1.2.3 From 55e26cf05604a4dc71fa6683f1ec576eac779cad Mon Sep 17 00:00:00 2001 From: Yuri Chebotarev Date: Thu, 20 May 2010 16:58:20 +0300 Subject: ext-7403 fix - reset all data before setting new group id reviewed by Vadim Savchuk https://codereview.productengine.com/secondlife/r/419/ --HG-- branch : product-engine --- indra/newview/llpanelgrouproles.cpp | 29 +++++++++++++++++++++++++++++ indra/newview/llpanelgrouproles.h | 4 ++++ 2 files changed, 33 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index 95ec8170f2..7dec2251e8 100644 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -797,8 +797,37 @@ BOOL LLPanelGroupMembersSubTab::postBuildSubTab(LLView* root) void LLPanelGroupMembersSubTab::setGroupID(const LLUUID& id) { + //clear members list + if(mMembersList) mMembersList->deleteAllItems(); + if(mAssignedRolesList) mAssignedRolesList->deleteAllItems(); + if(mAllowedActionsList) mAllowedActionsList->deleteAllItems(); + LLPanelGroupSubTab::setGroupID(id); +} + +void LLPanelGroupRolesSubTab::setGroupID(const LLUUID& id) +{ + if(mRolesList) mRolesList->deleteAllItems(); + if(mAssignedMembersList) mAssignedMembersList->deleteAllItems(); + if(mAllowedActionsList) mAllowedActionsList->deleteAllItems(); + + if(mRoleName) mRoleName->clear(); + if(mRoleDescription) mRoleDescription->clear(); + if(mRoleTitle) mRoleTitle->clear(); + + setFooterEnabled(FALSE); + LLPanelGroupSubTab::setGroupID(id); +} +void LLPanelGroupActionsSubTab::setGroupID(const LLUUID& id) +{ + if(mActionList) mActionList->deleteAllItems(); + if(mActionRoles) mActionRoles->deleteAllItems(); + if(mActionMembers) mActionMembers->deleteAllItems(); + + if(mActionDescription) mActionDescription->clear(); + + LLPanelGroupSubTab::setGroupID(id); } diff --git a/indra/newview/llpanelgrouproles.h b/indra/newview/llpanelgrouproles.h index a877402041..44aa7cea38 100644 --- a/indra/newview/llpanelgrouproles.h +++ b/indra/newview/llpanelgrouproles.h @@ -257,6 +257,8 @@ public: void handleDeleteRole(); void saveRoleChanges(); + + virtual void setGroupID(const LLUUID& id); protected: void handleActionCheck(LLUICtrl* ctrl, bool force); LLSD createRoleItem(const LLUUID& role_id, std::string name, std::string title, S32 members); @@ -294,6 +296,8 @@ public: virtual void update(LLGroupChange gc); void handleActionSelect(); + + virtual void setGroupID(const LLUUID& id); protected: LLScrollListCtrl* mActionList; LLScrollListCtrl* mActionRoles; -- cgit v1.2.3 From c3a352b219380faa722be6f1ac916a7b95eb836c Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Thu, 20 May 2010 17:33:26 +0300 Subject: EXT-7371 FIXED Improved new state handling in p2p Voice channel to process session leave event correctly. Reason: * when user leave a p2p voice session himself the session's voice channel is marked as "ignore next leave session event" * but when he re-starts the voice session the channel stays in "ignore next leave session event" state. So, when an other p2p participant ends call this voice channel is not deactivated because of this flag. Fix: reset "ignore next leave session event" flag to FALSE when viewer is joining p2p voice session. Reviewed by Aimee Walton at https://codereview.productengine.com/secondlife/r/418/ --HG-- branch : product-engine --- indra/newview/llvoicechannel.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index 25b46f8e55..1b4471a9fe 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -791,6 +791,12 @@ void LLVoiceChannelP2P::handleStatusChange(EStatusType type) } mIgnoreNextSessionLeave = FALSE; return; + case STATUS_JOINING: + // because we join session we expect to process session leave event in the future. EXT-7371 + // may be this should be done in the LLVoiceChannel::handleStatusChange. + mIgnoreNextSessionLeave = FALSE; + break; + default: break; } -- cgit v1.2.3 From ae6c2de1e33e15f7a3766007a2b20b16f99c1114 Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Thu, 20 May 2010 18:57:29 +0300 Subject: EXT-5666 FIXED Changed clicked attachment color. --HG-- branch : product-engine --- indra/newview/skins/default/colors.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml index 33668f5ed6..e8a893e31b 100644 --- a/indra/newview/skins/default/colors.xml +++ b/indra/newview/skins/default/colors.xml @@ -359,7 +359,7 @@ reference="White"/> + reference="LtGray" /> -- cgit v1.2.3 From 53505bd225608d1f048ca80e0bc475d2c125db3a Mon Sep 17 00:00:00 2001 From: Andrew Polunin Date: Thu, 20 May 2010 21:16:16 +0300 Subject: EXT-7223 FIXED (Add \"Shop\" Button in bottom of Inventory panel) - Added 'MarketplaceURL' setting in settings.xml to represent URL which points to the Marketplace. - Added member mShopBtn in the class LLSidepanelInventory. - Added handler LLSidepanelInventory::onShopButtonClicked() which handles a click on the 'Shop' button - Added corresponding widget in the sidepanel_inventory.xml Reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/408/ --HG-- branch : product-engine --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llsidepanelinventory.cpp | 9 +++++++++ indra/newview/llsidepanelinventory.h | 1 + indra/newview/skins/default/xui/en/sidepanel_inventory.xml | 10 ++++++++++ 4 files changed, 31 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 7156af57ec..418032c554 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -4591,6 +4591,17 @@ Value + MarketplaceURL + + Comment + URL to the Marketplace + Persist + 0 + Type + String + Value + https://www.xstreetsl.com/modules.php?name=Marketplace + MaxDragDistance Comment diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index 65b9184fe5..fc5143d33b 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -42,6 +42,7 @@ #include "llsidepaneltaskinfo.h" #include "lltabcontainer.h" #include "llselectmgr.h" +#include "llweb.h" static LLRegisterPanelClassWrapper t_inventory("sidepanel_inventory"); @@ -70,6 +71,9 @@ BOOL LLSidepanelInventory::postBuild() mShareBtn = mInventoryPanel->getChild("share_btn"); mShareBtn->setClickedCallback(boost::bind(&LLSidepanelInventory::onShareButtonClicked, this)); + LLButton* shop_btn = mInventoryPanel->getChild("shop_btn"); + shop_btn->setClickedCallback(boost::bind(&LLSidepanelInventory::onShopButtonClicked, this)); + mWearBtn = mInventoryPanel->getChild("wear_btn"); mWearBtn->setClickedCallback(boost::bind(&LLSidepanelInventory::onWearButtonClicked, this)); @@ -155,6 +159,11 @@ void LLSidepanelInventory::onShareButtonClicked() LLAvatarActions::shareWithAvatars(); } +void LLSidepanelInventory::onShopButtonClicked() +{ + LLWeb::loadURLExternal(gSavedSettings.getString("MarketplaceURL")); +} + void LLSidepanelInventory::performActionOnSelection(const std::string &action) { LLPanelMainInventory *panel_main_inventory = mInventoryPanel->getChild("panel_main_inventory"); diff --git a/indra/newview/llsidepanelinventory.h b/indra/newview/llsidepanelinventory.h index 95eab3571c..2dc17e741d 100644 --- a/indra/newview/llsidepanelinventory.h +++ b/indra/newview/llsidepanelinventory.h @@ -79,6 +79,7 @@ private: protected: void onInfoButtonClicked(); void onShareButtonClicked(); + void onShopButtonClicked(); void onWearButtonClicked(); void onPlayButtonClicked(); void onTeleportButtonClicked(); diff --git a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml index 812d94c55f..4c42d1f750 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml @@ -57,6 +57,16 @@ name="share_btn" top="0" width="102" /> +