From 855a02554f0181227ac20633b2fcc6af3958e444 Mon Sep 17 00:00:00 2001 From: angela Date: Mon, 30 Nov 2009 16:37:02 +0800 Subject: trivial xml formating changes --- .../skins/default/xui/en/floater_nearby_chat.xml | 4 +- .../skins/default/xui/en/panel_chat_item.xml | 85 +++++++++++++--------- indra/newview/skins/default/xui/en/panel_toast.xml | 44 +++++------ 3 files changed, 74 insertions(+), 59 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/floater_nearby_chat.xml b/indra/newview/skins/default/xui/en/floater_nearby_chat.xml index d8534bfe0b..e2230d82ea 100644 --- a/indra/newview/skins/default/xui/en/floater_nearby_chat.xml +++ b/indra/newview/skins/default/xui/en/floater_nearby_chat.xml @@ -22,10 +22,10 @@ bg_readonly_color="ChatHistoryBgColor" bg_writeable_color="ChatHistoryBgColor" follows="all" - left="1" + left="1" top="20" layout="topleft" - height="280" + height="280" name="chat_history" parse_highlights="true" text_color="ChatHistoryTextColor" diff --git a/indra/newview/skins/default/xui/en/panel_chat_item.xml b/indra/newview/skins/default/xui/en/panel_chat_item.xml index 2b29796f0a..ce4e4701b6 100644 --- a/indra/newview/skins/default/xui/en/panel_chat_item.xml +++ b/indra/newview/skins/default/xui/en/panel_chat_item.xml @@ -6,14 +6,14 @@ height="180" follows="all"> - + + font.style="BOLD" + height="12" + layout="topleft" + left_pad="5" + top="7" + text_color="white" + word_wrap="false" + use_ellipses="true" + mouse_opaque="true" + name="sender_name" + width="150"> Jerry Knight - - + + + top="8" + value="23:30" + width="50" + word_wrap="true" /> + name="toast" + title="" + visible="false" + layout="topleft" + height="40" + width="305" + left="0" + top="0" + follows="right|bottom" + bg_opaque_image="Toast_Background" + bg_alpha_image="Toast_Background" + can_minimize="false" + can_tear_off="false" + can_resize="false" + can_drag_on_left="false" + can_close="false" + can_dock="false" + border_visible = "false" + border_drop_shadow_visible = "false" + drop_shadow_visible = "false" + border = "false" +> Date: Mon, 30 Nov 2009 18:36:33 +0800 Subject: EXT-1881 [BSI] Log (Nearby Chat) floater should turn semi-transparent when it loses focus. --- indra/newview/llnearbychat.cpp | 18 +++++++++ indra/newview/llnearbychat.h | 4 ++ .../skins/default/xui/en/floater_nearby_chat.xml | 7 ++++ .../skins/default/xui/en/widgets/floater.xml | 45 +++++++++++----------- 4 files changed, 52 insertions(+), 22 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp index 80a6cc343f..baf4d4bfe3 100644 --- a/indra/newview/llnearbychat.cpp +++ b/indra/newview/llnearbychat.cpp @@ -224,3 +224,21 @@ void LLNearbyChat::getAllowedRect(LLRect& rect) { rect = gViewerWindow->getWorldViewRectScaled(); } + + +//////////////////////////////////////////////////////////////////////////////// +// +void LLNearbyChat::onFocusReceived() +{ + setBackgroundOpaque(true); + LLPanel::onFocusReceived(); +} + +//////////////////////////////////////////////////////////////////////////////// +// +void LLNearbyChat::onFocusLost() +{ + setBackgroundOpaque(false); + LLPanel::onFocusLost(); +} + diff --git a/indra/newview/llnearbychat.h b/indra/newview/llnearbychat.h index 561c2d3677..5d9ed0c3ac 100644 --- a/indra/newview/llnearbychat.h +++ b/indra/newview/llnearbychat.h @@ -51,6 +51,10 @@ public: void onNearbyChatContextMenuItemClicked(const LLSD& userdata); bool onNearbyChatCheckContextMenuItem(const LLSD& userdata); + // focus overrides + /*virtual*/ void onFocusLost(); + /*virtual*/ void onFocusReceived(); + /*virtual*/ void onOpen (const LLSD& key); virtual void setRect (const LLRect &rect); diff --git a/indra/newview/skins/default/xui/en/floater_nearby_chat.xml b/indra/newview/skins/default/xui/en/floater_nearby_chat.xml index e2230d82ea..d0632940b6 100644 --- a/indra/newview/skins/default/xui/en/floater_nearby_chat.xml +++ b/indra/newview/skins/default/xui/en/floater_nearby_chat.xml @@ -1,5 +1,12 @@ - -- cgit v1.2.3 From a8796e17bbbd41b6b7b930e42d684ca9acbffe35 Mon Sep 17 00:00:00 2001 From: angela Date: Tue, 1 Dec 2009 16:21:08 +0800 Subject: EXT-2854 Replace instances in the viewer with the final search maturity names --- indra/newview/skins/default/xui/en/floater_about_land.xml | 8 ++++---- indra/newview/skins/default/xui/en/floater_world_map.xml | 2 +- indra/newview/skins/default/xui/en/notifications.xml | 6 +++--- indra/newview/skins/default/xui/en/panel_edit_classified.xml | 4 ++-- indra/newview/skins/default/xui/en/panel_group_general.xml | 6 +++--- indra/newview/skins/default/xui/en/panel_preferences_general.xml | 6 +++--- indra/newview/skins/default/xui/en/panel_region_general.xml | 4 ++-- indra/newview/skins/default/xui/en/strings.xml | 4 ++-- 8 files changed, 20 insertions(+), 20 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/floater_about_land.xml b/indra/newview/skins/default/xui/en/floater_about_land.xml index 8bfd64b3df..6706ef0c8b 100644 --- a/indra/newview/skins/default/xui/en/floater_about_land.xml +++ b/indra/newview/skins/default/xui/en/floater_about_land.xml @@ -1177,19 +1177,19 @@ Only large parcels can be listed in search. - Mature Content + Moderate Content - Adult Content + Explicit Content - Your parcel information or content is considered mature. + Your parcel information or content is considered moderate. - Your parcel information or content is considered adult. + Your parcel information or content is considered explicit. diff --git a/indra/newview/skins/default/xui/en/floater_world_map.xml b/indra/newview/skins/default/xui/en/floater_world_map.xml index e3db0972ec..cb87c9a94d 100644 --- a/indra/newview/skins/default/xui/en/floater_world_map.xml +++ b/indra/newview/skins/default/xui/en/floater_world_map.xml @@ -256,7 +256,7 @@ follows="top|right" height="16" initial_value="true" - label="Mature" + label="Moderate" layout="topleft" left_pad="4" name="event_mature_chk" diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 6e178ad570..cf4b486561 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -3486,7 +3486,7 @@ Publish this classified now for L$[AMOUNT]? icon="alertmodal.tga" name="SetClassifiedMature" type="alertmodal"> -Does this classified contain Mature content? +Does this classified contain Moderate content? -Does this group contain Mature content? +Does this group contain Moderate content? -Please select at least one type of content to search (PG, Mature, or Adult). +Please select at least one type of content to search (General, Moderate, or Adult). - Mature Content + Moderate Content - PG Content + General Content diff --git a/indra/newview/skins/default/xui/en/panel_preferences_general.xml b/indra/newview/skins/default/xui/en/panel_preferences_general.xml index 6bb937e3c6..ee9bfbae93 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_general.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_general.xml @@ -143,15 +143,15 @@ top_pad="-10" width="170"> diff --git a/indra/newview/skins/default/xui/en/panel_region_general.xml b/indra/newview/skins/default/xui/en/panel_region_general.xml index 42c6319699..1f22689313 100644 --- a/indra/newview/skins/default/xui/en/panel_region_general.xml +++ b/indra/newview/skins/default/xui/en/panel_region_general.xml @@ -182,11 +182,11 @@ name="Adult" value="42" /> diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 3c03f0a8cf..d44bdee947 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -269,8 +269,8 @@ Control your camera - PG - Mature + General + Moderate Adult Offline Unknown -- cgit v1.2.3 From c4d6442ef4b6d547521d1d70ecf37bf99ad86373 Mon Sep 17 00:00:00 2001 From: angela Date: Tue, 1 Dec 2009 18:02:24 +0800 Subject: EXT-2927 [BSI] profile text and partner text overwrite after selecting I button on a user --- indra/newview/llinspectavatar.cpp | 15 +++++----- .../skins/default/xui/en/inspect_avatar.xml | 32 ++++++++++++---------- 2 files changed, 25 insertions(+), 22 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp index 866669f326..c30448cd57 100644 --- a/indra/newview/llinspectavatar.cpp +++ b/indra/newview/llinspectavatar.cpp @@ -133,7 +133,7 @@ private: LLUUID mAvatarID; // Need avatar name information to spawn friend add request std::string mAvatarName; - LLUUID mPartnerID; +// LLUUID mPartnerID; // an in-flight request for avatar properties from LLAvatarPropertiesProcessor // is represented by this object LLFetchAvatarData* mPropertiesRequest; @@ -188,7 +188,7 @@ public: LLInspectAvatar::LLInspectAvatar(const LLSD& sd) : LLInspect( LLSD() ), // single_instance, doesn't really need key mAvatarID(), // set in onOpen() - mPartnerID(), +// mPartnerID(), mAvatarName(), mPropertiesRequest(NULL) { @@ -257,7 +257,7 @@ void LLInspectAvatar::onOpen(const LLSD& data) // Extract appropriate avatar id mAvatarID = data["avatar_id"]; - mPartnerID = LLUUID::null; +// mPartnerID = LLUUID::null; BOOL self = mAvatarID == gAgent.getID(); @@ -307,7 +307,7 @@ void LLInspectAvatar::requestUpdate() getChild("user_name")->setValue(""); getChild("user_subtitle")->setValue(""); getChild("user_details")->setValue(""); - getChild("user_partner")->setValue(""); +// getChild("user_partner")->setValue(""); // Make a new request for properties delete mPropertiesRequest; @@ -366,14 +366,14 @@ void LLInspectAvatar::processAvatarData(LLAvatarData* data) getChild("user_details")->setValue( LLSD(details) ); // Look up partner name, if there is one - mPartnerID = data->partner_id; +/* mPartnerID = data->partner_id; if (mPartnerID.notNull()) { gCacheName->get(mPartnerID, FALSE, boost::bind(&LLInspectAvatar::nameUpdatedCallback, this, _1, _2, _3, _4)); } - +*/ // Delete the request object as it has been satisfied delete mPropertiesRequest; mPropertiesRequest = NULL; @@ -456,7 +456,7 @@ void LLInspectAvatar::nameUpdatedCallback( childSetValue("user_name", LLSD(mAvatarName) ); } - if (id == mPartnerID) +/* if (id == mPartnerID) { LLStringUtil::format_map_t args; args["[PARTNER]"] = first + " " + last; @@ -464,6 +464,7 @@ void LLInspectAvatar::nameUpdatedCallback( getChild("user_partner")->setValue(partner); } // Otherwise possibly a request for an older inspector, ignore it + */ } void LLInspectAvatar::onClickAddFriend() diff --git a/indra/newview/skins/default/xui/en/inspect_avatar.xml b/indra/newview/skins/default/xui/en/inspect_avatar.xml index dd3cf079db..e6f384dccd 100644 --- a/indra/newview/skins/default/xui/en/inspect_avatar.xml +++ b/indra/newview/skins/default/xui/en/inspect_avatar.xml @@ -19,7 +19,7 @@ This is my second life description and I really think it is great. - Erica Linden - + +--> - + - - - - - - - - - - - - - - + top="170"> Date: Thu, 3 Dec 2009 09:23:53 +0200 Subject: fix for normal EXT-2944 [BSI] Object chat and Resident chat is combined in Nearby Chat floater when object and Resident share the same name --HG-- branch : product-engine --- indra/newview/llchathistory.cpp | 10 +++++++--- indra/newview/llchathistory.h | 1 + 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 5e17770314..5f1bbc7615 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -355,6 +355,7 @@ void LLChatHistory::clear() { mLastFromName.clear(); LLTextEditor::clear(); + mLastFromID = LLUUID::null; } void LLChatHistory::appendMessage(const LLChat& chat, const bool use_plain_text_chat_history, const LLStyle::Params& input_append_params) @@ -389,9 +390,11 @@ void LLChatHistory::appendMessage(const LLChat& chat, const bool use_plain_text_ LLDate new_message_time = LLDate::now(); - if (mLastFromName == chat.mFromName && - mLastMessageTime.notNull() && - (new_message_time.secondsSinceEpoch() - mLastMessageTime.secondsSinceEpoch()) < 60.0 ) + if (mLastFromName == chat.mFromName + && mLastFromID == chat.mFromID + && mLastMessageTime.notNull() + && (new_message_time.secondsSinceEpoch() - mLastMessageTime.secondsSinceEpoch()) < 60.0 + ) { view = getSeparator(); p.top_pad = mTopSeparatorPad; @@ -419,6 +422,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const bool use_plain_text_ appendWidget(p, header_text, false); mLastFromName = chat.mFromName; + mLastFromID = chat.mFromID; mLastMessageTime = new_message_time; } //Handle IRC styled /me messages. diff --git a/indra/newview/llchathistory.h b/indra/newview/llchathistory.h index d2cfa53d8b..8ca7dd1d58 100644 --- a/indra/newview/llchathistory.h +++ b/indra/newview/llchathistory.h @@ -114,6 +114,7 @@ class LLChatHistory : public LLTextEditor private: std::string mLastFromName; + LLUUID mLastFromID; LLDate mLastMessageTime; std::string mMessageHeaderFilename; std::string mMessageSeparatorFilename; -- cgit v1.2.3 From 62feea50c2f430f65ad7ab16cfa5e66b2b2e2b63 Mon Sep 17 00:00:00 2001 From: Yuri Chebotarev Date: Thu, 3 Dec 2009 10:31:00 +0200 Subject: fix for normal EXT-3077 [BSI] Object chat of objects without a name bork nearby chat toasts and log for information - since I think that messages from nowhere is bad practice for user - if object that send message has no name I use object id as name --HG-- branch : product-engine --- indra/newview/llchatitemscontainerctrl.cpp | 2 -- indra/newview/llnearbychat.cpp | 36 +++--------------------------- indra/newview/llnearbychathandler.cpp | 32 ++++++++++++++++++++++++++ 3 files changed, 35 insertions(+), 35 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp index efdaff3f6a..92df281307 100644 --- a/indra/newview/llchatitemscontainerctrl.cpp +++ b/indra/newview/llchatitemscontainerctrl.cpp @@ -122,7 +122,6 @@ void LLNearbyChatToastPanel::addMessage(LLSD& notification) if(notification["chat_style"].asInteger()== CHAT_STYLE_IRC) { - messageText = messageText.substr(3); style_params.font.style = "ITALIC"; } else if( chat_type == CHAT_TYPE_SHOUT) @@ -208,7 +207,6 @@ void LLNearbyChatToastPanel::init(LLSD& notification) if(notification["chat_style"].asInteger()== CHAT_STYLE_IRC) { - messageText = messageText.substr(3); style_params.font.style = "ITALIC"; } else if( chat_type == CHAT_TYPE_SHOUT) diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp index ee3be0a5e3..fda3df43ae 100644 --- a/indra/newview/llnearbychat.cpp +++ b/indra/newview/llnearbychat.cpp @@ -54,7 +54,7 @@ #include "llstylemap.h" #include "lldraghandle.h" -#include "lltrans.h" + #include "llbottomtray.h" #include "llnearbychatbar.h" #include "llfloaterreg.h" @@ -131,20 +131,6 @@ void LLNearbyChat::applySavedVariables() } } -std::string appendTime() -{ - time_t utc_time; - utc_time = time_corrected(); - std::string timeStr ="["+ LLTrans::getString("TimeHour")+"]:[" - +LLTrans::getString("TimeMin")+"] "; - - LLSD substitution; - - substitution["datetime"] = (S32) utc_time; - LLStringUtil::format (timeStr, substitution); - - return timeStr; -} void LLNearbyChat::addMessage(const LLChat& chat,bool archive) { @@ -171,14 +157,6 @@ void LLNearbyChat::addMessage(const LLChat& chat,bool archive) if (!chat.mMuted) { - std::string message = chat.mText; - - - LLChat& tmp_chat = const_cast(chat); - - if(tmp_chat.mTimeStr.empty()) - tmp_chat.mTimeStr = appendTime(); - if (chat.mChatStyle == CHAT_STYLE_IRC) { LLColor4 txt_color = LLUIColorTable::instance().getColor("White"); @@ -191,17 +169,9 @@ void LLNearbyChat::addMessage(const LLChat& chat,bool archive) append_style_params.readonly_color(txt_color); append_style_params.font.name(font_name); append_style_params.font.size(font_size); - if (chat.mFromName.size() > 0) - { - append_style_params.font.style = "ITALIC"; - LLChat add_chat=chat; - add_chat.mText = chat.mFromName + " "; - mChatHistory->appendMessage(add_chat, use_plain_text_chat_history, append_style_params); - } - - message = message.substr(3); append_style_params.font.style = "ITALIC"; - mChatHistory->appendText(message, FALSE, append_style_params); + + mChatHistory->appendMessage(chat, use_plain_text_chat_history, append_style_params); } else { diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index b0b6db682c..04e206fb99 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -42,6 +42,7 @@ #include "llfloaterreg.h"//for LLFloaterReg::getTypedInstance #include "llviewerwindow.h"//for screen channel position +#include "lltrans.h" //add LLNearbyChatHandler to LLNotificationsUI namespace using namespace LLNotificationsUI; @@ -318,6 +319,22 @@ void LLNearbyChatHandler::initChannel() mChannel->init(channel_right_bound - channel_width, channel_right_bound); } +std::string appendTime() +{ + time_t utc_time; + utc_time = time_corrected(); + std::string timeStr ="["+ LLTrans::getString("TimeHour")+"]:[" + +LLTrans::getString("TimeMin")+"] "; + + LLSD substitution; + + substitution["datetime"] = (S32) utc_time; + LLStringUtil::format (timeStr, substitution); + + return timeStr; +} + + void LLNearbyChatHandler::processChat(const LLChat& chat_msg) { if(chat_msg.mMuted == TRUE) @@ -327,6 +344,21 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg) if(chat_msg.mText.empty()) return;//don't process empty messages + + LLChat& tmp_chat = const_cast(chat_msg); + + if(tmp_chat.mTimeStr.empty()) + tmp_chat.mTimeStr = appendTime(); + + if (tmp_chat.mChatStyle == CHAT_STYLE_IRC) + { + tmp_chat.mText = tmp_chat.mFromName + " " + tmp_chat.mText.substr(3); + } + + { + if(tmp_chat.mFromName.empty() && tmp_chat.mFromID!= LLUUID::null) + tmp_chat.mFromName = tmp_chat.mFromID.asString(); + } LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance("nearby_chat", LLSD()); nearby_chat->addMessage(chat_msg); -- cgit v1.2.3 From e8196ca93f24644998777da6b2286920c7709cbe Mon Sep 17 00:00:00 2001 From: angela Date: Thu, 3 Dec 2009 18:38:15 +0800 Subject: EXT-2313 Add auto-close behavior to mini-inspector floater --- indra/newview/app_settings/settings.xml | 13 ++++++++++++- indra/newview/llinspect.cpp | 21 +++++++++++++++++---- indra/newview/llinspect.h | 3 +++ 3 files changed, 32 insertions(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index d9607e5f6b..fb1aac6e95 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3706,7 +3706,18 @@ Type F32 Value - 0.15 + 0.5 + + InspectorShowTime + + Comment + Stay timing for inspectors + Persist + 1 + Type + F32 + Value + 3.0 InstallLanguage diff --git a/indra/newview/llinspect.cpp b/indra/newview/llinspect.cpp index aa299014ee..c7b8db9635 100644 --- a/indra/newview/llinspect.cpp +++ b/indra/newview/llinspect.cpp @@ -50,16 +50,16 @@ LLInspect::~LLInspect() void LLInspect::draw() { static LLCachedControl FADE_TIME(*LLUI::sSettingGroups["config"], "InspectorFadeTime", 1.f); + static LLCachedControl STAY_TIME(*LLUI::sSettingGroups["config"], "InspectorShowTime", 1.f); if (mOpenTimer.getStarted()) { - F32 alpha = clamp_rescale(mOpenTimer.getElapsedTimeF32(), 0.f, FADE_TIME, 0.f, 1.f); - LLViewDrawContext context(alpha); LLFloater::draw(); - if (alpha == 1.f) + if (mOpenTimer.getElapsedTimeF32() > STAY_TIME) { mOpenTimer.stop(); + mCloseTimer.start(); } - + } else if (mCloseTimer.getStarted()) { @@ -95,3 +95,16 @@ void LLInspect::onFocusLost() mCloseTimer.start(); mOpenTimer.stop(); } + +// virtual +BOOL LLInspect::handleHover(S32 x, S32 y, MASK mask) +{ + mOpenTimer.pause(); + return LLView::handleHover(x, y, mask); +} + +// virtual +void LLInspect::onMouseLeave(S32 x, S32 y, MASK mask) +{ + mOpenTimer.unpause(); +} diff --git a/indra/newview/llinspect.h b/indra/newview/llinspect.h index a461c2fa16..731e99534b 100644 --- a/indra/newview/llinspect.h +++ b/indra/newview/llinspect.h @@ -46,6 +46,9 @@ public: /// Inspectors have a custom fade-in/fade-out animation /*virtual*/ void draw(); + /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask); + /*virtual*/ void onMouseLeave(S32 x, S32 y, MASK mask); + /// Start open animation /*virtual*/ void onOpen(const LLSD& avatar_id); -- cgit v1.2.3 From a28de873cea85bdedcac20a164d7bd2012a4d5bc Mon Sep 17 00:00:00 2001 From: angela Date: Thu, 3 Dec 2009 22:28:53 +0800 Subject: EXT-2575 [BSI] Deleting content inside a prim from build floater deletes prim, rather than content --- indra/newview/llpanelobjectinventory.cpp | 20 ++++++++++++++++++++ indra/newview/llpanelobjectinventory.h | 3 +++ .../skins/default/xui/en/menu_text_editor.xml | 8 ++++---- 3 files changed, 27 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index 342d2bc739..7b0eb8c2d2 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -1695,6 +1695,7 @@ void LLPanelObjectInventory::updateInventory() } mFolders->requestArrange(); + //LLEditMenuHandler::gEditMenuHandler = mFolders; mInventoryNeedsUpdate = FALSE; } @@ -1940,3 +1941,22 @@ void LLPanelObjectInventory::idle(void* user_data) self->updateInventory(); } } + +void LLPanelObjectInventory::onFocusLost() +{ + // inventory no longer handles cut/copy/paste/delete + if (LLEditMenuHandler::gEditMenuHandler == mFolders) + { + LLEditMenuHandler::gEditMenuHandler = NULL; + } + + LLPanel::onFocusLost(); +} + +void LLPanelObjectInventory::onFocusReceived() +{ + // inventory now handles cut/copy/paste/delete + LLEditMenuHandler::gEditMenuHandler = mFolders; + + LLPanel::onFocusReceived(); +} \ No newline at end of file diff --git a/indra/newview/llpanelobjectinventory.h b/indra/newview/llpanelobjectinventory.h index 6722bb212e..bc339ece35 100644 --- a/indra/newview/llpanelobjectinventory.h +++ b/indra/newview/llpanelobjectinventory.h @@ -74,6 +74,9 @@ public: virtual void deleteAllChildren(); virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg); + /*virtual*/ void onFocusLost(); + /*virtual*/ void onFocusReceived(); + static void idle(void* user_data); protected: diff --git a/indra/newview/skins/default/xui/en/menu_text_editor.xml b/indra/newview/skins/default/xui/en/menu_text_editor.xml index 7c9e6f0796..ecd96088e7 100644 --- a/indra/newview/skins/default/xui/en/menu_text_editor.xml +++ b/indra/newview/skins/default/xui/en/menu_text_editor.xml @@ -32,10 +32,10 @@ function="Edit.EnablePaste" /> + label="Delete" + layout="topleft" + name="Delete" + shortcut="Del"> Date: Thu, 3 Dec 2009 17:55:17 +0200 Subject: Fixed normal bug EXT-3021 - Viewer crashes on receiving notification for creating script(offer) chiclet for same object in second time. --HG-- branch : product-engine --- indra/newview/llscriptfloater.cpp | 46 +++++++++++++++++++++++++++++---------- indra/newview/llscriptfloater.h | 9 ++++++-- 2 files changed, 42 insertions(+), 13 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp index ad95c8b06e..088884178b 100644 --- a/indra/newview/llscriptfloater.cpp +++ b/indra/newview/llscriptfloater.cpp @@ -64,13 +64,13 @@ LLUUID notification_id_to_object_id(const LLUUID& notification_id) LLScriptFloater::LLScriptFloater(const LLSD& key) : LLDockableFloater(NULL, true, key) , mScriptForm(NULL) -, mObjectId(key.asUUID()) { } bool LLScriptFloater::toggle(const LLUUID& object_id) { - LLScriptFloater* floater = LLFloaterReg::findTypedInstance("script_floater", object_id); + LLUUID notification_id = LLScriptFloaterManager::getInstance()->findNotificationId(object_id); + LLScriptFloater* floater = LLFloaterReg::findTypedInstance("script_floater", notification_id); // show existing floater if(floater) @@ -97,7 +97,10 @@ bool LLScriptFloater::toggle(const LLUUID& object_id) LLScriptFloater* LLScriptFloater::show(const LLUUID& object_id) { - LLScriptFloater* floater = LLFloaterReg::showTypedInstance("script_floater", object_id); + LLUUID notification_id = LLScriptFloaterManager::getInstance()->findNotificationId(object_id); + + LLScriptFloater* floater = LLFloaterReg::showTypedInstance("script_floater", notification_id); + floater->setObjectId(object_id); floater->createForm(object_id); if (floater->getDockControl() == NULL) @@ -156,7 +159,10 @@ void LLScriptFloater::createForm(const LLUUID& object_id) void LLScriptFloater::onClose(bool app_quitting) { - LLScriptFloaterManager::getInstance()->removeNotificationByObjectId(getObjectId()); + if(getObjectId().notNull()) + { + LLScriptFloaterManager::getInstance()->removeNotificationByObjectId(getObjectId()); + } } void LLScriptFloater::setDocked(bool docked, bool pop_on_undock /* = true */) @@ -206,7 +212,7 @@ void LLScriptFloaterManager::onAddNotification(const LLUUID& notification_id) script_notification_map_t::iterator it = mNotifications.find(object_id); if(it != mNotifications.end()) { - onRemoveNotification(notification_id); + onRemoveNotification(it->second.notification_id); } LLNotificationData nd = {notification_id}; @@ -228,7 +234,7 @@ void LLScriptFloaterManager::onAddNotification(const LLUUID& notification_id) void LLScriptFloaterManager::onRemoveNotification(const LLUUID& notification_id) { - LLUUID object_id = notification_id_to_object_id(notification_id); + LLUUID object_id = findObjectId(notification_id); if(object_id.isNull()) { llwarns << "Invalid notification, no object id" << llendl; @@ -241,22 +247,24 @@ void LLScriptFloaterManager::onRemoveNotification(const LLUUID& notification_id) LLUUID channel_id(gSavedSettings.getString("NotificationChannelUUID")); LLScreenChannel* channel = dynamic_cast (LLChannelManager::getInstance()->findChannelByID(channel_id)); - if(channel) + LLUUID n_toast_id = findNotificationToastId(object_id); + if(channel && n_toast_id.notNull()) { - channel->killToastByNotificationID(findNotificationToastId(object_id)); + channel->killToastByNotificationID(n_toast_id); } - mNotifications.erase(object_id); - // remove related chiclet LLBottomTray::getInstance()->getChicletPanel()->removeChiclet(object_id); // close floater - LLScriptFloater* floater = LLFloaterReg::findTypedInstance("script_floater", object_id); + LLScriptFloater* floater = LLFloaterReg::findTypedInstance("script_floater", notification_id); if(floater) { + floater->setObjectId(LLUUID::null); floater->closeFloater(); } + + mNotifications.erase(object_id); } void LLScriptFloaterManager::removeNotificationByObjectId(const LLUUID& object_id) @@ -301,6 +309,22 @@ void LLScriptFloaterManager::setNotificationToastId(const LLUUID& object_id, con } } +LLUUID LLScriptFloaterManager::findObjectId(const LLUUID& notification_id) +{ + if(notification_id.notNull()) + { + script_notification_map_t::const_iterator it = mNotifications.begin(); + for(; mNotifications.end() != it; ++it) + { + if(notification_id == it->second.notification_id) + { + return it->first; + } + } + } + return LLUUID::null; +} + LLUUID LLScriptFloaterManager::findNotificationId(const LLUUID& object_id) { script_notification_map_t::const_iterator it = mNotifications.find(object_id); diff --git a/indra/newview/llscriptfloater.h b/indra/newview/llscriptfloater.h index 944b0ba0a2..8b5a266691 100644 --- a/indra/newview/llscriptfloater.h +++ b/indra/newview/llscriptfloater.h @@ -43,6 +43,9 @@ class LLToastNotifyPanel; */ class LLScriptFloaterManager : public LLSingleton { + // *TODO + // LLScriptFloaterManager and LLScriptFloater will need some refactoring after we + // know how script notifications should look like. public: /** @@ -69,6 +72,8 @@ public: */ void toggleScriptFloater(const LLUUID& object_id); + LLUUID findObjectId(const LLUUID& notification_id); + LLUUID findNotificationId(const LLUUID& object_id); LLUUID findNotificationToastId(const LLUUID& object_id); @@ -125,6 +130,8 @@ public: const LLUUID& getObjectId() { return mObjectId; } + void setObjectId(const LLUUID& id) { mObjectId = id; } + /** * Close notification if script floater is closed. */ @@ -154,8 +161,6 @@ protected: */ static void hideToastsIfNeeded(); - void setObjectId(const LLUUID& id) { mObjectId = id; } - private: LLToastNotifyPanel* mScriptForm; LLUUID mObjectId; -- cgit v1.2.3 From 2adf9d6b0490f7692998f0ed73c981238d5860fe Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Thu, 3 Dec 2009 11:18:59 -0500 Subject: EXT-2410 : Accepting an offered notecard should open the inventorySP Preliminary checkin to improve this infrastructure. --HG-- branch : avatar-pipeline --- indra/newview/llinventorypanel.h | 3 +- indra/newview/llsidepanelinventory.cpp | 4 -- indra/newview/llviewermessage.cpp | 91 +++++++++++++++------------------- 3 files changed, 42 insertions(+), 56 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h index d65fe53812..02e6041a38 100644 --- a/indra/newview/llinventorypanel.h +++ b/indra/newview/llinventorypanel.h @@ -163,7 +163,8 @@ public: static void onIdle(void* user_data); // Find whichever inventory panel is active / on top. - static LLInventoryPanel *getActiveInventoryPanel(); + // "Auto_open" determines if we open an inventory panel if none are open. + static LLInventoryPanel *getActiveInventoryPanel(BOOL auto_open = TRUE); protected: void defaultOpenInventory(); // open the first level of inventory diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index 9ab459080e..5f27a21bb5 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -128,10 +128,6 @@ void LLSidepanelInventory::onOpen(const LLSD& key) mTaskPanel->setObjectSelection(LLSelectMgr::getInstance()->getSelection()); showTaskInfoPanel(); } - if (key.has("select")) - { - mPanelMainInventory->getPanel()->setSelection(key["select"].asUUID(), TAKE_FOCUS_NO); - } } void LLSidepanelInventory::onInfoButtonClicked() diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 4d26f6294c..c0be9115a9 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -42,6 +42,7 @@ #include "lltransactionflags.h" #include "llagent.h" +#include "llappearancemgr.h" #include "llcallingcard.h" #include "llfirstuse.h" #include "llfloaterbuycurrency.h" @@ -824,35 +825,40 @@ bool check_offer_throttle(const std::string& from_name, bool check_only) void open_inventory_offer(const std::vector& items, const std::string& from_name) { - std::vector::const_iterator it = items.begin(); - std::vector::const_iterator end = items.end(); const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); - LLInventoryItem* item; - for(; it != end; ++it) + const LLUUID lost_and_found_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND); + const LLUUID cof_id = LLAppearanceManager::instance().getCOF(); + const BOOL user_is_away = gAwayTimer.getStarted(); + + for (std::vector::const_iterator item_iter = items.begin(); + item_iter != items.end(); + ++item_iter) { - const LLUUID& id = *it; - item = gInventory.getItem(id); + const LLUUID& item_id = (*item_iter); + LLInventoryItem* item = gInventory.getItem(item_id); if(!item) { - LL_WARNS("Messaging") << "Unable to show inventory item: " << id << LL_ENDL; + LL_WARNS("Messaging") << "Unable to show inventory item: " << item_id << LL_ENDL; continue; } - if(gInventory.isObjectDescendentOf(id, trash_id)) + if(gInventory.isObjectDescendentOf(item_id, trash_id)) { continue; } - LLAssetType::EType asset_type = item->getType(); //if we are throttled, don't display them + const LLAssetType::EType asset_type = item->getType(); if (check_offer_throttle(from_name, false)) { // If we opened this ourselves, focus it - BOOL take_focus = from_name.empty() ? TAKE_FOCUS_YES : TAKE_FOCUS_NO; + const BOOL take_focus = from_name.empty() ? TAKE_FOCUS_YES : TAKE_FOCUS_NO; switch(asset_type) { case LLAssetType::AT_NOTECARD: - LLFloaterReg::showInstance("preview_notecard", LLSD(id), take_focus); - break; + { + LLFloaterReg::showInstance("preview_notecard", LLSD(item_id), take_focus); + break; + } case LLAssetType::AT_LANDMARK: { LLInventoryCategory* parent_folder = gInventory.getCategory(item->getParentUUID()); @@ -862,63 +868,46 @@ void open_inventory_offer(const std::vector& items, const std::string& f LLNotificationsUtil::add("LandmarkCreated", args); // Created landmark is passed to Places panel to allow its editing. - LLPanelPlaces *panel = dynamic_cast(LLSideTray::getInstance()->showPanel("panel_places", LLSD())); - if (panel) + LLPanelPlaces *places_panel = dynamic_cast(LLSideTray::getInstance()->showPanel("panel_places", LLSD())); + if (places_panel) { - panel->setItem(item); + places_panel->setItem(item); } } break; case LLAssetType::AT_TEXTURE: - LLFloaterReg::showInstance("preview_texture", LLSD(id), take_focus); - break; + { + LLFloaterReg::showInstance("preview_texture", LLSD(item_id), take_focus); + break; + } default: break; } } - //highlight item, if it's not in the trash or lost+found - // Don't auto-open the inventory floater - if(gSavedSettings.getBOOL("ShowInInventory") && - asset_type != LLAssetType::AT_CALLINGCARD && - item->getInventoryType() != LLInventoryType::IT_ATTACHMENT && - !from_name.empty()) - { - //TODO:this should be moved to the end of method after all the checks, - //but first decide what to do with active inventory if any (EK) - LLSD key; - key["select"] = item->getUUID(); - LLSideTray::getInstance()->showPanel("sidepanel_inventory", key); - } - LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(); + //////////////////////////////////////////////////////////////////////////////// + // Highlight item if it's not in the trash, lost+found, or COF + const BOOL auto_open = gSavedSettings.getBOOL("ShowInInventory") && + (asset_type != LLAssetType::AT_CALLINGCARD) && + (item->getInventoryType() != LLInventoryType::IT_ATTACHMENT) && + !from_name.empty(); + LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(auto_open); if(active_panel) { - //Trash Check - const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); - if(gInventory.isObjectDescendentOf(item->getUUID(), trash_id)) + // Don't select lost and found items if the user is active + if (gInventory.isObjectDescendentOf(item_id, lost_and_found_id) && + !user_is_away) { - return; + continue; } - const LLUUID lost_and_found_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND); - //BOOL inventory_has_focus = gFocusMgr.childHasKeyboardFocus(view); - BOOL user_is_away = gAwayTimer.getStarted(); - - // don't select lost and found items if the user is active - if (gInventory.isObjectDescendentOf(item->getUUID(), lost_and_found_id) - && !user_is_away) + if (gInventory.isObjectDescendentOf(item_id, cof_id)) { - return; + continue; } - //Not sure about this check. Could make it easy to miss incoming items. - //don't dick with highlight while the user is working - //if(inventory_has_focus && !user_is_away) - // break; - LL_DEBUGS("Messaging") << "Highlighting" << item->getUUID() << LL_ENDL; - //highlight item - + LL_DEBUGS("Messaging") << "Highlighting" << item_id << LL_ENDL; LLFocusableElement* focus_ctrl = gFocusMgr.getKeyboardFocus(); - active_panel->setSelection(item->getUUID(), TAKE_FOCUS_NO); + active_panel->setSelection(item_id, TAKE_FOCUS_NO); gFocusMgr.setKeyboardFocus(focus_ctrl); } } -- cgit v1.2.3 From bd4ad607ba9015c97a013d734b1fa597924c0e07 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Thu, 3 Dec 2009 11:20:21 -0500 Subject: EXT-2410 : Accepting an offered notecard should open the inventorySP Preliminary checkin to improve this infrastructure. --HG-- branch : avatar-pipeline --- indra/newview/llinventorypanel.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 88e7196ce6..938114ade0 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -547,7 +547,7 @@ void LLInventoryPanel::buildNewViews(const LLUUID& id) cat_iter != categories->end(); ++cat_iter) { - const LLInventoryCategory* cat = (*cat_iter); + const LLViewerInventoryCategory* cat = (*cat_iter); buildNewViews(cat->getUUID()); } } @@ -558,7 +558,7 @@ void LLInventoryPanel::buildNewViews(const LLUUID& id) item_iter != items->end(); ++item_iter) { - const LLInventoryItem* item = (*item_iter); + const LLViewerInventoryItem* item = (*item_iter); buildNewViews(item->getUUID()); } } @@ -857,7 +857,7 @@ void LLInventoryPanel::dumpSelectionInformation(void* user_data) } // static -LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel() +LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel(BOOL auto_open) { LLInventoryPanel* res = NULL; @@ -879,7 +879,7 @@ LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel() } // Otherwise, open the inventorySP and use that. - if (!res) + if (!res && auto_open) { LLSD key; LLSidepanelInventory *sidepanel_inventory = -- cgit v1.2.3 From 8d2752c3a6b390758d567d090347eec85b73ad8d Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Thu, 3 Dec 2009 18:59:23 +0200 Subject: fixed 'accept' of voice group chat --HG-- branch : product-engine --- indra/newview/llimview.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 5481ca97cd..344da345a9 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1392,13 +1392,13 @@ void LLIncomingCallDialog::processCallResponse(S32 response) } else { - LLUUID session_id = gIMMgr->addSession( + LLUUID new_session_id = gIMMgr->addSession( mPayload["session_name"].asString(), type, session_id); - if (session_id != LLUUID::null) + if (new_session_id != LLUUID::null) { - LLIMFloater::show(session_id); + LLIMFloater::show(new_session_id); } std::string url = gAgent.getRegion()->getCapability( @@ -1486,13 +1486,13 @@ bool inviteUserResponse(const LLSD& notification, const LLSD& response) } else { - LLUUID session_id = gIMMgr->addSession( + LLUUID new_session_id = gIMMgr->addSession( payload["session_name"].asString(), type, session_id); - if (session_id != LLUUID::null) + if (new_session_id != LLUUID::null) { - LLIMFloater::show(session_id); + LLIMFloater::show(new_session_id); } std::string url = gAgent.getRegion()->getCapability( -- cgit v1.2.3 From 501bb663ac89bc3918f00dc864e356a027c5a839 Mon Sep 17 00:00:00 2001 From: Sergey Borushevsky Date: Thu, 3 Dec 2009 18:59:31 +0200 Subject: Fixed minor bug EXT-2466 (Call menuitem in the Friends context menu is disabled always) --HG-- branch : product-engine --- indra/newview/llpanelpeoplemenus.cpp | 4 ++-- indra/newview/skins/default/xui/en/menu_people_nearby.xml | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelpeoplemenus.cpp b/indra/newview/llpanelpeoplemenus.cpp index 7dea5eaf67..57f3d86d53 100644 --- a/indra/newview/llpanelpeoplemenus.cpp +++ b/indra/newview/llpanelpeoplemenus.cpp @@ -97,7 +97,7 @@ LLContextMenu* NearbyMenu::createMenu() registrar.add("Avatar.Profile", boost::bind(&LLAvatarActions::showProfile, id)); registrar.add("Avatar.AddFriend", boost::bind(&LLAvatarActions::requestFriendshipDialog, id)); registrar.add("Avatar.IM", boost::bind(&LLAvatarActions::startIM, id)); - registrar.add("Avatar.Call", boost::bind(&LLAvatarActions::startIM, id)); // *TODO: unimplemented + registrar.add("Avatar.Call", boost::bind(&LLAvatarActions::startCall, id)); registrar.add("Avatar.OfferTeleport", boost::bind(&NearbyMenu::offerTeleport, this)); registrar.add("Avatar.ShowOnMap", boost::bind(&LLAvatarActions::startIM, id)); // *TODO: unimplemented registrar.add("Avatar.Share", boost::bind(&LLAvatarActions::startIM, id)); // *TODO: unimplemented @@ -117,7 +117,7 @@ LLContextMenu* NearbyMenu::createMenu() // registrar.add("Avatar.AddFriend", boost::bind(&LLAvatarActions::requestFriendshipDialog, mUUIDs)); // *TODO: unimplemented registrar.add("Avatar.IM", boost::bind(&LLAvatarActions::startConference, mUUIDs)); - // registrar.add("Avatar.Call", boost::bind(&LLAvatarActions::startConference, mUUIDs)); // *TODO: unimplemented + registrar.add("Avatar.Call", boost::bind(&LLAvatarActions::startAdhocCall, mUUIDs)); // registrar.add("Avatar.Share", boost::bind(&LLAvatarActions::startIM, mUUIDs)); // *TODO: unimplemented // registrar.add("Avatar.Pay", boost::bind(&LLAvatarActions::pay, mUUIDs)); // *TODO: unimplemented enable_registrar.add("Avatar.EnableItem", boost::bind(&NearbyMenu::enableContextMenuItem, this, _2)); diff --git a/indra/newview/skins/default/xui/en/menu_people_nearby.xml b/indra/newview/skins/default/xui/en/menu_people_nearby.xml index 643336cf6c..c3a2540b2e 100644 --- a/indra/newview/skins/default/xui/en/menu_people_nearby.xml +++ b/indra/newview/skins/default/xui/en/menu_people_nearby.xml @@ -27,7 +27,6 @@ function="Avatar.IM" /> -- cgit v1.2.3 From bbdfd84e2a7e3482143260acf75adb8968fa71bb Mon Sep 17 00:00:00 2001 From: Erica Date: Thu, 3 Dec 2009 09:52:05 -0800 Subject: moved start location dropdown --- indra/newview/skins/default/xui/en/panel_login.xml | 90 +++++++++++----------- 1 file changed, 46 insertions(+), 44 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/panel_login.xml b/indra/newview/skins/default/xui/en/panel_login.xml index d07d4ea25f..aab7f23ecc 100644 --- a/indra/newview/skins/default/xui/en/panel_login.xml +++ b/indra/newview/skins/default/xui/en/panel_login.xml @@ -48,13 +48,13 @@ left="20" name="first_name_text" top="20" - width="135"> + width="150"> Name: - - Starting location: - - - - - - + width="150"> Password: + width="150" />