summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2019-01-04 17:10:28 -0800
committerRider Linden <rider@lindenlab.com>2019-01-04 17:10:28 -0800
commit64e45b5b6ef8ded7bbea1b376e5bf2cbb0d6f5a4 (patch)
tree1d2334529f952a303188856794feb765749290b6 /indra/llui
parente9a2e8f88c67685ea6b894e8a4ae289067d0bfb7 (diff)
SL-10041, SL-9758: Environment tab is disabled(shows can't do this) when EM does not allow parcel override. "Commit" button now reads "Apply to Parcel" or "Apply to Region" as needed.
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llmenugl.cpp22
-rw-r--r--indra/llui/llmenugl.h3
2 files changed, 25 insertions, 0 deletions
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp
index 0d42f726fa..ddcce61123 100644
--- a/indra/llui/llmenugl.cpp
+++ b/indra/llui/llmenugl.cpp
@@ -2713,6 +2713,15 @@ void LLMenuGL::setItemVisible( const std::string& name, BOOL visible )
}
}
+
+void LLMenuGL::setItemLabel(const std::string &name, const std::string &label)
+{
+ LLMenuItemGL *item = getItem(name);
+
+ if (item)
+ item->setLabel(label);
+}
+
void LLMenuGL::setItemLastSelected(LLMenuItemGL* item)
{
if (getVisible())
@@ -2757,6 +2766,19 @@ LLMenuItemGL* LLMenuGL::getItem(S32 number)
return NULL;
}
+LLMenuItemGL* LLMenuGL::getItem(std::string name)
+{
+ item_list_t::iterator item_iter;
+ for (item_iter = mItems.begin(); item_iter != mItems.end(); ++item_iter)
+ {
+ if ((*item_iter)->getName() == name)
+ {
+ return (*item_iter);
+ }
+ }
+ return NULL;
+}
+
LLMenuItemGL* LLMenuGL::getHighlightedItem()
{
item_list_t::iterator item_iter;
diff --git a/indra/llui/llmenugl.h b/indra/llui/llmenugl.h
index 69f7d21513..6ca581fa86 100644
--- a/indra/llui/llmenugl.h
+++ b/indra/llui/llmenugl.h
@@ -463,6 +463,8 @@ public:
void setEnabledSubMenus(BOOL enable);
void setItemVisible( const std::string& name, BOOL visible);
+
+ void setItemLabel(const std::string &name, const std::string &label);
// sets the left,bottom corner of menu, useful for popups
void setLeftAndBottom(S32 left, S32 bottom);
@@ -493,6 +495,7 @@ public:
void setItemLastSelected(LLMenuItemGL* item); // must be in menu
U32 getItemCount(); // number of menu items
LLMenuItemGL* getItem(S32 number); // 0 = first item
+ LLMenuItemGL* getItem(std::string name);
LLMenuItemGL* getHighlightedItem();
LLMenuItemGL* highlightNextItem(LLMenuItemGL* cur_item, BOOL skip_disabled = TRUE);