From c1a56f9fb784b1f64ddae45c6dd5bb9f5ae6eecd Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 27 Apr 2016 10:58:44 +0300 Subject: MAINT-1057 FIXED Cannot get focus for or close build floater using toolbar button when editing attachments in no-build area --- indra/newview/app_settings/commands.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/app_settings') diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml index 2cd6638042..a0d3dc0f99 100755 --- a/indra/newview/app_settings/commands.xml +++ b/indra/newview/app_settings/commands.xml @@ -37,7 +37,7 @@ tooltip_ref="Command_Build_Tooltip" execute_function="Build.Toggle" execute_parameters="build" - is_enabled_function="Build.Enabled" + is_enabled_function="Build.EnabledOrActive" is_enabled_parameters="build" is_running_function="Floater.IsOpen" is_running_parameters="build" -- cgit v1.3 From b2fd39781833cf00c09d70704f13a8fa58428292 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 4 May 2016 11:31:00 +0300 Subject: MAINT-6220 enable searching of the friend list with the classic username of the avatar. --- indra/llmessage/llavatarname.cpp | 23 ++++++++++++++++++---- indra/llmessage/llavatarname.h | 4 ++-- indra/llui/lltextutil.cpp | 20 +++++++++++++++++++ indra/llui/lltextutil.h | 6 ++++++ indra/newview/app_settings/settings.xml | 22 +++++++++++++++++++++ indra/newview/llavatarlist.cpp | 17 ++++++++++++---- indra/newview/llavatarlist.h | 4 ++++ indra/newview/llavatarlistitem.cpp | 22 ++++++++++++++++++--- indra/newview/llavatarlistitem.h | 4 ++++ indra/newview/llpanelpeople.cpp | 21 ++++++++++++++++++++ .../default/xui/en/menu_people_friends_view.xml | 8 ++++++++ .../default/xui/en/menu_people_nearby_view.xml | 8 ++++++++ 12 files changed, 146 insertions(+), 13 deletions(-) (limited to 'indra/newview/app_settings') diff --git a/indra/llmessage/llavatarname.cpp b/indra/llmessage/llavatarname.cpp index d12f157910..d2115ee499 100644 --- a/indra/llmessage/llavatarname.cpp +++ b/indra/llmessage/llavatarname.cpp @@ -166,7 +166,7 @@ void LLAvatarName::setExpires(F64 expires) mExpires = LLFrameTimer::getTotalSeconds() + expires; } -std::string LLAvatarName::getCompleteName() const +std::string LLAvatarName::getCompleteName(bool use_parentheses) const { std::string name; if (sUseDisplayNames) @@ -182,7 +182,14 @@ std::string LLAvatarName::getCompleteName() const name = mDisplayName; if(sUseUsernames) { - name += " (" + mUsername + ")"; + if(use_parentheses) + { + name += " (" + mUsername + ")"; + } + else + { + name += " [ " + mUsername + " ]"; + } } } } @@ -220,7 +227,7 @@ std::string LLAvatarName::getDisplayName() const } } -std::string LLAvatarName::getUserName() const +std::string LLAvatarName::getUserName(bool lowercase) const { std::string name; if (mLegacyLastName.empty() || (mLegacyLastName == "Resident")) @@ -238,7 +245,15 @@ std::string LLAvatarName::getUserName() const } else { - name = mLegacyFirstName + " " + mLegacyLastName; + if(lowercase) + { + name = mLegacyFirstName + "." + mLegacyLastName; + LLStringUtil::toLower(name); + } + else + { + name = mLegacyFirstName + " " + mLegacyLastName; + } } return name; } diff --git a/indra/llmessage/llavatarname.h b/indra/llmessage/llavatarname.h index 1cb3ae421f..192f43f07c 100644 --- a/indra/llmessage/llavatarname.h +++ b/indra/llmessage/llavatarname.h @@ -65,7 +65,7 @@ public: // For normal names, returns "James Linden (james.linden)" // When display names are disabled returns just "James Linden" - std::string getCompleteName() const; + std::string getCompleteName(bool use_parentheses = true) const; // Returns "James Linden" or "bobsmith123 Resident" for backwards // compatibility with systems like voice and muting @@ -80,7 +80,7 @@ public: // Returns "James Linden" or "bobsmith123 Resident" // Used where we explicitely prefer or need a non UTF-8 legacy (ASCII) name // Also used for backwards compatibility with systems like voice and muting - std::string getUserName() const; + std::string getUserName(bool lowercase = false) const; // Returns "james.linden" or the legacy name for very old names std::string getAccountName() const { return mUsername; } diff --git a/indra/llui/lltextutil.cpp b/indra/llui/lltextutil.cpp index fff04b34f2..f6b2ee1dc0 100755 --- a/indra/llui/lltextutil.cpp +++ b/indra/llui/lltextutil.cpp @@ -56,6 +56,26 @@ void LLTextUtil::textboxSetHighlightedVal(LLTextBox *txtbox, const LLStyle::Para txtbox->appendText(text.substr(hl_begin + hl_len), false, normal_style); } +void LLTextUtil::textboxSetGreyedVal(LLTextBox *txtbox, const LLStyle::Params& normal_style, const std::string& text, const std::string& greyed) +{ + static LLUIColor sGreyedTextColor = LLUIColorTable::instance().getColor("Gray", LLColor4::grey); + + size_t greyed_begin = 0, greyed_len = greyed.size(); + + if (greyed_len == 0 || (greyed_begin = text.find(greyed)) == std::string::npos) + { + txtbox->setText(text, normal_style); + return; + } + + LLStyle::Params greyed_style = normal_style; + greyed_style.color = sGreyedTextColor; + txtbox->setText(LLStringUtil::null); // clear text + txtbox->appendText(text.substr(0, greyed_begin), false, normal_style); + txtbox->appendText(text.substr(greyed_begin, greyed_len), false, greyed_style); + txtbox->appendText(text.substr(greyed_begin + greyed_len), false, normal_style); +} + const std::string& LLTextUtil::formatPhoneNumber(const std::string& phone_str) { static const std::string PHONE_SEPARATOR = LLUI::sSettingGroups["config"]->getString("AvalinePhoneSeparator"); diff --git a/indra/llui/lltextutil.h b/indra/llui/lltextutil.h index 1be81ffd62..a9c143e445 100755 --- a/indra/llui/lltextutil.h +++ b/indra/llui/lltextutil.h @@ -52,6 +52,12 @@ namespace LLTextUtil const std::string& text, const std::string& hl); + void textboxSetGreyedVal( + LLTextBox *txtbox, + const LLStyle::Params& normal_style, + const std::string& text, + const std::string& greyed); + /** * Formats passed phone number to be more human readable. * diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 15f6fe5649..de5caad7fa 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -11062,6 +11062,28 @@ Value 1 + FriendsListHideUsernames + + Comment + Show both Display name and Username in Friend list + Persist + 1 + Type + Boolean + Value + 0 + + NearbyListHideUsernames + + Comment + Show both Display name and Username in Nearby list + Persist + 1 + Type + Boolean + Value + 0 + NearbyListShowMap Comment diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp index 8846d1317d..513f25e301 100755 --- a/indra/newview/llavatarlist.cpp +++ b/indra/newview/llavatarlist.cpp @@ -140,6 +140,7 @@ LLAvatarList::LLAvatarList(const Params& p) , mShowProfileBtn(p.show_profile_btn) , mShowSpeakingIndicator(p.show_speaking_indicator) , mShowPermissions(p.show_permissions_granted) +, mShowCompleteName(false) { setCommitOnSelectionChange(true); @@ -174,6 +175,11 @@ void LLAvatarList::setShowIcons(std::string param_name) mShowIcons = gSavedSettings.getBOOL(mIconParamName); } +std::string LLAvatarList::getAvatarName(LLAvatarName av_name) +{ + return mShowCompleteName? av_name.getCompleteName(false) : av_name.getDisplayName(); +} + // virtual void LLAvatarList::draw() { @@ -279,7 +285,7 @@ void LLAvatarList::refresh() LLAvatarName av_name; have_names &= LLAvatarNameCache::get(buddy_id, &av_name); - if (!have_filter || findInsensitive(av_name.getDisplayName(), mNameFilter)) + if (!have_filter || findInsensitive(getAvatarName(av_name), mNameFilter)) { if (nadded >= ADD_LIMIT) { @@ -297,7 +303,7 @@ void LLAvatarList::refresh() } else { - std::string display_name = av_name.getDisplayName(); + std::string display_name = getAvatarName(av_name); addNewItem(buddy_id, display_name.empty() ? waiting_str : display_name, LLAvatarTracker::instance().isBuddyOnline(buddy_id)); @@ -327,7 +333,7 @@ void LLAvatarList::refresh() const LLUUID& buddy_id = it->asUUID(); LLAvatarName av_name; have_names &= LLAvatarNameCache::get(buddy_id, &av_name); - if (!findInsensitive(av_name.getDisplayName(), mNameFilter)) + if (!findInsensitive(getAvatarName(av_name), mNameFilter)) { removeItemByUUID(buddy_id); modified = true; @@ -381,6 +387,7 @@ void LLAvatarList::updateAvatarNames() for( std::vector::const_iterator it = items.begin(); it != items.end(); it++) { LLAvatarListItem* item = static_cast(*it); + item->setShowCompleteName(mShowCompleteName); item->updateAvatarName(); } mNeedUpdateNames = false; @@ -400,7 +407,7 @@ bool LLAvatarList::filterHasMatches() // If name has not been loaded yet we consider it as a match. // When the name will be loaded the filter will be applied again(in refresh()). - if (have_name && !findInsensitive(av_name.getDisplayName(), mNameFilter)) + if (have_name && !findInsensitive(getAvatarName(av_name), mNameFilter)) { continue; } @@ -434,6 +441,7 @@ S32 LLAvatarList::notifyParent(const LLSD& info) void LLAvatarList::addNewItem(const LLUUID& id, const std::string& name, BOOL is_online, EAddPosition pos) { LLAvatarListItem* item = new LLAvatarListItem(); + item->setShowCompleteName(mShowCompleteName); // This sets the name as a side effect item->setAvatarId(id, mSessionID, mIgnoreOnlineStatus); item->setOnline(mIgnoreOnlineStatus ? true : is_online); @@ -445,6 +453,7 @@ void LLAvatarList::addNewItem(const LLUUID& id, const std::string& name, BOOL is item->showSpeakingIndicator(mShowSpeakingIndicator); item->setShowPermissions(mShowPermissions); + item->setDoubleClickCallback(boost::bind(&LLAvatarList::onItemDoubleClicked, this, _1, _2, _3, _4)); addItem(item, id, pos); diff --git a/indra/newview/llavatarlist.h b/indra/newview/llavatarlist.h index 3542577ae3..1a672c279b 100755 --- a/indra/newview/llavatarlist.h +++ b/indra/newview/llavatarlist.h @@ -83,6 +83,7 @@ public: void setShowIcons(std::string param_name); bool getIconsVisible() const { return mShowIcons; } const std::string getIconParamName() const{return mIconParamName;} + std::string getAvatarName(LLAvatarName av_name); virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); /*virtual*/ BOOL handleMouseDown( S32 x, S32 y, MASK mask ); /*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask); @@ -100,6 +101,8 @@ public: void addAvalineItem(const LLUUID& item_id, const LLUUID& session_id, const std::string& item_name); void handleDisplayNamesOptionChanged(); + void setShowCompleteName(bool show) { mShowCompleteName = show;}; + protected: void refresh(); @@ -126,6 +129,7 @@ private: bool mShowProfileBtn; bool mShowSpeakingIndicator; bool mShowPermissions; + bool mShowCompleteName; LLTimer* mLITUpdateTimer; // last interaction time update timer std::string mIconParamName; diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp index 3e6c817dd6..af3fac91bc 100755 --- a/indra/newview/llavatarlistitem.cpp +++ b/indra/newview/llavatarlistitem.cpp @@ -77,8 +77,10 @@ LLAvatarListItem::LLAvatarListItem(bool not_from_ui_factory/* = true*/) mShowInfoBtn(true), mShowProfileBtn(true), mShowPermissions(false), + mShowCompleteName(false), mHovered(false), - mAvatarNameCacheConnection() + mAvatarNameCacheConnection(), + mGreyOutUsername("") { if (not_from_ui_factory) { @@ -399,14 +401,28 @@ void LLAvatarListItem::updateAvatarName() void LLAvatarListItem::setNameInternal(const std::string& name, const std::string& highlight) { - LLTextUtil::textboxSetHighlightedVal(mAvatarName, mAvatarNameStyle, name, highlight); + if(mShowCompleteName && highlight.empty()) + { + LLTextUtil::textboxSetGreyedVal(mAvatarName, mAvatarNameStyle, name, mGreyOutUsername); + } + else + { + LLTextUtil::textboxSetHighlightedVal(mAvatarName, mAvatarNameStyle, name, highlight); + } } void LLAvatarListItem::onAvatarNameCache(const LLAvatarName& av_name) { mAvatarNameCacheConnection.disconnect(); - setAvatarName(av_name.getDisplayName()); + mGreyOutUsername = ""; + std::string name_string = mShowCompleteName? av_name.getCompleteName(false) : av_name.getDisplayName(); + if(av_name.getCompleteName() != av_name.getUserName()) + { + mGreyOutUsername = "[ " + av_name.getUserName(true) + " ]"; + LLStringUtil::toLower(mGreyOutUsername); + } + setAvatarName(name_string); setAvatarToolTip(av_name.getUserName()); //requesting the list to resort diff --git a/indra/newview/llavatarlistitem.h b/indra/newview/llavatarlistitem.h index 7ef35a746e..36d18114aa 100755 --- a/indra/newview/llavatarlistitem.h +++ b/indra/newview/llavatarlistitem.h @@ -106,6 +106,7 @@ public: void setShowPermissions(bool show) { mShowPermissions = show; }; void showLastInteractionTime(bool show); void setAvatarIconVisible(bool visible); + void setShowCompleteName(bool show) { mShowCompleteName = show;}; const LLUUID& getAvatarId() const; std::string getAvatarName() const; @@ -218,6 +219,9 @@ private: /// true when the mouse pointer is hovering over this item bool mHovered; + bool mShowCompleteName; + std::string mGreyOutUsername; + void fetchAvatarName(); boost::signals2::connection mAvatarNameCacheConnection; diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 73b928f014..bc177abc57 100755 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -611,9 +611,11 @@ BOOL LLPanelPeople::postBuild() mOnlineFriendList->setNoItemsCommentText(getString("no_friends_online")); mOnlineFriendList->setShowIcons("FriendsListShowIcons"); mOnlineFriendList->showPermissions("FriendsListShowPermissions"); + mOnlineFriendList->setShowCompleteName(!gSavedSettings.getBOOL("FriendsListHideUsernames")); mAllFriendList->setNoItemsCommentText(getString("no_friends")); mAllFriendList->setShowIcons("FriendsListShowIcons"); mAllFriendList->showPermissions("FriendsListShowPermissions"); + mAllFriendList->setShowCompleteName(!gSavedSettings.getBOOL("FriendsListHideUsernames")); LLPanel* nearby_tab = getChild(NEARBY_TAB_NAME); nearby_tab->setVisibleCallback(boost::bind(&Updater::setActive, mNearbyListUpdater, _2)); @@ -622,6 +624,7 @@ BOOL LLPanelPeople::postBuild() mNearbyList->setNoItemsMsg(getString("no_one_near")); mNearbyList->setNoFilteredItemsMsg(getString("no_one_filtered_near")); mNearbyList->setShowIcons("NearbyListShowIcons"); + mNearbyList->setShowCompleteName(!gSavedSettings.getBOOL("NearbyListHideUsernames")); mMiniMap = (LLNetMap*)getChildView("Net Map",true); mMiniMap->setToolTipMsg(gSavedSettings.getBOOL("DoubleClickTeleport") ? getString("AltMiniMapToolTipMsg") : getString("MiniMapToolTipMsg")); @@ -1342,6 +1345,16 @@ void LLPanelPeople::onFriendsViewSortMenuItemClicked(const LLSD& userdata) mAllFriendList->showPermissions(show_permissions); mOnlineFriendList->showPermissions(show_permissions); } + else if (chosen_item == "view_usernames") + { + bool hide_usernames = !gSavedSettings.getBOOL("FriendsListHideUsernames"); + gSavedSettings.setBOOL("FriendsListHideUsernames", hide_usernames); + + mAllFriendList->setShowCompleteName(!hide_usernames); + mAllFriendList->handleDisplayNamesOptionChanged(); + mOnlineFriendList->setShowCompleteName(!hide_usernames); + mOnlineFriendList->handleDisplayNamesOptionChanged(); + } } void LLPanelPeople::onGroupsViewSortMenuItemClicked(const LLSD& userdata) @@ -1374,6 +1387,14 @@ void LLPanelPeople::onNearbyViewSortMenuItemClicked(const LLSD& userdata) { setSortOrder(mNearbyList, E_SORT_BY_DISTANCE); } + else if (chosen_item == "view_usernames") + { + bool hide_usernames = !gSavedSettings.getBOOL("NearbyListHideUsernames"); + gSavedSettings.setBOOL("NearbyListHideUsernames", hide_usernames); + + mNearbyList->setShowCompleteName(!hide_usernames); + mNearbyList->handleDisplayNamesOptionChanged(); + } } bool LLPanelPeople::onNearbyViewSortMenuItemCheck(const LLSD& userdata) diff --git a/indra/newview/skins/default/xui/en/menu_people_friends_view.xml b/indra/newview/skins/default/xui/en/menu_people_friends_view.xml index 8790fde7c5..b5a4b87acd 100755 --- a/indra/newview/skins/default/xui/en/menu_people_friends_view.xml +++ b/indra/newview/skins/default/xui/en/menu_people_friends_view.xml @@ -40,6 +40,14 @@ function="CheckControl" parameter="FriendsListShowPermissions" /> + + + + + + + + -- cgit v1.3 From e2ee3a151978d1783baecefd337530bd7fde7c9b Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 30 Jun 2016 16:47:12 +0300 Subject: MAINT-6534 Resetting scripts fails due to small timeout --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llcompilequeue.cpp | 11 ++++++----- 2 files changed, 17 insertions(+), 5 deletions(-) (limited to 'indra/newview/app_settings') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 4912f27e70..ce2d652c37 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3701,6 +3701,17 @@ Value 1 + QueueInventoryFetchTimeout + + Comment + Max time llcompilequeue will wait for inventory fetch to complete (in seconds) + Persist + 1 + Type + F32 + Value + 40.0 + FindLandArea Comment diff --git a/indra/newview/llcompilequeue.cpp b/indra/newview/llcompilequeue.cpp index ea2e284305..de7bc1e3c5 100644 --- a/indra/newview/llcompilequeue.cpp +++ b/indra/newview/llcompilequeue.cpp @@ -66,7 +66,6 @@ namespace { const std::string QUEUE_EVENTPUMP_NAME("ScriptActionQueue"); - const F32 TIMEOUT_INVENTORY_FETCH(5.0); class ObjectInventoryFetcher: public LLVOInventoryListener @@ -351,6 +350,7 @@ bool LLFloaterCompileQueue::processScript(LLHandle hfloat LLSD result; LLFloaterCompileQueue *that = hfloater.get(); bool monocompile = that->mMono; + F32 fetch_timeout = gSavedSettings.getF32("QueueInventoryFetchTimeout"); if (!that) return false; @@ -382,7 +382,7 @@ bool LLFloaterCompileQueue::processScript(LLHandle hfloat LLExperienceCache::instance().fetchAssociatedExperience(inventory->getParentUUID(), inventory->getUUID(), boost::bind(&LLFloaterCompileQueue::handleHTTPResponse, pump.getName(), _1)); - result = llcoro::suspendUntilEventOnWithTimeout(pump, TIMEOUT_INVENTORY_FETCH, + result = llcoro::suspendUntilEventOnWithTimeout(pump, fetch_timeout, LLSD().with("timeout", LLSD::Boolean(true))); that = hfloater.get(); @@ -429,7 +429,7 @@ bool LLFloaterCompileQueue::processScript(LLHandle hfloat &LLFloaterCompileQueue::handleScriptRetrieval, &userData); - result = llcoro::suspendUntilEventOnWithTimeout(pump, TIMEOUT_INVENTORY_FETCH, + result = llcoro::suspendUntilEventOnWithTimeout(pump, fetch_timeout, LLSD().with("timeout", LLSD::Boolean(true))); } @@ -485,7 +485,7 @@ bool LLFloaterCompileQueue::processScript(LLHandle hfloat LLViewerAssetUpload::EnqueueInventoryUpload(url, uploadInfo); } - result = llcoro::suspendUntilEventOnWithTimeout(pump, TIMEOUT_INVENTORY_FETCH, LLSD().with("timeout", LLSD::Boolean(true))); + result = llcoro::suspendUntilEventOnWithTimeout(pump, fetch_timeout, LLSD().with("timeout", LLSD::Boolean(true))); that = hfloater.get(); if (!that) @@ -735,6 +735,7 @@ void LLFloaterScriptQueue::objectScriptProcessingQueueCoro(std::string action, L LLCoros::set_consuming(true); LLFloaterScriptQueue * floater(NULL); LLEventMailDrop maildrop(QUEUE_EVENTPUMP_NAME, true); + F32 fetch_timeout = gSavedSettings.getF32("QueueInventoryFetchTimeout"); // floater = hfloater.get(); // floater->addProcessingMessage("Starting", @@ -756,7 +757,7 @@ void LLFloaterScriptQueue::objectScriptProcessingQueueCoro(std::string action, L fetcher->fetchInventory(); - LLSD result = llcoro::suspendUntilEventOnWithTimeout(maildrop, TIMEOUT_INVENTORY_FETCH, + LLSD result = llcoro::suspendUntilEventOnWithTimeout(maildrop, fetch_timeout, LLSD().with("timeout", LLSD::Boolean(true))); if (result.has("timeout") && result["timeout"].asBoolean()) -- cgit v1.3 From 554db00bdf20692f58c3eb42b83731011e9ad119 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Fri, 10 Jun 2016 18:04:16 +0300 Subject: MAINT-6475 Add menu item for changing sort priority --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/lloutfitgallery.cpp | 17 ++++++++++++++++- indra/newview/lloutfitgallery.h | 1 + indra/newview/lloutfitslist.cpp | 9 +++++++++ indra/newview/lloutfitslist.h | 1 + indra/newview/skins/default/xui/en/menu_outfit_gear.xml | 11 +++++++++++ 6 files changed, 49 insertions(+), 1 deletion(-) (limited to 'indra/newview/app_settings') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index a8d42be2a1..57a71ce93d 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -14592,6 +14592,17 @@ Value 1 + OutfitGallerySortByName + + Comment + Always sort outfits by name in Outfit Gallery + Persist + 1 + Type + Boolean + Value + 0 + OutfitOperationsTimeout Comment diff --git a/indra/newview/lloutfitgallery.cpp b/indra/newview/lloutfitgallery.cpp index 224f2b7f49..055d4dbe9f 100644 --- a/indra/newview/lloutfitgallery.cpp +++ b/indra/newview/lloutfitgallery.cpp @@ -46,6 +46,7 @@ #include "lllocalbitmaps.h" #include "llnotificationsutil.h" #include "lltexturectrl.h" +#include "llviewercontrol.h" #include "llviewermenufile.h" #include "llwearableitemslist.h" @@ -147,7 +148,8 @@ void LLOutfitGallery::updateRowsIfNeeded() bool compareGalleryItem(LLOutfitGalleryItem* item1, LLOutfitGalleryItem* item2) { - if((item1->isDefaultImage() && item2->isDefaultImage()) || (!item1->isDefaultImage() && !item2->isDefaultImage())) + if(gSavedSettings.getBOOL("OutfitGallerySortByName") || + ((item1->isDefaultImage() && item2->isDefaultImage()) || (!item1->isDefaultImage() && !item2->isDefaultImage()))) { std::string name1 = item1->getItemName(); std::string name2 = item2->getItemName(); @@ -847,6 +849,8 @@ void LLOutfitGalleryGearMenu::onUpdateItemsVisibility() mMenu->setItemVisible("select_photo", have_selection); mMenu->setItemVisible("take_snapshot", have_selection); mMenu->setItemVisible("remove_photo", !hasDefaultImage()); + mMenu->setItemVisible("sepatator3", TRUE); + mMenu->setItemVisible("sort_folders_by_name", TRUE); LLOutfitListGearMenuBase::onUpdateItemsVisibility(); } @@ -891,6 +895,17 @@ void LLOutfitGalleryGearMenu::onTakeSnapshot() } } +void LLOutfitGalleryGearMenu::onChangeSortOrder() +{ + bool sort_by_name = !gSavedSettings.getBOOL("OutfitGallerySortByName"); + gSavedSettings.setBOOL("OutfitGallerySortByName", sort_by_name); + LLOutfitGallery* gallery = dynamic_cast(mOutfitList); + if (gallery) + { + gallery->reArrangeRows(); + } +} + bool LLOutfitGalleryGearMenu::hasDefaultImage() { LLOutfitGallery* gallery = dynamic_cast(mOutfitList); diff --git a/indra/newview/lloutfitgallery.h b/indra/newview/lloutfitgallery.h index 19bfc10586..f5954d9cc2 100644 --- a/indra/newview/lloutfitgallery.h +++ b/indra/newview/lloutfitgallery.h @@ -233,6 +233,7 @@ private: /*virtual*/ void onSelectPhoto(); /*virtual*/ void onTakeSnapshot(); /*virtual*/ void onRemovePhoto(); + /*virtual*/ void onChangeSortOrder(); bool hasDefaultImage(); }; diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp index 2e6599090a..87c3c5042b 100644 --- a/indra/newview/lloutfitslist.cpp +++ b/indra/newview/lloutfitslist.cpp @@ -1094,6 +1094,7 @@ LLOutfitListGearMenuBase::LLOutfitListGearMenuBase(LLOutfitListBase* olist) registrar.add("Gear.SelectPhoto", boost::bind(&LLOutfitListGearMenuBase::onSelectPhoto, this)); registrar.add("Gear.TakeSnapshot", boost::bind(&LLOutfitListGearMenuBase::onTakeSnapshot, this)); registrar.add("Gear.RemovePhoto", boost::bind(&LLOutfitListGearMenuBase::onRemovePhoto, this)); + registrar.add("Gear.SortByName", boost::bind(&LLOutfitListGearMenuBase::onChangeSortOrder, this)); enable_registrar.add("Gear.OnEnable", boost::bind(&LLOutfitListGearMenuBase::onEnable, this, _2)); enable_registrar.add("Gear.OnVisible", boost::bind(&LLOutfitListGearMenuBase::onVisible, this, _2)); @@ -1246,6 +1247,12 @@ void LLOutfitListGearMenuBase::onRemovePhoto() { } + +void LLOutfitListGearMenuBase::onChangeSortOrder() +{ + +} + LLOutfitListGearMenu::LLOutfitListGearMenu(LLOutfitListBase* olist) : LLOutfitListGearMenuBase(olist) {} @@ -1262,6 +1269,8 @@ void LLOutfitListGearMenu::onUpdateItemsVisibility() mMenu->setItemVisible("select_photo", FALSE); mMenu->setItemVisible("take_snapshot", FALSE); mMenu->setItemVisible("remove_photo", FALSE); + mMenu->setItemVisible("sepatator3", FALSE); + mMenu->setItemVisible("sort_folders_by_name", FALSE); LLOutfitListGearMenuBase::onUpdateItemsVisibility(); } diff --git a/indra/newview/lloutfitslist.h b/indra/newview/lloutfitslist.h index c4dd2cd075..81be8de94f 100644 --- a/indra/newview/lloutfitslist.h +++ b/indra/newview/lloutfitslist.h @@ -167,6 +167,7 @@ protected: virtual void onSelectPhoto(); virtual void onTakeSnapshot(); virtual void onRemovePhoto(); + virtual void onChangeSortOrder(); const LLUUID& getSelectedOutfitID(); diff --git a/indra/newview/skins/default/xui/en/menu_outfit_gear.xml b/indra/newview/skins/default/xui/en/menu_outfit_gear.xml index 6b8a784560..7faa4f3d71 100644 --- a/indra/newview/skins/default/xui/en/menu_outfit_gear.xml +++ b/indra/newview/skins/default/xui/en/menu_outfit_gear.xml @@ -261,4 +261,15 @@ function="Gear.OnVisible" parameter="delete" /> + + + + + -- cgit v1.3 From 8d542a46c7b1c5eb1817076348c0793fa6d3f617 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Fri, 8 Jul 2016 18:50:19 +0300 Subject: MAINT-6534 Fixed the LLSD validation failure --- indra/newview/app_settings/settings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/app_settings') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index ce2d652c37..aaf41b68b4 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3710,7 +3710,7 @@ Type F32 Value - 40.0 + 40.0 FindLandArea -- cgit v1.3 From a3f63bce3c5f45e2275980363bbb598cd6861bc8 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 11 Jul 2016 16:23:18 +0300 Subject: MAINT-6534 Resetting scripts via the build menu no longer works on many scripted objects --- indra/newview/app_settings/settings.xml | 2 +- indra/newview/llcompilequeue.cpp | 60 ++++++++++++++++------ indra/newview/llcompilequeue.h | 13 +++-- indra/newview/llviewermenu.cpp | 13 +++-- .../skins/default/xui/en/floater_script_queue.xml | 8 +++ 5 files changed, 71 insertions(+), 25 deletions(-) (limited to 'indra/newview/app_settings') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index aaf41b68b4..6ccf89eabe 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3710,7 +3710,7 @@ Type F32 Value - 40.0 + 300.0 FindLandArea diff --git a/indra/newview/llcompilequeue.cpp b/indra/newview/llcompilequeue.cpp index de7bc1e3c5..7721e67290 100644 --- a/indra/newview/llcompilequeue.cpp +++ b/indra/newview/llcompilequeue.cpp @@ -207,9 +207,10 @@ void LLFloaterScriptQueue::onCloseBtn(void* user_data) self->closeFloater(); } -void LLFloaterScriptQueue::addObject(const LLUUID& id) +void LLFloaterScriptQueue::addObject(const LLUUID& id, std::string name) { - mObjectIDs.insert(id); + ObjectData obj = { id, name }; + mObjectList.push_back(obj); } BOOL LLFloaterScriptQueue::start() @@ -218,7 +219,7 @@ BOOL LLFloaterScriptQueue::start() LLStringUtil::format_map_t args; args["[START]"] = mStartString; - args["[COUNT]"] = llformat ("%d", mObjectIDs.size()); + args["[COUNT]"] = llformat ("%d", mObjectList.size()); buffer = getString ("Starting", args); getChild("queue output")->addSimpleElement(buffer, ADD_BOTTOM); @@ -241,7 +242,7 @@ void LLFloaterScriptQueue::addStringMessage(const std::string &message) BOOL LLFloaterScriptQueue::isDone() const { - return (mCurrentObjectID.isNull() && (mObjectIDs.size() == 0)); + return (mCurrentObjectID.isNull() && (mObjectList.size() == 0)); } ///---------------------------------------------------------------------------- @@ -339,7 +340,7 @@ void LLFloaterCompileQueue::processExperienceIdResults(LLSD result, LLUUID paren LLCoros::instance().launch("ScriptQueueCompile", boost::bind(LLFloaterScriptQueue::objectScriptProcessingQueueCoro, queue->mStartString, hFloater, - queue->mObjectIDs, + queue->mObjectList, fn)); } @@ -393,7 +394,9 @@ bool LLFloaterCompileQueue::processScript(LLHandle hfloat if (result.has("timeout") && result["timeout"].asBoolean()) { - std::string buffer = "Timeout: " + inventory->getName(); + LLStringUtil::format_map_t args; + args["[OBJECT_NAME]"] = inventory->getName(); + std::string buffer = that->getString("Timeout", args); that->addStringMessage(buffer); return true; } @@ -443,7 +446,9 @@ bool LLFloaterCompileQueue::processScript(LLHandle hfloat { if (result.has("timeout") && result["timeout"].asBoolean()) { - std::string buffer = "Timeout: " + inventory->getName(); + LLStringUtil::format_map_t args; + args["[OBJECT_NAME]"] = inventory->getName(); + std::string buffer = that->getString("Timeout", args); that->addStringMessage(buffer); return true; } @@ -497,7 +502,9 @@ bool LLFloaterCompileQueue::processScript(LLHandle hfloat { if (result.has("timeout") && result["timeout"].asBoolean()) { - std::string buffer = "Timeout: " + inventory->getName(); + LLStringUtil::format_map_t args; + args["[OBJECT_NAME]"] = inventory->getName(); + std::string buffer = that->getString("Timeout", args); that->addStringMessage(buffer); return true; } @@ -601,7 +608,7 @@ bool LLFloaterResetQueue::startQueue() LLCoros::instance().launch("ScriptResetQueue", boost::bind(LLFloaterScriptQueue::objectScriptProcessingQueueCoro, mStartString, getDerivedHandle(), - mObjectIDs, + mObjectList, fn)); return true; @@ -655,7 +662,7 @@ bool LLFloaterRunQueue::startQueue() LLCoros::instance().launch("ScriptRunQueue", boost::bind(LLFloaterScriptQueue::objectScriptProcessingQueueCoro, mStartString, hFloater, - mObjectIDs, + mObjectList, fn)); return true; @@ -710,7 +717,7 @@ bool LLFloaterNotRunQueue::startQueue() LLCoros::instance().launch("ScriptQueueNotRun", boost::bind(LLFloaterScriptQueue::objectScriptProcessingQueueCoro, mStartString, hFloater, - mObjectIDs, + mObjectList, fn)); return true; @@ -730,7 +737,7 @@ void ObjectInventoryFetcher::inventoryChanged(LLViewerObject* object, } void LLFloaterScriptQueue::objectScriptProcessingQueueCoro(std::string action, LLHandle hfloater, - uuid_list_t objectList, fnQueueAction_t func) + object_data_list_t objectList, fnQueueAction_t func) { LLCoros::set_consuming(true); LLFloaterScriptQueue * floater(NULL); @@ -744,12 +751,13 @@ void LLFloaterScriptQueue::objectScriptProcessingQueueCoro(std::string action, L // .with("[COUNT]", LLSD::Integer(objectList.size()))); // floater = NULL; - for (uuid_list_t::iterator itObj(objectList.begin()); (itObj != objectList.end()); ++itObj) + for (object_data_list_t::iterator itObj(objectList.begin()); (itObj != objectList.end()); ++itObj) { bool firstForObject = true; - LL_INFOS("SCRIPTQ") << "Next object in queue with ID=" << (*itObj).asString() << LL_ENDL; + LLUUID object_id = (*itObj).mObjectId; + LL_INFOS("SCRIPTQ") << "Next object in queue with ID=" << object_id.asString() << LL_ENDL; - LLPointer obj = gObjectList.findObject(*itObj); + LLPointer obj = gObjectList.findObject(object_id); LLInventoryObject::object_list_t inventory; if (obj) { @@ -757,13 +765,31 @@ void LLFloaterScriptQueue::objectScriptProcessingQueueCoro(std::string action, L fetcher->fetchInventory(); + floater = hfloater.get(); + if (floater) + { + LLStringUtil::format_map_t args; + args["[OBJECT_NAME]"] = (*itObj).mObjectName; + floater->addStringMessage(floater->getString("LoadingObjInv", args)); + } + LLSD result = llcoro::suspendUntilEventOnWithTimeout(maildrop, fetch_timeout, LLSD().with("timeout", LLSD::Boolean(true))); if (result.has("timeout") && result["timeout"].asBoolean()) { - LL_WARNS("SCRIPTQ") << "Unable to retrieve inventory for object " << (*itObj).asString() << + LL_WARNS("SCRIPTQ") << "Unable to retrieve inventory for object " << object_id.asString() << ". Skipping to next object." << LL_ENDL; + + // floater could have been closed + floater = hfloater.get(); + if (floater) + { + LLStringUtil::format_map_t args; + args["[OBJECT_NAME]"] = (*itObj).mObjectName; + floater->addStringMessage(floater->getString("Timeout", args)); + } + continue; } @@ -771,7 +797,7 @@ void LLFloaterScriptQueue::objectScriptProcessingQueueCoro(std::string action, L } else { - LL_WARNS("SCRIPTQ") << "Unable to retrieve object with ID of " << (*itObj) << + LL_WARNS("SCRIPTQ") << "Unable to retrieve object with ID of " << object_id << ". Skipping to next." << LL_ENDL; continue; } diff --git a/indra/newview/llcompilequeue.h b/indra/newview/llcompilequeue.h index 271ac5e05d..1b3d8f83a0 100644 --- a/indra/newview/llcompilequeue.h +++ b/indra/newview/llcompilequeue.h @@ -61,7 +61,7 @@ public: void setMono(bool mono) { mMono = mono; } // addObject() accepts an object id. - void addObject(const LLUUID& id); + void addObject(const LLUUID& id, std::string name); // start() returns TRUE if the queue has started, otherwise FALSE. BOOL start(); @@ -87,7 +87,14 @@ protected: LLButton* mCloseBtn; // Object Queue - uuid_list_t mObjectIDs; + struct ObjectData + { + LLUUID mObjectId; + std::string mObjectName; + }; + typedef std::vector object_data_list_t; + + object_data_list_t mObjectList; LLUUID mCurrentObjectID; bool mDone; @@ -95,7 +102,7 @@ protected: bool mMono; typedef boost::function &, LLInventoryObject*, LLEventPump &)> fnQueueAction_t; - static void objectScriptProcessingQueueCoro(std::string action, LLHandle hfloater, uuid_list_t objectList, fnQueueAction_t func); + static void objectScriptProcessingQueueCoro(std::string action, LLHandle hfloater, object_data_list_t objectList, fnQueueAction_t func); }; diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 99a9ed1d75..f5b06fbd19 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -6986,20 +6986,25 @@ class LLAvatarCall : public view_listener_t namespace { - struct QueueObjects : public LLSelectedObjectFunctor + struct QueueObjects : public LLSelectedNodeFunctor { BOOL scripted; BOOL modifiable; LLFloaterScriptQueue* mQueue; QueueObjects(LLFloaterScriptQueue* q) : mQueue(q), scripted(FALSE), modifiable(FALSE) {} - virtual bool apply(LLViewerObject* obj) + virtual bool apply(LLSelectNode* node) { + LLViewerObject* obj = node->getObject(); + if (!obj) + { + return true; + } scripted = obj->flagScripted(); modifiable = obj->permModify(); if( scripted && modifiable ) { - mQueue->addObject(obj->getID()); + mQueue->addObject(obj->getID(), node->mName); return false; } else @@ -7015,7 +7020,7 @@ void queue_actions(LLFloaterScriptQueue* q, const std::string& msg) QueueObjects func(q); LLSelectMgr *mgr = LLSelectMgr::getInstance(); LLObjectSelectionHandle selectHandle = mgr->getSelection(); - bool fail = selectHandle->applyToObjects(&func); + bool fail = selectHandle->applyToNodes(&func); if(fail) { if ( !func.scripted ) diff --git a/indra/newview/skins/default/xui/en/floater_script_queue.xml b/indra/newview/skins/default/xui/en/floater_script_queue.xml index f4aca7bb3d..0982683a7f 100644 --- a/indra/newview/skins/default/xui/en/floater_script_queue.xml +++ b/indra/newview/skins/default/xui/en/floater_script_queue.xml @@ -29,6 +29,14 @@ name="NotRunning"> Not running + + Timeout: [OBJECT_NAME] + + + Loading inventory for: [OBJECT_NAME] +