Commits

Anonymous committed ce5daf4 Merge

merge

  • Participants
  • Parent commits 4865c4f, 1344980

Comments (0)

Files changed (5)

indra/llcharacter/llmultigesture.cpp

 		strings.push_back("until animations are done");
 	//	label += "until animations are done";
 	}
+	else
+	{
+		strings.push_back("");
+	}
 
 	return strings;
 }

indra/newview/llpanelobjectinventory.cpp

 	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() {}
 			}
 		}
 	}
-	else
+	else if (canOpenItem())
 	{
 		items.push_back(std::string("Task Open"));
 		if (!isItemCopyable())
 	virtual BOOL dragOrDrop(MASK mask, BOOL drop,
 							EDragAndDropType cargo_type,
 							void* cargo_data);
+	virtual BOOL canOpenItem() const { return TRUE; }
+	virtual void openItem();
 };
 
 LLTaskCategoryBridge::LLTaskCategoryBridge(
 {
 	std::vector<std::string> items;
 	std::vector<std::string> 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);
 }
 
 	return FALSE;
 }
 
+void LLTaskCategoryBridge::openItem()
+{
+}
+
 BOOL LLTaskCategoryBridge::startDrag(EDragAndDropType* type, LLUUID* id) const
 {
 	//llinfos << "LLTaskInvFVBridge::startDrag()" << llendl;
 						const std::string& name) :
 		LLTaskInvFVBridge(panel, uuid, name) {}
 
+	virtual BOOL canOpenItem() const { return TRUE; }
 	virtual void openItem();
 };
 
 					  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);
 			}
 		}
 	}
-	else
+	else if (canOpenItem())
 	{
-		items.push_back(std::string("Task Open")); 
 		if (!isItemCopyable())
 		{
 			disabled_items.push_back(std::string("Task Open"));
 					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);
 						 const std::string& name) :
 		LLTaskInvFVBridge(panel, uuid, name) {}
 
+	virtual BOOL canOpenItem() const { return TRUE; }
 	virtual void openItem();
 	virtual BOOL removeItem();
 };
 						const std::string& name) :
 	LLTaskInvFVBridge(panel, uuid, name) {}
 
+	virtual BOOL canOpenItem() const { return TRUE; }
 	virtual void openItem();
 	virtual BOOL removeItem();
 };
 						  const std::string& name) :
 		LLTaskInvFVBridge(panel, uuid, name) {}
 
+	virtual BOOL canOpenItem() const { return TRUE; }
 	virtual void openItem();
 	virtual BOOL removeItem();
 };

indra/newview/llpreviewgesture.cpp

  */
 
 #include "llviewerprecompiledheaders.h"
-
 #include "llpreviewgesture.h"
 
-#include <algorithm>
-
-// 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 "llradiogroup.h"
+#include "llresmgr.h"
+#include "lltrans.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 "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;
 	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;
 	}
 

indra/newview/llpreviewgesture.h

 #define LL_LLPREVIEWGESTURE_H
 
 #include "llassettype.h"
-#include "llmultigesture.h"
 #include "llpreview.h"
 
 class LLMultiGesture;
 class LLScrollListCtrl;
 class LLScrollListItem;
 class LLButton;
-class LLGestureStep;
 class LLRadioGroup;
 class LLVFS;
 
 
 	static void onDonePreview(LLMultiGesture* gesture, void* data);
 
-protected:
+private:
 	// LLPreview contains mDescEditor
 	LLLineEditor*	mTriggerEditor;
 	LLTextBox*		mReplaceText;
 	BOOL mDirty;
 };
 
-#endif
+#endif // LL_LLPREVIEWGESTURE_H

indra/newview/skins/default/xui/en/floater_preview_gesture.xml

      name="Title">
         Gesture: [NAME]
     </floater.string>
-  <text
-   type="string"
-   length="1"
-   follows="top|left"
-   font="SansSerifSmall"
-   height="10"
-   layout="topleft"
-   left="10"
-   name="name_text"
-   top="20"
-   font.style="BOLD"
-   width="100">
-    Name:
-  </text>
-  <line_editor
-   follows="left|top"
-   height="20"
-   layout="topleft"
-   left_delta="84"
-   name="name"
-   top_delta="-4"
-   width="180" />
     <text
      type="string"
      length="1"
      layout="topleft"
      left="10"
      name="desc_label"
