From 52baeb34b38d20f4bde5ee931621377ef9e4cb31 Mon Sep 17 00:00:00 2001 From: angela Date: Tue, 19 Jan 2010 11:06:17 +0800 Subject: EXT-4269 PDD: Add teleport destination to teleport warning dialog --- indra/newview/llinventorybridge.cpp | 8 ++++++-- indra/newview/skins/default/xui/en/notifications.xml | 2 +- indra/newview/skins/default/xui/en/panel_navigation_bar.xml | 4 ++-- 3 files changed, 9 insertions(+), 5 deletions(-) (limited to 'indra') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index e9176da715..eacda5ad28 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -5093,8 +5093,12 @@ void LLLandmarkBridgeAction::doIt() // Opening (double-clicking) a landmark immediately teleports, // but warns you the first time. LLSD payload; - payload["asset_id"] = item->getAssetUUID(); - LLNotificationsUtil::add("TeleportFromLandmark", LLSD(), payload); + payload["asset_id"] = item->getAssetUUID(); + + LLSD args; + args["LOCATION"] = item->getDisplayName(); + + LLNotificationsUtil::add("TeleportFromLandmark", args, payload); } LLInvFVBridgeAction::doIt(); diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 957b4d74db..0768706223 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -3058,7 +3058,7 @@ Join me in [REGION] icon="alertmodal.tga" name="TeleportFromLandmark" type="alertmodal"> -Are you sure you want to teleport? +Are you sure you want to teleport to [LOCATION]? + bottom="55" + width="590"> Date: Tue, 19 Jan 2010 13:38:51 +0800 Subject: EXT-3833 [BSI] Build Tools -> Objects -> Slice Begin & End text unreadable --- indra/newview/skins/default/xui/en/floater_tools.xml | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml index a1e190fc5e..f1aa5c27c1 100644 --- a/indra/newview/skins/default/xui/en/floater_tools.xml +++ b/indra/newview/skins/default/xui/en/floater_tools.xml @@ -1687,6 +1687,7 @@ even though the user gets a free copy. Taper Date: Tue, 19 Jan 2010 18:18:59 +0800 Subject: EXT-1341 Inspectors - Break LLToolPie::handleTooltip into smaller functions, handleTooltipLand vs. handleTooltipObject --- indra/newview/lltoolpie.cpp | 569 ++++++++++++++++++++++---------------------- indra/newview/lltoolpie.h | 4 +- 2 files changed, 293 insertions(+), 280 deletions(-) (limited to 'indra') diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index da7e8cd767..cd44b04abd 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -661,341 +661,352 @@ static bool needs_tooltip(LLSelectNode* nodep) return false; } -BOOL LLToolPie::handleToolTip(S32 local_x, S32 local_y, MASK mask) -{ - if (!LLUI::sSettingGroups["config"]->getBOOL("ShowHoverTips")) return TRUE; - if (!mHoverPick.isValid()) return TRUE; - - LLViewerObject* hover_object = mHoverPick.getObject(); - - // update hover object and hover parcel - LLSelectMgr::getInstance()->setHoverObject(hover_object, mHoverPick.mObjectFace); - if (mHoverPick.mPickType == LLPickInfo::PICK_LAND) +BOOL LLToolPie::handleTooltipLand(std::string line, std::string tooltip_msg) +{ + LLViewerParcelMgr::getInstance()->setHoverParcel( mHoverPick.mPosGlobal ); + // + // Do not show hover for land unless prefs are set to allow it. + // + + if (!gSavedSettings.getBOOL("ShowLandHoverTip")) return TRUE; + + // Didn't hit an object, but since we have a land point we + // must be hovering over land. + + LLParcel* hover_parcel = LLViewerParcelMgr::getInstance()->getHoverParcel(); + LLUUID owner; + S32 width = 0; + S32 height = 0; + + if ( hover_parcel ) { - LLViewerParcelMgr::getInstance()->setHoverParcel( mHoverPick.mPosGlobal ); + owner = hover_parcel->getOwnerID(); + width = S32(LLViewerParcelMgr::getInstance()->getHoverParcelWidth()); + height = S32(LLViewerParcelMgr::getInstance()->getHoverParcelHeight()); } - - std::string tooltip_msg; - std::string line; - - if ( hover_object ) + + // Line: "Land" + line.clear(); + line.append(LLTrans::getString("TooltipLand")); + if (hover_parcel) + { + line.append(hover_parcel->getName()); + } + tooltip_msg.append(line); + tooltip_msg.push_back('\n'); + + // Line: "Owner: James Linden" + line.clear(); + line.append(LLTrans::getString("TooltipOwner") + " "); + + if ( hover_parcel ) { - if ( hover_object->isHUDAttachment() ) + std::string name; + if (LLUUID::null == owner) { - // no hover tips for HUD elements, since they can obscure - // what the HUD is displaying - return TRUE; + line.append(LLTrans::getString("TooltipPublic")); } - - if ( hover_object->isAttachment() ) + else if (hover_parcel->getIsGroupOwned()) { - // get root of attachment then parent, which is avatar - LLViewerObject* root_edit = hover_object->getRootEdit(); - if (!root_edit) + if (gCacheName->getGroupName(owner, name)) { - // Strange parenting issue, don't show any text - return TRUE; + line.append(name); + line.append(LLTrans::getString("TooltipIsGroup")); } - hover_object = (LLViewerObject*)root_edit->getParent(); - if (!hover_object) + else { - // another strange parenting issue, bail out - return TRUE; + line.append(LLTrans::getString("RetrievingData")); } } - - line.clear(); - if (hover_object->isAvatar()) + else if(gCacheName->getFullName(owner, name)) { - // only show tooltip if same inspector not already open - LLFloater* existing_inspector = LLFloaterReg::findInstance("inspect_avatar"); - if (!existing_inspector - || !existing_inspector->getVisible() - || existing_inspector->getKey()["avatar_id"].asUUID() != hover_object->getID()) - { - std::string avatar_name; - LLNameValue* firstname = hover_object->getNVPair("FirstName"); - LLNameValue* lastname = hover_object->getNVPair("LastName"); - if (firstname && lastname) - { - avatar_name = llformat("%s %s", firstname->getString(), lastname->getString()); - } - else - { - avatar_name = LLTrans::getString("TooltipPerson"); - } - - // *HACK: We may select this object, so pretend it was clicked - mPick = mHoverPick; - LLInspector::Params p; - p.fillFrom(LLUICtrlFactory::instance().getDefaultParams()); - p.message(avatar_name); - p.image.name("Inspector_I"); - p.click_callback(boost::bind(showAvatarInspector, hover_object->getID())); - p.visible_time_near(6.f); - p.visible_time_far(3.f); - p.delay_time(0.35f); - p.wrap(false); - - LLToolTipMgr::instance().show(p); - } + line.append(name); } else { - // - // We have hit a regular object (not an avatar or attachment) - // - - // - // Default prefs will suppress display unless the object is interactive - // - bool show_all_object_tips = - (bool)gSavedSettings.getBOOL("ShowAllObjectHoverTip"); - LLSelectNode *nodep = LLSelectMgr::getInstance()->getHoverNode(); - - // only show tooltip if same inspector not already open - LLFloater* existing_inspector = LLFloaterReg::findInstance("inspect_object"); - if (nodep && - (!existing_inspector - || !existing_inspector->getVisible() - || existing_inspector->getKey()["object_id"].asUUID() != hover_object->getID())) - { - if (nodep->mName.empty()) - { - tooltip_msg.append(LLTrans::getString("TooltipNoName")); - } - else - { - tooltip_msg.append( nodep->mName ); - } - - bool is_time_based_media = false; - bool is_web_based_media = false; - bool is_media_playing = false; - - // Does this face have media? - const LLTextureEntry* tep = hover_object->getTE(mHoverPick.mObjectFace); - - if(tep) - { - const LLMediaEntry* mep = tep->hasMedia() ? tep->getMediaData() : NULL; - if (mep) - { - viewer_media_t media_impl = mep ? LLViewerMedia::getMediaImplFromTextureID(mep->getMediaID()) : NULL; - LLPluginClassMedia* media_plugin = NULL; - - if (media_impl.notNull() && (media_impl->hasMedia())) - { - LLStringUtil::format_map_t args; - - media_plugin = media_impl->getMediaPlugin(); - if(media_plugin) - { if(media_plugin->pluginSupportsMediaTime()) - { - is_time_based_media = true; - is_web_based_media = false; - //args["[CurrentURL]"] = media_impl->getMediaURL(); - is_media_playing = media_impl->isMediaPlaying(); - } - else - { - is_time_based_media = false; - is_web_based_media = true; - //args["[CurrentURL]"] = media_plugin->getLocation(); - } - //tooltip_msg.append(LLTrans::getString("CurrentURL", args)); - } - } - } - } - - // also check the primary node since sometimes it can have an action even though - // the root node doesn't - bool needs_tip = needs_tooltip(nodep) || - needs_tooltip(LLSelectMgr::getInstance()->getPrimaryHoverNode()); - - if (show_all_object_tips || needs_tip) - { - // We may select this object, so pretend it was clicked - mPick = mHoverPick; - LLInspector::Params p; - p.fillFrom(LLUICtrlFactory::instance().getDefaultParams()); - p.message(tooltip_msg); - p.image.name("Inspector_I"); - p.click_callback(boost::bind(showObjectInspector, hover_object->getID(), mHoverPick.mObjectFace)); - p.time_based_media(is_time_based_media); - p.web_based_media(is_web_based_media); - p.media_playing(is_media_playing); - p.click_playmedia_callback(boost::bind(playCurrentMedia, mHoverPick)); - p.click_homepage_callback(boost::bind(VisitHomePage, mHoverPick)); - p.visible_time_near(6.f); - p.visible_time_far(3.f); - p.delay_time(0.35f); - p.wrap(false); - - LLToolTipMgr::instance().show(p); - } - } + line.append(LLTrans::getString("RetrievingData")); } } - else if ( mHoverPick.mPickType == LLPickInfo::PICK_LAND ) + else { - // - // Do not show hover for land unless prefs are set to allow it. - // + line.append(LLTrans::getString("RetrievingData")); + } + tooltip_msg.append(line); + tooltip_msg.push_back('\n'); + + // Line: "no fly, not safe, no build" + + // Don't display properties for your land. This is just + // confusing, because you can do anything on your own land. + if ( hover_parcel && owner != gAgent.getID() ) + { + S32 words = 0; - if (!gSavedSettings.getBOOL("ShowLandHoverTip")) return TRUE; - - // Didn't hit an object, but since we have a land point we - // must be hovering over land. - - LLParcel* hover_parcel = LLViewerParcelMgr::getInstance()->getHoverParcel(); - LLUUID owner; - S32 width = 0; - S32 height = 0; - - if ( hover_parcel ) - { - owner = hover_parcel->getOwnerID(); - width = S32(LLViewerParcelMgr::getInstance()->getHoverParcelWidth()); - height = S32(LLViewerParcelMgr::getInstance()->getHoverParcelHeight()); - } - - // Line: "Land" - line.clear(); - line.append(LLTrans::getString("TooltipLand")); - if (hover_parcel) - { - line.append(hover_parcel->getName()); - } - tooltip_msg.append(line); - tooltip_msg.push_back('\n'); - - // Line: "Owner: James Linden" line.clear(); - line.append(LLTrans::getString("TooltipOwner") + " "); - - if ( hover_parcel ) + // JC - Keep this in the same order as the checkboxes + // on the land info panel + if ( !hover_parcel->getAllowModify() ) { - std::string name; - if (LLUUID::null == owner) + if ( hover_parcel->getAllowGroupModify() ) { - line.append(LLTrans::getString("TooltipPublic")); + line.append(LLTrans::getString("TooltipFlagGroupBuild")); } - else if (hover_parcel->getIsGroupOwned()) + else { - if (gCacheName->getGroupName(owner, name)) - { - line.append(name); - line.append(LLTrans::getString("TooltipIsGroup")); - } - else - { - line.append(LLTrans::getString("RetrievingData")); - } + line.append(LLTrans::getString("TooltipFlagNoBuild")); } - else if(gCacheName->getFullName(owner, name)) + words++; + } + + if ( !hover_parcel->getAllowTerraform() ) + { + if (words) line.append(", "); + line.append(LLTrans::getString("TooltipFlagNoEdit")); + words++; + } + + if ( hover_parcel->getAllowDamage() ) + { + if (words) line.append(", "); + line.append(LLTrans::getString("TooltipFlagNotSafe")); + words++; + } + + // Maybe we should reflect the estate's block fly bit here as well? DK 12/1/04 + if ( !hover_parcel->getAllowFly() ) + { + if (words) line.append(", "); + line.append(LLTrans::getString("TooltipFlagNoFly")); + words++; + } + + if ( !hover_parcel->getAllowOtherScripts() ) + { + if (words) line.append(", "); + if ( hover_parcel->getAllowGroupScripts() ) { - line.append(name); + line.append(LLTrans::getString("TooltipFlagGroupScripts")); } else { - line.append(LLTrans::getString("RetrievingData")); + line.append(LLTrans::getString("TooltipFlagNoScripts")); } + + words++; } - else + + if (words) { - line.append(LLTrans::getString("RetrievingData")); + tooltip_msg.append(line); + tooltip_msg.push_back('\n'); } + } + + if (hover_parcel && hover_parcel->getParcelFlag(PF_FOR_SALE)) + { + LLStringUtil::format_map_t args; + args["[AMOUNT]"] = llformat("%d", hover_parcel->getSalePrice()); + line = LLTrans::getString("TooltipForSaleL$", args); tooltip_msg.append(line); tooltip_msg.push_back('\n'); + } + + // trim last newlines + if (!tooltip_msg.empty()) + { + tooltip_msg.erase(tooltip_msg.size() - 1); + LLToolTipMgr::instance().show(tooltip_msg); + } + + return TRUE; +} - // Line: "no fly, not safe, no build" - - // Don't display properties for your land. This is just - // confusing, because you can do anything on your own land. - if ( hover_parcel && owner != gAgent.getID() ) +BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string line, std::string tooltip_msg) +{ + if ( hover_object->isHUDAttachment() ) + { + // no hover tips for HUD elements, since they can obscure + // what the HUD is displaying + return TRUE; + } + + if ( hover_object->isAttachment() ) + { + // get root of attachment then parent, which is avatar + LLViewerObject* root_edit = hover_object->getRootEdit(); + if (!root_edit) { - S32 words = 0; - - line.clear(); - // JC - Keep this in the same order as the checkboxes - // on the land info panel - if ( !hover_parcel->getAllowModify() ) + // Strange parenting issue, don't show any text + return TRUE; + } + hover_object = (LLViewerObject*)root_edit->getParent(); + if (!hover_object) + { + // another strange parenting issue, bail out + return TRUE; + } + } + + line.clear(); + if (hover_object->isAvatar()) + { + // only show tooltip if same inspector not already open + LLFloater* existing_inspector = LLFloaterReg::findInstance("inspect_avatar"); + if (!existing_inspector + || !existing_inspector->getVisible() + || existing_inspector->getKey()["avatar_id"].asUUID() != hover_object->getID()) + { + std::string avatar_name; + LLNameValue* firstname = hover_object->getNVPair("FirstName"); + LLNameValue* lastname = hover_object->getNVPair("LastName"); + if (firstname && lastname) { - if ( hover_parcel->getAllowGroupModify() ) - { - line.append(LLTrans::getString("TooltipFlagGroupBuild")); - } - else - { - line.append(LLTrans::getString("TooltipFlagNoBuild")); - } - words++; + avatar_name = llformat("%s %s", firstname->getString(), lastname->getString()); } - - if ( !hover_parcel->getAllowTerraform() ) + else { - if (words) line.append(", "); - line.append(LLTrans::getString("TooltipFlagNoEdit")); - words++; + avatar_name = LLTrans::getString("TooltipPerson"); } - - if ( hover_parcel->getAllowDamage() ) + + // *HACK: We may select this object, so pretend it was clicked + mPick = mHoverPick; + LLInspector::Params p; + p.fillFrom(LLUICtrlFactory::instance().getDefaultParams()); + p.message(avatar_name); + p.image.name("Inspector_I"); + p.click_callback(boost::bind(showAvatarInspector, hover_object->getID())); + p.visible_time_near(6.f); + p.visible_time_far(3.f); + p.delay_time(0.35f); + p.wrap(false); + + LLToolTipMgr::instance().show(p); + } + } + else + { + // + // We have hit a regular object (not an avatar or attachment) + // + + // + // Default prefs will suppress display unless the object is interactive + // + bool show_all_object_tips = + (bool)gSavedSettings.getBOOL("ShowAllObjectHoverTip"); + LLSelectNode *nodep = LLSelectMgr::getInstance()->getHoverNode(); + + // only show tooltip if same inspector not already open + LLFloater* existing_inspector = LLFloaterReg::findInstance("inspect_object"); + if (nodep && + (!existing_inspector + || !existing_inspector->getVisible() + || existing_inspector->getKey()["object_id"].asUUID() != hover_object->getID())) + { + if (nodep->mName.empty()) { - if (words) line.append(", "); - line.append(LLTrans::getString("TooltipFlagNotSafe")); - words++; + tooltip_msg.append(LLTrans::getString("TooltipNoName")); } - - // Maybe we should reflect the estate's block fly bit here as well? DK 12/1/04 - if ( !hover_parcel->getAllowFly() ) + else { - if (words) line.append(", "); - line.append(LLTrans::getString("TooltipFlagNoFly")); - words++; + tooltip_msg.append( nodep->mName ); } - - if ( !hover_parcel->getAllowOtherScripts() ) + + bool is_time_based_media = false; + bool is_web_based_media = false; + bool is_media_playing = false; + + // Does this face have media? + const LLTextureEntry* tep = hover_object->getTE(mHoverPick.mObjectFace); + + if(tep) { - if (words) line.append(", "); - if ( hover_parcel->getAllowGroupScripts() ) + const LLMediaEntry* mep = tep->hasMedia() ? tep->getMediaData() : NULL; + if (mep) { - line.append(LLTrans::getString("TooltipFlagGroupScripts")); - } - else - { - line.append(LLTrans::getString("TooltipFlagNoScripts")); + viewer_media_t media_impl = mep ? LLViewerMedia::getMediaImplFromTextureID(mep->getMediaID()) : NULL; + LLPluginClassMedia* media_plugin = NULL; + + if (media_impl.notNull() && (media_impl->hasMedia())) + { + LLStringUtil::format_map_t args; + + media_plugin = media_impl->getMediaPlugin(); + if(media_plugin) + { if(media_plugin->pluginSupportsMediaTime()) + { + is_time_based_media = true; + is_web_based_media = false; + //args["[CurrentURL]"] = media_impl->getMediaURL(); + is_media_playing = media_impl->isMediaPlaying(); + } + else + { + is_time_based_media = false; + is_web_based_media = true; + //args["[CurrentURL]"] = media_plugin->getLocation(); + } + //tooltip_msg.append(LLTrans::getString("CurrentURL", args)); + } + } } - - words++; } - - if (words) + + // also check the primary node since sometimes it can have an action even though + // the root node doesn't + bool needs_tip = needs_tooltip(nodep) || + needs_tooltip(LLSelectMgr::getInstance()->getPrimaryHoverNode()); + + if (show_all_object_tips || needs_tip) { - tooltip_msg.append(line); - tooltip_msg.push_back('\n'); + // We may select this object, so pretend it was clicked + mPick = mHoverPick; + LLInspector::Params p; + p.fillFrom(LLUICtrlFactory::instance().getDefaultParams()); + p.message(tooltip_msg); + p.image.name("Inspector_I"); + p.click_callback(boost::bind(showObjectInspector, hover_object->getID(), mHoverPick.mObjectFace)); + p.time_based_media(is_time_based_media); + p.web_based_media(is_web_based_media); + p.media_playing(is_media_playing); + p.click_playmedia_callback(boost::bind(playCurrentMedia, mHoverPick)); + p.click_homepage_callback(boost::bind(VisitHomePage, mHoverPick)); + p.visible_time_near(6.f); + p.visible_time_far(3.f); + p.delay_time(0.35f); + p.wrap(false); + + LLToolTipMgr::instance().show(p); } } + } + + return TRUE; +} - if (hover_parcel && hover_parcel->getParcelFlag(PF_FOR_SALE)) - { - LLStringUtil::format_map_t args; - args["[AMOUNT]"] = llformat("%d", hover_parcel->getSalePrice()); - line = LLTrans::getString("TooltipForSaleL$", args); - tooltip_msg.append(line); - tooltip_msg.push_back('\n'); - } +BOOL LLToolPie::handleToolTip(S32 local_x, S32 local_y, MASK mask) +{ + if (!LLUI::sSettingGroups["config"]->getBOOL("ShowHoverTips")) return TRUE; + if (!mHoverPick.isValid()) return TRUE; - // trim last newlines - if (!tooltip_msg.empty()) - { - tooltip_msg.erase(tooltip_msg.size() - 1); - LLToolTipMgr::instance().show(tooltip_msg); - } - } + LLViewerObject* hover_object = mHoverPick.getObject(); + + // update hover object and hover parcel + LLSelectMgr::getInstance()->setHoverObject(hover_object, mHoverPick.mObjectFace); + + + std::string tooltip_msg; + std::string line; + if ( hover_object ) + { + handleTooltipObject(hover_object, line, tooltip_msg ); + } + else if (mHoverPick.mPickType == LLPickInfo::PICK_LAND) + { + handleTooltipLand(line, tooltip_msg); + } return TRUE; } diff --git a/indra/newview/lltoolpie.h b/indra/newview/lltoolpie.h index 5f0e28fa95..8a4c949aef 100644 --- a/indra/newview/lltoolpie.h +++ b/indra/newview/lltoolpie.h @@ -89,7 +89,9 @@ private: bool handleMediaClick(const LLPickInfo& info); bool handleMediaHover(const LLPickInfo& info); - bool handleMediaMouseUp(); + bool handleMediaMouseUp(); + BOOL handleTooltipLand(std::string line, std::string tooltip_msg); + BOOL handleTooltipObject( LLViewerObject* hover_object, std::string line, std::string tooltip_msg); private: BOOL mGrabMouseButtonDown; -- cgit v1.2.3 From 98d5be55d85cbcc0be22a0a50bbe5021a63f1978 Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Wed, 20 Jan 2010 20:44:24 +0200 Subject: Fixed Linux build. --HG-- branch : product-engine --- indra/newview/lllandmarklist.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/lllandmarklist.cpp b/indra/newview/lllandmarklist.cpp index 355f048308..ce84474c05 100644 --- a/indra/newview/lllandmarklist.cpp +++ b/indra/newview/lllandmarklist.cpp @@ -59,7 +59,8 @@ LLLandmark* LLLandmarkList::getAsset(const LLUUID& asset_uuid, loaded_callback_t LLLandmark* landmark = get_ptr_in_map(mList, asset_uuid); if(landmark) { - if(cb && !landmark->getGlobalPos(LLVector3d())) + LLVector3d dummy; + if(cb && !landmark->getGlobalPos(dummy)) { // landmark is not completely loaded yet loaded_callback_map_t::value_type vt(asset_uuid, cb); -- cgit v1.2.3 From e4395ce8d393b079b632aa7016a6751ed1894f83 Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Wed, 20 Jan 2010 21:02:39 +0200 Subject: Fixed low priority bug EXT-4525 (Warning flood: Failed to parse parameter "font_halign.") It should be referenced from XML as "halign". --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/favorites_bar_button.xml | 1 - indra/newview/skins/default/xui/en/widgets/chiclet_im_adhoc.xml | 2 +- indra/newview/skins/default/xui/en/widgets/chiclet_im_group.xml | 2 +- indra/newview/skins/default/xui/en/widgets/chiclet_im_p2p.xml | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/favorites_bar_button.xml b/indra/newview/skins/default/xui/en/favorites_bar_button.xml index dfb0695ec3..6adf2a5950 100644 --- a/indra/newview/skins/default/xui/en/favorites_bar_button.xml +++ b/indra/newview/skins/default/xui/en/favorites_bar_button.xml @@ -3,7 +3,6 @@ - + + width="21" /> + + width="21" /> + + width="20" /> + width="21" /> - \ No newline at end of file + diff --git a/indra/newview/skins/default/xui/en/widgets/chiclet_offer.xml b/indra/newview/skins/default/xui/en/widgets/chiclet_offer.xml index 86bea9be50..8918120918 100644 --- a/indra/newview/skins/default/xui/en/widgets/chiclet_offer.xml +++ b/indra/newview/skins/default/xui/en/widgets/chiclet_offer.xml @@ -3,14 +3,22 @@ height="25" name="offer_chiclet" width="25"> + + width="21" /> \ No newline at end of file diff --git a/indra/newview/skins/default/xui/en/widgets/chiclet_script.xml b/indra/newview/skins/default/xui/en/widgets/chiclet_script.xml index b1f9f5b0e8..8e3541231d 100644 --- a/indra/newview/skins/default/xui/en/widgets/chiclet_script.xml +++ b/indra/newview/skins/default/xui/en/widgets/chiclet_script.xml @@ -3,14 +3,22 @@ height="25" name="script_chiclet" width="25"> + + width="21"/> Date: Wed, 20 Jan 2010 17:59:16 -0500 Subject: For EXT-4222: Switching outfits sometimes causes me to wear both, and show previous outfit as worn. --- indra/newview/llappearancemgr.cpp | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) (limited to 'indra') diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 0d4e048dde..ccda737fc6 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -301,6 +301,7 @@ public: bool pollCompletion(); bool isDone(); + bool isTimedOut(); typedef std::list found_list_t; found_list_t mFoundList; @@ -313,12 +314,10 @@ public: LLWearableHoldingPattern::LLWearableHoldingPattern(): mResolved(0) { - llwarns << "constructor" << llendl; } LLWearableHoldingPattern::~LLWearableHoldingPattern() { - llwarns << "destructor" << llendl; } bool LLWearableHoldingPattern::isDone() @@ -326,10 +325,16 @@ bool LLWearableHoldingPattern::isDone() return (mResolved >= (S32)mFoundList.size()); } +bool LLWearableHoldingPattern::isTimedOut() +{ + static F32 max_wait_time = 5.0; // give up if wearable fetches haven't completed in max_wait_time seconds. + return mWaitTime.getElapsedTimeF32() > max_wait_time; +} + bool LLWearableHoldingPattern::pollCompletion() { bool done = isDone(); - llwarns << "polling, done status: " << done << llendl; + llinfos << "polling, done status: " << done << llendl; if (done) { // Activate all gestures in this folder @@ -350,6 +355,10 @@ bool LLWearableHoldingPattern::pollCompletion() gInventory.notifyObservers(); } } + + // Update wearables. + llinfos << "Updating agent wearables with " << mResolved << " wearable items " << llendl; + LLAppearanceManager::instance().updateAgentWearables(this, false); // Update attachments to match those requested. LLVOAvatar* avatar = gAgent.getAvatarObject(); @@ -359,13 +368,17 @@ bool LLWearableHoldingPattern::pollCompletion() LLAgentWearables::userUpdateAttachments(mObjItems); } - // Update wearables. - llinfos << "Updating agent wearables with " << mResolved << " wearable items " << llendl; - LLAppearanceManager::instance().updateAgentWearables(this, false); - delete this; + return done; + } + else if (isTimedOut()) + { + llwarns << "wearables taking too long to fetch for outfit, retrying updateAppearanceFromCOF()." << llendl; + delete this; + LLAppearanceManager::instance().updateAppearanceFromCOF(); + return true; } - return done; + return false; } static void removeDuplicateItems(LLInventoryModel::item_array_t& items) -- cgit v1.2.3 From 1c1f465acc0ee587de077d27473558a8b41c04fd Mon Sep 17 00:00:00 2001 From: Erica Date: Wed, 20 Jan 2010 15:36:05 -0800 Subject: EXT-4482 [BSI] People > Profile - when window is too short, scroll bar cuts off text --- indra/newview/skins/default/xui/en/panel_profile.xml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/panel_profile.xml b/indra/newview/skins/default/xui/en/panel_profile.xml index 597b6410cd..4ac7295a7f 100644 --- a/indra/newview/skins/default/xui/en/panel_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_profile.xml @@ -66,6 +66,7 @@ layout="topleft" follows="left|top|right" height="505" + min_height="505" name="profile_scroll_panel" top="0" left="0" @@ -108,10 +109,10 @@ textbox.max_length="512" name="sl_description_edit" top_pad="-3" - width="185" + width="180" expanded_bg_visible="true" expanded_bg_color="DkGray"> - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet ipsum. adipiscing elit. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet ipsum. adipiscing elit. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet ipsum. + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean viverra orci et justo sagittis aliquet.Nullamma lesuada mauris sit amet ipsum. adipiscing elit. Ae nean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet ipsum. adipiscing elit. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet ipsum. Lorem ipsum dolor sit amet, consectetur adlkjpiscing elit moose moose. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet. adipiscing elit. Aenean rigviverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet sorbet ipsum. adipiscing elit. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet ipsum. @@ -286,7 +287,7 @@ height="28" layout="topleft" name="profile_buttons_panel" - auto_resize="false" + auto_resize="false" width="313"> - - Mouselook: - - - Mouse sensitivity - - - - - Network: - - - Maximum bandwidth - - - - kbps - - - - - - - Cache size - - - - MB - - - Cache location: - - - - - - Web: - - - - - - - - - Proxy location: - - - - + + + + + Mouselook: + + + Mouse sensitivity + + + + + Network: + + + Maximum bandwidth + + + + kbps + + + + + + + Cache size + + + + MB + + + Cache location: + + + + + + + Web: + + + + + + + + + Proxy location: + + + + \ No newline at end of file -- cgit v1.2.3 From 2981e9aa4cdbe083011d1f552bf0fe5178a499ce Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Thu, 21 Jan 2010 15:10:25 -0800 Subject: checking for null in LLImageRaw::copy to prevent a crash --- indra/llimage/llimage.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra') diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp index 575ad5363d..e02be6c8c1 100644 --- a/indra/llimage/llimage.cpp +++ b/indra/llimage/llimage.cpp @@ -668,6 +668,12 @@ void LLImageRaw::fill( const LLColor4U& color ) // Src and dst can be any size. Src and dst can each have 3 or 4 components. void LLImageRaw::copy(LLImageRaw* src) { + if (!src) + { + llwarns << "LLImageRaw::copy called with a null src pointer" << llendl; + return; + } + LLImageRaw* dst = this; // Just for clarity. llassert( (3 == src->getComponents()) || (4 == src->getComponents()) ); -- cgit v1.2.3 From 8b8b86480821c209a057fd4433d1d810d186a4c1 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Thu, 21 Jan 2010 15:10:45 -0800 Subject: EXT-4266 Can't "drop" object selected in select-face mode reviewed by Callum --- indra/newview/llviewermenu.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index d2ba898cf0..5179bcaef7 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -6065,7 +6065,8 @@ class LLAttachmentEnableDrop : public view_listener_t LLViewerJointAttachment* attachment = NULL; LLInventoryItem* item = NULL; - if (object) + // Do not enable drop if all faces of object are not enabled + if (object && LLSelectMgr::getInstance()->getSelection()->contains(object,SELECT_ALL_TES )) { S32 attachmentID = ATTACHMENT_ID_FROM_STATE(object->getState()); attachment = get_if_there(gAgent.getAvatarObject()->mAttachmentPoints, attachmentID, (LLViewerJointAttachment*)NULL); @@ -6107,8 +6108,14 @@ class LLAttachmentEnableDrop : public view_listener_t BOOL enable_detach(const LLSD&) { LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); - if (!object) return FALSE; - if (!object->isAttachment()) return FALSE; + + // Only enable detach if all faces of object are selected + if (!object || + !object->isAttachment() || + !LLSelectMgr::getInstance()->getSelection()->contains(object,SELECT_ALL_TES )) + { + return FALSE; + } // Find the avatar who owns this attachment LLViewerObject* avatar = object; -- cgit v1.2.3 From 01af3b805a7cffbeb7ff51809e35399bc472bb2d Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Thu, 21 Jan 2010 15:14:11 -0800 Subject: eol --- indra/newview/skins/default/xui/en/panel_preferences_setup.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml index a0bd2bd438..9875062186 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml @@ -343,4 +343,4 @@ name="web_proxy_port" top_delta="0" width="140" /> - \ No newline at end of file + -- cgit v1.2.3 From 24328b6cc77daec2c42528fcf7025634519320db Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Thu, 21 Jan 2010 15:15:39 -0800 Subject: Backed out changeset: 191ec27bc583 --- .../default/xui/en/panel_preferences_setup.xml | 688 ++++++++++----------- 1 file changed, 342 insertions(+), 346 deletions(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml index a0bd2bd438..f6900cc31c 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml @@ -1,346 +1,342 @@ - - - - - Mouselook: - - - Mouse sensitivity - - - - - Network: - - - Maximum bandwidth - - - - kbps - - - - - - - Cache size - - - - MB - - - Cache location: - - - - - - - Web: - - - - - - - - - Proxy location: - - - - \ No newline at end of file + + + + + Mouselook: + + + Mouse sensitivity + + + + + Network: + + + Maximum bandwidth + + + + kbps + + + + + + + Cache size + + + + MB + + + Cache location: + + + + + + Web: + + + + + + + + + Proxy location: + + + + -- cgit v1.2.3 From 6a686700d0f51c02facb645208b7e21aa9b687d9 Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Thu, 21 Jan 2010 15:23:09 -0800 Subject: Minor cleanup to the logic in LLViewerParcelMedia::play(), to prevent duplication of code. --- indra/newview/llviewerparcelmedia.cpp | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'indra') diff --git a/indra/newview/llviewerparcelmedia.cpp b/indra/newview/llviewerparcelmedia.cpp index e8b435fc8f..e87dbe5c07 100644 --- a/indra/newview/llviewerparcelmedia.cpp +++ b/indra/newview/llviewerparcelmedia.cpp @@ -212,22 +212,15 @@ void LLViewerParcelMedia::play(LLParcel* parcel) else { // Since the texture id is different, we need to generate a new impl - LL_DEBUGS("Media") << "new media impl with mime type " << mime_type << ", url " << media_url << LL_ENDL; // Delete the old one first so they don't fight over the texture. sMediaImpl = NULL; - - sMediaImpl = LLViewerMedia::newMediaImpl( - placeholder_texture_id, - media_width, - media_height, - media_auto_scale, - media_loop); - sMediaImpl->setIsParcelMedia(true); - sMediaImpl->navigateTo(media_url, mime_type, true); + + // A new impl will be created below. } } - else + + if(!sMediaImpl) { LL_DEBUGS("Media") << "new media impl with mime type " << mime_type << ", url " << media_url << LL_ENDL; -- cgit v1.2.3 From 96721b3cccee96574695764871c8ac92ee5bb845 Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Thu, 21 Jan 2010 15:39:14 -0800 Subject: Partial fix for EXT-4508 (nearby media floater parcel media button breaks rtsp) This is actually two seperate issues: 1) After disabling parcel media from the nearby media floater, it can't be re-enabled 2) When you disable parcel media from the nearby media floater, faces displaying it don't revert to their original texture This change fixes issue (1), by forcing the priority of the inworld media instance to normal in LLViewerMedia::updateMedia() so it will always get reloaded instead of possibly being kept unloaded due to already-loaded prim media. Issue (2) is still under investigation. In addition to the case where you disable parcel media from the nearby media floater, it also doesn't restore the textures when you leave the parcel, and I think I've even seen it when unloading --- indra/newview/llviewermedia.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra') diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 04d67fe750..d712446d83 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -752,6 +752,11 @@ void LLViewerMedia::updateMedia(void *dummy_arg) new_priority = LLPluginClassMedia::PRIORITY_NORMAL; impl_count_interest_normal++; } + else if(pimpl->isParcelMedia()) + { + new_priority = LLPluginClassMedia::PRIORITY_NORMAL; + impl_count_interest_normal++; + } else { // Look at interest and CPU usage for instances that aren't in any of the above states. -- cgit v1.2.3 From c510fed273864fcfe299d276e55a52916c989b5f Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 21 Jan 2010 15:39:19 -0800 Subject: Soften another common llassert() failure to a warning. --- indra/newview/llviewertexturelist.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index e25ec8295c..ee934ab9c5 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -502,7 +502,10 @@ void LLViewerTextureList::addImageToList(LLViewerFetchedTexture *image) { llerrs << "LLViewerTextureList::addImageToList - Image already in list" << llendl; } - llverify((mImageList.insert(image)).second == true); + if ((mImageList.insert(image)).second != true) + { + llwarns << "BAD STUFF! (mImageList.insert(image)).second != true" << llendl; + } image->setInImageList(TRUE) ; } -- cgit v1.2.3 From 63441873cc4cca5c9d41dec3d313199a69c87b30 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Thu, 21 Jan 2010 15:58:35 -0800 Subject: updating --- indra/newview/skins/default/xui/en/panel_preferences_setup.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml index 8d505f4ad9..ac1ea26b38 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml @@ -873,5 +873,5 @@ min_val="10" name="web_proxy_port" top_delta="0" - width="140" /> + width="140"/> -- cgit v1.2.3 From 5432b9bd9a5979d24d814990957cbd1351e7ba48 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Thu, 21 Jan 2010 16:00:51 -0800 Subject: fixing? --- .../default/xui/en/panel_preferences_setup.xml | 1754 ++++++++++---------- 1 file changed, 877 insertions(+), 877 deletions(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml index ac1ea26b38..8d033c2ae6 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml @@ -1,877 +1,877 @@ - - - - - Mouselook: - - - Mouse sensitivity - - - - - Network: - - - Maximum bandwidth - - - - kbps - - - - - - - Cache size - - - - MB - - - Cache location: - - - - - - Web: - - - - - - - - - Proxy location: - - - - - - Network: - - - Maximum bandwidth - - - - kbps - - - - - - - Cache size - - - - MB - - - Cache location: - - - - - - - Web: - - - - - - - - - Proxy location: - - - - - Network: - - - Maximum bandwidth - - - - kbps - - - - - - - Cache size - - - - MB - - - Cache location: - - - - - - - Web: - - - - - - - - - Proxy location: - - - - + + + + + Mouselook: + + + Mouse sensitivity + + + + + Network: + + + Maximum bandwidth + + + + kbps + + + + + + + Cache size + + + + MB + + + Cache location: + + + + + + Web: + + + + + + + + + Proxy location: + + + + + + Network: + + + Maximum bandwidth + + + + kbps + + + + + + + Cache size + + + + MB + + + Cache location: + + + + + + + Web: + + + + + + + + + Proxy location: + + + + + Network: + + + Maximum bandwidth + + + + kbps + + + + + + + Cache size + + + + MB + + + Cache location: + + + + + + + Web: + + + + + + + + + Proxy location: + + + + -- cgit v1.2.3 From 9611af4f596c1f6ce1a0e3c91763b6e3ee343835 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Thu, 21 Jan 2010 16:09:38 -0800 Subject: fixed. --- .../default/xui/en/panel_preferences_setup.xml | 1223 ++++++-------------- 1 file changed, 346 insertions(+), 877 deletions(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml index 8d033c2ae6..ec7e140eed 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml @@ -1,877 +1,346 @@ - - - - - Mouselook: - - - Mouse sensitivity - - - - - Network: - - - Maximum bandwidth - - - - kbps - - - - - - - Cache size - - - - MB - - - Cache location: - - - - - - Web: - - - - - - - - - Proxy location: - - - - - - Network: - - - Maximum bandwidth - - - - kbps - - - - - - - Cache size - - - - MB - - - Cache location: - - - - - - - Web: - - - - - - - - - Proxy location: - - - - - Network: - - - Maximum bandwidth - - - - kbps - - - - - - - Cache size - - - - MB - - - Cache location: - - - - - - - Web: - - - - - - - - - Proxy location: - - - - + + + + + Mouselook: + + + Mouse sensitivity + + + + + Network: + + + Maximum bandwidth + + + + kbps + + + + + + + Cache size + + + + MB + + + Cache location: + + + + + + + Web: + + + + + + + + + Proxy location: + + + + -- cgit v1.2.3 From 79f252526f37781417ae1ea5b8dce0bbc148b14b Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Thu, 21 Jan 2010 16:10:29 -0800 Subject: another fix. --- .../default/xui/en/panel_preferences_setup.xml | 692 ++++++++++----------- 1 file changed, 346 insertions(+), 346 deletions(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml index ec7e140eed..17ababe854 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml @@ -1,346 +1,346 @@ - - - - - Mouselook: - - - Mouse sensitivity - - - - - Network: - - - Maximum bandwidth - - - - kbps - - - - - - - Cache size - - - - MB - - - Cache location: - - - - - - - Web: - - - - - - - - - Proxy location: - - - - + + + + + Mouselook: + + + Mouse sensitivity + + + + + Network: + + + Maximum bandwidth + + + + kbps + + + + + + + Cache size + + + + MB + + + Cache location: + + + + + + + Web: + + + + + + + + + Proxy location: + + + + -- cgit v1.2.3 From 906284b99ffbf5974cb41987a702b7e51957643a Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 21 Jan 2010 16:26:37 -0800 Subject: Fix inverted logic from review. --- indra/newview/llviewertexture.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 2544e46bab..3f42cba561 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -1561,7 +1561,7 @@ F32 LLViewerFetchedTexture::calcDecodePriority() void LLViewerFetchedTexture::setDecodePriority(F32 priority) { //llassert(!mInImageList); // firing a lot, figure out why - if (!mInImageList) // above llassert() softened to a warning + if (mInImageList) // above llassert() softened to a warning { llwarns << "BAD STUFF! mInImageList" << llendl; } -- cgit v1.2.3 From af2f61af502d483011a8f6722686a2c343bd0f7d Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Thu, 21 Jan 2010 20:34:10 -0500 Subject: EXT-4492 Deleting gestures from the wearing tab causes the viewer to crash Removed "delete" from the COF menu, since it is normally disabled from the inventory view. --- indra/newview/llinventorybridge.cpp | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 099f863dc9..1c88658920 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -574,18 +574,35 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, disabled_items.push_back(std::string("Paste As Link")); } } - items.push_back(std::string("Paste Separator")); + // Don't add a separator unless we have at least one entry beneath it, + // to avoid double separators. + BOOL separator_pasted = FALSE; if (obj && obj->getIsLinkType() && !get_is_item_worn(mUUID)) { + if (!separator_pasted) + { + items.push_back(std::string("Paste Separator")); + separator_pasted = TRUE; + } items.push_back(std::string("Remove Link")); } - items.push_back(std::string("Delete")); - if (!isItemRemovable()) + // Hide the delete button from the COF. Detaching/removing/etc. an item in the COF + // will naturally delete it. This prevents double delete crash possibilities. + if (!isCOFFolder()) { - disabled_items.push_back(std::string("Delete")); + if (!separator_pasted) + { + items.push_back(std::string("Paste Separator")); + separator_pasted = TRUE; + } + items.push_back(std::string("Delete")); + if (!isItemRemovable()) + { + disabled_items.push_back(std::string("Delete")); + } } // If multiple items are selected, disable properties (if it exists). -- cgit v1.2.3 From 11c72472bc54d8479ed03498106706703d0d6a8d Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Fri, 22 Jan 2010 12:51:13 +0200 Subject: fixed EXT-4529 [BSI] X in tabbed Instant Message functions as a minimize - --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/floater_im_container.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra') 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 1d51d19a4a..bd25288a9e 100644 --- a/indra/newview/skins/default/xui/en/floater_im_container.xml +++ b/indra/newview/skins/default/xui/en/floater_im_container.xml @@ -1,6 +1,7 @@ Date: Fri, 22 Jan 2010 13:17:58 +0200 Subject: Fixed major bug EXT-4609 Deleting duplicate calling cards also removes a Resident from ur Friends list :( - removed separate logic for Residents in the Friends list when Calling card is removed --HG-- branch : product-engine --- indra/newview/llinventorybridge.cpp | 12 ------------ indra/newview/llinventorybridge.h | 1 - 2 files changed, 13 deletions(-) (limited to 'indra') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 099f863dc9..2f4f285065 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -3687,18 +3687,6 @@ BOOL LLCallingCardBridge::dragOrDrop(MASK mask, BOOL drop, return rv; } -BOOL LLCallingCardBridge::removeItem() -{ - if (LLFriendCardsManager::instance().isItemInAnyFriendsList(getItem())) - { - LLAvatarActions::removeFriendDialog(getItem()->getCreatorUUID()); - return FALSE; - } - else - { - return LLItemBridge::removeItem(); - } -} // +=================================================+ // | LLNotecardBridge | // +=================================================+ diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index fced0047e8..759d0cba18 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -448,7 +448,6 @@ public: EDragAndDropType cargo_type, void* cargo_data); void refreshFolderViewItem(); - BOOL removeItem(); protected: LLCallingCardBridge( LLInventoryPanel* inventory, const LLUUID& uuid ); -- cgit v1.2.3 From 74429f2ed926362a2ec47d590fc862b55b26f0f8 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Fri, 22 Jan 2010 13:42:52 +0200 Subject: =?UTF-8?q?fixed=20EXT-3670=20=E2=80=9CClicking=20on=20IM=20sessio?= =?UTF-8?q?n=20in=20IM=20session=20well=20closes=20IM=20floater=E2=80=9D,?= =?UTF-8?q?=20implemented=20exclude=20sets=20for=20groups=20of=20transient?= =?UTF-8?q?=20floaters,=20now=20transient=20floaters=20not=20closes=20if?= =?UTF-8?q?=20user=20click=20on=20view=20from=20global=20exclude=20set=20o?= =?UTF-8?q?r=20from=20floater=20group=20set;=20made=20IM=20floater=20goes?= =?UTF-8?q?=20foreground=20if=20it=20visible=20but=20not=20focused=20inste?= =?UTF-8?q?ad=20hide=20floater;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/newview/llchiclet.cpp | 2 + indra/newview/llimfloater.cpp | 7 ++- indra/newview/llimfloater.h | 2 + indra/newview/lltransientdockablefloater.cpp | 2 +- indra/newview/lltransientdockablefloater.h | 4 +- indra/newview/lltransientfloatermgr.cpp | 69 ++++++++++++++++++---------- indra/newview/lltransientfloatermgr.h | 37 ++++++++++++--- 7 files changed, 90 insertions(+), 33 deletions(-) (limited to 'indra') diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index 8da207f887..f1de4e2982 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -1272,6 +1272,7 @@ bool LLChicletPanel::addChiclet(LLChiclet* chiclet, S32 index) chiclet->setChicletSizeChangedCallback(boost::bind(&LLChicletPanel::onChicletSizeChanged, this, _1, index)); arrange(); + LLTransientFloaterMgr::getInstance()->addControlView(LLTransientFloaterMgr::IM, chiclet); return true; } @@ -1299,6 +1300,7 @@ void LLChicletPanel::removeChiclet(chiclet_list_t::iterator it) mChicletList.erase(it); arrange(); + LLTransientFloaterMgr::getInstance()->removeControlView(LLTransientFloaterMgr::IM, chiclet); chiclet->die(); } diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index e06e0c94ec..73597e7de3 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -110,6 +110,8 @@ LLIMFloater::LLIMFloater(const LLUUID& session_id) } } setOverlapsScreenChannel(true); + + LLTransientFloaterMgr::getInstance()->addControlView(LLTransientFloaterMgr::IM, this); } void LLIMFloater::onFocusLost() @@ -228,6 +230,7 @@ void LLIMFloater::sendMsg() LLIMFloater::~LLIMFloater() { + LLTransientFloaterMgr::getInstance()->removeControlView(LLTransientFloaterMgr::IM, this); } //virtual @@ -513,14 +516,14 @@ bool LLIMFloater::toggle(const LLUUID& session_id) if(!isChatMultiTab()) { LLIMFloater* floater = LLFloaterReg::findTypedInstance("impanel", session_id); - if (floater && floater->getVisible()) + if (floater && floater->getVisible() && floater->hasFocus()) { // clicking on chiclet to close floater just hides it to maintain existing // scroll/text entry state floater->setVisible(false); return false; } - else if(floater && !floater->isDocked()) + else if(floater && (!floater->isDocked() || floater->getVisible() && !floater->hasFocus())) { floater->setVisible(TRUE); floater->setFocus(TRUE); diff --git a/indra/newview/llimfloater.h b/indra/newview/llimfloater.h index d9db385d06..0ca0325451 100644 --- a/indra/newview/llimfloater.h +++ b/indra/newview/llimfloater.h @@ -116,6 +116,8 @@ public: static void onIMChicletCreated(const LLUUID& session_id); + virtual LLTransientFloaterMgr::ETransientGroup getGroup() { return LLTransientFloaterMgr::IM; } + private: // process focus events to set a currently active session /* virtual */ void onFocusLost(); diff --git a/indra/newview/lltransientdockablefloater.cpp b/indra/newview/lltransientdockablefloater.cpp index 7e4d4988d1..b830498cb0 100644 --- a/indra/newview/lltransientdockablefloater.cpp +++ b/indra/newview/lltransientdockablefloater.cpp @@ -39,7 +39,7 @@ LLTransientDockableFloater::LLTransientDockableFloater(LLDockControl* dockControl, bool uniqueDocking, const LLSD& key, const Params& params) : - LLDockableFloater(dockControl, uniqueDocking, key, params) + LLDockableFloater(dockControl, uniqueDocking, key, params), LLTransientFloater(this) { LLTransientFloaterMgr::getInstance()->registerTransientFloater(this); } diff --git a/indra/newview/lltransientdockablefloater.h b/indra/newview/lltransientdockablefloater.h index 6e8a3afd22..e0541d6597 100644 --- a/indra/newview/lltransientdockablefloater.h +++ b/indra/newview/lltransientdockablefloater.h @@ -37,12 +37,13 @@ #include "llfloater.h" #include "lldockcontrol.h" #include "lldockablefloater.h" +#include "lltransientfloatermgr.h" /** * Represents floater that can dock and managed by transient floater manager. * Transient floaters should be hidden if user click anywhere except defined view list. */ -class LLTransientDockableFloater : public LLDockableFloater +class LLTransientDockableFloater : public LLDockableFloater, LLTransientFloater { public: LOG_CLASS(LLTransientDockableFloater); @@ -52,6 +53,7 @@ public: /*virtual*/ void setVisible(BOOL visible); /* virtual */void setDocked(bool docked, bool pop_on_undock = true); + virtual LLTransientFloaterMgr::ETransientGroup getGroup() { return LLTransientFloaterMgr::GLOBAL; } }; #endif /* LL_TRANSIENTDOCKABLEFLOATER_H */ diff --git a/indra/newview/lltransientfloatermgr.cpp b/indra/newview/lltransientfloatermgr.cpp index 347399f239..f474f47eb7 100644 --- a/indra/newview/lltransientfloatermgr.cpp +++ b/indra/newview/lltransientfloatermgr.cpp @@ -44,57 +44,68 @@ LLTransientFloaterMgr::LLTransientFloaterMgr() { gViewerWindow->getRootView()->addMouseDownCallback(boost::bind( &LLTransientFloaterMgr::leftMouseClickCallback, this, _1, _2, _3)); + + mGroupControls.insert(std::pair >(GLOBAL, std::set())); + mGroupControls.insert(std::pair >(IM, std::set())); } -void LLTransientFloaterMgr::registerTransientFloater(LLFloater* floater) +void LLTransientFloaterMgr::registerTransientFloater(LLTransientFloater* floater) { mTransSet.insert(floater); } -void LLTransientFloaterMgr::unregisterTransientFloater(LLFloater* floater) +void LLTransientFloaterMgr::unregisterTransientFloater(LLTransientFloater* floater) { mTransSet.erase(floater); } +void LLTransientFloaterMgr::addControlView(ETransientGroup group, LLView* view) +{ + mGroupControls.find(group)->second.insert(view); +} + +void LLTransientFloaterMgr::removeControlView(ETransientGroup group, LLView* view) +{ + mGroupControls.find(group)->second.erase(view); +} + void LLTransientFloaterMgr::addControlView(LLView* view) { - mControlsSet.insert(view); + addControlView(GLOBAL, view); } void LLTransientFloaterMgr::removeControlView(LLView* view) { // we will still get focus lost callbacks on this view, but that's ok // since we run sanity checking logic every time - mControlsSet.erase(view); + removeControlView(GLOBAL, view); } -void LLTransientFloaterMgr::hideTransientFloaters() +void LLTransientFloaterMgr::hideTransientFloaters(S32 x, S32 y) { - for (std::set::iterator it = mTransSet.begin(); it + for (std::set::iterator it = mTransSet.begin(); it != mTransSet.end(); it++) { - LLFloater* floater = *it; - if (floater->isDocked()) + LLTransientFloater* floater = *it; + if (floater->isTransientDocked()) { - floater->setVisible(FALSE); + ETransientGroup group = floater->getGroup(); + + bool hide = isControlClicked(mGroupControls.find(group)->second, x, y); + if (hide) + { + floater->setTransientVisible(FALSE); + } } } } -void LLTransientFloaterMgr::leftMouseClickCallback(S32 x, S32 y, - MASK mask) +bool LLTransientFloaterMgr::isControlClicked(std::set& set, S32 x, S32 y) { - bool hide = true; - for (controls_set_t::iterator it = mControlsSet.begin(); it - != mControlsSet.end(); it++) + bool res = true; + for (controls_set_t::iterator it = set.begin(); it + != set.end(); it++) { - // don't hide transient floater if any context menu opened - if (LLMenuGL::sMenuContainer->getVisibleMenu() != NULL) - { - hide = false; - break; - } - LLView* control_view = *it; if (!control_view->getVisible()) { @@ -105,14 +116,26 @@ void LLTransientFloaterMgr::leftMouseClickCallback(S32 x, S32 y, // if click inside view rect if (rect.pointInRect(x, y)) { - hide = false; + res = false; break; } } + return res; +} + +void LLTransientFloaterMgr::leftMouseClickCallback(S32 x, S32 y, + MASK mask) +{ + // don't hide transient floater if any context menu opened + if (LLMenuGL::sMenuContainer->getVisibleMenu() != NULL) + { + return; + } + bool hide = isControlClicked(mGroupControls.find(GLOBAL)->second, x, y); if (hide) { - hideTransientFloaters(); + hideTransientFloaters(x, y); } } diff --git a/indra/newview/lltransientfloatermgr.h b/indra/newview/lltransientfloatermgr.h index cef6e1fe45..95eba666a0 100644 --- a/indra/newview/lltransientfloatermgr.h +++ b/indra/newview/lltransientfloatermgr.h @@ -37,6 +37,7 @@ #include "llsingleton.h" #include "llfloater.h" +class LLTransientFloater; /** * Provides functionality to hide transient floaters. @@ -44,20 +45,44 @@ class LLTransientFloaterMgr: public LLSingleton { public: + enum ETransientGroup + { + GLOBAL, IM + }; + LLTransientFloaterMgr(); - void registerTransientFloater(LLFloater* floater); - void unregisterTransientFloater(LLFloater* floater); + void registerTransientFloater(LLTransientFloater* floater); + void unregisterTransientFloater(LLTransientFloater* floater); + void addControlView(ETransientGroup group, LLView* view); + void removeControlView(ETransientGroup group, LLView* view); void addControlView(LLView* view); void removeControlView(LLView* view); private: - void hideTransientFloaters(); + void hideTransientFloaters(S32 x, S32 y); void leftMouseClickCallback(S32 x, S32 y, MASK mask); - + bool isControlClicked(std::set& set, S32 x, S32 y); private: - std::set mTransSet; + std::set mTransSet; + typedef std::set controls_set_t; - controls_set_t mControlsSet; + typedef std::map > group_controls_t; + group_controls_t mGroupControls; +}; + +/** + * An abstract class declares transient floater interfaces. + */ +class LLTransientFloater +{ +public: + LLTransientFloater(LLFloater* floater) : mFloater(floater) {} + virtual LLTransientFloaterMgr::ETransientGroup getGroup() = 0; + bool isTransientDocked() { return mFloater->isDocked(); }; + void setTransientVisible(BOOL visible) {mFloater->setVisible(visible); } + +private: + LLFloater* mFloater; }; #endif // LL_LLTRANSIENTFLOATERMGR_H -- cgit v1.2.3 From a3f951fa468482235527b6ed995739bb03ee8d43 Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Fri, 22 Jan 2010 13:58:53 +0200 Subject: Fixed low bug EXT-4596 - '99' number is displayed if there are more than 99 active notifications. --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/panel_bottomtray.xml | 1 - 1 file changed, 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml index de3de45718..38e9219b5b 100644 --- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml @@ -418,7 +418,6 @@ image_pressed_selected "Lit" + "Selected" - there are new messages and the Well name="Unread" image_overlay="Notices_Unread" image_overlay_alignment="center" - pad_right="15" tool_tip="Notifications" width="35" > Date: Fri, 22 Jan 2010 14:15:05 +0200 Subject: fix for EXT-4540 [BSI] console flood & freeze on sorting group member listing by role & online status and few additional fixes... LLScrollListItem->getValue() doesn't contain LLUUID anymore also fix xml - no icons in Allowed Abilities --HG-- branch : product-engine --- indra/newview/llpanelgrouproles.cpp | 40 ++++++++++++---------- indra/newview/llpanelgrouproles.h | 2 ++ .../skins/default/xui/en/panel_group_roles.xml | 24 +++++++++++-- 3 files changed, 45 insertions(+), 21 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index 0e55ff3214..c6527193ea 100644 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -452,6 +452,7 @@ LLPanelGroupSubTab::LLPanelGroupSubTab() : LLPanelGroupTab(), mHeader(NULL), mFooter(NULL), + mActivated(false), mSearchEditor(NULL) { } @@ -504,13 +505,14 @@ void LLPanelGroupSubTab::setGroupID(const LLUUID& id) mSearchEditor->clear(); setSearchFilter(""); } + + mActivated = false; } void LLPanelGroupSubTab::setSearchFilter(const std::string& filter) { if(mSearchFilter == filter) return; - lldebugs << "LLPanelGroupSubTab::setSearchFilter() ==> '" << filter << "'" << llendl; mSearchFilter = filter; LLStringUtil::toLower(mSearchFilter); update(GC_ALL); @@ -518,13 +520,11 @@ void LLPanelGroupSubTab::setSearchFilter(const std::string& filter) void LLPanelGroupSubTab::activate() { - lldebugs << "LLPanelGroupSubTab::activate()" << llendl; setOthersVisible(TRUE); } void LLPanelGroupSubTab::deactivate() { - lldebugs << "LLPanelGroupSubTab::deactivate()" << llendl; setOthersVisible(FALSE); } @@ -534,19 +534,11 @@ void LLPanelGroupSubTab::setOthersVisible(BOOL b) { mHeader->setVisible( b ); } - else - { - llwarns << "LLPanelGroupSubTab missing header!" << llendl; - } if (mFooter) { mFooter->setVisible( b ); } - else - { - llwarns << "LLPanelGroupSubTab missing footer!" << llendl; - } } bool LLPanelGroupSubTab::matchesActionSearchFilter(std::string action) @@ -875,10 +867,12 @@ void LLPanelGroupMembersSubTab::handleMemberSelect() for (itor = selection.begin(); itor != selection.end(); ++itor) { - selected_members.push_back( (*itor)->getUUID() ); + LLUUID member_id = (*itor)->getValue()["uuid"]; + + selected_members.push_back( member_id ); // Get this member's power mask including any unsaved changes - U64 powers = getAgentPowersBasedOnRoleChanges((*itor)->getUUID()); + U64 powers = getAgentPowersBasedOnRoleChanges( member_id ); allowed_by_all &= powers; allowed_by_some |= powers; @@ -1098,7 +1092,8 @@ void LLPanelGroupMembersSubTab::handleEjectMembers() for (itor = selection.begin() ; itor != selection.end(); ++itor) { - selected_members.push_back((*itor)->getUUID()); + LLUUID member_id = (*itor)->getValue()["uuid"]; + selected_members.push_back( member_id ); } mMembersList->deleteSelectedItems(); @@ -1154,7 +1149,8 @@ void LLPanelGroupMembersSubTab::handleRoleCheck(const LLUUID& role_id, for (std::vector::iterator itor = selection.begin() ; itor != selection.end(); ++itor) { - member_id = (*itor)->getUUID(); + + member_id = (*itor)->getValue()["uuid"]; //see if we requested a change for this member before if ( mMemberRoleChangeData.find(member_id) == mMemberRoleChangeData.end() ) @@ -1245,15 +1241,19 @@ void LLPanelGroupMembersSubTab::handleMemberDoubleClick() LLScrollListItem* selected = mMembersList->getFirstSelected(); if (selected) { - LLAvatarActions::showProfile(selected->getUUID()); + LLUUID member_id = selected->getValue()["uuid"]; + LLAvatarActions::showProfile( member_id ); } } void LLPanelGroupMembersSubTab::activate() { LLPanelGroupSubTab::activate(); - - update(GC_ALL); + if(!mActivated) + { + update(GC_ALL); + mActivated = true; + } } void LLPanelGroupMembersSubTab::deactivate() @@ -1629,7 +1629,9 @@ void LLPanelGroupMembersSubTab::updateMembers() row["columns"][2]["value"] = mMemberProgress->second->getOnlineStatus(); row["columns"][2]["font"] = "SANSSERIF_SMALL"; - mMembersList->addElement(row);//, ADD_SORTED); + LLScrollListItem* member = mMembersList->addElement(row);//, ADD_SORTED); + + LLUUID id = member->getValue()["uuid"]; mHasMatch = TRUE; } } diff --git a/indra/newview/llpanelgrouproles.h b/indra/newview/llpanelgrouproles.h index 2f81900e60..eac22a6338 100644 --- a/indra/newview/llpanelgrouproles.h +++ b/indra/newview/llpanelgrouproles.h @@ -149,6 +149,8 @@ protected: icon_map_t mActionIcons; + bool mActivated; + void setOthersVisible(BOOL b); }; diff --git a/indra/newview/skins/default/xui/en/panel_group_roles.xml b/indra/newview/skins/default/xui/en/panel_group_roles.xml index 6b3fb04549..618d2f3b8e 100644 --- a/indra/newview/skins/default/xui/en/panel_group_roles.xml +++ b/indra/newview/skins/default/xui/en/panel_group_roles.xml @@ -49,6 +49,18 @@ Select multiple Members by holding the Ctrl key and clicking on their names. + + Inv_FolderClosed + + + Checkbox_On + + + Checkbox_Off + Allowed Abilities - + + + width="270" /> Date: Fri, 22 Jan 2010 14:32:54 +0200 Subject: Fixed normal bug EXT-4321 - Pop-up window with description doesn't appear if choose 'Copy SLUrl' from 'Favorites Bar' context menu. --HG-- branch : product-engine --- indra/newview/llfavoritesbar.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra') diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index fb94657278..0e42ff09d8 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -51,6 +51,7 @@ #include "llinventorymodel.h" #include "llfloaterworldmap.h" #include "lllandmarkactions.h" +#include "llnotificationsutil.h" #include "llsidetray.h" #include "lltoggleablemenu.h" #include "llviewerinventory.h" @@ -975,6 +976,10 @@ BOOL LLFavoritesBarCtrl::handleRightMouseDown(S32 x, S32 y, MASK mask) void copy_slurl_to_clipboard_cb(std::string& slurl) { gClipboard.copyFromString(utf8str_to_wstring(slurl)); + + LLSD args; + args["SLURL"] = slurl; + LLNotificationsUtil::add("CopySLURL", args); } -- cgit v1.2.3 From d18c46bc15dc1f42c4119a3af9e5284335333475 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Fri, 22 Jan 2010 14:47:51 +0200 Subject: win build fixed --HG-- branch : product-engine --- indra/newview/lltransientdockablefloater.cpp | 3 ++- indra/newview/lltransientfloatermgr.cpp | 6 ++++++ indra/newview/lltransientfloatermgr.h | 7 ++++++- 3 files changed, 14 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/lltransientdockablefloater.cpp b/indra/newview/lltransientdockablefloater.cpp index b830498cb0..c9bfe178ce 100644 --- a/indra/newview/lltransientdockablefloater.cpp +++ b/indra/newview/lltransientdockablefloater.cpp @@ -39,9 +39,10 @@ LLTransientDockableFloater::LLTransientDockableFloater(LLDockControl* dockControl, bool uniqueDocking, const LLSD& key, const Params& params) : - LLDockableFloater(dockControl, uniqueDocking, key, params), LLTransientFloater(this) + LLDockableFloater(dockControl, uniqueDocking, key, params) { LLTransientFloaterMgr::getInstance()->registerTransientFloater(this); + LLTransientFloater::init(this); } LLTransientDockableFloater::~LLTransientDockableFloater() diff --git a/indra/newview/lltransientfloatermgr.cpp b/indra/newview/lltransientfloatermgr.cpp index f474f47eb7..8f1a738453 100644 --- a/indra/newview/lltransientfloatermgr.cpp +++ b/indra/newview/lltransientfloatermgr.cpp @@ -139,3 +139,9 @@ void LLTransientFloaterMgr::leftMouseClickCallback(S32 x, S32 y, } } +void LLTransientFloater::init(LLFloater* thiz) +{ + // used since LLTransientFloater(this) can't be used in descendant constructor parameter initialization. + mFloater = thiz; +} + diff --git a/indra/newview/lltransientfloatermgr.h b/indra/newview/lltransientfloatermgr.h index 95eba666a0..aecc5a505d 100644 --- a/indra/newview/lltransientfloatermgr.h +++ b/indra/newview/lltransientfloatermgr.h @@ -75,8 +75,13 @@ private: */ class LLTransientFloater { +protected: + /** + * Class initialization method. + * Should be called from descendant constructor. + */ + void init(LLFloater* thiz); public: - LLTransientFloater(LLFloater* floater) : mFloater(floater) {} virtual LLTransientFloaterMgr::ETransientGroup getGroup() = 0; bool isTransientDocked() { return mFloater->isDocked(); }; void setTransientVisible(BOOL visible) {mFloater->setVisible(visible); } -- cgit v1.2.3 From 14bbed35fbaf1362c547c8cd41b19b34c3025a7b Mon Sep 17 00:00:00 2001 From: Ychebotarev ProductEngine Date: Fri, 22 Jan 2010 14:48:54 +0200 Subject: additional fix for EXT-4035 Old sidepanel tab's text remains highlighted when switching to inventory sidepanel tab --HG-- branch : product-engine --- indra/newview/llfolderview.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra') diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index a63fb73032..b833c611bf 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -1391,6 +1391,7 @@ void LLFolderView::startRenamingSelectedItem( void ) // set focus will fail unless item is visible mRenamer->setFocus( TRUE ); mRenamer->setTopLostCallback(boost::bind(onRenamerLost, _1)); + mRenamer->setFocusLostCallback(boost::bind(onRenamerLost, _1)); gFocusMgr.setTopCtrl( mRenamer ); } } -- cgit v1.2.3 From 1a8325f4dceeb9fa0c92ddbca26fe6a301be4e8d Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Fri, 22 Jan 2010 14:59:12 +0200 Subject: Work on normal task EXT-2214 Refactor IM Control Panels -- replaced functionality to remove speacker from the list via Event timer. -- removed calling of LLSpeakerMgr::update from LLPanelGroupControlPanel::draw() (group text chat) For now list is updated when it is need. --HG-- branch : product-engine --- indra/newview/app_settings/settings.xml | 12 +++ indra/newview/llpanelimcontrolpanel.cpp | 3 - indra/newview/llspeakers.cpp | 152 ++++++++++++++++++++++++++------ indra/newview/llspeakers.h | 94 +++++++++++++++++++- 4 files changed, 229 insertions(+), 32 deletions(-) (limited to 'indra') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index a4fc095727..c29a3a0035 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -10070,6 +10070,18 @@ Value 1 + SpeakerParticipantRemoveDelay + + Comment + Timeout to remove participants who is not in channel before removed from list of active speakers (text/voice chat) + Persist + 1 + Type + F32 + Value + 10.0 + + UseStartScreen Comment diff --git a/indra/newview/llpanelimcontrolpanel.cpp b/indra/newview/llpanelimcontrolpanel.cpp index b1cdb4d81f..86bdee7c7d 100644 --- a/indra/newview/llpanelimcontrolpanel.cpp +++ b/indra/newview/llpanelimcontrolpanel.cpp @@ -264,9 +264,6 @@ LLPanelGroupControlPanel::~LLPanelGroupControlPanel() // virtual void LLPanelGroupControlPanel::draw() { - //Remove event does not raised until speakerp->mActivityTimer.hasExpired() is false, see LLSpeakerManager::update() - //so we need update it to raise needed event - mSpeakerManager->update(true); // Need to resort the participant list if it's in sort by recent speaker order. if (mParticipantList) mParticipantList->updateRecentSpeakersOrder(); diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index 0dd9203c6d..9608cd1263 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -44,7 +44,6 @@ #include "llvoavatar.h" #include "llworld.h" -const F32 SPEAKER_TIMEOUT = 10.f; // seconds of not being on voice channel before removed from list of active speakers const LLColor4 INACTIVE_COLOR(0.3f, 0.3f, 0.3f, 0.5f); const LLColor4 ACTIVE_COLOR(0.5f, 0.5f, 0.5f, 1.f); @@ -73,8 +72,6 @@ LLSpeaker::LLSpeaker(const LLUUID& id, const std::string& name, const ESpeakerTy } gVoiceClient->setUserVolume(id, LLMuteList::getInstance()->getSavedResidentVolume(id)); - - mActivityTimer.resetWithExpiry(SPEAKER_TIMEOUT); } @@ -164,6 +161,89 @@ bool LLSortRecentSpeakers::operator()(const LLPointer lhs, const LLPo return( lhs->mDisplayName.compare(rhs->mDisplayName) < 0 ); } +LLSpeakerActionTimer::LLSpeakerActionTimer(action_callback_t action_cb, F32 action_period, const LLUUID& speaker_id) +: LLEventTimer(action_period) +, mActionCallback(action_cb) +, mSpeakerId(speaker_id) +{ +} + +BOOL LLSpeakerActionTimer::tick() +{ + if (mActionCallback) + { + return (BOOL)mActionCallback(mSpeakerId); + } + return TRUE; +} + +LLSpeakersDelayActionsStorage::LLSpeakersDelayActionsStorage(LLSpeakerActionTimer::action_callback_t action_cb, F32 action_delay) +: mActionCallback(action_cb) +, mActionDelay(action_delay) +{ +} + +LLSpeakersDelayActionsStorage::~LLSpeakersDelayActionsStorage() +{ + removeAllTimers(); +} + +void LLSpeakersDelayActionsStorage::setActionTimer(const LLUUID& speaker_id) +{ + bool not_found = true; + if (mActionTimersMap.size() > 0) + { + not_found = mActionTimersMap.find(speaker_id) == mActionTimersMap.end(); + } + + // If there is already a started timer for the passed UUID don't do anything. + if (not_found) + { + // Starting a timer to remove an participant after delay is completed + mActionTimersMap.insert(LLSpeakerActionTimer::action_value_t(speaker_id, + new LLSpeakerActionTimer( + boost::bind(&LLSpeakersDelayActionsStorage::onTimerActionCallback, this, _1), + mActionDelay, speaker_id))); + } +} + +void LLSpeakersDelayActionsStorage::unsetActionTimer(const LLUUID& speaker_id) +{ + if (mActionTimersMap.size() == 0) return; + + LLSpeakerActionTimer::action_timer_iter_t it_speaker = mActionTimersMap.find(speaker_id); + + if (it_speaker != mActionTimersMap.end()) + { + delete it_speaker->second; + mActionTimersMap.erase(it_speaker); + } +} + +void LLSpeakersDelayActionsStorage::removeAllTimers() +{ + LLSpeakerActionTimer::action_timer_iter_t iter = mActionTimersMap.begin(); + for (; iter != mActionTimersMap.end(); ++iter) + { + delete iter->second; + } + mActionTimersMap.clear(); +} + +bool LLSpeakersDelayActionsStorage::onTimerActionCallback(const LLUUID& speaker_id) +{ + unsetActionTimer(speaker_id); + + if (mActionCallback) + { + mActionCallback(speaker_id); + } + + // do not return true to avoid deleting of an timer twice: + // in LLSpeakersDelayActionsStorage::unsetActionTimer() & LLEventTimer::updateClass() + return false; +} + // // LLSpeakerMgr @@ -172,10 +252,14 @@ bool LLSortRecentSpeakers::operator()(const LLPointer lhs, const LLPo LLSpeakerMgr::LLSpeakerMgr(LLVoiceChannel* channelp) : mVoiceChannel(channelp) { + static LLUICachedControl remove_delay ("SpeakerParticipantRemoveDelay", 10.0); + + mSpeakerDelayRemover = new LLSpeakersDelayActionsStorage(boost::bind(&LLSpeakerMgr::removeSpeaker, this, _1), remove_delay); } LLSpeakerMgr::~LLSpeakerMgr() { + delete mSpeakerDelayRemover; } LLPointer LLSpeakerMgr::setSpeaker(const LLUUID& id, const std::string& name, LLSpeaker::ESpeakerStatus status, LLSpeaker::ESpeakerType type) @@ -198,7 +282,6 @@ LLPointer LLSpeakerMgr::setSpeaker(const LLUUID& id, const std::strin { // keep highest priority status (lowest value) instead of overriding current value speakerp->mStatus = llmin(speakerp->mStatus, status); - speakerp->mActivityTimer.resetWithExpiry(SPEAKER_TIMEOUT); // RN: due to a weird behavior where IMs from attached objects come from the wearer's agent_id // we need to override speakers that we think are objects when we find out they are really // residents @@ -210,6 +293,8 @@ LLPointer LLSpeakerMgr::setSpeaker(const LLUUID& id, const std::strin } } + mSpeakerDelayRemover->unsetActionTimer(speakerp->mID); + return speakerp; } @@ -314,7 +399,7 @@ void LLSpeakerMgr::update(BOOL resort_ok) S32 sort_index = 0; speaker_list_t::iterator sorted_speaker_it; for(sorted_speaker_it = mSpeakersSorted.begin(); - sorted_speaker_it != mSpeakersSorted.end(); ) + sorted_speaker_it != mSpeakersSorted.end(); ++sorted_speaker_it) { LLPointer speakerp = *sorted_speaker_it; @@ -327,19 +412,6 @@ void LLSpeakerMgr::update(BOOL resort_ok) // stuff sort ordinal into speaker so the ui can sort by this value speakerp->mSortIndex = sort_index++; - - // remove speakers that have been gone too long - if (speakerp->mStatus == LLSpeaker::STATUS_NOT_IN_CHANNEL && speakerp->mActivityTimer.hasExpired()) - { - fireEvent(new LLSpeakerListChangeEvent(this, speakerp->mID), "remove"); - - mSpeakers.erase(speakerp->mID); - sorted_speaker_it = mSpeakersSorted.erase(sorted_speaker_it); - } - else - { - ++sorted_speaker_it; - } } } @@ -363,6 +435,35 @@ void LLSpeakerMgr::updateSpeakerList() } } +void LLSpeakerMgr::setSpeakerNotInChannel(LLSpeaker* speakerp) +{ + speakerp->mStatus = LLSpeaker::STATUS_NOT_IN_CHANNEL; + speakerp->mDotColor = INACTIVE_COLOR; + mSpeakerDelayRemover->setActionTimer(speakerp->mID); +} + +bool LLSpeakerMgr::removeSpeaker(const LLUUID& speaker_id) +{ + mSpeakers.erase(speaker_id); + + speaker_list_t::iterator sorted_speaker_it = mSpeakersSorted.begin(); + + for(; sorted_speaker_it != mSpeakersSorted.end(); ++sorted_speaker_it) + { + if (speaker_id == (*sorted_speaker_it)->mID) + { + mSpeakersSorted.erase(sorted_speaker_it); + break; + } + } + + fireEvent(new LLSpeakerListChangeEvent(this, speaker_id), "remove"); + + update(TRUE); + + return false; +} + LLPointer LLSpeakerMgr::findSpeaker(const LLUUID& speaker_id) { //In some conditions map causes crash if it is empty(Windows only), adding check (EK) @@ -511,9 +612,7 @@ void LLIMSpeakerMgr::updateSpeakers(const LLSD& update) { if (agent_data["transition"].asString() == "LEAVE" && speakerp.notNull()) { - speakerp->mStatus = LLSpeaker::STATUS_NOT_IN_CHANNEL; - speakerp->mDotColor = INACTIVE_COLOR; - speakerp->mActivityTimer.resetWithExpiry(SPEAKER_TIMEOUT); + setSpeakerNotInChannel(speakerp); } else if (agent_data["transition"].asString() == "ENTER") { @@ -563,9 +662,7 @@ void LLIMSpeakerMgr::updateSpeakers(const LLSD& update) std::string agent_transition = update_it->second.asString(); if (agent_transition == "LEAVE" && speakerp.notNull()) { - speakerp->mStatus = LLSpeaker::STATUS_NOT_IN_CHANNEL; - speakerp->mDotColor = INACTIVE_COLOR; - speakerp->mActivityTimer.resetWithExpiry(SPEAKER_TIMEOUT); + setSpeakerNotInChannel(speakerp); } else if ( agent_transition == "ENTER") { @@ -734,12 +831,13 @@ void LLActiveSpeakerMgr::updateSpeakerList() mVoiceChannel = LLVoiceChannel::getCurrentVoiceChannel(); // always populate from active voice channel - if (LLVoiceChannel::getCurrentVoiceChannel() != mVoiceChannel) + if (LLVoiceChannel::getCurrentVoiceChannel() != mVoiceChannel) //MA: seems this is always false { fireEvent(new LLSpeakerListChangeEvent(this, LLUUID::null), "clear"); mSpeakers.clear(); mSpeakersSorted.clear(); mVoiceChannel = LLVoiceChannel::getCurrentVoiceChannel(); + mSpeakerDelayRemover->removeAllTimers(); } LLSpeakerMgr::updateSpeakerList(); @@ -800,9 +898,7 @@ void LLLocalSpeakerMgr::updateSpeakerList() LLVOAvatar* avatarp = (LLVOAvatar*)gObjectList.findObject(speaker_id); if (!avatarp || dist_vec(avatarp->getPositionAgent(), gAgent.getPositionAgent()) > CHAT_NORMAL_RADIUS) { - speakerp->mStatus = LLSpeaker::STATUS_NOT_IN_CHANNEL; - speakerp->mDotColor = INACTIVE_COLOR; - speakerp->mActivityTimer.resetWithExpiry(SPEAKER_TIMEOUT); + setSpeakerNotInChannel(speakerp); } } } diff --git a/indra/newview/llspeakers.h b/indra/newview/llspeakers.h index da8dfdf548..63237204c8 100644 --- a/indra/newview/llspeakers.h +++ b/indra/newview/llspeakers.h @@ -73,7 +73,6 @@ public: F32 mLastSpokeTime; // timestamp when this speaker last spoke F32 mSpeechVolume; // current speech amplitude (timea average rms amplitude?) std::string mDisplayName; // cache user name for this speaker - LLFrameTimer mActivityTimer; // time out speakers when they are not part of current voice channel BOOL mHasSpoken; // has this speaker said anything this session? BOOL mHasLeftCurrentCall; // has this speaker left the current voice call? LLColor4 mDotColor; @@ -120,6 +119,92 @@ private: const LLUUID& mSpeakerID; }; +/** + * class LLSpeakerActionTimer + * + * Implements a timer that calls stored callback action for stored speaker after passed period. + * + * Action is called until callback returns "true". + * In this case the timer will be removed via LLEventTimer::updateClass(). + * Otherwise it should be deleted manually in place where it is used. + * If action callback is not set timer will tick only once and deleted. + */ +class LLSpeakerActionTimer : public LLEventTimer +{ +public: + typedef boost::function action_callback_t; + typedef std::map action_timers_map_t; + typedef action_timers_map_t::value_type action_value_t; + typedef action_timers_map_t::const_iterator action_timer_const_iter_t; + typedef action_timers_map_t::iterator action_timer_iter_t; + + /** + * Constructor. + * + * @param action_cb - callback which will be called each time after passed action period. + * @param action_period - time in seconds timer should tick. + * @param speaker_id - LLUUID of speaker which will be passed into action callback. + */ + LLSpeakerActionTimer(action_callback_t action_cb, F32 action_period, const LLUUID& speaker_id); + virtual ~LLSpeakerActionTimer() {}; + + /** + * Implements timer "tick". + * + * If action callback is not specified returns true. Instance will be deleted by LLEventTimer::updateClass(). + */ + virtual BOOL tick(); + +private: + action_callback_t mActionCallback; + LLUUID mSpeakerId; +}; + +/** + * Represents a functionality to store actions for speakers with delay. + * Is based on LLSpeakerActionTimer. + */ +class LLSpeakersDelayActionsStorage +{ +public: + LLSpeakersDelayActionsStorage(LLSpeakerActionTimer::action_callback_t action_cb, F32 action_delay); + ~LLSpeakersDelayActionsStorage(); + + /** + * Sets new LLSpeakerActionTimer with passed speaker UUID. + */ + void setActionTimer(const LLUUID& speaker_id); + + /** + * Removes stored LLSpeakerActionTimer for passed speaker UUID from internal map and deletes it. + * + * @see onTimerActionCallback() + */ + void unsetActionTimer(const LLUUID& speaker_id); + + void removeAllTimers(); +private: + /** + * Callback of the each instance of LLSpeakerActionTimer. + * + * Unsets an appropriate timer instance and calls action callback for specified speacker_id. + * It always returns false to not use LLEventTimer::updateClass functionality of timer deleting. + * + * @see unsetActionTimer() + */ + bool onTimerActionCallback(const LLUUID& speaker_id); + + LLSpeakerActionTimer::action_timers_map_t mActionTimersMap; + LLSpeakerActionTimer::action_callback_t mActionCallback; + + /** + * Delay to call action callback for speakers after timer was set. + */ + F32 mActionDelay; + +}; + + class LLSpeakerMgr : public LLOldEvents::LLObservable { public: @@ -144,6 +229,8 @@ public: protected: virtual void updateSpeakerList(); + void setSpeakerNotInChannel(LLSpeaker* speackerp); + bool removeSpeaker(const LLUUID& speaker_id); typedef std::map > speaker_map_t; speaker_map_t mSpeakers; @@ -151,6 +238,11 @@ protected: speaker_list_t mSpeakersSorted; LLFrameTimer mSpeechTimer; LLVoiceChannel* mVoiceChannel; + + /** + * time out speakers when they are not part of current session + */ + LLSpeakersDelayActionsStorage* mSpeakerDelayRemover; }; class LLIMSpeakerMgr : public LLSpeakerMgr -- cgit v1.2.3 From fd44fbd4efb73ca4ff4525877619e0951a0deba1 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Fri, 22 Jan 2010 15:02:51 +0200 Subject: made LLTransientFloaterMgr constructor protected; --HG-- branch : product-engine --- indra/newview/lltransientfloatermgr.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/lltransientfloatermgr.h b/indra/newview/lltransientfloatermgr.h index aecc5a505d..1f99325a7f 100644 --- a/indra/newview/lltransientfloatermgr.h +++ b/indra/newview/lltransientfloatermgr.h @@ -44,13 +44,16 @@ class LLTransientFloater; */ class LLTransientFloaterMgr: public LLSingleton { +protected: + LLTransientFloaterMgr(); + friend class LLSingleton; + public: enum ETransientGroup { GLOBAL, IM }; - LLTransientFloaterMgr(); void registerTransientFloater(LLTransientFloater* floater); void unregisterTransientFloater(LLTransientFloater* floater); void addControlView(ETransientGroup group, LLView* view); -- cgit v1.2.3 From 7b41de5fac1e95a0623b519fbb7dd3d93d9fc42a Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Fri, 22 Jan 2010 15:16:53 +0200 Subject: Work on normal task EXT-2214 Refactor IM Control Panels -- removed reference to LLSpeakerMgr from LLPanelGroupControlPanel (group text chat) --HG-- branch : product-engine --- indra/newview/llpanelimcontrolpanel.cpp | 6 ++++-- indra/newview/llpanelimcontrolpanel.h | 3 --- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanelimcontrolpanel.cpp b/indra/newview/llpanelimcontrolpanel.cpp index 86bdee7c7d..a334eb9d68 100644 --- a/indra/newview/llpanelimcontrolpanel.cpp +++ b/indra/newview/llpanelimcontrolpanel.cpp @@ -245,7 +245,6 @@ void LLPanelIMControlPanel::nameUpdatedCallback(const LLUUID& id, const std::str LLPanelGroupControlPanel::LLPanelGroupControlPanel(const LLUUID& session_id): mParticipantList(NULL) { - mSpeakerManager = LLIMModel::getInstance()->getSpeakerManager(session_id); } BOOL LLPanelGroupControlPanel::postBuild() @@ -304,7 +303,10 @@ void LLPanelGroupControlPanel::setSessionId(const LLUUID& session_id) // for group and Ad-hoc chat we need to include agent into list if(!mParticipantList) - mParticipantList = new LLParticipantList(mSpeakerManager, getChild("speakers_list"), true,false); + { + LLSpeakerMgr* speaker_manager = LLIMModel::getInstance()->getSpeakerManager(session_id); + mParticipantList = new LLParticipantList(speaker_manager, getChild("speakers_list"), true,false); + } } diff --git a/indra/newview/llpanelimcontrolpanel.h b/indra/newview/llpanelimcontrolpanel.h index c18be5a6df..25fdf944c9 100644 --- a/indra/newview/llpanelimcontrolpanel.h +++ b/indra/newview/llpanelimcontrolpanel.h @@ -37,8 +37,6 @@ #include "llvoicechannel.h" #include "llcallingcard.h" -class LLSpeakerMgr; -class LLAvatarList; class LLParticipantList; class LLPanelChatControlPanel : public LLPanel @@ -110,7 +108,6 @@ public: protected: LLUUID mGroupID; - LLSpeakerMgr* mSpeakerManager; LLParticipantList* mParticipantList; -- cgit v1.2.3 From 682fd146b0978363e6264569c74e018f0cb971fa Mon Sep 17 00:00:00 2001 From: Ychebotarev ProductEngine Date: Fri, 22 Jan 2010 15:25:46 +0200 Subject: fix for normal EXT-4554 [BSI] group join now button goes missing after failure to join due to maximum groups --HG-- branch : product-engine --- indra/newview/llpanelgroup.cpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp index 569d3001bf..c30ef3221d 100644 --- a/indra/newview/llpanelgroup.cpp +++ b/indra/newview/llpanelgroup.cpp @@ -356,13 +356,6 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id) for(std::vector::iterator it = mTabs.begin();it!=mTabs.end();++it) (*it)->setGroupID(group_id); - LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mID); - if(gdatap) - { - childSetValue("group_name", gdatap->mName); - childSetToolTip("group_name",gdatap->mName); - } - LLButton* button_apply = findChild("btn_apply"); LLButton* button_refresh = findChild("btn_refresh"); LLButton* button_create = findChild("btn_create"); @@ -464,6 +457,17 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id) } reposButtons(); + + LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mID); + + if(gdatap) + { + childSetValue("group_name", gdatap->mName); + childSetToolTip("group_name",gdatap->mName); + + //group data is already present, call update manually + update(GC_ALL); + } } bool LLPanelGroup::apply(LLPanelGroupTab* tab) -- cgit v1.2.3 From 7f42a0e8affe1a3394116d1457830f774deb7438 Mon Sep 17 00:00:00 2001 From: Ychebotarev ProductEngine Date: Fri, 22 Jan 2010 16:26:42 +0200 Subject: fix for normal EXT-4549 [BSI] assigned group roles text appears selectable when it should not --HG-- branch : product-engine --- indra/newview/llpanelgrouproles.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra') diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index c6527193ea..45f0381d6f 100644 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -1016,6 +1016,7 @@ void LLPanelGroupMembersSubTab::handleMemberSelect() //last owner. We should check for this special case // -jwolk check->setEnabled(cb_enable); + item->setEnabled(cb_enable); } } else -- cgit v1.2.3 From 0c80b1f7825643e247f151e038b2d3243421420a Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Fri, 22 Jan 2010 17:03:13 +0200 Subject: Related to normal task EXT-2214 Refactor IM Control Panels & EXT-3434 (There is no difference between invited and left participants in a Group call (Voice Controls)) -- replaced functionality to delayed removing of has left voice partcipants in VCP with one implemented in changeset f48e7cc41501 Behaviour of VCP implemented in EXT-3434 was not changed --HG-- branch : product-engine --- indra/newview/llcallfloater.cpp | 69 +++++------------------------------------ indra/newview/llcallfloater.h | 31 ++++-------------- 2 files changed, 14 insertions(+), 86 deletions(-) (limited to 'indra') diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index f346a4b8c2..d4c8adadc6 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -93,22 +93,6 @@ static void* create_non_avatar_caller(void*) return new LLNonAvatarCaller; } -LLCallFloater::LLAvatarListItemRemoveTimer::LLAvatarListItemRemoveTimer(callback_t remove_cb, F32 period, const LLUUID& speaker_id) -: LLEventTimer(period) -, mRemoveCallback(remove_cb) -, mSpeakerId(speaker_id) -{ -} - -BOOL LLCallFloater::LLAvatarListItemRemoveTimer::tick() -{ - if (mRemoveCallback) - { - mRemoveCallback(mSpeakerId); - } - return TRUE; -} - LLVoiceChannel* LLCallFloater::sCurrentVoiceCanel = NULL; LLCallFloater::LLCallFloater(const LLSD& key) @@ -122,10 +106,9 @@ LLCallFloater::LLCallFloater(const LLSD& key) , mSpeakingIndicator(NULL) , mIsModeratorMutedVoice(false) , mInitParticipantsVoiceState(false) -, mVoiceLeftRemoveDelay(10) { static LLUICachedControl voice_left_remove_delay ("VoiceParticipantLeftRemoveDelay", 10); - mVoiceLeftRemoveDelay = voice_left_remove_delay; + mSpeakerDelayRemover = new LLSpeakersDelayActionsStorage(boost::bind(&LLCallFloater::removeVoiceLeftParticipant, this, _1), voice_left_remove_delay); mFactoryMap["non_avatar_caller"] = LLCallbackMap(create_non_avatar_caller, NULL); LLVoiceClient::getInstance()->addObserver(this); @@ -135,6 +118,7 @@ LLCallFloater::LLCallFloater(const LLSD& key) LLCallFloater::~LLCallFloater() { resetVoiceRemoveTimers(); + delete mSpeakerDelayRemover; delete mParticipants; mParticipants = NULL; @@ -648,33 +632,11 @@ void LLCallFloater::setState(LLAvatarListItem* item, ESpeakerState state) void LLCallFloater::setVoiceRemoveTimer(const LLUUID& voice_speaker_id) { - - // If there is already a started timer for the current panel don't do anything. - bool no_timer_for_current_panel = true; - if (mVoiceLeftTimersMap.size() > 0) - { - timers_map::iterator found_it = mVoiceLeftTimersMap.find(voice_speaker_id); - if (found_it != mVoiceLeftTimersMap.end()) - { - no_timer_for_current_panel = false; - } - } - - if (no_timer_for_current_panel) - { - // Starting a timer to remove an avatar row panel after timeout - mVoiceLeftTimersMap.insert(timer_pair(voice_speaker_id, - new LLAvatarListItemRemoveTimer(boost::bind(&LLCallFloater::removeVoiceLeftParticipant, this, _1), mVoiceLeftRemoveDelay, voice_speaker_id))); - } + mSpeakerDelayRemover->setActionTimer(voice_speaker_id); } -void LLCallFloater::removeVoiceLeftParticipant(const LLUUID& voice_speaker_id) +bool LLCallFloater::removeVoiceLeftParticipant(const LLUUID& voice_speaker_id) { - if (mVoiceLeftTimersMap.size() > 0) - { - mVoiceLeftTimersMap.erase(mVoiceLeftTimersMap.find(voice_speaker_id)); - } - LLAvatarList::uuid_vector_t& speaker_uuids = mAvatarList->getIDs(); LLAvatarList::uuid_vector_t::iterator pos = std::find(speaker_uuids.begin(), speaker_uuids.end(), voice_speaker_id); if(pos != speaker_uuids.end()) @@ -682,34 +644,19 @@ void LLCallFloater::removeVoiceLeftParticipant(const LLUUID& voice_speaker_id) speaker_uuids.erase(pos); mAvatarList->setDirty(); } + + return false; } void LLCallFloater::resetVoiceRemoveTimers() { - if (mVoiceLeftTimersMap.size() > 0) - { - for (timers_map::iterator iter = mVoiceLeftTimersMap.begin(); - iter != mVoiceLeftTimersMap.end(); ++iter) - { - delete iter->second; - } - } - mVoiceLeftTimersMap.clear(); + mSpeakerDelayRemover->removeAllTimers(); } void LLCallFloater::removeVoiceRemoveTimer(const LLUUID& voice_speaker_id) { - // Remove the timer if it has been already started - if (mVoiceLeftTimersMap.size() > 0) - { - timers_map::iterator found_it = mVoiceLeftTimersMap.find(voice_speaker_id); - if (found_it != mVoiceLeftTimersMap.end()) - { - delete found_it->second; - mVoiceLeftTimersMap.erase(found_it); - } - } + mSpeakerDelayRemover->unsetActionTimer(voice_speaker_id); } bool LLCallFloater::validateSpeaker(const LLUUID& speaker_id) diff --git a/indra/newview/llcallfloater.h b/indra/newview/llcallfloater.h index 096594aaa2..eded3a426b 100644 --- a/indra/newview/llcallfloater.h +++ b/indra/newview/llcallfloater.h @@ -44,6 +44,8 @@ class LLNonAvatarCaller; class LLOutputMonitorCtrl; class LLParticipantList; class LLSpeakerMgr; +class LLSpeakersDelayActionsStorage; + /** * The Voice Control Panel is an ambient window summoned by clicking the flyout chevron on the Speak button. * It can be torn-off and freely positioned onscreen. @@ -169,7 +171,7 @@ private: * * @param voice_speaker_id LLUUID of Avatar List item to be removed from the list. */ - void removeVoiceLeftParticipant(const LLUUID& voice_speaker_id); + bool removeVoiceLeftParticipant(const LLUUID& voice_speaker_id); /** * Deletes all timers from the list to prevent started timers from ticking after destruction @@ -240,32 +242,11 @@ private: boost::signals2::connection mAvatarListRefreshConnection; + /** - * class LLAvatarListItemRemoveTimer - * - * Implements a timer that removes avatar list item of a participant - * who has left the call. + * time out speakers when they are not part of current session */ - class LLAvatarListItemRemoveTimer : public LLEventTimer - { - public: - typedef boost::function callback_t; - - LLAvatarListItemRemoveTimer(callback_t remove_cb, F32 period, const LLUUID& speaker_id); - virtual ~LLAvatarListItemRemoveTimer() {}; - - virtual BOOL tick(); - - private: - callback_t mRemoveCallback; - LLUUID mSpeakerId; - }; - - typedef std::pair timer_pair; - typedef std::map timers_map; - - timers_map mVoiceLeftTimersMap; - S32 mVoiceLeftRemoveDelay; + LLSpeakersDelayActionsStorage* mSpeakerDelayRemover; /** * Stores reference to current voice channel. -- cgit v1.2.3 From c64638dc2114a91b8efb17c1e37481ce34df84d5 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Fri, 22 Jan 2010 10:48:24 -0500 Subject: EXT-4492 Deleting gestures from the wearing tab causes the viewer to crash Revert removal of "delete" option from last checkin. Now enabling "delete" but checking if *this was deleted within removeItem(). --- indra/newview/llinventorybridge.cpp | 46 ++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'indra') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 1c88658920..df089cb0f9 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -575,34 +575,17 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, } } - // Don't add a separator unless we have at least one entry beneath it, - // to avoid double separators. - BOOL separator_pasted = FALSE; + items.push_back(std::string("Paste Separator")); if (obj && obj->getIsLinkType() && !get_is_item_worn(mUUID)) { - if (!separator_pasted) - { - items.push_back(std::string("Paste Separator")); - separator_pasted = TRUE; - } items.push_back(std::string("Remove Link")); } - // Hide the delete button from the COF. Detaching/removing/etc. an item in the COF - // will naturally delete it. This prevents double delete crash possibilities. - if (!isCOFFolder()) + items.push_back(std::string("Delete")); + if (!isItemRemovable()) { - if (!separator_pasted) - { - items.push_back(std::string("Paste Separator")); - separator_pasted = TRUE; - } - items.push_back(std::string("Delete")); - if (!isItemRemovable()) - { - disabled_items.push_back(std::string("Delete")); - } + disabled_items.push_back(std::string("Delete")); } // If multiple items are selected, disable properties (if it exists). @@ -3827,8 +3810,25 @@ void LLGestureBridge::openItem() BOOL LLGestureBridge::removeItem() { - // Force close the preview window, if it exists - LLGestureManager::instance().deactivateGesture(mUUID); + // Grab class information locally since *this may be deleted + // within this function. Not a great pattern... + const LLInventoryModel* model = getInventoryModel(); + if(!model) + { + return FALSE; + } + const LLUUID item_id = mUUID; + + // This will also force close the preview window, if it exists. + // This may actually delete *this, if mUUID is in the COF. + LLGestureManager::instance().deactivateGesture(item_id); + + // If deactivateGesture deleted *this, then return out immediately. + if (!model->getObject(item_id)) + { + return TRUE; + } + return LLItemBridge::removeItem(); } -- cgit v1.2.3 From ba3bbb2131f299f4a6bcef1fec72169e47d5717b Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Fri, 22 Jan 2010 18:06:53 +0200 Subject: Fixed bug EXT-4583 ([BSI] Changing group image via drag and drop from Inventory floater doesn't trigger "save" button to become active). Modified LLTextureCtrl's no_commit_on_selection paramater behavior so that the widget gets dirty only on DnD or when the OK button is pressed in the picker. This is needed for panels that rely on LLTextureCtrl::isDirty() to enable their "Apply" button. --HG-- branch : product-engine --- indra/newview/lltexturectrl.cpp | 10 ++++++++-- indra/newview/lltexturectrl.h | 3 ++- .../newview/skins/default/xui/en/panel_group_info_sidetray.xml | 1 + 3 files changed, 11 insertions(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index 9c4825763b..2b846d33fc 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -1103,7 +1103,10 @@ void LLTextureCtrl::onFloaterCommit(ETexturePickOp op) { if (op == TEXTURE_CANCEL) mViewModel->resetDirty(); - else + // If the "no_commit_on_selection" parameter is set + // we get dirty only when user presses OK in the picker + // (i.e. op == TEXTURE_SELECT) or texture changes via DnD. + else if (mCommitOnSelection || op == TEXTURE_SELECT) mViewModel->setDirty(); // *TODO: shouldn't we be using setValue() here? if( floaterp->isDirty() ) @@ -1125,7 +1128,7 @@ void LLTextureCtrl::onFloaterCommit(ETexturePickOp op) { // If the "no_commit_on_selection" parameter is set // we commit only when user presses OK in the picker - // (i.e. op == TEXTURE_SELECT) or changes texture via DnD. + // (i.e. op == TEXTURE_SELECT) or texture changes via DnD. if (mCommitOnSelection || op == TEXTURE_SELECT) onCommit(); } @@ -1165,6 +1168,9 @@ BOOL LLTextureCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask, { if(doDrop(item)) { + if (!mCommitOnSelection) + mViewModel->setDirty(); + // This removes the 'Multiple' overlay, since // there is now only one texture selected. setTentative( FALSE ); diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h index 023329a9b2..8ca92c3d87 100644 --- a/indra/newview/lltexturectrl.h +++ b/indra/newview/lltexturectrl.h @@ -74,7 +74,8 @@ public: Optional default_image_name; Optional allow_no_texture; Optional can_apply_immediately; - Optional no_commit_on_selection; // don't commit unless it's DnD or OK button press + Optional no_commit_on_selection; // alternative mode: commit occurs and the widget gets dirty + // only on DnD or when OK is pressed in the picker Optional label_width; Optional border_color; diff --git a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml index 673052c3b5..0893c204e7 100644 --- a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml +++ b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml @@ -67,6 +67,7 @@ background_visible="true" layout="topleft" left="20" name="insignia" + no_commit_on_selection="true" tool_tip="Click to choose a picture" top_pad="5" width="100" /> -- cgit v1.2.3 From a2105d170261608cf515e1698b9b473d6e73558b Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Fri, 22 Jan 2010 18:10:07 +0200 Subject: implemented EXT-4523 Log for all Ad-Hoc conferences is stored in one file * for outgoing ad-hoc sessions chat history is saved into new file for every distinct set of initial participants format: ["Ad-hoc Conference" "hash".txt] ex: Ad-hoc Conference hash77a0ff26-614d-0dbd-ce19-5da9108f141a.txt * for incoming ad-hoc sessions, chat history of each session is saved into a separate file: format: [ <4 first symbols of session id>.txt] ex: Igor ProductEngine Conference 2010_01_22 07_41 2752.txt --HG-- branch : product-engine --- indra/newview/llimview.cpp | 69 +++++++++++++++++++++++++++++++++++++-------- indra/newview/llimview.h | 14 ++++++++- indra/newview/lllogchat.cpp | 6 ++-- indra/newview/lllogchat.h | 2 +- 4 files changed, 74 insertions(+), 17 deletions(-) (limited to 'indra') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index ff20a55358..c2a7969c0d 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -55,6 +55,7 @@ #include "llfloaterchatterbox.h" #include "llimfloater.h" #include "llgroupiconctrl.h" +#include "llmd5.h" #include "llmutelist.h" #include "llrecentpeople.h" #include "llviewermessage.h" @@ -215,12 +216,14 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& mTextIMPossible = LLVoiceClient::getInstance()->isSessionTextIMPossible(mSessionID); } + buildHistoryFileName(); + if ( gSavedPerAccountSettings.getBOOL("LogShowHistory") ) { std::list chat_history; //involves parsing of a chat history - LLLogChat::loadAllHistory(mName, chat_history); + LLLogChat::loadAllHistory(mHistoryFileName, chat_history); addMessagesFromHistory(chat_history); } } @@ -467,6 +470,44 @@ bool LLIMModel::LLIMSession::isOtherParticipantAvaline() return !mOtherParticipantIsAvatar; } +void LLIMModel::LLIMSession::buildHistoryFileName() +{ + mHistoryFileName = mName; + + //ad-hoc requires sophisticated chat history saving schemes + if (isAdHoc()) + { + //in case of outgoing ad-hoc sessions + if (mInitialTargetIDs.size()) + { + std::set sorted_uuids(mInitialTargetIDs.begin(), mInitialTargetIDs.end()); + mHistoryFileName = mName + " hash" + generateHash(sorted_uuids); + return; + } + + //in case of incoming ad-hoc sessions + mHistoryFileName = mName + " " + LLLogChat::timestamp(true) + " " + mSessionID.asString().substr(0, 4); + } +} + +//static +std::string LLIMModel::LLIMSession::generateHash(const std::set& sorted_uuids) +{ + LLMD5 md5_uuid; + + std::set::const_iterator it = sorted_uuids.begin(); + while (it != sorted_uuids.end()) + { + md5_uuid.update((unsigned char*)(*it).mData, 16); + it++; + } + md5_uuid.finalize(); + + LLUUID participants_md5_hash; + md5_uuid.raw_digest((unsigned char*) participants_md5_hash.mData); + return participants_md5_hash.asString(); +} + void LLIMModel::processSessionInitializedReply(const LLUUID& old_session_id, const LLUUID& new_session_id) { @@ -614,11 +655,11 @@ bool LLIMModel::addToHistory(const LLUUID& session_id, const std::string& from, return true; } -bool LLIMModel::logToFile(const std::string& session_name, const std::string& from, const LLUUID& from_id, const std::string& utf8_text) +bool LLIMModel::logToFile(const std::string& file_name, const std::string& from, const LLUUID& from_id, const std::string& utf8_text) { if (gSavedPerAccountSettings.getBOOL("LogInstantMessages")) { - LLLogChat::saveHistory(session_name, from, from_id, utf8_text); + LLLogChat::saveHistory(file_name, from, from_id, utf8_text); return true; } else @@ -629,15 +670,7 @@ bool LLIMModel::logToFile(const std::string& session_name, const std::string& fr bool LLIMModel::logToFile(const LLUUID& session_id, const std::string& from, const LLUUID& from_id, const std::string& utf8_text) { - if (gSavedPerAccountSettings.getBOOL("LogInstantMessages")) - { - LLLogChat::saveHistory(LLIMModel::getInstance()->getName(session_id), from, from_id, utf8_text); - return true; - } - else - { - return false; - } + return logToFile(LLIMModel::getInstance()->getHistoryFileName(session_id), from, from_id, utf8_text); } bool LLIMModel::proccessOnlineOfflineNotification( @@ -782,6 +815,18 @@ LLIMSpeakerMgr* LLIMModel::getSpeakerManager( const LLUUID& session_id ) const return session->mSpeakers; } +const std::string& LLIMModel::getHistoryFileName(const LLUUID& session_id) const +{ + LLIMSession* session = findIMSession(session_id); + if (!session) + { + llwarns << "session " << session_id << " does not exist " << llendl; + return LLStringUtil::null; + } + + return session->mHistoryFileName; +} + // TODO get rid of other participant ID void LLIMModel::sendTypingState(LLUUID session_id, LLUUID other_participant_id, BOOL typing) diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index a226d66b12..a3b4f78af0 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -69,6 +69,8 @@ public: void addMessagesFromHistory(const std::list& history); void addMessage(const std::string& from, const LLUUID& from_id, const std::string& utf8_text, const std::string& time); void onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state, const LLVoiceChannel::EDirection& direction); + + /** @deprecated */ static void chatFromLogFile(LLLogChat::ELogLineType type, const LLSD& msg, void* userdata); bool isAdHoc(); @@ -80,12 +82,20 @@ public: bool isGroupSessionType() const { return mSessionType == GROUP_SESSION;} bool isAvalineSessionType() const { return mSessionType == AVALINE_SESSION;} + //*TODO make private + /** ad-hoc sessions involve sophisticated chat history file naming schemes */ + void buildHistoryFileName(); + + //*TODO make private + static std::string generateHash(const std::set& sorted_uuids); + LLUUID mSessionID; std::string mName; EInstantMessage mType; SType mSessionType; LLUUID mOtherParticipantID; std::vector mInitialTargetIDs; + std::string mHistoryFileName; // connection to voice channel state change signal boost::signals2::connection mVoiceChannelStateChangeConnection; @@ -231,6 +241,8 @@ public: */ LLIMSpeakerMgr* getSpeakerManager(const LLUUID& session_id) const; + const std::string& getHistoryFileName(const LLUUID& session_id) const; + static void sendLeaveSession(const LLUUID& session_id, const LLUUID& other_participant_id); static bool sendStartSession(const LLUUID& temp_session_id, const LLUUID& other_participant_id, const std::vector& ids, EInstantMessage dialog); @@ -243,7 +255,7 @@ public: /** * Saves an IM message into a file */ - bool logToFile(const std::string& session_name, const std::string& from, const LLUUID& from_id, const std::string& utf8_text); + bool logToFile(const std::string& file_name, const std::string& from, const LLUUID& from_id, const std::string& utf8_text); private: diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp index 4e5aaeb66a..dc187bf36c 100644 --- a/indra/newview/lllogchat.cpp +++ b/indra/newview/lllogchat.cpp @@ -237,15 +237,15 @@ void append_to_last_message(std::list& messages, const std::string& line) messages.back()[IM_TEXT] = im_text; } -void LLLogChat::loadAllHistory(const std::string& session_name, std::list& messages) +void LLLogChat::loadAllHistory(const std::string& file_name, std::list& messages) { - if (session_name.empty()) + if (file_name.empty()) { llwarns << "Session name is Empty!" << llendl; return ; } - LLFILE* fptr = LLFile::fopen(makeLogFileName(session_name), "r"); /*Flawfinder: ignore*/ + LLFILE* fptr = LLFile::fopen(makeLogFileName(file_name), "r"); /*Flawfinder: ignore*/ if (!fptr) return; //No previous conversation with this name. char buffer[LOG_RECALL_SIZE]; /*Flawfinder: ignore*/ diff --git a/indra/newview/lllogchat.h b/indra/newview/lllogchat.h index 3d3f5c4458..4290e4bbc0 100644 --- a/indra/newview/lllogchat.h +++ b/indra/newview/lllogchat.h @@ -56,7 +56,7 @@ public: void (*callback)(ELogLineType, const LLSD&, void*), void* userdata); - static void loadAllHistory(const std::string& session_name, std::list& messages); + static void loadAllHistory(const std::string& file_name, std::list& messages); private: static std::string cleanFileName(std::string filename); }; -- cgit v1.2.3 From eaefaf7b33dba4326b0ef0e9b82edda2436ae581 Mon Sep 17 00:00:00 2001 From: Denis Serdjuk Date: Fri, 22 Jan 2010 18:27:17 +0200 Subject: fixed low bug EXT-4594 Highlight landmark on right mouse click in the Favorites Bar --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/favorites_bar_button.xml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/favorites_bar_button.xml b/indra/newview/skins/default/xui/en/favorites_bar_button.xml index 6adf2a5950..b365040c20 100644 --- a/indra/newview/skins/default/xui/en/favorites_bar_button.xml +++ b/indra/newview/skins/default/xui/en/favorites_bar_button.xml @@ -10,6 +10,8 @@ image_selected="transparent.j2c" image_unselected="transparent.j2c" image_pressed="Favorite_Link_Over" + image_hover_selected="Favorite_Link_Over" + image_hover_unselected="Favorite_Link_Over" hover_glow_amount="0.15" label_shadow="false" layout="topleft" -- cgit v1.2.3 From 1bcf723a3b6427a913729e02c62108e0e06e1f23 Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Fri, 22 Jan 2010 17:54:13 +0200 Subject: Fixed low bug EXT-4306 - Landmark name is shown with prefix in the group notice attachment. --HG-- branch : product-engine --- indra/newview/llviewermessage.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 7487fa9997..0358efc0af 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1472,7 +1472,12 @@ void inventory_offer_handler(LLOfferInfo* info) { LLStringUtil::truncate(msg, indx); } - + + if(LLAssetType::AT_LANDMARK == info->mType) + { + msg = LLViewerInventoryItem::getDisplayName(msg); + } + LLSD args; args["[OBJECTNAME]"] = msg; -- cgit v1.2.3 From 84dfa02baf4aff336ec467acbe647618e9b4b21a Mon Sep 17 00:00:00 2001 From: Soft Linden Date: Fri, 22 Jan 2010 10:25:23 -0600 Subject: DEV-1195 SVC-580: ATTACH_LPEC / ATTACH_RPEC reversed --- indra/newview/app_settings/keywords.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/app_settings/keywords.ini b/indra/newview/app_settings/keywords.ini index 14025c8061..0805e94b10 100644 --- a/indra/newview/app_settings/keywords.ini +++ b/indra/newview/app_settings/keywords.ini @@ -268,8 +268,8 @@ ATTACH_LHIP Passed to llAttachToAvatar to attach task to left hip ATTACH_LULEG Passed to llAttachToAvatar to attach task to left upper leg ATTACH_LLLEG Passed to llAttachToAvatar to attach task to left lower leg ATTACH_BELLY Passed to llAttachToAvatar to attach task to belly -ATTACH_RPEC Passed to llAttachToAvatar to attach task to right pectoral -ATTACH_LPEC Passed to llAttachToAvatar to attach task to left pectoral +ATTACH_LEFT_PEC Passed to llAttachToAvatar to attach task to left pectoral +ATTACH_RIGHT_PEC Passed to llAttachToAvatar to attach task to right pectoral LAND_LEVEL Passed to llModifyLand to level terrain LAND_RAISE Passed to llModifyLand to raise terrain -- cgit v1.2.3 From ff852efdd21b814868c51411989c69fcdaa1eca1 Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Fri, 22 Jan 2010 18:42:16 +0200 Subject: Fixed normal bug EXT-4497 - Edit Profile and Edit Appearance buttons layout issue in side panel. --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/panel_my_profile.xml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/panel_my_profile.xml b/indra/newview/skins/default/xui/en/panel_my_profile.xml index 34cde61252..4894ae01da 100644 --- a/indra/newview/skins/default/xui/en/panel_my_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_my_profile.xml @@ -1,7 +1,7 @@ @@ -384,7 +385,9 @@ height="23" label="Edit Appearance" left_pad="10" + layout="topleft" name="edit_appearance_btn" + top="5" tool_tip="Create/edit your appearance: physical data, clothes and etc." width="130" /> -- cgit v1.2.3 From 189329853b8d50da53f34dfa1cf42f49cc02df77 Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Fri, 22 Jan 2010 20:08:09 +0200 Subject: Fixed bug EXT-4582 ([BSI] "Report" from avatar inspector does not auto-populate "Abuser name" when Resident is not nearby). Added method LLFloaterReporter::showFromAvatar() to use for remote avatars. --HG-- branch : product-engine --- indra/newview/llfloaterreporter.cpp | 43 ++++++++++++++++++++++++++----------- indra/newview/llfloaterreporter.h | 4 ++++ indra/newview/llinspectavatar.cpp | 2 +- 3 files changed, 36 insertions(+), 13 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp index e0f2fca580..2efae0c8db 100644 --- a/indra/newview/llfloaterreporter.cpp +++ b/indra/newview/llfloaterreporter.cpp @@ -277,13 +277,8 @@ void LLFloaterReporter::getObjectInfo(const LLUUID& object_id) { object_owner.append("Unknown"); } - childSetText("object_name", object_owner); - std::string owner_link = - LLSLURL::buildCommand("agent", mObjectID, "inspect"); - childSetText("owner_name", owner_link); - childSetText("abuser_name_edit", object_owner); - mAbuserID = object_id; - mOwnerName = object_owner; + + setFromAvatar(object_id, object_owner); } else { @@ -305,7 +300,6 @@ void LLFloaterReporter::getObjectInfo(const LLUUID& object_id) } } - void LLFloaterReporter::onClickSelectAbuser() { gFloaterView->getParentFloater(this)->addDependentFloater(LLFloaterAvatarPicker::show(boost::bind(&LLFloaterReporter::callbackAvatarID, this, _1, _2), FALSE, TRUE )); @@ -323,6 +317,17 @@ void LLFloaterReporter::callbackAvatarID(const std::vector& names, } +void LLFloaterReporter::setFromAvatar(const LLUUID& avatar_id, const std::string& avatar_name) +{ + mAbuserID = mObjectID = avatar_id; + mOwnerName = avatar_name; + + std::string avatar_link = LLSLURL::buildCommand("agent", mObjectID, "inspect"); + childSetText("owner_name", avatar_link); + childSetText("object_name", avatar_name); // name + childSetText("abuser_name_edit", avatar_name); +} + // static void LLFloaterReporter::onClickSend(void *userdata) { @@ -458,9 +463,8 @@ void LLFloaterReporter::showFromMenu(EReportType report_type) } } - // static -void LLFloaterReporter::showFromObject(const LLUUID& object_id) +void LLFloaterReporter::show(const LLUUID& object_id, const std::string& avatar_name) { LLFloaterReporter* f = LLFloaterReg::showTypedInstance("reporter"); @@ -469,8 +473,11 @@ void LLFloaterReporter::showFromObject(const LLUUID& object_id) LLAgentUI::buildFullname(fullname); f->childSetText("reporter_field", fullname); - // Request info for this object - f->getObjectInfo(object_id); + if (avatar_name.empty()) + // Request info for this object + f->getObjectInfo(object_id); + else + f->setFromAvatar(object_id, avatar_name); // Need to deselect on close f->mDeselectOnClose = TRUE; @@ -479,6 +486,18 @@ void LLFloaterReporter::showFromObject(const LLUUID& object_id) } +// static +void LLFloaterReporter::showFromObject(const LLUUID& object_id) +{ + show(object_id); +} + +// static +void LLFloaterReporter::showFromAvatar(const LLUUID& avatar_id, const std::string avatar_name) +{ + show(avatar_id, avatar_name); +} + void LLFloaterReporter::setPickedObjectProperties(const std::string& object_name, const std::string& owner_name, const LLUUID owner_id) { childSetText("object_name", object_name); diff --git a/indra/newview/llfloaterreporter.h b/indra/newview/llfloaterreporter.h index cc2dfb2f98..7c6473f975 100644 --- a/indra/newview/llfloaterreporter.h +++ b/indra/newview/llfloaterreporter.h @@ -93,6 +93,7 @@ public: static void showFromMenu(EReportType report_type); static void showFromObject(const LLUUID& object_id); + static void showFromAvatar(const LLUUID& avatar_id, const std::string avatar_name); static void onClickSend (void *userdata); static void onClickCancel (void *userdata); @@ -109,6 +110,8 @@ public: void setPickedObjectProperties(const std::string& object_name, const std::string& owner_name, const LLUUID owner_id); private: + static void show(const LLUUID& object_id, const std::string& avatar_name = LLStringUtil::null); + void takeScreenshot(); void sendReportViaCaps(std::string url); void uploadImage(); @@ -121,6 +124,7 @@ private: void enableControls(BOOL own_avatar); void getObjectInfo(const LLUUID& object_id); void callbackAvatarID(const std::vector& names, const std::vector& ids); + void setFromAvatar(const LLUUID& avatar_id, const std::string& avatar_name = LLStringUtil::null); private: EReportType mReportType; diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp index 0374a1d25b..4b0539337b 100644 --- a/indra/newview/llinspectavatar.cpp +++ b/indra/newview/llinspectavatar.cpp @@ -689,7 +689,7 @@ void LLInspectAvatar::onToggleMute() void LLInspectAvatar::onClickReport() { - LLFloaterReporter::showFromObject(mAvatarID); + LLFloaterReporter::showFromAvatar(mAvatarID, mAvatarName); closeFloater(); } -- cgit v1.2.3 From 16b1af72b2c5f723a84f37b9278ff3f2bdc17e7d Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Fri, 22 Jan 2010 20:02:10 +0200 Subject: Fixed (EXT-4589) 'About Land' floater loose information after user quit Place Profile - Fixed Places panel not to remove parcel selection when it is used by "About Land" floater. --HG-- branch : product-engine --- indra/newview/llpanelplaceinfo.cpp | 19 ----- indra/newview/llpanelplaceinfo.h | 1 - indra/newview/llpanelplaceprofile.cpp | 19 +++++ indra/newview/llpanelplaceprofile.h | 2 + indra/newview/llpanelplaces.cpp | 154 ++++++++++++++++++++-------------- indra/newview/llpanelplaces.h | 2 + 6 files changed, 114 insertions(+), 83 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanelplaceinfo.cpp b/indra/newview/llpanelplaceinfo.cpp index b80eb9db38..3121aca05f 100644 --- a/indra/newview/llpanelplaceinfo.cpp +++ b/indra/newview/llpanelplaceinfo.cpp @@ -265,25 +265,6 @@ void LLPanelPlaceInfo::reshape(S32 width, S32 height, BOOL called_from_parent) } } -// virtual -void LLPanelPlaceInfo::handleVisibilityChange(BOOL new_visibility) -{ - LLPanel::handleVisibilityChange(new_visibility); - - LLViewerParcelMgr* parcel_mgr = LLViewerParcelMgr::getInstance(); - if (!parcel_mgr) - return; - - // Remove land selection when panel hides. - if (!new_visibility) - { - if (!parcel_mgr->selectionEmpty()) - { - parcel_mgr->deselectLand(); - } - } -} - void LLPanelPlaceInfo::createPick(const LLVector3d& pos_global, LLPanelPickEdit* pick_panel) { std::string region_name = mRegionName->getText(); diff --git a/indra/newview/llpanelplaceinfo.h b/indra/newview/llpanelplaceinfo.h index 7dfc7b2444..3091f7ed24 100644 --- a/indra/newview/llpanelplaceinfo.h +++ b/indra/newview/llpanelplaceinfo.h @@ -94,7 +94,6 @@ public: /*virtual*/ void processParcelInfo(const LLParcelData& parcel_data); /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); - /*virtual*/ void handleVisibilityChange (BOOL new_visibility); // Create a pick for the location specified // by global_pos. diff --git a/indra/newview/llpanelplaceprofile.cpp b/indra/newview/llpanelplaceprofile.cpp index 402d50ba9c..d892e2885b 100644 --- a/indra/newview/llpanelplaceprofile.cpp +++ b/indra/newview/llpanelplaceprofile.cpp @@ -257,6 +257,25 @@ void LLPanelPlaceProfile::processParcelInfo(const LLParcelData& parcel_data) } } +// virtual +void LLPanelPlaceProfile::handleVisibilityChange(BOOL new_visibility) +{ + LLPanel::handleVisibilityChange(new_visibility); + + LLViewerParcelMgr* parcel_mgr = LLViewerParcelMgr::getInstance(); + if (!parcel_mgr) + return; + + // Remove land selection when panel hides. + if (!new_visibility) + { + if (!parcel_mgr->selectionEmpty()) + { + parcel_mgr->deselectUnused(); + } + } +} + void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel, LLViewerRegion* region, const LLVector3d& pos_global, diff --git a/indra/newview/llpanelplaceprofile.h b/indra/newview/llpanelplaceprofile.h index 8c30ca92fb..8ca9526875 100644 --- a/indra/newview/llpanelplaceprofile.h +++ b/indra/newview/llpanelplaceprofile.h @@ -52,6 +52,8 @@ public: /*virtual*/ void processParcelInfo(const LLParcelData& parcel_data); + /*virtual*/ void handleVisibilityChange(BOOL new_visibility); + // Displays information about the currently selected parcel // without sending a request to the server. // If is_current_parcel true shows "You Are Here" banner. diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index b037674c37..306e08e7ec 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -289,89 +289,92 @@ BOOL LLPanelPlaces::postBuild() void LLPanelPlaces::onOpen(const LLSD& key) { - if(!mPlaceProfile || !mLandmarkInfo || key.size() == 0) + if (!mPlaceProfile || !mLandmarkInfo) return; - mFilterEditor->clear(); - onFilterEdit("", false); - - mPlaceInfoType = key["type"].asString(); - mPosGlobal.setZero(); - mItem = NULL; - isLandmarkEditModeOn = false; - togglePlaceInfoPanel(TRUE); - - if (mPlaceInfoType == AGENT_INFO_TYPE) - { - mPlaceProfile->setInfoType(LLPanelPlaceInfo::AGENT); - } - else if (mPlaceInfoType == CREATE_LANDMARK_INFO_TYPE) + if (key.size() != 0) { - mLandmarkInfo->setInfoType(LLPanelPlaceInfo::CREATE_LANDMARK); + mFilterEditor->clear(); + onFilterEdit("", false); - if (key.has("x") && key.has("y") && key.has("z")) + mPlaceInfoType = key["type"].asString(); + mPosGlobal.setZero(); + mItem = NULL; + isLandmarkEditModeOn = false; + togglePlaceInfoPanel(TRUE); + + if (mPlaceInfoType == AGENT_INFO_TYPE) { - mPosGlobal = LLVector3d(key["x"].asReal(), - key["y"].asReal(), - key["z"].asReal()); + mPlaceProfile->setInfoType(LLPanelPlaceInfo::AGENT); } - else + else if (mPlaceInfoType == CREATE_LANDMARK_INFO_TYPE) { - mPosGlobal = gAgent.getPositionGlobal(); - } - - mLandmarkInfo->displayParcelInfo(LLUUID(), mPosGlobal); + mLandmarkInfo->setInfoType(LLPanelPlaceInfo::CREATE_LANDMARK); - // Disable Save button because there is no item to save yet. - // The button will be enabled in onLandmarkLoaded callback. - mSaveBtn->setEnabled(FALSE); - } - else if (mPlaceInfoType == LANDMARK_INFO_TYPE) - { - mLandmarkInfo->setInfoType(LLPanelPlaceInfo::LANDMARK); + if (key.has("x") && key.has("y") && key.has("z")) + { + mPosGlobal = LLVector3d(key["x"].asReal(), + key["y"].asReal(), + key["z"].asReal()); + } + else + { + mPosGlobal = gAgent.getPositionGlobal(); + } - LLInventoryItem* item = gInventory.getItem(key["id"].asUUID()); - if (!item) - return; + mLandmarkInfo->displayParcelInfo(LLUUID(), mPosGlobal); - setItem(item); - } - else if (mPlaceInfoType == REMOTE_PLACE_INFO_TYPE) - { - if (key.has("id")) + // Disable Save button because there is no item to save yet. + // The button will be enabled in onLandmarkLoaded callback. + mSaveBtn->setEnabled(FALSE); + } + else if (mPlaceInfoType == LANDMARK_INFO_TYPE) { - LLUUID parcel_id = key["id"].asUUID(); - mPlaceProfile->setParcelID(parcel_id); + mLandmarkInfo->setInfoType(LLPanelPlaceInfo::LANDMARK); - // query the server to get the global 3D position of this - // parcel - we need this for teleport/mapping functions. - mRemoteParcelObserver->setParcelID(parcel_id); + LLInventoryItem* item = gInventory.getItem(key["id"].asUUID()); + if (!item) + return; + + setItem(item); } - else + else if (mPlaceInfoType == REMOTE_PLACE_INFO_TYPE) { - mPosGlobal = LLVector3d(key["x"].asReal(), - key["y"].asReal(), - key["z"].asReal()); - mPlaceProfile->displayParcelInfo(LLUUID(), mPosGlobal); + if (key.has("id")) + { + LLUUID parcel_id = key["id"].asUUID(); + mPlaceProfile->setParcelID(parcel_id); + + // query the server to get the global 3D position of this + // parcel - we need this for teleport/mapping functions. + mRemoteParcelObserver->setParcelID(parcel_id); + } + else + { + mPosGlobal = LLVector3d(key["x"].asReal(), + key["y"].asReal(), + key["z"].asReal()); + mPlaceProfile->displayParcelInfo(LLUUID(), mPosGlobal); + } + + mPlaceProfile->setInfoType(LLPanelPlaceInfo::PLACE); } + else if (mPlaceInfoType == TELEPORT_HISTORY_INFO_TYPE) + { + S32 index = key["id"].asInteger(); - mPlaceProfile->setInfoType(LLPanelPlaceInfo::PLACE); - } - else if (mPlaceInfoType == TELEPORT_HISTORY_INFO_TYPE) - { - S32 index = key["id"].asInteger(); + const LLTeleportHistoryStorage::slurl_list_t& hist_items = + LLTeleportHistoryStorage::getInstance()->getItems(); - const LLTeleportHistoryStorage::slurl_list_t& hist_items = - LLTeleportHistoryStorage::getInstance()->getItems(); + mPosGlobal = hist_items[index].mGlobalPos; - mPosGlobal = hist_items[index].mGlobalPos; + mPlaceProfile->setInfoType(LLPanelPlaceInfo::TELEPORT_HISTORY); + mPlaceProfile->displayParcelInfo(LLUUID(), mPosGlobal); + } - mPlaceProfile->setInfoType(LLPanelPlaceInfo::TELEPORT_HISTORY); - mPlaceProfile->displayParcelInfo(LLUUID(), mPosGlobal); + updateVerbs(); } - updateVerbs(); - LLViewerParcelMgr* parcel_mgr = LLViewerParcelMgr::getInstance(); if (!parcel_mgr) return; @@ -388,9 +391,12 @@ void LLPanelPlaces::onOpen(const LLSD& key) { parcel_mgr->removeObserver(mParcelObserver); + // Clear the reference to selection to allow its removal in deselectUnused(). + mParcel.clear(); + if (!parcel_mgr->selectionEmpty()) { - parcel_mgr->deselectLand(); + parcel_mgr->deselectUnused(); } } } @@ -826,6 +832,14 @@ void LLPanelPlaces::togglePlaceInfoPanel(BOOL visible) mLandmarkInfo->setVisible(FALSE); } + else if (mPlaceInfoType == AGENT_INFO_TYPE) + { + LLViewerParcelMgr::getInstance()->removeObserver(mParcelObserver); + + // Clear reference to parcel selection when closing place profile panel. + // LLViewerParcelMgr removes the selection if it has 1 reference to it. + mParcel.clear(); + } } else if (mPlaceInfoType == CREATE_LANDMARK_INFO_TYPE || mPlaceInfoType == LANDMARK_INFO_TYPE) @@ -858,6 +872,20 @@ void LLPanelPlaces::togglePlaceInfoPanel(BOOL visible) } } +// virtual +void LLPanelPlaces::handleVisibilityChange(BOOL new_visibility) +{ + LLPanel::handleVisibilityChange(new_visibility); + + if (!new_visibility && mPlaceInfoType == AGENT_INFO_TYPE) + { + LLViewerParcelMgr::getInstance()->removeObserver(mParcelObserver); + + // Clear reference to parcel selection when closing places panel. + mParcel.clear(); + } +} + void LLPanelPlaces::changedParcelSelection() { if (!mPlaceProfile) diff --git a/indra/newview/llpanelplaces.h b/indra/newview/llpanelplaces.h index 27b5911ebb..0eba7f3afc 100644 --- a/indra/newview/llpanelplaces.h +++ b/indra/newview/llpanelplaces.h @@ -97,6 +97,8 @@ private: void togglePickPanel(BOOL visible); void togglePlaceInfoPanel(BOOL visible); + /*virtual*/ void handleVisibilityChange(BOOL new_visibility); + void updateVerbs(); LLPanelPlaceInfo* getCurrentInfoPanel(); -- cgit v1.2.3 From 09e9cdeb2e7e979ea1d4898fa7c2d40e8ebc52b2 Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Fri, 22 Jan 2010 20:20:11 +0200 Subject: No ticket, Includes cleanup. Spaces cleanup. --HG-- branch : product-engine --- indra/newview/llpanelplaceinfo.cpp | 8 +------- indra/newview/llpanelplaces.cpp | 34 +++++++++++++++++----------------- 2 files changed, 18 insertions(+), 24 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanelplaceinfo.cpp b/indra/newview/llpanelplaceinfo.cpp index 3121aca05f..0c10f11bfc 100644 --- a/indra/newview/llpanelplaceinfo.cpp +++ b/indra/newview/llpanelplaceinfo.cpp @@ -34,26 +34,20 @@ #include "llpanelplaceinfo.h" -#include "roles_constants.h" #include "llsdutil.h" -#include "llsecondlifeurls.h" #include "llsdutil_math.h" + #include "llregionhandle.h" -#include "message.h" #include "lliconctrl.h" #include "lltextbox.h" #include "llagent.h" -#include "llavatarpropertiesprocessor.h" #include "llexpandabletextbox.h" #include "llpanelpick.h" #include "lltexturectrl.h" -#include "llviewerinventory.h" -#include "llviewerparcelmgr.h" #include "llviewerregion.h" -#include "llviewertexteditor.h" LLPanelPlaceInfo::LLPanelPlaceInfo() : LLPanel(), diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index 306e08e7ec..a4f0e55a93 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -771,23 +771,23 @@ void LLPanelPlaces::onOverflowMenuItemClicked(const LLSD& param) mPickPanel->reshape(rect.getWidth(), rect.getHeight()); mPickPanel->setRect(rect); } - else if (item == "add_to_favbar") - { - if ( mItem.notNull() ) - { - const LLUUID& favorites_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE); - if ( favorites_id.notNull() ) - { - copy_inventory_item(gAgent.getID(), - mItem->getPermissions().getOwner(), - mItem->getUUID(), - favorites_id, - std::string(), - LLPointer(NULL)); - llinfos << "Copied inventory item #" << mItem->getUUID() << " to favorites." << llendl; - } - } - } + else if (item == "add_to_favbar") + { + if ( mItem.notNull() ) + { + const LLUUID& favorites_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE); + if ( favorites_id.notNull() ) + { + copy_inventory_item(gAgent.getID(), + mItem->getPermissions().getOwner(), + mItem->getUUID(), + favorites_id, + std::string(), + LLPointer(NULL)); + llinfos << "Copied inventory item #" << mItem->getUUID() << " to favorites." << llendl; + } + } + } } void LLPanelPlaces::onBackButtonClicked() -- cgit v1.2.3 From 0283837e56e69c8a6757d8366b82065e04ae966b Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Fri, 22 Jan 2010 14:44:32 -0500 Subject: EXT-4492 : Deleting gestures from the wearing tab causes the viewer to crash EXT-4660 : Can delete a bodypart from the COF through inventory view or WEARING tab delete key EXT-4662 : remove leading separator from COF right-click menu EXT-4633 : AppearanceSP trash button doesn't update enabled state correctly Bunch of UI fixes related to the trash/delete functionality in InventoryFloater/SP and AppearanceSP "WEARING" tab. The main idea is that we don't want to allow deletion of bodyparts and folder links from the COF by the user. --- indra/newview/llappearancemgr.cpp | 22 +++++++++++- indra/newview/llappearancemgr.h | 10 +++++- indra/newview/llinventorybridge.cpp | 19 +++++----- indra/newview/llinventorypanel.cpp | 8 +++++ indra/newview/llinventorypanel.h | 2 +- indra/newview/llpaneloutfitsinventory.cpp | 40 +++++++++++----------- indra/newview/llpaneloutfitsinventory.h | 24 +++++++------ .../default/xui/en/panel_outfits_inventory.xml | 2 +- 8 files changed, 83 insertions(+), 44 deletions(-) (limited to 'indra') diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 748d8bdfbf..0ff839849f 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -358,7 +358,7 @@ static void onWearableAssetFetch(LLWearable* wearable, void* data) } } -LLUUID LLAppearanceManager::getCOF() +const LLUUID LLAppearanceManager::getCOF() const { return gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT); } @@ -1263,3 +1263,23 @@ void LLAppearanceManager::linkRegisteredAttachments() } mRegisteredAttachments.clear(); } + +BOOL LLAppearanceManager::getIsInCOF(const LLUUID& obj_id) const +{ + return gInventory.isObjectDescendentOf(obj_id, getCOF()); +} + +BOOL LLAppearanceManager::getIsProtectedCOFItem(const LLUUID& obj_id) const +{ + if (!getIsInCOF(obj_id)) return FALSE; + const LLInventoryObject *obj = gInventory.getObject(obj_id); + if (!obj) return FALSE; + + // Can't delete bodyparts, since this would be equivalent to removing the item. + if (obj->getType() == LLAssetType::AT_BODYPART) return TRUE; + + // Can't delete the folder link, since this is saved for bookkeeping. + if (obj->getActualType() == LLAssetType::AT_LINK_FOLDER) return TRUE; + + return FALSE; +} diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index 20745b70e4..0093d30817 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -59,7 +59,7 @@ public: LLPointer cb); // Find the Current Outfit folder. - LLUUID getCOF(); + const LLUUID getCOF() const; // Finds the folder link to the currently worn outfit const LLViewerInventoryItem *getBaseOutfitLink(); @@ -132,6 +132,14 @@ private: std::set mRegisteredAttachments; bool mAttachmentInvLinkEnabled; bool mOutfitIsDirty; + + ////////////////////////////////////////////////////////////////////////////////// + // Item-specific convenience functions +public: + // Is this in the COF? + BOOL getIsInCOF(const LLUUID& obj_id) const; + // Is this in the COF and can the user delete it from the COF? + BOOL getIsProtectedCOFItem(const LLUUID& obj_id) const; }; #define SUPPORT_ENSEMBLES 0 diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index df089cb0f9..a7ce111b18 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -185,6 +185,11 @@ BOOL LLInvFVBridge::isItemRemovable() { return FALSE; } + if (LLAppearanceManager::instance().getIsProtectedCOFItem(mUUID)) + { + return FALSE; + } + const LLInventoryObject *obj = model->getItem(mUUID); if (obj && obj->getIsLinkType()) { @@ -712,14 +717,7 @@ BOOL LLInvFVBridge::isAgentInventory() const BOOL LLInvFVBridge::isCOFFolder() const { - const LLInventoryModel* model = getInventoryModel(); - if(!model) return TRUE; - const LLUUID cof_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT); - if (mUUID == cof_id || model->isObjectDescendentOf(mUUID, cof_id)) - { - return TRUE; - } - return FALSE; + return LLAppearanceManager::instance().getIsInCOF(mUUID); } BOOL LLInvFVBridge::isItemPermissive() const @@ -4622,7 +4620,10 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags) getClipboardEntries(true, items, disabled_items, flags); - items.push_back(std::string("Wearable Separator")); + if (!is_sidepanel) + { + items.push_back(std::string("Wearable Separator")); + } items.push_back(std::string("Wearable Edit")); diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 9141d50829..7e71ac90b4 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -682,6 +682,14 @@ void LLInventoryPanel::setSelection(const LLUUID& obj_id, BOOL take_keyboard_foc mFolders->setSelectionByID(obj_id, take_keyboard_focus); } +void LLInventoryPanel::setSelectCallback(const LLFolderView::signal_t::slot_type& cb) +{ + if (mFolders) + { + mFolders->setSelectCallback(cb); + } +} + void LLInventoryPanel::clearSelection() { mFolders->clearSelection(); diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h index 09533b52f1..ccff795a51 100644 --- a/indra/newview/llinventorypanel.h +++ b/indra/newview/llinventorypanel.h @@ -123,7 +123,7 @@ public: // Call this method to set the selection. void openAllFolders(); void setSelection(const LLUUID& obj_id, BOOL take_keyboard_focus); - void setSelectCallback(const LLFolderView::signal_t::slot_type& cb) { if (mFolders) mFolders->setSelectCallback(cb); } + void setSelectCallback(const LLFolderView::signal_t::slot_type& cb); void clearSelection(); LLInventoryFilter* getFilter(); void setFilterTypes(U64 filter, LLInventoryFilter::EFilterType = LLInventoryFilter::FILTERTYPE_OBJECT); diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index fd5ce7a46d..cf903958ee 100644 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -61,6 +61,9 @@ #include "llviewercontrol.h" +static const std::string OUTFITS_TAB_NAME = "outfitslist_tab"; +static const std::string COF_TAB_NAME = "cof_tab"; + static LLRegisterPanelClassWrapper t_inventory("panel_outfits_inventory"); bool LLPanelOutfitsInventory::sShowDebugEditor = false; @@ -267,7 +270,7 @@ void LLPanelOutfitsInventory::onSaveCommit(const std::string& outfit_name) if (mAppearanceTabs) { - mAppearanceTabs->selectTabByName("outfitslist_tab"); + mAppearanceTabs->selectTabByName(OUTFITS_TAB_NAME); } } @@ -503,8 +506,7 @@ BOOL LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata) if (command_name == "wear") { - const BOOL is_my_outfits = (mActivePanel->getName() == "outfitslist_tab"); - if (!is_my_outfits) + if (isCOFPanelActive()) { return FALSE; } @@ -558,17 +560,15 @@ bool LLPanelOutfitsInventory::handleDragAndDropToTrash(BOOL drop, EDragAndDropTy void LLPanelOutfitsInventory::initTabPanels() { - mTabPanels.resize(2); - - LLInventoryPanel *cof_panel = getChild("cof_tab"); + LLInventoryPanel *cof_panel = getChild(COF_TAB_NAME); cof_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); - mTabPanels[0] = cof_panel; - - LLInventoryPanel *myoutfits_panel = getChild("outfitslist_tab"); + mTabPanels.push_back(cof_panel); + + LLInventoryPanel *myoutfits_panel = getChild(OUTFITS_TAB_NAME); myoutfits_panel->setFilterTypes(1LL << LLFolderType::FT_OUTFIT, LLInventoryFilter::FILTERTYPE_CATEGORY); myoutfits_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); - mTabPanels[1] = myoutfits_panel; - + mTabPanels.push_back(myoutfits_panel); + for (tabpanels_vec_t::iterator iter = mTabPanels.begin(); iter != mTabPanels.end(); ++iter) @@ -615,19 +615,19 @@ void LLPanelOutfitsInventory::onTabChange() updateVerbs(); } -LLInventoryPanel* LLPanelOutfitsInventory::getActivePanel() -{ - return mActivePanel; -} - -bool LLPanelOutfitsInventory::isTabPanel(LLInventoryPanel *panel) +BOOL LLPanelOutfitsInventory::isTabPanel(LLInventoryPanel *panel) const { - for(tabpanels_vec_t::iterator it = mTabPanels.begin(); + for(tabpanels_vec_t::const_iterator it = mTabPanels.begin(); it != mTabPanels.end(); ++it) { if (*it == panel) - return true; + return TRUE; } - return false; + return FALSE; +} + +BOOL LLPanelOutfitsInventory::isCOFPanelActive() const +{ + return (getActivePanel()->getName() == COF_TAB_NAME); } diff --git a/indra/newview/llpaneloutfitsinventory.h b/indra/newview/llpaneloutfitsinventory.h index 76110e2a3f..ab25ef0a49 100644 --- a/indra/newview/llpaneloutfitsinventory.h +++ b/indra/newview/llpaneloutfitsinventory.h @@ -78,24 +78,26 @@ protected: bool getIsCorrectType(const LLFolderViewEventListener *listenerp) const; private: - LLSidepanelAppearance* mParent; - LLSaveFolderState* mSavedFolderState; - LLTabContainer* mAppearanceTabs; - std::string mFilterSubString; + LLSidepanelAppearance* mParent; + LLSaveFolderState* mSavedFolderState; + LLTabContainer* mAppearanceTabs; + std::string mFilterSubString; public: ////////////////////////////////////////////////////////////////////////////////// // tab panels - LLInventoryPanel* getActivePanel(); - bool isTabPanel(LLInventoryPanel *panel); + LLInventoryPanel* getActivePanel() { return mActivePanel; } + const LLInventoryPanel* getActivePanel() const { return mActivePanel; } + BOOL isTabPanel(LLInventoryPanel *panel) const; protected: - void initTabPanels(); - void onTabSelectionChange(LLInventoryPanel* tab_panel, const std::deque &items, BOOL user_action); - void onTabChange(); - + void initTabPanels(); + void onTabSelectionChange(LLInventoryPanel* tab_panel, const std::deque &items, BOOL user_action); + void onTabChange(); + BOOL isCOFPanelActive() const; + private: - LLInventoryPanel* mActivePanel; + LLInventoryPanel* mActivePanel; typedef std::vector tabpanels_vec_t; tabpanels_vec_t mTabPanels; diff --git a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml index 8895484326..710ca733e0 100644 --- a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml @@ -45,7 +45,7 @@ left="0" top="0" mouse_opaque="true" - name="cof_accordionpanel" + name="cof_tab" start_folder="Current Outfit" width="313" /> -- cgit v1.2.3 From 1f896d2d58d9c150d3981f253e81898afa999c2c Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Fri, 22 Jan 2010 14:54:28 -0500 Subject: EXT-4654 : FolderDictionary assert on importFile Took out spurious assert; this should be a llwarns instead, and we should be warning when an illegal folder entry is created. --- indra/llcommon/lldictionary.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/llcommon/lldictionary.h b/indra/llcommon/lldictionary.h index 95178b41e7..8c86a8560e 100644 --- a/indra/llcommon/lldictionary.h +++ b/indra/llcommon/lldictionary.h @@ -76,7 +76,7 @@ public: return dictionary_iter->first; } } - llassert(false); + llwarns << "Lookup on " << name << " failed" << llendl; return Index(-1); } -- cgit v1.2.3 From c66053220183d120134734510b416bb02c3ea80f Mon Sep 17 00:00:00 2001 From: Ramzi Linden Date: Fri, 22 Jan 2010 12:39:45 -0800 Subject: DEV-43688 fix a couple of formatting issues on strings in the localized languages related to Localization Cycle 2. --- indra/newview/skins/default/xui/da/floater_about.xml | 2 +- indra/newview/skins/default/xui/de/floater_about.xml | 2 +- indra/newview/skins/default/xui/de/panel_edit_profile.xml | 2 +- indra/newview/skins/default/xui/es/floater_about.xml | 2 +- indra/newview/skins/default/xui/fr/floater_about.xml | 2 +- indra/newview/skins/default/xui/fr/panel_edit_profile.xml | 4 ++-- indra/newview/skins/default/xui/it/floater_about.xml | 2 +- indra/newview/skins/default/xui/ja/floater_about.xml | 2 +- indra/newview/skins/default/xui/ja/panel_edit_profile.xml | 2 +- indra/newview/skins/default/xui/nl/floater_about.xml | 2 +- indra/newview/skins/default/xui/pl/floater_about.xml | 2 +- indra/newview/skins/default/xui/pt/floater_about.xml | 2 +- 12 files changed, 13 insertions(+), 13 deletions(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/da/floater_about.xml b/indra/newview/skins/default/xui/da/floater_about.xml index faa24b5877..eb63b5c975 100644 --- a/indra/newview/skins/default/xui/da/floater_about.xml +++ b/indra/newview/skins/default/xui/da/floater_about.xml @@ -1,5 +1,5 @@ - + [APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2] ([VIEWER_VERSION_3]) [BUILD_DATE] [BUILD_TIME] ([CHANNEL]) [[VIEWER_RELEASE_NOTES_URL] [ReleaseNotes]] diff --git a/indra/newview/skins/default/xui/de/floater_about.xml b/indra/newview/skins/default/xui/de/floater_about.xml index 664c6e3072..0beb54032f 100644 --- a/indra/newview/skins/default/xui/de/floater_about.xml +++ b/indra/newview/skins/default/xui/de/floater_about.xml @@ -1,5 +1,5 @@ - + [APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2] ([VIEWER_VERSION_3]) [BUILD_DATE] [BUILD_TIME] ([CHANNEL]) [[VIEWER_RELEASE_NOTES_URL] [ReleaseNotes]] diff --git a/indra/newview/skins/default/xui/de/panel_edit_profile.xml b/indra/newview/skins/default/xui/de/panel_edit_profile.xml index 1c53ca64dd..811ca118d6 100644 --- a/indra/newview/skins/default/xui/de/panel_edit_profile.xml +++ b/indra/newview/skins/default/xui/de/panel_edit_profile.xml @@ -39,7 +39,7 @@ - + diff --git a/indra/newview/skins/default/xui/es/floater_about.xml b/indra/newview/skins/default/xui/es/floater_about.xml index 5545ab29e0..e8e38316f9 100644 --- a/indra/newview/skins/default/xui/es/floater_about.xml +++ b/indra/newview/skins/default/xui/es/floater_about.xml @@ -1,5 +1,5 @@ - + diff --git a/indra/newview/skins/default/xui/fr/floater_about.xml b/indra/newview/skins/default/xui/fr/floater_about.xml index 33299f4cd4..7d6d736c5e 100644 --- a/indra/newview/skins/default/xui/fr/floater_about.xml +++ b/indra/newview/skins/default/xui/fr/floater_about.xml @@ -1,5 +1,5 @@ - + [APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2] ([VIEWER_VERSION_3]) [BUILD_DATE] [BUILD_TIME] ([CHANNEL]) [[VIEWER_RELEASE_NOTES_URL] [ReleaseNotes]] diff --git a/indra/newview/skins/default/xui/fr/panel_edit_profile.xml b/indra/newview/skins/default/xui/fr/panel_edit_profile.xml index b8ab805b13..a4771db91b 100644 --- a/indra/newview/skins/default/xui/fr/panel_edit_profile.xml +++ b/indra/newview/skins/default/xui/fr/panel_edit_profile.xml @@ -39,10 +39,10 @@ - + - + diff --git a/indra/newview/skins/default/xui/it/floater_about.xml b/indra/newview/skins/default/xui/it/floater_about.xml index a5aff9d486..f80f810dba 100644 --- a/indra/newview/skins/default/xui/it/floater_about.xml +++ b/indra/newview/skins/default/xui/it/floater_about.xml @@ -1,5 +1,5 @@ - + diff --git a/indra/newview/skins/default/xui/ja/floater_about.xml b/indra/newview/skins/default/xui/ja/floater_about.xml index bab805dbd2..0fa20ab1ac 100644 --- a/indra/newview/skins/default/xui/ja/floater_about.xml +++ b/indra/newview/skins/default/xui/ja/floater_about.xml @@ -1,5 +1,5 @@ - + [APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2] ([VIEWER_VERSION_3]) [BUILD_DATE] [BUILD_TIME] ([CHANNEL]) [[VIEWER_RELEASE_NOTES_URL] [ReleaseNotes]] diff --git a/indra/newview/skins/default/xui/ja/panel_edit_profile.xml b/indra/newview/skins/default/xui/ja/panel_edit_profile.xml index 8af0802ac2..b232a8db61 100644 --- a/indra/newview/skins/default/xui/ja/panel_edit_profile.xml +++ b/indra/newview/skins/default/xui/ja/panel_edit_profile.xml @@ -39,7 +39,7 @@ - + diff --git a/indra/newview/skins/default/xui/nl/floater_about.xml b/indra/newview/skins/default/xui/nl/floater_about.xml index 0c57a22be1..10c30eb361 100644 --- a/indra/newview/skins/default/xui/nl/floater_about.xml +++ b/indra/newview/skins/default/xui/nl/floater_about.xml @@ -1,5 +1,5 @@ - + diff --git a/indra/newview/skins/default/xui/pl/floater_about.xml b/indra/newview/skins/default/xui/pl/floater_about.xml index 0f100b9d83..f59630edc7 100755 --- a/indra/newview/skins/default/xui/pl/floater_about.xml +++ b/indra/newview/skins/default/xui/pl/floater_about.xml @@ -1,5 +1,5 @@ - + diff --git a/indra/newview/skins/default/xui/pt/floater_about.xml b/indra/newview/skins/default/xui/pt/floater_about.xml index 9c19b12893..704e2f4107 100644 --- a/indra/newview/skins/default/xui/pt/floater_about.xml +++ b/indra/newview/skins/default/xui/pt/floater_about.xml @@ -1,5 +1,5 @@ - + -- cgit v1.2.3 From 420430b8f59902a65cd1847ea8b596f82a283e6a Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Fri, 22 Jan 2010 14:00:34 -0800 Subject: PARTIAL FIX EXT-3491: only bring up "external browser"notification if target is external or pref is set Review #86 This changes the logic to bring up the notification "Do you want to open your Web browser to view this content?" only if either the target is _external, or the user pref says to. Otherwise it avoids the notification. --- indra/newview/llmediactrl.cpp | 109 ++++++++++++++++++++++-------------------- indra/newview/llmediactrl.h | 1 + 2 files changed, 59 insertions(+), 51 deletions(-) (limited to 'indra') diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index 87ebce1d34..d464862eed 100644 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -869,38 +869,6 @@ void LLMediaCtrl::convertInputCoords(S32& x, S32& y) }; } -//////////////////////////////////////////////////////////////////////////////// -// static -bool LLMediaCtrl::onClickLinkExternalTarget(const LLSD& notification, const LLSD& response ) -{ - S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - if ( 0 == option ) - { - LLSD payload = notification["payload"]; - std::string url = payload["url"].asString(); - S32 target_type = payload["target_type"].asInteger(); - - switch (target_type) - { - case LLPluginClassMedia::TARGET_EXTERNAL: - // load target in an external browser - LLWeb::loadURLExternal(url); - break; - - case LLPluginClassMedia::TARGET_BLANK: - // load target in the user's preferred browser - LLWeb::loadURL(url); - break; - - default: - // unsupported link target - shouldn't happen - LL_WARNS("LinkTarget") << "Unsupported link target type" << LL_ENDL; - break; - } - } - return false; -} - //////////////////////////////////////////////////////////////////////////////// // inherited from LLViewerMediaObserver //virtual @@ -1014,43 +982,82 @@ void LLMediaCtrl::onClickLinkHref( LLPluginClassMedia* self ) U32 target_type = self->getClickTargetType(); // is there is a target specified for the link? - if (target_type == LLPluginClassMedia::TARGET_EXTERNAL || - target_type == LLPluginClassMedia::TARGET_BLANK) + if (gSavedSettings.getBOOL("UseExternalBrowser") || target_type == LLPluginClassMedia::TARGET_EXTERNAL) { LLSD payload; payload["url"] = url; payload["target_type"] = LLSD::Integer(target_type); LLNotificationsUtil::add( "WebLaunchExternalTarget", LLSD(), payload, onClickLinkExternalTarget); - return; } - - const std::string protocol1( "http://" ); - const std::string protocol2( "https://" ); - if( mOpenLinksInExternalBrowser ) + else if (target_type == LLPluginClassMedia::TARGET_BLANK) { - if ( !url.empty() ) + clickLinkWithTarget(url, target_type); + } + else { + const std::string protocol1( "http://" ); + const std::string protocol2( "https://" ); + if( mOpenLinksInExternalBrowser ) { - if ( LLStringUtil::compareInsensitive( url.substr( 0, protocol1.length() ), protocol1 ) == 0 || - LLStringUtil::compareInsensitive( url.substr( 0, protocol2.length() ), protocol2 ) == 0 ) + if ( !url.empty() ) { - LLWeb::loadURLExternal( url ); + if ( LLStringUtil::compareInsensitive( url.substr( 0, protocol1.length() ), protocol1 ) == 0 || + LLStringUtil::compareInsensitive( url.substr( 0, protocol2.length() ), protocol2 ) == 0 ) + { + LLWeb::loadURLExternal( url ); + } } } - } - else - if( mOpenLinksInInternalBrowser ) - { - if ( !url.empty() ) + else + if( mOpenLinksInInternalBrowser ) { - if ( LLStringUtil::compareInsensitive( url.substr( 0, protocol1.length() ), protocol1 ) == 0 || - LLStringUtil::compareInsensitive( url.substr( 0, protocol2.length() ), protocol2 ) == 0 ) + if ( !url.empty() ) { - llwarns << "Dead, unimplemented path that we used to send to the built-in browser long ago." << llendl; + if ( LLStringUtil::compareInsensitive( url.substr( 0, protocol1.length() ), protocol1 ) == 0 || + LLStringUtil::compareInsensitive( url.substr( 0, protocol2.length() ), protocol2 ) == 0 ) + { + llwarns << "Dead, unimplemented path that we used to send to the built-in browser long ago." << llendl; + } } } } } +//////////////////////////////////////////////////////////////////////////////// +// static +bool LLMediaCtrl::onClickLinkExternalTarget(const LLSD& notification, const LLSD& response ) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + if ( 0 == option ) + { + LLSD payload = notification["payload"]; + std::string url = payload["url"].asString(); + S32 target_type = payload["target_type"].asInteger(); + clickLinkWithTarget(url, target_type); + } + return false; +} + + +//////////////////////////////////////////////////////////////////////////////// +// static +void LLMediaCtrl::clickLinkWithTarget(const std::string& url, const S32& target_type ) +{ + if (gSavedSettings.getBOOL("UseExternalBrowser") || target_type == LLPluginClassMedia::TARGET_EXTERNAL) + { + // load target in an external browser + LLWeb::loadURLExternal(url); + } + else if (target_type == LLPluginClassMedia::TARGET_BLANK) + { + // load target in the user's preferred browser + LLWeb::loadURL(url); + } + else { + // unsupported link target - shouldn't happen + LL_WARNS("LinkTarget") << "Unsupported link target type" << LL_ENDL; + } +} + //////////////////////////////////////////////////////////////////////////////// // void LLMediaCtrl::onClickLinkNoFollow( LLPluginClassMedia* self ) diff --git a/indra/newview/llmediactrl.h b/indra/newview/llmediactrl.h index b0aca3cfa4..60e0c4073b 100644 --- a/indra/newview/llmediactrl.h +++ b/indra/newview/llmediactrl.h @@ -172,6 +172,7 @@ public: private: void onVisibilityChange ( const LLSD& new_visibility ); static bool onClickLinkExternalTarget( const LLSD&, const LLSD& ); + static void clickLinkWithTarget(const std::string& url, const S32& target_type ); const S32 mTextureDepthBytes; LLUUID mMediaTextureID; -- cgit v1.2.3 From 5a83247f038e327465bf88127f60750306507ed3 Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Fri, 22 Jan 2010 14:03:13 -0800 Subject: Fix assert in lldictionary as used by llfoldertype Review #88 This assert might be valid in general, but LLFolderType has a valid reason for getting "not found" --- indra/llcommon/lldictionary.h | 9 +++++++-- indra/llcommon/llfoldertype.cpp | 5 +++++ 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/llcommon/lldictionary.h b/indra/llcommon/lldictionary.h index 95178b41e7..4a2bfb9f3f 100644 --- a/indra/llcommon/lldictionary.h +++ b/indra/llcommon/lldictionary.h @@ -76,11 +76,16 @@ public: return dictionary_iter->first; } } - llassert(false); - return Index(-1); + return notFound(); } protected: + virtual Index notFound() const + { + // default is to assert + llassert(false); + return Index(-1); + } void addEntry(Index index, Entry *entry) { if (lookup(index)) diff --git a/indra/llcommon/llfoldertype.cpp b/indra/llcommon/llfoldertype.cpp index 079e670b1a..2610fe9e6a 100644 --- a/indra/llcommon/llfoldertype.cpp +++ b/indra/llcommon/llfoldertype.cpp @@ -59,6 +59,11 @@ class LLFolderDictionary : public LLSingleton, { public: LLFolderDictionary(); +protected: + virtual LLFolderType::EType notFound() const + { + return LLFolderType::FT_NONE; + } }; LLFolderDictionary::LLFolderDictionary() -- cgit v1.2.3