summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorMaximB ProductEngine <mberezhnoy@productengine.com>2012-12-06 21:43:19 +0200
committerMaximB ProductEngine <mberezhnoy@productengine.com>2012-12-06 21:43:19 +0200
commit567df7bf275dfd33cf1b1fea945e3e544571b4aa (patch)
treea0424cde27634e1749f7449e5f04e3418d0e8ca9 /indra
parent272d438ce299fab146e9a30046b7591de7467511 (diff)
parent32d7131b1034d03fa9d3fdde8b86ee9880bb4f67 (diff)
merge
Diffstat (limited to 'indra')
-rwxr-xr-xindra/llui/llfolderviewitem.cpp39
-rwxr-xr-xindra/llui/llfolderviewitem.h10
-rw-r--r--indra/llui/llnotifications.cpp3
-rw-r--r--indra/llui/llnotifications.h13
-rw-r--r--indra/llui/lltabcontainer.cpp11
-rw-r--r--indra/llui/lltabcontainer.h4
-rw-r--r--indra/newview/llconversationmodel.cpp1
-rw-r--r--indra/newview/llfloaterimcontainer.cpp71
-rw-r--r--indra/newview/llfloaterimcontainer.h1
-rw-r--r--indra/newview/llfloaterimnearbychat.cpp1
-rw-r--r--indra/newview/llfloaterimsession.cpp1
-rw-r--r--indra/newview/llfloaterimsessiontab.cpp2
-rw-r--r--indra/newview/llimview.cpp20
-rw-r--r--indra/newview/llinventorybridge.cpp5
-rw-r--r--indra/newview/llinventorybridge.h1
-rw-r--r--indra/newview/llinventorypanel.cpp24
-rw-r--r--indra/newview/llinventorypanel.h7
-rw-r--r--indra/newview/llnotificationofferhandler.cpp1
-rwxr-xr-xindra/newview/llviewermessage.cpp5
-rw-r--r--indra/newview/skins/default/xui/en/menu_conversation.xml12
20 files changed, 165 insertions, 67 deletions
diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp
index 9facf65802..0a06ce66aa 100755
--- a/indra/llui/llfolderviewitem.cpp
+++ b/indra/llui/llfolderviewitem.cpp
@@ -47,16 +47,14 @@ static LLDefaultChildRegistry::Register<LLFolderViewItem> r("folder_view_item");
// statics
std::map<U8, LLFontGL*> LLFolderViewItem::sFonts; // map of styles to fonts
+bool LLFolderViewItem::sColorSetInitialized = false;
LLUIColor LLFolderViewItem::sFgColor;
LLUIColor LLFolderViewItem::sHighlightBgColor;
-LLUIColor LLFolderViewItem::sHighlightFgColor;
LLUIColor LLFolderViewItem::sFocusOutlineColor;
LLUIColor LLFolderViewItem::sMouseOverColor;
LLUIColor LLFolderViewItem::sFilterBGColor;
LLUIColor LLFolderViewItem::sFilterTextColor;
LLUIColor LLFolderViewItem::sSuffixColor;
-LLUIColor LLFolderViewItem::sLibraryColor;
-LLUIColor LLFolderViewItem::sLinkColor;
LLUIColor LLFolderViewItem::sSearchStatusColor;
// only integers can be initialized in header
@@ -106,6 +104,8 @@ LLFolderViewItem::Params::Params()
item_top_pad("item_top_pad"),
creation_date(),
allow_open("allow_open", true),
+ font_color("font_color"),
+ font_highlight_color("font_highlight_color"),
left_pad("left_pad", 0),
icon_pad("icon_pad", 0),
icon_width("icon_width", 0),
@@ -113,7 +113,7 @@ LLFolderViewItem::Params::Params()
text_pad_right("text_pad_right", 0),
arrow_size("arrow_size", 0),
max_folder_item_overlap("max_folder_item_overlap", 0)
-{}
+{ }
// Default constructor
LLFolderViewItem::LLFolderViewItem(const LLFolderViewItem::Params& p)
@@ -137,6 +137,8 @@ LLFolderViewItem::LLFolderViewItem(const LLFolderViewItem::Params& p)
mViewModelItem(p.listener),
mIsMouseOverTitle(false),
mAllowOpen(p.allow_open),
+ mFontColor(p.font_color),
+ mFontHighlightColor(p.font_highlight_color),
mLeftPad(p.left_pad),
mIconPad(p.icon_pad),
mIconWidth(p.icon_width),
@@ -145,17 +147,18 @@ LLFolderViewItem::LLFolderViewItem(const LLFolderViewItem::Params& p)
mArrowSize(p.arrow_size),
mMaxFolderItemOverlap(p.max_folder_item_overlap)
{
- sFgColor = LLUIColorTable::instance().getColor("MenuItemEnabledColor", DEFAULT_WHITE);
- sHighlightBgColor = LLUIColorTable::instance().getColor("MenuItemHighlightBgColor", DEFAULT_WHITE);
- sHighlightFgColor = LLUIColorTable::instance().getColor("MenuItemHighlightFgColor", DEFAULT_WHITE);
- sFocusOutlineColor = LLUIColorTable::instance().getColor("InventoryFocusOutlineColor", DEFAULT_WHITE);
- sMouseOverColor = LLUIColorTable::instance().getColor("InventoryMouseOverColor", DEFAULT_WHITE);
- sFilterBGColor = LLUIColorTable::instance().getColor("FilterBackgroundColor", DEFAULT_WHITE);
- sFilterTextColor = LLUIColorTable::instance().getColor("FilterTextColor", DEFAULT_WHITE);
- sSuffixColor = LLUIColorTable::instance().getColor("InventoryItemColor", DEFAULT_WHITE);
- sLibraryColor = LLUIColorTable::instance().getColor("InventoryItemLibraryColor", DEFAULT_WHITE);
- sLinkColor = LLUIColorTable::instance().getColor("InventoryItemLinkColor", DEFAULT_WHITE);
- sSearchStatusColor = LLUIColorTable::instance().getColor("InventorySearchStatusColor", DEFAULT_WHITE);
+ if (!sColorSetInitialized)
+ {
+ sFgColor = LLUIColorTable::instance().getColor("MenuItemEnabledColor", DEFAULT_WHITE);
+ sHighlightBgColor = LLUIColorTable::instance().getColor("MenuItemHighlightBgColor", DEFAULT_WHITE);
+ sFocusOutlineColor = LLUIColorTable::instance().getColor("InventoryFocusOutlineColor", DEFAULT_WHITE);
+ sMouseOverColor = LLUIColorTable::instance().getColor("InventoryMouseOverColor", DEFAULT_WHITE);
+ sFilterBGColor = LLUIColorTable::instance().getColor("FilterBackgroundColor", DEFAULT_WHITE);
+ sFilterTextColor = LLUIColorTable::instance().getColor("FilterTextColor", DEFAULT_WHITE);
+ sSuffixColor = LLUIColorTable::instance().getColor("InventoryItemColor", DEFAULT_WHITE);
+ sSearchStatusColor = LLUIColorTable::instance().getColor("InventorySearchStatusColor", DEFAULT_WHITE);
+ sColorSetInitialized = true;
+ }
if (mViewModelItem)
{
@@ -785,10 +788,6 @@ void LLFolderViewItem::drawHighlight(const BOOL showContent, const BOOL hasKeybo
void LLFolderViewItem::drawLabel(const LLFontGL * font, const F32 x, const F32 y, const LLColor4& color, F32 &right_x)
{
- //TODO RN: implement this in terms of getColor()
- //if (highlight_link) color = sLinkColor;
- //if (gInventory.isObjectDescendentOf(getViewModelItem()->getUUID(), gInventory.getLibraryRootFolderID())) color = sLibraryColor;
-
//--------------------------------------------------------------------------------//
// Draw the actual label text
//
@@ -857,7 +856,7 @@ void LLFolderViewItem::draw()
box_image->draw(box_rect, sFilterBGColor);
}
- LLColor4 color = (mIsSelected && filled) ? sHighlightFgColor : sFgColor;
+ LLColor4 color = (mIsSelected && filled) ? mFontHighlightColor : mFontColor;
drawLabel(font, text_left, y, color, right_x);
//--------------------------------------------------------------------------------//
diff --git a/indra/llui/llfolderviewitem.h b/indra/llui/llfolderviewitem.h
index a35193f948..d7f5e86aea 100755
--- a/indra/llui/llfolderviewitem.h
+++ b/indra/llui/llfolderviewitem.h
@@ -61,6 +61,9 @@ public:
Optional<time_t> creation_date;
Optional<bool> allow_open;
+ Optional<LLUIColor> font_color;
+ Optional<LLUIColor> font_highlight_color;
+
Optional<S32> left_pad,
icon_pad,
icon_width,
@@ -116,19 +119,20 @@ protected:
mIsMouseOverTitle,
mAllowOpen,
mSelectPending;
+
+ LLUIColor mFontColor;
+ LLUIColor mFontHighlightColor;
// For now assuming all colors are the same in derived classes.
+ static bool sColorSetInitialized;
static LLUIColor sFgColor;
static LLUIColor sFgDisabledColor;
static LLUIColor sHighlightBgColor;
- static LLUIColor sHighlightFgColor;
static LLUIColor sFocusOutlineColor;
static LLUIColor sMouseOverColor;
static LLUIColor sFilterBGColor;
static LLUIColor sFilterTextColor;
static LLUIColor sSuffixColor;
- static LLUIColor sLibraryColor;
- static LLUIColor sLinkColor;
static LLUIColor sSearchStatusColor;
// this is an internal method used for adding items to folders. A
diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp
index 66144671c9..fd9bfec203 100644
--- a/indra/llui/llnotifications.cpp
+++ b/indra/llui/llnotifications.cpp
@@ -475,7 +475,8 @@ LLNotification::LLNotification(const LLSDParamAdapter<Params>& p) :
mCancelled(false),
mIgnored(false),
mResponderObj(NULL),
- mId(p.id.isProvided() ? p.id : LLUUID::generateNewID())
+ mId(p.id.isProvided() ? p.id : LLUUID::generateNewID()),
+ mOfferFromAgent(p.offer_from_agent)
{
if (p.functor.name.isChosen())
{
diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h
index 088931858a..372b9ce46f 100644
--- a/indra/llui/llnotifications.h
+++ b/indra/llui/llnotifications.h
@@ -316,6 +316,7 @@ public:
expiry;
Optional<LLNotificationContext*> context;
Optional<void*> responder;
+ Optional<bool> offer_from_agent;
struct Functor : public LLInitParam::ChoiceBlock<Functor>
{
@@ -339,7 +340,8 @@ public:
payload("payload"),
form_elements("form"),
substitutions("substitutions"),
- expiry("expiry")
+ expiry("expiry"),
+ offer_from_agent("offer_from_agent", false)
{
time_stamp = LLDate::now();
responder = NULL;
@@ -352,7 +354,8 @@ public:
payload("payload"),
form_elements("form"),
substitutions("substitutions"),
- expiry("expiry")
+ expiry("expiry"),
+ offer_from_agent("offer_from_agent", false)
{
functor.name = _name;
name = _name;
@@ -378,6 +381,7 @@ private:
LLNotificationFormPtr mForm;
void* mResponderObj; // TODO - refactor/remove this field
LLNotificationResponderPtr mResponder;
+ bool mOfferFromAgent;
// a reference to the template
LLNotificationTemplatePtr mTemplatep;
@@ -513,6 +517,11 @@ public:
return mTimestamp;
}
+ bool getOfferFromAgent() const
+ {
+ return mOfferFromAgent;
+ }
+
std::string getType() const;
std::string getMessage() const;
std::string getFooter() const;
diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp
index 3c1dfc1184..91527c68f2 100644
--- a/indra/llui/lltabcontainer.cpp
+++ b/indra/llui/lltabcontainer.cpp
@@ -1556,17 +1556,6 @@ BOOL LLTabContainer::setTab(S32 which)
return is_visible;
}
-
-void LLTabContainer::hideAllTabs()
-{
- setCurrentPanelIndex(-1);
- for(tuple_list_t::iterator iter = mTabList.begin(); iter != mTabList.end(); ++iter)
- {
- (* iter)->mTabPanel->setVisible(FALSE);
- }
-}
-
-
BOOL LLTabContainer::selectTabByName(const std::string& name)
{
LLPanel* panel = getPanelByName(name);
diff --git a/indra/llui/lltabcontainer.h b/indra/llui/lltabcontainer.h
index a9cdf22b16..57862fc626 100644
--- a/indra/llui/lltabcontainer.h
+++ b/indra/llui/lltabcontainer.h
@@ -192,7 +192,7 @@ public:
BOOL selectTabPanel( LLPanel* child );
BOOL selectTab(S32 which);
BOOL selectTabByName(const std::string& title);
- void hideAllTabs();
+ void setCurrentPanelIndex(S32 index) { mCurrentTabIdx = index; }
BOOL getTabPanelFlashing(LLPanel* child);
void setTabPanelFlashing(LLPanel* child, BOOL state);
@@ -243,8 +243,6 @@ private:
void setTabsHidden(BOOL hidden) { mTabsHidden = hidden; }
BOOL getTabsHidden() const { return mTabsHidden; }
-
- void setCurrentPanelIndex(S32 index) { mCurrentTabIdx = index; }
void scrollPrev() { mScrollPos = llmax(0, mScrollPos-1); } // No wrap
void scrollNext() { mScrollPos = llmin(mScrollPos+1, mMaxScrollPos); } // No wrap
diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp
index 0b7c3939df..4328c60b1a 100644
--- a/indra/newview/llconversationmodel.cpp
+++ b/indra/newview/llconversationmodel.cpp
@@ -115,6 +115,7 @@ void LLConversationItem::buildParticipantMenuOptions(menuentry_vec_t& items)
items.push_back(std::string("share"));
items.push_back(std::string("pay"));
items.push_back(std::string("block_unblock"));
+ items.push_back(std::string("MuteText"));
if(this->getType() != CONV_SESSION_1_ON_1)
{
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 257c17a058..b8a37da3fa 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -516,13 +516,32 @@ void LLFloaterIMContainer::tabClose()
}
}
+//Shows/hides the stub panel when a conversation floater is torn off
void LLFloaterIMContainer::showStub(bool stub_is_visible)
{
- if (stub_is_visible)
- {
- mTabContainer->hideAllTabs();
- }
+ S32 tabCount = 0;
+ LLPanel * tabPanel = NULL;
+
+ if(stub_is_visible)
+ {
+ tabCount = mTabContainer->getTabCount();
+
+ //Hide all tabs even stub
+ for(S32 i = 0; i < tabCount; ++i)
+ {
+ tabPanel = mTabContainer->getPanelByIndex(i);
+
+ if(tabPanel)
+ {
+ tabPanel->setVisible(false);
+ }
+ }
+
+ //Set the index to the stub panel since we will be showing the stub
+ mTabContainer->setCurrentPanelIndex(0);
+ }
+ //Now show/hide the stub
mStubPanel->setVisible(stub_is_visible);
}
@@ -546,8 +565,10 @@ void LLFloaterIMContainer::setVisible(BOOL visible)
// *TODO: find a way to move this to XML as a default panel or something like that
LLSD name("nearby_chat");
LLFloaterReg::toggleInstanceOrBringToFront(name);
+ setSelectedSession(LLUUID(NULL));
}
openNearbyChat();
+ selectConversationPair(getSelectedSession(), false);
}
nearby_chat = LLFloaterReg::findTypedInstance<LLFloaterIMNearbyChat>("nearby_chat");
@@ -571,7 +592,6 @@ void LLFloaterIMContainer::setVisible(BOOL visible)
// Now, do the normal multifloater show/hide
LLMultiFloater::setVisible(visible);
-
}
void LLFloaterIMContainer::collapseMessagesPane(bool collapse)
@@ -933,7 +953,11 @@ void LLFloaterIMContainer::doToParticipants(const std::string& command, uuid_vec
}
else if ("block_unblock" == command)
{
- LLAvatarActions::toggleBlock(userID);
+ toggleMute(userID, LLMute::flagVoiceChat);
+ }
+ else if ("mute_unmute" == command)
+ {
+ toggleMute(userID, LLMute::flagTextChat);
}
else if ("selected" == command || "mute_all" == command || "unmute_all" == command)
{
@@ -1151,8 +1175,12 @@ bool LLFloaterIMContainer::checkContextMenuItem(const std::string& item, uuid_ve
{
if ("is_blocked" == item)
{
- return LLAvatarActions::isBlocked(uuids.front());
+ return LLMuteList::getInstance()->isMuted(uuids.front(), LLMute::flagVoiceChat);
}
+ else if (item == "is_muted")
+ {
+ return LLMuteList::getInstance()->isMuted(uuids.front(), LLMute::flagTextChat);
+ }
else if ("is_allowed_text_chat" == item)
{
const LLSpeaker * speakerp = getSpeakerOfSelectedParticipant(getSpeakerMgrForSelectedParticipant());
@@ -1596,6 +1624,23 @@ void LLFloaterIMContainer::toggleAllowTextChat(const LLUUID& participant_uuid)
}
}
+void LLFloaterIMContainer::toggleMute(const LLUUID& participant_id, U32 flags)
+{
+ BOOL is_muted = LLMuteList::getInstance()->isMuted(participant_id, flags);
+ std::string name;
+ gCacheName->getFullName(participant_id, name);
+ LLMute mute(participant_id, name, LLMute::AGENT);
+
+ if (!is_muted)
+ {
+ LLMuteList::getInstance()->add(mute, flags);
+ }
+ else
+ {
+ LLMuteList::getInstance()->remove(mute, flags);
+ }
+}
+
void LLFloaterIMContainer::openNearbyChat()
{
// If there's only one conversation in the container and that conversation is the nearby chat
@@ -1605,6 +1650,7 @@ void LLFloaterIMContainer::openNearbyChat()
LLConversationViewSession* nearby_chat = dynamic_cast<LLConversationViewSession*>(get_ptr_in_map(mConversationsWidgets,LLUUID()));
if (nearby_chat)
{
+ selectConversation(LLUUID());
nearby_chat->setOpen(TRUE);
}
}
@@ -1630,22 +1676,13 @@ void LLFloaterIMContainer::flashConversationItemWidget(const LLUUID& session_id,
{
//Finds the conversation line item to flash using the session_id
LLConversationViewSession * widget = dynamic_cast<LLConversationViewSession *>(get_ptr_in_map(mConversationsWidgets,session_id));
- LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::getConversation(session_id);
if (widget)
{
//Start flash
if (is_flashes)
{
- //Only flash when conversation is not active
- if(session_floater
- && (!session_floater->isInVisibleChain()) //conversation floater not displayed
- ||
- (session_floater->isInVisibleChain() && session_floater->hasFocus() == false)) //conversation floater is displayed but doesn't have focus
-
- {
- widget->getFlashTimer()->startFlashing();
- }
+ widget->getFlashTimer()->startFlashing();
}
//Stop flash
else
diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h
index 1badce0d2d..c9987bffe8 100644
--- a/indra/newview/llfloaterimcontainer.h
+++ b/indra/newview/llfloaterimcontainer.h
@@ -150,6 +150,7 @@ private:
void moderateVoiceAllParticipants(bool unmute);
void moderateVoiceParticipant(const LLUUID& avatar_id, bool unmute);
void toggleAllowTextChat(const LLUUID& participant_uuid);
+ void toggleMute(const LLUUID& participant_id, U32 flags);
void openNearbyChat();
LLButton* mExpandCollapseBtn;
diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp
index a20fce876c..80a41e2f37 100644
--- a/indra/newview/llfloaterimnearbychat.cpp
+++ b/indra/newview/llfloaterimnearbychat.cpp
@@ -228,7 +228,6 @@ void LLFloaterIMNearbyChat::setVisible(BOOL visible)
{
removeScreenChat();
}
- setFocus(visible);
}
// virtual
diff --git a/indra/newview/llfloaterimsession.cpp b/indra/newview/llfloaterimsession.cpp
index 9829ae713c..3001029968 100644
--- a/indra/newview/llfloaterimsession.cpp
+++ b/indra/newview/llfloaterimsession.cpp
@@ -633,7 +633,6 @@ void LLFloaterIMSession::setVisible(BOOL visible)
}
- setFocus(visible);
}
BOOL LLFloaterIMSession::getVisible()
diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index 85d1b1fb49..b50b8c2d32 100644
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -60,6 +60,7 @@ LLFloaterIMSessionTab::LLFloaterIMSessionTab(const LLSD& session_id)
, mRefreshTimer(new LLTimer())
, mIsHostAttached(false)
{
+ setAutoFocus(FALSE);
mSession = LLIMModel::getInstance()->findIMSession(mSessionID);
mCommitCallbackRegistrar.add("IMSession.Menu.Action",
@@ -124,7 +125,6 @@ void LLFloaterIMSessionTab::setVisible(BOOL visible)
{
LLFloaterIMSessionTab::addToHost(mSessionID);
}
- setFocus(visible);
}
/*virtual*/
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index b6fd3ec9c8..821e62c4e6 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -192,12 +192,24 @@ void on_new_message(const LLSD& msg)
else if("openconversations" == action)
{
LLFloaterIMContainer* im_box = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container");
- if (im_box)
+ LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::getConversation(session_id);
+
+ //Don't flash and show conversation floater when conversation already active (has focus)
+ if(session_floater
+ && (!session_floater->isInVisibleChain()) //conversation floater not displayed
+ ||
+ (session_floater->isInVisibleChain() && session_floater->hasFocus() == false)) //conversation floater is displayed but doesn't have focus
+
{
- im_box->flashConversationItemWidget(session_id, true); // flashing of the conversation's item
+ //Flash line item
+ if (im_box)
+ {
+ im_box->flashConversationItemWidget(session_id, true); // flashing of the conversation's item
+ }
+
+ //Surface conversations floater
+ LLFloaterReg::showInstance("im_container");
}
-
- LLFloaterReg::showInstance("im_container");
}
}
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 73631f4ba8..cf8253ca4d 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -255,6 +255,11 @@ BOOL LLInvFVBridge::isLink() const
return mIsLink;
}
+BOOL LLInvFVBridge::isLibraryItem() const
+{
+ return gInventory.isObjectDescendentOf(getUUID(),gInventory.getLibraryRootFolderID());
+}
+
/*virtual*/
/**
* @brief Adds this item into clipboard storage
diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h
index 5e96f00920..5c6cf0f0f0 100644
--- a/indra/newview/llinventorybridge.h
+++ b/indra/newview/llinventorybridge.h
@@ -107,6 +107,7 @@ public:
virtual BOOL isItemMovable() const;
virtual BOOL isItemInTrash() const;
virtual BOOL isLink() const;
+ virtual BOOL isLibraryItem() const;
//virtual BOOL removeItem() = 0;
virtual void removeBatch(std::vector<LLFolderViewModelItem*>& batch);
virtual void move(LLFolderViewModelItem* new_parent_bridge) {}
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 098a44b9d8..81e7f166e1 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -57,6 +57,15 @@ const std::string LLInventoryPanel::RECENTITEMS_SORT_ORDER = std::string("Recent
const std::string LLInventoryPanel::INHERIT_SORT_ORDER = std::string("");
static const LLInventoryFolderViewModelBuilder INVENTORY_BRIDGE_BUILDER;
+// statics
+bool LLInventoryPanel::sColorSetInitialized = false;
+LLUIColor LLInventoryPanel::sDefaultColor;
+LLUIColor LLInventoryPanel::sDefaultHighlightColor;
+LLUIColor LLInventoryPanel::sLibraryColor;
+LLUIColor LLInventoryPanel::sLinkColor;
+
+const LLColor4U DEFAULT_WHITE(255, 255, 255);
+
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class LLInventoryPanelObserver
//
@@ -140,6 +149,15 @@ LLInventoryPanel::LLInventoryPanel(const LLInventoryPanel::Params& p) :
{
mInvFVBridgeBuilder = &INVENTORY_BRIDGE_BUILDER;
+ if (!sColorSetInitialized)
+ {
+ sDefaultColor = LLUIColorTable::instance().getColor("MenuItemEnabledColor", DEFAULT_WHITE);
+ sDefaultHighlightColor = LLUIColorTable::instance().getColor("MenuItemHighlightFgColor", DEFAULT_WHITE);
+ sLibraryColor = LLUIColorTable::instance().getColor("InventoryItemLibraryColor", DEFAULT_WHITE);
+ sLinkColor = LLUIColorTable::instance().getColor("InventoryItemLinkColor", DEFAULT_WHITE);
+ sColorSetInitialized = true;
+ }
+
// context menu callbacks
mCommitCallbackRegistrar.add("Inventory.DoToSelected", boost::bind(&LLInventoryPanel::doToSelected, this, _2));
mCommitCallbackRegistrar.add("Inventory.EmptyTrash", boost::bind(&LLInventoryModel::emptyFolderType, &gInventory, "ConfirmEmptyTrash", LLFolderType::FT_TRASH));
@@ -705,6 +723,9 @@ LLFolderViewFolder * LLInventoryPanel::createFolderViewFolder(LLInvFVBridge * br
params.listener = bridge;
params.tool_tip = params.name;
+ params.font_color = (bridge->isLibraryItem() ? sLibraryColor : (bridge->isLink() ? sLinkColor : sDefaultColor));
+ params.font_highlight_color = (bridge->isLibraryItem() ? sLibraryColor : (bridge->isLink() ? sLinkColor : sDefaultHighlightColor));
+
return LLUICtrlFactory::create<LLFolderViewFolder>(params);
}
@@ -718,6 +739,9 @@ LLFolderViewItem * LLInventoryPanel::createFolderViewItem(LLInvFVBridge * bridge
params.listener = bridge;
params.rect = LLRect (0, 0, 0, 0);
params.tool_tip = params.name;
+
+ params.font_color = (bridge->isLibraryItem() ? sLibraryColor : (bridge->isLink() ? sLinkColor : sDefaultColor));
+ params.font_highlight_color = (bridge->isLibraryItem() ? sLibraryColor : (bridge->isLink() ? sLinkColor : sDefaultHighlightColor));
return LLUICtrlFactory::create<LLFolderViewItem>(params);
}
diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h
index c4f3c1b47d..9639086c11 100644
--- a/indra/newview/llinventorypanel.h
+++ b/indra/newview/llinventorypanel.h
@@ -275,6 +275,13 @@ protected:
// Builds the UI. Call this once the inventory is usable.
void initializeViews();
+ // Specific inventory colors
+ static bool sColorSetInitialized;
+ static LLUIColor sDefaultColor;
+ static LLUIColor sDefaultHighlightColor;
+ static LLUIColor sLibraryColor;
+ static LLUIColor sLinkColor;
+
LLFolderViewItem* buildNewViews(const LLUUID& id);
BOOL getIsHiddenFolderType(LLFolderType::EType folder_type) const;
diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp
index 91003c7d53..ff5b5e21f7 100644
--- a/indra/newview/llnotificationofferhandler.cpp
+++ b/indra/newview/llnotificationofferhandler.cpp
@@ -113,6 +113,7 @@ bool LLOfferHandler::processNotification(const LLNotificationPtr& notification)
p.panel = notify_box;
// we not save offer notifications to the syswell floater that should be added to the IM floater
p.can_be_stored = !add_notif_to_im;
+ p.force_show = notification->getOfferFromAgent();
LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get());
if(channel)
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index dc8192105f..ea804508c8 100755
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -1971,6 +1971,7 @@ void inventory_offer_handler(LLOfferInfo* info)
p.substitutions(args).payload(payload).functor.responder(LLNotificationResponderPtr(info));
info->mPersist = true;
p.name = "UserGiveItem";
+ p.offer_from_agent = true;
// Prefetch the item into your local inventory.
LLInventoryFetchItemsObserver* fetch_item = new LLInventoryFetchItemsObserver(info->mObjectID);
@@ -2738,7 +2739,9 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
// Same as closing window
info->forceResponse(IOR_DECLINE);
}
- else if (is_do_not_disturb && dialog != IM_TASK_INVENTORY_OFFERED) // busy mode must not affect interaction with objects (STORM-565)
+ // old logic: busy mode must not affect interaction with objects (STORM-565)
+ // new logic: inventory offers from in-world objects should be auto-declined (CHUI-519)
+ else if (is_do_not_disturb && dialog == IM_TASK_INVENTORY_OFFERED)
{
// Until throttling is implemented, do not disturb mode should reject inventory instead of silently
// accepting it. SEE SL-39554
diff --git a/indra/newview/skins/default/xui/en/menu_conversation.xml b/indra/newview/skins/default/xui/en/menu_conversation.xml
index 908b2c174f..01ef8ebdb5 100644
--- a/indra/newview/skins/default/xui/en/menu_conversation.xml
+++ b/indra/newview/skins/default/xui/en/menu_conversation.xml
@@ -105,14 +105,22 @@
<on_enable function="Avatar.EnableItem" parameter="can_pay" />
</menu_item_call>
<menu_item_check
- label="Block / unblock"
+ label="Block Voice"
layout="topleft"
name="block_unblock">
<on_click function="Avatar.DoToSelected" parameter="block_unblock" />
<on_check function="Avatar.CheckItem" parameter="is_blocked" />
<on_enable function="Avatar.EnableItem" parameter="can_block" />
</menu_item_check>
- <menu_item_call
+ <menu_item_check
+ label="Block Text"
+ layout="topleft"
+ name="MuteText">
+ <on_click function="Avatar.DoToSelected" parameter="mute_unmute" />
+ <on_check function="Avatar.CheckItem" parameter="is_muted" />
+ <on_enable function="Avatar.EnableItem" parameter="can_block" />
+ </menu_item_check>
+ <menu_item_call
label="Group Profile"
layout="topleft"
name="group_profile">