-     top_pad="10"
+     top_pad="25"
      font.style="BOLD"
      width="100">
         Description:
      follows="left|top"
      height="20"
      layout="topleft"
-     left_delta="84"
+     left_delta="89"
      name="desc"
      top_delta="-4"
-     width="180" />
+     width="175" />
     <text
      type="string"
      length="1"
      follows="left|top"
      height="20"
      layout="topleft"
-     left_delta="84"
+     left_delta="89"
      max_length="31"
      name="trigger_editor"
      top_delta="-4"
-     width="180" />
+     width="175" />
     <text
      type="string"
      length="1"
      follows="left|top"
      height="20"
      layout="topleft"
-     left_delta="84"
+     left_delta="89"
      max_length="31"
      name="replace_editor"
      tool_tip="Replace the trigger word(s) with these words. For example, trigger &apos;hello&apos; replace with &apos;howdy&apos; will turn the chat &apos;I wanted to say hello&apos; into &apos;I wanted to say howdy&apos; as well as playing the gesture"
      top_delta="-4"
-     width="180" />
+     width="175" />
     <text
      type="string"
      length="1"
      height="20"
      label="None"
      layout="topleft"
-     left_delta="84"
+     left_delta="89"
      name="modifier_combo"
      top_delta="-4"
      width="75" />
      left="10"
      font.style="BOLD"
      name="library_label"
-     top="135"
+     top_delta="25"
      width="100">
         Library:
     </text>
      layout="topleft"
      left="10"
      name="library_list"
-     top="150"
+     top_delta="15"
      width="180">
         <scroll_list.rows
          value="Animation" />
      layout="topleft"
      left_pad="10"
      name="add_btn"
-     top_delta="0"
+     top_delta="-1"
      width="70" />
     <text
      type="string"
      layout="topleft"
      left_pad="10"
      name="up_btn"
-     top_delta="0"
+     top_delta="-1"
      width="70" />
     <button
      follows="top|left"
      layout="topleft"
      left="15"
      name="options_text"
-     top="330"
-     width="205" />
+     top="315"
+     width="205">
+	 (options)
+	 </text>
     <combo_box
      follows="top|left"
      height="20"
      layout="topleft"
      left_delta="15"
      name="animation_list"
-     top="345"
-     width="100" />
+     top="330"
+     width="100"/>
     <combo_box
      follows="top|left"
      height="20"
      layout="topleft"
      left_delta="0"
      name="sound_list"
-     top_delta="0"
+     top="330"
      width="100" />
     <line_editor
      follows="top|left"
      left_delta="0"
      max_length="127"
      name="chat_editor"
-     top_delta="0"
+     top="330"
      width="100" />
     <radio_group
      draw_border="false"
      layout="topleft"
      left_pad="8"
      name="animation_trigger_type"
-     top_delta="0"
+     top="330"
      width="80">
         <radio_item
          height="16"
          layout="topleft"
          left="3"
          name="start"
-         top="-51"
+         top_delta="45"
          width="80" />
         <radio_item
          height="16"
          layout="topleft"
          left_delta="0"
          name="stop"
-         top_pad="10"
+         top_pad="3"
          width="80" />
     </radio_group>
     <check_box
      height="20"
      label="until animations are done"
      layout="topleft"
-     left="16"
+     left="28"
      name="wait_anim_check"
-     top="340"
+     top="330"
      width="100" />
     <check_box
      follows="top|left"
      height="20"
-     label="time in seconds"
+     label="time in seconds:"
      layout="topleft"
      left_delta="0"
      name="wait_time_check"
      follows="top|left"
      height="20"
      layout="topleft"
-     left_pad="5"
+     left_pad="10"
      max_length="15"
      name="wait_time_editor"
-     top_delta="0"
+     top_delta="1"
      width="50" />
     <text
      type="string"