summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llfolderviewitem.cpp14
-rw-r--r--indra/llui/llfolderviewitem.h4
-rw-r--r--indra/llui/llmenugl.cpp2
-rw-r--r--indra/llui/llmodaldialog.cpp22
4 files changed, 28 insertions, 14 deletions
diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp
index 9f49b32f50..477e0bc492 100644
--- a/indra/llui/llfolderviewitem.cpp
+++ b/indra/llui/llfolderviewitem.cpp
@@ -31,11 +31,12 @@
#include "llfolderviewitem.h"
#include "llfolderview.h"
#include "llfolderviewmodel.h"
-#include "llpanel.h"
#include "llcallbacklist.h"
#include "llcriticaldamp.h"
#include "llclipboard.h"
#include "llfocusmgr.h" // gFocusMgr
+#include "llnotificationsutil.h"
+#include "llpanel.h"
#include "lltrans.h"
#include "llwindow.h"
@@ -139,7 +140,7 @@ LLFolderViewItem::Params::Params()
item_height("item_height"),
item_top_pad("item_top_pad"),
creation_date(),
- allow_wear("allow_wear", true),
+ marketplace_item("marketplace_item", false),
allow_drop("allow_drop", true),
font_color("font_color"),
font_highlight_color("font_highlight_color"),
@@ -181,7 +182,7 @@ LLFolderViewItem::LLFolderViewItem(const LLFolderViewItem::Params& p)
mRoot(p.root),
mViewModelItem(p.listener),
mIsMouseOverTitle(false),
- mAllowWear(p.allow_wear),
+ mMarketplaceItem(p.marketplace_item),
mAllowDrop(p.allow_drop),
mFontColor(p.font_color),
mFontHighlightColor(p.font_highlight_color),
@@ -568,10 +569,15 @@ void LLFolderViewItem::buildContextMenu(LLMenuGL& menu, U32 flags)
void LLFolderViewItem::openItem( void )
{
- if (mAllowWear || !getViewModelItem()->isItemWearable())
+ if (!mMarketplaceItem || !getViewModelItem()->isItemWearable())
{
getViewModelItem()->openItem();
}
+ else if (mMarketplaceItem)
+ {
+ // Wearing an object from any listing, active or not, is verbotten
+ LLNotificationsUtil::add("AlertMerchantListingCannotWear");
+ }
}
void LLFolderViewItem::rename(const std::string& new_name)
diff --git a/indra/llui/llfolderviewitem.h b/indra/llui/llfolderviewitem.h
index 5f979231e1..61bdeef188 100644
--- a/indra/llui/llfolderviewitem.h
+++ b/indra/llui/llfolderviewitem.h
@@ -62,7 +62,7 @@ public:
item_top_pad;
Optional<time_t> creation_date;
- Optional<bool> allow_wear;
+ Optional<bool> marketplace_item;
Optional<bool> allow_drop;
Optional<LLUIColor> font_color;
@@ -126,7 +126,7 @@ protected:
mIsCurSelection,
mDragAndDropTarget,
mIsMouseOverTitle,
- mAllowWear,
+ mMarketplaceItem,
mAllowDrop,
mSingleFolderMode,
mDoubleClickOverride,
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp
index cc770ca90a..6b2723b305 100644
--- a/indra/llui/llmenugl.cpp
+++ b/indra/llui/llmenugl.cpp
@@ -46,6 +46,7 @@
#include "llfocusmgr.h"
#include "llcoord.h"
#include "llwindow.h"
+#include "llemojihelper.h"
#include "llcriticaldamp.h"
#include "lluictrlfactory.h"
@@ -1411,6 +1412,7 @@ void LLMenuItemBranchDownGL::openMenu( void )
}
else
{
+ LLEmojiHelper::instance().hideHelper(nullptr, true);
if (branch->getTornOff())
{
LLFloater * branch_parent = dynamic_cast<LLFloater *>(branch->getParent());
diff --git a/indra/llui/llmodaldialog.cpp b/indra/llui/llmodaldialog.cpp
index c5c31f7252..d3658bcf9f 100644
--- a/indra/llui/llmodaldialog.cpp
+++ b/indra/llui/llmodaldialog.cpp
@@ -28,6 +28,7 @@
#include "llmodaldialog.h"
+#include "llemojihelper.h"
#include "llfocusmgr.h"
#include "v4color.h"
#include "v2math.h"
@@ -35,19 +36,20 @@
#include "llwindow.h"
#include "llkeyboard.h"
#include "llmenugl.h"
+
// static
std::list<LLModalDialog*> LLModalDialog::sModalStack;
-LLModalDialog::LLModalDialog( const LLSD& key, bool modal )
+LLModalDialog::LLModalDialog(const LLSD& key, bool modal)
: LLFloater(key),
- mModal( modal )
+ mModal(modal)
{
if (modal)
{
setCanMinimize(false);
setCanClose(false);
}
- setVisible( false );
+ setVisible(false);
setBackgroundVisible(true);
setBackgroundOpaque(true);
centerOnScreen(); // default position
@@ -98,7 +100,7 @@ void LLModalDialog::onOpen(const LLSD& key)
{
if (mModal)
{
- // If Modal, Hide the active modal dialog
+ // If Modal, hide the active modal dialog
if (!sModalStack.empty())
{
LLModalDialog* front = sModalStack.front();
@@ -148,13 +150,18 @@ void LLModalDialog::stopModal()
}
}
-
void LLModalDialog::setVisible( bool visible )
{
if (mModal)
{
- if( visible )
+ if (visible)
{
+ // Hide all menus currently shown
+ LLMenuGL::sMenuContainer->hideMenus();
+
+ // Hide EmojiPicker if it is shown
+ LLEmojiHelper::instance().hideHelper(nullptr, true);
+
// This is a modal dialog. It sucks up all mouse and keyboard operations.
gFocusMgr.setMouseCapture( this );
@@ -257,7 +264,6 @@ bool LLModalDialog::handleRightMouseDown(S32 x, S32 y, MASK mask)
return true;
}
-
bool LLModalDialog::handleKeyHere(KEY key, MASK mask )
{
LLFloater::handleKeyHere(key, mask );
@@ -301,7 +307,6 @@ void LLModalDialog::centerOnScreen()
centerWithin(LLRect(0, 0, ll_round(window_size.mV[VX]), ll_round(window_size.mV[VY])));
}
-
// static
void LLModalDialog::onAppFocusLost()
{
@@ -333,6 +338,7 @@ void LLModalDialog::onAppFocusGained()
}
}
+// static
void LLModalDialog::shutdownModals()
{
// This method is only for use during app shutdown. ~LLModalDialog()