From 67185e19b423ccd31242d220a625eb4f593d4410 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Wed, 16 Jun 2010 16:40:48 -0400 Subject: EXT-5342 FIXED Open in Inventory contents does nothing for certain item types "Open" is added conditionally based on item type. --- indra/newview/llpanelobjectinventory.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index da809b7baa..26f32d656f 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -114,6 +114,7 @@ public: virtual time_t getCreationDate() const; virtual LLUIImagePtr getIcon() const; virtual void openItem(); + virtual BOOL canOpenItem() const { return FALSE; } virtual void closeItem() {} virtual void previewItem(); virtual void selectItem() {} @@ -677,7 +678,7 @@ void LLTaskInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags) } } } - else + else if (canOpenItem()) { items.push_back(std::string("Task Open")); if (!isItemCopyable()) @@ -723,6 +724,7 @@ public: virtual BOOL dragOrDrop(MASK mask, BOOL drop, EDragAndDropType cargo_type, void* cargo_data); + virtual BOOL canOpenItem() const { return TRUE; } }; LLTaskCategoryBridge::LLTaskCategoryBridge( @@ -874,6 +876,7 @@ public: const std::string& name) : LLTaskInvFVBridge(panel, uuid, name) {} + virtual BOOL canOpenItem() const { return TRUE; } virtual void openItem(); }; @@ -900,6 +903,7 @@ public: const std::string& name) : LLTaskInvFVBridge(panel, uuid, name) {} + virtual BOOL canOpenItem() const { return TRUE; } virtual void openItem(); virtual void performAction(LLInventoryModel* model, std::string action); virtual void buildContextMenu(LLMenuGL& menu, U32 flags); @@ -976,9 +980,8 @@ void LLTaskSoundBridge::buildContextMenu(LLMenuGL& menu, U32 flags) } } } - else + else if (canOpenItem()) { - items.push_back(std::string("Task Open")); if (!isItemCopyable()) { disabled_items.push_back(std::string("Task Open")); @@ -1063,6 +1066,7 @@ public: const std::string& name) : LLTaskScriptBridge(panel, uuid, name) {} + virtual BOOL canOpenItem() const { return TRUE; } virtual void openItem(); virtual BOOL removeItem(); //virtual void buildContextMenu(LLMenuGL& menu); @@ -1124,6 +1128,7 @@ public: const std::string& name) : LLTaskInvFVBridge(panel, uuid, name) {} + virtual BOOL canOpenItem() const { return TRUE; } virtual void openItem(); virtual BOOL removeItem(); }; @@ -1163,6 +1168,7 @@ public: const std::string& name) : LLTaskInvFVBridge(panel, uuid, name) {} + virtual BOOL canOpenItem() const { return TRUE; } virtual void openItem(); virtual BOOL removeItem(); }; @@ -1196,6 +1202,7 @@ public: const std::string& name) : LLTaskInvFVBridge(panel, uuid, name) {} + virtual BOOL canOpenItem() const { return TRUE; } virtual void openItem(); virtual BOOL removeItem(); }; -- cgit v1.2.3 From 08515a8eb38a014ce5aedc737ab8c9abc15fccdb Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Wed, 16 Jun 2010 17:49:04 -0400 Subject: EXT-7890 FIXED "Open" on folder of in-world contents does nothing Removed "open" menu option, to be consistent with right-click options on inventory folders elsewhere. --- indra/newview/llpanelobjectinventory.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index 26f32d656f..869b8beaec 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -725,6 +725,7 @@ public: EDragAndDropType cargo_type, void* cargo_data); virtual BOOL canOpenItem() const { return TRUE; } + virtual void openItem(); }; LLTaskCategoryBridge::LLTaskCategoryBridge( @@ -759,7 +760,8 @@ void LLTaskCategoryBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { std::vector items; std::vector disabled_items; - items.push_back(std::string("Task Open")); + items.push_back(std::string("--no options--")); + disabled_items.push_back(std::string("--no options--")); hide_context_entries(menu, items, disabled_items); } @@ -770,6 +772,10 @@ BOOL LLTaskCategoryBridge::hasChildren() const return FALSE; } +void LLTaskCategoryBridge::openItem() +{ +} + BOOL LLTaskCategoryBridge::startDrag(EDragAndDropType* type, LLUUID* id) const { //llinfos << "LLTaskInvFVBridge::startDrag()" << llendl; -- cgit v1.2.3 From 6bbbd6582fdf5bb24cf69f2106662032b2f77b8a Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Thu, 17 Jun 2010 11:10:28 -0400 Subject: EXT-7888 FIXED Opening a gesture from an in-world object shows gesture floater with blank information EXT-7909 FIXED Cleanup llpreviewgesture #include files Fixed an issue that was causing gesture asset loading to fail. Also did header file cleanup. --- indra/newview/llpreviewgesture.cpp | 52 +++++++++++--------------------------- indra/newview/llpreviewgesture.h | 2 -- 2 files changed, 15 insertions(+), 39 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp index 2e061b235d..ff315d3c53 100644 --- a/indra/newview/llpreviewgesture.cpp +++ b/indra/newview/llpreviewgesture.cpp @@ -31,55 +31,31 @@ */ #include "llviewerprecompiledheaders.h" - #include "llpreviewgesture.h" -#include - -// libraries -#include "lldatapacker.h" -#include "lldarray.h" -#include "llstring.h" -#include "lldir.h" +#include "llagent.h" +#include "llanimstatelabels.h" +#include "llanimationstates.h" +#include "llappviewer.h" // gVFS +#include "llassetuploadresponders.h" +#include "llcheckboxctrl.h" +#include "llcombobox.h" +#include "lldelayedgestureerror.h" #include "llfloaterreg.h" +#include "llgesturemgr.h" #include "llinventorydefines.h" #include "llinventoryfunctions.h" #include "llinventorymodel.h" #include "llinventorymodelbackgroundfetch.h" #include "llmultigesture.h" #include "llnotificationsutil.h" -#include "llvfile.h" - -// newview -#include "llagent.h" // todo: remove -#include "llanimationstates.h" -#include "llassetuploadresponders.h" -#include "llbutton.h" -#include "llcheckboxctrl.h" -#include "llcombobox.h" -#include "lldelayedgestureerror.h" -#include "llfloatergesture.h" // for some label constants -#include "llgesturemgr.h" -#include "llkeyboard.h" -#include "lllineeditor.h" #include "llradiogroup.h" -#include "llscrolllistctrl.h" -#include "llscrolllistitem.h" -#include "llscrolllistcell.h" -#include "lltextbox.h" -#include "lluictrlfactory.h" -#include "llviewerinventory.h" -#include "llviewerobject.h" +#include "llresmgr.h" +#include "lltrans.h" +#include "llvfile.h" #include "llviewerobjectlist.h" #include "llviewerregion.h" #include "llviewerstats.h" -#include "llviewerwindow.h" // busycount -#include "llvoavatarself.h" -#include "llappviewer.h" // gVFS -#include "llanimstatelabels.h" -#include "llresmgr.h" -#include "lltrans.h" - std::string NONE_LABEL; std::string SHIFT_LABEL; @@ -832,7 +808,9 @@ void LLPreviewGesture::loadAsset() const LLInventoryItem* item = getItem(); if (!item) { - mAssetStatus = PREVIEW_ASSET_ERROR; + // Don't set asset status here; we may not have set the item id yet + // (e.g. when this gets called initially) + //mAssetStatus = PREVIEW_ASSET_ERROR; return; } diff --git a/indra/newview/llpreviewgesture.h b/indra/newview/llpreviewgesture.h index 5968e936ef..b75d18873f 100644 --- a/indra/newview/llpreviewgesture.h +++ b/indra/newview/llpreviewgesture.h @@ -34,7 +34,6 @@ #define LL_LLPREVIEWGESTURE_H #include "llassettype.h" -#include "llmultigesture.h" #include "llpreview.h" class LLMultiGesture; @@ -45,7 +44,6 @@ class LLComboBox; class LLScrollListCtrl; class LLScrollListItem; class LLButton; -class LLGestureStep; class LLRadioGroup; class LLVFS; -- cgit v1.2.3 From 9ae5e2816ca2b5037665b2a62f55326c4a5d9769 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Thu, 17 Jun 2010 15:43:40 -0400 Subject: EXT-7909 FIXED Cleanup llpreviewgesture #include files Superficial header file fixes. --- indra/newview/llpreviewgesture.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpreviewgesture.h b/indra/newview/llpreviewgesture.h index b75d18873f..1814f0d403 100644 --- a/indra/newview/llpreviewgesture.h +++ b/indra/newview/llpreviewgesture.h @@ -138,7 +138,7 @@ protected: static void onDonePreview(LLMultiGesture* gesture, void* data); -protected: +private: // LLPreview contains mDescEditor LLLineEditor* mTriggerEditor; LLTextBox* mReplaceText; @@ -171,4 +171,4 @@ protected: BOOL mDirty; }; -#endif +#endif // LL_LLPREVIEWGESTURE_H -- cgit v1.2.3 From 4fc8140a1d01742d560ea0d122b889a670e97c2e Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Thu, 17 Jun 2010 16:36:49 -0400 Subject: EXT-7916 FIXED Miscllaneous UI issues with Preview Gesture Floater See subtasks for complete lists of fixes. The preview gesture floater had some major issues and regressions. --- .../default/xui/en/floater_preview_gesture.xml | 74 ++++++++-------------- 1 file changed, 27 insertions(+), 47 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/floater_preview_gesture.xml b/indra/newview/skins/default/xui/en/floater_preview_gesture.xml index f766fe5a5d..1cbb5ec6fb 100644 --- a/indra/newview/skins/default/xui/en/floater_preview_gesture.xml +++ b/indra/newview/skins/default/xui/en/floater_preview_gesture.xml @@ -39,28 +39,6 @@ name="Title"> Gesture: [NAME] - - Name: - - Description: @@ -79,10 +57,10 @@ follows="left|top" height="20" layout="topleft" - left_delta="84" + left_delta="89" name="desc" top_delta="-4" - width="180" /> + width="175" /> + width="175" /> + width="175" /> @@ -171,7 +149,7 @@ left="10" font.style="BOLD" name="library_label" - top="135" + top_delta="25" width="100"> Library: @@ -181,7 +159,7 @@ layout="topleft" left="10" name="library_list" - top="150" + top_delta="15" width="180"> @@ -199,7 +177,7 @@ layout="topleft" left_pad="10" name="add_btn" - top_delta="0" + top_delta="-1" width="70" />