From 2474385a2a447a9e9d05bb170c6f7a4be8d43249 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Fri, 22 Feb 2013 11:19:51 +0100 Subject: STORM-1931: Added option to disable chat animations (say/whisper/shout) --- indra/newview/app_settings/settings.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'indra/newview/app_settings') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 79376f7467..6436f11967 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -6845,6 +6845,17 @@ Value 90.0 + PlayChatAnim + + Comment + Your avatar plays the chat animation whenever you say, shout or whisper something in nearby chat + Persist + 1 + Type + Boolean + Value + 1 + PlayTypingAnim Comment -- cgit v1.3 From 61f49cdee48de0d5fa6cda7080bcfce0b449f115 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Fri, 22 Mar 2013 09:57:52 -0400 Subject: correct validity errors in llsd files --- indra/newview/app_settings/settings.xml | 2 +- indra/newview/app_settings/settings_minimal.xml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'indra/newview/app_settings') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 2e91d10cd3..a9a6707a54 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -10853,7 +10853,7 @@ Type F32 Value - 0.0 + 0.0 TextureFetchUpdateSkipLowPriority diff --git a/indra/newview/app_settings/settings_minimal.xml b/indra/newview/app_settings/settings_minimal.xml index 01a70f2671..863b5b0435 100644 --- a/indra/newview/app_settings/settings_minimal.xml +++ b/indra/newview/app_settings/settings_minimal.xml @@ -1 +1,2 @@ - \ No newline at end of file + + -- cgit v1.3 From 697bb80968e1fc539a023284ad5135e15d38d150 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Fri, 22 Mar 2013 09:57:52 -0400 Subject: correct validity errors in llsd files --- indra/newview/app_settings/settings.xml | 3 ++- indra/newview/app_settings/settings_minimal.xml | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'indra/newview/app_settings') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 2e91d10cd3..b2c0b030b0 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -10853,7 +10853,7 @@ Type F32 Value - 0.0 + 0.0 TextureFetchUpdateSkipLowPriority @@ -12492,6 +12492,7 @@ Type LLSD Value + VFSOldSize diff --git a/indra/newview/app_settings/settings_minimal.xml b/indra/newview/app_settings/settings_minimal.xml index 01a70f2671..e660c1a33b 100644 --- a/indra/newview/app_settings/settings_minimal.xml +++ b/indra/newview/app_settings/settings_minimal.xml @@ -1 +1,4 @@ - \ No newline at end of file + + + + -- cgit v1.3 From 03ad10d258095487d6ae8f26634932bc832f10df Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Thu, 18 Apr 2013 19:46:08 -0700 Subject: CHUI-849 : WIP : Filter limit on time instead of number of items --- indra/llui/llfolderview.cpp | 15 +++++++++++-- indra/llui/llfolderviewitem.cpp | 2 +- indra/llui/llfolderviewmodel.cpp | 3 ++- indra/llui/llfolderviewmodel.h | 7 ++++++ indra/newview/app_settings/settings.xml | 11 ++++++++++ indra/newview/llconversationmodel.h | 6 ++++- indra/newview/llfolderviewmodelinventory.cpp | 33 +++++++++++++++------------- indra/newview/llinventoryfilter.cpp | 20 +++++++++++++++++ indra/newview/llinventoryfilter.h | 9 ++++++++ 9 files changed, 86 insertions(+), 20 deletions(-) (limited to 'indra/newview/app_settings') diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index c9e88ab72f..f3da71fc15 100644 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -325,9 +325,19 @@ void LLFolderView::filter( LLFolderViewFilter& filter ) { // Entry point of inventory filtering (CHUI-849) LLFastTimer t2(FTM_FILTER); - filter.setFilterCount(llclamp(LLUI::sSettingGroups["config"]->getS32("FilterItemsPerFrame"), 1, 5000)); + //filter.setFilterCount(llclamp(LLUI::sSettingGroups["config"]->getS32("FilterItemsPerFrame"), 1, 5000)); + filter.resetTime(llclamp(LLUI::sSettingGroups["config"]->getS32("FilterItemsMaxTimePerFrame"), 1, 1000)); // Note: we filter the model, not the view getViewModelItem()->filter(filter); + // Test the filter state + if (filter.isTimedOut()) + { + llinfos << "Merov : filter of " << mParentPanel->getName() << " not finished, count = " << filter.getFilterCount() << llendl; + } + else if (filter.getFilterCount() != 0) + { + llinfos << "Merov : last filter of " << mParentPanel->getName() << " done! count = " << filter.getFilterCount() << llendl; + } } void LLFolderView::reshape(S32 width, S32 height, BOOL called_from_parent) @@ -1614,7 +1624,8 @@ void LLFolderView::update() // Clear the modified setting on the filter only if the filter count is non-zero after running the filter process // Note: if the filter count is zero, that means the filter exhausted its count per frame and halted before completing the entire set of items - if (getFolderViewModel()->getFilter().isModified() && (getFolderViewModel()->getFilter().getFilterCount() > 0)) + //if (getFolderViewModel()->getFilter().isModified() && (getFolderViewModel()->getFilter().getFilterCount() > 0)) + if (getFolderViewModel()->getFilter().isModified() && (!getFolderViewModel()->getFilter().isTimedOut())) { getFolderViewModel()->getFilter().clearModified(); } diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp index 96961e7a4f..6c147ccc12 100755 --- a/indra/llui/llfolderviewitem.cpp +++ b/indra/llui/llfolderviewitem.cpp @@ -949,7 +949,7 @@ static LLFastTimer::DeclareTimer FTM_ARRANGE("Arrange"); // * Turn widgets visible/invisible according to their model filtering state // * Takes animation state into account for opening/closing of folders (this makes widgets visible/invisible) // * Reposition visible widgets so that they line up correctly with no gap -// * Compute the width and height of the cuurent folder and its children +// * Compute the width and height of the current folder and its children // * Makes sure that this view and its children are the right size S32 LLFolderViewFolder::arrange( S32* width, S32* height ) { diff --git a/indra/llui/llfolderviewmodel.cpp b/indra/llui/llfolderviewmodel.cpp index 3593804554..b5622756fe 100644 --- a/indra/llui/llfolderviewmodel.cpp +++ b/indra/llui/llfolderviewmodel.cpp @@ -48,7 +48,8 @@ std::string LLFolderViewModelCommon::getStatusText() void LLFolderViewModelCommon::filter() { - getFilter().setFilterCount(llclamp(LLUI::sSettingGroups["config"]->getS32("FilterItemsPerFrame"), 1, 5000)); + //getFilter().setFilterCount(llclamp(LLUI::sSettingGroups["config"]->getS32("FilterItemsPerFrame"), 1, 5000)); + getFilter().resetTime(llclamp(LLUI::sSettingGroups["config"]->getS32("FilterItemsMaxTimePerFrame"), 1, 1000)); mFolderView->getViewModelItem()->filter(getFilter()); } diff --git a/indra/llui/llfolderviewmodel.h b/indra/llui/llfolderviewmodel.h index dbcbb0edeb..64c00c782e 100644 --- a/indra/llui/llfolderviewmodel.h +++ b/indra/llui/llfolderviewmodel.h @@ -93,6 +93,13 @@ public: virtual S32 getFilterCount() const = 0; virtual void decrementFilterCount() = 0; + // +-------------------------------------------------------------------+ + // + Time + // +-------------------------------------------------------------------+ + virtual void resetTime(S32 timeout) = 0; + virtual bool isTimedOut() = 0; + virtual void incrementFilterCount() = 0; // Temp! + // +-------------------------------------------------------------------+ // + Default // +-------------------------------------------------------------------+ diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 4c305e1d60..a28c6366c0 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3402,6 +3402,17 @@ Value 500 + FilterItemsMaxTimePerFrame + + Comment + Max time devoted to items filtering per frame (in milliseconds) + Persist + 1 + Type + S32 + Value + 100 + FindLandArea Comment diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index 8766585049..5c942b1c40 100755 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -256,7 +256,11 @@ public: void setFilterCount(S32 count) { } S32 getFilterCount() const { return 0; } void decrementFilterCount() { } - + + void resetTime(S32 timeout) { } + bool isTimedOut() { return false; } + void incrementFilterCount() { } // Temp! + bool isDefault() const { return true; } bool isNotDefault() const { return false; } void markDefault() { } diff --git a/indra/newview/llfolderviewmodelinventory.cpp b/indra/newview/llfolderviewmodelinventory.cpp index 1894314513..ce957edcbd 100644 --- a/indra/newview/llfolderviewmodelinventory.cpp +++ b/indra/newview/llfolderviewmodelinventory.cpp @@ -153,11 +153,11 @@ bool LLFolderViewModelItemInventory::filterChildItem( LLFolderViewModelItem* ite { S32 filter_generation = filter.getCurrentGeneration(); - bool new_filtered_item = false; + bool continue_filtering = true; if (item->getLastFilterGeneration() < filter_generation) { // Recursive application of the filter for child items (CHUI-849) - new_filtered_item = item->filter( filter ); + continue_filtering = item->filter( filter ); } // Update latest generation to pass filter in parent and propagate up to root @@ -172,14 +172,13 @@ bool LLFolderViewModelItemInventory::filterChildItem( LLFolderViewModelItem* ite } } - return new_filtered_item; + return continue_filtering; } bool LLFolderViewModelItemInventory::filter( LLFolderViewFilter& filter) { const S32 filter_generation = filter.getCurrentGeneration(); const S32 must_pass_generation = filter.getFirstRequiredGeneration(); - const S32 sufficient_pass_generation = filter.getFirstSuccessGeneration(); if (getLastFilterGeneration() >= must_pass_generation && getLastFolderFilterGeneration() >= must_pass_generation @@ -189,9 +188,11 @@ bool LLFolderViewModelItemInventory::filter( LLFolderViewFilter& filter) // go ahead and flag this item as not pass setPassedFilter(false, filter_generation); setPassedFolderFilter(false, filter_generation); - return false; + return true; } + /* + const S32 sufficient_pass_generation = filter.getFirstSuccessGeneration(); if (getLastFilterGeneration() >= sufficient_pass_generation && getLastFolderFilterGeneration() >= sufficient_pass_generation && passedFilter(sufficient_pass_generation)) @@ -202,23 +203,23 @@ bool LLFolderViewModelItemInventory::filter( LLFolderViewFilter& filter) setPassedFolderFilter(true, filter_generation); return true; } + */ const bool passed_filter_folder = (getInventoryType() == LLInventoryType::IT_CATEGORY) ? filter.checkFolder(this) : true; setPassedFolderFilter(passed_filter_folder, filter_generation); - bool new_filtered_item = false; + bool continue_filtering = true; if (!mChildren.empty() && (getLastFilterGeneration() < must_pass_generation // haven't checked descendants against minimum required generation to pass || descendantsPassedFilter(must_pass_generation))) // or at least one descendant has passed the minimum requirement { // now query children - for (child_list_t::iterator iter = mChildren.begin(), end_iter = mChildren.end(); - iter != end_iter && filter.getFilterCount() > 0; - ++iter) + for (child_list_t::iterator iter = mChildren.begin(), end_iter = mChildren.end(); iter != end_iter; ++iter) { - new_filtered_item |= filterChildItem((*iter), filter); - if (filter.getFilterCount() <= 0) + continue_filtering = filterChildItem((*iter), filter); + //if (filter.getFilterCount() <= 0) + if (!continue_filtering) { break; } @@ -226,15 +227,17 @@ bool LLFolderViewModelItemInventory::filter( LLFolderViewFilter& filter) } // If we didn't use all filter iterations that means we filtered all of our descendants so filter ourselves now - if (filter.getFilterCount() > 0) + //if (filter.getFilterCount() > 0) + if (continue_filtering) { // This is where filter count is hit and filter check on the item done (CHUI-849) - filter.decrementFilterCount(); + //filter.decrementFilterCount(); + filter.incrementFilterCount(); // Temp const bool passed_filter = filter.check(this); setPassedFilter(passed_filter, filter_generation, filter.getStringMatchOffset(this), filter.getFilterStringSize()); - new_filtered_item |= passed_filter; + continue_filtering = !filter.isTimedOut(); } - return new_filtered_item; + return continue_filtering; } LLFolderViewModelInventory* LLInventoryPanel::getFolderViewModel() diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index b0c75cb176..3b712925e1 100644 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -1026,6 +1026,26 @@ void LLInventoryFilter::decrementFilterCount() mFilterCount--; } +void LLInventoryFilter::incrementFilterCount() +{ + mFilterCount++; +} + +bool LLInventoryFilter::isTimedOut() +{ + return mFilterTime.hasExpired(); +} + +void LLInventoryFilter::resetTime(S32 timeout) +{ + mFilterCount = 0; + mFilterTime.reset(); + F32 time_in_sec = (F32)(timeout)/1000.0; + mFilterTime.setTimerExpirySec(time_in_sec); +} + + + S32 LLInventoryFilter::getCurrentGeneration() const { return mCurrentGeneration; diff --git a/indra/newview/llinventoryfilter.h b/indra/newview/llinventoryfilter.h index ac6be196ef..034fcf4a62 100644 --- a/indra/newview/llinventoryfilter.h +++ b/indra/newview/llinventoryfilter.h @@ -221,6 +221,13 @@ public: S32 getFilterCount() const; void decrementFilterCount(); + // +-------------------------------------------------------------------+ + // + Time + // +-------------------------------------------------------------------+ + void resetTime(S32 timeout); + bool isTimedOut(); + void incrementFilterCount(); // Temp! + // +-------------------------------------------------------------------+ // + Default // +-------------------------------------------------------------------+ @@ -271,6 +278,8 @@ private: S32 mFilterCount; EFilterModified mFilterModified; + LLTimer mFilterTime; + std::string mFilterText; std::string mEmptyLookupMessage; }; -- cgit v1.3 From 2cc1fb250f78df3a4b8f33b13b30defef7efb78a Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Fri, 19 Apr 2013 16:51:44 -0700 Subject: CHUI-849 : Use a time limit for filtering instead of number limit, use a different limit for visible and unvisible lists --- indra/llui/llfolderview.cpp | 18 ++++-------------- indra/llui/llfolderviewmodel.cpp | 3 +-- indra/llui/llfolderviewmodel.h | 8 -------- indra/newview/app_settings/settings.xml | 24 ++++++++++++------------ indra/newview/llconversationmodel.h | 5 ----- indra/newview/llfolderviewmodelinventory.cpp | 9 +++------ indra/newview/llinventoryfilter.cpp | 27 ++------------------------- indra/newview/llinventoryfilter.h | 10 ---------- 8 files changed, 22 insertions(+), 82 deletions(-) (limited to 'indra/newview/app_settings') diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index f3da71fc15..bf4d5ae1f9 100644 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -325,19 +325,10 @@ void LLFolderView::filter( LLFolderViewFilter& filter ) { // Entry point of inventory filtering (CHUI-849) LLFastTimer t2(FTM_FILTER); - //filter.setFilterCount(llclamp(LLUI::sSettingGroups["config"]->getS32("FilterItemsPerFrame"), 1, 5000)); - filter.resetTime(llclamp(LLUI::sSettingGroups["config"]->getS32("FilterItemsMaxTimePerFrame"), 1, 1000)); + filter.resetTime(llclamp(LLUI::sSettingGroups["config"]->getS32(mParentPanel->getVisible() ? "FilterItemsMaxTimePerFrameVisible" : "FilterItemsMaxTimePerFrameUnvisible"), 1, 100)); + // Note: we filter the model, not the view getViewModelItem()->filter(filter); - // Test the filter state - if (filter.isTimedOut()) - { - llinfos << "Merov : filter of " << mParentPanel->getName() << " not finished, count = " << filter.getFilterCount() << llendl; - } - else if (filter.getFilterCount() != 0) - { - llinfos << "Merov : last filter of " << mParentPanel->getName() << " done! count = " << filter.getFilterCount() << llendl; - } } void LLFolderView::reshape(S32 width, S32 height, BOOL called_from_parent) @@ -1622,9 +1613,8 @@ void LLFolderView::update() // Filter to determine visibility before arranging filter(getFolderViewModel()->getFilter()); - // Clear the modified setting on the filter only if the filter count is non-zero after running the filter process - // Note: if the filter count is zero, that means the filter exhausted its count per frame and halted before completing the entire set of items - //if (getFolderViewModel()->getFilter().isModified() && (getFolderViewModel()->getFilter().getFilterCount() > 0)) + // Clear the modified setting on the filter only if the filter finished after running the filter process + // Note: if the filter count has timed out, that means the filter halted before completing the entire set of items if (getFolderViewModel()->getFilter().isModified() && (!getFolderViewModel()->getFilter().isTimedOut())) { getFolderViewModel()->getFilter().clearModified(); diff --git a/indra/llui/llfolderviewmodel.cpp b/indra/llui/llfolderviewmodel.cpp index b5622756fe..3363dc5316 100644 --- a/indra/llui/llfolderviewmodel.cpp +++ b/indra/llui/llfolderviewmodel.cpp @@ -48,8 +48,7 @@ std::string LLFolderViewModelCommon::getStatusText() void LLFolderViewModelCommon::filter() { - //getFilter().setFilterCount(llclamp(LLUI::sSettingGroups["config"]->getS32("FilterItemsPerFrame"), 1, 5000)); - getFilter().resetTime(llclamp(LLUI::sSettingGroups["config"]->getS32("FilterItemsMaxTimePerFrame"), 1, 1000)); + getFilter().resetTime(llclamp(LLUI::sSettingGroups["config"]->getS32("FilterItemsMaxTimePerFrameVisible"), 1, 100)); mFolderView->getViewModelItem()->filter(getFilter()); } diff --git a/indra/llui/llfolderviewmodel.h b/indra/llui/llfolderviewmodel.h index 64c00c782e..b1bcc8bbb4 100644 --- a/indra/llui/llfolderviewmodel.h +++ b/indra/llui/llfolderviewmodel.h @@ -86,19 +86,11 @@ public: //RN: this is public to allow system to externally force a global refilter virtual void setModified(EFilterModified behavior = FILTER_RESTART) = 0; - // +-------------------------------------------------------------------+ - // + Count - // +-------------------------------------------------------------------+ - virtual void setFilterCount(S32 count) = 0; - virtual S32 getFilterCount() const = 0; - virtual void decrementFilterCount() = 0; - // +-------------------------------------------------------------------+ // + Time // +-------------------------------------------------------------------+ virtual void resetTime(S32 timeout) = 0; virtual bool isTimedOut() = 0; - virtual void incrementFilterCount() = 0; // Temp! // +-------------------------------------------------------------------+ // + Default diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index a28c6366c0..cd2b15ef2b 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3391,27 +3391,27 @@ Value 10.0 - FilterItemsPerFrame + FilterItemsMaxTimePerFrameVisible - Comment - Maximum number of inventory items to match against search filter every frame (lower to increase framerate while searching, higher to improve search speed) - Persist - 1 - Type - S32 - Value - 500 + Comment + Max time devoted to items filtering per frame for visible inventory listings (in milliseconds) + Persist + 1 + Type + S32 + Value + 10 - FilterItemsMaxTimePerFrame + FilterItemsMaxTimePerFrameUnvisible Comment - Max time devoted to items filtering per frame (in milliseconds) + Max time devoted to items filtering per frame for non visible inventory listings (in milliseconds) Persist 1 Type S32 Value - 100 + 1 FindLandArea diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index 5c942b1c40..d8cdcdfc97 100755 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -252,14 +252,9 @@ public: const std::string& getName() const { return mEmpty; } const std::string& getFilterText() { return mEmpty; } void setModified(EFilterModified behavior = FILTER_RESTART) { } - - void setFilterCount(S32 count) { } - S32 getFilterCount() const { return 0; } - void decrementFilterCount() { } void resetTime(S32 timeout) { } bool isTimedOut() { return false; } - void incrementFilterCount() { } // Temp! bool isDefault() const { return true; } bool isNotDefault() const { return false; } diff --git a/indra/newview/llfolderviewmodelinventory.cpp b/indra/newview/llfolderviewmodelinventory.cpp index ce957edcbd..4a51d26693 100644 --- a/indra/newview/llfolderviewmodelinventory.cpp +++ b/indra/newview/llfolderviewmodelinventory.cpp @@ -191,6 +191,7 @@ bool LLFolderViewModelItemInventory::filter( LLFolderViewFilter& filter) return true; } + // *TODO : Revise the logic for fast pass on less restrictive filter case /* const S32 sufficient_pass_generation = filter.getFirstSuccessGeneration(); if (getLastFilterGeneration() >= sufficient_pass_generation @@ -218,7 +219,6 @@ bool LLFolderViewModelItemInventory::filter( LLFolderViewFilter& filter) for (child_list_t::iterator iter = mChildren.begin(), end_iter = mChildren.end(); iter != end_iter; ++iter) { continue_filtering = filterChildItem((*iter), filter); - //if (filter.getFilterCount() <= 0) if (!continue_filtering) { break; @@ -226,13 +226,10 @@ bool LLFolderViewModelItemInventory::filter( LLFolderViewFilter& filter) } } - // If we didn't use all filter iterations that means we filtered all of our descendants so filter ourselves now - //if (filter.getFilterCount() > 0) + // If we didn't use all the filter time that means we filtered all of our descendants so we can filter ourselves now if (continue_filtering) { - // This is where filter count is hit and filter check on the item done (CHUI-849) - //filter.decrementFilterCount(); - filter.incrementFilterCount(); // Temp + // This is where filter check on the item done (CHUI-849) const bool passed_filter = filter.check(this); setPassedFilter(passed_filter, filter_generation, filter.getStringMatchOffset(this), filter.getFilterStringSize()); continue_filtering = !filter.isTimedOut(); diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index 3b712925e1..3c6974cf6d 100644 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -70,8 +70,7 @@ LLInventoryFilter::LLInventoryFilter(const Params& p) mFilterSubString(p.substring), mCurrentGeneration(0), mFirstRequiredGeneration(0), - mFirstSuccessGeneration(0), - mFilterCount(0) + mFirstSuccessGeneration(0) { // copy mFilterOps into mDefaultFilterOps markDefault(); @@ -1012,25 +1011,6 @@ LLInventoryFilter::EFolderShow LLInventoryFilter::getShowFolderState() const return mFilterOps.mShowFolderState; } -void LLInventoryFilter::setFilterCount(S32 count) -{ - mFilterCount = count; -} -S32 LLInventoryFilter::getFilterCount() const -{ - return mFilterCount; -} - -void LLInventoryFilter::decrementFilterCount() -{ - mFilterCount--; -} - -void LLInventoryFilter::incrementFilterCount() -{ - mFilterCount++; -} - bool LLInventoryFilter::isTimedOut() { return mFilterTime.hasExpired(); @@ -1038,15 +1018,12 @@ bool LLInventoryFilter::isTimedOut() void LLInventoryFilter::resetTime(S32 timeout) { - mFilterCount = 0; mFilterTime.reset(); F32 time_in_sec = (F32)(timeout)/1000.0; mFilterTime.setTimerExpirySec(time_in_sec); } - - -S32 LLInventoryFilter::getCurrentGeneration() const +S32 LLInventoryFilter::getCurrentGeneration() const { return mCurrentGeneration; } diff --git a/indra/newview/llinventoryfilter.h b/indra/newview/llinventoryfilter.h index 034fcf4a62..ce516af0b9 100644 --- a/indra/newview/llinventoryfilter.h +++ b/indra/newview/llinventoryfilter.h @@ -214,19 +214,11 @@ public: //RN: this is public to allow system to externally force a global refilter void setModified(EFilterModified behavior = FILTER_RESTART); - // +-------------------------------------------------------------------+ - // + Count - // +-------------------------------------------------------------------+ - void setFilterCount(S32 count); - S32 getFilterCount() const; - void decrementFilterCount(); - // +-------------------------------------------------------------------+ // + Time // +-------------------------------------------------------------------+ void resetTime(S32 timeout); bool isTimedOut(); - void incrementFilterCount(); // Temp! // +-------------------------------------------------------------------+ // + Default @@ -275,9 +267,7 @@ private: S32 mFirstRequiredGeneration; S32 mFirstSuccessGeneration; - S32 mFilterCount; EFilterModified mFilterModified; - LLTimer mFilterTime; std::string mFilterText; -- cgit v1.3 From 3187ee18e1fa5a8b3f719f26f32b01b817791a4e Mon Sep 17 00:00:00 2001 From: PavelK ProductEngine Date: Wed, 15 May 2013 20:31:47 +0300 Subject: CHUI-945 FIXED Add Object IMs to Chat Notification Preferences --- indra/newview/app_settings/settings.xml | 105 +++++++++++++++- indra/newview/llfloaterpreference.cpp | 4 +- indra/newview/llimview.cpp | 35 +++++- indra/newview/llviewermessage.cpp | 1 + .../default/xui/en/panel_preferences_chat.xml | 140 +++++++++++++++++---- 5 files changed, 250 insertions(+), 35 deletions(-) (limited to 'indra/newview/app_settings') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 03135caf93..5f1348e3c5 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -6398,7 +6398,10 @@ NotificationConferenceIMOptions Comment - Specifies how the UI responds to Conference IM Notifications. + + Specifies how the UI responds to Conference IM Notifications. + Allowed values: [openconversations,toast,flash,noaction] + Persist 1 Type @@ -6409,7 +6412,10 @@ NotificationFriendIMOptions Comment - Specifies how the UI responds to Friend IM Notifications. + + Specifies how the UI responds to Friend IM Notifications. + Allowed values: [openconversations,toast,flash,noaction] + Persist 1 Type @@ -6420,7 +6426,10 @@ NotificationGroupChatOptions Comment - Specifies how the UI responds to Group Chat Notifications. + + Specifies how the UI responds to Group Chat Notifications. + Allowed values: [openconversations,toast,flash,noaction] + Persist 1 Type @@ -6431,7 +6440,10 @@ NotificationNearbyChatOptions Comment - Specifies how the UI responds to Nearby Chat Notifications. + + Specifies how the UI responds to Nearby Chat Notifications. + Allowed values: [openconversations,toast,flash,noaction] + Persist 1 Type @@ -6442,7 +6454,10 @@ NotificationNonFriendIMOptions Comment - Specifies how the UI responds to Non Friend IM Notifications. + + Specifies how the UI responds to Non Friend IM Notifications. + Allowed values: [openconversations,toast,flash,noaction] + Persist 1 Type @@ -6450,6 +6465,20 @@ Value toast + NotificationObjectIMOptions + + Comment + + Specifies how the UI responds to Object IM Notifications. + Allowed values: [openconversations,toast,flash,noaction] + + Persist + 1 + Type + String + Value + noaction + NotificationToastLifeTime Comment @@ -6988,6 +7017,72 @@ Value 0 + PlaySoundFriendIM + + Comment + Plays a sound when friend's IM received. + Persist + 1 + Type + Boolean + Value + 0 + + PlaySoundNonFriendIM + + Comment + Plays a sound when non-friend's IM received. + Persist + 1 + Type + Boolean + Value + 0 + + PlaySoundConferenceIM + + Comment + Plays a sound when conference IM received. + Persist + 1 + Type + Boolean + Value + 0 + + PlaySoundGroupChatIM + + Comment + Plays a sound when group chat IM received. + Persist + 1 + Type + Boolean + Value + 0 + + PlaySoundNearbyChatIM + + Comment + Plays a sound when nearby chat IM received. + Persist + 1 + Type + Boolean + Value + 0 + + PlaySoundObjectIM + + Comment + Plays a sound when IM fom an object received. + Persist + 1 + Type + Boolean + Value + 0 + PlaySoundNewConversation Comment diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index bbf88060c1..7ada4cfd00 100755 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -452,6 +452,7 @@ BOOL LLFloaterPreference::postBuild() getChild("ConferenceIMOptions")->setCommitCallback(boost::bind(&LLFloaterPreference::onNotificationsChange, this,"ConferenceIMOptions")); getChild("GroupChatOptions")->setCommitCallback(boost::bind(&LLFloaterPreference::onNotificationsChange, this,"GroupChatOptions")); getChild("NearbyChatOptions")->setCommitCallback(boost::bind(&LLFloaterPreference::onNotificationsChange, this,"NearbyChatOptions")); + getChild("ObjectIMOptions")->setCommitCallback(boost::bind(&LLFloaterPreference::onNotificationsChange, this,"ObjectIMOptions")); // if floater is opened before login set default localized do not disturb message if (LLStartUp::getStartupState() < STATE_STARTED) @@ -721,6 +722,7 @@ void LLFloaterPreference::onOpen(const LLSD& key) onNotificationsChange("ConferenceIMOptions"); onNotificationsChange("GroupChatOptions"); onNotificationsChange("NearbyChatOptions"); + onNotificationsChange("ObjectIMOptions"); LLPanelLogin::setAlwaysRefresh(true); refresh(); @@ -928,7 +930,7 @@ void LLFloaterPreference::onNotificationsChange(const std::string& OptionName) bool show_notifications_alert = true; for (notifications_map::iterator it_notification = mNotificationOptions.begin(); it_notification != mNotificationOptions.end(); it_notification++) { - if(it_notification->second != "None") + if(it_notification->second != "No action") { show_notifications_alert = false; break; diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index ff163f5b25..892038722d 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -196,32 +196,63 @@ void notify_of_message(const LLSD& msg, bool is_dnd_msg) // determine user prefs for this session if (session_id.isNull()) { - user_preferences = gSavedSettings.getString("NotificationNearbyChatOptions"); + if (msg["source_type"].asInteger() == CHAT_SOURCE_OBJECT) + { + user_preferences = gSavedSettings.getString("NotificationObjectIMOptions"); + if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundObjectIM") == TRUE)) + { + make_ui_sound("UISndNewIncomingIMSession"); + } + } + else + { + user_preferences = gSavedSettings.getString("NotificationNearbyChatOptions"); + if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundNearbyChatIM") == TRUE)) + { + make_ui_sound("UISndNewIncomingIMSession"); + } + } } else if(session->isP2PSessionType()) { if (LLAvatarTracker::instance().isBuddy(participant_id)) { user_preferences = gSavedSettings.getString("NotificationFriendIMOptions"); + if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundFriendIM") == TRUE)) + { + make_ui_sound("UISndNewIncomingIMSession"); + } } else { user_preferences = gSavedSettings.getString("NotificationNonFriendIMOptions"); + if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundNonFriendIM") == TRUE)) + { + make_ui_sound("UISndNewIncomingIMSession"); + } } } else if(session->isAdHocSessionType()) { user_preferences = gSavedSettings.getString("NotificationConferenceIMOptions"); + if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundConferenceIM") == TRUE)) + { + make_ui_sound("UISndNewIncomingIMSession"); + } } else if(session->isGroupSessionType()) { user_preferences = gSavedSettings.getString("NotificationGroupChatOptions"); + if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundGroupChatIM") == TRUE)) + { + make_ui_sound("UISndNewIncomingIMSession"); + } } // actions: // 0. nothing - exit - if (("none" == user_preferences || + if (("noaction" == user_preferences || ON_TOP_AND_ITEM_IS_SELECTED == conversations_floater_status) && session_floater->isMessagePaneExpanded()) { diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 3a57e2a3c9..013d8c86f8 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -3666,6 +3666,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) LLSD msg_notify = LLSD(LLSD::emptyMap()); msg_notify["session_id"] = LLUUID(); msg_notify["from_id"] = chat.mFromID; + msg_notify["source_type"] = chat.mSourceType; on_new_message(msg_notify); } } diff --git a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml index bd096ebb88..2fd26e3f01 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml @@ -100,14 +100,6 @@ left="13" width="517"> - - Notifications - + label="No action" + name="NoAction" + value="noaction"/> + + + top_pad="11"> Non-friend IMs: + label="No action" + name="NoAction" + value="noaction"/> + + + top_pad="11"> Conference IMs: + label="No action" + name="NoAction" + value="noaction"/> + + + top_pad="11"> Group chat: + label="No action" + name="NoAction" + value="noaction"/> + + + top_pad="11"> Nearby chat: + label="No action" + name="NoAction" + value="noaction"/> + + + + Object IMs: + + + + + + + + + Date: Thu, 6 Jun 2013 15:15:33 +0300 Subject: CHUI-945 ADD FIX Add Object IMs to Chat Notification Preferences --- 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 411e5f9005..313eb550fd 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -6499,7 +6499,7 @@ Type String Value - noaction + toast NotificationToastLifeTime -- cgit v1.3 From d5febe1ab553749808198ec4e0c78ec64d4d9588 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 27 Jun 2013 11:07:12 -0400 Subject: CHOP-956: Add settings_install.xml to settings_files.xml. Also clarify comment for ELLPath in lldir.h: ELLPath int values are read from settings_files.xml. --- indra/llvfs/lldir.h | 2 +- indra/newview/app_settings/settings_files.xml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/newview/app_settings') diff --git a/indra/llvfs/lldir.h b/indra/llvfs/lldir.h index cc10ed5bbd..e02bf552aa 100755 --- a/indra/llvfs/lldir.h +++ b/indra/llvfs/lldir.h @@ -32,7 +32,7 @@ #define MAX_PATH MAXPATHLEN #endif -// these numbers *may* get serialized (really??), so we need to be explicit +// these numbers are read from settings_files.xml, so we need to be explicit typedef enum ELLPath { LL_PATH_NONE = 0, diff --git a/indra/newview/app_settings/settings_files.xml b/indra/newview/app_settings/settings_files.xml index bfc09286e3..4a9e522a96 100755 --- a/indra/newview/app_settings/settings_files.xml +++ b/indra/newview/app_settings/settings_files.xml @@ -4,6 +4,9 @@ + -- cgit v1.3 From 4a9b688b4d46f67e1b00e04ebe972470b61e560a Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 27 Jun 2013 16:11:48 -0400 Subject: CHOP-959: Make settings.xml actually valid XML LLSD. UserLoginInfo block had Value without the required subsequent element to provide any actual value. This confused at least the Python LLSD reader. --- indra/newview/app_settings/settings.xml | 3 ++- 1 file changed, 2 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 12ca902c59..997bde37ce 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -12859,12 +12859,13 @@ UserLoginInfo Comment - Users loging data. + User login data. Persist 1 Type LLSD Value + VFSOldSize -- cgit v1.3 From c08b60ac6fee74f613ed3f5f8702291ed1c2376f Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 28 Jun 2013 15:26:18 -0400 Subject: CHOP-959: Streamline processing for --graphicslevel switch. Use map-to in cmd_line.xml to inform the command-line processor that the target variable for --graphicslevel is RenderQualityPerformance. That lets us eliminate clunky llappviewer.cpp switch from '0' to 0, etc. Moreover, previous switch statement only accepted 0 - 3, whereas LLFeatureManager::setGraphicsLevel() actually accepts 0 - 6. Introduce LLFeatureManager::isValidGraphicsLevel() and use that to validate. Replace switch statement in setGraphicsLevel() mapping int constants to string literals with static vector of level names, using same data for mapping as for validating level numbers. --- indra/newview/app_settings/cmd_line.xml | 2 + indra/newview/llappviewer.cpp | 43 ++---------- indra/newview/llfeaturemanager.cpp | 117 +++++++++++++++++++------------- indra/newview/llfeaturemanager.h | 14 +++- 4 files changed, 88 insertions(+), 88 deletions(-) (limited to 'indra/newview/app_settings') diff --git a/indra/newview/app_settings/cmd_line.xml b/indra/newview/app_settings/cmd_line.xml index 7ab7787d77..8ca33fbf54 100755 --- a/indra/newview/app_settings/cmd_line.xml +++ b/indra/newview/app_settings/cmd_line.xml @@ -96,6 +96,8 @@ 0 - low, 1 - medium, 2 - high, 3 - ultra count 1 + map-to + RenderQualityPerformance grid diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index f92274dbbd..5b301c03a1 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2311,13 +2311,6 @@ bool LLAppViewer::initConfiguration() { //Load settings files list std::string settings_file_list = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "settings_files.xml"); - //LLControlGroup settings_control("SettingsFiles"); - //llinfos << "Loading settings file list " << settings_file_list << llendl; - //if (0 == settings_control.loadFromFile(settings_file_list)) - //{ - // llerrs << "Cannot load default configuration file " << settings_file_list << llendl; - //} - LLXMLNodePtr root; BOOL success = LLXMLNode::parseFile(settings_file_list, root, NULL); if (!success) @@ -2376,9 +2369,7 @@ bool LLAppViewer::initConfiguration() { c->setValue(true, false); } -#endif -#ifndef LL_RELEASE_FOR_DOWNLOAD gSavedSettings.setBOOL("QAMode", TRUE ); gSavedSettings.setS32("WatchdogEnabled", 0); #endif @@ -2582,36 +2573,10 @@ bool LLAppViewer::initConfiguration() if (clp.hasOption("graphicslevel")) { - const LLCommandLineParser::token_vector_t& value = clp.getOption("graphicslevel"); - if(value.size() != 1) - { - llwarns << "Usage: -graphicslevel <0-3>" << llendl; - } - else - { - std::string detail = value.front(); - mForceGraphicsDetail = TRUE; - - switch (detail.c_str()[0]) - { - case '0': - gSavedSettings.setU32("RenderQualityPerformance", 0); - break; - case '1': - gSavedSettings.setU32("RenderQualityPerformance", 1); - break; - case '2': - gSavedSettings.setU32("RenderQualityPerformance", 2); - break; - case '3': - gSavedSettings.setU32("RenderQualityPerformance", 3); - break; - default: - mForceGraphicsDetail = FALSE; - llwarns << "Usage: -graphicslevel <0-3>" << llendl; - break; - } - } + // User explicitly requested --graphicslevel on the command line. + // We expect this switch has already set RenderQualityPerformance. + mForceGraphicsDetail = + LLFeatureManager::instance().isValidGraphicsLevel(gSavedSettings.getU32("RenderQualityPerformance")); } if (clp.hasOption("analyzeperformance")) diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp index ddb9d3bc43..9d292ce7bb 100755 --- a/indra/newview/llfeaturemanager.cpp +++ b/indra/newview/llfeaturemanager.cpp @@ -30,6 +30,7 @@ #include #include +#include #include "llfeaturemanager.h" #include "lldir.h" @@ -52,6 +53,8 @@ #include "llboost.h" #include "llweb.h" #include "llviewershadermgr.h" +#include "llstring.h" +#include "stringize.h" #if LL_WINDOWS #include "lldxhardware.h" @@ -187,6 +190,55 @@ void LLFeatureList::dump() LL_DEBUGS("RenderInit") << LL_ENDL; } +static const std::vector sGraphicsLevelNames = boost::assign::list_of + ("Low") + ("LowMid") + ("Mid") + ("MidHigh") + ("High") + ("HighUltra") + ("Ultra") +; + +U32 LLFeatureManager::getMaxGraphicsLevel() const +{ + return sGraphicsLevelNames.size() - 1; +} + +bool LLFeatureManager::isValidGraphicsLevel(U32 level) const +{ + return (level <= getMaxGraphicsLevel()); +} + +std::string LLFeatureManager::getNameForGraphicsLevel(U32 level) const +{ + if (isValidGraphicsLevel(level)) + { + return sGraphicsLevelNames[level]; + } + return STRINGIZE("Invalid graphics level " << level << ", valid are 0 .. " + << getMaxGraphicsLevel()); +} + +S32 LLFeatureManager::getGraphicsLevelForName(const std::string& name) const +{ + const std::string FixedFunction("FixedFunction"); + std::string rname(name); + if (LLStringUtil::endsWith(rname, FixedFunction)) + { + // chop off any "FixedFunction" suffix + rname = rname.substr(0, rname.length() - FixedFunction.length()); + } + for (S32 i(0), iend(getMaxGraphicsLevel()); i <= iend; ++i) + { + if (sGraphicsLevelNames[i] == rname) + { + return i; + } + } + return -1; +} + LLFeatureList *LLFeatureManager::findMask(const std::string& name) { if (mMaskList.count(name)) @@ -620,7 +672,7 @@ void LLFeatureManager::applyRecommendedSettings() { // apply saved settings // cap the level at 2 (high) - S32 level = llmax(GPU_CLASS_0, llmin(mGPUClass, GPU_CLASS_5)); + U32 level = llmax(GPU_CLASS_0, llmin(mGPUClass, GPU_CLASS_5)); llinfos << "Applying Recommended Features" << llendl; @@ -696,62 +748,33 @@ void LLFeatureManager::applyFeatures(bool skipFeatures) } } -void LLFeatureManager::setGraphicsLevel(S32 level, bool skipFeatures) +void LLFeatureManager::setGraphicsLevel(U32 level, bool skipFeatures) { LLViewerShaderMgr::sSkipReload = true; applyBaseMasks(); - - switch (level) + + // if we're passed an invalid level, default to "Low" + std::string features(isValidGraphicsLevel(level)? getNameForGraphicsLevel(level) : "Low"); + if (features == "Low") { - case 0: #if LL_DARWIN - // This Mac-specific change is to insure that we force 'Basic Shaders' for all Mac - // systems which support them instead of falling back to fixed-function unnecessarily - // MAINT-2157 - // - if (gGLManager.mGLVersion < 2.1f) - { - maskFeatures("LowFixedFunction"); - } - else - { //same as low, but with "Basic Shaders" enabled - maskFeatures("Low"); - } + // This Mac-specific change is to insure that we force 'Basic Shaders' for all Mac + // systems which support them instead of falling back to fixed-function unnecessarily + // MAINT-2157 + if (gGLManager.mGLVersion < 2.1f) #else - if (gGLManager.mGLVersion < 3.f || gGLManager.mIsIntel) - { //only use fixed function by default if GL version < 3.0 or this is an intel graphics chip - maskFeatures("LowFixedFunction"); - } - else - { //same as low, but with "Basic Shaders" enabled - maskFeatures("Low"); - } + // only use fixed function by default if GL version < 3.0 or this is an intel graphics chip + if (gGLManager.mGLVersion < 3.f || gGLManager.mIsIntel) #endif - break; - case 1: - maskFeatures("LowMid"); - break; - case 2: - maskFeatures("Mid"); - break; - case 3: - maskFeatures("MidHigh"); - break; - case 4: - maskFeatures("High"); - break; - case 5: - maskFeatures("HighUltra"); - break; - case 6: - maskFeatures("Ultra"); - break; - default: - maskFeatures("Low"); - break; + { + // same as Low, but with "Basic Shaders" disabled + features = "LowFixedFunction"; + } } + maskFeatures(features); + applyFeatures(skipFeatures); LLViewerShaderMgr::sSkipReload = false; diff --git a/indra/newview/llfeaturemanager.h b/indra/newview/llfeaturemanager.h index ad72c16743..3b8d251236 100755 --- a/indra/newview/llfeaturemanager.h +++ b/indra/newview/llfeaturemanager.h @@ -134,8 +134,18 @@ public: // skipFeatures forces skipping of mostly hardware settings // that we don't want to change when we change graphics // settings - void setGraphicsLevel(S32 level, bool skipFeatures); - + void setGraphicsLevel(U32 level, bool skipFeatures); + + // What 'level' values are valid to pass to setGraphicsLevel()? + // 0 is the low end... + U32 getMaxGraphicsLevel() const; + bool isValidGraphicsLevel(U32 level) const; + + // setGraphicsLevel() levels have names. + std::string getNameForGraphicsLevel(U32 level) const; + // returns -1 for unrecognized name (hence S32 rather than U32) + S32 getGraphicsLevelForName(const std::string& name) const; + void applyBaseMasks(); void applyRecommendedSettings(); -- cgit v1.3 From 3d9c74dcc869d7ce3708426a0b45bfb838529d3f Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Mon, 1 Jul 2013 16:19:24 -0400 Subject: CHOP-959: Introduce and use settings vars for some cmd_line switches. The cmd_line.xml entries: analyzeperformance crashonstartup debugsession disablecrashlogger logmetrics logperformance noquicktime replaysession all specify map-to settings.xml variables -- none of which existed! Introduce such variables. Instead of detecting the presence of a particular switch in the command-line parser, use the value of its corresponding settings variable. --- indra/newview/app_settings/settings.xml | 88 +++++++++++++++++++++++++++++++++ indra/newview/llappviewer.cpp | 52 ++++++------------- 2 files changed, 103 insertions(+), 37 deletions(-) (limited to 'indra/newview/app_settings') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 997bde37ce..a39b447cca 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -126,6 +126,17 @@ Value 1 + AnalyzePerformance + + Comment + Request performance analysis for a particular viewer run + Persist + 0 + Type + Boolean + Value + 0 + AnimateTextures Comment @@ -1916,6 +1927,17 @@ Value 262144 + CrashOnStartup + + Comment + User-requested crash on viewer startup + Persist + 0 + Type + Boolean + Value + 0 + CreateToolCopyCenters Comment @@ -2158,6 +2180,17 @@ Value 0 + DebugSession + + Comment + Request debugging for a particular viewer session + Persist + 0 + Type + Boolean + Value + 0 + DebugShowColor Comment @@ -2972,6 +3005,17 @@ Value 0 + DisableCrashLogger + + Comment + Do not send crash report to Linden server + Persist + 0 + Type + Boolean + Value + 0 + DisableMouseWarp Comment @@ -5217,6 +5261,28 @@ Value 0 + LogMetrics + + Comment + Log viewer metrics + Persist + 0 + Type + String + Value + + + LogPerformance + + Comment + Log performance analysis for a particular viewer run + Persist + 0 + Type + Boolean + Value + 0 + LogTextureNetworkTraffic Comment @@ -6394,6 +6460,17 @@ Value 0 + NoQuickTime + + Comment + Disable QuickTime for a particular viewer run + Persist + 0 + Type + Boolean + Value + 0 + NoVerifySSLCert Comment @@ -9643,6 +9720,17 @@ Value 1 + ReplaySession + + Comment + Request replay of previously-recorded pilot file + Persist + 0 + Type + Boolean + Value + 0 + RotateRight Comment diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 5b301c03a1..613a23630f 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2463,7 +2463,7 @@ bool LLAppViewer::initConfiguration() // Register the core crash option as soon as we can // if we want gdb post-mortem on cores we need to be up and running // ASAP or we might miss init issue etc. - if(clp.hasOption("disablecrashlogger")) + if(gSavedSettings.getBOOL("DisableCrashLogger")) { llwarns << "Crashes will be handled by system, stack trace logs and crash logger are both disabled" << llendl; LLAppViewer::instance()->disableCrashlogger(); @@ -2542,59 +2542,37 @@ bool LLAppViewer::initConfiguration() } // If we have specified crash on startup, set the global so we'll trigger the crash at the right time - if(clp.hasOption("crashonstartup")) - { - gCrashOnStartup = TRUE; - } + gCrashOnStartup = gSavedSettings.getBOOL("CrashOnStartup"); - if (clp.hasOption("logperformance")) + if (gSavedSettings.getBOOL("LogPerformance")) { LLFastTimer::sLog = TRUE; LLFastTimer::sLogName = std::string("performance"); } - - if (clp.hasOption("logmetrics")) - { - LLFastTimer::sMetricLog = TRUE ; - // '--logmetrics' can be specified with a named test metric argument so the data gathering is done only on that test - // In the absence of argument, every metric is gathered (makes for a rather slow run and hard to decipher report...) - std::string test_name = clp.getOption("logmetrics")[0]; + + std::string test_name(gSavedSettings.getString("LogMetrics")); + if (! test_name.empty()) + { + LLFastTimer::sMetricLog = TRUE ; + // '--logmetrics' is specified with a named test metric argument so the data gathering is done only on that test + // In the absence of argument, every metric would be gathered (makes for a rather slow run and hard to decipher report...) llinfos << "'--logmetrics' argument : " << test_name << llendl; - if (test_name == "") - { - llwarns << "No '--logmetrics' argument given, will output all metrics to " << DEFAULT_METRIC_NAME << llendl; - LLFastTimer::sLogName = DEFAULT_METRIC_NAME; - } - else - { - LLFastTimer::sLogName = test_name; - } + LLFastTimer::sLogName = test_name; } if (clp.hasOption("graphicslevel")) { // User explicitly requested --graphicslevel on the command line. // We expect this switch has already set RenderQualityPerformance. + // Check that value for validity; if valid, we'll engage it later. mForceGraphicsDetail = LLFeatureManager::instance().isValidGraphicsLevel(gSavedSettings.getU32("RenderQualityPerformance")); } - if (clp.hasOption("analyzeperformance")) - { - LLFastTimerView::sAnalyzePerformance = TRUE; - } + LLFastTimerView::sAnalyzePerformance = gSavedSettings.getBOOL("AnalyzePerformance"); + gAgentPilot.setReplaySession(gSavedSettings.getBOOL("ReplaySession")); - if (clp.hasOption("replaysession")) - { - gAgentPilot.setReplaySession(TRUE); - } - - if (clp.hasOption("nonotifications")) - { - gSavedSettings.getControl("IgnoreAllNotifications")->setValue(true, false); - } - - if (clp.hasOption("debugsession")) + if (gSavedSettings.getBOOL("DebugSession")) { gDebugSession = TRUE; gDebugGL = TRUE; -- cgit v1.3 From 09d8d17382c72b7741fde1334e832f39d773299f Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 2 Jul 2013 15:30:49 -0400 Subject: CHOP-959: Introduce CmdLineLoginLocation var for --url and --slurl. Route --url and --slurl command-line switches through a common settings variable. Treat them uniformly now. (Previously, passing --url would notice a grid-specific SLURL and preselect that grid; --slurl wouldn't. Now both do.) --- indra/newview/app_settings/cmd_line.xml | 6 ++++-- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llappviewer.cpp | 27 +++++++++++---------------- 3 files changed, 26 insertions(+), 18 deletions(-) (limited to 'indra/newview/app_settings') diff --git a/indra/newview/app_settings/cmd_line.xml b/indra/newview/app_settings/cmd_line.xml index 8ca33fbf54..71a052057c 100755 --- a/indra/newview/app_settings/cmd_line.xml +++ b/indra/newview/app_settings/cmd_line.xml @@ -372,7 +372,8 @@ true last_option true - + map-to + CmdLineLoginLocation url @@ -383,7 +384,8 @@ 1 last_option true - + map-to + CmdLineLoginLocation usersessionsettings diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index a39b447cca..8a50ca146b 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -1795,6 +1795,17 @@ + CmdLineLoginLocation + + Comment + Startup destination requested on command line + Persist + 0 + Type + String + Value + + ConnectAsGod Comment diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 613a23630f..3116dd4b00 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2597,20 +2597,16 @@ bool LLAppViewer::initConfiguration() // What can happen is that someone can use IE (or potentially // other browsers) and do the rough equivalent of command // injection and steal passwords. Phoenix. SL-55321 - if(clp.hasOption("url")) - { - LLStartUp::setStartSLURL(LLSLURL(clp.getOption("url")[0])); - if(LLStartUp::getStartSLURL().getType() == LLSLURL::LOCATION) - { - LLGridManager::getInstance()->setGridChoice(LLStartUp::getStartSLURL().getGrid()); - - } - } - else if(clp.hasOption("slurl")) - { - LLSLURL start_slurl(clp.getOption("slurl")[0]); + std::string CmdLineLoginLocation(gSavedSettings.getString("CmdLineLoginLocation")); + if(! CmdLineLoginLocation.empty()) + { + LLSLURL start_slurl(CmdLineLoginLocation); LLStartUp::setStartSLURL(start_slurl); - } + if(start_slurl.getType() == LLSLURL::LOCATION) + { + LLGridManager::getInstance()->setGridChoice(start_slurl.getGrid()); + } + } const LLControlVariable* skinfolder = gSavedSettings.getControl("SkinCurrent"); if(skinfolder && LLStringUtil::null != skinfolder->getValue().asString()) @@ -2753,9 +2749,8 @@ bool LLAppViewer::initConfiguration() LL_DEBUGS("AppInit")<<"set start from NextLoginLocation: "< Date: Tue, 2 Jul 2013 16:33:40 -0400 Subject: CHOP-959: Introduce CmdLineChannel settings var, map --channel to it. --- indra/newview/app_settings/cmd_line.xml | 3 ++- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llappviewer.cpp | 7 ++++--- 3 files changed, 17 insertions(+), 4 deletions(-) (limited to 'indra/newview/app_settings') diff --git a/indra/newview/app_settings/cmd_line.xml b/indra/newview/app_settings/cmd_line.xml index 71a052057c..74117dbd85 100755 --- a/indra/newview/app_settings/cmd_line.xml +++ b/indra/newview/app_settings/cmd_line.xml @@ -22,7 +22,8 @@ count 1 - + map-to + CmdLineChannel console diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 8a50ca146b..6f50a72016 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -1749,6 +1749,17 @@ Value 0 + CmdLineChannel + + Comment + Command line specified channel name + Persist + 0 + Type + String + Value + + CmdLineDisableVoice Comment diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 3116dd4b00..37f1f11451 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2536,9 +2536,10 @@ bool LLAppViewer::initConfiguration() } } - if(clp.hasOption("channel")) - { - LLVersionInfo::resetChannel(clp.getOption("channel")[0]); + std::string CmdLineChannel(gSavedSettings.getString("CmdLineChannel")); + if(! CmdLineChannel.empty()) + { + LLVersionInfo::resetChannel(CmdLineChannel); } // If we have specified crash on startup, set the global so we'll trigger the crash at the right time -- cgit v1.3 From d2dd3be08b3d460054366a66481bcf3110005291 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Sat, 13 Jul 2013 15:03:39 -0400 Subject: CHOP-963: Add a new --update-service command line argument for QA use --- indra/newview/app_settings/cmd_line.xml | 10 ++++++++++ indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llviewernetwork.cpp | 18 ++++++++++++++++-- 3 files changed, 37 insertions(+), 2 deletions(-) (limited to 'indra/newview/app_settings') diff --git a/indra/newview/app_settings/cmd_line.xml b/indra/newview/app_settings/cmd_line.xml index 7ab7787d77..f60fc3afb2 100755 --- a/indra/newview/app_settings/cmd_line.xml +++ b/indra/newview/app_settings/cmd_line.xml @@ -108,6 +108,16 @@ CmdLineGridChoice + update-service + + desc + Override the url base for the update query. + count + 1 + map-to + CmdLineUpdateService + + help desc diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 344079b640..0ec3d2545c 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -1760,6 +1760,17 @@ Value + CmdLineUpdateService + + Comment + Override the url base for the update query. + Persist + 0 + Type + String + Value + + CmdLineHelperURI Comment diff --git a/indra/newview/llviewernetwork.cpp b/indra/newview/llviewernetwork.cpp index 371b00b173..e7821d4b9e 100755 --- a/indra/newview/llviewernetwork.cpp +++ b/indra/newview/llviewernetwork.cpp @@ -547,11 +547,25 @@ std::string LLGridManager::getGridLoginID() std::string LLGridManager::getUpdateServiceURL() { - std::string update_url_base; - if ( mGridList[mGrid].has(GRID_UPDATE_SERVICE_URL) ) + std::string update_url_base = gSavedSettings.getString("CmdLineUpdateService");; + if ( !update_url_base.empty() ) + { + LL_INFOS2("UpdaterService","GridManager") + << "Update URL base overridden from command line: " << update_url_base + << LL_ENDL; + } + else if ( mGridList[mGrid].has(GRID_UPDATE_SERVICE_URL) ) { update_url_base = mGridList[mGrid][GRID_UPDATE_SERVICE_URL].asString(); } + else + { + LL_WARNS2("UpdaterService","GridManager") + << "The grid property '" << GRID_UPDATE_SERVICE_URL + << "' is not defined for the grid '" << mGrid << "'" + << LL_ENDL; + } + return update_url_base; } -- cgit v1.3 From 22140012c2b8f40081027bdcf2f5fbcd8a4527e9 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Thu, 15 Aug 2013 12:37:24 +0300 Subject: MAINT-3012 FIXED Don't show Destination Guide by default on first run. --- indra/newview/app_settings/settings_per_account.xml | 13 +------------ indra/newview/lltoolbarview.cpp | 19 ------------------- 2 files changed, 1 insertion(+), 31 deletions(-) (limited to 'indra/newview/app_settings') diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml index 590f41283b..636caf5ef3 100755 --- a/indra/newview/app_settings/settings_per_account.xml +++ b/indra/newview/app_settings/settings_per_account.xml @@ -109,18 +109,7 @@ Boolean Value 0 - - DisplayDestinationsOnInitialRun - - Comment - Display the destinations guide when a user first launches Second Life. - Persist - 1 - Type - Boolean - Value - 1 - + LastInventoryInboxActivity Comment diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp index 4f2c99fba8..78a555d67d 100755 --- a/indra/newview/lltoolbarview.cpp +++ b/indra/newview/lltoolbarview.cpp @@ -51,8 +51,6 @@ LLToolBarView* gToolBarView = NULL; static LLDefaultChildRegistry::Register r("toolbar_view"); -void handleLoginToolbarSetup(); - bool isToolDragged() { return (LLToolDragAndDrop::getInstance()->getSource() == LLToolDragAndDrop::SOURCE_VIEWER); @@ -111,8 +109,6 @@ BOOL LLToolBarView::postBuild() mToolbars[i]->setButtonAddCallback(boost::bind(LLToolBarView::onToolBarButtonAdded,_1)); mToolbars[i]->setButtonRemoveCallback(boost::bind(LLToolBarView::onToolBarButtonRemoved,_1)); } - - LLAppViewer::instance()->setOnLoginCompletedCallback(boost::bind(&handleLoginToolbarSetup)); return TRUE; } @@ -696,18 +692,3 @@ bool LLToolBarView::isModified() const } -// -// HACK to bring up destinations guide at startup -// - -void handleLoginToolbarSetup() -{ - // Open the destinations guide by default on first login, per Rhett - if (gSavedPerAccountSettings.getBOOL("DisplayDestinationsOnInitialRun") || gAgent.isFirstLogin()) - { - LLFloaterReg::showInstance("destinations"); - - gSavedPerAccountSettings.setBOOL("DisplayDestinationsOnInitialRun", FALSE); - } -} - -- cgit v1.3