summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llbottomtray.cpp35
-rw-r--r--indra/newview/llbottomtray.h2
-rw-r--r--indra/newview/llpanelgroupgeneral.cpp5
-rw-r--r--indra/newview/llviewermessage.cpp50
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml20
-rw-r--r--indra/newview/skins/default/xui/en/panel_bottomtray.xml6
6 files changed, 63 insertions, 55 deletions
diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp
index 79e6c7b66b..c8cfe5b51e 100644
--- a/indra/newview/llbottomtray.cpp
+++ b/indra/newview/llbottomtray.cpp
@@ -201,7 +201,8 @@ public:
};
LLBottomTray::LLBottomTray(const LLSD&)
-: mChicletPanel(NULL),
+: mDesiredNearbyChatWidth(0),
+ mChicletPanel(NULL),
mSpeakPanel(NULL),
mSpeakBtn(NULL),
mNearbyChatBar(NULL),
@@ -1095,33 +1096,35 @@ S32 LLBottomTray::processWidthDecreased(S32 delta_width)
if (still_should_be_processed)
{
processShrinkButtons(delta_width, buttons_freed_width);
+ still_should_be_processed = delta_width < 0;
}
+
// 3. Decreasing width of nearby chat.
const S32 chatbar_panel_min_width = get_panel_min_width(mToolbarStack, mChatBarContainer);
const S32 chatbar_panel_width = mChatBarContainer->getRect().getWidth();
if (still_should_be_processed && chatbar_panel_width > chatbar_panel_min_width)
{
// we have some space to decrease chatbar panel
- S32 panel_delta_min = chatbar_panel_width - chatbar_panel_min_width;
+ S32 chatbar_shrink_headroom = chatbar_panel_width - chatbar_panel_min_width;
- S32 delta_panel = llmin(-delta_width, panel_delta_min);
+ S32 shrink_by = llmin(-delta_width, chatbar_shrink_headroom);
// is chatbar panel wide enough to process resizing?
- delta_width += panel_delta_min;
+ delta_width += chatbar_shrink_headroom;
still_should_be_processed = delta_width < 0;
// chatbar should only be shrunk here, not stretched
- if(delta_panel > 0)
+ if (shrink_by > 0)
{
- lldebugs << "Shrinking nearby chat bar by " << delta_panel << " px " << llendl;
- mChatBarContainer->reshape(mNearbyChatBar->getRect().getWidth() - delta_panel, mChatBarContainer->getRect().getHeight());
+ lldebugs << "Shrinking nearby chat bar by " << shrink_by << " px " << llendl;
+ mChatBarContainer->reshape(mNearbyChatBar->getRect().getWidth() - shrink_by, mChatBarContainer->getRect().getHeight());
}
log(mNearbyChatBar, "after processing panel decreasing via nearby chatbar panel");
lldebugs << "RS_CHATBAR_INPUT"
- << ", delta_panel: " << delta_panel
+ << ", shrink_by: " << shrink_by
<< ", delta_width: " << delta_width
<< llendl;
}
@@ -1200,16 +1203,16 @@ void LLBottomTray::processWidthIncreased(S32 delta_width)
<< ", mDesiredNearbyChatWidth = " << mDesiredNearbyChatWidth << llendl;
if (delta_width > 0 && chatbar_panel_width < mDesiredNearbyChatWidth)
{
- S32 delta_panel_max = mDesiredNearbyChatWidth - chatbar_panel_width;
- S32 delta_panel = llmin(delta_width, delta_panel_max);
- lldebugs << "Unprocesed delta width: " << delta_width
- << ", can be applied to chatbar: " << delta_panel_max
- << ", will be applied: " << delta_panel
+ S32 extend_by_max = mDesiredNearbyChatWidth - chatbar_panel_width;
+ S32 extend_by = llmin(delta_width, extend_by_max);
+ lldebugs << "Unprocessed delta width: " << delta_width
+ << " px, chatbar can be extended by " << extend_by_max
+ << " px, extending it by " << extend_by << " px"
<< llendl;
- delta_width -= delta_panel_max;
- lldebugs << "Extending nearby chat bar by " << delta_panel << " px " << llendl;
- mChatBarContainer->reshape(chatbar_panel_width + delta_panel, mChatBarContainer->getRect().getHeight());
+ delta_width -= extend_by_max;
+ lldebugs << "Extending nearby chat bar by " << extend_by << " px " << llendl;
+ mChatBarContainer->reshape(chatbar_panel_width + extend_by, mChatBarContainer->getRect().getHeight());
log(mNearbyChatBar, "applied unprocessed delta width");
}
diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h
index 62718531ef..e26b0792e9 100644
--- a/indra/newview/llbottomtray.h
+++ b/indra/newview/llbottomtray.h
@@ -323,7 +323,7 @@ private:
void processExtendButtons(S32& available_width);
/**
- * Extends the Speak button if there is anough headroom.
+ * Extends the Speak button if there is enough headroom.
*
* Unlike other buttons, the Speak buttons has only two possible widths:
* the minimal one (without label) and the maximal (default) one.
diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp
index 1576ccccdf..bc594b5517 100644
--- a/indra/newview/llpanelgroupgeneral.cpp
+++ b/indra/newview/llpanelgroupgeneral.cpp
@@ -579,6 +579,11 @@ void LLPanelGroupGeneral::update(LLGroupChange gc)
}
+ // After role member data was changed in Roles->Members
+ // need to update role titles. See STORM-918.
+ if (gc == GC_ROLE_MEMBER_DATA)
+ LLGroupMgr::getInstance()->sendGroupTitlesRequest(mGroupID);
+
// If this was just a titles update, we are done.
if (gc == GC_TITLES) return;
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 68745d5aeb..6435904fee 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -1299,29 +1299,12 @@ bool highlight_offered_object(const LLUUID& obj_id)
void inventory_offer_mute_callback(const LLUUID& blocked_id,
const std::string& full_name,
- bool is_group,
- boost::shared_ptr<LLNotificationResponderInterface> offer_ptr)
+ bool is_group)
{
- LLOfferInfo* offer = dynamic_cast<LLOfferInfo*>(offer_ptr.get());
-
- std::string from_name = full_name;
- LLMute::EType type;
- if (is_group)
- {
- type = LLMute::GROUP;
- }
- else if(offer && offer->mFromObject)
- {
- //we have to block object by name because blocked_id is an id of owner
- type = LLMute::BY_NAME;
- }
- else
- {
- type = LLMute::AGENT;
- }
+ // *NOTE: blocks owner if the offer came from an object
+ LLMute::EType mute_type = is_group ? LLMute::GROUP : LLMute::AGENT;
- // id should be null for BY_NAME mute, see LLMuteList::add for details
- LLMute mute(type == LLMute::BY_NAME ? LLUUID::null : blocked_id, from_name, type);
+ LLMute mute(blocked_id, full_name, mute_type);
if (LLMuteList::getInstance()->add(mute))
{
LLPanelBlockedList::showPanelAndSelect(blocked_id);
@@ -1335,6 +1318,7 @@ void inventory_offer_mute_callback(const LLUUID& blocked_id,
bool matches(const LLNotificationPtr notification) const
{
if(notification->getName() == "ObjectGiveItem"
+ || notification->getName() == "OwnObjectGiveItem"
|| notification->getName() == "UserGiveItem")
{
return (notification->getPayload()["from_id"].asUUID() == blocked_id);
@@ -1495,7 +1479,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
llassert(notification_ptr != NULL);
if (notification_ptr != NULL)
{
- gCacheName->get(mFromID, mFromGroup, boost::bind(&inventory_offer_mute_callback,_1,_2,_3,notification_ptr->getResponderPtr()));
+ gCacheName->get(mFromID, mFromGroup, boost::bind(&inventory_offer_mute_callback, _1, _2, _3));
}
}
@@ -1640,7 +1624,7 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const
llassert(notification_ptr != NULL);
if (notification_ptr != NULL)
{
- gCacheName->get(mFromID, mFromGroup, boost::bind(&inventory_offer_mute_callback,_1,_2,_3,notification_ptr->getResponderPtr()));
+ gCacheName->get(mFromID, mFromGroup, boost::bind(&inventory_offer_mute_callback, _1, _2, _3));
}
}
@@ -1818,6 +1802,7 @@ void LLOfferInfo::initRespondFunctionMap()
if(mRespondFunctions.empty())
{
mRespondFunctions["ObjectGiveItem"] = boost::bind(&LLOfferInfo::inventory_task_offer_callback, this, _1, _2);
+ mRespondFunctions["OwnObjectGiveItem"] = boost::bind(&LLOfferInfo::inventory_task_offer_callback, this, _1, _2);
mRespondFunctions["UserGiveItem"] = boost::bind(&LLOfferInfo::inventory_offer_callback, this, _1, _2);
}
}
@@ -1905,7 +1890,7 @@ void inventory_offer_handler(LLOfferInfo* info)
std::string verb = "select?name=" + LLURI::escape(msg);
args["ITEM_SLURL"] = LLSLURL("inventory", info->mObjectID, verb.c_str()).getSLURLString();
- LLNotification::Params p("ObjectGiveItem");
+ LLNotification::Params p;
// Object -> Agent Inventory Offer
if (info->mFromObject)
@@ -1915,7 +1900,10 @@ void inventory_offer_handler(LLOfferInfo* info)
// Note: sets inventory_task_offer_callback as the callback
p.substitutions(args).payload(payload).functor.responder(LLNotificationResponderPtr(info));
info->mPersist = true;
- p.name = "ObjectGiveItem";
+
+ // Offers from your own objects need a special notification template.
+ p.name = info->mFromID == gAgentID ? "OwnObjectGiveItem" : "ObjectGiveItem";
+
// Pop up inv offer chiclet and let the user accept (keep), or reject (and silently delete) the inventory.
LLPostponedNotification::add<LLPostponedOfferNotification>(p, info->mFromID, info->mFromGroup == TRUE);
}
@@ -2594,8 +2582,9 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
bucketp = (struct offer_agent_bucket_t*) &binary_bucket[0];
info->mType = (LLAssetType::EType) bucketp->asset_type;
info->mObjectID = bucketp->object_id;
+ info->mFromObject = FALSE;
}
- else
+ else // IM_TASK_INVENTORY_OFFERED
{
if (sizeof(S8) != binary_bucket_size)
{
@@ -2605,6 +2594,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
}
info->mType = (LLAssetType::EType) binary_bucket[0];
info->mObjectID = LLUUID::null;
+ info->mFromObject = TRUE;
}
info->mIM = dialog;
@@ -2613,14 +2603,6 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
info->mTransactionID = session_id;
info->mFolderID = gInventory.findCategoryUUIDForType(LLFolderType::assetTypeToFolderType(info->mType));
- if (dialog == IM_TASK_INVENTORY_OFFERED)
- {
- info->mFromObject = TRUE;
- }
- else
- {
- info->mFromObject = FALSE;
- }
info->mFromName = name;
info->mDesc = message;
info->mHost = msg->getSender();
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 99ab56d10a..f3a8d0a865 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -5916,7 +5916,25 @@ An object named &lt;nolink&gt;[OBJECTFROMNAME]&lt;/nolink&gt; owned by [NAME_SLU
<button
index="2"
name="Mute"
- text="Block"/>
+ text="Block Owner"/>
+ </form>
+ </notification>
+
+ <notification
+ icon="notify.tga"
+ name="OwnObjectGiveItem"
+ type="offer">
+Your object named &lt;nolink&gt;[OBJECTFROMNAME]&lt;/nolink&gt; has given you this [OBJECTTYPE]:
+&lt;nolink&gt;[ITEM_SLURL]&lt;/nolink&gt;
+ <form name="form">
+ <button
+ index="0"
+ name="Keep"
+ text="Keep"/>
+ <button
+ index="1"
+ name="Discard"
+ text="Discard"/>
</form>
</notification>
diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml
index c8f8d07701..ec5853649e 100644
--- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml
+++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml
@@ -47,13 +47,13 @@
mouse_opaque="false"
name="chat_bar_layout_panel"
user_resize="true"
- width="310" >
+ width="250" >
<panel
name="chat_bar"
filename="panel_nearby_chat_bar.xml"
left="0"
height="28"
- width="308"
+ width="248"
top="0"
mouse_opaque="false"
follows="left|right"
@@ -341,7 +341,7 @@ Disabled for now.
height="28"
layout="topleft"
min_height="28"
- min_width="52"
+ min_width="62"
mouse_opaque="false"
name="mini_map_btn_panel"
user_resize="false"