summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorWilliam Todd Stinson <stinson@lindenlab.com>2012-12-05 11:23:37 -0800
committerWilliam Todd Stinson <stinson@lindenlab.com>2012-12-05 11:23:37 -0800
commit54380ed6d7021b19281846b273fbe81a76c836d9 (patch)
tree9e3f2d33c70866eab669e79f0a4512002cf9eac4 /indra
parent85e97f772e23c0595c4ce249f533cad746ddd3c6 (diff)
parentfc000880b40143534c47c475a7a0aba6ab75039e (diff)
Pull and merge ssh://stinson@hg.lindenlab.com/richard/viewer-chui/.
Diffstat (limited to 'indra')
-rw-r--r--indra/llui/llnotifications.cpp3
-rw-r--r--indra/llui/llnotifications.h13
-rw-r--r--indra/llui/lltabcontainer.cpp3
-rw-r--r--indra/newview/llconversationmodel.cpp1
-rw-r--r--indra/newview/llfloaterimcontainer.cpp44
-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/llnotificationofferhandler.cpp1
-rwxr-xr-xindra/newview/llstartup.cpp7
-rwxr-xr-xindra/newview/llviewermessage.cpp5
-rw-r--r--indra/newview/skins/default/xui/en/floater_camera.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_destinations.xml7
-rw-r--r--indra/newview/skins/default/xui/en/floater_im_container.xml9
-rw-r--r--indra/newview/skins/default/xui/en/floater_moveview.xml2
-rw-r--r--indra/newview/skins/default/xui/en/menu_conversation.xml12
18 files changed, 96 insertions, 38 deletions
diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp
index 61d5dcf12c..937dcf0afc 100644
--- a/indra/llui/llnotifications.cpp
+++ b/indra/llui/llnotifications.cpp
@@ -474,7 +474,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 a41e9fa5a3..056a316d40 100644
--- a/indra/llui/llnotifications.h
+++ b/indra/llui/llnotifications.h
@@ -315,6 +315,7 @@ public:
expiry;
Optional<LLNotificationContext*> context;
Optional<void*> responder;
+ Optional<bool> offer_from_agent;
struct Functor : public LLInitParam::ChoiceBlock<Functor>
{
@@ -338,7 +339,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;
@@ -351,7 +353,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;
@@ -377,6 +380,7 @@ private:
LLNotificationFormPtr mForm;
void* mResponderObj; // TODO - refactor/remove this field
LLNotificationResponderPtr mResponder;
+ bool mOfferFromAgent;
// a reference to the template
LLNotificationTemplatePtr mTemplatep;
@@ -512,6 +516,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..0dd63c2632 100644
--- a/indra/llui/lltabcontainer.cpp
+++ b/indra/llui/lltabcontainer.cpp
@@ -1559,7 +1559,8 @@ BOOL LLTabContainer::setTab(S32 which)
void LLTabContainer::hideAllTabs()
{
- setCurrentPanelIndex(-1);
+
+ setCurrentPanelIndex(0);
for(tuple_list_t::iterator iter = mTabList.begin(); iter != mTabList.end(); ++iter)
{
(* iter)->mTabPanel->setVisible(FALSE);
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 c1daea0aeb..a5b93f3692 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -546,8 +546,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 +573,6 @@ void LLFloaterIMContainer::setVisible(BOOL visible)
// Now, do the normal multifloater show/hide
LLMultiFloater::setVisible(visible);
-
}
void LLFloaterIMContainer::collapseMessagesPane(bool collapse)
@@ -925,7 +926,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)
{
@@ -1143,8 +1148,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());
@@ -1590,6 +1599,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
@@ -1599,6 +1625,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);
}
}
@@ -1624,22 +1651,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 d04fa2674d..da25f95ffe 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/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/llstartup.cpp b/indra/newview/llstartup.cpp
index 1704ad9055..34259658ea 100755
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -1520,7 +1520,7 @@ bool idle_startup()
}
//---------------------------------------------------------------------
- // Agent Send
+ // World Wait
//---------------------------------------------------------------------
if(STATE_WORLD_WAIT == LLStartUp::getStartupState())
{
@@ -1846,6 +1846,10 @@ bool idle_startup()
// Set the show start location to true, now that the user has logged
// on with this install.
gSavedSettings.setBOOL("ShowStartLocation", TRUE);
+
+ // Open Conversation floater on first login.
+ LLFloaterReg::toggleInstanceOrBringToFront("im_container");
+
}
display_startup();
@@ -2168,7 +2172,6 @@ bool idle_startup()
display_startup();
// Unmute audio if desired and setup volumes.
- // Unmute audio if desired and setup volumes.
// This is a not-uncommon crash site, so surround it with
// llinfos output to aid diagnosis.
LL_INFOS("AppInit") << "Doing first audio_update_volume..." << LL_ENDL;
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/floater_camera.xml b/indra/newview/skins/default/xui/en/floater_camera.xml
index 22bc488a92..4b4821a383 100644
--- a/indra/newview/skins/default/xui/en/floater_camera.xml
+++ b/indra/newview/skins/default/xui/en/floater_camera.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
positioning="specified"
- left="458"
+ left="643"
bottom="-80"
follows="left|bottom"
legacy_header_height="18"
diff --git a/indra/newview/skins/default/xui/en/floater_destinations.xml b/indra/newview/skins/default/xui/en/floater_destinations.xml
index 39aa8e07bb..41b57530fc 100644
--- a/indra/newview/skins/default/xui/en/floater_destinations.xml
+++ b/indra/newview/skins/default/xui/en/floater_destinations.xml
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
- positioning="cascading"
ignore_ui_scale="false"
legacy_header_height="225"
can_minimize="true"
@@ -12,16 +11,18 @@
height="230"
layout="topleft"
name="Destinations"
+ right="-10"
+ bottom="-80"
single_instance="true"
help_topic="destinations"
save_rect="true"
save_visibility="true"
title="DESTINATIONS"
- width="840">
+ width="550">
<web_browser
top="25"
height="200"
- width="840"
+ width="550"
follows="all"
name="destination_guide_contents"
trusted_content="true"/>
diff --git a/indra/newview/skins/default/xui/en/floater_im_container.xml b/indra/newview/skins/default/xui/en/floater_im_container.xml
index 4aa7c88312..152c897120 100644
--- a/indra/newview/skins/default/xui/en/floater_im_container.xml
+++ b/indra/newview/skins/default/xui/en/floater_im_container.xml
@@ -3,7 +3,7 @@
can_close="true"
can_minimize="true"
can_resize="true"
- height="430"
+ height="230"
layout="topleft"
min_height="50"
name="floater_im_box"
@@ -13,7 +13,8 @@
single_instance="true"
reuse_instance="true"
title="CONVERSATIONS"
- width="680">
+ bottom="-80"
+ width="450">
<string
name="collapse_icon"
value="Conv_toolbar_collapse"/>
@@ -23,13 +24,13 @@
<layout_stack
animate="true"
follows="all"
- height="430"
+ height="230"
layout="topleft"
left="0"
name="conversations_stack"
orientation="horizontal"
top="0"
- width="680">
+ width="450">
<layout_panel
auto_resize="true"
user_resize="true"
diff --git a/indra/newview/skins/default/xui/en/floater_moveview.xml b/indra/newview/skins/default/xui/en/floater_moveview.xml
index 4e7ee7913f..02d9805ddf 100644
--- a/indra/newview/skins/default/xui/en/floater_moveview.xml
+++ b/indra/newview/skins/default/xui/en/floater_moveview.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
positioning="specified"
- left="320"
+ left="505"
bottom="-80"
legacy_header_height="18"
can_dock="false"
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">