Fixed up LLMenuGL and variants a bit.
This commit is contained in:
@@ -186,12 +186,12 @@ LLLineEditor::LLLineEditor(const std::string& name, const LLRect& rect,
|
||||
{
|
||||
menu = new LLMenuGL(LLStringUtil::null);
|
||||
}*/
|
||||
menu->append(new LLMenuItemCallGL("Cut", context_cut, NULL, this));
|
||||
menu->append(new LLMenuItemCallGL("Copy", context_copy, NULL, this));
|
||||
menu->append(new LLMenuItemCallGL("Paste", context_paste, NULL, this));
|
||||
menu->append(new LLMenuItemCallGL("Delete", context_delete, NULL, this));
|
||||
menu->append(new LLMenuItemCallGL("Select All", context_selectall, NULL, this));
|
||||
menu->appendSeparator("Spelsep");
|
||||
menu->addChild(new LLMenuItemCallGL("Cut", context_cut, NULL, this));
|
||||
menu->addChild(new LLMenuItemCallGL("Copy", context_copy, NULL, this));
|
||||
menu->addChild(new LLMenuItemCallGL("Paste", context_paste, NULL, this));
|
||||
menu->addChild(new LLMenuItemCallGL("Delete", context_delete, NULL, this));
|
||||
menu->addChild(new LLMenuItemCallGL("Select All", context_selectall, NULL, this));
|
||||
menu->addSeparator();
|
||||
//menu->setBackgroundColor(gColors.getColor("MenuPopupBgColor"));
|
||||
menu->setCanTearOff(FALSE);
|
||||
menu->setVisible(FALSE);
|
||||
@@ -668,7 +668,7 @@ BOOL LLLineEditor::handleRightMouseDown( S32 x, S32 y, MASK mask )
|
||||
SpellMenuBind * tempBind = suggestionMenuItems[i];
|
||||
if(tempBind)
|
||||
{
|
||||
menu->remove((LLMenuItemCallGL *)tempBind->menuItem);
|
||||
menu->removeChild((LLMenuItemCallGL *)tempBind->menuItem);
|
||||
((LLMenuItemCallGL *)tempBind->menuItem)->die();
|
||||
//delete tempBind->menuItem;
|
||||
//tempBind->menuItem = NULL;
|
||||
@@ -705,7 +705,7 @@ BOOL LLLineEditor::handleRightMouseDown( S32 x, S32 y, MASK mask )
|
||||
//new LLMenuItemCallGL("Select All", context_selectall, NULL, this));
|
||||
tempStruct->menuItem = suggMenuItem;
|
||||
suggestionMenuItems.push_back(tempStruct);
|
||||
menu->append(suggMenuItem);
|
||||
menu->addChild(suggMenuItem);
|
||||
}
|
||||
SpellMenuBind * tempStruct = new SpellMenuBind;
|
||||
tempStruct->origin = this;
|
||||
@@ -716,7 +716,7 @@ BOOL LLLineEditor::handleRightMouseDown( S32 x, S32 y, MASK mask )
|
||||
"Add Word", spell_add, NULL, tempStruct);
|
||||
tempStruct->menuItem = suggMenuItem;
|
||||
suggestionMenuItems.push_back(tempStruct);
|
||||
menu->append(suggMenuItem);
|
||||
menu->addChild(suggMenuItem);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -734,7 +734,7 @@ BOOL LLLineEditor::handleRightMouseDown( S32 x, S32 y, MASK mask )
|
||||
tempStruct->word, spell_show, NULL, tempStruct);
|
||||
tempStruct->menuItem = suggMenuItem;
|
||||
suggestionMenuItems.push_back(tempStruct);
|
||||
menu->append(suggMenuItem);
|
||||
menu->addChild(suggMenuItem);
|
||||
}
|
||||
|
||||
mLastContextMenuX = x;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -76,32 +76,40 @@ typedef void (*label_callback)(std::string&,void*);
|
||||
// The LLMenuItemGL represents a single menu item in a menu.
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
class LLMenuItemGL : public LLView
|
||||
class LLMenuItemGL : public LLUICtrl
|
||||
{
|
||||
public:
|
||||
// static functions to control the global color scheme.
|
||||
static void setEnabledColor( const LLColor4& color ) { sEnabledColor = color; }
|
||||
/*static void setEnabledColor( const LLColor4& color ) { sEnabledColor = color; }
|
||||
static const LLColor4& getEnabledColor() { return sEnabledColor; }
|
||||
static void setDisabledColor( const LLColor4& color ) { sDisabledColor = color; }
|
||||
static const LLColor4& getDisabledColor() { return sDisabledColor; }
|
||||
static void setHighlightBGColor( const LLColor4& color ) { sHighlightBackground = color; }
|
||||
static const LLColor4& getHighlightBGColor() { return sHighlightBackground; }
|
||||
static void setHighlightFGColor( const LLColor4& color ) { sHighlightForeground = color; }
|
||||
static const LLColor4& getHighlightFGColor() { return sHighlightForeground; }
|
||||
static const LLColor4& getHighlightFGColor() { return sHighlightForeground; }*/
|
||||
|
||||
LLMenuItemGL( const std::string& name, const std::string& label, KEY key = KEY_NONE, MASK = MASK_NONE );
|
||||
virtual ~LLMenuItemGL() {};
|
||||
virtual ~LLMenuItemGL();
|
||||
|
||||
virtual void setValue(const LLSD& value) { setLabel(value.asString()); }
|
||||
|
||||
virtual LLXMLNodePtr getXML(bool save_children = true) const;
|
||||
|
||||
virtual std::string getType() const { return "item"; }
|
||||
|
||||
virtual BOOL handleHover(S32 x, S32 y, MASK mask);
|
||||
/*virtual*/ void handleVisibilityChange(BOOL new_visibility);
|
||||
/*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask);
|
||||
/*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
|
||||
/*virtual*/ BOOL handleRightMouseUp(S32 x, S32 y, MASK mask);
|
||||
|
||||
// LLUICtrl overrides
|
||||
/*virtual*/ void setValue(const LLSD& value);
|
||||
/*virtual*/ LLSD getValue() const;
|
||||
|
||||
virtual BOOL handleAcceleratorKey(KEY key, MASK mask);
|
||||
|
||||
LLColor4 getHighlightBgColor() { return mHighlightBackground; }
|
||||
|
||||
void setJumpKey(KEY key);
|
||||
KEY getJumpKey() const { return mJumpKey; }
|
||||
|
||||
@@ -115,8 +123,8 @@ public:
|
||||
virtual U32 getNominalHeight( void ) const;
|
||||
|
||||
// Marks item as not needing space for check marks or accelerator keys
|
||||
virtual void setBriefItem(BOOL brief) { mBriefItem = brief; }
|
||||
virtual BOOL isBriefItem() const { return mBriefItem; }
|
||||
virtual void setBriefItem(BOOL brief);
|
||||
virtual BOOL isBriefItem() const;
|
||||
|
||||
virtual BOOL addToAcceleratorList(std::list<LLKeyBinding*> *listp);
|
||||
void setAllowKeyRepeat(BOOL allow) { mAllowKeyRepeat = allow; }
|
||||
@@ -128,7 +136,7 @@ public:
|
||||
virtual BOOL setLabelArg( const std::string& key, const LLStringExplicit& text );
|
||||
|
||||
// Get the parent menu for this item
|
||||
virtual class LLMenuGL* getMenu();
|
||||
virtual class LLMenuGL* getMenu() const;
|
||||
|
||||
// returns the normal width of this control in pixels - this is
|
||||
// used for calculating the widest item, as well as for horizontal
|
||||
@@ -167,6 +175,7 @@ public:
|
||||
virtual BOOL handleKeyHere( KEY key, MASK mask );
|
||||
virtual BOOL handleMouseDown( S32 x, S32 y, MASK mask );
|
||||
virtual BOOL handleMouseUp( S32 x, S32 y, MASK mask );
|
||||
virtual BOOL handleScrollWheel( S32 x, S32 y, S32 clicks );
|
||||
virtual void draw( void );
|
||||
|
||||
BOOL getHover() const { return mGotHover; }
|
||||
@@ -193,13 +202,19 @@ protected:
|
||||
LLUIString mDrawAccelLabel;
|
||||
LLUIString mDrawBranchLabel;
|
||||
|
||||
LLColor4 mEnabledColor;
|
||||
LLColor4 mDisabledColor;
|
||||
LLColor4 mHighlightBackground;
|
||||
LLColor4 mHighlightForeground;
|
||||
|
||||
BOOL mHighlight;
|
||||
private:
|
||||
public:
|
||||
static LLColor4 sEnabledColor;
|
||||
static LLColor4 sDisabledColor;
|
||||
static LLColor4 sHighlightBackground;
|
||||
static LLColor4 sHighlightForeground;
|
||||
|
||||
private:
|
||||
// Keyboard and mouse variables
|
||||
BOOL mAllowKeyRepeat;
|
||||
BOOL mGotHover;
|
||||
@@ -302,6 +317,9 @@ public:
|
||||
void setUserData(void *userdata) { mUserData = userdata; }
|
||||
void* getUserData() const { return mUserData; }
|
||||
|
||||
protected:
|
||||
void updateEnabled( void );
|
||||
public:
|
||||
// called to rebuild the draw label
|
||||
virtual void buildDrawLabel( void );
|
||||
|
||||
@@ -309,7 +327,8 @@ public:
|
||||
virtual void doIt( void );
|
||||
|
||||
virtual BOOL handleAcceleratorKey(KEY key, MASK mask);
|
||||
|
||||
virtual BOOL handleKeyHere(KEY key, MASK mask);
|
||||
|
||||
//virtual void draw();
|
||||
|
||||
|
||||
@@ -427,24 +446,35 @@ class LLMenuGL
|
||||
// TODO: The menu and menu item classes share a great deal of functionality and perhaps should be united.
|
||||
// I think it may make the most sense to make LLMenuGL be a subclass of LLMenuItemGL. -MG
|
||||
{
|
||||
public:
|
||||
// textual artwork which menugl-imitators may want to match
|
||||
static const std::string BOOLEAN_TRUE_PREFIX;
|
||||
static const std::string BRANCH_SUFFIX;
|
||||
static const std::string ARROW_UP;
|
||||
static const std::string ARROW_DOWN;
|
||||
|
||||
protected:
|
||||
// let branching menu items use my protected traversal methods
|
||||
friend class LLMenuItemBranchGL;
|
||||
public:
|
||||
LLMenuGL( const std::string& name, const std::string& label, LLHandle<LLFloater> parent_floater = LLHandle<LLFloater>());
|
||||
LLMenuGL( const std::string& label, LLHandle<LLFloater> parent_floater = LLHandle<LLFloater>() );
|
||||
LLMenuGL( const std::string& name, const std::string& label);
|
||||
LLMenuGL( const std::string& label);
|
||||
virtual ~LLMenuGL( void );
|
||||
virtual LLXMLNodePtr getXML(bool save_children = true) const;
|
||||
static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
|
||||
|
||||
void parseChildXML(LLXMLNodePtr child, LLView *parent, LLUICtrlFactory *factory);
|
||||
|
||||
|
||||
// LLView Functionality
|
||||
virtual BOOL handleUnicodeCharHere( llwchar uni_char );
|
||||
virtual BOOL handleHover( S32 x, S32 y, MASK mask );
|
||||
virtual void draw( void );
|
||||
/*virtual*/ BOOL handleUnicodeCharHere( llwchar uni_char );
|
||||
/*virtual*/ BOOL handleHover( S32 x, S32 y, MASK mask );
|
||||
/*virtual*/ BOOL handleScrollWheel( S32 x, S32 y, S32 clicks );
|
||||
/*virtual*/ void draw( void );
|
||||
virtual void drawBackground(LLMenuItemGL* itemp, LLColor4& color);
|
||||
virtual void setVisible(BOOL visible);
|
||||
/*virtual*/ void setVisible(BOOL visible);
|
||||
/*virtual*/ bool addChild(LLView* view, S32 tab_group = 0);
|
||||
/*virtual*/ void removeChild( LLView* ctrl);
|
||||
/*virtual*/ BOOL postBuild();
|
||||
|
||||
virtual BOOL handleAcceleratorKey(KEY key, MASK mask);
|
||||
|
||||
@@ -461,23 +491,10 @@ public:
|
||||
void setBackgroundColor( const LLColor4& color ) { mBackgroundColor = color; }
|
||||
const LLColor4& getBackgroundColor() const { return mBackgroundColor; }
|
||||
void setBackgroundVisible( BOOL b ) { mBgVisible = b; }
|
||||
void setCanTearOff(BOOL tear_off, LLHandle<LLFloater> parent_floater_handle = LLHandle<LLFloater>());
|
||||
|
||||
// Add the menu item to this menu.
|
||||
virtual BOOL append( LLMenuItemGL* item );
|
||||
|
||||
// Remove a menu item from this menu.
|
||||
virtual BOOL remove( LLMenuItemGL* item );
|
||||
|
||||
// *NOTE:Mani - appendNoArrange() should be removed when merging to skinning/viewer2.0
|
||||
// Its added as a fix to a viewer 1.23 bug that has already been address by skinning work.
|
||||
virtual BOOL appendNoArrange( LLMenuItemGL* item );
|
||||
void setCanTearOff(BOOL tear_off);
|
||||
|
||||
// add a separator to this menu
|
||||
virtual BOOL appendSeparator( const std::string &separator_name = LLStringUtil::null );
|
||||
|
||||
// add a menu - this will create a cascading menu
|
||||
virtual BOOL appendMenu( LLMenuGL* menu );
|
||||
virtual BOOL addSeparator();
|
||||
|
||||
// for branching menu items, bring sub menus up to root level of menu hierarchy
|
||||
virtual void updateParent( LLView* parentp );
|
||||
@@ -512,10 +529,6 @@ public:
|
||||
// remove all items on the menu
|
||||
void empty( void );
|
||||
|
||||
// Rearrange the components, and do the right thing if the menu doesn't
|
||||
// fit in the bounds.
|
||||
// virtual void arrangeWithBounds(LLRect bounds);
|
||||
|
||||
void setItemLastSelected(LLMenuItemGL* item); // must be in menu
|
||||
U32 getItemCount(); // number of menu items
|
||||
LLMenuItemGL* getItem(S32 number); // 0 = first item
|
||||
@@ -550,15 +563,26 @@ public:
|
||||
static void setKeyboardMode(BOOL mode) { sKeyboardMode = mode; }
|
||||
static BOOL getKeyboardMode() { return sKeyboardMode; }
|
||||
|
||||
S32 getShortcutPad() { return mShortcutPad; }
|
||||
BOOL isScrollable() const { return FALSE; }
|
||||
|
||||
static class LLMenuHolderGL* sMenuContainer;
|
||||
|
||||
bool isScrollPositionOnShowReset() { return false; }
|
||||
protected:
|
||||
void createSpilloverBranch();
|
||||
void cleanupSpilloverBranch();
|
||||
// Add the menu item to this menu.
|
||||
virtual BOOL append( LLMenuItemGL* item );
|
||||
|
||||
// add a menu - this will create a cascading menu
|
||||
virtual BOOL appendMenu( LLMenuGL* menu );
|
||||
|
||||
// TODO: create accessor methods for these?
|
||||
typedef std::list< LLMenuItemGL* > item_list_t;
|
||||
item_list_t mItems;
|
||||
LLMenuItemGL*mFirstVisibleItem;
|
||||
|
||||
typedef std::map<KEY, LLMenuItemGL*> navigation_key_map_t;
|
||||
navigation_key_map_t mJumpKeys;
|
||||
S32 mLastMouseX;
|
||||
@@ -578,14 +602,14 @@ private:
|
||||
LLHandle<LLView> mParentMenuItem;
|
||||
LLUIString mLabel;
|
||||
BOOL mDropShadowed; // Whether to drop shadow
|
||||
BOOL mHasSelection;
|
||||
bool mHasSelection;
|
||||
LLFrameTimer mFadeTimer;
|
||||
BOOL mTornOff;
|
||||
class LLMenuItemTearOffGL* mTearOffItem;
|
||||
class LLMenuItemBranchGL* mSpilloverBranch;
|
||||
LLMenuGL* mSpilloverMenu;
|
||||
LLHandle<LLFloater> mParentFloaterHandle;
|
||||
KEY mJumpKey;
|
||||
S32 mShortcutPad;
|
||||
}; // end class LLMenuGL
|
||||
|
||||
|
||||
@@ -631,11 +655,11 @@ public:
|
||||
|
||||
virtual BOOL handleKeyHere(KEY key, MASK mask);
|
||||
|
||||
virtual BOOL isActive() const { return isOpen() && getBranch()->getHighlightedItem(); }
|
||||
virtual BOOL isActive() const;
|
||||
|
||||
virtual BOOL isOpen() const { return getBranch() && getBranch()->isOpen(); }
|
||||
virtual BOOL isOpen() const;
|
||||
|
||||
LLMenuGL *getBranch() const { return (LLMenuGL*)(mBranch.get()); }
|
||||
LLMenuGL* getBranch() const { return (LLMenuGL*)mBranchHandle.get(); }
|
||||
|
||||
virtual void updateBranchParent( LLView* parentp );
|
||||
|
||||
@@ -651,7 +675,7 @@ public:
|
||||
virtual LLView* getChildView(const std::string& name, BOOL recurse = TRUE, BOOL create_if_missing = TRUE) const;
|
||||
|
||||
private:
|
||||
LLHandle<LLView> mBranch;
|
||||
LLHandle<LLView> mBranchHandle;
|
||||
}; // end class LLMenuItemBranchGL
|
||||
|
||||
|
||||
@@ -684,8 +708,10 @@ public:
|
||||
virtual void draw();
|
||||
virtual void drawBackground(LLMenuItemGL* itemp, LLColor4& color);
|
||||
|
||||
private:
|
||||
virtual BOOL append(LLMenuItemGL* item);
|
||||
virtual BOOL appendSeparator( const std::string &separator_name = LLStringUtil::null );
|
||||
public:
|
||||
virtual BOOL addSeparator();
|
||||
|
||||
BOOL appendPieMenu(LLPieMenu *menu);
|
||||
|
||||
@@ -730,23 +756,17 @@ public:
|
||||
virtual LLXMLNodePtr getXML(bool save_children = true) const;
|
||||
static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
|
||||
|
||||
virtual BOOL handleAcceleratorKey(KEY key, MASK mask);
|
||||
virtual BOOL handleKeyHere(KEY key, MASK mask);
|
||||
virtual BOOL handleJumpKey(KEY key);
|
||||
virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
|
||||
virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
|
||||
void setVisible(BOOL visible);
|
||||
/*virtual*/ BOOL handleAcceleratorKey(KEY key, MASK mask);
|
||||
/*virtual*/ BOOL handleKeyHere(KEY key, MASK mask);
|
||||
/*virtual*/ BOOL handleJumpKey(KEY key);
|
||||
/*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask);
|
||||
|
||||
// rearrange the child rects so they fit the shape of the menu
|
||||
// bar.
|
||||
virtual void arrange( void );
|
||||
virtual void draw();
|
||||
virtual BOOL jumpKeysActive();
|
||||
/*virtual*/ void draw();
|
||||
/*virtual*/ BOOL jumpKeysActive();
|
||||
|
||||
// add a vertical separator to this menu
|
||||
virtual BOOL appendSeparator( const std::string &separator_name = LLStringUtil::null );
|
||||
|
||||
// add a menu - this will create a drop down menu.
|
||||
virtual BOOL appendMenu( LLMenuGL* menu );
|
||||
virtual BOOL addSeparator();
|
||||
|
||||
// LLView Functionality
|
||||
virtual BOOL handleHover( S32 x, S32 y, MASK mask );
|
||||
@@ -757,6 +777,12 @@ public:
|
||||
void resetMenuTrigger() { mAltKeyTrigger = FALSE; }
|
||||
|
||||
private:
|
||||
// add a menu - this will create a drop down menu.
|
||||
virtual BOOL appendMenu( LLMenuGL* menu );
|
||||
// rearrange the child rects so they fit the shape of the menu
|
||||
// bar.
|
||||
virtual void arrange( void );
|
||||
|
||||
void checkMenuTrigger();
|
||||
|
||||
std::list <LLKeyBinding*> mAccelerators;
|
||||
@@ -784,11 +810,20 @@ public:
|
||||
virtual BOOL handleMouseDown( S32 x, S32 y, MASK mask );
|
||||
virtual BOOL handleRightMouseDown( S32 x, S32 y, MASK mask );
|
||||
|
||||
// Close context menus on right mouse up not handled by menus.
|
||||
/*virtual*/ BOOL handleRightMouseUp( S32 x, S32 y, MASK mask );
|
||||
|
||||
virtual BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent);
|
||||
virtual const LLRect getMenuRect() const { return getLocalRect(); }
|
||||
virtual BOOL hasVisibleMenu() const;
|
||||
LLView*const getVisibleMenu() const;
|
||||
virtual BOOL hasVisibleMenu() const {return getVisibleMenu() != NULL;}
|
||||
|
||||
static void setActivatedItem(LLMenuItemGL* item);
|
||||
|
||||
// Need to detect if mouse-up after context menu spawn has moved.
|
||||
// If not, need to keep the menu up.
|
||||
static LLCoordGL sContextMenuSpawnPos;
|
||||
|
||||
private:
|
||||
static LLHandle<LLView> sItemLastSelectedHandle;
|
||||
static LLFrameTimer sItemActivationTimer;
|
||||
@@ -832,7 +867,7 @@ private:
|
||||
class LLMenuItemTearOffGL : public LLMenuItemGL
|
||||
{
|
||||
public:
|
||||
LLMenuItemTearOffGL( LLHandle<LLFloater> parent_floater_handle = LLHandle<LLFloater>());
|
||||
LLMenuItemTearOffGL();
|
||||
|
||||
virtual LLXMLNodePtr getXML(bool save_children = true) const;
|
||||
virtual std::string getType() const { return "tearoff_menu"; }
|
||||
@@ -841,8 +876,7 @@ public:
|
||||
virtual void draw(void);
|
||||
virtual U32 getNominalHeight() const;
|
||||
|
||||
private:
|
||||
LLHandle<LLFloater> mParentHandle;
|
||||
LLFloater* getParentFloater();
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -356,12 +356,12 @@ LLTextEditor::LLTextEditor(
|
||||
{
|
||||
menu = new LLMenuGL(LLStringUtil::null);
|
||||
}*/
|
||||
menu->append(new LLMenuItemCallGL("Cut", context_cut, NULL, this));
|
||||
menu->append(new LLMenuItemCallGL("Copy", context_copy, NULL, this));
|
||||
menu->append(new LLMenuItemCallGL("Paste", context_paste, NULL, this));
|
||||
menu->append(new LLMenuItemCallGL("Delete", context_delete, NULL, this));
|
||||
menu->append(new LLMenuItemCallGL("Select All", context_selectall, NULL, this));
|
||||
menu->appendSeparator("Spelsep");
|
||||
menu->addChild(new LLMenuItemCallGL("Cut", context_cut, NULL, this));
|
||||
menu->addChild(new LLMenuItemCallGL("Copy", context_copy, NULL, this));
|
||||
menu->addChild(new LLMenuItemCallGL("Paste", context_paste, NULL, this));
|
||||
menu->addChild(new LLMenuItemCallGL("Delete", context_delete, NULL, this));
|
||||
menu->addChild(new LLMenuItemCallGL("Select All", context_selectall, NULL, this));
|
||||
menu->addSeparator();
|
||||
menu->setCanTearOff(FALSE);
|
||||
menu->setVisible(FALSE);
|
||||
mPopupMenuHandle = menu->getHandle();
|
||||
@@ -1389,7 +1389,7 @@ BOOL LLTextEditor::handleRightMouseDown( S32 x, S32 y, MASK mask )
|
||||
SpellMenuBind * tempBind = suggestionMenuItems[i];
|
||||
if(tempBind)
|
||||
{
|
||||
menu->remove(tempBind->menuItem);
|
||||
menu->removeChild(tempBind->menuItem);
|
||||
tempBind->menuItem->die();
|
||||
//delete tempBind->menuItem;
|
||||
//tempBind->menuItem = NULL;
|
||||
@@ -1425,7 +1425,7 @@ BOOL LLTextEditor::handleRightMouseDown( S32 x, S32 y, MASK mask )
|
||||
tempStruct->word, spell_correct, NULL, tempStruct);
|
||||
tempStruct->menuItem = suggMenuItem;
|
||||
suggestionMenuItems.push_back(tempStruct);
|
||||
menu->append(suggMenuItem);
|
||||
menu->addChild(suggMenuItem);
|
||||
}
|
||||
SpellMenuBind * tempStruct = new SpellMenuBind;
|
||||
tempStruct->origin = this;
|
||||
@@ -1437,7 +1437,7 @@ BOOL LLTextEditor::handleRightMouseDown( S32 x, S32 y, MASK mask )
|
||||
"Add Word", spell_add, NULL, tempStruct);
|
||||
tempStruct->menuItem = suggMenuItem;
|
||||
suggestionMenuItems.push_back(tempStruct);
|
||||
menu->append(suggMenuItem);
|
||||
menu->addChild(suggMenuItem);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1456,12 +1456,11 @@ BOOL LLTextEditor::handleRightMouseDown( S32 x, S32 y, MASK mask )
|
||||
tempStruct->word, spell_show, NULL, tempStruct);
|
||||
tempStruct->menuItem = suggMenuItem;
|
||||
suggestionMenuItems.push_back(tempStruct);
|
||||
menu->append(suggMenuItem);
|
||||
menu->addChild(suggMenuItem);
|
||||
}
|
||||
mLastContextMenuX = x;
|
||||
mLastContextMenuY = y;
|
||||
menu->buildDrawLabels();
|
||||
menu->updateParent(LLMenuGL::sMenuContainer);
|
||||
LLMenuGL::showPopup(this, menu, x, y);
|
||||
}
|
||||
return TRUE;
|
||||
|
||||
@@ -935,11 +935,11 @@ void LLFloaterMessageLog::onClickClearLog(void* user_data)
|
||||
void LLFloaterMessageLog::onClickFilterChoice(void* user_data)
|
||||
{
|
||||
LLMenuGL* menu = new LLMenuGL(LLStringUtil::null);
|
||||
menu->append(new LLMenuItemCallGL("No filter", onClickFilterMenu, NULL, (void*)""));
|
||||
menu->append(new LLMenuItemCallGL("Fewer spammy messages", onClickFilterMenu, NULL, (void*)"!StartPingCheck !CompletePingCheck !PacketAck !SimulatorViewerTimeMessage !SimStats !AgentUpdate !AgentAnimation !AvatarAnimation !ViewerEffect !CoarseLocationUpdate !LayerData !CameraConstraint !ObjectUpdateCached !RequestMultipleObjects !ObjectUpdate !ObjectUpdateCompressed !ImprovedTerseObjectUpdate !KillObject !ImagePacket !SendXferPacket !ConfirmXferPacket !TransferPacket"));
|
||||
menu->append(new LLMenuItemCallGL("Fewer spammy messages (minus sound crap)", onClickFilterMenu, NULL, (void*)"!StartPingCheck !CompletePingCheck !PacketAck !SimulatorViewerTimeMessage !SimStats !AgentUpdate !AgentAnimation !AvatarAnimation !ViewerEffect !CoarseLocationUpdate !LayerData !CameraConstraint !ObjectUpdateCached !RequestMultipleObjects !ObjectUpdate !ObjectUpdateCompressed !ImprovedTerseObjectUpdate !KillObject !ImagePacket !SendXferPacket !ConfirmXferPacket !TransferPacket !SoundTrigger !AttachedSound !PreloadSound"));
|
||||
menu->append(new LLMenuItemCallGL("Object updates", onClickFilterMenu, NULL, (void*)"ObjectUpdateCached ObjectUpdate ObjectUpdateCompressed ImprovedTerseObjectUpdate KillObject RequestMultipleObjects"));
|
||||
menu->append(new LLMenuItemCallGL("Abnormal", onClickFilterMenu, NULL, (void*)"Invalid TestMessage AddCircuitCode NeighborList AvatarTextureUpdate SimulatorMapUpdate SimulatorSetMap SubscribeLoad UnsubscribeLoad SimulatorReady SimulatorPresentAtLocation SimulatorLoad SimulatorShutdownRequest RegionPresenceRequestByRegionID RegionPresenceRequestByHandle RegionPresenceResponse UpdateSimulator LogDwellTime FeatureDisabled LogFailedMoneyTransaction UserReportInternal SetSimStatusInDatabase SetSimPresenceInDatabase OpenCircuit CloseCircuit DirFindQueryBackend DirPlacesQueryBackend DirClassifiedQueryBackend DirLandQueryBackend DirPopularQueryBackend GroupNoticeAdd DataHomeLocationRequest DataHomeLocationReply DerezContainer ObjectCategory ObjectExportSelected StateSave ReportAutosaveCrash AgentAlertMessage NearestLandingRegionRequest NearestLandingRegionReply NearestLandingRegionUpdated TeleportLandingStatusChanged ConfirmEnableSimulator KickUserAck SystemKickUser AvatarPropertiesRequestBackend UpdateParcel RemoveParcel MergeParcel LogParcelChanges CheckParcelSales ParcelSales StartAuction ConfirmAuctionStart CompleteAuction CancelAuction CheckParcelAuctions ParcelAuctions ChatPass EdgeDataPacket SimStatus ChildAgentUpdate ChildAgentAlive ChildAgentPositionUpdate ChildAgentDying ChildAgentUnknown AtomicPassObject KillChildAgents ScriptSensorRequest ScriptSensorReply DataServerLogout RequestInventoryAsset InventoryAssetResponse TransferInventory TransferInventoryAck EventLocationRequest EventLocationReply MoneyTransferBackend RoutedMoneyBalanceReply SetStartLocation NetTest SetCPURatio SimCrashed NameValuePair RemoveNameValuePair UpdateAttachment RemoveAttachment EmailMessageRequest EmailMessageReply InternalScriptMail ScriptDataRequest ScriptDataReply InviteGroupResponse TallyVotes LiveHelpGroupRequest LiveHelpGroupReply GroupDataUpdate LogTextMessage CreateTrustedCircuit ParcelRename SystemMessage RpcChannelRequest RpcChannelReply RpcScriptRequestInbound RpcScriptRequestInboundForward RpcScriptReplyInbound ScriptMailRegistration Error"));
|
||||
menu->addChild(new LLMenuItemCallGL("No filter", onClickFilterMenu, NULL, (void*)""));
|
||||
menu->addChild(new LLMenuItemCallGL("Fewer spammy messages", onClickFilterMenu, NULL, (void*)"!StartPingCheck !CompletePingCheck !PacketAck !SimulatorViewerTimeMessage !SimStats !AgentUpdate !AgentAnimation !AvatarAnimation !ViewerEffect !CoarseLocationUpdate !LayerData !CameraConstraint !ObjectUpdateCached !RequestMultipleObjects !ObjectUpdate !ObjectUpdateCompressed !ImprovedTerseObjectUpdate !KillObject !ImagePacket !SendXferPacket !ConfirmXferPacket !TransferPacket"));
|
||||
menu->addChild(new LLMenuItemCallGL("Fewer spammy messages (minus sound crap)", onClickFilterMenu, NULL, (void*)"!StartPingCheck !CompletePingCheck !PacketAck !SimulatorViewerTimeMessage !SimStats !AgentUpdate !AgentAnimation !AvatarAnimation !ViewerEffect !CoarseLocationUpdate !LayerData !CameraConstraint !ObjectUpdateCached !RequestMultipleObjects !ObjectUpdate !ObjectUpdateCompressed !ImprovedTerseObjectUpdate !KillObject !ImagePacket !SendXferPacket !ConfirmXferPacket !TransferPacket !SoundTrigger !AttachedSound !PreloadSound"));
|
||||
menu->addChild(new LLMenuItemCallGL("Object updates", onClickFilterMenu, NULL, (void*)"ObjectUpdateCached ObjectUpdate ObjectUpdateCompressed ImprovedTerseObjectUpdate KillObject RequestMultipleObjects"));
|
||||
menu->addChild(new LLMenuItemCallGL("Abnormal", onClickFilterMenu, NULL, (void*)"Invalid TestMessage AddCircuitCode NeighborList AvatarTextureUpdate SimulatorMapUpdate SimulatorSetMap SubscribeLoad UnsubscribeLoad SimulatorReady SimulatorPresentAtLocation SimulatorLoad SimulatorShutdownRequest RegionPresenceRequestByRegionID RegionPresenceRequestByHandle RegionPresenceResponse UpdateSimulator LogDwellTime FeatureDisabled LogFailedMoneyTransaction UserReportInternal SetSimStatusInDatabase SetSimPresenceInDatabase OpenCircuit CloseCircuit DirFindQueryBackend DirPlacesQueryBackend DirClassifiedQueryBackend DirLandQueryBackend DirPopularQueryBackend GroupNoticeAdd DataHomeLocationRequest DataHomeLocationReply DerezContainer ObjectCategory ObjectExportSelected StateSave ReportAutosaveCrash AgentAlertMessage NearestLandingRegionRequest NearestLandingRegionReply NearestLandingRegionUpdated TeleportLandingStatusChanged ConfirmEnableSimulator KickUserAck SystemKickUser AvatarPropertiesRequestBackend UpdateParcel RemoveParcel MergeParcel LogParcelChanges CheckParcelSales ParcelSales StartAuction ConfirmAuctionStart CompleteAuction CancelAuction CheckParcelAuctions ParcelAuctions ChatPass EdgeDataPacket SimStatus ChildAgentUpdate ChildAgentAlive ChildAgentPositionUpdate ChildAgentDying ChildAgentUnknown AtomicPassObject KillChildAgents ScriptSensorRequest ScriptSensorReply DataServerLogout RequestInventoryAsset InventoryAssetResponse TransferInventory TransferInventoryAck EventLocationRequest EventLocationReply MoneyTransferBackend RoutedMoneyBalanceReply SetStartLocation NetTest SetCPURatio SimCrashed NameValuePair RemoveNameValuePair UpdateAttachment RemoveAttachment EmailMessageRequest EmailMessageReply InternalScriptMail ScriptDataRequest ScriptDataReply InviteGroupResponse TallyVotes LiveHelpGroupRequest LiveHelpGroupReply GroupDataUpdate LogTextMessage CreateTrustedCircuit ParcelRename SystemMessage RpcChannelRequest RpcChannelReply RpcScriptRequestInbound RpcScriptRequestInboundForward RpcScriptReplyInbound ScriptMailRegistration Error"));
|
||||
menu->updateParent(LLMenuGL::sMenuContainer);
|
||||
menu->setCanTearOff(FALSE);
|
||||
LLView* buttonp = sInstance->getChild<LLView>("filter_choice_btn");
|
||||
|
||||
@@ -2890,7 +2890,7 @@ void LLFolderBridge::buildContextMenuFolderOptions(U32 flags)
|
||||
mItems.push_back(std::string("Add To Outfit"));
|
||||
}
|
||||
else if(!InventoryLinksEnabled())
|
||||
mItems.push_back(std::string("Wear Items"));
|
||||
mItems.push_back(std::string("Wearable And Object Wear"));
|
||||
mItems.push_back(std::string("Replace Outfit"));
|
||||
}
|
||||
mItems.push_back(std::string("Remove From Outfit"));
|
||||
@@ -4738,7 +4738,7 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
|
||||
disabled_items.push_back(std::string("Attach To"));
|
||||
disabled_items.push_back(std::string("Attach To HUD"));
|
||||
}
|
||||
// [RLVa:KB] - Checked: 2010-09-03 (RLVa-1.2.1a) | Modified: RLVa-1.2.1a | OK
|
||||
/*// [RLVa:KB] - Checked: 2010-09-03 (RLVa-1.2.1a) | Modified: RLVa-1.2.1a | OK
|
||||
else if (rlv_handler_t::isEnabled())
|
||||
{
|
||||
ERlvWearMask eWearMask = gRlvAttachmentLocks.canAttach(item);
|
||||
@@ -4747,7 +4747,7 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
|
||||
if ((eWearMask & RLV_WEAR_ADD) == 0)
|
||||
disabled_items.push_back(std::string("Object Add"));
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
// [/RLVa:KB]*/
|
||||
|
||||
LLMenuGL* attach_menu = menu.getChildMenuByName("Attach To", TRUE);
|
||||
LLMenuGL* attach_hud_menu = menu.getChildMenuByName("Attach To HUD", TRUE);
|
||||
@@ -4766,7 +4766,7 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
|
||||
if (attachment->getIsHUDAttachment())
|
||||
{
|
||||
// [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c)
|
||||
attach_hud_menu->append(new_item = new LLMenuItemCallGL(attachment->getName(),
|
||||
attach_hud_menu->addChild(new_item = new LLMenuItemCallGL(attachment->getName(),
|
||||
NULL, //&LLObjectBridge::attachToAvatar,
|
||||
(rlv_handler_t::isEnabled()) ? &rlvAttachToEnabler : NULL,
|
||||
&attach_label, (void*)attachment));
|
||||
@@ -4775,7 +4775,7 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
|
||||
else
|
||||
{
|
||||
// [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c)
|
||||
attach_menu->append(new_item = new LLMenuItemCallGL(attachment->getName(),
|
||||
attach_menu->addChild(new_item = new LLMenuItemCallGL(attachment->getName(),
|
||||
NULL, //&LLObjectBridge::attachToAvatar,
|
||||
(rlv_handler_t::isEnabled()) ? &rlvAttachToEnabler : NULL,
|
||||
&attach_label, (void*)attachment));
|
||||
@@ -4790,7 +4790,7 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
|
||||
}
|
||||
}
|
||||
LLMenuItemCallGL *new_item = new LLMenuItemCallGL("Custom...", NULL, NULL);
|
||||
attach_menu->append(new_item);
|
||||
attach_menu->addChild(new_item);
|
||||
LLSimpleListener* callback = mInventoryPanel.get()->getListenerByName("Inventory.AttachCustom");
|
||||
new_item->addListener(callback, "on_click", LLSD());
|
||||
}
|
||||
@@ -5138,13 +5138,13 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
|
||||
items.push_back(std::string("Wearable And Object Separator"));
|
||||
|
||||
items.push_back(std::string("Wearable Edit"));
|
||||
// [RLVa:KB] - Checked: 2011-09-16 (RLVa-1.1.4a) | Added: RLVa-1.1.4a
|
||||
/*// [RLVa:KB] - Checked: 2011-09-16 (RLVa-1.1.4a) | Added: RLVa-1.1.4a
|
||||
if ( (rlv_handler_t::isEnabled()) && (!gRlvWearableLocks.canRemove(item)) )
|
||||
{
|
||||
disabled_items.push_back(std::string("Wearable And Object Wear"));
|
||||
disabled_items.push_back(std::string("Wearable Edit"));
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
// [/RLVa:KB]*/
|
||||
|
||||
if ((flags & FIRST_SELECTED_ITEM) == 0)
|
||||
{
|
||||
@@ -5165,10 +5165,10 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
|
||||
{
|
||||
case LLAssetType::AT_CLOTHING:
|
||||
items.push_back(std::string("Take Off"));
|
||||
// [RLVa:KB] - Checked: 2011-09-16 (RLVa-1.1.4a) | Added: RLVa-1.1.4a
|
||||
/*// [RLVa:KB] - Checked: 2011-09-16 (RLVa-1.1.4a) | Added: RLVa-1.1.4a
|
||||
if ( (rlv_handler_t::isEnabled()) && (!gRlvWearableLocks.canRemove(item)) )
|
||||
disabled_items.push_back(std::string("Take Off"));
|
||||
// [/RLVa:KB]
|
||||
// [/RLVa:KB]*/
|
||||
// Fallthrough since clothing and bodypart share wear options
|
||||
case LLAssetType::AT_BODYPART:
|
||||
if (get_is_item_worn(item->getUUID()))
|
||||
|
||||
@@ -1127,7 +1127,7 @@ void LLTaskSoundBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
|
||||
}
|
||||
|
||||
items.push_back(std::string("Task Play"));
|
||||
/*menu.appendSeparator();
|
||||
/*menu.addSeparator();
|
||||
menu.append(new LLMenuItemCallGL("Play",
|
||||
&LLTaskSoundBridge::playSound,
|
||||
NULL,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -290,7 +290,7 @@ BOOL LLVOAvatarSelf::buildMenus()
|
||||
// object_selected_and_point_valid);
|
||||
item->addListener(gMenuHolder->getListenerByName("Object.AttachToAvatar"), "on_click", iter->first);
|
||||
|
||||
gAttachPieMenu->append(item);
|
||||
gAttachPieMenu->addChild(item);
|
||||
|
||||
attachment_found = TRUE;
|
||||
break;
|
||||
@@ -306,7 +306,7 @@ BOOL LLVOAvatarSelf::buildMenus()
|
||||
|
||||
if (!attachment_found)
|
||||
{
|
||||
gAttachPieMenu->appendSeparator();
|
||||
gAttachPieMenu->addSeparator();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -324,7 +324,7 @@ BOOL LLVOAvatarSelf::buildMenus()
|
||||
LLViewerJointAttachment* attachment = iter->second;
|
||||
if (attachment->getGroup() == i)
|
||||
{
|
||||
gDetachPieMenu->append(new LLMenuItemCallGL(attachment->getName(),
|
||||
gDetachPieMenu->addChild(new LLMenuItemCallGL(attachment->getName(),
|
||||
&handle_detach_from_avatar, object_attached, attachment));
|
||||
|
||||
attachment_found = TRUE;
|
||||
@@ -334,7 +334,7 @@ BOOL LLVOAvatarSelf::buildMenus()
|
||||
|
||||
if (!attachment_found)
|
||||
{
|
||||
gDetachPieMenu->appendSeparator();
|
||||
gDetachPieMenu->addSeparator();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -358,8 +358,8 @@ BOOL LLVOAvatarSelf::buildMenus()
|
||||
// NULL,
|
||||
// object_selected_and_point_valid);
|
||||
item->addListener(gMenuHolder->getListenerByName("Object.AttachToAvatar"), "on_click", iter->first);
|
||||
gAttachScreenPieMenu->append(item);
|
||||
gDetachScreenPieMenu->append(new LLMenuItemCallGL(attachment->getName(),
|
||||
gAttachScreenPieMenu->addChild(item);
|
||||
gDetachScreenPieMenu->addChild(new LLMenuItemCallGL(attachment->getName(),
|
||||
&handle_detach_from_avatar, object_attached, attachment));
|
||||
}
|
||||
}
|
||||
@@ -387,17 +387,17 @@ BOOL LLVOAvatarSelf::buildMenus()
|
||||
NULL, &object_selected_and_point_valid,
|
||||
&attach_label, attachment);
|
||||
item->addListener(gMenuHolder->getListenerByName("Object.AttachToAvatar"), "on_click", iter->first);
|
||||
gAttachSubMenu->append(item);
|
||||
gAttachSubMenu->addChild(item);
|
||||
|
||||
gDetachSubMenu->append(new LLMenuItemCallGL(attachment->getName(),
|
||||
gDetachSubMenu->addChild(new LLMenuItemCallGL(attachment->getName(),
|
||||
&handle_detach_from_avatar, object_attached, &detach_label, attachment));
|
||||
|
||||
}
|
||||
if (pass == 0)
|
||||
{
|
||||
// put separator between non-hud and hud attachments
|
||||
gAttachSubMenu->appendSeparator();
|
||||
gDetachSubMenu->appendSeparator();
|
||||
gAttachSubMenu->addSeparator();
|
||||
gDetachSubMenu->addSeparator();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -434,8 +434,8 @@ BOOL LLVOAvatarSelf::buildMenus()
|
||||
S32 attach_index = attach_it->second;
|
||||
while (cur_pie_slice < requested_pie_slice)
|
||||
{
|
||||
gAttachBodyPartPieMenus[group]->appendSeparator();
|
||||
gDetachBodyPartPieMenus[group]->appendSeparator();
|
||||
gAttachBodyPartPieMenus[group]->addSeparator();
|
||||
gDetachBodyPartPieMenus[group]->addSeparator();
|
||||
cur_pie_slice++;
|
||||
}
|
||||
|
||||
@@ -449,9 +449,9 @@ BOOL LLVOAvatarSelf::buildMenus()
|
||||
// [/RLVa:KB]
|
||||
// LLMenuItemCallGL* item = new LLMenuItemCallGL(attachment->getName(),
|
||||
// NULL, object_selected_and_point_valid);
|
||||
gAttachBodyPartPieMenus[group]->append(item);
|
||||
gAttachBodyPartPieMenus[group]->addChild(item);
|
||||
item->addListener(gMenuHolder->getListenerByName("Object.AttachToAvatar"), "on_click", attach_index);
|
||||
gDetachBodyPartPieMenus[group]->append(new LLMenuItemCallGL(attachment->getName(),
|
||||
gDetachBodyPartPieMenus[group]->addChild(new LLMenuItemCallGL(attachment->getName(),
|
||||
&handle_detach_from_avatar,
|
||||
object_attached, attachment));
|
||||
cur_pie_slice++;
|
||||
|
||||
@@ -58,8 +58,8 @@
|
||||
left_delta="0" mouse_opaque="true" name="Worn Items"
|
||||
sort_order="WornItemsSortOrder" width="461" />
|
||||
</tab_container>
|
||||
<menu_bar bottom="-34" drop_shadow="false" follows="left|top|right" height="18" left="2"
|
||||
mouse_opaque="false" name="Inventory Menu" opaque="false" width="461">
|
||||
<menu_bar bottom="-34" drop_shadow="false" follows="top|left" height="18" left="2"
|
||||
mouse_opaque="false" name="Inventory Menu" opaque="false" width="237">
|
||||
<menu bottom_delta="16" drop_shadow="true" height="101"
|
||||
label="File" left="0" mouse_opaque="false" name="File" opaque="true"
|
||||
tear_off="true" width="128">
|
||||
|
||||
Reference in New Issue
Block a user