From b055fc86474cce8854cadadccec61f10dc6ef003 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Tue, 20 Jan 2009 15:07:28 -0600 Subject: Missing newline at end of two source files. --- linden/indra/newview/llpanelface.cpp | 2 +- linden/indra/newview/llpanelgeneral.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'linden') diff --git a/linden/indra/newview/llpanelface.cpp b/linden/indra/newview/llpanelface.cpp index d1c34f1..0c642bc 100644 --- a/linden/indra/newview/llpanelface.cpp +++ b/linden/indra/newview/llpanelface.cpp @@ -999,4 +999,4 @@ void LLPanelFace::onClickAutoFix(void* userdata) void LLPanelFace::onClickTextureConstants(void *) { gViewerWindow->alertXml("ClickTextureConstants"); -} \ No newline at end of file +} diff --git a/linden/indra/newview/llpanelgeneral.cpp b/linden/indra/newview/llpanelgeneral.cpp index 16da49d..6166ba5 100644 --- a/linden/indra/newview/llpanelgeneral.cpp +++ b/linden/indra/newview/llpanelgeneral.cpp @@ -249,4 +249,4 @@ void LLPanelGeneral::onClickResetUISize(void* user_data) { gSavedSettings.setF32("UIScaleFactor", 1.0f); gViewerWindow->reshape(gViewerWindow->getWindowDisplayWidth(), gViewerWindow->getWindowDisplayHeight()); -} \ No newline at end of file +} -- cgit v1.1 From 9badcd022d8074fa489b788b9ba5162b6e9291c7 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Tue, 20 Jan 2009 13:33:29 -0600 Subject: VWR-508/VWR-2199: Create "Worn Items" tab in Inventory Patch by Vadim Bigbear. --- linden/indra/newview/llfolderview.cpp | 12 +++++++++++ linden/indra/newview/llfolderview.h | 5 +++++ linden/indra/newview/llinventoryview.cpp | 24 ++++++++++++++++++++++ linden/indra/newview/llinventoryview.h | 3 +++ .../skins/default/xui/en-us/floater_inventory.xml | 4 ++++ 5 files changed, 48 insertions(+) (limited to 'linden') diff --git a/linden/indra/newview/llfolderview.cpp b/linden/indra/newview/llfolderview.cpp index cb9a379..4ef52f0 100644 --- a/linden/indra/newview/llfolderview.cpp +++ b/linden/indra/newview/llfolderview.cpp @@ -4490,6 +4490,7 @@ LLInventoryFilter::LLInventoryFilter(const std::string& name) : mSubStringMatchOffset = 0; mFilterSubString.clear(); + mFilterWorn = false; mFilterGeneration = 0; mMustPassGeneration = S32_MAX; mMinRequiredGeneration = 0; @@ -4521,9 +4522,12 @@ BOOL LLInventoryFilter::check(LLFolderViewItem* item) earliest = 0; } LLFolderViewEventListener* listener = item->getListener(); + const LLUUID& item_id = listener->getUUID(); mSubStringMatchOffset = mFilterSubString.size() ? item->getSearchableLabel().find(mFilterSubString) : std::string::npos; BOOL passed = (listener->getNInventoryType() & mFilterOps.mFilterTypes || listener->getNInventoryType() == LLInventoryType::NIT_NONE) && (mFilterSubString.size() == 0 || mSubStringMatchOffset != std::string::npos) + && (mFilterWorn == false || gAgent.isWearingItem(item_id) || + gAgent.getAvatarObject() && gAgent.getAvatarObject()->isWearingAttachment(item_id)) && ((listener->getPermissionMask() & mFilterOps.mPermissions) == mFilterOps.mPermissions) && (listener->getCreationDate() >= earliest && listener->getCreationDate() <= mFilterOps.mMaxDate); return passed; @@ -4544,6 +4548,7 @@ BOOL LLInventoryFilter::isNotDefault() { return mFilterOps.mFilterTypes != mDefaultFilterOps.mFilterTypes || mFilterSubString.size() + || mFilterWorn || mFilterOps.mPermissions != mDefaultFilterOps.mPermissions || mFilterOps.mMinDate != mDefaultFilterOps.mMinDate || mFilterOps.mMaxDate != mDefaultFilterOps.mMaxDate @@ -4554,6 +4559,7 @@ BOOL LLInventoryFilter::isActive() { return mFilterOps.mFilterTypes != LLInventoryType::NIT_ALL || mFilterSubString.size() + || mFilterWorn || mFilterOps.mPermissions != PERM_NONE || mFilterOps.mMinDate != time_min() || mFilterOps.mMaxDate != time_max() @@ -4989,6 +4995,12 @@ std::string LLInventoryFilter::rebuildFilterText() { mFilterText += " - Since Logoff"; } + + if (getFilterWorn()) + { + mFilterText += " - Worn"; + } + return mFilterText; } diff --git a/linden/indra/newview/llfolderview.h b/linden/indra/newview/llfolderview.h index af3248d..b668015 100644 --- a/linden/indra/newview/llfolderview.h +++ b/linden/indra/newview/llfolderview.h @@ -194,6 +194,9 @@ public: void setFilterSubString(const std::string& string); const std::string getFilterSubString(BOOL trim = FALSE); + + void setFilterWorn(bool worn) { mFilterWorn = worn; } + bool getFilterWorn() const { return mFilterWorn; } void setFilterPermissions(PermissionMask perms); PermissionMask getFilterPermissions() const { return mFilterOps.mPermissions; } @@ -257,6 +260,7 @@ protected: filter_ops mDefaultFilterOps; std::string::size_type mSubStringMatchOffset; std::string mFilterSubString; + bool mFilterWorn; U32 mOrder; const std::string mName; S32 mFilterGeneration; @@ -745,6 +749,7 @@ public: LLInventoryFilter* getFilter() { return &mFilter; } const std::string getFilterSubString(BOOL trim = FALSE); + bool getFilterWorn() const { return mFilter.getFilterWorn(); } U32 getFilterTypes() const { return mFilter.getFilterTypes(); } PermissionMask getFilterPermissions() const { return mFilter.getFilterPermissions(); } LLInventoryFilter::EFolderShow getShowFolderState() { return mFilter.getShowFolderState(); } diff --git a/linden/indra/newview/llinventoryview.cpp b/linden/indra/newview/llinventoryview.cpp index a265906..1e16b92 100644 --- a/linden/indra/newview/llinventoryview.cpp +++ b/linden/indra/newview/llinventoryview.cpp @@ -547,6 +547,15 @@ void LLInventoryView::init(LLInventoryModel* inventory) recent_items_panel->getFilter()->markDefault(); recent_items_panel->setSelectCallback(onSelectionChange, recent_items_panel); } + LLInventoryPanel* worn_items_panel = getChild("Worn Items"); + if (worn_items_panel) + { + worn_items_panel->setSortOrder(gSavedSettings.getU32("InventorySortOrder")); + worn_items_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); + worn_items_panel->getFilter()->markDefault(); + worn_items_panel->setFilterWorn(true); + worn_items_panel->setSelectCallback(onSelectionChange, worn_items_panel); + } // Now load the stored settings from disk, if available. std::ostringstream filterSaveName; @@ -595,6 +604,7 @@ BOOL LLInventoryView::postBuild() { childSetTabChangeCallback("inventory filter tabs", "All Items", onFilterSelected, this); childSetTabChangeCallback("inventory filter tabs", "Recent Items", onFilterSelected, this); + childSetTabChangeCallback("inventory filter tabs", "Worn Items", onFilterSelected, this); //panel->getFilter()->markDefault(); return TRUE; } @@ -621,6 +631,15 @@ LLInventoryView::~LLInventoryView( void ) filter->toLLSD(filterState); filterRoot[filter->getName()] = filterState; } + + LLInventoryPanel* worn_items_panel = getChild("Worn Items"); + if (worn_items_panel) + { + LLInventoryFilter* filter = worn_items_panel->getFilter(); + LLSD filterState; + filter->toLLSD(filterState); + filterRoot[filter->getName()] = filterState; + } std::ostringstream filterSaveName; filterSaveName << gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "filters.xml"); @@ -1653,6 +1672,11 @@ void LLInventoryPanel::setFilterSubString(const std::string& string) mFolders->getFilter()->setFilterSubString(string); } +void LLInventoryPanel::setFilterWorn(bool worn) +{ + mFolders->getFilter()->setFilterWorn(worn); +} + void LLInventoryPanel::setSortOrder(U32 order) { mFolders->getFilter()->setSortOrder(order); diff --git a/linden/indra/newview/llinventoryview.h b/linden/indra/newview/llinventoryview.h index c5c8532..dd6756a 100644 --- a/linden/indra/newview/llinventoryview.h +++ b/linden/indra/newview/llinventoryview.h @@ -108,6 +108,9 @@ public: U32 getFilterPermMask() const { return mFolders->getFilterPermissions(); } void setFilterSubString(const std::string& string); const std::string getFilterSubString() { return mFolders->getFilterSubString(); } + void setFilterWorn(bool worn); + bool getFilterWorn() const { return mFolders->getFilterWorn(); } + void setSortOrder(U32 order); U32 getSortOrder() { return mFolders->getSortOrder(); } void setSinceLogoff(BOOL sl); diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_inventory.xml b/linden/indra/newview/skins/default/xui/en-us/floater_inventory.xml index 590555f..3d1c569 100644 --- a/linden/indra/newview/skins/default/xui/en-us/floater_inventory.xml +++ b/linden/indra/newview/skins/default/xui/en-us/floater_inventory.xml @@ -61,6 +61,10 @@ follows="left|top|right|bottom" height="431" label="Recent Items" left_delta="0" mouse_opaque="true" name="Recent Items" sort_order="RecentItemsSortOrder" width="461" /> + Toolbar and Show HUD Attachments. Partial revert of earlier commit e79a1cc5. --- linden/indra/newview/llviewermenu.cpp | 29 ++++++++++++++++++++++ .../skins/default/xui/en-us/menu_viewer.xml | 10 ++++++++ 2 files changed, 39 insertions(+) (limited to 'linden') diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index 4c6de79..c4cbf84 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp @@ -5073,6 +5073,10 @@ class LLShowFloater : public view_listener_t { LLFloaterPreference::show(NULL); } + else if (floater_name == "toolbar") + { + LLToolBar::toggle(NULL); + } else if (floater_name == "chat history") { LLFloaterChat::toggleInstance(LLSD()); @@ -5205,6 +5209,10 @@ class LLFloaterVisible : public view_listener_t { new_value = LLFloaterMyFriends::instanceVisible(0); } + else if (floater_name == "toolbar") + { + new_value = LLToolBar::visible(NULL); + } else if (floater_name == "chat history") { new_value = LLFloaterChat::instanceVisible(); @@ -7203,6 +7211,25 @@ class LLViewCheckRenderType : public view_listener_t } }; +class LLViewShowHUDAttachments : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + LLPipeline::sShowHUDAttachments = !LLPipeline::sShowHUDAttachments; + return true; + } +}; + +class LLViewCheckHUDAttachments : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + bool new_value = LLPipeline::sShowHUDAttachments; + gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); + return true; + } +}; + class LLEditEnableTakeOff : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) @@ -9657,6 +9684,7 @@ void initialize_menus() addMenu(new LLViewToggleBeacon(), "View.ToggleBeacon"); addMenu(new LLViewBeaconWidth(), "View.BeaconWidth"); addMenu(new LLViewToggleRenderType(), "View.ToggleRenderType"); + addMenu(new LLViewShowHUDAttachments(), "View.ShowHUDAttachments"); addMenu(new LLViewZoomOut(), "View.ZoomOut"); addMenu(new LLViewZoomIn(), "View.ZoomIn"); addMenu(new LLViewZoomDefault(), "View.ZoomDefault"); @@ -9671,6 +9699,7 @@ void initialize_menus() addMenu(new LLViewCheckHighlightTransparent(), "View.CheckHighlightTransparent"); addMenu(new LLViewCheckBeaconEnabled(), "View.CheckBeaconEnabled"); addMenu(new LLViewCheckRenderType(), "View.CheckRenderType"); + addMenu(new LLViewCheckHUDAttachments(), "View.CheckHUDAttachments"); // World menu addMenu(new LLWorldChat(), "World.Chat"); diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml index a741b94..eb32ee0 100644 --- a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml +++ b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml @@ -281,6 +281,10 @@ + + + + @@ -440,6 +444,12 @@ + + + + -- cgit v1.1 From e43ad0a92e04eb2fd55f42f983e9d7495df90ae9 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Tue, 27 Jan 2009 03:07:13 -0600 Subject: Moved View > Show HUD Attachments to Advanced menu. New location is: Advanced > Rendering > Features > HUD Attachments Also removed keyboard shortcut. --- .../indra/newview/skins/default/xui/en-us/menu_viewer.xml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'linden') diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml index eb32ee0..ddcdce9 100644 --- a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml +++ b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml @@ -444,12 +444,6 @@ - - - - @@ -1134,6 +1128,13 @@ + + + + + -- cgit v1.1 From 14efa3235f4aa299f322372faeb2392763f7b5fe Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Tue, 27 Jan 2009 03:25:33 -0600 Subject: Vetoed shortcut for Show XUI Names (Ctrl-Shift-X). It's just not used often enough to justify a shortcut. Partial revert of earlier commit 2dd736ab. --- linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linden') diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml index ddcdce9..2d5402b 100644 --- a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml +++ b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml @@ -1614,7 +1614,7 @@ + shortcut="">