From db643d1881196c01687b06130f26452cd2e04bac Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Wed, 26 Oct 2011 11:21:01 -0400 Subject: STORM-1653 Group notices sent by muted residents are still displayed --- indra/newview/llviewermessage.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 74ee918bfe..fe613b3dc9 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2241,6 +2241,10 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) { name = LLTrans::getString("Unnamed"); } + + // Preserve the unaltered name for use in group notice mute checking. + std::string original_name = name; + // IDEVO convert new-style "Resident" names for display name = clean_name_from_im(name, dialog); @@ -2447,6 +2451,17 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) break; } + // The group notice packet does not have an AgentID. Try to obtain one from the name cache. + // If there is a cache miss and a background fetch has to occur the group notice may + // be displayed even though the resident has been muted. + std::string legacy_name = gCacheName->buildLegacyName(original_name); + LLUUID agent_id; + gCacheName->getUUID(legacy_name, agent_id); + if (agent_id.notNull() && LLMuteList::getInstance()->isMuted(agent_id)) + { + break; + } + notice_bin_bucket = (struct notice_bucket_full_t*) &binary_bucket[0]; U8 has_inventory = notice_bin_bucket->header.has_inventory; U8 asset_type = notice_bin_bucket->header.asset_type; -- cgit v1.2.3 From f73fddd5d0c5a398a592dcc058b1feb09964560d Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Wed, 26 Oct 2011 14:06:08 -0400 Subject: STORM-1653 Group notices sent by muted residents are still displayed Added warning message if a null is returned from the name to id call. --- indra/newview/llviewermessage.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index fe613b3dc9..05303cf3c5 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2451,13 +2451,16 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) break; } - // The group notice packet does not have an AgentID. Try to obtain one from the name cache. - // If there is a cache miss and a background fetch has to occur the group notice may - // be displayed even though the resident has been muted. + // The group notice packet does not have an AgentID. Obtain one from the name cache. std::string legacy_name = gCacheName->buildLegacyName(original_name); LLUUID agent_id; gCacheName->getUUID(legacy_name, agent_id); - if (agent_id.notNull() && LLMuteList::getInstance()->isMuted(agent_id)) + + if (agent_id.isNull()) + { + LL_WARNS("Messaging") << "buildLegacyName returned null" << LL_ENDL; + } + else if (LLMuteList::getInstance()->isMuted(agent_id)) { break; } -- cgit v1.2.3 From 0ab252b8174a97311168938e93c99c0d649660ad Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Wed, 23 Nov 2011 09:51:38 -0500 Subject: STORM-1653 Handle last name of "Resident" case --- indra/newview/llviewermessage.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 05303cf3c5..c92fc5c853 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2452,6 +2452,12 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) } // The group notice packet does not have an AgentID. Obtain one from the name cache. + // If last name is "Resident" strip it out so the cache name lookup works. + U32 index = original_name.find(" Resident"); + if (index != std::string::npos) + { + original_name = original_name.substr(0, index); + } std::string legacy_name = gCacheName->buildLegacyName(original_name); LLUUID agent_id; gCacheName->getUUID(legacy_name, agent_id); -- cgit v1.2.3 From 28f86906a6c0675c6335ca7f408c4e0561dafd89 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Tue, 6 Dec 2011 11:45:07 -0500 Subject: STORM-1653 Added affected name to warning message --- indra/newview/llviewermessage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index c92fc5c853..39c863318b 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2464,7 +2464,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) if (agent_id.isNull()) { - LL_WARNS("Messaging") << "buildLegacyName returned null" << LL_ENDL; + LL_WARNS("Messaging") << "buildLegacyName returned null while processing " << original_name << LL_ENDL; } else if (LLMuteList::getInstance()->isMuted(agent_id)) { -- cgit v1.2.3 From a03b3aaa60c4b9101d344eed70ddbbf14888ff48 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Mon, 12 Dec 2011 08:51:16 -0500 Subject: STORM-1731 Ad-hoc confererence block failing. Residents using it to start massive multi-sim conferences, used as a griefing tool. --- indra/newview/llimview.cpp | 55 ++++++++++++++++++++++++++++++++-------------- 1 file changed, 38 insertions(+), 17 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index ed4bb727cd..daef307601 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -2403,15 +2403,6 @@ void LLIMMgr::addMessage( bool link_name) // If this is true, then we insert the name and link it to a profile { LLUUID other_participant_id = target_id; - - // don't process muted IMs - if (LLMuteList::getInstance()->isMuted( - other_participant_id, - LLMute::flagTextChat) && !LLMuteList::getInstance()->isLinden(from)) - { - return; - } - LLUUID new_session_id = session_id; if (new_session_id.isNull()) { @@ -2452,10 +2443,25 @@ void LLIMMgr::addMessage( LLIMModel::instance().addMessage(new_session_id, from, other_participant_id, bonus_info.str()); } + // Logically it would make more sense to reject the session sooner, in another area of the + // code, but the session has to be established inside the server before it can be left. + if (LLMuteList::getInstance()->isMuted(other_participant_id) && !LLMuteList::getInstance()->isLinden(from)) + { + llwarns << "Leaving IM session from initiating muted resident " << from << llendl; + if(!gIMMgr->leaveSession(new_session_id)) + { + llwarns << "Session " << new_session_id << " does not exist." << llendl; + } + return; + } + make_ui_sound("UISndNewIncomingIMSession"); } - LLIMModel::instance().addMessage(new_session_id, from, other_participant_id, msg); + if (!LLMuteList::getInstance()->isMuted(other_participant_id, LLMute::flagTextChat)) + { + LLIMModel::instance().addMessage(new_session_id, from, other_participant_id, msg); + } } void LLIMMgr::addSystemMessage(const LLUUID& session_id, const std::string& message_name, const LLSD& args) @@ -2661,12 +2667,6 @@ void LLIMMgr::inviteToSession( const std::string& session_handle, const std::string& session_uri) { - //ignore invites from muted residents - if (LLMuteList::getInstance()->isMuted(caller_id)) - { - return; - } - std::string notify_box_type; // voice invite question is different from default only for group call (EXT-7118) std::string question_type = "VoiceInviteQuestionDefault"; @@ -2712,6 +2712,22 @@ void LLIMMgr::inviteToSession( payload["notify_box_type"] = notify_box_type; payload["question_type"] = question_type; + if (voice_invite && + "VoiceInviteQuestionDefault" == question_type && + LLMuteList::getInstance()->isMuted(caller_id) && + !LLMuteList::getInstance()->isLinden(caller_name)) + { + llwarns << "Rejecting voice call from initiating muted resident " << caller_name << llendl; + LLIncomingCallDialog::processCallResponse(1, payload); + return; + } + + //ignore invites from muted residents + if (LLMuteList::getInstance()->isMuted(caller_id)) + { + return; + } + LLVoiceChannel* channelp = LLVoiceChannel::getChannelByID(session_id); if (channelp && channelp->callStarted()) { @@ -3234,7 +3250,7 @@ public: chat.mFromID = from_id; chat.mFromName = name; - if (!is_linden && (is_busy || is_muted)) + if (!is_linden && is_busy) { return; } @@ -3266,6 +3282,11 @@ public: ll_vector3_from_sd(message_params["position"]), true); + if (LLMuteList::getInstance()->isMuted(from_id, name, LLMute::flagTextChat)) + { + return; + } + //K now we want to accept the invitation std::string url = gAgent.getRegion()->getCapability( "ChatSessionRequest"); -- cgit v1.2.3 From f2d2e7e489613769ca40cc838630b20c854942a5 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Mon, 12 Dec 2011 11:32:34 -0500 Subject: STORM-1731 Changes per RB comments: changed llwarns to llinfos, added check so you cannot mute a Linden --- indra/newview/llimview.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index daef307601..f96e7f2cc3 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -2450,7 +2450,7 @@ void LLIMMgr::addMessage( llwarns << "Leaving IM session from initiating muted resident " << from << llendl; if(!gIMMgr->leaveSession(new_session_id)) { - llwarns << "Session " << new_session_id << " does not exist." << llendl; + llinfos << "Session " << new_session_id << " does not exist." << llendl; } return; } @@ -2673,6 +2673,9 @@ void LLIMMgr::inviteToSession( BOOL ad_hoc_invite = FALSE; BOOL voice_invite = FALSE; + bool is_linden = LLMuteList::getInstance()->isLinden(caller_name); + + if(type == IM_SESSION_P2P_INVITE) { //P2P is different...they only have voice invitations @@ -2715,15 +2718,15 @@ void LLIMMgr::inviteToSession( if (voice_invite && "VoiceInviteQuestionDefault" == question_type && LLMuteList::getInstance()->isMuted(caller_id) && - !LLMuteList::getInstance()->isLinden(caller_name)) + !is_linden) { - llwarns << "Rejecting voice call from initiating muted resident " << caller_name << llendl; + llinfos << "Rejecting voice call from initiating muted resident " << caller_name << llendl; LLIncomingCallDialog::processCallResponse(1, payload); return; } //ignore invites from muted residents - if (LLMuteList::getInstance()->isMuted(caller_id)) + if (LLMuteList::getInstance()->isMuted(caller_id) && !is_linden) { return; } -- cgit v1.2.3 From 2c9db624fb6a463efbd8a208d6d7f3bae72c0211 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Mon, 12 Dec 2011 14:48:36 -0500 Subject: STORM-1731 Adjusted if muted logic slightly --- indra/newview/llimview.cpp | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index f96e7f2cc3..a856bd0bdc 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -2714,20 +2714,15 @@ void LLIMMgr::inviteToSession( payload["session_uri"] = session_uri; payload["notify_box_type"] = notify_box_type; payload["question_type"] = question_type; - - if (voice_invite && - "VoiceInviteQuestionDefault" == question_type && - LLMuteList::getInstance()->isMuted(caller_id) && - !is_linden) - { - llinfos << "Rejecting voice call from initiating muted resident " << caller_name << llendl; - LLIncomingCallDialog::processCallResponse(1, payload); - return; - } //ignore invites from muted residents if (LLMuteList::getInstance()->isMuted(caller_id) && !is_linden) { + if (voice_invite && "VoiceInviteQuestionDefault" == question_type) + { + llinfos << "Rejecting voice call from initiating muted resident " << caller_name << llendl; + LLIncomingCallDialog::processCallResponse(1, payload); + } return; } -- cgit v1.2.3 From 7f85f6be6af92868faeaf38b60accd3a3ab4491a Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Mon, 12 Dec 2011 20:07:34 -0500 Subject: VWR-27832 L$ Transfer failures show alert as if successful --- indra/newview/llviewermessage.cpp | 16 +++++++++++----- indra/newview/skins/default/xui/en/notifications.xml | 9 +++++++++ indra/newview/skins/default/xui/en/strings.xml | 4 ++++ 3 files changed, 24 insertions(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index ad333a71ff..2f2c711073 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -5206,6 +5206,7 @@ static void process_money_balance_reply_extended(LLMessageSystem* msg) BOOL is_dest_group = FALSE; S32 amount = 0; std::string item_description; + BOOL success = FALSE; msg->getS32("TransactionInfo", "TransactionType", transaction_type); msg->getUUID("TransactionInfo", "SourceID", source_id); @@ -5214,6 +5215,7 @@ static void process_money_balance_reply_extended(LLMessageSystem* msg) msg->getBOOL("TransactionInfo", "IsDestGroup", is_dest_group); msg->getS32("TransactionInfo", "Amount", amount); msg->getString("TransactionInfo", "ItemDescription", item_description); + msg->getBOOL("MoneyData", "TransactionSuccess", success); LL_INFOS("Money") << "MoneyBalanceReply source " << source_id << " dest " << dest_id << " type " << transaction_type @@ -5275,28 +5277,32 @@ static void process_money_balance_reply_extended(LLMessageSystem* msg) { if (dest_id.notNull()) { - message = LLTrans::getString("you_paid_ldollars", args); + message = success ? LLTrans::getString("you_paid_ldollars", args) : + LLTrans::getString("you_paid_failure_ldollars", args); } else { // transaction fee to the system, eg, to create a group - message = LLTrans::getString("you_paid_ldollars_no_name", args); + message = success ? LLTrans::getString("you_paid_ldollars_no_name", args) : + LLTrans::getString("you_paid_failure_ldollars_no_name", args); } } else { if (dest_id.notNull()) { - message = LLTrans::getString("you_paid_ldollars_no_reason", args); + message = success ? LLTrans::getString("you_paid_ldollars_no_reason", args) : + LLTrans::getString("you_paid_failure_ldollars_no_reason", args); } else { // no target, no reason, you just paid money - message = LLTrans::getString("you_paid_ldollars_no_info", args); + message = success ? LLTrans::getString("you_paid_ldollars_no_info", args) : + LLTrans::getString("you_paid_failure_ldollars_no_info", args); } } final_args["MESSAGE"] = message; - notification = "PaymentSent"; + notification = success ? "PaymentSent" : "PaymentFailure"; } else { // ...someone paid you diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 0ba4b84abe..a7705c8bac 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -5516,6 +5516,15 @@ Please select at least one type of content to search (General, Moderate, or Adul [MESSAGE] + + funds +[MESSAGE] + + You paid L$[AMOUNT]. You paid [NAME] L$[AMOUNT]. You paid L$[AMOUNT] [REASON]. + You failed to pay [NAME] L$[AMOUNT] [REASON]. + You failed to pay L$[AMOUNT]. + You failed to pay [NAME] L$[AMOUNT]. + You failed to pay L$[AMOUNT] [REASON]. for [ITEM] for a parcel of land for a land access pass -- cgit v1.2.3 From eb7b43fb558d66eb08b7a06ffdd578bfe94e5eb8 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Wed, 14 Dec 2011 13:21:48 -0500 Subject: STORM-1733 Menu entry Release Keys is in Advanced->Shortcuts sub-menu but has no shortcut --- indra/newview/skins/default/xui/en/menu_viewer.xml | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 1834be2d48..0aa5c72f2a 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -1713,7 +1713,17 @@ function="ToggleControl" parameter="MouseSmooth" /> - + + + + - - - - + Date: Wed, 14 Dec 2011 17:44:10 -0500 Subject: STORM-1736 Cropped buttons in the bottom of the Ad-hoc floater --- indra/newview/skins/default/xui/en/floater_im_session.xml | 2 +- indra/newview/skins/default/xui/en/panel_adhoc_control_panel.xml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/floater_im_session.xml b/indra/newview/skins/default/xui/en/floater_im_session.xml index 5fe8f3c114..a2739a8339 100644 --- a/indra/newview/skins/default/xui/en/floater_im_session.xml +++ b/indra/newview/skins/default/xui/en/floater_im_session.xml @@ -3,7 +3,7 @@ legacy_header_height="18" background_visible="true" default_tab_group="1" - height="350" + height="355" help_topic="floater_im_box" layout="topleft" name="panel_im" diff --git a/indra/newview/skins/default/xui/en/panel_adhoc_control_panel.xml b/indra/newview/skins/default/xui/en/panel_adhoc_control_panel.xml index e70abc0975..93cafd4a53 100644 --- a/indra/newview/skins/default/xui/en/panel_adhoc_control_panel.xml +++ b/indra/newview/skins/default/xui/en/panel_adhoc_control_panel.xml @@ -58,7 +58,7 @@ label="Call" name="call_btn" width="130" - top="5" /> + top="0" /> + top="0"/> -- cgit v1.2.3 From 16b6a472477bd389771fe4022e425f77ca85c2bd Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Fri, 16 Dec 2011 15:07:04 -0800 Subject: EXP-1742 FIX -- Clicking IM notification or receiving multiple IM notifications in quick succession crashes to desktop * Moved toast logic for mouse hover out of the draw call to avoid chain of callbacks that lead to reordering of the draw list while we are iterating over it. --- indra/newview/llappviewer.cpp | 2 + indra/newview/lltoast.cpp | 146 ++++++++++++++++++++++++------------------ indra/newview/lltoast.h | 8 ++- 3 files changed, 89 insertions(+), 67 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index b45f9c55fb..0861fe85a8 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -75,6 +75,7 @@ //#include "llfirstuse.h" #include "llrender.h" #include "llteleporthistory.h" +#include "lltoast.h" #include "lllocationhistory.h" #include "llfasttimerview.h" #include "llvector4a.h" @@ -4051,6 +4052,7 @@ void LLAppViewer::idle() LLFrameTimer::updateFrameTime(); LLFrameTimer::updateFrameCount(); LLEventTimer::updateClass(); + LLNotificationsUI::LLToast::updateClass(); LLCriticalDamp::updateInterpolants(); LLMortician::updateClass(); LLFilePickerThread::clearDead(); //calls LLFilePickerThread::notify() diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp index c4b226b70b..da691a2d0c 100644 --- a/indra/newview/lltoast.cpp +++ b/indra/newview/lltoast.cpp @@ -140,7 +140,9 @@ LLToast::LLToast(const LLToast::Params& p) // init callbacks if present if(!p.on_delete_toast().empty()) + { mOnDeleteToastSignal.connect(p.on_delete_toast()); + } } void LLToast::reshape(S32 width, S32 height, BOOL called_from_parent) @@ -236,7 +238,9 @@ void LLToast::setCanFade(bool can_fade) { mCanFade = can_fade; if(!mCanFade) + { mTimer->stop(); + } } //-------------------------------------------------------------------------- @@ -328,55 +332,6 @@ void LLToast::draw() drawChild(mHideBtn); } } - - updateHoveredState(); - - LLToastLifeTimer* timer = getTimer(); - if (!timer) - { - return; - } - - // Started timer means the mouse had left the toast previously. - // If toast is hovered in the current frame we should handle - // a mouse enter event. - if(timer->getStarted() && mIsHovered) - { - mOnToastHoverSignal(this, MOUSE_ENTER); - - updateTransparency(); - - //toasts fading is management by Screen Channel - - sendChildToFront(mHideBtn); - if(mHideBtn && mHideBtn->getEnabled()) - { - mHideBtn->setVisible(TRUE); - } - mToastMouseEnterSignal(this, getValue()); - } - // Stopped timer means the mouse had entered the toast previously. - // If the toast is not hovered in the current frame we should handle - // a mouse leave event. - else if(!timer->getStarted() && !mIsHovered) - { - mOnToastHoverSignal(this, MOUSE_LEAVE); - - updateTransparency(); - - //toasts fading is management by Screen Channel - - if(mHideBtn && mHideBtn->getEnabled()) - { - if( mHideBtnPressed ) - { - mHideBtnPressed = false; - return; - } - mHideBtn->setVisible(FALSE); - } - mToastMouseLeaveSignal(this, getValue()); - } } //-------------------------------------------------------------------------- @@ -440,28 +395,80 @@ void LLToast::updateHoveredState() { // mouse is not over this toast mIsHovered = false; - return; } + else + { + bool is_overlapped_by_other_floater = false; - bool is_overlapped_by_other_floater = false; - - const child_list_t* child_list = gFloaterView->getChildList(); + const child_list_t* child_list = gFloaterView->getChildList(); - // find this toast in gFloaterView child list to check whether any floater - // with higher Z-order is visible under the mouse pointer overlapping this toast - child_list_const_reverse_iter_t r_iter = std::find(child_list->rbegin(), child_list->rend(), this); - if (r_iter != child_list->rend()) - { - // skip this toast and proceed to views above in Z-order - for (++r_iter; r_iter != child_list->rend(); ++r_iter) + // find this toast in gFloaterView child list to check whether any floater + // with higher Z-order is visible under the mouse pointer overlapping this toast + child_list_const_reverse_iter_t r_iter = std::find(child_list->rbegin(), child_list->rend(), this); + if (r_iter != child_list->rend()) { - LLView* view = *r_iter; - is_overlapped_by_other_floater = view->isInVisibleChain() && view->calcScreenRect().pointInRect(x, y); - if (is_overlapped_by_other_floater) break; + // skip this toast and proceed to views above in Z-order + for (++r_iter; r_iter != child_list->rend(); ++r_iter) + { + LLView* view = *r_iter; + is_overlapped_by_other_floater = view->isInVisibleChain() && view->calcScreenRect().pointInRect(x, y); + if (is_overlapped_by_other_floater) + { + break; + } + } } + + mIsHovered = !is_overlapped_by_other_floater; } - mIsHovered = !is_overlapped_by_other_floater; + LLToastLifeTimer* timer = getTimer(); + + if (timer) + { + // Started timer means the mouse had left the toast previously. + // If toast is hovered in the current frame we should handle + // a mouse enter event. + if(timer->getStarted() && mIsHovered) + { + mOnToastHoverSignal(this, MOUSE_ENTER); + + updateTransparency(); + + //toasts fading is management by Screen Channel + + sendChildToFront(mHideBtn); + if(mHideBtn && mHideBtn->getEnabled()) + { + mHideBtn->setVisible(TRUE); + } + + mToastMouseEnterSignal(this, getValue()); + } + // Stopped timer means the mouse had entered the toast previously. + // If the toast is not hovered in the current frame we should handle + // a mouse leave event. + else if(!timer->getStarted() && !mIsHovered) + { + mOnToastHoverSignal(this, MOUSE_LEAVE); + + updateTransparency(); + + //toasts fading is management by Screen Channel + + if(mHideBtn && mHideBtn->getEnabled()) + { + if( mHideBtnPressed ) + { + mHideBtnPressed = false; + return; + } + mHideBtn->setVisible(FALSE); + } + + mToastMouseLeaveSignal(this, getValue()); + } + } } void LLToast::setBackgroundOpaque(BOOL b) @@ -553,3 +560,14 @@ S32 LLToast::notifyParent(const LLSD& info) return LLModalDialog::notifyParent(info); } + +//static +void LLToast::updateClass() +{ + for (LLInstanceTracker::instance_iter iter = LLInstanceTracker::beginInstances(); iter != LLInstanceTracker::endInstances(); ) + { + LLToast& toast = *iter++; + + toast.updateHoveredState(); + } +} diff --git a/indra/newview/lltoast.h b/indra/newview/lltoast.h index 77229e7beb..0b06728935 100644 --- a/indra/newview/lltoast.h +++ b/indra/newview/lltoast.h @@ -27,7 +27,7 @@ #ifndef LL_LLTOAST_H #define LL_LLTOAST_H - +#include "llinstancetracker.h" #include "llpanel.h" #include "llmodaldialog.h" #include "lleventtimer.h" @@ -69,7 +69,7 @@ private : * Represents toast pop-up. * This is a parent view for all toast panels. */ -class LLToast : public LLModalDialog +class LLToast : public LLModalDialog, public LLInstanceTracker { friend class LLToastLifeTimer; public: @@ -102,6 +102,8 @@ public: Params(); }; + + static void updateClass(); LLToast(const LLToast::Params& p); virtual ~LLToast(); @@ -221,7 +223,7 @@ private: F32 mToastLifetime; // in seconds F32 mToastFadingTime; // in seconds - + LLPanel* mPanel; LLButton* mHideBtn; -- cgit v1.2.3 From 399bd5643cdec65b98b76556b16e3a00df6db1b2 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Sat, 17 Dec 2011 13:27:20 -0500 Subject: STORM-653 As a user i would like to be able to see the available number of attachments and remaining free slots. --- indra/newview/llcofwearables.cpp | 14 ++++++++++++++ indra/newview/llcofwearables.h | 2 ++ indra/newview/skins/default/xui/en/panel_cof_wearables.xml | 1 + indra/newview/skins/default/xui/en/strings.xml | 1 + 4 files changed, 18 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp index 54598f90c8..e9c7a3fa03 100644 --- a/indra/newview/llcofwearables.cpp +++ b/indra/newview/llcofwearables.cpp @@ -328,6 +328,19 @@ BOOL LLCOFWearables::postBuild() return LLPanel::postBuild(); } +void LLCOFWearables::setAttachmentsTitle() +{ + if (mAttachmentsTab) + { + U32 free_slots = MAX_AGENT_ATTACHMENTS - mAttachments->size(); + + LLStringUtil::format_map_t args_attachments; + args_attachments["[COUNT]"] = llformat ("%d", free_slots); + std::string attachments_title = LLTrans::getString("Attachments remain", args_attachments); + mAttachmentsTab->setTitle(attachments_title); + } +} + void LLCOFWearables::onSelectionChange(LLFlatListView* selected_list) { if (!selected_list) return; @@ -490,6 +503,7 @@ void LLCOFWearables::populateAttachmentsAndBodypartsLists(const LLInventoryModel { mAttachments->sort(); mAttachments->notify(REARRANGE); //notifying the parent about the list's size change (cause items were added with rearrange=false) + setAttachmentsTitle(); } else { diff --git a/indra/newview/llcofwearables.h b/indra/newview/llcofwearables.h index 1f8d6d0c94..9957d6a64e 100644 --- a/indra/newview/llcofwearables.h +++ b/indra/newview/llcofwearables.h @@ -91,6 +91,8 @@ public: */ void selectClothing(LLWearableType::EType clothing_type); + void setAttachmentsTitle(); + protected: void populateAttachmentsAndBodypartsLists(const LLInventoryModel::item_array_t& cof_items); diff --git a/indra/newview/skins/default/xui/en/panel_cof_wearables.xml b/indra/newview/skins/default/xui/en/panel_cof_wearables.xml index beea53437a..aa8e3d07a6 100644 --- a/indra/newview/skins/default/xui/en/panel_cof_wearables.xml +++ b/indra/newview/skins/default/xui/en/panel_cof_wearables.xml @@ -37,6 +37,7 @@ top="0" width="311" /> + All No attachments worn + Attachments ([COUNT] slots remain) -- cgit v1.2.3 From 5226629883b20dcf105f78c5633124d1f57fd399 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Sun, 18 Dec 2011 10:29:05 -0500 Subject: STORM-1737 panel_edit_skin.xml uses confusing historical terminology --- indra/newview/llpaneleditwearable.cpp | 6 +++--- indra/newview/skins/default/xui/en/panel_edit_skin.xml | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index b73d97e4c4..03404e816b 100644 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -356,9 +356,9 @@ LLEditWearableDictionary::ColorSwatchCtrls::ColorSwatchCtrls() LLEditWearableDictionary::TextureCtrls::TextureCtrls() { - addEntry ( TEX_HEAD_BODYPAINT, new PickerControlEntry (TEX_HEAD_BODYPAINT, "Head Tattoos", LLUUID::null, TRUE )); - addEntry ( TEX_UPPER_BODYPAINT, new PickerControlEntry (TEX_UPPER_BODYPAINT, "Upper Tattoos", LLUUID::null, TRUE )); - addEntry ( TEX_LOWER_BODYPAINT, new PickerControlEntry (TEX_LOWER_BODYPAINT, "Lower Tattoos", LLUUID::null, TRUE )); + addEntry ( TEX_HEAD_BODYPAINT, new PickerControlEntry (TEX_HEAD_BODYPAINT, "Head", LLUUID::null, TRUE )); + addEntry ( TEX_UPPER_BODYPAINT, new PickerControlEntry (TEX_UPPER_BODYPAINT, "Upper Body", LLUUID::null, TRUE )); + addEntry ( TEX_LOWER_BODYPAINT, new PickerControlEntry (TEX_LOWER_BODYPAINT, "Lower Body", LLUUID::null, TRUE )); addEntry ( TEX_HAIR, new PickerControlEntry (TEX_HAIR, "Texture", LLUUID( gSavedSettings.getString( "UIImgDefaultHairUUID" ) ), FALSE )); addEntry ( TEX_EYES_IRIS, new PickerControlEntry (TEX_EYES_IRIS, "Iris", LLUUID( gSavedSettings.getString( "UIImgDefaultEyesUUID" ) ), FALSE )); addEntry ( TEX_UPPER_SHIRT, new PickerControlEntry (TEX_UPPER_SHIRT, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultShirtUUID" ) ), FALSE )); diff --git a/indra/newview/skins/default/xui/en/panel_edit_skin.xml b/indra/newview/skins/default/xui/en/panel_edit_skin.xml index 45591ba2ad..b61f65a3d1 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_skin.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_skin.xml @@ -27,10 +27,10 @@ default_image_name="Default" follows="left|top" height="80" - label="Head Tattoos" + label="Head" layout="topleft" left="25" - name="Head Tattoos" + name="Head" tool_tip="Click to choose a picture" top="10" width="74" > @@ -43,10 +43,10 @@ default_image_name="Default" follows="left|top" height="80" - label="Upper Tattoos" + label="Upper body" layout="topleft" left_pad="20" - name="Upper Tattoos" + name="Upper Body" tool_tip="Click to choose a picture" top="10" width="74" > @@ -59,10 +59,10 @@ default_image_name="Default" follows="left|top" height="80" - label="Lower Tattoos" + label="Lower body" layout="topleft" left_pad="20" - name="Lower Tattoos" + name="Lower Body" tool_tip="Click to choose a picture" top="10" width="74" > -- cgit v1.2.3 From 5dc8e44c767f839e3d2d1d926bfdeee969f2492e Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Tue, 20 Dec 2011 20:44:38 +0200 Subject: EXP-1499 FIXED Added some NULL checks in notifications UI code to avoid a crash on exit. The crash happened if connection timed out while there were unread object inventory offers. --- indra/newview/llchiclet.cpp | 6 ++++++ indra/newview/llscriptfloater.cpp | 11 +++++++++-- indra/newview/llsyswellwindow.cpp | 13 ++++++++++++- indra/newview/llsyswellwindow.h | 1 + 4 files changed, 28 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index a076374903..045c9017be 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -250,6 +250,12 @@ LLIMWellChiclet::LLIMWellChiclet(const Params& p) LLIMWellChiclet::~LLIMWellChiclet() { + LLIMWellWindow* im_well_window = LLIMWellWindow::findInstance(); + if (im_well_window) + { + im_well_window->setSysWellChiclet(NULL); + } + LLIMMgr::getInstance()->removeSessionObserver(this); } diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp index 85a7e75271..6f98be1cb8 100644 --- a/indra/newview/llscriptfloater.cpp +++ b/indra/newview/llscriptfloater.cpp @@ -408,9 +408,16 @@ void LLScriptFloaterManager::onRemoveNotification(const LLUUID& notification_id) } // remove related chiclet - LLChicletBar::getInstance()->getChicletPanel()->removeChiclet(notification_id); + if (LLChicletBar::instanceExists()) + { + LLChicletBar::getInstance()->getChicletPanel()->removeChiclet(notification_id); + } - LLIMWellWindow::getInstance()->removeObjectRow(notification_id); + LLIMWellWindow* im_well_window = LLIMWellWindow::findInstance(); + if (im_well_window) + { + im_well_window->removeObjectRow(notification_id); + } mNotifications.erase(notification_id); diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp index 3aa6a3b7e5..0cb6c85012 100644 --- a/indra/newview/llsyswellwindow.cpp +++ b/indra/newview/llsyswellwindow.cpp @@ -159,6 +159,7 @@ void LLSysWellWindow::setVisible(BOOL visible) LLTransientDockableFloater::setVisible(visible); // update notification channel state + initChannel(); // make sure the channel still exists if(mChannel) { mChannel->updateShowToastsState(); @@ -598,6 +599,13 @@ LLIMWellWindow* LLIMWellWindow::getInstance(const LLSD& key /*= LLSD()*/) return LLFloaterReg::getTypedInstance("im_well_window", key); } + +// static +LLIMWellWindow* LLIMWellWindow::findInstance(const LLSD& key /*= LLSD()*/) +{ + return LLFloaterReg::findTypedInstance("im_well_window", key); +} + BOOL LLIMWellWindow::postBuild() { BOOL rv = LLSysWellWindow::postBuild(); @@ -751,7 +759,10 @@ void LLIMWellWindow::removeObjectRow(const LLUUID& notification_id) { if (mMessageList->removeItemByValue(notification_id)) { - mSysWellChiclet->updateWidget(isWindowEmpty()); + if (mSysWellChiclet) + { + mSysWellChiclet->updateWidget(isWindowEmpty()); + } } else { diff --git a/indra/newview/llsyswellwindow.h b/indra/newview/llsyswellwindow.h index 52e5370505..272e9cfcb1 100644 --- a/indra/newview/llsyswellwindow.h +++ b/indra/newview/llsyswellwindow.h @@ -153,6 +153,7 @@ public: ~LLIMWellWindow(); static LLIMWellWindow* getInstance(const LLSD& key = LLSD()); + static LLIMWellWindow* findInstance(const LLSD& key = LLSD()); static void initClass() { getInstance(); } /*virtual*/ BOOL postBuild(); -- cgit v1.2.3