From 667ae0b9a31318d43d36cb6c8cb73a83e1470009 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Thu, 4 Feb 2010 15:54:56 +0200 Subject: Fixed critical bug EXT-4845 (Create padding around text messages in the side tray panels) - moved "No Items" textbox params to widget (flat_list_view.xml) - set default vertical/horizontal padding to 10 px - they can be overridden in panel's xml if necessary. --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/panel_people.xml | 2 ++ indra/newview/skins/default/xui/en/widgets/flat_list_view.xml | 10 +++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml index 3b5add33a8..447ac1b123 100644 --- a/indra/newview/skins/default/xui/en/panel_people.xml +++ b/indra/newview/skins/default/xui/en/panel_people.xml @@ -137,6 +137,7 @@ background_visible="true" \ No newline at end of file + opaque="true"> + + \ No newline at end of file -- cgit v1.2.3 From 7b62c80060184690ac28d34e4653472179f0cf13 Mon Sep 17 00:00:00 2001 From: Denis Serdjuk Date: Thu, 4 Feb 2010 15:58:49 +0200 Subject: Additional commit for low Bug EXT-4242 . No logic had been affected. code cleaning up. --HG-- branch : product-engine --- indra/newview/llnavigationbar.cpp | 57 ++++++++++++++++++++++----------------- indra/newview/llnavigationbar.h | 37 +++++++++++-------------- 2 files changed, 48 insertions(+), 46 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index 59708fcfb5..46cab0d868 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -185,43 +185,46 @@ void LLTeleportHistoryMenuItem::onMouseLeave(S32 x, S32 y, MASK mask) static LLDefaultChildRegistry::Register menu_button("pull_button"); -LLPullButton::LLPullButton(const LLPullButton::Params& params): - LLButton(params) - , mClickDraggingSignal(NULL) +LLPullButton::LLPullButton(const LLPullButton::Params& params) : + LLButton(params) { setDirectionFromName(params.direction); } -boost::signals2::connection LLPullButton::setClickDraggingCallback( const commit_signal_t::slot_type& cb ) -{ - if (!mClickDraggingSignal) mClickDraggingSignal = new commit_signal_t(); - return mClickDraggingSignal->connect(cb); +boost::signals2::connection LLPullButton::setClickDraggingCallback(const commit_signal_t::slot_type& cb) +{ + return mClickDraggingSignal.connect(cb); } /*virtual*/ void LLPullButton::onMouseLeave(S32 x, S32 y, MASK mask) { LLButton::onMouseLeave(x, y, mask); - - if(mMouseDownTimer.getStarted() ) + + if (mMouseDownTimer.getStarted()) //an user have done a mouse down, if the timer started. see LLButton::handleMouseDown for details { - const LLVector2 cursor_direction = LLVector2(F32(x),F32(y)) - mLastMouseDown; - if( angle_between(mDraggingDirection, cursor_direction) < 0.5 * F_PI_BY_TWO)//call if angle < pi/4 - { - if(mClickDraggingSignal) - { - (*mClickDraggingSignal)(this, LLSD()); - } - } + const LLVector2 cursor_direction = LLVector2(F32(x), F32(y)) - mLastMouseDown; + /* For now cursor_direction points to the direction of mouse movement + * Need to decide whether should we fire a signal. + * We fire if angle between mDraggingDirection and cursor_direction is less that 45 degree + * Note: + * 0.5 * F_PI_BY_TWO equals to PI/4 radian that equals to angle of 45 degrees + */ + if (angle_between(mDraggingDirection, cursor_direction) < 0.5 * F_PI_BY_TWO)//call if angle < pi/4 + { + mClickDraggingSignal(this, LLSD()); + } } } /*virtual*/ BOOL LLPullButton::handleMouseDown(S32 x, S32 y, MASK mask) +{ + BOOL handled = LLButton::handleMouseDown(x, y, mask); + if (handled) { - BOOL handled = LLButton::handleMouseDown(x,y, mask); - if(handled) - { + //if mouse down was handled by button, + //capture mouse position to calculate the direction of mouse move after mouseLeave event mLastMouseDown.set(F32(x), F32(y)); } return handled; @@ -230,27 +233,31 @@ BOOL LLPullButton::handleMouseDown(S32 x, S32 y, MASK mask) /*virtual*/ BOOL LLPullButton::handleMouseUp(S32 x, S32 y, MASK mask) { + // reset data to get ready for next circle mLastMouseDown.clear(); return LLButton::handleMouseUp(x, y, mask); } - +/** + * this function is setting up dragging direction vector. + * Last one is just unit vector. It points to direction of mouse drag that we need to handle + */ void LLPullButton::setDirectionFromName(const std::string& name) { if (name == "left") { - mDraggingDirection.set(F32(-1), F32(0)); + mDraggingDirection.set(F32(-1), F32(0)); } else if (name == "right") { - mDraggingDirection.set(F32(0), F32(1)); + mDraggingDirection.set(F32(0), F32(1)); } else if (name == "down") { - mDraggingDirection.set(F32(0), F32(-1)); + mDraggingDirection.set(F32(0), F32(-1)); } else if (name == "up") { - mDraggingDirection.set(F32(0), F32(1)); + mDraggingDirection.set(F32(0), F32(1)); } } diff --git a/indra/newview/llnavigationbar.h b/indra/newview/llnavigationbar.h index 9d0abc7a3a..b512f2a79c 100644 --- a/indra/newview/llnavigationbar.h +++ b/indra/newview/llnavigationbar.h @@ -44,46 +44,41 @@ class LLSearchComboBox; /** * This button is able to handle click-dragging mouse event. * It has appropriated signal for this event. - * Dragging direction can be set from xml by attribute called 'direction' + * Dragging direction can be set from xml attribute called 'direction' * * *TODO: move to llui? */ -class LLPullButton : public LLButton +class LLPullButton: public LLButton { LOG_CLASS(LLPullButton); - + public: - - struct Params : public LLInitParam::Block + struct Params: public LLInitParam::Block { - Optional direction; // left, right, down, up - - Params() - : direction("direction","down") - {} + Optional direction; // left, right, down, up + + Params() + : direction("direction", "down") + { + } }; /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask); - + /*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask); - + /*virtual*/ void onMouseLeave(S32 x, S32 y, MASK mask); - boost::signals2::connection setClickDraggingCallback( const commit_signal_t::slot_type& cb ); - - /* virtual*/ ~LLPullButton() - { - delete mClickDraggingSignal; - } - + boost::signals2::connection setClickDraggingCallback(const commit_signal_t::slot_type& cb); + protected: friend class LLUICtrlFactory; // convert string name into direction vector void setDirectionFromName(const std::string& name); LLPullButton(const LLPullButton::Params& params); - - commit_signal_t* mClickDraggingSignal; + + commit_signal_t mClickDraggingSignal; LLVector2 mLastMouseDown; LLVector2 mDraggingDirection; }; -- cgit v1.2.3 From 8693cf51e5f1645bcb99310700eb530cff5a0373 Mon Sep 17 00:00:00 2001 From: Denis Serdjuk Date: Thu, 4 Feb 2010 16:04:28 +0200 Subject: fixed critical bug EXT-4887 The Label, \"Favorites Bar\" should only appear if you have no favorites Changes: Check for empty favbar has been added to change visibility of favbar label --HG-- branch : product-engine --- indra/newview/llfavoritesbar.cpp | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index a5b62439f4..90f6438980 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -34,7 +34,6 @@ #include "llfavoritesbar.h" -#include "llbutton.h" #include "llfloaterreg.h" #include "llfocusmgr.h" #include "llinventory.h" @@ -48,7 +47,6 @@ #include "llclipboard.h" #include "llinventoryclipboard.h" #include "llinventorybridge.h" -#include "llinventorymodel.h" #include "llfloaterworldmap.h" #include "lllandmarkactions.h" #include "llnotificationsutil.h" @@ -674,7 +672,14 @@ void LLFavoritesBarCtrl::updateButtons() { return; } - + if(mItems.empty()) + { + mBarLabel->setVisible(TRUE); + } + else + { + mBarLabel->setVisible(FALSE); + } const child_list_t* childs = getChildList(); child_list_const_iter_t child_it = childs->begin(); int first_changed_item_index = 0; @@ -720,14 +725,22 @@ void LLFavoritesBarCtrl::updateButtons() } } // we have to remove ChevronButton to make sure that the last item will be LandmarkButton to get the right aligning + // keep in mind that we are cutting all buttons in space between the last visible child of favbar and ChevronButton if (mChevronButton->getParent() == this) { removeChild(mChevronButton); } int last_right_edge = 0; + //calculate new buttons offset if (getChildList()->size() > 0) { - last_right_edge = getChildList()->back()->getRect().mRight; + //find last visible child to get the rightest button offset + child_list_const_reverse_iter_t last_visible_it = std::find_if(childs->rbegin(), childs->rend(), + std::mem_fun(&LLView::getVisible)); + if(last_visible_it != childs->rend()) + { + last_right_edge = (*last_visible_it)->getRect().mRight; + } } //last_right_edge is saving coordinates LLButton* last_new_button = NULL; -- cgit v1.2.3 From 7453aae13e01bd0b055fed8056de8889e878942e Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Thu, 4 Feb 2010 15:16:14 +0200 Subject: Fixed normal bug EXT-4862 - Nearby Chat pop-up toasts close affordance displays under prior toasts. Implemented same fix for notification toasts. --HG-- branch : product-engine --- indra/newview/llnearbychathandler.cpp | 7 +++++++ indra/newview/llscreenchannel.cpp | 8 ++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index c08ca30bab..be48770567 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -274,6 +274,13 @@ void LLNearbyChatScreenChannel::showToastsBottom() toast->setRect(toast_rect); toast->setIsHidden(false); toast->setVisible(TRUE); + + if(!toast->hasFocus()) + { + // Fixing Z-order of toasts (EXT-4862) + // Next toast will be positioned under this one. + gFloaterView->sendChildToBack(toast); + } bottom = toast->getRect().mTop; } diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp index 8f36c0e88a..7c2e7e3319 100644 --- a/indra/newview/llscreenchannel.cpp +++ b/indra/newview/llscreenchannel.cpp @@ -533,9 +533,13 @@ void LLScreenChannel::showToastsBottom() // HACK // EXT-2653: it is necessary to prevent overlapping for secondary showed toasts (*it).toast->setVisible(TRUE); - // Show toast behind floaters. (EXT-3089) - gFloaterView->sendChildToBack((*it).toast); } + if(!(*it).toast->hasFocus()) + { + // Fixing Z-order of toasts (EXT-4862) + // Next toast will be positioned under this one. + gFloaterView->sendChildToBack((*it).toast); + } } if(it != mToastList.rend()) -- cgit v1.2.3 From 36a44ba0e9133e78cc66f7d0b65d0890cfeb3db5 Mon Sep 17 00:00:00 2001 From: Ychebotarev ProductEngine Date: Thu, 4 Feb 2010 15:37:25 +0200 Subject: fix for normal EXT-1888 Apply button remains active after Applying changes --HG-- branch : product-engine --- indra/newview/llfloaterpreference.cpp | 100 +++++++++++++++++++++ indra/newview/llfloaterpreference.h | 16 ++++ .../skins/default/xui/en/floater_preferences.xml | 2 +- 3 files changed, 117 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index ef444c8ba4..9d9fbacee3 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -571,6 +571,16 @@ void LLFloaterPreference::setHardwareDefaults() { LLFeatureManager::getInstance()->applyRecommendedSettings(); refreshEnabledGraphics(); + LLTabContainer* tabcontainer = getChild("pref core"); + child_list_t::const_iterator iter = tabcontainer->getChildList()->begin(); + child_list_t::const_iterator end = tabcontainer->getChildList()->end(); + for ( ; iter != end; ++iter) + { + LLView* view = *iter; + LLPanelPreference* panel = dynamic_cast(view); + if (panel) + panel->setHardwareDefaults(); + } } //virtual @@ -1525,3 +1535,93 @@ void LLPanelPreference::setControlFalse(const LLSD& user_data) if (control) control->set(LLSD(FALSE)); } + +static LLRegisterPanelClassWrapper t_pref_graph("panel_preference_graphics"); + +BOOL LLPanelPreferenceGraphics::postBuild() +{ + return LLPanelPreference::postBuild(); +} +void LLPanelPreferenceGraphics::draw() +{ + LLPanelPreference::draw(); + + LLButton* button_apply = findChild("Apply"); + + if(button_apply && button_apply->getVisible()) + { + bool enable = hasDirtyChilds(); + + button_apply->setEnabled(enable); + + } +} +bool LLPanelPreferenceGraphics::hasDirtyChilds() +{ + std::list view_stack; + view_stack.push_back(this); + while(!view_stack.empty()) + { + // Process view on top of the stack + LLView* curview = view_stack.front(); + view_stack.pop_front(); + + LLUICtrl* ctrl = dynamic_cast(curview); + if (ctrl) + { + if(ctrl->isDirty()) + return true; + } + // Push children onto the end of the work stack + for (child_list_t::const_iterator iter = curview->getChildList()->begin(); + iter != curview->getChildList()->end(); ++iter) + { + view_stack.push_back(*iter); + } + } + return false; +} + +void LLPanelPreferenceGraphics::resetDirtyChilds() +{ + std::list view_stack; + view_stack.push_back(this); + while(!view_stack.empty()) + { + // Process view on top of the stack + LLView* curview = view_stack.front(); + view_stack.pop_front(); + + LLUICtrl* ctrl = dynamic_cast(curview); + if (ctrl) + { + ctrl->resetDirty(); + } + // Push children onto the end of the work stack + for (child_list_t::const_iterator iter = curview->getChildList()->begin(); + iter != curview->getChildList()->end(); ++iter) + { + view_stack.push_back(*iter); + } + } +} +void LLPanelPreferenceGraphics::apply() +{ + resetDirtyChilds(); + LLPanelPreference::apply(); +} +void LLPanelPreferenceGraphics::cancel() +{ + resetDirtyChilds(); + LLPanelPreference::cancel(); +} +void LLPanelPreferenceGraphics::saveSettings() +{ + resetDirtyChilds(); + LLPanelPreference::saveSettings(); +} +void LLPanelPreferenceGraphics::setHardwareDefaults() +{ + resetDirtyChilds(); + LLPanelPreference::setHardwareDefaults(); +} diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index 8778d76a5a..0827c7c2b2 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -161,6 +161,7 @@ public: virtual void apply(); virtual void cancel(); void setControlFalse(const LLSD& user_data); + virtual void setHardwareDefaults(){}; // This function squirrels away the current values of the controls so that // cancel() can restore them. @@ -177,4 +178,19 @@ private: string_color_map_t mSavedColors; }; +class LLPanelPreferenceGraphics : public LLPanelPreference +{ +public: + BOOL postBuild(); + void draw(); + void apply(); + void cancel(); + void saveSettings(); + void setHardwareDefaults(); +protected: + bool hasDirtyChilds(); + void resetDirtyChilds(); + +}; + #endif // LL_LLPREFERENCEFLOATER_H diff --git a/indra/newview/skins/default/xui/en/floater_preferences.xml b/indra/newview/skins/default/xui/en/floater_preferences.xml index 15655a920e..05deca705a 100644 --- a/indra/newview/skins/default/xui/en/floater_preferences.xml +++ b/indra/newview/skins/default/xui/en/floater_preferences.xml @@ -56,7 +56,7 @@ help_topic="preferences_general_tab" name="general" /> Date: Thu, 4 Feb 2010 15:44:45 +0200 Subject: Fixed low bug EXT-4951 - Redundant edit box context menu in list items in Panel Picks/Classifieds --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/panel_pick_list_item.xml | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/panel_pick_list_item.xml b/indra/newview/skins/default/xui/en/panel_pick_list_item.xml index 023b1fc81d..e62c1278f9 100644 --- a/indra/newview/skins/default/xui/en/panel_pick_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_pick_list_item.xml @@ -64,6 +64,7 @@ layout="topleft" left="103" name="picture_descr" + textbox.mouse_opaque="false" top_pad="0" width="178" word_wrap="true" /> -- cgit v1.2.3 From a7141017afb8b13fe9d4758dfe502cc28966310f Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Thu, 4 Feb 2010 16:27:22 +0200 Subject: =?UTF-8?q?fixed=20EXT-4905=20=E2=80=9CDuplicated=20text=20in=20te?= =?UTF-8?q?leport=20notification=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/notifications.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 5d78cfc9ef..d16474873f 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -1532,7 +1532,7 @@ Your search terms were too short so no search was performed. icon="alertmodal.tga" name="CouldNotTeleportReason" type="alertmodal"> -Could not teleport. +Teleport failed. [REASON] -- cgit v1.2.3 From b1891e2982cc03ccd695eae82989d3e58695616c Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Thu, 4 Feb 2010 16:43:59 +0200 Subject: Fixed normal bug EXT-4925 (Please make user voice settings compatible with 1.23) - for now volume level is stored in external (vivox) format [0.0 - 1.0] - this fix should be included into the Beta 2 release --HG-- branch : product-engine --- indra/newview/llvoiceclient.cpp | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index b6e7e73b9d..f3bfc2e86c 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -1107,16 +1107,17 @@ public: * Sets internal voluem level for specified user. * * @param[in] speaker_id - LLUUID of user to store volume level for - * @param[in] volume - internal volume level to be stored for user. + * @param[in] volume - external (vivox) volume level to be stored for user. */ - void storeSpeakerVolume(const LLUUID& speaker_id, S32 volume); + void storeSpeakerVolume(const LLUUID& speaker_id, F32 volume); /** - * Gets stored internal volume level for specified speaker. + * Gets stored external (vivox) volume level for specified speaker and + * transforms it into internal (viewer) level. * * If specified user is not found default level will be returned. It is equivalent of * external level 0.5 from the 0.0..1.0 range. - * Default internal level is calculated as: internal = 400 * external^2 + * Internal level is calculated as: internal = 400 * external^2 * Maps 0.0 to 1.0 to internal values 0-400 with default 0.5 == 100 * * @param[in] speaker_id - LLUUID of user to get his volume level @@ -1133,7 +1134,7 @@ private: void load(); void save(); - typedef std::map speaker_data_map_t; + typedef std::map speaker_data_map_t; speaker_data_map_t mSpeakersData; }; @@ -1149,7 +1150,7 @@ LLSpeakerVolumeStorage::~LLSpeakerVolumeStorage() save(); } -void LLSpeakerVolumeStorage::storeSpeakerVolume(const LLUUID& speaker_id, S32 volume) +void LLSpeakerVolumeStorage::storeSpeakerVolume(const LLUUID& speaker_id, F32 volume) { mSpeakersData[speaker_id] = volume; } @@ -1163,7 +1164,10 @@ S32 LLSpeakerVolumeStorage::getSpeakerVolume(const LLUUID& speaker_id) if (it != mSpeakersData.end()) { - ret_val = it->second; + F32 f_val = it->second; + // volume can amplify by as much as 4x! + S32 ivol = (S32)(400.f * f_val * f_val); + ret_val = llclamp(ivol, 0, 400); } return ret_val; } @@ -1184,7 +1188,7 @@ void LLSpeakerVolumeStorage::load() for (LLSD::map_const_iterator iter = settings_llsd.beginMap(); iter != settings_llsd.endMap(); ++iter) { - mSpeakersData.insert(std::make_pair(LLUUID(iter->first), (S32)iter->second.asInteger())); + mSpeakersData.insert(std::make_pair(LLUUID(iter->first), (F32)iter->second.asReal())); } } @@ -6288,14 +6292,14 @@ void LLVoiceClient::setUserVolume(const LLUUID& id, F32 volume) participantState *participant = findParticipantByID(id); if (participant) { + // store this volume setting for future sessions + LLSpeakerVolumeStorage::getInstance()->storeSpeakerVolume(id, volume); + // volume can amplify by as much as 4x! S32 ivol = (S32)(400.f * volume * volume); participant->mUserVolume = llclamp(ivol, 0, 400); participant->mVolumeDirty = TRUE; mAudioSession->mVolumeDirty = TRUE; - - // store this volume setting for future sessions - LLSpeakerVolumeStorage::getInstance()->storeSpeakerVolume(id, participant->mUserVolume); } } } -- cgit v1.2.3 From 32aa9d7deee735d86c88f038f8f6fb7199432ff1 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Thu, 4 Feb 2010 16:46:34 +0200 Subject: fixed shout/whisper representation for EXT-4777 Implement saving and loading chat history for Nearby Chat (both plain text and widgeted chat) --HG-- branch : product-engine --- indra/newview/llchathistory.cpp | 13 ++++++++++--- indra/newview/llnearbychat.cpp | 9 +-------- 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 1dc0e8c0a7..f046e08827 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -585,9 +585,16 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL bool irc_me = prefix == "/me " || prefix == "/me'"; // Delimiter after a name in header copy/past and in plain text mode - std::string delimiter = (chat.mChatType != CHAT_TYPE_SHOUT && chat.mChatType != CHAT_TYPE_WHISPER) - ? ": " - : " "; + std::string delimiter = ": "; + std::string shout = LLTrans::getString("shout"); + std::string whisper = LLTrans::getString("whisper"); + if (chat.mChatType == CHAT_TYPE_SHOUT || + chat.mChatType == CHAT_TYPE_WHISPER || + chat.mText.compare(0, shout.length(), shout) == 0 || + chat.mText.compare(0, whisper.length(), whisper) == 0) + { + delimiter = " "; + } // Don't add any delimiter after name in irc styled messages if (irc_me || chat.mChatStyle == CHAT_STYLE_IRC) diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp index 6de47fccd2..acb28bd46f 100644 --- a/indra/newview/llnearbychat.cpp +++ b/indra/newview/llnearbychat.cpp @@ -203,14 +203,7 @@ void LLNearbyChat::addMessage(const LLChat& chat,bool archive,const LLSD &args) if (gSavedPerAccountSettings.getBOOL("LogChat")) { - if (chat.mChatType != CHAT_TYPE_WHISPER && chat.mChatType != CHAT_TYPE_SHOUT) - { - LLLogChat::saveHistory("chat", chat.mFromName, chat.mFromID, chat.mText); - } - else - { - LLLogChat::saveHistory("chat", "", chat.mFromID, chat.mFromName + " " + chat.mText); - } + LLLogChat::saveHistory("chat", chat.mFromName, chat.mFromID, chat.mText); } } } -- cgit v1.2.3 From 9a15ee8a91a12020b22625873c280837739f946c Mon Sep 17 00:00:00 2001 From: Chuck Linden Date: Thu, 4 Feb 2010 10:00:33 -0500 Subject: Removed aspect ratio controls. http://jira.secondlife.com/browse/EXT-3908 --- .../default/xui/en/panel_preferences_advanced.xml | 57 ---------------------- 1 file changed, 57 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml index 4d14d46743..05a3771edf 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml @@ -266,61 +266,4 @@ Automatic position for: - - Aspect ratio - - - - - - - - - - -- cgit v1.2.3 From e918089f592da2094e6b23a146e0e30b711562dc Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Thu, 4 Feb 2010 17:04:27 +0200 Subject: Fixed critical bug (EXT-4827) [NUX] The Places Panel should default to the Landmarks tab with the Library expanded. - Added Library tab set open by default with Landmarks category fetch from Library. --HG-- branch : product-engine --- indra/newview/llpanellandmarks.cpp | 22 ++++++++++++++-------- indra/newview/llpanellandmarks.h | 2 +- 2 files changed, 15 insertions(+), 9 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index 47feef496a..7c1b0f6234 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -171,8 +171,6 @@ BOOL LLLandmarksPanel::postBuild() initLandmarksInventoryPanel(); initMyInventoryPanel(); initLibraryInventoryPanel(); - getChild("tab_favorites")->setDisplayChildren(true); - getChild("tab_landmarks")->setDisplayChildren(true); return TRUE; } @@ -462,7 +460,7 @@ void LLLandmarksPanel::initFavoritesInventoryPanel() initLandmarksPanel(mFavoritesInventoryPanel); mFavoritesInventoryPanel->getFilter()->setEmptyLookupMessage("FavoritesNoMatchingItems"); - initAccordion("tab_favorites", mFavoritesInventoryPanel); + initAccordion("tab_favorites", mFavoritesInventoryPanel, true); } void LLLandmarksPanel::initLandmarksInventoryPanel() @@ -481,7 +479,7 @@ void LLLandmarksPanel::initLandmarksInventoryPanel() // subscribe to have auto-rename functionality while creating New Folder mLandmarksInventoryPanel->setSelectCallback(boost::bind(&LLInventoryPanel::onSelectionChange, mLandmarksInventoryPanel, _1, _2)); - initAccordion("tab_landmarks", mLandmarksInventoryPanel); + initAccordion("tab_landmarks", mLandmarksInventoryPanel, true); } void LLLandmarksPanel::initMyInventoryPanel() @@ -490,7 +488,7 @@ void LLLandmarksPanel::initMyInventoryPanel() initLandmarksPanel(mMyInventoryPanel); - initAccordion("tab_inventory", mMyInventoryPanel); + initAccordion("tab_inventory", mMyInventoryPanel, false); } void LLLandmarksPanel::initLibraryInventoryPanel() @@ -499,7 +497,15 @@ void LLLandmarksPanel::initLibraryInventoryPanel() initLandmarksPanel(mLibraryInventoryPanel); - initAccordion("tab_library", mLibraryInventoryPanel); + // We want to fetch only "Landmarks" category from the library. + const LLUUID &landmarks_cat = gInventory.findCategoryUUIDForType(LLFolderType::FT_LANDMARK, false, true); + if (landmarks_cat.notNull()) + { + gInventory.startBackgroundFetch(landmarks_cat); + } + + // Expanding "Library" tab for new users who have no landmarks in "My Inventory". + initAccordion("tab_library", mLibraryInventoryPanel, true); } void LLLandmarksPanel::initLandmarksPanel(LLPlacesInventoryPanel* inventory_list) @@ -526,14 +532,14 @@ void LLLandmarksPanel::initLandmarksPanel(LLPlacesInventoryPanel* inventory_list inventory_list->saveFolderState(); } -void LLLandmarksPanel::initAccordion(const std::string& accordion_tab_name, LLPlacesInventoryPanel* inventory_list) +void LLLandmarksPanel::initAccordion(const std::string& accordion_tab_name, LLPlacesInventoryPanel* inventory_list, bool expand_tab) { LLAccordionCtrlTab* accordion_tab = getChild(accordion_tab_name); mAccordionTabs.push_back(accordion_tab); accordion_tab->setDropDownStateChangedCallback( boost::bind(&LLLandmarksPanel::onAccordionExpandedCollapsed, this, _2, inventory_list)); - accordion_tab->setDisplayChildren(false); + accordion_tab->setDisplayChildren(expand_tab); } void LLLandmarksPanel::onAccordionExpandedCollapsed(const LLSD& param, LLPlacesInventoryPanel* inventory_list) diff --git a/indra/newview/llpanellandmarks.h b/indra/newview/llpanellandmarks.h index 96b790844c..cbbd10ac26 100644 --- a/indra/newview/llpanellandmarks.h +++ b/indra/newview/llpanellandmarks.h @@ -110,7 +110,7 @@ private: void initMyInventoryPanel(); void initLibraryInventoryPanel(); void initLandmarksPanel(LLPlacesInventoryPanel* inventory_list); - void initAccordion(const std::string& accordion_tab_name, LLPlacesInventoryPanel* inventory_list); + void initAccordion(const std::string& accordion_tab_name, LLPlacesInventoryPanel* inventory_list, bool expand_tab); void onAccordionExpandedCollapsed(const LLSD& param, LLPlacesInventoryPanel* inventory_list); void deselectOtherThan(const LLPlacesInventoryPanel* inventory_list); -- cgit v1.2.3 From 41c6155f13dbb9ed8bc136bc3350bc8fc87e7f56 Mon Sep 17 00:00:00 2001 From: Ychebotarev ProductEngine Date: Thu, 4 Feb 2010 17:11:08 +0200 Subject: fix for normal EXT-3807 ABOUT LAND/OBJECTS: (i) icon is badly positioned --HG-- branch : product-engine --- indra/newview/llnamelistctrl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp index 8c875c9b63..d579058c32 100644 --- a/indra/newview/llnamelistctrl.cpp +++ b/indra/newview/llnamelistctrl.cpp @@ -152,6 +152,7 @@ BOOL LLNameListCtrl::handleToolTip(S32 x, S32 y, MASK mask) if (avatar_id.notNull()) { // ...valid avatar id + LLScrollListCell* hit_cell = hit_item->getColumn(column_index); if (hit_cell) { @@ -162,8 +163,8 @@ BOOL LLNameListCtrl::handleToolTip(S32 x, S32 y, MASK mask) localRectToScreen(cell_rect, &sticky_rect); // Spawn at right side of cell - LLCoordGL pos( sticky_rect.mRight - 16, sticky_rect.mTop + (sticky_rect.getHeight()-16)/2 ); LLPointer icon = LLUI::getUIImage("Info_Small"); + LLCoordGL pos( sticky_rect.mRight - 16, sticky_rect.mTop - (sticky_rect.getHeight() - icon->getHeight())/2 ); // Should we show a group or an avatar inspector? bool is_group = hit_item->getValue()["is_group"].asBoolean(); -- cgit v1.2.3 From d2d192060993d938a2fd131f8872a60b678e4a04 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 4 Feb 2010 10:20:31 -0500 Subject: For EXT-4855: Crash on onWearableAssetFetch. Prevent late-arriving wearables from touching a deleted object. --- indra/newview/llappearancemgr.cpp | 47 +++++++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 17 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 585d42f66d..0fe236c056 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -321,7 +321,7 @@ public: ~LLWearableHoldingPattern(); bool pollCompletion(); - bool isDone(); + bool isFetchCompleted(); bool isTimedOut(); typedef std::list found_list_t; @@ -330,10 +330,12 @@ public: LLInventoryModel::item_array_t mGestItems; S32 mResolved; LLTimer mWaitTime; + bool mFired; }; LLWearableHoldingPattern::LLWearableHoldingPattern(): - mResolved(0) + mResolved(0), + mFired(false) { } @@ -341,31 +343,34 @@ LLWearableHoldingPattern::~LLWearableHoldingPattern() { } -bool LLWearableHoldingPattern::isDone() +bool LLWearableHoldingPattern::isFetchCompleted() { - if (mResolved >= (S32)mFoundList.size()) - return true; // have everything we were waiting for - else if (isTimedOut()) - { - llwarns << "Exceeded max wait time, updating appearance based on what has arrived" << llendl; - return true; - } - return false; - + return (mResolved >= (S32)mFoundList.size()); // have everything we were waiting for? } bool LLWearableHoldingPattern::isTimedOut() { - static F32 max_wait_time = 15.0; // give up if wearable fetches haven't completed in max_wait_time seconds. + static F32 max_wait_time = 20.0; // give up if wearable fetches haven't completed in max_wait_time seconds. return mWaitTime.getElapsedTimeF32() > max_wait_time; } bool LLWearableHoldingPattern::pollCompletion() { - bool done = isDone(); - llinfos << "polling, done status: " << done << " elapsed " << mWaitTime.getElapsedTimeF32() << llendl; + bool completed = isFetchCompleted(); + bool timed_out = isTimedOut(); + bool done = completed || timed_out; + + llinfos << "polling, done status: " << completed << " timed out? " << timed_out << " elapsed " << mWaitTime.getElapsedTimeF32() << llendl; + if (done) { + mFired = true; + + if (timed_out) + { + llwarns << "Exceeded max wait time for wearables, updating appearance based on what has arrived" << llendl; + } + // Activate all gestures in this folder if (mGestItems.count() > 0) { @@ -397,7 +402,11 @@ bool LLWearableHoldingPattern::pollCompletion() LLAgentWearables::userUpdateAttachments(mObjItems); } - delete this; + if (completed) + { + // Only safe to delete if all wearable callbacks completed. + delete this; + } } return done; } @@ -432,7 +441,11 @@ static void removeDuplicateItems(LLInventoryModel::item_array_t& items) static void onWearableAssetFetch(LLWearable* wearable, void* data) { LLWearableHoldingPattern* holder = (LLWearableHoldingPattern*)data; - + if (holder->mFired) + { + llwarns << "called after holder fired" << llendl; + } + if(wearable) { for (LLWearableHoldingPattern::found_list_t::iterator iter = holder->mFoundList.begin(); -- cgit v1.2.3 From f2bb59300a0f17e10857b3fffebe669878f0fe50 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Thu, 4 Feb 2010 17:26:44 +0200 Subject: fixed duplicating of log records for EXT-4777 Implement saving and loading chat history for Nearby Chat (both plain text and widgeted chat) --HG-- branch : product-engine --- indra/newview/llnearbychat.cpp | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp index acb28bd46f..8fc11d3929 100644 --- a/indra/newview/llnearbychat.cpp +++ b/indra/newview/llnearbychat.cpp @@ -200,11 +200,16 @@ void LLNearbyChat::addMessage(const LLChat& chat,bool archive,const LLSD &args) mMessageArchive.push_back(chat); if(mMessageArchive.size()>200) mMessageArchive.erase(mMessageArchive.begin()); + } - if (gSavedPerAccountSettings.getBOOL("LogChat")) - { - LLLogChat::saveHistory("chat", chat.mFromName, chat.mFromID, chat.mText); - } + if (args["do_not_log"].asBoolean()) + { + return; + } + + if (gSavedPerAccountSettings.getBOOL("LogChat")) + { + LLLogChat::saveHistory("chat", chat.mFromName, chat.mFromID, chat.mText); } } @@ -275,6 +280,9 @@ void LLNearbyChat::processChatHistoryStyleUpdate(const LLSD& newvalue) void LLNearbyChat::loadHistory() { + LLSD do_not_log; + do_not_log["do_not_log"] = true; + std::list history; LLLogChat::loadAllHistory("chat", history); @@ -295,7 +303,7 @@ void LLNearbyChat::loadHistory() chat.mFromID = from_id; chat.mText = msg[IM_TEXT].asString(); chat.mTimeStr = msg[IM_TIME].asString(); - addMessage(chat); + addMessage(chat, true, do_not_log); it++; } -- cgit v1.2.3 From c99fb12b3d300705dbf6eb68b1a3f22927d4d221 Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Thu, 4 Feb 2010 17:25:30 +0200 Subject: Update for low bug EXT-4951 - Redundant edit box context menu in list items in Panel Picks/Classifieds Disabled edit box context menu in classified list items. --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/panel_classifieds_list_item.xml | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/panel_classifieds_list_item.xml b/indra/newview/skins/default/xui/en/panel_classifieds_list_item.xml index b881719e3a..0c1418fc2d 100644 --- a/indra/newview/skins/default/xui/en/panel_classifieds_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_classifieds_list_item.xml @@ -64,6 +64,7 @@ layout="topleft" left="103" name="description" + textbox.mouse_opaque="false" top_pad="0" width="178" word_wrap="true" /> -- cgit v1.2.3 From 78200e2c1c1bc2e53f694b2ae086f486a7f0095c Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Thu, 4 Feb 2010 19:10:24 +0200 Subject: =?UTF-8?q?fixed=20EXT-4893=20=E2=80=9C'Add=20friend'=20available?= =?UTF-8?q?=20for=20friends=20in=20group/conference=20sessions=E2=80=9D,?= =?UTF-8?q?=20corrected=20condition=20for=20enable=20'add=20friend'=20menu?= =?UTF-8?q?=20item;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/newview/llparticipantlist.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index ad47e351ee..1c4004c37a 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -584,7 +584,7 @@ bool LLParticipantList::LLParticipantListMenu::enableContextMenuItem(const LLSD& { std::string item = userdata.asString(); if (item == "can_mute_text" || "can_block" == item || "can_share" == item || "can_im" == item - || "can_pay" == item || "can_add" == item) + || "can_pay" == item) { return mUUIDs.front() != gAgentID; } @@ -619,7 +619,7 @@ bool LLParticipantList::LLParticipantListMenu::enableContextMenuItem(const LLSD& for (;id != uuids_end; ++id) { - if ( LLAvatarActions::isFriend(*id) ) + if ( *id == gAgentID || LLAvatarActions::isFriend(*id) ) { result = false; break; -- cgit v1.2.3 From 3fa2acc0df76b3dd81e295a28bfb463f863a9e49 Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Thu, 4 Feb 2010 19:21:12 +0200 Subject: Fixed bug EXT-4806 (Snapshot floater has preview offset). Removed incorrect vertical offset modification in compact mode. --HG-- branch : product-engine --- indra/newview/llfloatersnapshot.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index b6e9fb3f6c..a0031f0193 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -2084,10 +2084,6 @@ void LLFloaterSnapshot::draw() S32 offset_x = (getRect().getWidth() - previewp->getThumbnailWidth()) / 2 ; S32 offset_y = thumbnail_rect.mBottom + (thumbnail_rect.getHeight() - previewp->getThumbnailHeight()) / 2 ; - if (! gSavedSettings.getBOOL("AdvanceSnapshot")) - { - offset_y += getUIWinHeightShort() - getUIWinHeightLong(); - } glMatrixMode(GL_MODELVIEW); gl_draw_scaled_image(offset_x, offset_y, -- cgit v1.2.3 From b2f0169a764119ad6b51ad0df964309ca7458278 Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Thu, 4 Feb 2010 20:40:30 +0200 Subject: Fixed normal bug EXT-4627(Nearby Chat floater in Mouselook breaks ability to type & use gestures) --HG-- branch : product-engine --- indra/newview/llbottomtray.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 4c8cec3d30..92c00efe99 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -80,6 +80,14 @@ public: { mNearbyChatBar = getChild("chat_bar"); mGesturePanel = getChild("gesture_panel"); + + // Hide "show_nearby_chat" button + LLLineEditor* chat_box = mNearbyChatBar->getChatBox(); + LLUICtrl* show_btn = mNearbyChatBar->getChild("show_nearby_chat"); + S32 delta_width = show_btn->getRect().getWidth(); + show_btn->setVisible(FALSE); + chat_box->reshape(chat_box->getRect().getWidth() + delta_width, chat_box->getRect().getHeight()); + return TRUE; } -- cgit v1.2.3 From 3f0762f65ad8ba9d4f854378ca2d2dd826470f4e Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Thu, 4 Feb 2010 20:40:30 +0200 Subject: Fixed normal bug EXT-4307 (There are no text context menues for Search text field and for IM text field) --HG-- branch : product-engine --- indra/newview/llbottomtray.cpp | 2 ++ indra/newview/lllocationinputctrl.cpp | 1 + 2 files changed, 3 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 92c00efe99..93b708f299 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -441,6 +441,8 @@ BOOL LLBottomTray::postBuild() mObjectDefaultWidthMap[RS_BUTTON_CAMERA] = mCamPanel->getRect().getWidth(); mObjectDefaultWidthMap[RS_BUTTON_SPEAK] = mSpeakPanel->getRect().getWidth(); + mNearbyChatBar->getChatBox()->setContextMenu(NULL); + return TRUE; } diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index 4f40a0a532..1b7ad6ab7e 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -227,6 +227,7 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p) params.commit_on_focus_lost(false); params.follows.flags(FOLLOWS_ALL); mTextEntry = LLUICtrlFactory::create(params); + mTextEntry->setContextMenu(NULL); addChild(mTextEntry); // LLLineEditor is replaced with LLLocationLineEditor -- cgit v1.2.3 From 558cd44e6be87c661a873bb96918265282de361b Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Thu, 4 Feb 2010 20:40:30 +0200 Subject: Fixed low bug EXT-4184 (Fav bar: drop landmark pointer is visible badly) --HG-- branch : product-engine --- indra/newview/llfavoritesbar.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index 90f6438980..0f52b30567 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -628,8 +628,8 @@ void LLFavoritesBarCtrl::draw() if (mShowDragMarker) { - S32 w = mImageDragIndication->getWidth() / 2; - S32 h = mImageDragIndication->getHeight() / 2; + S32 w = mImageDragIndication->getWidth(); + S32 h = mImageDragIndication->getHeight(); if (mLandingTab) { -- cgit v1.2.3 From f60afe790b156051f1da72abea2ea64731c704ac Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Thu, 4 Feb 2010 21:22:05 +0200 Subject: Fixed major bug EXT-4853 (Color Picker - Arrow Used to Select Color Density is Nearly Invisible) --HG-- branch : product-engine --- indra/newview/llfloatercolorpicker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatercolorpicker.cpp b/indra/newview/llfloatercolorpicker.cpp index 73b79d8e13..b65457c4eb 100644 --- a/indra/newview/llfloatercolorpicker.cpp +++ b/indra/newview/llfloatercolorpicker.cpp @@ -586,7 +586,7 @@ void LLFloaterColorPicker::draw() gl_triangle_2d ( startX, startY, startX + mLumMarkerSize, startY - mLumMarkerSize, startX + mLumMarkerSize, startY + mLumMarkerSize, - LLColor4 ( 0.0f, 0.0f, 0.0f, 1.0f ), TRUE ); + LLColor4 ( 0.75f, 0.75f, 0.75f, 1.0f ), TRUE ); // draw luminance slider outline gl_rect_2d ( mLumRegionLeft, -- cgit v1.2.3 From 9dd41cdceed43f1ffea14355c1b26c40db7b3591 Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Thu, 4 Feb 2010 11:24:54 -0800 Subject: EXT-3144 EXT-4226: Re-employ tentative state for individual items in media settings Review #95 This change undoes some prior change that seems to not allow showing media data for multiple selection. There was all of this code put in to support displaying tentative state for media, but code was added to basically override it. Perhaps the reason was tentative state items were not ignored on apply...this change does that. --- indra/newview/llfloatermediasettings.cpp | 13 +-- indra/newview/llpanelmediasettingsgeneral.cpp | 37 ++++---- indra/newview/llpanelmediasettingsgeneral.h | 3 +- indra/newview/llpanelmediasettingspermissions.cpp | 95 ++++++++++++-------- indra/newview/llpanelmediasettingspermissions.h | 3 +- indra/newview/llpanelmediasettingssecurity.cpp | 100 +++++++++++----------- indra/newview/llpanelmediasettingssecurity.h | 5 +- indra/newview/llselectmgr.cpp | 95 ++++++++++---------- indra/newview/llselectmgr.h | 3 +- 9 files changed, 189 insertions(+), 165 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatermediasettings.cpp b/indra/newview/llfloatermediasettings.cpp index 976af121ae..7388f7ea3f 100644 --- a/indra/newview/llfloatermediasettings.cpp +++ b/indra/newview/llfloatermediasettings.cpp @@ -149,13 +149,14 @@ void LLFloaterMediaSettings::apply() { LLSD settings; sInstance->mPanelMediaSettingsGeneral->preApply(); - sInstance->mPanelMediaSettingsGeneral->getValues( settings ); + sInstance->mPanelMediaSettingsGeneral->getValues( settings, false ); sInstance->mPanelMediaSettingsSecurity->preApply(); - sInstance->mPanelMediaSettingsSecurity->getValues( settings ); + sInstance->mPanelMediaSettingsSecurity->getValues( settings, false ); sInstance->mPanelMediaSettingsPermissions->preApply(); - sInstance->mPanelMediaSettingsPermissions->getValues( settings ); - LLSelectMgr::getInstance()->selectionSetMedia( LLTextureEntry::MF_HAS_MEDIA ); - LLSelectMgr::getInstance()->selectionSetMediaData(settings); + sInstance->mPanelMediaSettingsPermissions->getValues( settings, false ); + + LLSelectMgr::getInstance()->selectionSetMedia( LLTextureEntry::MF_HAS_MEDIA, settings ); + sInstance->mPanelMediaSettingsGeneral->postApply(); sInstance->mPanelMediaSettingsSecurity->postApply(); sInstance->mPanelMediaSettingsPermissions->postApply(); @@ -176,6 +177,8 @@ void LLFloaterMediaSettings::onClose(bool app_quitting) //static void LLFloaterMediaSettings::initValues( const LLSD& media_settings, bool editable ) { + if (sInstance->hasFocus()) return; + sInstance->clearValues(editable); // update all panels with values from simulator sInstance->mPanelMediaSettingsGeneral-> diff --git a/indra/newview/llpanelmediasettingsgeneral.cpp b/indra/newview/llpanelmediasettingsgeneral.cpp index f574f55beb..f601a8d51c 100644 --- a/indra/newview/llpanelmediasettingsgeneral.cpp +++ b/indra/newview/llpanelmediasettingsgeneral.cpp @@ -250,18 +250,18 @@ bool LLPanelMediaSettingsGeneral::isMultiple() //////////////////////////////////////////////////////////////////////////////// // static -void LLPanelMediaSettingsGeneral::initValues( void* userdata, const LLSD& media_settings ,bool editable) +void LLPanelMediaSettingsGeneral::initValues( void* userdata, const LLSD& _media_settings, bool editable) { LLPanelMediaSettingsGeneral *self =(LLPanelMediaSettingsGeneral *)userdata; self->mMediaEditable = editable; + LLSD media_settings = _media_settings; + if ( LLPanelMediaSettingsGeneral::isMultiple() ) { - self->clearValues(self, self->mMediaEditable); - // only show multiple - self->mHomeURL->setText(LLTrans::getString("Multiple Media")); - self->mCurrentURL->setText(LLTrans::getString("Multiple Media")); - return; + // *HACK: "edit" the incoming media_settings + media_settings[LLMediaEntry::CURRENT_URL_KEY] = LLTrans::getString("Multiple Media"); + media_settings[LLMediaEntry::HOME_URL_KEY] = LLTrans::getString("Multiple Media"); } std::string base_key( "" ); @@ -286,7 +286,7 @@ void LLPanelMediaSettingsGeneral::initValues( void* userdata, const LLSD& media_ { LLMediaEntry::WIDTH_PIXELS_KEY, self->mWidthPixels, "LLSpinCtrl" }, { "", NULL , "" } }; - + for( int i = 0; data_set[ i ].key_name.length() > 0; ++i ) { base_key = std::string( data_set[ i ].key_name ); @@ -405,20 +405,21 @@ void LLPanelMediaSettingsGeneral::preApply() //////////////////////////////////////////////////////////////////////////////// // -void LLPanelMediaSettingsGeneral::getValues( LLSD &fill_me_in ) +void LLPanelMediaSettingsGeneral::getValues( LLSD &fill_me_in, bool include_tentative ) { - fill_me_in[LLMediaEntry::AUTO_LOOP_KEY] = (LLSD::Boolean)mAutoLoop->getValue(); - fill_me_in[LLMediaEntry::AUTO_PLAY_KEY] = (LLSD::Boolean)mAutoPlay->getValue(); - fill_me_in[LLMediaEntry::AUTO_SCALE_KEY] = (LLSD::Boolean)mAutoScale->getValue(); - fill_me_in[LLMediaEntry::AUTO_ZOOM_KEY] = (LLSD::Boolean)mAutoZoom->getValue(); + if (include_tentative || !mAutoLoop->getTentative()) fill_me_in[LLMediaEntry::AUTO_LOOP_KEY] = (LLSD::Boolean)mAutoLoop->getValue(); + if (include_tentative || !mAutoPlay->getTentative()) fill_me_in[LLMediaEntry::AUTO_PLAY_KEY] = (LLSD::Boolean)mAutoPlay->getValue(); + if (include_tentative || !mAutoScale->getTentative()) fill_me_in[LLMediaEntry::AUTO_SCALE_KEY] = (LLSD::Boolean)mAutoScale->getValue(); + if (include_tentative || !mAutoZoom->getTentative()) fill_me_in[LLMediaEntry::AUTO_ZOOM_KEY] = (LLSD::Boolean)mAutoZoom->getValue(); //Don't fill in current URL: this is only supposed to get changed via navigate - // fill_me_in[LLMediaEntry::CURRENT_URL_KEY] = mCurrentURL->getValue(); - fill_me_in[LLMediaEntry::HEIGHT_PIXELS_KEY] = (LLSD::Integer)mHeightPixels->getValue(); + // if (include_tentative || !mCurrentURL->getTentative()) fill_me_in[LLMediaEntry::CURRENT_URL_KEY] = mCurrentURL->getValue(); + if (include_tentative || !mHeightPixels->getTentative()) fill_me_in[LLMediaEntry::HEIGHT_PIXELS_KEY] = (LLSD::Integer)mHeightPixels->getValue(); // Don't fill in the home URL if it is the special "Multiple Media" string! - if (LLTrans::getString("Multiple Media") != mHomeURL->getValue()) - fill_me_in[LLMediaEntry::HOME_URL_KEY] = (LLSD::String)mHomeURL->getValue(); - fill_me_in[LLMediaEntry::FIRST_CLICK_INTERACT_KEY] = (LLSD::Boolean)mFirstClick->getValue(); - fill_me_in[LLMediaEntry::WIDTH_PIXELS_KEY] = (LLSD::Integer)mWidthPixels->getValue(); + if ((include_tentative || !mHomeURL->getTentative()) + && LLTrans::getString("Multiple Media") != mHomeURL->getValue()) + fill_me_in[LLMediaEntry::HOME_URL_KEY] = (LLSD::String)mHomeURL->getValue(); + if (include_tentative || !mFirstClick->getTentative()) fill_me_in[LLMediaEntry::FIRST_CLICK_INTERACT_KEY] = (LLSD::Boolean)mFirstClick->getValue(); + if (include_tentative || !mWidthPixels->getTentative()) fill_me_in[LLMediaEntry::WIDTH_PIXELS_KEY] = (LLSD::Integer)mWidthPixels->getValue(); } //////////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/llpanelmediasettingsgeneral.h b/indra/newview/llpanelmediasettingsgeneral.h index 5f90321362..a3f0990f35 100644 --- a/indra/newview/llpanelmediasettingsgeneral.h +++ b/indra/newview/llpanelmediasettingsgeneral.h @@ -54,7 +54,8 @@ public: // Hook that the floater calls before applying changes from the panel void preApply(); // Function that asks the panel to fill in values associated with the panel - void getValues(LLSD &fill_me_in); + // 'include_tentative' means fill in tentative values as well, otherwise do not + void getValues(LLSD &fill_me_in, bool include_tentative = true); // Hook that the floater calls after applying changes to the panel void postApply(); diff --git a/indra/newview/llpanelmediasettingspermissions.cpp b/indra/newview/llpanelmediasettingspermissions.cpp index a23aed2e98..e5caaaaffc 100644 --- a/indra/newview/llpanelmediasettingspermissions.cpp +++ b/indra/newview/llpanelmediasettingspermissions.cpp @@ -149,27 +149,6 @@ void LLPanelMediaSettingsPermissions::clearValues( void* userdata, bool editable void LLPanelMediaSettingsPermissions::initValues( void* userdata, const LLSD& media_settings , bool editable) { LLPanelMediaSettingsPermissions *self =(LLPanelMediaSettingsPermissions *)userdata; - - if ( LLFloaterMediaSettings::getInstance()->mIdenticalHasMediaInfo ) - { - if(LLFloaterMediaSettings::getInstance()->mMultipleMedia) - { - self->clearValues(self, editable); - // only show multiple - return; - } - - } - else - { - if(LLFloaterMediaSettings::getInstance()->mMultipleValidMedia) - { - self->clearValues(self, editable); - // only show multiple - return; - } - - } std::string base_key( "" ); std::string tentative_key( "" ); @@ -215,7 +194,29 @@ void LLPanelMediaSettingsPermissions::initValues( void* userdata, const LLSD& me data_set[ i ].ctrl_ptr->setTentative( media_settings[ tentative_key ].asBoolean() ); }; }; - + + // *NOTE: If any of a particular flavor is tentative, we have to disable + // them all because of an architectural issue: namely that we represent + // these as a bit field, and we can't selectively apply only one bit to all selected + // faces if they don't match. Also see the *NOTE below. + if ( self->mPermsOwnerInteract->getTentative() || + self->mPermsGroupInteract->getTentative() || + self->mPermsWorldInteract->getTentative()) + { + self->mPermsOwnerInteract->setEnabled(false); + self->mPermsGroupInteract->setEnabled(false); + self->mPermsWorldInteract->setEnabled(false); + } + if ( self->mPermsOwnerControl->getTentative() || + self->mPermsGroupControl->getTentative() || + self->mPermsWorldControl->getTentative()) + { + self->mPermsOwnerControl->setEnabled(false); + self->mPermsGroupControl->setEnabled(false); + self->mPermsWorldControl->setEnabled(false); + } + + self->childSetEnabled("media_perms_label_owner", editable ); self->childSetText("media_perms_label_owner", LLTrans::getString("Media Perms Owner") ); self->childSetEnabled("media_perms_label_group", editable ); @@ -233,29 +234,47 @@ void LLPanelMediaSettingsPermissions::preApply() //////////////////////////////////////////////////////////////////////////////// // -void LLPanelMediaSettingsPermissions::getValues( LLSD &fill_me_in ) +void LLPanelMediaSettingsPermissions::getValues( LLSD &fill_me_in, bool include_tentative ) { // moved over from the 'General settings' tab - fill_me_in[LLMediaEntry::CONTROLS_KEY] = (LLSD::Integer)mControls->getCurrentIndex(); - - // *NOTE: For some reason, gcc does not like these symbol references in the - // expressions below (inside the static_casts). I have NO idea why :(. - // For some reason, assigning them to const temp vars here fixes the link - // error. Bizarre. - const U8 none = LLMediaEntry::PERM_NONE; - const U8 owner = LLMediaEntry::PERM_OWNER; - const U8 group = LLMediaEntry::PERM_GROUP; - const U8 anyone = LLMediaEntry::PERM_ANYONE; - const LLSD::Integer control = static_cast( + if (include_tentative || !mControls->getTentative()) fill_me_in[LLMediaEntry::CONTROLS_KEY] = (LLSD::Integer)mControls->getCurrentIndex(); + + // *NOTE: For some reason, gcc does not like these symbol references in the + // expressions below (inside the static_casts). I have NO idea why :(. + // For some reason, assigning them to const temp vars here fixes the link + // error. Bizarre. + const U8 none = LLMediaEntry::PERM_NONE; + const U8 owner = LLMediaEntry::PERM_OWNER; + const U8 group = LLMediaEntry::PERM_GROUP; + const U8 anyone = LLMediaEntry::PERM_ANYONE; + const LLSD::Integer control = static_cast( (mPermsOwnerControl->getValue() ? owner : none ) | (mPermsGroupControl->getValue() ? group: none ) | (mPermsWorldControl->getValue() ? anyone : none )); - const LLSD::Integer interact = static_cast( - (mPermsOwnerInteract->getValue() ? owner: none ) | + const LLSD::Integer interact = static_cast( + (mPermsOwnerInteract->getValue() ? owner: none ) | (mPermsGroupInteract->getValue() ? group : none ) | (mPermsWorldInteract->getValue() ? anyone : none )); - fill_me_in[LLMediaEntry::PERMS_CONTROL_KEY] = control; - fill_me_in[LLMediaEntry::PERMS_INTERACT_KEY] = interact; + + // *TODO: This will fill in the values of all permissions values, even if + // one or more is tentative. This is not quite the user expectation...what + // it should do is only change the bit that was made "untentative", but in + // a multiple-selection situation, this isn't possible given the architecture + // for how settings are applied. + if (include_tentative || + !mPermsOwnerControl->getTentative() || + !mPermsGroupControl->getTentative() || + !mPermsWorldControl->getTentative()) + { + fill_me_in[LLMediaEntry::PERMS_CONTROL_KEY] = control; + } + if (include_tentative || + !mPermsOwnerInteract->getTentative() || + !mPermsGroupInteract->getTentative() || + !mPermsWorldInteract->getTentative()) + { + fill_me_in[LLMediaEntry::PERMS_INTERACT_KEY] = interact; + } } diff --git a/indra/newview/llpanelmediasettingspermissions.h b/indra/newview/llpanelmediasettingspermissions.h index bd0c3b8ab5..858544605c 100644 --- a/indra/newview/llpanelmediasettingspermissions.h +++ b/indra/newview/llpanelmediasettingspermissions.h @@ -57,7 +57,8 @@ public: // Hook that the floater calls before applying changes from the panel void preApply(); // Function that asks the panel to fill in values associated with the panel - void getValues(LLSD &fill_me_in); + // 'include_tentative' means fill in tentative values as well, otherwise do not + void getValues(LLSD &fill_me_in, bool include_tentative = true); // Hook that the floater calls after applying changes to the panel void postApply(); diff --git a/indra/newview/llpanelmediasettingssecurity.cpp b/indra/newview/llpanelmediasettingssecurity.cpp index 81842e3851..1b1346c41a 100644 --- a/indra/newview/llpanelmediasettingssecurity.cpp +++ b/indra/newview/llpanelmediasettingssecurity.cpp @@ -94,27 +94,6 @@ void LLPanelMediaSettingsSecurity::draw() void LLPanelMediaSettingsSecurity::initValues( void* userdata, const LLSD& media_settings , bool editable) { LLPanelMediaSettingsSecurity *self =(LLPanelMediaSettingsSecurity *)userdata; - - if ( LLFloaterMediaSettings::getInstance()->mIdenticalHasMediaInfo ) - { - if(LLFloaterMediaSettings::getInstance()->mMultipleMedia) - { - self->clearValues(self, editable); - // only show multiple - return; - } - - } - else - { - if(LLFloaterMediaSettings::getInstance()->mMultipleValidMedia) - { - self->clearValues(self, editable); - // only show multiple - return; - } - - } std::string base_key( "" ); std::string tentative_key( "" ); @@ -136,6 +115,8 @@ void LLPanelMediaSettingsSecurity::initValues( void* userdata, const LLSD& media base_key = std::string( data_set[ i ].key_name ); tentative_key = base_key + std::string( LLPanelContents::TENTATIVE_SUFFIX ); + bool enabled_overridden = false; + // TODO: CP - I bet there is a better way to do this using Boost if ( media_settings[ base_key ].isDefined() ) { @@ -150,20 +131,31 @@ void LLPanelMediaSettingsSecurity::initValues( void* userdata, const LLSD& media // get control LLScrollListCtrl* list = static_cast< LLScrollListCtrl* >( data_set[ i ].ctrl_ptr ); list->deleteAllItems(); - + // points to list of white list URLs LLSD url_list = media_settings[ base_key ]; - - // iterate over them and add to scroll list - LLSD::array_iterator iter = url_list.beginArray(); - while( iter != url_list.endArray() ) + + // better be the whitelist + llassert(data_set[ i ].ctrl_ptr == self->mWhiteListList); + + // If tentative, don't add entries + if (media_settings[ tentative_key ].asBoolean()) { - std::string entry = *iter; - self->addWhiteListEntry( entry ); - ++iter; - }; + self->mWhiteListList->setEnabled(false); + enabled_overridden = true; + } + else { + // iterate over them and add to scroll list + LLSD::array_iterator iter = url_list.beginArray(); + while( iter != url_list.endArray() ) + { + std::string entry = *iter; + self->addWhiteListEntry( entry ); + ++iter; + } + } }; - data_set[ i ].ctrl_ptr->setEnabled(editable); + if ( ! enabled_overridden) data_set[ i ].ctrl_ptr->setEnabled(editable); data_set[ i ].ctrl_ptr->setTentative( media_settings[ tentative_key ].asBoolean() ); }; }; @@ -192,25 +184,29 @@ void LLPanelMediaSettingsSecurity::preApply() //////////////////////////////////////////////////////////////////////////////// // -void LLPanelMediaSettingsSecurity::getValues( LLSD &fill_me_in ) +void LLPanelMediaSettingsSecurity::getValues( LLSD &fill_me_in, bool include_tentative ) { - fill_me_in[LLMediaEntry::WHITELIST_ENABLE_KEY] = (LLSD::Boolean)mEnableWhiteList->getValue(); - - // iterate over white list and extract items - std::vector< LLScrollListItem* > whitelist_items = mWhiteListList->getAllData(); - std::vector< LLScrollListItem* >::iterator iter = whitelist_items.begin(); - - // *NOTE: need actually set the key to be an emptyArray(), or the merge - // we do with this LLSD will think there's nothing to change. - fill_me_in[LLMediaEntry::WHITELIST_KEY] = LLSD::emptyArray(); - while( iter != whitelist_items.end() ) - { - LLScrollListCell* cell = (*iter)->getColumn( ENTRY_COLUMN ); - std::string whitelist_url = cell->getValue().asString(); - - fill_me_in[ LLMediaEntry::WHITELIST_KEY ].append( whitelist_url ); - ++iter; - }; + if (include_tentative || !mEnableWhiteList->getTentative()) + fill_me_in[LLMediaEntry::WHITELIST_ENABLE_KEY] = (LLSD::Boolean)mEnableWhiteList->getValue(); + + if (include_tentative || !mWhiteListList->getTentative()) + { + // iterate over white list and extract items + std::vector< LLScrollListItem* > whitelist_items = mWhiteListList->getAllData(); + std::vector< LLScrollListItem* >::iterator iter = whitelist_items.begin(); + + // *NOTE: need actually set the key to be an emptyArray(), or the merge + // we do with this LLSD will think there's nothing to change. + fill_me_in[LLMediaEntry::WHITELIST_KEY] = LLSD::emptyArray(); + while( iter != whitelist_items.end() ) + { + LLScrollListCell* cell = (*iter)->getColumn( ENTRY_COLUMN ); + std::string whitelist_url = cell->getValue().asString(); + + fill_me_in[ LLMediaEntry::WHITELIST_KEY ].append( whitelist_url ); + ++iter; + }; + } } //////////////////////////////////////////////////////////////////////////////// @@ -247,6 +243,10 @@ const std::string LLPanelMediaSettingsSecurity::makeValidUrl( const std::string& // white list list box widget and build a list to test against. bool LLPanelMediaSettingsSecurity::urlPassesWhiteList( const std::string& test_url ) { + // If the whitlelist list is tentative, it means we have multiple settings. + // In that case, we have no choice but to return true + if ( mWhiteListList->getTentative() ) return true; + // the checkUrlAgainstWhitelist(..) function works on a vector // of strings for the white list entries - in this panel, the white list // is stored in the widgets themselves so we need to build something compatible. @@ -330,7 +330,7 @@ void LLPanelMediaSettingsSecurity::addWhiteListEntry( const std::string& entry ) // always add in the entry itself row[ "columns" ][ ENTRY_COLUMN ][ "type" ] = "text"; row[ "columns" ][ ENTRY_COLUMN ][ "value" ] = entry; - + // add to the white list scroll box mWhiteListList->addElement( row ); }; diff --git a/indra/newview/llpanelmediasettingssecurity.h b/indra/newview/llpanelmediasettingssecurity.h index 66ccb23f46..94f2fdc89c 100644 --- a/indra/newview/llpanelmediasettingssecurity.h +++ b/indra/newview/llpanelmediasettingssecurity.h @@ -53,11 +53,12 @@ public: // Hook that the floater calls before applying changes from the panel void preApply(); // Function that asks the panel to fill in values associated with the panel - void getValues(LLSD &fill_me_in); + // 'include_tentative' means fill in tentative values as well, otherwise do not + void getValues(LLSD &fill_me_in, bool include_tentative = true); // Hook that the floater calls after applying changes to the panel void postApply(); - static void initValues( void* userdata, const LLSD& media_settings,bool editable ); + static void initValues( void* userdata, const LLSD& media_settings, bool editable); static void clearValues( void* userdata, bool editable); void addWhiteListEntry( const std::string& url ); void setParent( LLFloaterMediaSettings* parent ); diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index bf08756051..9540894646 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -41,6 +41,7 @@ #include "lldbstrings.h" #include "lleconomy.h" #include "llgl.h" +#include "llmediaentry.h" #include "llrender.h" #include "llnotifications.h" #include "llpermissions.h" @@ -1739,70 +1740,70 @@ void LLSelectMgr::selectionSetFullbright(U8 fullbright) getSelection()->applyToObjects(&sendfunc); } -void LLSelectMgr::selectionSetMedia(U8 media_type) -{ - - struct f : public LLSelectedTEFunctor - { - U8 mMediaFlags; - f(const U8& t) : mMediaFlags(t) {} - bool apply(LLViewerObject* object, S32 te) - { - if (object->permModify()) - { - // update viewer has media - object->setTEMediaFlags(te, mMediaFlags); - } - return true; - } - } setfunc(media_type); - getSelection()->applyToTEs(&setfunc); - struct f2 : public LLSelectedObjectFunctor - { - virtual bool apply(LLViewerObject* object) - { - if (object->permModify()) - { - object->sendTEUpdate(); - } - return true; - } - } func2; - mSelectedObjects->applyToObjects( &func2 ); -} - // This function expects media_data to be a map containing relevant // media data name/value pairs (e.g. home_url, etc.) -void LLSelectMgr::selectionSetMediaData(const LLSD &media_data) -{ - +void LLSelectMgr::selectionSetMedia(U8 media_type, const LLSD &media_data) +{ struct f : public LLSelectedTEFunctor { + U8 mMediaFlags; const LLSD &mMediaData; - f(const LLSD& t) : mMediaData(t) {} + f(const U8& t, const LLSD& d) : mMediaFlags(t), mMediaData(d) {} bool apply(LLViewerObject* object, S32 te) { if (object->permModify()) { - LLVOVolume *vo = dynamic_cast(object); - if (NULL != vo) - { - vo->syncMediaData(te, mMediaData, true/*merge*/, true/*ignore_agent*/); - } + // If we are adding media, then check the current state of the + // media data on this face. + // - If it does not have media, AND we are NOT setting the HOME URL, then do NOT add media to this + // face. + // - If it does not have media, and we ARE setting the HOME URL, add media to this face. + // - If it does already have media, add/update media to/on this face + // If we are removing media, just do it (ignore the passed-in LLSD). + if (mMediaFlags & LLTextureEntry::MF_HAS_MEDIA) + { + llassert(mMediaData.isMap()); + const LLTextureEntry *texture_entry = object->getTE(te); + if (!mMediaData.isMap() || + (NULL != texture_entry) && !texture_entry->hasMedia() && !mMediaData.has(LLMediaEntry::HOME_URL_KEY)) + { + // skip adding/updating media + } + else { + // Add/update media + object->setTEMediaFlags(te, mMediaFlags); + LLVOVolume *vo = dynamic_cast(object); + llassert(NULL != vo); + if (NULL != vo) + { + vo->syncMediaData(te, mMediaData, true/*merge*/, true/*ignore_agent*/); + } + } + } + else + { + // delete media (or just set the flags) + object->setTEMediaFlags(te, mMediaFlags); + } } return true; } - } setfunc(media_data); + } setfunc(media_type, media_data); getSelection()->applyToTEs(&setfunc); - + struct f2 : public LLSelectedObjectFunctor { virtual bool apply(LLViewerObject* object) { if (object->permModify()) { - LLVOVolume *vo = dynamic_cast(object); - if (NULL != vo) + object->sendTEUpdate(); + LLVOVolume *vo = dynamic_cast(object); + llassert(NULL != vo); + // It's okay to skip this object if hasMedia() is false... + // the sendTEUpdate() above would remove all media data if it were + // there. + if (NULL != vo && vo->hasMedia()) { // Send updated media data FOR THE ENTIRE OBJECT vo->sendMediaDataUpdate(); @@ -1811,11 +1812,9 @@ void LLSelectMgr::selectionSetMediaData(const LLSD &media_data) return true; } } func2; - getSelection()->applyToObjects(&func2); + mSelectedObjects->applyToObjects( &func2 ); } - - void LLSelectMgr::selectionSetGlow(F32 glow) { struct f1 : public LLSelectedTEFunctor diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h index f8ecfd0674..00474827ca 100644 --- a/indra/newview/llselectmgr.h +++ b/indra/newview/llselectmgr.h @@ -502,8 +502,7 @@ public: void selectionSetTexGen( U8 texgen ); void selectionSetShiny( U8 shiny ); void selectionSetFullbright( U8 fullbright ); - void selectionSetMedia( U8 media_type ); - void selectionSetMediaData(const LLSD &media_data); // NOTE: modifies media_data!!! + void selectionSetMedia( U8 media_type, const LLSD &media_data ); void selectionSetClickAction(U8 action); void selectionSetIncludeInSearch(bool include_in_search); void selectionSetGlow(const F32 glow); -- cgit v1.2.3 From c58e152236abfc1c414eb6c64783334ca9555b58 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Thu, 4 Feb 2010 14:29:43 -0500 Subject: EXT-4801 : hitting trash button for trashed items does not delete item EXT-4957 : add const correctness for LLFolderViewEventListener::isItemRemovable This checkin affects several files but is a lot less scary than it looks. It's mostly to add const correctness, and to rename isInTrash to isItemInTrash so that its naming is consistent with isItemRemovable/isItemMovable. The only functionality change is to disable the trash button when an item is already in the trash. --- indra/newview/llfolderview.cpp | 3 +-- indra/newview/llfoldervieweventlistener.h | 3 ++- indra/newview/llinventorybridge.cpp | 38 +++++++++++++++---------------- indra/newview/llinventorybridge.h | 10 ++++---- indra/newview/llpanelmaininventory.cpp | 6 ++++- indra/newview/llpanelobjectinventory.cpp | 10 ++++---- indra/newview/llplacesinventorybridge.cpp | 2 +- 7 files changed, 39 insertions(+), 33 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index c6135d3bc3..5c65b2c293 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -1272,8 +1272,7 @@ BOOL LLFolderView::canCut() const const LLFolderViewItem* item = *selected_it; const LLFolderViewEventListener* listener = item->getListener(); - // *WARKAROUND: it is too many places where the "isItemRemovable" method should be changed with "const" modifier - if (!listener || !(const_cast(listener))->isItemRemovable()) + if (!listener || !listener->isItemRemovable()) { return FALSE; } diff --git a/indra/newview/llfoldervieweventlistener.h b/indra/newview/llfoldervieweventlistener.h index d6c4459e6f..12e100caf4 100644 --- a/indra/newview/llfoldervieweventlistener.h +++ b/indra/newview/llfoldervieweventlistener.h @@ -73,7 +73,8 @@ public: virtual BOOL isItemRenameable() const = 0; virtual BOOL renameItem(const std::string& new_name) = 0; virtual BOOL isItemMovable( void ) const = 0; // Can be moved to another folder - virtual BOOL isItemRemovable( void ) = 0; // Can be destroyed + virtual BOOL isItemRemovable( void ) const = 0; // Can be destroyed + virtual BOOL isItemInTrash( void) const { return FALSE; } // TODO: make into pure virtual. virtual BOOL removeItem() = 0; virtual void removeBatch(LLDynamicArray& batch) = 0; virtual void move( LLFolderViewEventListener* parent_listener ) = 0; diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index ab178b4007..3a630650c5 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -174,7 +174,7 @@ time_t LLInvFVBridge::getCreationDate() const } // Can be destroyed (or moved to trash) -BOOL LLInvFVBridge::isItemRemovable() +BOOL LLInvFVBridge::isItemRemovable() const { const LLInventoryModel* model = getInventoryModel(); if(!model) @@ -605,7 +605,7 @@ void LLInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags) lldebugs << "LLInvFVBridge::buildContextMenu()" << llendl; std::vector items; std::vector disabled_items; - if(isInTrash()) + if(isItemInTrash()) { items.push_back(std::string("Purge Item")); if (!isItemRemovable()) @@ -670,7 +670,7 @@ LLInventoryModel* LLInvFVBridge::getInventoryModel() const return panel ? panel->getModel() : NULL; } -BOOL LLInvFVBridge::isInTrash() const +BOOL LLInvFVBridge::isItemInTrash() const { LLInventoryModel* model = getInventoryModel(); if(!model) return FALSE; @@ -680,7 +680,7 @@ BOOL LLInvFVBridge::isInTrash() const BOOL LLInvFVBridge::isLinkedObjectInTrash() const { - if (isInTrash()) return TRUE; + if (isItemInTrash()) return TRUE; const LLInventoryObject *obj = getInventoryObject(); if (obj && obj->getIsLinkType()) @@ -1412,7 +1412,7 @@ public: }; // Can be destroyed (or moved to trash) -BOOL LLFolderBridge::isItemRemovable() +BOOL LLFolderBridge::isItemRemovable() const { LLInventoryModel* model = getInventoryModel(); if(!model) @@ -3208,7 +3208,7 @@ void LLTextureBridge::buildContextMenu(LLMenuGL& menu, U32 flags) lldebugs << "LLTextureBridge::buildContextMenu()" << llendl; std::vector items; std::vector disabled_items; - if(isInTrash()) + if(isItemInTrash()) { items.push_back(std::string("Purge Item")); if (!isItemRemovable()) @@ -3302,7 +3302,7 @@ void LLSoundBridge::buildContextMenu(LLMenuGL& menu, U32 flags) std::vector items; std::vector disabled_items; - if(isInTrash()) + if(isItemInTrash()) { items.push_back(std::string("Purge Item")); if (!isItemRemovable()) @@ -3351,7 +3351,7 @@ void LLLandmarkBridge::buildContextMenu(LLMenuGL& menu, U32 flags) std::vector disabled_items; lldebugs << "LLLandmarkBridge::buildContextMenu()" << llendl; - if(isInTrash()) + if(isItemInTrash()) { items.push_back(std::string("Purge Item")); if (!isItemRemovable()) @@ -3576,7 +3576,7 @@ void LLCallingCardBridge::buildContextMenu(LLMenuGL& menu, U32 flags) std::vector items; std::vector disabled_items; - if(isInTrash()) + if(isItemInTrash()) { items.push_back(std::string("Purge Item")); if (!isItemRemovable()) @@ -3841,7 +3841,7 @@ void LLGestureBridge::buildContextMenu(LLMenuGL& menu, U32 flags) lldebugs << "LLGestureBridge::buildContextMenu()" << llendl; std::vector items; std::vector disabled_items; - if(isInTrash()) + if(isItemInTrash()) { items.push_back(std::string("Purge Item")); if (!isItemRemovable()) @@ -3905,7 +3905,7 @@ void LLAnimationBridge::buildContextMenu(LLMenuGL& menu, U32 flags) std::vector disabled_items; lldebugs << "LLAnimationBridge::buildContextMenu()" << llendl; - if(isInTrash()) + if(isItemInTrash()) { items.push_back(std::string("Purge Item")); if (!isItemRemovable()) @@ -4184,7 +4184,7 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { std::vector items; std::vector disabled_items; - if(isInTrash()) + if(isItemInTrash()) { items.push_back(std::string("Purge Item")); if (!isItemRemovable()) @@ -4220,7 +4220,7 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { items.push_back(std::string("Detach From Yourself")); } - else if (!isInTrash() && !isLinkedObjectInTrash() && !isLinkedObjectMissing()) + else if (!isItemInTrash() && !isLinkedObjectInTrash() && !isLinkedObjectMissing()) { items.push_back(std::string("Attach Separator")); items.push_back(std::string("Object Wear")); @@ -4558,7 +4558,7 @@ void LLWearableBridge::openItem() LLInvFVBridgeAction::doAction(item->getType(),mUUID,getInventoryModel()); } /* - if( isInTrash() ) + if( isItemInTrash() ) { LLNotificationsUtil::add("CannotWearTrash"); } @@ -4600,7 +4600,7 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags) lldebugs << "LLWearableBridge::buildContextMenu()" << llendl; std::vector items; std::vector disabled_items; - if(isInTrash()) + if(isItemInTrash()) { items.push_back(std::string("Purge Item")); if (!isItemRemovable()) @@ -5195,7 +5195,7 @@ void LLLSLTextBridgeAction::doIt() } -BOOL LLWearableBridgeAction::isInTrash() const +BOOL LLWearableBridgeAction::isItemInTrash() const { if(!mModel) return FALSE; const LLUUID trash_id = mModel->findCategoryUUIDForType(LLFolderType::FT_TRASH); @@ -5243,7 +5243,7 @@ void LLWearableBridgeAction::wearOnAvatar() //virtual void LLWearableBridgeAction::doIt() { - if(isInTrash()) + if(isItemInTrash()) { LLNotificationsUtil::add("CannotWearTrash"); } @@ -5308,7 +5308,7 @@ void LLLinkItemBridge::buildContextMenu(LLMenuGL& menu, U32 flags) items.push_back(std::string("Find Original")); disabled_items.push_back(std::string("Find Original")); - if(isInTrash()) + if(isItemInTrash()) { items.push_back(std::string("Purge Item")); if (!isItemRemovable()) @@ -5359,7 +5359,7 @@ void LLLinkFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) std::vector items; std::vector disabled_items; - if(isInTrash()) + if(isItemInTrash()) { items.push_back(std::string("Purge Item")); if (!isItemRemovable()) diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 6fffec96a0..6e256edc05 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -158,8 +158,10 @@ public: virtual void showProperties(); virtual BOOL isItemRenameable() const { return TRUE; } //virtual BOOL renameItem(const std::string& new_name) {} - virtual BOOL isItemRemovable(); + virtual BOOL isItemRemovable() const; virtual BOOL isItemMovable() const; + virtual BOOL isItemInTrash() const; + //virtual BOOL removeItem() = 0; virtual void removeBatch(LLDynamicArray& batch); virtual void move(LLFolderViewEventListener* new_parent_bridge) {} @@ -185,13 +187,13 @@ public: // Allow context menus to be customized for side panel. bool isInOutfitsSidePanel() const; + protected: LLInvFVBridge(LLInventoryPanel* inventory, const LLUUID& uuid); LLInventoryObject* getInventoryObject() const; LLInventoryModel* getInventoryModel() const; - BOOL isInTrash() const; BOOL isLinkedObjectInTrash() const; // Is this obj or its baseobj in the trash? BOOL isLinkedObjectMissing() const; // Is this a linked obj whose baseobj is not in inventory? @@ -306,7 +308,7 @@ public: EDragAndDropType cargo_type, void* cargo_data); - virtual BOOL isItemRemovable(); + virtual BOOL isItemRemovable() const; virtual BOOL isItemMovable() const ; virtual BOOL isUpToDate() const; virtual BOOL isItemCopyable() const; @@ -786,7 +788,7 @@ protected: LLWearableBridgeAction(const LLUUID& id,LLInventoryModel* model):LLInvFVBridgeAction(id,model){} - BOOL isInTrash() const; + BOOL isItemInTrash() const; // return true if the item is in agent inventory. if false, it // must be lost or in the inventory library. BOOL isAgentInventory() const; diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index a5a61f0c7b..1895993a8e 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -1071,7 +1071,11 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata) { const LLUUID &item_id = (*iter); LLFolderViewItem *item = folder->getItemByID(item_id); - can_delete &= item->getListener()->isItemRemovable(); + const LLFolderViewEventListener *listener = item->getListener(); + llassert(listener); + if (!listener) return FALSE; + can_delete &= listener->isItemRemovable(); + can_delete &= !listener->isItemInTrash(); } return can_delete; } diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index 5c5c35141e..e8ae006968 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -117,7 +117,7 @@ public: virtual BOOL isItemRenameable() const; virtual BOOL renameItem(const std::string& new_name); virtual BOOL isItemMovable() const; - virtual BOOL isItemRemovable(); + virtual BOOL isItemRemovable() const; virtual BOOL removeItem(); virtual void removeBatch(LLDynamicArray& batch); virtual void move(LLFolderViewEventListener* parent_listener); @@ -412,9 +412,9 @@ BOOL LLTaskInvFVBridge::isItemMovable() const return TRUE; } -BOOL LLTaskInvFVBridge::isItemRemovable() +BOOL LLTaskInvFVBridge::isItemRemovable() const { - LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); + const LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); if(object && (object->permModify() || object->permYouOwner())) { @@ -710,7 +710,7 @@ public: virtual BOOL isItemRenameable() const; // virtual BOOL isItemCopyable() const { return FALSE; } virtual BOOL renameItem(const std::string& new_name); - virtual BOOL isItemRemovable(); + virtual BOOL isItemRemovable() const; virtual void buildContextMenu(LLMenuGL& menu, U32 flags); virtual BOOL hasChildren() const; virtual BOOL startDrag(EDragAndDropType* type, LLUUID* id) const; @@ -742,7 +742,7 @@ BOOL LLTaskCategoryBridge::renameItem(const std::string& new_name) return FALSE; } -BOOL LLTaskCategoryBridge::isItemRemovable() +BOOL LLTaskCategoryBridge::isItemRemovable() const { return FALSE; } diff --git a/indra/newview/llplacesinventorybridge.cpp b/indra/newview/llplacesinventorybridge.cpp index 83443687c9..4fe69f295c 100644 --- a/indra/newview/llplacesinventorybridge.cpp +++ b/indra/newview/llplacesinventorybridge.cpp @@ -66,7 +66,7 @@ void LLPlacesLandmarkBridge::buildContextMenu(LLMenuGL& menu, U32 flags) std::vector items; std::vector disabled_items; - if(isInTrash()) + if(isItemInTrash()) { items.push_back(std::string("Purge Item")); if (!isItemRemovable()) -- cgit v1.2.3 From b4d61b6e63dd04f8b67edcf32ea513295843157b Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Thu, 4 Feb 2010 14:53:18 -0500 Subject: EXT-4003 Appearance problemw earing City Chic Female - probably param related cross-wearable params are fun! Values were not being updated properly for parameters that cross multiple wearables. Created a few functions to ensure that these values get updated and made them called from LLAgentWearables::wearableUpdated(). Also prevented cross-wearable params from writing back to the avatar, as they are being driven by another wearable. Code reviewed by Bigpapi --- indra/newview/llagentwearables.cpp | 2 ++ indra/newview/lldriverparam.cpp | 33 +++++++++++++++++++++++++++++++++ indra/newview/lldriverparam.h | 3 +++ indra/newview/llviewervisualparam.h | 1 + indra/newview/llvoavatarself.cpp | 1 + indra/newview/llwearable.cpp | 24 +++++++++++++++++++++++- indra/newview/llwearable.h | 3 ++- 7 files changed, 65 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index b0ff3a5626..4724bb9ada 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -761,6 +761,8 @@ void LLAgentWearables::wearableUpdated(LLWearable *wearable) wearable->refreshName(); wearable->setLabelUpdated(); + wearable->pullCrossWearableValues(); + // Hack pt 2. If the wearable we just loaded has definition version 24, // then force a re-save of this wearable after slamming the version number to 22. // This number was incorrectly incremented for internal builds before release, and diff --git a/indra/newview/lldriverparam.cpp b/indra/newview/lldriverparam.cpp index 3961afe9af..8ebfa471f3 100644 --- a/indra/newview/lldriverparam.cpp +++ b/indra/newview/lldriverparam.cpp @@ -39,6 +39,7 @@ #include "llvoavatarself.h" #include "llagent.h" #include "llwearable.h" +#include "llagentwearables.h" //----------------------------------------------------------------------------- // LLDriverParamInfo @@ -528,6 +529,38 @@ void LLDriverParam::resetDrivenParams() mDriven.reserve(getInfo()->mDrivenInfoList.size()); } +void LLDriverParam::updateCrossDrivenParams(EWearableType driven_type) +{ + bool needs_update = (getWearableType()==driven_type); + + // if the driver has a driven entry for the passed-in wearable type, we need to refresh the value + for( entry_list_t::iterator iter = mDriven.begin(); iter != mDriven.end(); iter++ ) + { + LLDrivenEntry* driven = &(*iter); + if (driven && driven->mParam && driven->mParam->getCrossWearable() && driven->mParam->getWearableType() == driven_type) + { + needs_update = true; + } + } + + + if (needs_update) + { + EWearableType driver_type = (EWearableType)getWearableType(); + + // If we've gotten here, we've added a new wearable of type "type" + // Thus this wearable needs to get updates from the driver wearable. + // The call to setVisualParamWeight seems redundant, but is necessary + // as the number of driven wearables has changed since the last update. -Nyx + LLWearable *wearable = gAgentWearables.getTopWearable(driver_type); + if (wearable) + { + wearable->setVisualParamWeight(mID, wearable->getVisualParamWeight(mID), false); + } + } +} + + //----------------------------------------------------------------------------- // getDrivenWeight() //----------------------------------------------------------------------------- diff --git a/indra/newview/lldriverparam.h b/indra/newview/lldriverparam.h index 4e2daf5ba7..e963a2d55a 100644 --- a/indra/newview/lldriverparam.h +++ b/indra/newview/lldriverparam.h @@ -34,6 +34,7 @@ #define LL_LLDRIVERPARAM_H #include "llviewervisualparam.h" +#include "llwearabledictionary.h" class LLVOAvatar; class LLWearable; @@ -93,6 +94,7 @@ public: void setWearable(LLWearable *wearablep); void setAvatar(LLVOAvatar *avatarp); + void updateCrossDrivenParams(EWearableType driven_type); /*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable) const; @@ -112,6 +114,7 @@ public: /*virtual*/ LLVector3 getVertexDistortion(S32 index, LLPolyMesh *poly_mesh); /*virtual*/ const LLVector3* getFirstDistortion(U32 *index, LLPolyMesh **poly_mesh); /*virtual*/ const LLVector3* getNextDistortion(U32 *index, LLPolyMesh **poly_mesh); + protected: F32 getDrivenWeight(const LLDrivenEntry* driven, F32 input_weight); void setDrivenWeight(LLDrivenEntry *driven, F32 driven_weight, bool upload_bake); diff --git a/indra/newview/llviewervisualparam.h b/indra/newview/llviewervisualparam.h index 3550a46fbf..1a3975eb99 100644 --- a/indra/newview/llviewervisualparam.h +++ b/indra/newview/llviewervisualparam.h @@ -111,6 +111,7 @@ public: F32 getSimpleMax() const { return getInfo()->mSimpleMax; } BOOL getCrossWearable() const { return getInfo()->mCrossWearable; } + }; #endif // LL_LLViewerVisualParam_H diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index ecd6b05ded..b1ea8a1bbb 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -1966,6 +1966,7 @@ void LLVOAvatarSelf::forceBakeAllTextures(bool slam_for_debug) // Don't know if this is needed updateMeshTextures(); + } //----------------------------------------------------------------------------- diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp index d093031bea..acfbc23f62 100644 --- a/indra/newview/llwearable.cpp +++ b/indra/newview/llwearable.cpp @@ -625,7 +625,9 @@ void LLWearable::writeToAvatar() // Pull params for( LLVisualParam* param = avatar->getFirstVisualParam(); param; param = avatar->getNextVisualParam() ) { - if( (((LLViewerVisualParam*)param)->getWearableType() == mType) ) + // cross-wearable parameters are not authoritative, as they are driven by a different wearable. So don't copy the values to the + // avatar object if cross wearable. Cross wearable params get their values from the avatar, they shouldn't write the other way. + if( (((LLViewerVisualParam*)param)->getWearableType() == mType) && (!((LLViewerVisualParam*)param)->getCrossWearable()) ) { S32 param_id = param->getID(); F32 weight = getVisualParamWeight(param_id); @@ -1085,6 +1087,26 @@ void LLWearable::destroyTextures() mSavedTEMap.clear(); } +void LLWearable::pullCrossWearableValues() +{ + // scan through all of the avatar's visual parameters + LLVOAvatar* avatar = gAgent.getAvatarObject(); + for (LLViewerVisualParam* param = (LLViewerVisualParam*) avatar->getFirstVisualParam(); + param; + param = (LLViewerVisualParam*) avatar->getNextVisualParam()) + { + if( param ) + { + LLDriverParam *driver_param = dynamic_cast(param); + if(driver_param) + { + // parameter is a driver parameter, have it update its + driver_param->updateCrossDrivenParams(getType()); + } + } + } +} + void LLWearable::setLabelUpdated() const { diff --git a/indra/newview/llwearable.h b/indra/newview/llwearable.h index dae983bcf3..7bd5305079 100644 --- a/indra/newview/llwearable.h +++ b/indra/newview/llwearable.h @@ -128,6 +128,7 @@ public: void revertValues(); void saveValues(); + void pullCrossWearableValues(); BOOL isOnTop() const; @@ -145,7 +146,7 @@ private: void createLayers(S32 te); void createVisualParams(); void syncImages(te_map_t &src, te_map_t &dst); - void destroyTextures(); + void destroyTextures(); static S32 sCurrentDefinitionVersion; // Depends on the current state of the avatar_lad.xml. S32 mDefinitionVersion; // Depends on the state of the avatar_lad.xml when this asset was created. -- cgit v1.2.3 From 973e2143d23cad915a320dceccf4c2708e1cfa2e Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 4 Feb 2010 15:22:39 -0500 Subject: EXT-4902: Assert crash after detaching all and removing all clothes. Turned overzealous assert into a warning. --- indra/newview/llinventorybridge.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index ab178b4007..1414e9ca83 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -4916,7 +4916,12 @@ void LLWearableBridge::onRemoveFromAvatarArrived(LLWearable* wearable, } // Find and remove this item from the COF. + // FIXME 2.1 - call removeCOFItemLinks in llappearancemgr instead. LLInventoryModel::item_array_t items = gInventory.collectLinkedItems(item_id, LLAppearanceManager::instance().getCOF()); + if (items.size() != 1) + { + llwarns << "Found " << items.size() << " COF links to " << item_id.asString() << ", expected 1" << llendl; + } llassert(items.size() == 1); // Should always have one and only one item linked to this in the COF. for (LLInventoryModel::item_array_t::const_iterator iter = items.begin(); iter != items.end(); -- cgit v1.2.3 From b3f4c6fb7ad79501fa91e14cc93ef3dcd1cce8ae Mon Sep 17 00:00:00 2001 From: "Eric M. Tulla (BigPapi)" Date: Thu, 4 Feb 2010 15:52:07 -0500 Subject: EXT-4841 - Expand one of the outfits in the outfits tab for new users so they can get a sense of their contents. Also moved the My Outfits autopopulation from the library out of where it was done before (as a result of initial wearables message) to be done in the idle login during the precaching state. -Reviewed by Nyx --- indra/newview/llagentwearables.cpp | 7 ------- indra/newview/llpaneloutfitsinventory.cpp | 21 +++++++++++++++++++++ indra/newview/llstartup.cpp | 11 +++++++++++ 3 files changed, 32 insertions(+), 7 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 41f2ff29e6..acbf02678c 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -927,13 +927,6 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs if (mInitialWearablesUpdateReceived) return; mInitialWearablesUpdateReceived = true; - - // If this is the very first time the user has logged into viewer2+ (from a legacy viewer, or new account) - // then auto-populate outfits from the library into the My Outfits folder. - if (LLInventoryModel::getIsFirstTimeInViewer2() || gSavedSettings.getBOOL("MyOutfitsAutofill")) - { - gAgentWearables.populateMyOutfitsFolder(); - } LLUUID agent_id; gMessageSystem->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id); diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index cf903958ee..c2f2d32142 100644 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -159,6 +159,27 @@ void LLPanelOutfitsInventory::onOpen(const LLSD& key) // Make sure we know which tab is selected, update the filter, // and update verbs. onTabChange(); + + // Auto open the first outfit newly created so new users can see sample outfit contents + static bool should_open_outfit = true; + if (should_open_outfit && gAgent.isFirstLogin()) + { + LLInventoryPanel* outfits_panel = getChild(OUTFITS_TAB_NAME); + if (outfits_panel) + { + LLUUID my_outfits_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS); + LLFolderViewFolder* my_outfits_folder = outfits_panel->getRootFolder()->getFolderByID(my_outfits_id); + if (my_outfits_folder) + { + LLFolderViewFolder* first_outfit = dynamic_cast(my_outfits_folder->getFirstChild()); + if (first_outfit) + { + first_outfit->setOpen(TRUE); + } + } + } + } + should_open_outfit = false; } void LLPanelOutfitsInventory::updateVerbs() diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 9fda77fe74..a402dfc3d1 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -1876,6 +1876,17 @@ bool idle_startup() LLViewerShaderMgr::instance()->setShaders(); } } + + // If this is the very first time the user has logged into viewer2+ (from a legacy viewer, or new account) + // then auto-populate outfits from the library into the My Outfits folder. + static bool check_populate_my_outfits = true; + if (check_populate_my_outfits && + (LLInventoryModel::getIsFirstTimeInViewer2() + || gSavedSettings.getBOOL("MyOutfitsAutofill"))) + { + gAgentWearables.populateMyOutfitsFolder(); + } + check_populate_my_outfits = false; return TRUE; } -- cgit v1.2.3 From a165279acd57c6c0e2e6492b7de39a9e614327af Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 4 Feb 2010 16:20:43 -0500 Subject: EXT-4902: Assert crash after detaching all and removing all clothes. --- indra/newview/llinventorybridge.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 1414e9ca83..35a45a89be 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -4922,7 +4922,6 @@ void LLWearableBridge::onRemoveFromAvatarArrived(LLWearable* wearable, { llwarns << "Found " << items.size() << " COF links to " << item_id.asString() << ", expected 1" << llendl; } - llassert(items.size() == 1); // Should always have one and only one item linked to this in the COF. for (LLInventoryModel::item_array_t::const_iterator iter = items.begin(); iter != items.end(); ++iter) @@ -4958,7 +4957,10 @@ void LLWearableBridge::removeAllClothesFromAvatar() // Find and remove this item from the COF. LLInventoryModel::item_array_t items = gInventory.collectLinkedItems( item_id, LLAppearanceManager::instance().getCOF()); - llassert(items.size() == 1); // Should always have one and only one item linked to this in the COF. + if (items.size() != 1) + { + llwarns << "Found " << items.size() << " COF links to " << item_id.asString() << ", expected 1" << llendl; + } for (LLInventoryModel::item_array_t::const_iterator iter = items.begin(); iter != items.end(); ++iter) -- cgit v1.2.3 From 643b014fb858ec547663536dc649d845d2722ed2 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Thu, 4 Feb 2010 16:43:46 -0500 Subject: EXT-4990 : "Find Original" should be enabled for links in the trash EXT-4988 : Centralize right-click menu options when items are in trash This change is a lot less scary than it looks. There is a bit of minor cosmetic cleanup (e.g. typedefing a commonly-used vector), and I've eliminated code duplication since, previously, every item/listener type had its own purge/restore item dialog; these are now handled in one central function. I also moved "Find Original" above Purge/RestoreItem so that it appears first in the trash menu; this does not affect other menu options. The functionality change from this checkin is to enable "Find Original" for link items in the trash. --- indra/newview/llinventorybridge.cpp | 178 ++++++++------------- indra/newview/llinventorybridge.h | 22 +-- .../skins/default/xui/en/menu_inventory.xml | 16 +- 3 files changed, 85 insertions(+), 131 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 3a630650c5..cdc3650366 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -461,8 +461,8 @@ BOOL LLInvFVBridge::isClipboardPasteableAsLink() const } void hide_context_entries(LLMenuGL& menu, - const std::vector &entries_to_show, - const std::vector &disabled_entries) + const menuentry_vec_t &entries_to_show, + const menuentry_vec_t &disabled_entries) { const LLView::child_list_t *list = menu.getChildList(); @@ -480,7 +480,7 @@ void hide_context_entries(LLMenuGL& menu, bool found = false; - std::vector::const_iterator itor2; + menuentry_vec_t::const_iterator itor2; for (itor2 = entries_to_show.begin(); itor2 != entries_to_show.end(); ++itor2) { if (*itor2 == name) @@ -508,8 +508,8 @@ void hide_context_entries(LLMenuGL& menu, // Helper for commonly-used entries void LLInvFVBridge::getClipboardEntries(bool show_asset_id, - std::vector &items, - std::vector &disabled_items, U32 flags) + menuentry_vec_t &items, + menuentry_vec_t &disabled_items, U32 flags) { const LLInventoryObject *obj = getInventoryObject(); @@ -603,16 +603,11 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, void LLInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { lldebugs << "LLInvFVBridge::buildContextMenu()" << llendl; - std::vector items; - std::vector disabled_items; + menuentry_vec_t items; + menuentry_vec_t disabled_items; if(isItemInTrash()) { - items.push_back(std::string("Purge Item")); - if (!isItemRemovable()) - { - disabled_items.push_back(std::string("Purge Item")); - } - items.push_back(std::string("Restore Item")); + addTrashContextMenuOptions(items, disabled_items); } else { @@ -624,6 +619,27 @@ void LLInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags) hide_context_entries(menu, items, disabled_items); } +void LLInvFVBridge::addTrashContextMenuOptions(menuentry_vec_t &items, + menuentry_vec_t &disabled_items) +{ + const LLInventoryObject *obj = getInventoryObject(); + if (obj && obj->getIsLinkType()) + { + items.push_back(std::string("Find Original")); + if (isLinkedObjectMissing()) + { + disabled_items.push_back(std::string("Find Original")); + } + } + items.push_back(std::string("Purge Item")); + if (!isItemRemovable()) + { + disabled_items.push_back(std::string("Purge Item")); + } + items.push_back(std::string("Restore Item")); +} + + // *TODO: remove this BOOL LLInvFVBridge::startDrag(EDragAndDropType* type, LLUUID* id) const { @@ -2439,7 +2455,7 @@ void LLFolderBridge::staticFolderOptionsMenu() void LLFolderBridge::folderOptionsMenu() { - std::vector disabled_items; + menuentry_vec_t disabled_items; LLInventoryModel* model = getInventoryModel(); if(!model) return; @@ -2572,7 +2588,7 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) lldebugs << "LLFolderBridge::buildContextMenu()" << llendl; -// std::vector disabled_items; +// menuentry_vec_t disabled_items; LLInventoryModel* model = getInventoryModel(); if(!model) return; const LLUUID trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH); @@ -2589,17 +2605,11 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) // This is the trash. mItems.push_back(std::string("Empty Trash")); } - else if(model->isObjectDescendentOf(mUUID, trash_id)) + else if(isItemInTrash()) { // This is a folder in the trash. mItems.clear(); // clear any items that used to exist - mItems.push_back(std::string("Purge Item")); - if (!isItemRemovable()) - { - mDisabledItems.push_back(std::string("Purge Item")); - } - - mItems.push_back(std::string("Restore Item")); + addTrashContextMenuOptions(mItems, mDisabledItems); } else if(isAgentInventory()) // do not allow creating in library { @@ -3206,17 +3216,11 @@ bool LLTextureBridge::canSaveTexture(void) void LLTextureBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { lldebugs << "LLTextureBridge::buildContextMenu()" << llendl; - std::vector items; - std::vector disabled_items; + menuentry_vec_t items; + menuentry_vec_t disabled_items; if(isItemInTrash()) { - items.push_back(std::string("Purge Item")); - if (!isItemRemovable()) - { - disabled_items.push_back(std::string("Purge Item")); - } - - items.push_back(std::string("Restore Item")); + addTrashContextMenuOptions(items, disabled_items); } else { @@ -3299,18 +3303,12 @@ void LLSoundBridge::openSoundPreview(void* which) void LLSoundBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { lldebugs << "LLSoundBridge::buildContextMenu()" << llendl; - std::vector items; - std::vector disabled_items; + menuentry_vec_t items; + menuentry_vec_t disabled_items; if(isItemInTrash()) { - items.push_back(std::string("Purge Item")); - if (!isItemRemovable()) - { - disabled_items.push_back(std::string("Purge Item")); - } - - items.push_back(std::string("Restore Item")); + addTrashContextMenuOptions(items, disabled_items); } else { @@ -3347,19 +3345,13 @@ LLUIImagePtr LLLandmarkBridge::getIcon() const void LLLandmarkBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { - std::vector items; - std::vector disabled_items; + menuentry_vec_t items; + menuentry_vec_t disabled_items; lldebugs << "LLLandmarkBridge::buildContextMenu()" << llendl; if(isItemInTrash()) { - items.push_back(std::string("Purge Item")); - if (!isItemRemovable()) - { - disabled_items.push_back(std::string("Purge Item")); - } - - items.push_back(std::string("Restore Item")); + addTrashContextMenuOptions(items, disabled_items); } else { @@ -3573,18 +3565,12 @@ void LLCallingCardBridge::openItem() void LLCallingCardBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { lldebugs << "LLCallingCardBridge::buildContextMenu()" << llendl; - std::vector items; - std::vector disabled_items; + menuentry_vec_t items; + menuentry_vec_t disabled_items; if(isItemInTrash()) { - items.push_back(std::string("Purge Item")); - if (!isItemRemovable()) - { - disabled_items.push_back(std::string("Purge Item")); - } - - items.push_back(std::string("Restore Item")); + addTrashContextMenuOptions(items, disabled_items); } else { @@ -3839,17 +3825,11 @@ BOOL LLGestureBridge::removeItem() void LLGestureBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { lldebugs << "LLGestureBridge::buildContextMenu()" << llendl; - std::vector items; - std::vector disabled_items; + menuentry_vec_t items; + menuentry_vec_t disabled_items; if(isItemInTrash()) { - items.push_back(std::string("Purge Item")); - if (!isItemRemovable()) - { - disabled_items.push_back(std::string("Purge Item")); - } - - items.push_back(std::string("Restore Item")); + addTrashContextMenuOptions(items, disabled_items); } else { @@ -3901,19 +3881,13 @@ LLUIImagePtr LLAnimationBridge::getIcon() const void LLAnimationBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { - std::vector items; - std::vector disabled_items; + menuentry_vec_t items; + menuentry_vec_t disabled_items; lldebugs << "LLAnimationBridge::buildContextMenu()" << llendl; if(isItemInTrash()) { - items.push_back(std::string("Purge Item")); - if (!isItemRemovable()) - { - disabled_items.push_back(std::string("Purge Item")); - } - - items.push_back(std::string("Restore Item")); + addTrashContextMenuOptions(items, disabled_items); } else { @@ -4182,17 +4156,11 @@ static LLNotificationFunctorRegistration confirm_replace_attachment_rez_reg("Rep void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { - std::vector items; - std::vector disabled_items; + menuentry_vec_t items; + menuentry_vec_t disabled_items; if(isItemInTrash()) { - items.push_back(std::string("Purge Item")); - if (!isItemRemovable()) - { - disabled_items.push_back(std::string("Purge Item")); - } - - items.push_back(std::string("Restore Item")); + addTrashContextMenuOptions(items, disabled_items); } else { @@ -4598,17 +4566,11 @@ void LLWearableBridge::openItem() void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { lldebugs << "LLWearableBridge::buildContextMenu()" << llendl; - std::vector items; - std::vector disabled_items; + menuentry_vec_t items; + menuentry_vec_t disabled_items; if(isItemInTrash()) { - items.push_back(std::string("Purge Item")); - if (!isItemRemovable()) - { - disabled_items.push_back(std::string("Purge Item")); - } - - items.push_back(std::string("Restore Item")); + addTrashContextMenuOptions(items, disabled_items); } else { // FWIW, it looks like SUPPRESS_OPEN_ITEM is not set anywhere @@ -5302,21 +5264,15 @@ void LLLinkItemBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { // *TODO: Translate lldebugs << "LLLink::buildContextMenu()" << llendl; - std::vector items; - std::vector disabled_items; + menuentry_vec_t items; + menuentry_vec_t disabled_items; items.push_back(std::string("Find Original")); disabled_items.push_back(std::string("Find Original")); if(isItemInTrash()) { - items.push_back(std::string("Purge Item")); - if (!isItemRemovable()) - { - disabled_items.push_back(std::string("Purge Item")); - } - - items.push_back(std::string("Restore Item")); + addTrashContextMenuOptions(items, disabled_items); } else { @@ -5356,18 +5312,12 @@ void LLLinkFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { // *TODO: Translate lldebugs << "LLLink::buildContextMenu()" << llendl; - std::vector items; - std::vector disabled_items; + menuentry_vec_t items; + menuentry_vec_t disabled_items; - if(isItemInTrash()) + if (isItemInTrash()) { - items.push_back(std::string("Purge Item")); - if (!isItemRemovable()) - { - disabled_items.push_back(std::string("Purge Item")); - } - - items.push_back(std::string("Restore Item")); + addTrashContextMenuOptions(items, disabled_items); } else { diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 6e256edc05..daa6dbeeba 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -107,13 +107,15 @@ struct LLAttachmentRezAction S32 mAttachPt; }; +typedef std::vector menuentry_vec_t; + const std::string safe_inv_type_lookup(LLInventoryType::EType inv_type); void hide_context_entries(LLMenuGL& menu, - const std::vector &entries_to_show, - const std::vector &disabled_entries); + const menuentry_vec_t &entries_to_show, + const menuentry_vec_t &disabled_entries); //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// Class LLInvFVBridge (& it's derived classes) +// Class LLInvFVBridge (& its derived classes) // // Short for Inventory-Folder-View-Bridge. This is an // implementation class to be able to view inventory items. @@ -172,9 +174,11 @@ public: virtual BOOL isClipboardPasteableAsLink() const; virtual void pasteFromClipboard() {} virtual void pasteLinkFromClipboard() {} - void getClipboardEntries(bool show_asset_id, std::vector &items, - std::vector &disabled_items, U32 flags); + void getClipboardEntries(bool show_asset_id, menuentry_vec_t &items, + menuentry_vec_t &disabled_items, U32 flags); virtual void buildContextMenu(LLMenuGL& menu, U32 flags); + virtual void addTrashContextMenuOptions(menuentry_vec_t &items, + menuentry_vec_t &disabled_items); virtual BOOL startDrag(EDragAndDropType* type, LLUUID* id) const; virtual BOOL dragOrDrop(MASK mask, BOOL drop, EDragAndDropType cargo_type, @@ -361,8 +365,8 @@ private: BOOL mCallingCards; BOOL mWearables; LLMenuGL* mMenu; - std::vector mItems; - std::vector mDisabledItems; + menuentry_vec_t mItems; + menuentry_vec_t mDisabledItems; }; // DEPRECATED @@ -816,7 +820,7 @@ void teleport_via_landmark(const LLUUID& asset_id); // Utility function to hide all entries except those in the list void hide_context_entries(LLMenuGL& menu, - const std::vector &entries_to_show, - const std::vector &disabled_entries); + const menuentry_vec_t &entries_to_show, + const menuentry_vec_t &disabled_entries); #endif // LL_LLINVENTORYBRIDGE_H diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml index 1993af6730..2874151df5 100644 --- a/indra/newview/skins/default/xui/en/menu_inventory.xml +++ b/indra/newview/skins/default/xui/en/menu_inventory.xml @@ -369,6 +369,14 @@ + + + - - - Date: Thu, 4 Feb 2010 16:44:06 -0500 Subject: Change "Teleport History Location" subheader to "Teleport History". Adjusted color and style on this and other side-panel subheaders to be consistent. --- indra/newview/skins/default/xui/en/panel_landmark_info.xml | 2 +- indra/newview/skins/default/xui/en/panel_place_profile.xml | 4 ++-- indra/newview/skins/default/xui/en/panel_profile_view.xml | 2 +- indra/newview/skins/default/xui/en/sidepanel_appearance.xml | 4 ++-- indra/newview/skins/default/xui/en/sidepanel_item_info.xml | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/panel_landmark_info.xml b/indra/newview/skins/default/xui/en/panel_landmark_info.xml index 396699ad6c..d1b22a34bb 100644 --- a/indra/newview/skins/default/xui/en/panel_landmark_info.xml +++ b/indra/newview/skins/default/xui/en/panel_landmark_info.xml @@ -71,7 +71,7 @@ layout="topleft" left_pad="10" name="title" - text_color="white" + text_color="LtGray" top="0" use_ellipses="true" value="Place Profile" diff --git a/indra/newview/skins/default/xui/en/panel_place_profile.xml b/indra/newview/skins/default/xui/en/panel_place_profile.xml index 7ac771de27..94c9b2de01 100644 --- a/indra/newview/skins/default/xui/en/panel_place_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_place_profile.xml @@ -29,7 +29,7 @@ value="Place Profile" /> + value="Teleport History" /> @@ -156,7 +156,7 @@ layout="topleft" left_pad="10" name="title" - text_color="white" + text_color="LtGray" top="0" use_ellipses="true" value="Place Profile" diff --git a/indra/newview/skins/default/xui/en/panel_profile_view.xml b/indra/newview/skins/default/xui/en/panel_profile_view.xml index f5396951ca..607de65c5c 100644 --- a/indra/newview/skins/default/xui/en/panel_profile_view.xml +++ b/indra/newview/skins/default/xui/en/panel_profile_view.xml @@ -35,7 +35,7 @@ layout="topleft" left_pad="10" name="user_name" - text_color="white" + text_color="LtGray" top="0" value="(Loading...)" use_ellipses="true" diff --git a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml index fab1f11273..bde45a9487 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml @@ -46,10 +46,10 @@ width="333"> top="0" width="30" /> Date: Thu, 4 Feb 2010 17:21:21 -0500 Subject: EXT-4990 : "Remove Link" and "Delete" are both active for links in the InventoryFloater For links, removed "Delete", since having both "Remove Link" and "Delete" is redundant. --- indra/newview/llinventorybridge.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index cdc3650366..c1259aa89a 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -582,12 +582,16 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, items.push_back(std::string("Paste Separator")); + // "Remove link" and "Delete" are the same operation. if (obj && obj->getIsLinkType() && !get_is_item_worn(mUUID)) { items.push_back(std::string("Remove Link")); } + else + { + items.push_back(std::string("Delete")); + } - items.push_back(std::string("Delete")); if (!isItemRemovable()) { disabled_items.push_back(std::string("Delete")); -- cgit v1.2.3 From a3781e07df303542f458dae5649ab24cde1117d8 Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Thu, 4 Feb 2010 14:53:33 -0800 Subject: This file should have gone in with a previous changeset (https://hg.lindenlab.com/viewer/viewer-2-0/changeset/dddb40b50424/) --- indra/newview/llfloatertools.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index 241497aeaf..4edd09b02c 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -1321,7 +1321,7 @@ bool LLFloaterTools::deleteMediaConfirm(const LLSD& notification, const LLSD& re switch( option ) { case 0: // "Yes" - LLSelectMgr::getInstance()->selectionSetMedia( 0 ); + LLSelectMgr::getInstance()->selectionSetMedia( 0, LLSD() ); if(LLFloaterReg::instanceVisible("media_settings")) { LLFloaterReg::hideInstance("media_settings"); -- cgit v1.2.3 From 14d77a36d4392cd51a0887d957905ce4c532ba38 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Thu, 4 Feb 2010 18:38:47 -0500 Subject: EXT-4993 : Deleting an item from the COF in Inventory Floater keeps it worn EXT-4997 : Centralize right-click menu options for delete/remove link EXT-4998 : Automatically reject double separators from right click menu Disabled/hid delete button from COF right-click menu, also means that trash icon is disabled. Added generalized function to remove consecutive separators from right-click menu. Made a minor cosmetic change to have all code duplication for adding "delete" menu item instead call a common function. --- indra/newview/llappearancemgr.cpp | 6 +++ indra/newview/llinventorybridge.cpp | 77 ++++++++++++++++++++++++------------- indra/newview/llinventorybridge.h | 10 ++++- 3 files changed, 64 insertions(+), 29 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 0fe236c056..326fc41c1e 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -1353,6 +1353,11 @@ BOOL LLAppearanceManager::getIsInCOF(const LLUUID& obj_id) const BOOL LLAppearanceManager::getIsProtectedCOFItem(const LLUUID& obj_id) const { if (!getIsInCOF(obj_id)) return FALSE; + + // For now, don't allow direct deletion from the COF. Instead, force users + // to choose "Detach" or "Take Off". + return TRUE; + /* const LLInventoryObject *obj = gInventory.getObject(obj_id); if (!obj) return FALSE; @@ -1363,4 +1368,5 @@ BOOL LLAppearanceManager::getIsProtectedCOFItem(const LLUUID& obj_id) const if (obj->getActualType() == LLAssetType::AT_LINK_FOLDER) return TRUE; return FALSE; + */ } diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index c1259aa89a..f6089f3533 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -181,10 +181,14 @@ BOOL LLInvFVBridge::isItemRemovable() const { return FALSE; } + + // Can't delete an item that's in the library. if(!model->isObjectDescendentOf(mUUID, gInventory.getRootFolderID())) { return FALSE; } + + // Disable delete from COF folder; have users explicitly choose "detach/take off". if (LLAppearanceManager::instance().getIsProtectedCOFItem(mUUID)) { return FALSE; @@ -466,6 +470,8 @@ void hide_context_entries(LLMenuGL& menu, { const LLView::child_list_t *list = menu.getChildList(); + BOOL is_previous_entry_separator = FALSE; + LLView::child_list_t::const_iterator itor; for (itor = list->begin(); itor != list->end(); ++itor) { @@ -488,6 +494,17 @@ void hide_context_entries(LLMenuGL& menu, found = true; } } + + // Don't allow multiple separators in a row (e.g. such as if there are no items + // between two separators). + if (found) + { + const BOOL is_entry_separator = (dynamic_cast(*itor) != NULL); + if (is_entry_separator && is_previous_entry_separator) + found = false; + is_previous_entry_separator = is_entry_separator; + } + if (!found) { (*itor)->setVisible(FALSE); @@ -582,20 +599,7 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, items.push_back(std::string("Paste Separator")); - // "Remove link" and "Delete" are the same operation. - if (obj && obj->getIsLinkType() && !get_is_item_worn(mUUID)) - { - items.push_back(std::string("Remove Link")); - } - else - { - items.push_back(std::string("Delete")); - } - - if (!isItemRemovable()) - { - disabled_items.push_back(std::string("Delete")); - } + addDeleteContextMenuOptions(items, disabled_items); // If multiple items are selected, disable properties (if it exists). if ((flags & FIRST_SELECTED_ITEM) == 0) @@ -643,6 +647,32 @@ void LLInvFVBridge::addTrashContextMenuOptions(menuentry_vec_t &items, items.push_back(std::string("Restore Item")); } +void LLInvFVBridge::addDeleteContextMenuOptions(menuentry_vec_t &items, + menuentry_vec_t &disabled_items) +{ + // Don't allow delete as a direct option from COF folder. + if (isCOFFolder()) + { + return; + } + + const LLInventoryObject *obj = getInventoryObject(); + + // "Remove link" and "Delete" are the same operation. + if (obj && obj->getIsLinkType() && !get_is_item_worn(mUUID)) + { + items.push_back(std::string("Remove Link")); + } + else + { + items.push_back(std::string("Delete")); + } + + if (!isItemRemovable()) + { + disabled_items.push_back(std::string("Delete")); + } +} // *TODO: remove this BOOL LLInvFVBridge::startDrag(EDragAndDropType* type, LLUUID* id) const @@ -2477,7 +2507,7 @@ void LLFolderBridge::folderOptionsMenu() if (is_sidepanel) { mItems.push_back("Rename"); - mItems.push_back("Delete"); + addDeleteContextMenuOptions(mItems, disabled_items); } // Only enable calling-card related options for non-system folders. @@ -2647,11 +2677,11 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) else { // Want some but not all of the items from getClipboardEntries for outfits. - if (cat && cat->getPreferredType()==LLFolderType::FT_OUTFIT) + if (cat && (cat->getPreferredType() == LLFolderType::FT_OUTFIT)) { mItems.push_back(std::string("Rename")); - mItems.push_back(std::string("Delete")); + addDeleteContextMenuOptions(mItems, mDisabledItems); // EXT-4030: disallow deletion of currently worn outfit const LLViewerInventoryItem *base_outfit_link = LLAppearanceManager::instance().getBaseOutfitLink(); if (base_outfit_link && (cat == base_outfit_link->getLinkedCategory())) @@ -4190,6 +4220,7 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags) if( get_is_item_worn( mUUID ) ) { + items.push_back(std::string("Attach Separator")); items.push_back(std::string("Detach From Yourself")); } else if (!isItemInTrash() && !isLinkedObjectInTrash() && !isLinkedObjectMissing()) @@ -5281,11 +5312,7 @@ void LLLinkItemBridge::buildContextMenu(LLMenuGL& menu, U32 flags) else { items.push_back(std::string("Properties")); - items.push_back(std::string("Delete")); - if (!isItemRemovable()) - { - disabled_items.push_back(std::string("Delete")); - } + addDeleteContextMenuOptions(items, disabled_items); } hide_context_entries(menu, items, disabled_items); } @@ -5326,11 +5353,7 @@ void LLLinkFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) else { items.push_back(std::string("Find Original")); - items.push_back(std::string("Delete")); - if (!isItemRemovable()) - { - disabled_items.push_back(std::string("Delete")); - } + addDeleteContextMenuOptions(items, disabled_items); } hide_context_entries(menu, items, disabled_items); } diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index daa6dbeeba..32504091cb 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -177,8 +177,6 @@ public: void getClipboardEntries(bool show_asset_id, menuentry_vec_t &items, menuentry_vec_t &disabled_items, U32 flags); virtual void buildContextMenu(LLMenuGL& menu, U32 flags); - virtual void addTrashContextMenuOptions(menuentry_vec_t &items, - menuentry_vec_t &disabled_items); virtual BOOL startDrag(EDragAndDropType* type, LLUUID* id) const; virtual BOOL dragOrDrop(MASK mask, BOOL drop, EDragAndDropType cargo_type, @@ -191,6 +189,14 @@ public: // Allow context menus to be customized for side panel. bool isInOutfitsSidePanel() const; + //-------------------------------------------------------------------- + // Convenience functions for adding various common menu options. + //-------------------------------------------------------------------- +protected: + virtual void addTrashContextMenuOptions(menuentry_vec_t &items, + menuentry_vec_t &disabled_items); + virtual void addDeleteContextMenuOptions(menuentry_vec_t &items, + menuentry_vec_t &disabled_items); protected: LLInvFVBridge(LLInventoryPanel* inventory, const LLUUID& uuid); -- cgit v1.2.3 From 195b13beff0ea476ed47a08f6a44b85dc151eec8 Mon Sep 17 00:00:00 2001 From: Eli Linden Date: Thu, 4 Feb 2010 16:00:56 -0800 Subject: EXT-2181 DA Danish translation for set6 --- .../skins/default/xui/da/floater_about_land.xml | 368 ++++++++++----------- .../default/xui/da/floater_animation_preview.xml | 231 +++++++++---- .../default/xui/da/floater_avatar_textures.xml | 52 +-- .../skins/default/xui/da/floater_beacons.xml | 26 +- .../skins/default/xui/da/floater_build_options.xml | 17 +- .../skins/default/xui/da/floater_buy_contents.xml | 8 +- .../skins/default/xui/da/floater_buy_currency.xml | 82 +++-- .../skins/default/xui/da/floater_buy_land.xml | 24 +- .../skins/default/xui/da/floater_choose_group.xml | 6 +- .../skins/default/xui/da/floater_customize.xml | 88 ++++- .../default/xui/da/floater_device_settings.xml | 4 +- .../skins/default/xui/da/floater_env_settings.xml | 20 +- .../default/xui/da/floater_hardware_settings.xml | 26 +- .../skins/default/xui/da/floater_help_browser.xml | 8 + indra/newview/skins/default/xui/da/floater_im.xml | 4 +- .../skins/default/xui/da/floater_im_container.xml | 2 + .../skins/default/xui/da/floater_image_preview.xml | 28 +- .../skins/default/xui/da/floater_incoming_call.xml | 21 ++ .../skins/default/xui/da/floater_inspect.xml | 13 +- .../skins/default/xui/da/floater_inventory.xml | 59 +--- .../xui/da/floater_inventory_item_properties.xml | 92 +++--- .../skins/default/xui/da/floater_joystick.xml | 8 +- .../skins/default/xui/da/floater_lagmeter.xml | 215 ++++++------ .../skins/default/xui/da/floater_lsl_guide.xml | 10 +- .../default/xui/da/floater_media_settings.xml | 6 + .../skins/default/xui/da/floater_nearby_chat.xml | 2 + .../skins/default/xui/da/floater_openobject.xml | 8 +- .../skins/default/xui/da/floater_outgoing_call.xml | 28 ++ indra/newview/skins/default/xui/da/floater_pay.xml | 32 +- .../skins/default/xui/da/floater_pay_object.xml | 33 +- .../skins/default/xui/da/floater_preview_event.xml | 8 +- .../default/xui/da/floater_preview_gesture.xml | 53 +-- .../xui/da/floater_preview_gesture_info.xml | 2 + .../xui/da/floater_preview_gesture_shortcut.xml | 15 + .../xui/da/floater_preview_gesture_steps.xml | 2 + .../default/xui/da/floater_preview_notecard.xml | 20 +- .../default/xui/da/floater_preview_texture.xml | 39 ++- .../default/xui/da/floater_script_debug_panel.xml | 2 + .../default/xui/da/floater_script_preview.xml | 7 +- .../skins/default/xui/da/floater_script_search.xml | 10 +- .../skins/default/xui/da/floater_sell_land.xml | 123 +++---- .../default/xui/da/floater_settings_debug.xml | 20 +- .../skins/default/xui/da/floater_snapshot.xml | 68 ++-- .../skins/default/xui/da/floater_sys_well.xml | 9 + .../skins/default/xui/da/floater_telehub.xml | 15 +- .../skins/default/xui/da/floater_top_objects.xml | 34 +- indra/newview/skins/default/xui/da/floater_tos.xml | 11 +- .../newview/skins/default/xui/da/floater_water.xml | 64 ++-- .../default/xui/da/floater_whitelist_entry.xml | 9 + .../skins/default/xui/da/inspect_object.xml | 34 ++ .../skins/default/xui/da/mime_types_linux.xml | 217 ++++++++++++ .../default/xui/da/panel_active_object_row.xml | 9 + .../default/xui/da/panel_adhoc_control_panel.xml | 8 + .../skins/default/xui/da/panel_bottomtray.xml | 23 ++ .../skins/default/xui/da/panel_edit_alpha.xml | 10 + .../skins/default/xui/da/panel_edit_eyes.xml | 9 + .../skins/default/xui/da/panel_edit_gloves.xml | 10 + .../skins/default/xui/da/panel_edit_jacket.xml | 11 + .../skins/default/xui/da/panel_edit_pants.xml | 10 + .../skins/default/xui/da/panel_edit_pick.xml | 28 ++ .../skins/default/xui/da/panel_edit_shoes.xml | 10 + .../skins/default/xui/da/panel_edit_skin.xml | 14 + .../skins/default/xui/da/panel_edit_socks.xml | 10 + .../skins/default/xui/da/panel_edit_underpants.xml | 10 + .../skins/default/xui/da/panel_edit_undershirt.xml | 10 + .../skins/default/xui/da/panel_edit_wearable.xml | 101 ++++++ .../newview/skins/default/xui/da/panel_friends.xml | 36 +- .../default/xui/da/panel_group_control_panel.xml | 9 + .../skins/default/xui/da/panel_group_general.xml | 77 ++--- .../default/xui/da/panel_group_info_sidetray.xml | 36 ++ .../skins/default/xui/da/panel_group_invite.xml | 37 +-- .../default/xui/da/panel_group_land_money.xml | 39 ++- .../skins/default/xui/da/panel_group_notices.xml | 51 ++- indra/newview/skins/default/xui/da/panel_me.xml | 7 + .../xui/da/panel_media_settings_general.xml | 32 ++ .../xui/da/panel_media_settings_security.xml | 12 + .../skins/default/xui/da/panel_my_profile.xml | 37 +++ .../skins/default/xui/da/panel_nearby_chat.xml | 9 + .../skins/default/xui/da/panel_nearby_chat_bar.xml | 11 + .../skins/default/xui/da/panel_pick_info.xml | 16 + .../skins/default/xui/da/panel_place_profile.xml | 103 ++++++ .../default/xui/da/panel_preferences_chat.xml | 4 + .../default/xui/da/panel_preferences_general.xml | 107 +++--- .../default/xui/da/panel_preferences_graphics1.xml | 213 +++++------- .../default/xui/da/panel_prim_media_controls.xml | 28 ++ .../skins/default/xui/da/panel_profile_view.xml | 16 + .../skins/default/xui/da/panel_region_estate.xml | 64 ++-- .../default/xui/da/panel_side_tray_tab_caption.xml | 5 + .../skins/default/xui/da/panel_status_bar.xml | 61 ++-- .../newview/skins/default/xui/da/role_actions.xml | 245 ++++---------- .../skins/default/xui/da/sidepanel_appearance.xml | 11 + .../skins/default/xui/da/sidepanel_inventory.xml | 11 + 92 files changed, 2358 insertions(+), 1475 deletions(-) create mode 100644 indra/newview/skins/default/xui/da/floater_help_browser.xml create mode 100644 indra/newview/skins/default/xui/da/floater_im_container.xml create mode 100644 indra/newview/skins/default/xui/da/floater_incoming_call.xml create mode 100644 indra/newview/skins/default/xui/da/floater_media_settings.xml create mode 100644 indra/newview/skins/default/xui/da/floater_nearby_chat.xml create mode 100644 indra/newview/skins/default/xui/da/floater_outgoing_call.xml create mode 100644 indra/newview/skins/default/xui/da/floater_preview_gesture_info.xml create mode 100644 indra/newview/skins/default/xui/da/floater_preview_gesture_shortcut.xml create mode 100644 indra/newview/skins/default/xui/da/floater_preview_gesture_steps.xml create mode 100644 indra/newview/skins/default/xui/da/floater_script_debug_panel.xml create mode 100644 indra/newview/skins/default/xui/da/floater_sys_well.xml create mode 100644 indra/newview/skins/default/xui/da/floater_whitelist_entry.xml create mode 100644 indra/newview/skins/default/xui/da/inspect_object.xml create mode 100644 indra/newview/skins/default/xui/da/mime_types_linux.xml create mode 100644 indra/newview/skins/default/xui/da/panel_active_object_row.xml create mode 100644 indra/newview/skins/default/xui/da/panel_adhoc_control_panel.xml create mode 100644 indra/newview/skins/default/xui/da/panel_bottomtray.xml create mode 100644 indra/newview/skins/default/xui/da/panel_edit_alpha.xml create mode 100644 indra/newview/skins/default/xui/da/panel_edit_eyes.xml create mode 100644 indra/newview/skins/default/xui/da/panel_edit_gloves.xml create mode 100644 indra/newview/skins/default/xui/da/panel_edit_jacket.xml create mode 100644 indra/newview/skins/default/xui/da/panel_edit_pants.xml create mode 100644 indra/newview/skins/default/xui/da/panel_edit_pick.xml create mode 100644 indra/newview/skins/default/xui/da/panel_edit_shoes.xml create mode 100644 indra/newview/skins/default/xui/da/panel_edit_skin.xml create mode 100644 indra/newview/skins/default/xui/da/panel_edit_socks.xml create mode 100644 indra/newview/skins/default/xui/da/panel_edit_underpants.xml create mode 100644 indra/newview/skins/default/xui/da/panel_edit_undershirt.xml create mode 100644 indra/newview/skins/default/xui/da/panel_edit_wearable.xml create mode 100644 indra/newview/skins/default/xui/da/panel_group_control_panel.xml create mode 100644 indra/newview/skins/default/xui/da/panel_group_info_sidetray.xml create mode 100644 indra/newview/skins/default/xui/da/panel_me.xml create mode 100644 indra/newview/skins/default/xui/da/panel_media_settings_general.xml create mode 100644 indra/newview/skins/default/xui/da/panel_media_settings_security.xml create mode 100644 indra/newview/skins/default/xui/da/panel_my_profile.xml create mode 100644 indra/newview/skins/default/xui/da/panel_nearby_chat.xml create mode 100644 indra/newview/skins/default/xui/da/panel_nearby_chat_bar.xml create mode 100644 indra/newview/skins/default/xui/da/panel_pick_info.xml create mode 100644 indra/newview/skins/default/xui/da/panel_place_profile.xml create mode 100644 indra/newview/skins/default/xui/da/panel_prim_media_controls.xml create mode 100644 indra/newview/skins/default/xui/da/panel_profile_view.xml create mode 100644 indra/newview/skins/default/xui/da/panel_side_tray_tab_caption.xml create mode 100644 indra/newview/skins/default/xui/da/sidepanel_appearance.xml create mode 100644 indra/newview/skins/default/xui/da/sidepanel_inventory.xml (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/da/floater_about_land.xml b/indra/newview/skins/default/xui/da/floater_about_land.xml index cb5d618dde..b4af427538 100644 --- a/indra/newview/skins/default/xui/da/floater_about_land.xml +++ b/indra/newview/skins/default/xui/da/floater_about_land.xml @@ -1,7 +1,59 @@ + + [MINUTES] minutter + + + minut + + + [SECONDS] sekunder + + + mangler + - + + + Kun nye brugere + + + Alle + + + Størrelse + + + [AREA] m² + + + Auktion nr: [ID] + + + Du skal godkende dit køb for at kunne æmdre på dette land. + + + (Gruppe ejet) + + + Profil... + + + Info... + + + (offentlig) + + + (ingen) + + + (Salg i gang) + + + Pacel ikke valgt. +Gå til 'Verden' > 'Om land' eller vælg en anden parcel for at se detaljer. + Navn: @@ -26,7 +78,6 @@ Leyla Linden -