From f5e1ba26b7d9890e0735a22c875e0040bb504f3c Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 14 Dec 2016 17:24:26 +0200 Subject: MAINT-6899 Viewer should use fixed buttons instead of a scroll list for tabs in Appearance floater --- indra/llui/lltabcontainer.cpp | 16 +++++++++------- indra/llui/lltabcontainer.h | 2 ++ .../skins/default/xui/en/panel_outfits_inventory.xml | 1 + 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp index 701a06a085..1b2f09cff5 100644 --- a/indra/llui/lltabcontainer.cpp +++ b/indra/llui/lltabcontainer.cpp @@ -210,6 +210,7 @@ LLTabContainer::Params::Params() label_pad_left("label_pad_left"), tab_position("tab_position"), hide_tabs("hide_tabs", false), + hide_scroll_arrows("hide_scroll_arrows", false), tab_padding_right("tab_padding_right"), first_tab("first_tab"), middle_tab("middle_tab"), @@ -240,6 +241,7 @@ LLTabContainer::LLTabContainer(const LLTabContainer::Params& p) mPrevArrowBtn(NULL), mNextArrowBtn(NULL), mIsVertical( p.tab_position == LEFT ), + mHideScrollArrows(p.hide_scroll_arrows), // Horizontal Specific mJumpPrevArrowBtn(NULL), mJumpNextArrowBtn(NULL), @@ -409,7 +411,7 @@ void LLTabContainer::draw() setScrollPosPixels((S32)lerp((F32)getScrollPosPixels(), (F32)target_pixel_scroll, LLSmoothInterpolation::getInterpolant(0.08f))); - BOOL has_scroll_arrows = !getTabsHidden() && ((mMaxScrollPos > 0) || (mScrollPosPixels > 0)); + BOOL has_scroll_arrows = !mHideScrollArrows && !getTabsHidden() && ((mMaxScrollPos > 0) || (mScrollPosPixels > 0)); if (!mIsVertical) { mJumpPrevArrowBtn->setVisible( has_scroll_arrows ); @@ -517,7 +519,7 @@ BOOL LLTabContainer::handleMouseDown( S32 x, S32 y, MASK mask ) { static LLUICachedControl tabcntrv_pad ("UITabCntrvPad", 0); BOOL handled = FALSE; - BOOL has_scroll_arrows = (getMaxScrollPos() > 0) && !getTabsHidden(); + BOOL has_scroll_arrows = !mHideScrollArrows && (getMaxScrollPos() > 0) && !getTabsHidden(); if (has_scroll_arrows) { @@ -591,7 +593,7 @@ BOOL LLTabContainer::handleMouseDown( S32 x, S32 y, MASK mask ) BOOL LLTabContainer::handleHover( S32 x, S32 y, MASK mask ) { BOOL handled = FALSE; - BOOL has_scroll_arrows = (getMaxScrollPos() > 0) && !getTabsHidden(); + BOOL has_scroll_arrows = !mHideScrollArrows && (getMaxScrollPos() > 0) && !getTabsHidden(); if (has_scroll_arrows) { @@ -633,7 +635,7 @@ BOOL LLTabContainer::handleHover( S32 x, S32 y, MASK mask ) BOOL LLTabContainer::handleMouseUp( S32 x, S32 y, MASK mask ) { BOOL handled = FALSE; - BOOL has_scroll_arrows = (getMaxScrollPos() > 0) && !getTabsHidden(); + BOOL has_scroll_arrows = !mHideScrollArrows && (getMaxScrollPos() > 0) && !getTabsHidden(); S32 local_x = x - getRect().mLeft; S32 local_y = y - getRect().mBottom; @@ -701,7 +703,7 @@ BOOL LLTabContainer::handleToolTip( S32 x, S32 y, MASK mask) { LLTabTuple* firsttuple = getTab(0); - BOOL has_scroll_arrows = (getMaxScrollPos() > 0); + BOOL has_scroll_arrows = !mHideScrollArrows && (getMaxScrollPos() > 0); LLRect clip; if (mIsVertical) { @@ -826,7 +828,7 @@ BOOL LLTabContainer::handleKeyHere(KEY key, MASK mask) // virtual BOOL LLTabContainer::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType type, void* cargo_data, EAcceptance *accept, std::string &tooltip) { - BOOL has_scroll_arrows = (getMaxScrollPos() > 0); + BOOL has_scroll_arrows = !mHideScrollArrows && (getMaxScrollPos() > 0); if(mOpenTabsOnDragAndDrop && !getTabsHidden()) { @@ -1543,7 +1545,7 @@ BOOL LLTabContainer::setTab(S32 which) is_visible = FALSE; } } - else if (getMaxScrollPos() > 0) + else if (!mHideScrollArrows && getMaxScrollPos() > 0) { if( i < getScrollPos() ) { diff --git a/indra/llui/lltabcontainer.h b/indra/llui/lltabcontainer.h index 057809dc42..4a5f08f5d3 100644 --- a/indra/llui/lltabcontainer.h +++ b/indra/llui/lltabcontainer.h @@ -83,6 +83,7 @@ public: label_pad_left; Optional hide_tabs; + Optional hide_scroll_arrows; Optional tab_padding_right; Optional first_tab, @@ -262,6 +263,7 @@ private: S32 mCurrentTabIdx; BOOL mTabsHidden; + BOOL mHideScrollArrows; BOOL mScrolled; LLFrameTimer mScrollTimer; 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 ff0714adbb..df96ab80d8 100644 --- a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml @@ -30,6 +30,7 @@ tab_height="30" tab_position="top" halign="center" + hide_scroll_arrows="true" top="8" width="315"> Date: Wed, 14 Dec 2016 18:28:12 +0200 Subject: MAINT-6999 Cap attachment render weight --- indra/newview/llvovolume.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 8b25cfaa58..e573138101 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -81,6 +81,8 @@ const F32 FORCE_SIMPLE_RENDER_AREA = 512.f; const F32 FORCE_CULL_AREA = 8.f; +const F32 MIN_RENDER_COMPLEXITY = 0.f; +const F32 MAX_RENDER_COMPLEXITY = 1.0e6f; U32 JOINT_COUNT_REQUIRED_FOR_FULLRIG = 1; BOOL gAnimateTextures = TRUE; @@ -3626,6 +3628,8 @@ U32 LLVOVolume::getRenderCost(texture_cost_t &textures) const shame += media_faces * ARC_MEDIA_FACE_COST; } + shame = llclamp(shame, MIN_RENDER_COMPLEXITY, MAX_RENDER_COMPLEXITY); + if (shame > mRenderComplexity_current) { mRenderComplexity_current = (S32)shame; -- cgit v1.2.3 From cc9ad710c23ec3fff2a98ea11ee0531695b90c53 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Fri, 16 Dec 2016 12:42:27 +0200 Subject: MAINT-6899 Reduce width of floater tabs --- indra/newview/skins/default/xui/en/panel_outfits_inventory.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 df96ab80d8..eeb930485e 100644 --- a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml @@ -26,7 +26,7 @@ layout="topleft" left="5" name="appearance_tabs" - tab_min_width="150" + tab_min_width="100" tab_height="30" tab_position="top" halign="center" -- cgit v1.2.3 From ccff36c8ee278129af3a8916bf931ab4ca14a76d Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 19 Dec 2016 20:06:11 +0200 Subject: MAINT-7009 backing out changeset 638ac620a500 (MAINT-4576) --- indra/newview/llfloaterland.cpp | 5 ++--- indra/newview/llviewerparcelmgr.cpp | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 7f952d4dd4..3f7a14483a 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -2029,7 +2029,6 @@ void LLPanelLandOptions::refresh() else { // something selected, hooray! - LLViewerRegion* regionp = LLViewerParcelMgr::getInstance()->getSelectionRegion(); // Display options BOOL can_change_options = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_OPTIONS); @@ -2045,9 +2044,8 @@ void LLPanelLandOptions::refresh() mCheckGroupObjectEntry ->set( parcel->getAllowGroupObjectEntry() || parcel->getAllowAllObjectEntry()); mCheckGroupObjectEntry ->setEnabled( can_change_options && !parcel->getAllowAllObjectEntry() ); - BOOL region_damage = regionp ? regionp->getAllowDamage() : FALSE; mCheckSafe ->set( !parcel->getAllowDamage() ); - mCheckSafe ->setEnabled( can_change_options && region_damage ); + mCheckSafe ->setEnabled( can_change_options ); mCheckFly ->set( parcel->getAllowFly() ); mCheckFly ->setEnabled( can_change_options ); @@ -2127,6 +2125,7 @@ void LLPanelLandOptions::refresh() // they can see the checkbox, but its disposition depends on the // state of the region + LLViewerRegion* regionp = LLViewerParcelMgr::getInstance()->getSelectionRegion(); if (regionp) { if (regionp->getSimAccess() == SIM_ACCESS_PG) diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index dddfb6745e..2a126c9f01 100644 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -706,7 +706,7 @@ bool LLViewerParcelMgr::allowAgentScripts(const LLViewerRegion* region, const LL bool LLViewerParcelMgr::allowAgentDamage(const LLViewerRegion* region, const LLParcel* parcel) const { return (region && region->getAllowDamage()) - && (parcel && parcel->getAllowDamage()); + || (parcel && parcel->getAllowDamage()); } BOOL LLViewerParcelMgr::isOwnedAt(const LLVector3d& pos_global) const -- cgit v1.2.3 From eee5f574fd5065adc4cd2f4ab61bc76668933234 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Tue, 20 Dec 2016 16:38:18 +0200 Subject: MAINT-7012 FIXED Crash in LLPanelEditWearable::isDirty() --- indra/newview/llsidepanelappearance.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp index a32ed258f8..03fa2e2080 100644 --- a/indra/newview/llsidepanelappearance.cpp +++ b/indra/newview/llsidepanelappearance.cpp @@ -394,6 +394,11 @@ void LLSidepanelAppearance::toggleWearableEditPanel(BOOL visible, LLViewerWearab return; } + if(!visible) + { + mEditWearable->setWearable(NULL); + } + // If we're just switching between outfit and wearable editing or updating item, // don't end customization and don't switch camera // Don't end customization and don't switch camera without visibility change -- cgit v1.2.3 From 07a201094a1483974638d21efc697661629cbe95 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 20 Dec 2016 17:19:54 +0200 Subject: MAINT-3609 The sun was jumping acros the sky at set time --- indra/newview/llwlanimator.cpp | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/indra/newview/llwlanimator.cpp b/indra/newview/llwlanimator.cpp index 2142885767..c8879e73eb 100644 --- a/indra/newview/llwlanimator.cpp +++ b/indra/newview/llwlanimator.cpp @@ -155,17 +155,28 @@ F64 LLWLAnimator::getDayTime() // we're not solving the non-linear equation that determines sun phase // we're just linearly interpolating between the major points - if (phase <= 5.0 / 4.0) { + + if (phase <= 5.0 / 4.0) + { + // mDayTime from 0.33 to 0.75 (6:00 to 21:00) mDayTime = (1.0 / 3.0) * phase + (1.0 / 3.0); } + else if (phase > 7.0 / 4.0) + { + // maximum value for phase is 2 + // mDayTime from 0.25 to 0.33 (3:00 to 6:00) + mDayTime = (1.0 / 3.0) - (1.0 / 3.0) * (2 - phase); + } else { + // phase == 3/2 is where day restarts (24:00) + // mDayTime from 0.75 to 0.999 and 0 to 0.25 (21:00 to 03:00) mDayTime = phase - (1.0 / 2.0); - } - if(mDayTime > 1) - { - mDayTime--; + if(mDayTime > 1) + { + mDayTime--; + } } return mDayTime; -- cgit v1.2.3 From d34530fd07e62c25e010e6373860b358855c96cd Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Tue, 20 Dec 2016 16:28:53 -0800 Subject: DRTVWR-418 fix BOOL/bool comparison that errors out as as warning on VS 2013 builds --- indra/newview/llappviewer.cpp | 4 ++-- indra/newview/llappviewer.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 06d6f76cce..97a5ca3f07 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -333,10 +333,10 @@ BOOL gDisconnected = FALSE; // used to restore texture state after a mode switch LLFrameTimer gRestoreGLTimer; BOOL gRestoreGL = FALSE; -BOOL gUseWireframe = FALSE; +bool gUseWireframe = FALSE; //use for remember deferred mode in wireframe switch -BOOL gInitialDeferredModeForWireframe = FALSE; +bool gInitialDeferredModeForWireframe = FALSE; // VFS globals - see llappviewer.h LLVFS* gStaticVFS = NULL; diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index 948d316009..d4875cc7c1 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -391,8 +391,8 @@ extern BOOL gDisconnected; extern LLFrameTimer gRestoreGLTimer; extern BOOL gRestoreGL; -extern BOOL gUseWireframe; -extern BOOL gInitialDeferredModeForWireframe; +extern bool gUseWireframe; +extern bool gInitialDeferredModeForWireframe; // VFS globals - gVFS is for general use // gStaticVFS is read-only and is shipped w/ the viewer -- cgit v1.2.3 From 18c463981215f60382293aa792b38ceb79cc7b76 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 21 Dec 2016 13:09:07 +0200 Subject: MAINT-7021 Add minimum width for statistics floaters --- indra/newview/skins/default/xui/en/floater_scene_load_stats.xml | 1 + indra/newview/skins/default/xui/en/floater_stats.xml | 1 + 2 files changed, 2 insertions(+) diff --git a/indra/newview/skins/default/xui/en/floater_scene_load_stats.xml b/indra/newview/skins/default/xui/en/floater_scene_load_stats.xml index b53698a9f2..62cce3a1e3 100644 --- a/indra/newview/skins/default/xui/en/floater_scene_load_stats.xml +++ b/indra/newview/skins/default/xui/en/floater_scene_load_stats.xml @@ -7,6 +7,7 @@ save_rect="true" save_visibility="true" title="SCENE LOAD STATISTICS" + min_width="250" width="400"> Date: Wed, 21 Dec 2016 16:18:51 -0500 Subject: MAINT-7005 - added ability to set base priority and joint priority in anim_tool.py --- scripts/content_tools/anim_tool.py | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/scripts/content_tools/anim_tool.py b/scripts/content_tools/anim_tool.py index 9b795f45fd..77bf731ae6 100644 --- a/scripts/content_tools/anim_tool.py +++ b/scripts/content_tools/anim_tool.py @@ -406,8 +406,13 @@ class Anim(object): def delete_joint(self, name): j = self.find_joint(name) if j: + if args.verbose: + print "removing joint", name anim.joints.remove(j) anim.num_joints = len(self.joints) + else: + if args.verbose: + print "joint not found to remove", name def summary(self): nj = len(self.joints) @@ -500,9 +505,9 @@ def resolve_joints(names, skel_tree, lad_tree): for elt in all_elts: if elt.get("name") is None: continue - print elt.get("name"),"hud",elt.get("hud") + #print elt.get("name"),"hud",elt.get("hud") if args.no_hud and elt.get("hud"): - print "skipping hud joint", elt.get("name") + #print "skipping hud joint", elt.get("name") continue if elt.get("name") in names or elt.tag in names: matches.append(elt.get("name")) @@ -532,6 +537,8 @@ if __name__ == "__main__": parser.add_argument("--lad", help="name of the avatar_lad file", default= os.path.join(path_to_skel,"avatar_lad.xml")) parser.add_argument("--set_version", nargs=2, type=int, help="set version and sub-version to specified values") parser.add_argument("--no_hud", help="omit hud joints from list of attachments", action="store_true") + parser.add_argument("--base_priority", help="set base priority", type=int) + parser.add_argument("--joint_priority", help="set joint priority for all joints", type=int) parser.add_argument("infilename", help="name of a .anim file to input") parser.add_argument("outfilename", nargs="?", help="name of a .anim file to output") args = parser.parse_args() @@ -591,6 +598,13 @@ if __name__ == "__main__": if args.set_version: anim.version = args.set_version[0] anim.sub_version = args.set_version[1] + if args.base_priority is not None: + print "set base priority",args.base_priority + anim.base_priority = args.base_priority + if args.joint_priority is not None: + print "set joint priority",args.joint_priority + for joint in anim.joints: + joint.joint_priority = args.joint_priority if args.dump: anim.dump(args.dump) if args.summary: -- cgit v1.2.3 From f08e6b873cafab9fc32d96d71814ee3a7633e051 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 22 Dec 2016 17:34:40 +0200 Subject: MAINT-7024 Release notes page was requested prior to proxy initialization. --- indra/newview/llappviewer.cpp | 18 ++---------------- indra/newview/llappviewer.h | 2 -- indra/newview/llstartup.cpp | 17 +++++++++++++++++ 3 files changed, 19 insertions(+), 18 deletions(-) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index d0c7d0b72e..038a8e3ff3 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1235,7 +1235,8 @@ bool LLAppViewer::init() boost::bind(&LLControlGroup::getU32, boost::ref(gSavedSettings), _1), boost::bind(&LLControlGroup::declareU32, boost::ref(gSavedSettings), _1, _2, _3, LLControlVariable::PERSIST_ALWAYS)); - showReleaseNotesIfRequired(); + // TODO: consider moving proxy initialization here or LLCopocedureManager after proxy initialization, may be implement + // some other protection to make sure we don't use network before initializng proxy /*----------------------------------------------------------------------*/ // nat 2016-06-29 moved the following here from the former mainLoop(). @@ -5869,21 +5870,6 @@ void LLAppViewer::launchUpdater() // LLAppViewer::instance()->forceQuit(); } -/** -* Check if user is running a new version of the viewer. -* Display the Release Notes if it's not overriden by the "UpdaterShowReleaseNotes" setting. -*/ -void LLAppViewer::showReleaseNotesIfRequired() -{ - if (LLVersionInfo::getChannelAndVersion() != gLastRunVersion - && gSavedSettings.getBOOL("UpdaterShowReleaseNotes") - && !gSavedSettings.getBOOL("FirstLoginThisInstall")) - { - LLSD info(getViewerInfo()); - LLWeb::loadURLInternal(info["VIEWER_RELEASE_NOTES_URL"]); - } -} - //virtual void LLAppViewer::setMasterSystemAudioMute(bool mute) { diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index 948d316009..7bb3c32c51 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -255,8 +255,6 @@ private: void sendLogoutRequest(); void disconnectViewer(); - void showReleaseNotesIfRequired(); - // *FIX: the app viewer class should be some sort of singleton, no? // Perhaps its child class is the singleton and this should be an abstract base. static LLAppViewer* sInstance; diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 1bb3d65e05..bbbc93e5be 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -256,6 +256,7 @@ boost::scoped_ptr LLStartUp::sPhases(new LLViewerStats: void login_show(); void login_callback(S32 option, void* userdata); +void show_release_notes_if_required(); void show_first_run_dialog(); bool first_run_dialog_callback(const LLSD& notification, const LLSD& response); void set_startup_status(const F32 frac, const std::string& string, const std::string& msg); @@ -709,6 +710,7 @@ bool idle_startup() set_startup_status(0.03f, msg.c_str(), gAgent.mMOTD.c_str()); display_startup(); // LLViewerMedia::initBrowser(); + show_release_notes_if_required(); LLStartUp::setStartupState( STATE_LOGIN_SHOW ); return FALSE; } @@ -2247,6 +2249,21 @@ void login_callback(S32 option, void *userdata) } } +/** +* Check if user is running a new version of the viewer. +* Display the Release Notes if it's not overriden by the "UpdaterShowReleaseNotes" setting. +*/ +void show_release_notes_if_required() +{ + if (LLVersionInfo::getChannelAndVersion() != gLastRunVersion + && gSavedSettings.getBOOL("UpdaterShowReleaseNotes") + && !gSavedSettings.getBOOL("FirstLoginThisInstall")) + { + LLSD info(LLAppViewer::instance()->getViewerInfo()); + LLWeb::loadURLInternal(info["VIEWER_RELEASE_NOTES_URL"]); + } +} + void show_first_run_dialog() { LLNotificationsUtil::add("FirstRun", LLSD(), LLSD(), first_run_dialog_callback); -- cgit v1.2.3 From 596018361c2f3980eab7dd4275c2bdeb6c8505e3 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 26 Dec 2016 19:08:46 +0200 Subject: MAINT-965 FIXED Teleport to friend location in world map omits Z value --- indra/newview/llfloaterworldmap.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index c67feb8158..c0bd9b1c23 100644 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -546,7 +546,7 @@ void LLFloaterWorldMap::trackAvatar( const LLUUID& avatar_id, const std::string& // convenience. if(gAgent.isGodlike()) { - getChild("spin z")->setValue(LLSD(200.f)); + getChild("teleport_coordinate_z")->setValue(LLSD(200.f)); } // Don't re-request info if we already have it or we won't have it in time to teleport if (mTrackedStatus != LLTracker::TRACKING_AVATAR || name != mTrackedAvatarName) @@ -1375,7 +1375,7 @@ void LLFloaterWorldMap::teleport() && av_tracker.haveTrackingInfo() ) { pos_global = av_tracker.getGlobalPos(); - pos_global.mdV[VZ] = getChild("spin z")->getValue(); + pos_global.mdV[VZ] = getChild("teleport_coordinate_z")->getValue(); } else if ( LLTracker::TRACKING_LANDMARK == tracking_status) { -- cgit v1.2.3 From 92d84a9c365756eeaf7234af42e53f09866263a0 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Tue, 27 Dec 2016 12:04:51 +0200 Subject: MAINT-7022 Crash in LLFloaterIMContainer::visibleContextMenuItem() --- indra/newview/llfloaterimcontainer.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 7039e48e74..7007c58b3c 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -1505,15 +1505,21 @@ bool LLFloaterIMContainer::checkContextMenuItem(const std::string& item, uuid_ve bool LLFloaterIMContainer::visibleContextMenuItem(const LLSD& userdata) { + const LLConversationItem *conversation_item = getCurSelectedViewModelItem(); + if(!conversation_item) + { + return false; + } + const std::string& item = userdata.asString(); if ("show_mute" == item) { - return !isMuted(getCurSelectedViewModelItem()->getUUID()); + return !isMuted(conversation_item->getUUID()); } else if ("show_unmute" == item) { - return isMuted(getCurSelectedViewModelItem()->getUUID()); + return isMuted(conversation_item->getUUID()); } return true; -- cgit v1.2.3 From 05c2c408a4a8a2ba67d3b3071aac9d50af77a962 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Tue, 27 Dec 2016 16:10:42 +0200 Subject: MAINT-3027 remove CameraAspectRatio from Debug Settings --- indra/newview/app_settings/settings.xml | 12 ------------ indra/newview/pipeline.cpp | 2 -- 2 files changed, 14 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 9f37c3487e..6d8b642d6f 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -1608,18 +1608,6 @@ 60.0 - CameraAspectRatio - - Comment - Camera aspect ratio for DoF effect - Persist - 1 - Type - F32 - Value - 1.5 - - CertStore Comment diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 890839e6e6..19487c3230 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -7773,12 +7773,10 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield) F32 fov = LLViewerCamera::getInstance()->getView(); const F32 default_fov = CameraFieldOfView * F_PI/180.f; - //const F32 default_aspect_ratio = gSavedSettings.getF32("CameraAspectRatio"); //F32 aspect_ratio = (F32) mScreen.getWidth()/(F32)mScreen.getHeight(); F32 dv = 2.f*default_focal_length * tanf(default_fov/2.f); - //F32 dh = 2.f*default_focal_length * tanf(default_fov*default_aspect_ratio/2.f); F32 focal_length = dv/(2*tanf(fov/2.f)); -- cgit v1.2.3 From 7191d43bdb5bf527e7f1132b39c1800c773c633a Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Tue, 27 Dec 2016 16:57:48 +0200 Subject: MAINT-1970 Inaccurate menu label in menu_gesture_gear --- indra/newview/skins/default/xui/en/menu_gesture_gear.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/indra/newview/skins/default/xui/en/menu_gesture_gear.xml b/indra/newview/skins/default/xui/en/menu_gesture_gear.xml index b08d21e8f4..c1458977ca 100644 --- a/indra/newview/skins/default/xui/en/menu_gesture_gear.xml +++ b/indra/newview/skins/default/xui/en/menu_gesture_gear.xml @@ -5,8 +5,7 @@ name="menu_gesture_gear" visible="false"> Date: Tue, 27 Dec 2016 20:15:08 +0200 Subject: MAINT-4097 User never de-clouds with a large inventory after inventory fetch --- indra/newview/llinventoryfilter.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index e995c138b4..1433ea36bf 100644 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -40,6 +40,7 @@ #include "llinventorybridge.h" #include "llviewerfoldertype.h" #include "llradiogroup.h" +#include "llstartup.h" // linden library includes #include "llclipboard.h" @@ -132,8 +133,10 @@ bool LLInventoryFilter::checkFolder(const LLUUID& folder_id) const } // when applying a filter, matching folders get their contents downloaded first + // but make sure we are not interfering with pre-download if (isNotDefault() - && !gInventory.isCategoryComplete(folder_id)) + && !gInventory.isCategoryComplete(folder_id) + && LLStartUp::getStartupState() > STATE_WEARABLES_WAIT) { LLInventoryModelBackgroundFetch::instance().start(folder_id); } @@ -307,7 +310,11 @@ bool LLInventoryFilter::checkAgainstFilterType(const LLFolderViewModelItemInvent if (is_hidden_if_empty) { // Force the fetching of those folders so they are hidden if they really are empty... - gInventory.fetchDescendentsOf(object_id); + // But don't interfere with startup download + if (LLStartUp::getStartupState() > STATE_WEARABLES_WAIT) + { + gInventory.fetchDescendentsOf(object_id); + } LLInventoryModel::cat_array_t* cat_array = NULL; LLInventoryModel::item_array_t* item_array = NULL; -- cgit v1.2.3 From c79dc296adf4c3fca25b587805739a428f507f81 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 28 Dec 2016 15:50:19 +0200 Subject: MAINT-406 Ban and access limits no longer showing --- indra/newview/llfloaterland.cpp | 2 ++ indra/newview/skins/default/xui/en/floater_about_land.xml | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 3f7a14483a..a340cd1143 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -2447,6 +2447,7 @@ void LLPanelLandAccess::refresh() mListAccess->deleteAllItems(); S32 count = parcel->mAccessList.size(); getChild("AllowedText")->setTextArg("[COUNT]", llformat("%d",count)); + getChild("AllowedText")->setTextArg("[MAX]", llformat("%d",PARCEL_MAX_ACCESS_LIST)); getChild("AccessList")->setToolTipArg(LLStringExplicit("[LISTED]"), llformat("%d",count)); getChild("AccessList")->setToolTipArg(LLStringExplicit("[MAX]"), llformat("%d",PARCEL_MAX_ACCESS_LIST)); @@ -2494,6 +2495,7 @@ void LLPanelLandAccess::refresh() mListBanned->deleteAllItems(); S32 count = parcel->mBanList.size(); getChild("BanCheck")->setTextArg("[COUNT]", llformat("%d",count)); + getChild("BanCheck")->setTextArg("[MAX]", llformat("%d",PARCEL_MAX_ACCESS_LIST)); getChild("BannedList")->setToolTipArg(LLStringExplicit("[LISTED]"), llformat("%d",count)); getChild("BannedList")->setToolTipArg(LLStringExplicit("[MAX]"), llformat("%d",PARCEL_MAX_ACCESS_LIST)); diff --git a/indra/newview/skins/default/xui/en/floater_about_land.xml b/indra/newview/skins/default/xui/en/floater_about_land.xml index 8391bacf51..a137770e26 100644 --- a/indra/newview/skins/default/xui/en/floater_about_land.xml +++ b/indra/newview/skins/default/xui/en/floater_about_land.xml @@ -2014,7 +2014,7 @@ Only large parcels can be listed in search. name="AllowedText" top="0" width="230"> - Allowed Residents ([COUNT]) + Allowed Residents ([COUNT], max [MAX]) - Banned Residents ([COUNT]) + Banned Residents ([COUNT], max [MAX]) Date: Wed, 28 Dec 2016 19:58:32 +0200 Subject: MAINT-2450 PRIM_MEDIA_PERMS_CONTROL shouldn't disable mouse wheel scrolling --- indra/newview/llpanelprimmediacontrols.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp index 0bcd8a9e63..5f413fc3c0 100644 --- a/indra/newview/llpanelprimmediacontrols.cpp +++ b/indra/newview/llpanelprimmediacontrols.cpp @@ -566,11 +566,16 @@ void LLPanelPrimMediaControls::updateShape() } } - // MAINT-1392 If this is a HUD always set it visible, but hide each control if user has no perms. - // When setting it invisible it won't receive any mouse messages anymore + // Web plugins and HUD may have media controls invisible for user, but still need scroll mouse events. + // LLView checks for visibleEnabledAndContains() and won't pass events to invisible panel, so instead + // of hiding whole panel hide each control instead (if user has no perms). + // Note: It might be beneficial to keep panel visible for all plugins to make behavior consistent, but + // for now limiting change to cases that need events. - if( !is_hud ) + if (!is_hud && (!media_plugin || media_plugin->pluginSupportsMediaTime())) + { setVisible(enabled); + } else { if( !hasPermsControl ) -- cgit v1.2.3 From ea65bc80c3bdaf779c945e61838d14e0446df2c8 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Fri, 30 Dec 2016 16:26:01 +0200 Subject: MAINT-7026 Teleport history info panel is shown when it shouldn't be after certain actions --- indra/newview/llpanelplaces.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index 5d43c38612..0507d6db86 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -1006,7 +1006,7 @@ void LLPanelPlaces::togglePlaceInfoPanel(BOOL visible) mPlaceInfoType == LANDMARK_TAB_INFO_TYPE) { mLandmarkInfo->setVisible(visible); - + mPlaceProfile->setVisible(FALSE); if (visible) { mLandmarkInfo->resetLocation(); @@ -1014,8 +1014,6 @@ void LLPanelPlaces::togglePlaceInfoPanel(BOOL visible) LLRect rect = getRect(); LLRect new_rect = LLRect(rect.mLeft, rect.mTop, rect.mRight, mTabContainer->getRect().mBottom); mLandmarkInfo->reshape(new_rect.getWidth(), new_rect.getHeight()); - - mPlaceProfile->setVisible(FALSE); } else { -- cgit v1.2.3 From af3aad098d97171b0873f6486d7b5513d2a409f8 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Tue, 3 Jan 2017 16:22:58 +0200 Subject: MAINT-900 fixed male gestures spelling mistake --- indra/newview/skins/default/xui/en/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 88ad8bbf7b..b75f631799 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -3815,7 +3815,7 @@ Abuse Report Male - Laugh Male - Repulsed Male - Shrug - Male - Stick tougue out + Male - Stick tongue out Male - Wow Female - Chuckle @@ -3834,7 +3834,7 @@ Abuse Report Female - Please Female - Repulsed Female - Shrug - Female - Stick tougue out + Female - Stick tongue out Female - Wow /bow -- cgit v1.2.3 From 7c70236fe0f24ede06022fcafee53e1815804ce3 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 4 Jan 2017 10:51:17 +0200 Subject: MAINT-838 Removing obsolete and malfunctioning leftClickShowMenu --- indra/newview/app_settings/settings.xml | 2 +- indra/newview/lltoolpie.cpp | 65 +++++++++++++-------------------- 2 files changed, 26 insertions(+), 41 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 6d8b642d6f..8ddb421ac3 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -5376,7 +5376,7 @@ LeftClickShowMenu Comment - Left click opens pie menu (FALSE = left click touches or grabs object) + Unused obsolete setting Persist 1 Type diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index e17651dc91..e79ce55854 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -338,56 +338,41 @@ BOOL LLToolPie::handleLeftClickPick() // If left-click never selects or spawns a menu // Eat the event. - if (!gSavedSettings.getBOOL("LeftClickShowMenu")) + + // mouse already released + if (!mMouseButtonDown) { - // mouse already released - if (!mMouseButtonDown) - { - return true; - } + return true; + } - while( object && object->isAttachment() && !object->flagHandleTouch()) + while (object && object->isAttachment() && !object->flagHandleTouch()) + { + // don't pick avatar through hud attachment + if (object->isHUDAttachment()) { - // don't pick avatar through hud attachment - if (object->isHUDAttachment()) - { - break; - } - object = (LLViewerObject*)object->getParent(); + break; } - if (object && object == gAgentAvatarp && !gSavedSettings.getBOOL("ClickToWalk")) - { - // we left clicked on avatar, switch to focus mode - mMouseButtonDown = false; - LLToolMgr::getInstance()->setTransientTool(LLToolCamera::getInstance()); - gViewerWindow->hideCursor(); - LLToolCamera::getInstance()->setMouseCapture(TRUE); - LLToolCamera::getInstance()->pickCallback(mPick); - gAgentCamera.setFocusOnAvatar(TRUE, TRUE); + object = (LLViewerObject*)object->getParent(); + } + if (object && object == gAgentAvatarp && !gSavedSettings.getBOOL("ClickToWalk")) + { + // we left clicked on avatar, switch to focus mode + mMouseButtonDown = false; + LLToolMgr::getInstance()->setTransientTool(LLToolCamera::getInstance()); + gViewerWindow->hideCursor(); + LLToolCamera::getInstance()->setMouseCapture(TRUE); + LLToolCamera::getInstance()->pickCallback(mPick); + gAgentCamera.setFocusOnAvatar(TRUE, TRUE); - return TRUE; - } + return TRUE; + } ////////// // // Could be first left-click on nothing // LLFirstUse::useLeftClickNoHit(); ///////// - - // Eat the event - return LLTool::handleMouseDown(x, y, mask); - } - - if (gAgent.leftButtonGrabbed()) - { - // if the left button is grabbed, don't put up the pie menu - return LLTool::handleMouseDown(x, y, mask); - } - - // Can't ignore children here. - LLToolSelect::handleObjectSelection(mPick, FALSE, TRUE); - // Spawn pie menu - LLTool::handleRightMouseDown(x, y, mask); - return TRUE; + // Eat the event + return LLTool::handleMouseDown(x, y, mask); } BOOL LLToolPie::useClickAction(MASK mask, -- cgit v1.2.3 From a79ac1be4d470a5d2b467de13a10f18478d5f4e5 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 4 Jan 2017 11:15:38 +0200 Subject: MAINT-897 show confirmation dialog when copying notecard --- indra/newview/llviewertexteditor.cpp | 10 +--------- indra/newview/llviewertexteditor.h | 1 - 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp index 09cdfe1309..7323a5b2f3 100644 --- a/indra/newview/llviewertexteditor.cpp +++ b/indra/newview/llviewertexteditor.cpp @@ -1105,10 +1105,6 @@ BOOL LLViewerTextEditor::openEmbeddedItem(LLPointer item, llwch openEmbeddedSound( item, wc ); return TRUE; - case LLAssetType::AT_NOTECARD: - openEmbeddedNotecard( item, wc ); - return TRUE; - case LLAssetType::AT_LANDMARK: openEmbeddedLandmark( item, wc ); return TRUE; @@ -1117,6 +1113,7 @@ BOOL LLViewerTextEditor::openEmbeddedItem(LLPointer item, llwch openEmbeddedCallingcard( item, wc ); return TRUE; + case LLAssetType::AT_NOTECARD: case LLAssetType::AT_LSL_TEXT: case LLAssetType::AT_CLOTHING: case LLAssetType::AT_OBJECT: @@ -1182,11 +1179,6 @@ void LLViewerTextEditor::openEmbeddedLandmark( LLPointer item_p } } -void LLViewerTextEditor::openEmbeddedNotecard( LLInventoryItem* item, llwchar wc ) -{ - copyInventory(item, gInventoryCallbacks.registerCB(mInventoryCallback)); -} - void LLViewerTextEditor::openEmbeddedCallingcard( LLInventoryItem* item, llwchar wc ) { if(item && !item->getCreatorUUID().isNull()) diff --git a/indra/newview/llviewertexteditor.h b/indra/newview/llviewertexteditor.h index 477119d4f2..33cfca4f90 100644 --- a/indra/newview/llviewertexteditor.h +++ b/indra/newview/llviewertexteditor.h @@ -105,7 +105,6 @@ private: void openEmbeddedTexture( LLInventoryItem* item, llwchar wc ); void openEmbeddedSound( LLInventoryItem* item, llwchar wc ); void openEmbeddedLandmark( LLPointer item_ptr, llwchar wc ); - void openEmbeddedNotecard( LLInventoryItem* item, llwchar wc); void openEmbeddedCallingcard( LLInventoryItem* item, llwchar wc); void showCopyToInvDialog( LLInventoryItem* item, llwchar wc ); void showUnsavedAlertDialog( LLInventoryItem* item ); -- cgit v1.2.3 From 9edc5b10697e5a4c5af90362d8158f427735740a Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 4 Jan 2017 13:34:44 +0200 Subject: MAINT-2193 FIXED Right half of Delete button in Pathfinding linksets window cannot be clicked --- indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml b/indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml index 52d03cc432..00d70556b4 100644 --- a/indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml +++ b/indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml @@ -290,7 +290,7 @@ layout="topleft" left="0" height="67" - width="1010"> + width="1070"> Date: Wed, 4 Jan 2017 18:38:52 +0200 Subject: MAINT-918 Newline was not displayed correctly in chat window. --- indra/llui/lltextbase.cpp | 46 +++++++++++++++++++++++++---------- indra/llui/lltextbase.h | 22 +++++++++++++---- indra/newview/llexpandabletextbox.cpp | 4 +-- indra/newview/llviewertexteditor.cpp | 2 +- 4 files changed, 53 insertions(+), 21 deletions(-) diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 20be739286..88a5c3a587 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -1522,6 +1522,7 @@ void LLTextBase::reflow() } S32 line_height = 0; + S32 seg_line_offset = line_count; while(seg_iter != mSegments.end()) { @@ -1534,7 +1535,8 @@ void LLTextBase::reflow() S32 character_count = segment->getNumChars(getWordWrap() ? llmax(0, remaining_pixels) : S32_MAX, seg_offset, cur_index - line_start_index, - S32_MAX); + S32_MAX, + line_count - seg_line_offset); S32 segment_width, segment_height; bool force_newline = segment->getDimensions(seg_offset, character_count, segment_width, segment_height); @@ -1597,6 +1599,7 @@ void LLTextBase::reflow() } ++seg_iter; seg_offset = 0; + seg_line_offset = force_newline ? line_count + 1 : line_count; } if (force_newline) { @@ -3065,7 +3068,7 @@ LLTextSegment::~LLTextSegment() bool LLTextSegment::getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const { width = 0; height = 0; return false;} S32 LLTextSegment::getOffset(S32 segment_local_x_coord, S32 start_offset, S32 num_chars, bool round) const { return 0; } -S32 LLTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const { return 0; } +S32 LLTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars, S32 line_ind) const { return 0; } void LLTextSegment::updateLayout(const LLTextBase& editor) {} F32 LLTextSegment::draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect) { return draw_rect.mLeft; } bool LLTextSegment::canEdit() const { return false; } @@ -3335,7 +3338,7 @@ S32 LLNormalTextSegment::getOffset(S32 segment_local_x_coord, S32 start_offset, round); } -S32 LLNormalTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const +S32 LLNormalTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars, S32 line_ind) const { const LLWString &text = getWText(); @@ -3352,7 +3355,7 @@ S32 LLNormalTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 lin // if no character yet displayed on this line, don't require word wrapping since // we can just move to the next line, otherwise insist on it so we make forward progress - LLFontGL::EWordWrapStyle word_wrap_style = (line_offset == 0) + LLFontGL::EWordWrapStyle word_wrap_style = (line_offset == 0) ? LLFontGL::WORD_BOUNDARY_IF_POSSIBLE : LLFontGL::ONLY_WORD_BOUNDARIES; @@ -3490,12 +3493,26 @@ LLInlineViewSegment::~LLInlineViewSegment() bool LLInlineViewSegment::getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const { - if (first_char == 0 && num_chars == 0) + if (first_char == 0 && num_chars == 0) { - // we didn't fit on a line, the widget will fall on the next line - // so dimensions here are 0 + // We didn't fit on a line or were forced to new string + // the widget will fall on the next line, so width here is 0 width = 0; - height = 0; + + if (mForceNewLine) + { + // Chat, string can't be smaller then font height even if it is empty + LLStyleSP s(new LLStyle(LLStyle::Params().visible(true))); + height = s->getFont()->getLineHeight(); + + return true; // new line + } + else + { + // height from previous segment in same string will be used, word-wrap + height = 0; + } + } else { @@ -3506,13 +3523,16 @@ bool LLInlineViewSegment::getDimensions(S32 first_char, S32 num_chars, S32& widt return false; } -S32 LLInlineViewSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const +S32 LLInlineViewSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars, S32 line_ind) const { // if putting a widget anywhere but at the beginning of a line // and the widget doesn't fit or mForceNewLine is true // then return 0 chars for that line, and all characters for the next - if (line_offset != 0 - && (mForceNewLine || num_pixels < mView->getRect().getWidth())) + if (mForceNewLine && line_ind == 0) + { + return 0; + } + else if (line_offset != 0 && num_pixels < mView->getRect().getWidth()) { return 0; } @@ -3565,7 +3585,7 @@ bool LLLineBreakTextSegment::getDimensions(S32 first_char, S32 num_chars, S32& w return true; } -S32 LLLineBreakTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const +S32 LLLineBreakTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars, S32 line_ind) const { return 1; } @@ -3601,7 +3621,7 @@ bool LLImageTextSegment::getDimensions(S32 first_char, S32 num_chars, S32& width return false; } -S32 LLImageTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const +S32 LLImageTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars, S32 line_ind) const { LLUIImagePtr image = mStyle->getImage(); diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h index 3d3a6ca869..c7b6203445 100644 --- a/indra/llui/lltextbase.h +++ b/indra/llui/lltextbase.h @@ -64,7 +64,19 @@ public: virtual bool getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const; virtual S32 getOffset(S32 segment_local_x_coord, S32 start_offset, S32 num_chars, bool round) const; - virtual S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const; + + /** + * Get number of chars that fit into free part of current line. + * + * @param num_pixels - maximum width of rect + * @param segment_offset - symbol in segment we start processing line from + * @param line_offset - symbol in line after which segment starts + * @param max_chars - limit of symbols that will fit in current line + * @param line_ind - index of not word-wrapped string inside segment for multi-line segments. + * Two string separated by word-wrap will have same index. + * @return number of chars that will fit into current line + */ + virtual S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars, S32 line_ind) const; virtual void updateLayout(const class LLTextBase& editor); virtual F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect); virtual bool canEdit() const; @@ -116,7 +128,7 @@ public: /*virtual*/ bool getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const; /*virtual*/ S32 getOffset(S32 segment_local_x_coord, S32 start_offset, S32 num_chars, bool round) const; - /*virtual*/ S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const; + /*virtual*/ S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars, S32 line_ind) const; /*virtual*/ F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect); /*virtual*/ bool canEdit() const { return true; } /*virtual*/ const LLColor4& getColor() const { return mStyle->getColor(); } @@ -201,7 +213,7 @@ public: LLInlineViewSegment(const Params& p, S32 start, S32 end); ~LLInlineViewSegment(); /*virtual*/ bool getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const; - /*virtual*/ S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const; + /*virtual*/ S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars, S32 line_ind) const; /*virtual*/ void updateLayout(const class LLTextBase& editor); /*virtual*/ F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect); /*virtual*/ bool canEdit() const { return false; } @@ -225,7 +237,7 @@ public: LLLineBreakTextSegment(S32 pos); ~LLLineBreakTextSegment(); bool getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const; - S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const; + S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars, S32 line_ind) const; F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect); private: @@ -238,7 +250,7 @@ public: LLImageTextSegment(LLStyleConstSP style,S32 pos,class LLTextBase& editor); ~LLImageTextSegment(); bool getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const; - S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const; + S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 char_offset, S32 max_chars, S32 line_ind) const; F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect); /*virtual*/ BOOL handleToolTip(S32 x, S32 y, MASK mask); diff --git a/indra/newview/llexpandabletextbox.cpp b/indra/newview/llexpandabletextbox.cpp index f0331f20d8..314b859cea 100644 --- a/indra/newview/llexpandabletextbox.cpp +++ b/indra/newview/llexpandabletextbox.cpp @@ -63,10 +63,10 @@ public: { return start_offset; } - /*virtual*/ S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const + /*virtual*/ S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars, S32 line_ind) const { // require full line to ourselves - if (line_offset == 0) + if (line_offset == 0) { // print all our text return getEnd() - getStart(); diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp index 7323a5b2f3..9e09971ced 100644 --- a/indra/newview/llviewertexteditor.cpp +++ b/indra/newview/llviewertexteditor.cpp @@ -191,7 +191,7 @@ public: return false; } - /*virtual*/ S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const + /*virtual*/ S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars, S32 line_ind) const { // always draw at beginning of line if (line_offset == 0) -- cgit v1.2.3 From 942bbf943d74b8804c4d3fee98a14c8618a4e031 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Thu, 5 Jan 2017 11:45:17 +0200 Subject: MAINT-7029 Pop-up menu isn't shown in Place profile if all menu items are disabled --- indra/llui/llmenugl.cpp | 28 ++++++++++++++++------------ indra/llui/llmenugl.h | 5 +++++ indra/newview/llpanelplaces.cpp | 6 +++++- 3 files changed, 26 insertions(+), 13 deletions(-) diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 848367f8a8..8425774d46 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -1736,6 +1736,7 @@ LLMenuGL::LLMenuGL(const LLMenuGL::Params& p) mJumpKey(p.jump_key), mCreateJumpKeys(p.create_jump_keys), mNeedsArrange(FALSE), + mAlwaysShowMenu(FALSE), mResetScrollPositionOnShow(true), mShortcutPad(p.shortcut_pad) { @@ -3223,20 +3224,23 @@ void LLMenuGL::showPopup(LLView* spawning_view, LLMenuGL* menu, S32 x, S32 y) menu->setVisible( TRUE ); - //Do not show menu if all menu items are disabled - BOOL item_enabled = false; - for (LLView::child_list_t::const_iterator itor = menu->getChildList()->begin(); - itor != menu->getChildList()->end(); - ++itor) + if(!menu->getAlwaysShowMenu()) { - LLView *menu_item = (*itor); - item_enabled = item_enabled || menu_item->getEnabled(); - } + //Do not show menu if all menu items are disabled + BOOL item_enabled = false; + for (LLView::child_list_t::const_iterator itor = menu->getChildList()->begin(); + itor != menu->getChildList()->end(); + ++itor) + { + LLView *menu_item = (*itor); + item_enabled = item_enabled || menu_item->getEnabled(); + } - if(!item_enabled) - { - menu->setVisible( FALSE ); - return; + if(!item_enabled) + { + menu->setVisible( FALSE ); + return; + } } // Save click point for detecting cursor moves before mouse-up. diff --git a/indra/llui/llmenugl.h b/indra/llui/llmenugl.h index c7f7f6848c..69f7d21513 100644 --- a/indra/llui/llmenugl.h +++ b/indra/llui/llmenugl.h @@ -531,6 +531,9 @@ public: void resetScrollPositionOnShow(bool reset_scroll_pos) { mResetScrollPositionOnShow = reset_scroll_pos; } bool isScrollPositionOnShowReset() { return mResetScrollPositionOnShow; } + void setAlwaysShowMenu(BOOL show) { mAlwaysShowMenu = show; } + BOOL getAlwaysShowMenu() { return mAlwaysShowMenu; } + // add a context menu branch BOOL appendContextSubMenu(LLMenuGL *menu); @@ -572,6 +575,8 @@ private: static LLColor4 sDefaultBackgroundColor; static BOOL sKeyboardMode; + BOOL mAlwaysShowMenu; + LLUIColor mBackgroundColor; BOOL mBgVisible; LLHandle mParentMenuItem; diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index 0507d6db86..ed942fc7fc 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -304,7 +304,11 @@ BOOL LLPanelPlaces::postBuild() enable_registrar.add("Places.OverflowMenu.Enable", boost::bind(&LLPanelPlaces::onOverflowMenuItemEnable, this, _2)); mPlaceMenu = LLUICtrlFactory::getInstance()->createFromFile("menu_place.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); - if (!mPlaceMenu) + if (mPlaceMenu) + { + mPlaceMenu->setAlwaysShowMenu(TRUE); + } + else { LL_WARNS() << "Error loading Place menu" << LL_ENDL; } -- cgit v1.2.3 From 7004dfe75fe597a60063bc7b581dbd7cdbfa2f2d Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 5 Jan 2017 11:41:11 +0200 Subject: MAINT-7034 Added second life events into menu --- indra/newview/skins/default/xui/en/menu_viewer.xml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index f911c2da7b..7c128d1523 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -447,6 +447,13 @@ function="Floater.Toggle" parameter="mini_map" /> + + + Date: Thu, 5 Jan 2017 17:22:28 +0200 Subject: MAINT-930 Fixed Viewer saves your password whether you want it to or not --- indra/newview/llloginhandler.cpp | 1 - indra/newview/llstartup.cpp | 7 +++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/indra/newview/llloginhandler.cpp b/indra/newview/llloginhandler.cpp index 39f3c0f113..eca34c0d4d 100644 --- a/indra/newview/llloginhandler.cpp +++ b/indra/newview/llloginhandler.cpp @@ -168,7 +168,6 @@ LLPointer LLLoginHandler::loadSavedUserLoginInfo() authenticator["algorithm"] = "md5"; authenticator["secret"] = md5pass; // yuck, we'll fix this with mani's changes. - gSavedSettings.setBOOL("AutoLogin", TRUE); return gSecAPIHandler->createCredential(LLGridManager::getInstance()->getGrid(), identifier, authenticator); } diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index bbbc93e5be..628b419304 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -683,10 +683,17 @@ bool idle_startup() } else if (gSavedSettings.getBOOL("AutoLogin")) { + // Log into last account gRememberPassword = TRUE; gSavedSettings.setBOOL("RememberPassword", TRUE); show_connect_box = false; } + else if (gSavedSettings.getLLSD("UserLoginInfo").size() == 3) + { + // Console provided login&password + gRememberPassword = gSavedSettings.getBOOL("RememberPassword"); + show_connect_box = false; + } else { gRememberPassword = gSavedSettings.getBOOL("RememberPassword"); -- cgit v1.2.3 From ed564994ae08e61d1df2564af30796c52c496360 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 6 Jan 2017 10:08:19 +0200 Subject: MAINT-7039 Fixed typo --- indra/newview/skins/default/xui/en/notifications.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 512deed054..58869ec602 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -4031,7 +4031,7 @@ An update was downloaded. It will be installed during restart. icon="alertmodal.tga" name="UpdateCheckError" type="alertmodal"> -An error occured while checking for update. +An error occurred while checking for update. Please try again later. confirm Date: Tue, 10 Jan 2017 15:09:02 +0200 Subject: MAINT-1384 FIXED Grid selection menu at login not working Ctrl-Shift-g --- indra/newview/llviewercontrol.cpp | 2 +- indra/newview/skins/default/xui/en/menu_login.xml | 24 +++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index db71849659..7c1921b143 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -507,7 +507,7 @@ bool handleVelocityInterpolate(const LLSD& newvalue) bool handleForceShowGrid(const LLSD& newvalue) { - LLPanelLogin::updateServer( ); + LLPanelLogin::updateLocationSelectorsVisibility(); return true; } diff --git a/indra/newview/skins/default/xui/en/menu_login.xml b/indra/newview/skins/default/xui/en/menu_login.xml index a39ee5fddd..8cd0c415f4 100644 --- a/indra/newview/skins/default/xui/en/menu_login.xml +++ b/indra/newview/skins/default/xui/en/menu_login.xml @@ -20,6 +20,18 @@ function="Floater.Toggle" parameter="preferences" /> + + + + - - - - Date: Wed, 11 Jan 2017 13:52:40 +0200 Subject: MAINT-7031 /displayname & /completename should perform regardless of "View Display Names" viewer setting. --- indra/llmessage/llavatarname.cpp | 8 ++++---- indra/llmessage/llavatarname.h | 4 ++-- indra/llui/llurlentry.cpp | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/indra/llmessage/llavatarname.cpp b/indra/llmessage/llavatarname.cpp index d2115ee499..2e8886fb51 100644 --- a/indra/llmessage/llavatarname.cpp +++ b/indra/llmessage/llavatarname.cpp @@ -166,10 +166,10 @@ void LLAvatarName::setExpires(F64 expires) mExpires = LLFrameTimer::getTotalSeconds() + expires; } -std::string LLAvatarName::getCompleteName(bool use_parentheses) const +std::string LLAvatarName::getCompleteName(bool use_parentheses, bool force_use_display_name) const { std::string name; - if (sUseDisplayNames) + if (sUseDisplayNames || force_use_display_name) { if (mUsername.empty() || mIsDisplayNameDefault) { @@ -215,9 +215,9 @@ std::string LLAvatarName::getLegacyName() const return name; } -std::string LLAvatarName::getDisplayName() const +std::string LLAvatarName::getDisplayName(bool force_use_display_name) const { - if (sUseDisplayNames) + if (sUseDisplayNames || force_use_display_name) { return mDisplayName; } diff --git a/indra/llmessage/llavatarname.h b/indra/llmessage/llavatarname.h index 192f43f07c..80b54cded9 100644 --- a/indra/llmessage/llavatarname.h +++ b/indra/llmessage/llavatarname.h @@ -65,7 +65,7 @@ public: // For normal names, returns "James Linden (james.linden)" // When display names are disabled returns just "James Linden" - std::string getCompleteName(bool use_parentheses = true) const; + std::string getCompleteName(bool use_parentheses = true, bool force_use_display_name = false) const; // Returns "James Linden" or "bobsmith123 Resident" for backwards // compatibility with systems like voice and muting @@ -75,7 +75,7 @@ public: // "José Sanchez" or "James Linden", UTF-8 encoded Unicode // Takes the display name preference into account. This is truly the name that should // be used for all UI where an avatar name has to be used unless we truly want something else (rare) - std::string getDisplayName() const; + std::string getDisplayName(bool force_use_display_name = false) const; // Returns "James Linden" or "bobsmith123 Resident" // Used where we explicitely prefer or need a non UTF-8 legacy (ASCII) name diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index b5a31f5118..05b7a4a9e9 100644 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -764,7 +764,7 @@ LLUrlEntryAgentCompleteName::LLUrlEntryAgentCompleteName() std::string LLUrlEntryAgentCompleteName::getName(const LLAvatarName& avatar_name) { - return avatar_name.getCompleteName(); + return avatar_name.getCompleteName(true, true); } // @@ -780,7 +780,7 @@ LLUrlEntryAgentDisplayName::LLUrlEntryAgentDisplayName() std::string LLUrlEntryAgentDisplayName::getName(const LLAvatarName& avatar_name) { - return avatar_name.getDisplayName(); + return avatar_name.getDisplayName(true); } // -- cgit v1.2.3 From 5b2ddae9994e251502b02e81f9ef24a7024340be Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 11 Jan 2017 15:04:50 +0200 Subject: MAINT-7048 FIXED Changes in wearables are not saved properly --- indra/newview/llsidepanelappearance.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp index 03fa2e2080..3e95811bb8 100644 --- a/indra/newview/llsidepanelappearance.cpp +++ b/indra/newview/llsidepanelappearance.cpp @@ -394,11 +394,6 @@ void LLSidepanelAppearance::toggleWearableEditPanel(BOOL visible, LLViewerWearab return; } - if(!visible) - { - mEditWearable->setWearable(NULL); - } - // If we're just switching between outfit and wearable editing or updating item, // don't end customization and don't switch camera // Don't end customization and don't switch camera without visibility change @@ -426,6 +421,7 @@ void LLSidepanelAppearance::toggleWearableEditPanel(BOOL visible, LLViewerWearab { // Save changes if closing. mEditWearable->saveChanges(); + mEditWearable->setWearable(NULL); LLAppearanceMgr::getInstance()->updateIsDirty(); if (change_state) { -- cgit v1.2.3 From 187caf851561aa874d598763d0a7a6a8862a79de Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 11 Jan 2017 13:07:01 +0200 Subject: MAINT-2001 Fixed the width of columns cannot be changed in Inspect Object --- indra/llui/llscrolllistctrl.cpp | 4 ++-- indra/newview/skins/default/xui/en/floater_inspect.xml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index db8fdc46b7..1190c5bb94 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -648,7 +648,7 @@ bool LLScrollListCtrl::updateColumnWidths() S32 new_width = 0; if (column->mRelWidth >= 0) { - new_width = (S32)ll_round(column->mRelWidth*mItemListRect.getWidth()); + new_width = (S32)ll_round(column->mRelWidth * (mItemListRect.getWidth() - mTotalStaticColumnWidth - mTotalColumnPadding)); } else if (column->mDynamicWidth) { @@ -2680,7 +2680,7 @@ void LLScrollListCtrl::addColumn(const LLScrollListColumn::Params& column_params } if (new_column->mRelWidth >= 0) { - new_column->setWidth((S32)ll_round(new_column->mRelWidth*mItemListRect.getWidth())); + new_column->setWidth((S32)ll_round(new_column->mRelWidth * (mItemListRect.getWidth() - mTotalStaticColumnWidth - mTotalColumnPadding))); } else if(new_column->mDynamicWidth) { diff --git a/indra/newview/skins/default/xui/en/floater_inspect.xml b/indra/newview/skins/default/xui/en/floater_inspect.xml index bea35e5fc1..ae46736ddf 100644 --- a/indra/newview/skins/default/xui/en/floater_inspect.xml +++ b/indra/newview/skins/default/xui/en/floater_inspect.xml @@ -27,15 +27,15 @@ tool_tip="Select an object from this list to highlight it in-world" top="20"> Date: Fri, 13 Jan 2017 17:20:08 +0200 Subject: MAINT-1747 Fixed after switching Preferences tabs, radio buttons don't get focus on click --- indra/llui/llradiogroup.cpp | 53 ++++++++++++++++++++++++++++++++++----------- indra/llui/llradiogroup.h | 4 ++-- 2 files changed, 42 insertions(+), 15 deletions(-) diff --git a/indra/llui/llradiogroup.cpp b/indra/llui/llradiogroup.cpp index 8cf72928ff..2c7e7ab13d 100644 --- a/indra/llui/llradiogroup.cpp +++ b/indra/llui/llradiogroup.cpp @@ -54,6 +54,7 @@ public: /*virtual*/ void setValue(const LLSD& value); /*virtual*/ BOOL postBuild(); + /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask); LLSD getPayload() { return mPayload; } @@ -224,6 +225,22 @@ BOOL LLRadioGroup::setSelectedIndex(S32 index, BOOL from_event) return TRUE; } +void LLRadioGroup::focusSelectedRadioBtn() +{ + if (mSelectedIndex >= 0) + { + LLRadioCtrl* radio_item = mRadioButtons[mSelectedIndex]; + if (radio_item->hasTabStop() && radio_item->getEnabled()) + { + radio_item->focusFirstItem(FALSE, FALSE); + } + } + else if (mRadioButtons[0]->hasTabStop() || hasTabStop()) + { + focusFirstItem(FALSE, FALSE); + } +} + BOOL LLRadioGroup::handleKeyHere(KEY key, MASK mask) { BOOL handled = FALSE; @@ -283,19 +300,6 @@ BOOL LLRadioGroup::handleKeyHere(KEY key, MASK mask) return handled; } -BOOL LLRadioGroup::handleMouseDown(S32 x, S32 y, MASK mask) -{ - // grab focus preemptively, before child button takes mousecapture - // - if (hasTabStop()) - { - focusFirstItem(FALSE, FALSE); - } - - return LLUICtrl::handleMouseDown(x, y, mask); -} - - // Handle one button being clicked. All child buttons must have this // function as their callback function. @@ -466,6 +470,29 @@ BOOL LLRadioCtrl::postBuild() return TRUE; } +BOOL LLRadioCtrl::handleMouseDown(S32 x, S32 y, MASK mask) +{ + // Grab focus preemptively, before button takes mousecapture + if (hasTabStop() && getEnabled()) + { + focusFirstItem(FALSE, FALSE); + } + else + { + // Only currently selected item in group has tab stop as result it is + // unclear how focus should behave on click, just let the group handle + // focus and LLRadioGroup::onClickButton() will set correct state later + // if needed + LLRadioGroup* parent = (LLRadioGroup*)getParent(); + if (parent) + { + parent->focusSelectedRadioBtn(); + } + } + + return LLCheckBoxCtrl::handleMouseDown(x, y, mask); +} + LLRadioCtrl::~LLRadioCtrl() { } diff --git a/indra/llui/llradiogroup.h b/indra/llui/llradiogroup.h index 8bd5698538..dcb2f43bfe 100644 --- a/indra/llui/llradiogroup.h +++ b/indra/llui/llradiogroup.h @@ -66,8 +66,6 @@ public: virtual BOOL postBuild(); - virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); - virtual BOOL handleKeyHere(KEY key, MASK mask); void setIndexEnabled(S32 index, BOOL enabled); @@ -75,6 +73,8 @@ public: S32 getSelectedIndex() const { return mSelectedIndex; } // set the index value programatically BOOL setSelectedIndex(S32 index, BOOL from_event = FALSE); + // foxus child by index if it can get focus + void focusSelectedRadioBtn(); // Accept and retrieve strings of the radio group control names virtual void setValue(const LLSD& value ); -- cgit v1.2.3 From 9779917899be2a31bb0cf7aa5df850837354a83b Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Mon, 16 Jan 2017 11:26:10 +0200 Subject: MAINT-1689 The object that was created after opening Linkset is not presented in linkset list --- indra/newview/llfloaterpathfindingobjects.cpp | 13 ++++++++++--- indra/newview/llfloaterpathfindingobjects.h | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/indra/newview/llfloaterpathfindingobjects.cpp b/indra/newview/llfloaterpathfindingobjects.cpp index f6ff83eaf4..5cf16f3ad6 100644 --- a/indra/newview/llfloaterpathfindingobjects.cpp +++ b/indra/newview/llfloaterpathfindingobjects.cpp @@ -329,7 +329,7 @@ void LLFloaterPathfindingObjects::handleUpdateObjectList(LLPathfindingManager::r } } -void LLFloaterPathfindingObjects::rebuildObjectsScrollList() +void LLFloaterPathfindingObjects::rebuildObjectsScrollList(bool update_if_needed) { if (!mHasObjectsToBeSelected) { @@ -355,7 +355,14 @@ void LLFloaterPathfindingObjects::rebuildObjectsScrollList() { buildObjectsScrollList(mObjectList); - mObjectsScrollList->selectMultiple(mObjectsToBeSelected); + if(mObjectsScrollList->selectMultiple(mObjectsToBeSelected) == 0) + { + if(update_if_needed && mRefreshListButton->getEnabled()) + { + requestGetObjects(); + return; + } + } if (mHasObjectsToBeSelected) { mObjectsScrollList->scrollToShowSelected(); @@ -484,7 +491,7 @@ void LLFloaterPathfindingObjects::showFloaterWithSelectionObjects() } else { - rebuildObjectsScrollList(); + rebuildObjectsScrollList(true); if (isMinimized()) { setMinimized(FALSE); diff --git a/indra/newview/llfloaterpathfindingobjects.h b/indra/newview/llfloaterpathfindingobjects.h index 4024e15fd6..752f741959 100644 --- a/indra/newview/llfloaterpathfindingobjects.h +++ b/indra/newview/llfloaterpathfindingobjects.h @@ -80,7 +80,7 @@ protected: void handleNewObjectList(LLPathfindingManager::request_id_t pRequestId, LLPathfindingManager::ERequestStatus pRequestStatus, LLPathfindingObjectListPtr pObjectList); void handleUpdateObjectList(LLPathfindingManager::request_id_t pRequestId, LLPathfindingManager::ERequestStatus pRequestStatus, LLPathfindingObjectListPtr pObjectList); - void rebuildObjectsScrollList(); + void rebuildObjectsScrollList(bool update_if_needed = false); virtual void buildObjectsScrollList(const LLPathfindingObjectListPtr pObjectListPtr); void addObjectToScrollList(const LLPathfindingObjectPtr pObjectPr, const LLSD &pScrollListItemData); -- cgit v1.2.3 From 9121738b5b13d74dbc75a45605533d5fba31c089 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Mon, 16 Jan 2017 11:32:24 +0200 Subject: MAINT-1245 FIXED Script error particle not displaying above agent when script error comes from a HUD --- indra/newview/llfloaterscriptdebug.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/indra/newview/llfloaterscriptdebug.cpp b/indra/newview/llfloaterscriptdebug.cpp index 6c17f62c1e..5f4bc9d301 100644 --- a/indra/newview/llfloaterscriptdebug.cpp +++ b/indra/newview/llfloaterscriptdebug.cpp @@ -34,6 +34,7 @@ #include "llrect.h" #include "llerror.h" #include "llstring.h" +#include "llvoavatarself.h" #include "message.h" // project include @@ -105,7 +106,14 @@ void LLFloaterScriptDebug::addScriptLine(const std::string &utf8mesg, const std: if (objectp) { - objectp->setIcon(LLViewerTextureManager::getFetchedTextureFromFile("script_error.j2c", FTT_LOCAL_FILE, TRUE, LLGLTexture::BOOST_UI)); + if(objectp->isHUDAttachment()) + { + ((LLViewerObject*)gAgentAvatarp)->setIcon(LLViewerTextureManager::getFetchedTextureFromFile("script_error.j2c", FTT_LOCAL_FILE, TRUE, LLGLTexture::BOOST_UI)); + } + else + { + objectp->setIcon(LLViewerTextureManager::getFetchedTextureFromFile("script_error.j2c", FTT_LOCAL_FILE, TRUE, LLGLTexture::BOOST_UI)); + } floater_label = llformat("%s(%.0f, %.0f, %.0f)", user_name.c_str(), objectp->getPositionRegion().mV[VX], -- cgit v1.2.3 From c4476c78f189b3b729881a66c263a3a842de1d6d Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 4 Jan 2017 10:51:52 +0200 Subject: MAINT-2438 When wearing 2 pair of identical pants, only one pair was editable --- indra/newview/llappearancemgr.cpp | 43 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 40 insertions(+), 3 deletions(-) diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index fc4be98fbd..046e829070 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -1227,11 +1227,12 @@ void LLWearableHoldingPattern::onWearableAssetFetch(LLViewerWearable *wearable) return; } + U32 use_count = 0; for (LLWearableHoldingPattern::found_list_t::iterator iter = getFoundList().begin(); - iter != getFoundList().end(); ++iter) + iter != getFoundList().end(); ++iter) { LLFoundData& data = *iter; - if(wearable->getAssetID() == data.mAssetID) + if (wearable->getAssetID() == data.mAssetID) { // Failing this means inventory or asset server are corrupted in a way we don't handle. if ((data.mWearableType >= LLWearableType::WT_COUNT) || (wearable->getType() != data.mWearableType)) @@ -1240,9 +1241,45 @@ void LLWearableHoldingPattern::onWearableAssetFetch(LLViewerWearable *wearable) break; } - data.mWearable = wearable; + if (use_count == 0) + { + data.mWearable = wearable; + use_count++; + } + else if (wearable->getPermissions().allowModifyBy(gAgent.getID())) + { + // We can't edit and do some other interactions with same asset twice, copy it + LLViewerWearable* new_wearable = LLWearableList::instance().createCopy(wearable, wearable->getName()); + data.mWearable = new_wearable; + data.mAssetID = new_wearable->getAssetID(); + + LLViewerInventoryItem* item = gInventory.getItem(data.mItemID); + if (item) + { + // Update existing inventory item + item->setAssetUUID(new_wearable->getAssetID()); + item->setTransactionID(new_wearable->getTransactionID()); + gInventory.updateItem(item, LLInventoryObserver::INTERNAL); + item->updateServer(FALSE); + } + use_count++; + } + else + { + // Note: technically a bug, LLViewerWearable can identify only one item id at a time, + // yet we are tying it to multiple items here. + // LLViewerWearable need to support more then one item. + LL_WARNS() << "Same LLViewerWearable is used by multiple items! " << wearable->getAssetID() << LL_ENDL; + data.mWearable = wearable; + } } } + + if (use_count > 1) + { + LL_WARNS() << "Copying wearable, multiple asset id uses! " << wearable->getAssetID() << LL_ENDL; + gInventory.notifyObservers(); + } } static void onWearableAssetFetch(LLViewerWearable* wearable, void* data) -- cgit v1.2.3 From 078f5d3c2aab2d2b4ecb7747b58bb1853c193e3e Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Tue, 17 Jan 2017 14:47:00 +0200 Subject: MAINT-275 Allow showing Beacons floater in mouse look --- indra/newview/app_settings/settings.xml | 1 + indra/newview/llagent.cpp | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 8ddb421ac3..1b09e44644 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -14732,6 +14732,7 @@ snapshot postcard mini_map + beacons LandmarksSortedByDate diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index cfb09d329b..7d0d39e22a 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -2050,7 +2050,10 @@ void LLAgent::endAnimationUpdateUI() { skip_list.insert(LLFloaterReg::findInstance("mini_map")); } - + if (LLFloaterReg::findInstance("beacons")) + { + skip_list.insert(LLFloaterReg::findInstance("beacons")); + } LLFloaterIMContainer* im_box = LLFloaterReg::getTypedInstance("im_container"); LLFloaterIMContainer::floater_list_t conversations; im_box->getDetachedConversationFloaters(conversations); @@ -2172,6 +2175,7 @@ void LLAgent::endAnimationUpdateUI() #else // Use this for now LLFloaterView::skip_list_t skip_list; skip_list.insert(LLFloaterReg::findInstance("mini_map")); + skip_list.insert(LLFloaterReg::findInstance("beacons")); gFloaterView->pushVisibleAll(FALSE, skip_list); #endif -- cgit v1.2.3 From 5d7c5ea4d22d1d313a2c531f1f05be94e07a8036 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 18 Jan 2017 12:20:55 +0200 Subject: MAINT-7059 [contribution] Import of custom spellcheck dictionary fails silently --- doc/contributions.txt | 1 + indra/llui/llspellcheck.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/doc/contributions.txt b/doc/contributions.txt index 46286f99c1..0fb6110adb 100755 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -213,6 +213,7 @@ Ansariel Hiller STORM-2141 MAINT-6953 MAINT-7028 + MAINT-7059 Aralara Rajal Arare Chantilly CHUIBUG-191 diff --git a/indra/llui/llspellcheck.cpp b/indra/llui/llspellcheck.cpp index 0db4281059..5a52600337 100644 --- a/indra/llui/llspellcheck.cpp +++ b/indra/llui/llspellcheck.cpp @@ -161,6 +161,7 @@ void LLSpellChecker::refreshDictionaryMap() } // Load user installed dictionary information + user_filename = user_path + DICT_FILE_USER; llifstream custom_file(user_filename.c_str(), std::ios::binary); if (custom_file.is_open()) { -- cgit v1.2.3 From 84a9a78124661ab3c19551343eb6ec28e0eb2a8b Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Wed, 18 Jan 2017 18:28:15 +0200 Subject: MAINT-7061 Don't show the release notes floater for local builds --- indra/newview/llstartup.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 628b419304..5459ddc439 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -2263,6 +2263,7 @@ void login_callback(S32 option, void *userdata) void show_release_notes_if_required() { if (LLVersionInfo::getChannelAndVersion() != gLastRunVersion + && LLVersionInfo::getChannel() != "Second Life Test" // don't show Release Notes for the test builds && gSavedSettings.getBOOL("UpdaterShowReleaseNotes") && !gSavedSettings.getBOOL("FirstLoginThisInstall")) { -- cgit v1.2.3 From b18bf7e67268ec3f818f7a89159e529fe4395369 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Thu, 19 Jan 2017 17:28:53 +0200 Subject: MAINT-7066 Issues where viewer always asks to use previous screenshot when filing abuse report. --- indra/newview/llfloaterreporter.cpp | 43 ++++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp index 790e2b3ad1..275554540e 100644 --- a/indra/newview/llfloaterreporter.cpp +++ b/indra/newview/llfloaterreporter.cpp @@ -510,50 +510,59 @@ void LLFloaterReporter::showFromMenu(EReportType report_type) LL_WARNS() << "Unknown LLViewerReporter type : " << report_type << LL_ENDL; return; } - - LLFloaterReporter* f = LLFloaterReg::showTypedInstance("reporter", LLSD()); - if (f) + LLFloaterReporter* reporter_floater = LLFloaterReg::findTypedInstance("reporter"); + if(reporter_floater && reporter_floater->isInVisibleChain()) + { + gSavedPerAccountSettings.setBOOL("PreviousScreenshotForReport", FALSE); + } + reporter_floater = LLFloaterReg::showTypedInstance("reporter", LLSD()); + if (reporter_floater) { - f->setReportType(report_type); + reporter_floater->setReportType(report_type); } } // static void LLFloaterReporter::show(const LLUUID& object_id, const std::string& avatar_name, const LLUUID& experience_id) { - LLFloaterReporter* f = LLFloaterReg::showTypedInstance("reporter"); - + LLFloaterReporter* reporter_floater = LLFloaterReg::findTypedInstance("reporter"); + if(reporter_floater && reporter_floater->isInVisibleChain()) + { + gSavedPerAccountSettings.setBOOL("PreviousScreenshotForReport", FALSE); + } + reporter_floater = LLFloaterReg::showTypedInstance("reporter"); if (avatar_name.empty()) { // Request info for this object - f->getObjectInfo(object_id); + reporter_floater->getObjectInfo(object_id); } else { - f->setFromAvatarID(object_id); + reporter_floater->setFromAvatarID(object_id); } if(experience_id.notNull()) { - f->getExperienceInfo(experience_id); + reporter_floater->getExperienceInfo(experience_id); } // Need to deselect on close - f->mDeselectOnClose = TRUE; - - f->openFloater(); + reporter_floater->mDeselectOnClose = TRUE; } void LLFloaterReporter::showFromExperience( const LLUUID& experience_id ) { - LLFloaterReporter* f = LLFloaterReg::showTypedInstance("reporter"); - f->getExperienceInfo(experience_id); + LLFloaterReporter* reporter_floater = LLFloaterReg::findTypedInstance("reporter"); + if(reporter_floater && reporter_floater->isInVisibleChain()) + { + gSavedPerAccountSettings.setBOOL("PreviousScreenshotForReport", FALSE); + } + reporter_floater = LLFloaterReg::showTypedInstance("reporter"); + reporter_floater->getExperienceInfo(experience_id); // Need to deselect on close - f->mDeselectOnClose = TRUE; - - f->openFloater(); + reporter_floater->mDeselectOnClose = TRUE; } -- cgit v1.2.3 From b64fe9899d5368acdb77c7838675a3439e01c243 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 19 Jan 2017 20:15:59 +0200 Subject: MAINT-2159 Fixed Health Meter Not Aligned --- indra/newview/skins/default/xui/en/widgets/location_input.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en/widgets/location_input.xml b/indra/newview/skins/default/xui/en/widgets/location_input.xml index 61ec046649..674be59753 100644 --- a/indra/newview/skins/default/xui/en/widgets/location_input.xml +++ b/indra/newview/skins/default/xui/en/widgets/location_input.xml @@ -133,7 +133,7 @@ name="damage_text" width="35" height="18" - top="17" + top="18" follows="right|top" halign="right" font="SansSerifSmall" -- cgit v1.2.3 From e2bb0c170eb3f7db73fa8d96336f3920552937b2 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Mon, 23 Jan 2017 19:51:58 +0200 Subject: MAINT-1322 IMs from users with muted voice (but not text) should be received --- indra/newview/llimview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 2405c3a1a3..5b797a3f25 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -2703,7 +2703,7 @@ void LLIMMgr::addMessage( // Logically it would make more sense to reject the session sooner, in another area of the // code, but the session has to be established inside the server before it can be left. - if (LLMuteList::getInstance()->isMuted(other_participant_id) && !from_linden) + if (LLMuteList::getInstance()->isMuted(other_participant_id, LLMute::flagTextChat) && !from_linden) { LL_WARNS() << "Leaving IM session from initiating muted resident " << from << LL_ENDL; if(!gIMMgr->leaveSession(new_session_id)) -- cgit v1.2.3 From d4b7c6bfd503a1c7904ce658b4c1f120689e5fd9 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Tue, 24 Jan 2017 12:35:52 +0200 Subject: MAINT-7067 Issue with UI artifacts showing up in Abuse Report screenshots. --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llfloaterreporter.cpp | 16 +++++++++++++--- indra/newview/llfloaterreporter.h | 2 ++ 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 1b09e44644..717deba8c7 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -11812,6 +11812,17 @@ Value 75 + AbuseReportScreenshotDelay + + Comment + Time delay before taking screenshot to avoid UI artifacts. + Persist + 1 + Type + F32 + Value + 0.3 + SpeedTest Comment diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp index 275554540e..515c2b0c4b 100644 --- a/indra/newview/llfloaterreporter.cpp +++ b/indra/newview/llfloaterreporter.cpp @@ -35,6 +35,7 @@ #include "llassetstorage.h" #include "llavatarnamecache.h" #include "llcachename.h" +#include "llcallbacklist.h" #include "llcheckboxctrl.h" #include "llfontgl.h" #include "llimagebmp.h" @@ -211,7 +212,7 @@ BOOL LLFloaterReporter::postBuild() // grab the user's name std::string reporter = LLSLURL("agent", gAgent.getID(), "inspect").getSLURLString(); getChild("reporter_field")->setValue(reporter); - + center(); return TRUE; @@ -837,8 +838,9 @@ void LLFloaterReporter::takeScreenshot(bool use_prev_screenshot) } } -void LLFloaterReporter::onOpen(const LLSD& key) +void LLFloaterReporter::takeNewSnapshot() { + childSetEnabled("send_btn", true); mImageRaw = new LLImageRaw; const S32 IMAGE_WIDTH = 1024; const S32 IMAGE_HEIGHT = 768; @@ -867,10 +869,18 @@ void LLFloaterReporter::onOpen(const LLSD& key) } } } - takeScreenshot(); } + +void LLFloaterReporter::onOpen(const LLSD& key) +{ + childSetEnabled("send_btn", false); + //Time delay to avoid UI artifacts. MAINT-7067 + doAfterInterval(boost::bind(&LLFloaterReporter::takeNewSnapshot,this), gSavedSettings.getF32("AbuseReportScreenshotDelay")); + +} + void LLFloaterReporter::onLoadScreenshotDialog(const LLSD& notification, const LLSD& response) { S32 option = LLNotificationsUtil::getSelectedOption(notification, response); diff --git a/indra/newview/llfloaterreporter.h b/indra/newview/llfloaterreporter.h index e5232268c0..decc01be98 100644 --- a/indra/newview/llfloaterreporter.h +++ b/indra/newview/llfloaterreporter.h @@ -107,6 +107,8 @@ public: void onLoadScreenshotDialog(const LLSD& notification, const LLSD& response); + void takeNewSnapshot(); + private: static void show(const LLUUID& object_id, const std::string& avatar_name = LLStringUtil::null, const LLUUID& experience_id = LLUUID::null); -- cgit v1.2.3 From 6b1245aa1eeda1585f36497cdcf1c7e6cd2c3bdb Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Tue, 24 Jan 2017 18:00:13 +0200 Subject: MAINT-1322 Voice calls from users with muted text (but not voice) should be received --- indra/newview/llimview.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 5b797a3f25..2e9332c355 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -3011,14 +3011,20 @@ void LLIMMgr::inviteToSession( payload["question_type"] = question_type; //ignore invites from muted residents - if (LLMuteList::getInstance()->isMuted(caller_id) && !is_linden) + if (!is_linden) { - if (voice_invite && "VoiceInviteQuestionDefault" == question_type) + if (LLMuteList::getInstance()->isMuted(caller_id, LLMute::flagVoiceChat) + && voice_invite && "VoiceInviteQuestionDefault" == question_type) { LL_INFOS() << "Rejecting voice call from initiating muted resident " << caller_name << LL_ENDL; LLIncomingCallDialog::processCallResponse(1, payload); + return; + } + else if (LLMuteList::getInstance()->isMuted(caller_id, LLMute::flagAll & ~LLMute::flagVoiceChat)) + { + LL_INFOS() << "Rejecting session invite from initiating muted resident " << caller_name << LL_ENDL; + return; } - return; } LLVoiceChannel* channelp = LLVoiceChannel::getChannelByID(session_id); -- cgit v1.2.3 From a661367644cee230637e7ee974f49f6b81f4ff8e Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 25 Jan 2017 11:31:22 +0200 Subject: MAINT-7056 Viewer crash when opening many scripts. --- indra/newview/llsyntaxid.cpp | 4 ++++ indra/newview/llsyntaxid.h | 1 + 2 files changed, 5 insertions(+) diff --git a/indra/newview/llsyntaxid.cpp b/indra/newview/llsyntaxid.cpp index 9e54c521b5..10a9dee415 100644 --- a/indra/newview/llsyntaxid.cpp +++ b/indra/newview/llsyntaxid.cpp @@ -50,6 +50,7 @@ LLSyntaxIdLSL::LLSyntaxIdLSL() , mCapabilityURL(std::string()) , mFilePath(LL_PATH_APP_SETTINGS) , mSyntaxId(LLUUID()) +, mInitialized(false) { loadDefaultKeywordsIntoLLSD(); mRegionChangedCallback = gAgent.addRegionChangedCallback(boost::bind(&LLSyntaxIdLSL::handleRegionChanged, this)); @@ -179,6 +180,7 @@ void LLSyntaxIdLSL::cacheFile(const std::string &fileSpec, const LLSD& content_r //----------------------------------------------------------------------------- void LLSyntaxIdLSL::initialize() { + if(mInitialized) return; if (mSyntaxId.isNull()) { loadDefaultKeywordsIntoLLSD(); @@ -213,6 +215,7 @@ void LLSyntaxIdLSL::initialize() LL_DEBUGS("SyntaxLSL") << "LSLSyntaxId capability URL is empty." << LL_ENDL; loadDefaultKeywordsIntoLLSD(); } + mInitialized = true; } //----------------------------------------------------------------------------- @@ -303,6 +306,7 @@ void LLSyntaxIdLSL::handleRegionChanged() { buildFullFileSpec(); fetchKeywordsFile(mFullFileSpec); + mInitialized = false; } } diff --git a/indra/newview/llsyntaxid.h b/indra/newview/llsyntaxid.h index 1360b3e042..caddba5527 100644 --- a/indra/newview/llsyntaxid.h +++ b/indra/newview/llsyntaxid.h @@ -65,6 +65,7 @@ private: ELLPath mFilePath; LLUUID mSyntaxId; LLSD mKeywordsXml; + bool mInitialized; public: void initialize(); -- cgit v1.2.3 From 9d67a4910d65941151d8f59395624b901b5da306 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 25 Jan 2017 18:03:18 +0200 Subject: MAINT-7072 Edit menu shows land impact of object you are sitting on instead of 0 when selecting your attachment --- indra/newview/llselectmgr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index dd934ce6b8..e4641d8721 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -7101,7 +7101,7 @@ F32 LLObjectSelection::getSelectedLinksetCost() LLSelectNode* node = *iter; LLViewerObject* object = node->getObject(); - if (object) + if (object && !object->isAttachment()) { LLViewerObject* root = static_cast(object->getRoot()); if (root) -- cgit v1.2.3 From ce2cbdc4b5f4eb25d09bbef43358e8694d200812 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 25 Jan 2017 21:59:47 +0200 Subject: MAINT-309 Fixed top and bottom cube faces do not show a selection silhouette --- indra/llmath/llvolume.cpp | 135 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 131 insertions(+), 4 deletions(-) diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index 6f0b4b2410..7a54d83b3f 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -3697,10 +3697,46 @@ void LLVolume::generateSilhouetteVertices(std::vector &vertices, continue; } - if (face.mTypeMask & (LLVolumeFace::CAP_MASK)) { + if (face.mTypeMask & (LLVolumeFace::CAP_MASK)) + { + LLVector4a* v = (LLVector4a*)face.mPositions; + LLVector4a* n = (LLVector4a*)face.mNormals; + + for (U32 j = 0; j < face.mNumIndices / 3; j++) + { + for (S32 k = 0; k < 3; k++) + { + S32 index = face.mEdge[j * 3 + k]; + + if (index == -1) + { + // silhouette edge, currently only cubes, so no other conditions + + S32 v1 = face.mIndices[j * 3 + k]; + S32 v2 = face.mIndices[j * 3 + ((k + 1) % 3)]; + + LLVector4a t; + mat.affineTransform(v[v1], t); + vertices.push_back(LLVector3(t[0], t[1], t[2])); + + norm_mat.rotate(n[v1], t); + + t.normalize3fast(); + normals.push_back(LLVector3(t[0], t[1], t[2])); + + mat.affineTransform(v[v2], t); + vertices.push_back(LLVector3(t[0], t[1], t[2])); + + norm_mat.rotate(n[v2], t); + t.normalize3fast(); + normals.push_back(LLVector3(t[0], t[1], t[2])); + } + } + } } - else { + else + { //============================================== //DEBUG draw edge map instead of silhouette edge @@ -5549,10 +5585,17 @@ BOOL LLVolumeFace::createUnCutCubeCap(LLVolume* volume, BOOL partial_build) if (!partial_build) { resizeIndices(grid_size*grid_size*6); + if (!volume->isMeshAssetLoaded()) + { + mEdge.resize(grid_size*grid_size * 6); + } U16* out = mIndices; S32 idxs[] = {0,1,(grid_size+1)+1,(grid_size+1)+1,(grid_size+1),0}; + + int cur_edge = 0; + for(S32 gx = 0;gx=0;i--) { *out++ = ((gy*(grid_size+1))+gx+idxs[i]); - } + } + + S32 edge_value = grid_size * 2 * gy + gx * 2; + + if (gx > 0) + { + mEdge[cur_edge++] = edge_value; + } + else + { + mEdge[cur_edge++] = -1; // Mark face to higlight it + } + + if (gy < grid_size - 1) + { + mEdge[cur_edge++] = edge_value; + } + else + { + mEdge[cur_edge++] = -1; + } + + mEdge[cur_edge++] = edge_value; + + if (gx < grid_size - 1) + { + mEdge[cur_edge++] = edge_value; + } + else + { + mEdge[cur_edge++] = -1; + } + + if (gy > 0) + { + mEdge[cur_edge++] = edge_value; + } + else + { + mEdge[cur_edge++] = -1; + } + + mEdge[cur_edge++] = edge_value; } else { @@ -5571,8 +5656,50 @@ BOOL LLVolumeFace::createUnCutCubeCap(LLVolume* volume, BOOL partial_build) { *out++ = ((gy*(grid_size+1))+gx+idxs[i]); } + + S32 edge_value = grid_size * 2 * gy + gx * 2; + + if (gy > 0) + { + mEdge[cur_edge++] = edge_value; + } + else + { + mEdge[cur_edge++] = -1; + } + + if (gx < grid_size - 1) + { + mEdge[cur_edge++] = edge_value; + } + else + { + mEdge[cur_edge++] = -1; + } + + mEdge[cur_edge++] = edge_value; + + if (gy < grid_size - 1) + { + mEdge[cur_edge++] = edge_value; + } + else + { + mEdge[cur_edge++] = -1; + } + + if (gx > 0) + { + mEdge[cur_edge++] = edge_value; + } + else + { + mEdge[cur_edge++] = -1; + } + + mEdge[cur_edge++] = edge_value; } - } + } } } -- cgit v1.2.3 From c5c24fac976e5439a2c2484c2ddc9882192f2b5f Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Thu, 26 Jan 2017 18:59:34 +0200 Subject: MAINT-7061 Make the check TPV friendly --- indra/newview/llstartup.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 5459ddc439..57a06da287 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -2263,7 +2263,7 @@ void login_callback(S32 option, void *userdata) void show_release_notes_if_required() { if (LLVersionInfo::getChannelAndVersion() != gLastRunVersion - && LLVersionInfo::getChannel() != "Second Life Test" // don't show Release Notes for the test builds + && LLVersionInfo::getChannel().find("Test") == std::string::npos // don't show Release Notes for the test builds && gSavedSettings.getBOOL("UpdaterShowReleaseNotes") && !gSavedSettings.getBOOL("FirstLoginThisInstall")) { -- cgit v1.2.3 From b94aa751c93b2c9bf9a9567946fe388a7c475d77 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 17 Jan 2017 20:11:00 +0200 Subject: MAINT-6959 Ability to set custom folders for uploading items --- .../newview/app_settings/settings_per_account.xml | 44 +++++++ indra/newview/llfloaterpreference.cpp | 64 +++++++++- indra/newview/llfloaterpreference.h | 4 + indra/newview/llinventorybridge.cpp | 3 + indra/newview/llinventorymodel.cpp | 36 ++++++ indra/newview/llinventorymodel.h | 3 + indra/newview/llinventorypanel.cpp | 23 +++- indra/newview/llinventorypanel.h | 1 + indra/newview/llmeshrepository.cpp | 12 +- indra/newview/llviewerassetupload.cpp | 3 +- .../skins/default/xui/en/floater_preferences.xml | 7 + .../skins/default/xui/en/menu_inventory.xml | 37 ++++++ .../default/xui/en/panel_preferences_uploads.xml | 142 +++++++++++++++++++++ 13 files changed, 369 insertions(+), 10 deletions(-) create mode 100644 indra/newview/skins/default/xui/en/panel_preferences_uploads.xml diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml index eee13fb28e..92e61d2e86 100644 --- a/indra/newview/app_settings/settings_per_account.xml +++ b/indra/newview/app_settings/settings_per_account.xml @@ -348,5 +348,49 @@ Value 1 + ModelUploadFolder + + Comment + All model uploads will be stored in this directory (UUID) + Persist + 1 + Type + String + Value + + + TextureUploadFolder + + Comment + All image(texture) uploads will be stored in this directory (UUID) + Persist + 1 + Type + String + Value + + + SoundUploadFolder + + Comment + All sound uploads will be stored in this directory (UUID) + Persist + 1 + Type + String + Value + + + AnimationUploadFolder + + Comment + All animation uploads will be stored in this directory (UUID) + Persist + 1 + Type + String + Value + + diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 100ee5ab72..02dffa7f08 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -467,6 +467,11 @@ BOOL LLFloaterPreference::postBuild() gSavedSettings.getControl("PreferredMaturity")->getSignal()->connect(boost::bind(&LLFloaterPreference::onChangeMaturity, this)); + gSavedPerAccountSettings.getControl("ModelUploadFolder")->getSignal()->connect(boost::bind(&LLFloaterPreference::onChangeModelFolder, this)); + gSavedPerAccountSettings.getControl("TextureUploadFolder")->getSignal()->connect(boost::bind(&LLFloaterPreference::onChangeTextureFolder, this)); + gSavedPerAccountSettings.getControl("SoundUploadFolder")->getSignal()->connect(boost::bind(&LLFloaterPreference::onChangeSoundFolder, this)); + gSavedPerAccountSettings.getControl("AnimationUploadFolder")->getSignal()->connect(boost::bind(&LLFloaterPreference::onChangeAnimationFolder, this)); + LLTabContainer* tabcontainer = getChild("pref core"); if (!tabcontainer->selectTab(gSavedSettings.getS32("LastPrefTab"))) tabcontainer->selectFirstTab(); @@ -501,6 +506,7 @@ BOOL LLFloaterPreference::postBuild() fov_slider->setMinValue(LLViewerCamera::getInstance()->getMinView()); fov_slider->setMaxValue(LLViewerCamera::getInstance()->getMaxView()); + return TRUE; } @@ -742,7 +748,12 @@ void LLFloaterPreference::onOpen(const LLSD& key) // Display selected maturity icons. onChangeMaturity(); - + + onChangeModelFolder(); + onChangeTextureFolder(); + onChangeSoundFolder(); + onChangeAnimationFolder(); + // Load (double-)click to walk/teleport settings. updateClickActionControls(); @@ -1979,6 +1990,57 @@ void LLFloaterPreference::onChangeMaturity() getChild("rating_icon_adult")->setVisible(sim_access == SIM_ACCESS_ADULT); } +std::string get_category_path(LLUUID cat_id) +{ + LLViewerInventoryCategory* cat = gInventory.getCategory(cat_id); + if (cat->getParentUUID().notNull()) + { + return get_category_path(cat->getParentUUID()) + " > " + cat->getName(); + } + else + { + return cat->getName(); + } +} + +std::string get_category_path(LLFolderType::EType cat_type) +{ + LLUUID cat_id = gInventory.findUserDefinedCategoryUUIDForType(cat_type); + return get_category_path(cat_id); +} + +void LLFloaterPreference::onChangeModelFolder() +{ + if (gInventory.isInventoryUsable()) + { + getChild("upload_models")->setText(get_category_path(LLFolderType::FT_OBJECT)); + } +} + +void LLFloaterPreference::onChangeTextureFolder() +{ + if (gInventory.isInventoryUsable()) + { + getChild("upload_textures")->setText(get_category_path(LLFolderType::FT_TEXTURE)); + } +} + +void LLFloaterPreference::onChangeSoundFolder() +{ + if (gInventory.isInventoryUsable()) + { + getChild("upload_sounds")->setText(get_category_path(LLFolderType::FT_SOUND)); + } +} + +void LLFloaterPreference::onChangeAnimationFolder() +{ + if (gInventory.isInventoryUsable()) + { + getChild("upload_animation")->setText(get_category_path(LLFolderType::FT_ANIMATION)); + } +} + // FIXME: this will stop you from spawning the sidetray from preferences dialog on login screen // but the UI for this will still be enabled void LLFloaterPreference::onClickBlockList() diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index fa0c09e97a..ea199cf034 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -161,6 +161,10 @@ public: void onCommitMusicEnabled(); void applyResolution(); void onChangeMaturity(); + void onChangeModelFolder(); + void onChangeTextureFolder(); + void onChangeSoundFolder(); + void onChangeAnimationFolder(); void onClickBlockList(); void onClickProxySettings(); void onClickTranslationSettings(); diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 1de579d4c3..b7f5424f25 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -3789,6 +3789,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items disabled_items.push_back(std::string("New Gesture")); disabled_items.push_back(std::string("New Clothes")); disabled_items.push_back(std::string("New Body Parts")); + disabled_items.push_back(std::string("upload_def")); } if (favorites == mUUID) { @@ -3815,6 +3816,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items disabled_items.push_back(std::string("New Gesture")); disabled_items.push_back(std::string("New Clothes")); disabled_items.push_back(std::string("New Body Parts")); + disabled_items.push_back(std::string("upload_def")); } if (marketplace_listings_id == mUUID) { @@ -3864,6 +3866,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items items.push_back(std::string("New Gesture")); items.push_back(std::string("New Clothes")); items.push_back(std::string("New Body Parts")); + items.push_back(std::string("upload_def")); } } getClipboardEntries(false, items, disabled_items, flags); diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 503fa28a33..287fa4c45b 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -515,6 +515,42 @@ const LLUUID LLInventoryModel::findCategoryUUIDForType(LLFolderType::EType prefe return findCategoryUUIDForTypeInRoot(preferred_type, create_folder, gInventory.getRootFolderID()); } +const LLUUID LLInventoryModel::findUserDefinedCategoryUUIDForType(LLFolderType::EType preferred_type) +{ + LLUUID cat_id; + switch (preferred_type) + { + case LLFolderType::FT_OBJECT: + { + cat_id = LLUUID(gSavedPerAccountSettings.getString("ModelUploadFolder")); + break; + } + case LLFolderType::FT_TEXTURE: + { + cat_id = LLUUID(gSavedPerAccountSettings.getString("TextureUploadFolder")); + break; + } + case LLFolderType::FT_SOUND: + { + cat_id = LLUUID(gSavedPerAccountSettings.getString("SoundUploadFolder")); + break; + } + case LLFolderType::FT_ANIMATION: + { + cat_id = LLUUID(gSavedPerAccountSettings.getString("AnimationUploadFolder")); + break; + } + default: + break; + } + + if (cat_id.isNull() || !getCategory(cat_id)) + { + cat_id = findCategoryUUIDForTypeInRoot(preferred_type, true, getRootFolderID()); + } + return cat_id; +} + const LLUUID LLInventoryModel::findLibraryCategoryUUIDForType(LLFolderType::EType preferred_type, bool create_folder) { return findCategoryUUIDForTypeInRoot(preferred_type, create_folder, gInventory.getLibraryRootFolderID()); diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h index 826d1f880d..dee1769172 100644 --- a/indra/newview/llinventorymodel.h +++ b/indra/newview/llinventorymodel.h @@ -287,6 +287,9 @@ public: // will search in the user's library folder instead of "My Inventory" const LLUUID findLibraryCategoryUUIDForType(LLFolderType::EType preferred_type, bool create_folder = true); + // Returns user specified category for uploads, returns default id if there are no + // user specified one or it does not exist, creates default category if it is missing. + const LLUUID findUserDefinedCategoryUUIDForType(LLFolderType::EType preferred_type); // Get whatever special folder this object is a child of, if any. const LLViewerInventoryCategory *getFirstNondefaultParent(const LLUUID& obj_id) const; diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 6a27c0fe21..bd15ba4975 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -167,7 +167,7 @@ LLInventoryPanel::LLInventoryPanel(const LLInventoryPanel::Params& p) : mCommitCallbackRegistrar.add("Inventory.AttachObject", boost::bind(&LLInventoryPanel::attachObject, this, _2)); mCommitCallbackRegistrar.add("Inventory.BeginIMSession", boost::bind(&LLInventoryPanel::beginIMSession, this)); mCommitCallbackRegistrar.add("Inventory.Share", boost::bind(&LLAvatarActions::shareWithAvatars, this)); - + mCommitCallbackRegistrar.add("Inventory.FileUploadLocation", boost::bind(&LLInventoryPanel::fileUploadLocation, this, _2)); } LLFolderView * LLInventoryPanel::createFolderRoot(LLUUID root_id ) @@ -1190,6 +1190,27 @@ bool LLInventoryPanel::beginIMSession() return true; } +void LLInventoryPanel::fileUploadLocation(const LLSD& userdata) +{ + const std::string param = userdata.asString(); + if (param == "model") + { + gSavedPerAccountSettings.setString("ModelUploadFolder", LLFolderBridge::sSelf.get()->getUUID().asString()); + } + else if (param == "texture") + { + gSavedPerAccountSettings.setString("TextureUploadFolder", LLFolderBridge::sSelf.get()->getUUID().asString()); + } + else if (param == "sound") + { + gSavedPerAccountSettings.setString("SoundUploadFolder", LLFolderBridge::sSelf.get()->getUUID().asString()); + } + else if (param == "animation") + { + gSavedPerAccountSettings.setString("AnimationUploadFolder", LLFolderBridge::sSelf.get()->getUUID().asString()); + } +} + bool LLInventoryPanel::attachObject(const LLSD& userdata) { // Copy selected item UUIDs to a vector. diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h index b69edd8b93..5cb9dde47a 100644 --- a/indra/newview/llinventorypanel.h +++ b/indra/newview/llinventorypanel.h @@ -201,6 +201,7 @@ public: void doToSelected(const LLSD& userdata); void doCreate(const LLSD& userdata); bool beginIMSession(); + void fileUploadLocation(const LLSD& userdata); bool attachObject(const LLSD& userdata); static void idle(void* user_data); diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 9dacae2c4e..1a533dace7 100644 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -2030,8 +2030,8 @@ void LLMeshUploadThread::wholeModelToLLSD(LLSD& dest, bool include_textures) LLSD result; LLSD res; - result["folder_id"] = gInventory.findCategoryUUIDForType(LLFolderType::FT_OBJECT); - result["texture_folder_id"] = gInventory.findCategoryUUIDForType(LLFolderType::FT_TEXTURE); + result["folder_id"] = gInventory.findUserDefinedCategoryUUIDForType(LLFolderType::FT_OBJECT); + result["texture_folder_id"] = gInventory.findUserDefinedCategoryUUIDForType(LLFolderType::FT_TEXTURE); result["asset_type"] = "mesh"; result["inventory_type"] = "object"; result["description"] = "(No Description)"; @@ -3536,11 +3536,11 @@ void LLMeshRepository::notifyLoadedMeshes() // Handle addition of texture, if any. if ( data.mResponse.has("new_texture_folder_id") ) { - const LLUUID& folder_id = data.mResponse["new_texture_folder_id"].asUUID(); + const LLUUID& new_folder_id = data.mResponse["new_texture_folder_id"].asUUID(); - if ( folder_id.notNull() ) + if ( new_folder_id.notNull() ) { - LLUUID parent_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TEXTURE); + LLUUID parent_id = gInventory.findUserDefinedCategoryUUIDForType(LLFolderType::FT_TEXTURE); std::string name; // Check if the server built a different name for the texture folder @@ -3555,7 +3555,7 @@ void LLMeshRepository::notifyLoadedMeshes() // Add the category to the internal representation LLPointer cat = - new LLViewerInventoryCategory(folder_id, parent_id, + new LLViewerInventoryCategory(new_folder_id, parent_id, LLFolderType::FT_NONE, name, gAgent.getID()); cat->setVersion(LLViewerInventoryCategory::VERSION_UNKNOWN); diff --git a/indra/newview/llviewerassetupload.cpp b/indra/newview/llviewerassetupload.cpp index cafaf8645a..49d29c0e4e 100644 --- a/indra/newview/llviewerassetupload.cpp +++ b/indra/newview/llviewerassetupload.cpp @@ -307,10 +307,9 @@ void LLResourceUploadInfo::assignDefaults() mDescription = "(No Description)"; } - mFolderId = gInventory.findCategoryUUIDForType( + mFolderId = gInventory.findUserDefinedCategoryUUIDForType( (mDestinationFolderType == LLFolderType::FT_NONE) ? (LLFolderType::EType)mAssetType : mDestinationFolderType); - } std::string LLResourceUploadInfo::getDisplayName() const diff --git a/indra/newview/skins/default/xui/en/floater_preferences.xml b/indra/newview/skins/default/xui/en/floater_preferences.xml index 9a9101e0da..5ca527ad20 100644 --- a/indra/newview/skins/default/xui/en/floater_preferences.xml +++ b/indra/newview/skins/default/xui/en/floater_preferences.xml @@ -120,6 +120,13 @@ layout="topleft" help_topic="preferences_advanced1_tab" name="advanced1" /> + diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml index 5b8a9413bf..e1f9269c70 100644 --- a/indra/newview/skins/default/xui/en/menu_inventory.xml +++ b/indra/newview/skins/default/xui/en/menu_inventory.xml @@ -321,6 +321,43 @@ parameter="eyes" /> + + + + + + + + + + + + + + + + + Current destination folders for uploads + + + + Images + + + + + Sounds + + + + + Animations + + + + + Models + + + + + To change a destination folder, right click on it in inventory and choose + "Use as default for" + + -- cgit v1.2.3 From 56f9cce8a11cadff1b7c8cf7c001638bfe1155fb Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Wed, 25 Jan 2017 15:58:38 -0800 Subject: MAINT-7082: Remove waiting loop in frame when textures queued for download in alternate thread. With debug spam for observation. --- indra/newview/llappviewer.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index a0ebae119e..a148d3c30d 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1491,7 +1491,7 @@ bool LLAppViewer::frame() idleTimer.reset(); S32 total_work_pending = 0; S32 total_io_pending = 0; - while(1) + //while(1) { S32 work_pending = 0; S32 io_pending = 0; @@ -1515,11 +1515,15 @@ bool LLAppViewer::frame() total_work_pending += work_pending ; total_io_pending += io_pending ; - - if (!work_pending || idleTimer.getElapsedTimeF64() >= max_idle_time) - { - break; - } + + if (work_pending) + { + LL_WARNS("Idle") << "Work pending in texture thread: " << work_pending << LL_ENDL; + } +// if (!work_pending || idleTimer.getElapsedTimeF64() >= max_idle_time) +// { +// break; +// } } gMeshRepo.update() ; -- cgit v1.2.3 From e51fd03945ac0b2094b809c212eaa85b69ed0420 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 26 Jan 2017 09:43:10 +0200 Subject: MAINT-6959 swapping line edits with text boxes in preferences tab --- indra/newview/llfloaterpreference.cpp | 8 +-- .../default/xui/en/panel_preferences_uploads.xml | 59 ++++++++++------------ 2 files changed, 30 insertions(+), 37 deletions(-) diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 02dffa7f08..30dfff4ac8 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -2013,7 +2013,7 @@ void LLFloaterPreference::onChangeModelFolder() { if (gInventory.isInventoryUsable()) { - getChild("upload_models")->setText(get_category_path(LLFolderType::FT_OBJECT)); + getChild("upload_models")->setText(get_category_path(LLFolderType::FT_OBJECT)); } } @@ -2021,7 +2021,7 @@ void LLFloaterPreference::onChangeTextureFolder() { if (gInventory.isInventoryUsable()) { - getChild("upload_textures")->setText(get_category_path(LLFolderType::FT_TEXTURE)); + getChild("upload_textures")->setText(get_category_path(LLFolderType::FT_TEXTURE)); } } @@ -2029,7 +2029,7 @@ void LLFloaterPreference::onChangeSoundFolder() { if (gInventory.isInventoryUsable()) { - getChild("upload_sounds")->setText(get_category_path(LLFolderType::FT_SOUND)); + getChild("upload_sounds")->setText(get_category_path(LLFolderType::FT_SOUND)); } } @@ -2037,7 +2037,7 @@ void LLFloaterPreference::onChangeAnimationFolder() { if (gInventory.isInventoryUsable()) { - getChild("upload_animation")->setText(get_category_path(LLFolderType::FT_ANIMATION)); + getChild("upload_animation")->setText(get_category_path(LLFolderType::FT_ANIMATION)); } } diff --git a/indra/newview/skins/default/xui/en/panel_preferences_uploads.xml b/indra/newview/skins/default/xui/en/panel_preferences_uploads.xml index f397d05408..487da54fdf 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_uploads.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_uploads.xml @@ -30,21 +30,19 @@ layout="topleft" left="37" name="title_models" - top_pad="20" + top_pad="17" width="100"> Images - @@ -56,21 +54,19 @@ layout="topleft" left="37" name="title_sounds" - top_pad="10" + top_pad="7" width="100"> Sounds - @@ -82,21 +78,19 @@ layout="topleft" left="37" name="title_animation" - top_pad="10" + top_pad="7" width="100"> Animations - @@ -108,21 +102,19 @@ layout="topleft" left="37" name="title_animation" - top_pad="10" + top_pad="7" width="100"> Models - @@ -132,9 +124,10 @@ follows="left|top" height="30" layout="topleft" + font.style="ITALIC" left="33" name="upload_help" - top_pad="10" + top_pad="6" width="387"> To change a destination folder, right click on it in inventory and choose "Use as default for" -- cgit v1.2.3 From bab0ee6a3a32e816cffd5923a38a723713173f91 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Thu, 26 Jan 2017 10:19:54 -0800 Subject: MAINT-7082: max_idle_time unused. --- indra/newview/llappviewer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index a148d3c30d..e557076daa 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1487,7 +1487,7 @@ bool LLAppViewer::frame() ms_sleep(500); } - const F64Milliseconds max_idle_time = llmin(.005f*10.f*(F32Milliseconds)gFrameTimeSeconds, F32Milliseconds(5)); // 5 ms a second + //const F64Milliseconds max_idle_time = llmin(.005f*10.f*(F32Milliseconds)gFrameTimeSeconds, F32Milliseconds(5)); // 5 ms a second idleTimer.reset(); S32 total_work_pending = 0; S32 total_io_pending = 0; -- cgit v1.2.3 From cb73d43bf6ba1a4d6fdac6245eed328e62927f8d Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Thu, 26 Jan 2017 15:50:26 -0800 Subject: MAINT-7082: Clean up, remove log spam. --- indra/newview/llappviewer.cpp | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index e557076daa..e178bbb21a 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1487,11 +1487,9 @@ bool LLAppViewer::frame() ms_sleep(500); } - //const F64Milliseconds max_idle_time = llmin(.005f*10.f*(F32Milliseconds)gFrameTimeSeconds, F32Milliseconds(5)); // 5 ms a second idleTimer.reset(); S32 total_work_pending = 0; S32 total_io_pending = 0; - //while(1) { S32 work_pending = 0; S32 io_pending = 0; @@ -1516,14 +1514,6 @@ bool LLAppViewer::frame() total_work_pending += work_pending ; total_io_pending += io_pending ; - if (work_pending) - { - LL_WARNS("Idle") << "Work pending in texture thread: " << work_pending << LL_ENDL; - } -// if (!work_pending || idleTimer.getElapsedTimeF64() >= max_idle_time) -// { -// break; -// } } gMeshRepo.update() ; -- cgit v1.2.3 From ded008a8e1b205fead6ad0efacf1386d65e47b2a Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 27 Jan 2017 17:43:27 +0200 Subject: MAINT-86 Fixed object-contents aren't updated after wearing from ground --- indra/newview/llpanelobjectinventory.cpp | 12 ++++++++++++ indra/newview/llpanelobjectinventory.h | 1 + indra/newview/llselectmgr.cpp | 3 +++ 3 files changed, 16 insertions(+) diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index c4211d5508..addb0fbe4d 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -1849,6 +1849,7 @@ void LLPanelObjectInventory::refresh() if(mTaskUUID != object->mID) { mTaskUUID = object->mID; + mAttachmentUUID = object->getAttachmentItemID(); make_request = TRUE; // This is a new object so pre-emptively clear the contents @@ -1858,6 +1859,16 @@ void LLPanelObjectInventory::refresh() // Register for updates from this object, registerVOInventoryListener(object,NULL); } + else if (mAttachmentUUID != object->getAttachmentItemID()) + { + mAttachmentUUID = object->getAttachmentItemID(); + if (mAttachmentUUID.notNull()) + { + // Server unsubsribes viewer (deselects object) from property + // updates after "ObjectAttach" so we need to resubscribe + LLSelectMgr::getInstance()->sendSelect(); + } + } // Based on the node information, we may need to dirty the // object inventory and get it again. @@ -1888,6 +1899,7 @@ void LLPanelObjectInventory::refresh() void LLPanelObjectInventory::clearInventoryTask() { mTaskUUID = LLUUID::null; + mAttachmentUUID = LLUUID::null; removeVOInventoryListener(); clearContents(); } diff --git a/indra/newview/llpanelobjectinventory.h b/indra/newview/llpanelobjectinventory.h index 3de49242ac..d700c8f4cf 100644 --- a/indra/newview/llpanelobjectinventory.h +++ b/indra/newview/llpanelobjectinventory.h @@ -105,6 +105,7 @@ private: LLFolderView* mFolders; LLUUID mTaskUUID; + LLUUID mAttachmentUUID; BOOL mHaveInventory; BOOL mIsInventoryEmpty; BOOL mInventoryNeedsUpdate; diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index e4641d8721..ee7c22800a 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -4416,6 +4416,9 @@ void LLSelectMgr::sendAttach(U8 attachment_point, bool replace) SEND_ONLY_ROOTS ); if (!build_mode) { + // After "ObjectAttach" server will unsubscribe us from properties updates + // so either deselect objects or resend selection after attach packet reaches server + // In case of build_mode LLPanelObjectInventory::refresh() will deal with selection deselectAll(); } } -- cgit v1.2.3 From b0bcea6449c25b4821b24b9756eb9328485da2c4 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Fri, 27 Jan 2017 22:36:47 +0200 Subject: MAINT-7061 Better check --- indra/newview/llstartup.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 57a06da287..b762b2ae1c 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -2263,7 +2263,7 @@ void login_callback(S32 option, void *userdata) void show_release_notes_if_required() { if (LLVersionInfo::getChannelAndVersion() != gLastRunVersion - && LLVersionInfo::getChannel().find("Test") == std::string::npos // don't show Release Notes for the test builds + && LLVersionInfo::getViewerMaturity() != LLVersionInfo::TEST_VIEWER // don't show Release Notes for the test builds && gSavedSettings.getBOOL("UpdaterShowReleaseNotes") && !gSavedSettings.getBOOL("FirstLoginThisInstall")) { -- cgit v1.2.3 From f573e77981882cf0fffaa1ae6af322e72b948f5b Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 30 Jan 2017 16:51:40 +0200 Subject: MAINT-6959 Dummy callback to prevent log spam --- indra/newview/llpanelobjectinventory.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index addb0fbe4d..6409620336 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -1519,6 +1519,7 @@ LLPanelObjectInventory::LLPanelObjectInventory(const LLPanelObjectInventory::Par mCommitCallbackRegistrar.add("Inventory.AttachObject", boost::bind(&do_nothing)); mCommitCallbackRegistrar.add("Inventory.BeginIMSession", boost::bind(&do_nothing)); mCommitCallbackRegistrar.add("Inventory.Share", boost::bind(&LLAvatarActions::shareWithAvatars, this)); + mCommitCallbackRegistrar.add("Inventory.FileUploadLocation", boost::bind(&do_nothing)); } // Destroys the object -- cgit v1.2.3 From ac784d669b5dbd617850854d89b31e0d82738413 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Tue, 31 Jan 2017 11:31:15 +0200 Subject: MAINT-7084 Add tally and limit values to Block list. --- indra/newview/llblocklist.h | 2 ++ indra/newview/llpanelblockedlist.cpp | 3 +++ .../skins/default/xui/en/panel_block_list_sidetray.xml | 15 ++++++++++++++- 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/indra/newview/llblocklist.h b/indra/newview/llblocklist.h index 0f7fa41c32..96af8d898e 100644 --- a/indra/newview/llblocklist.h +++ b/indra/newview/llblocklist.h @@ -67,6 +67,8 @@ public: void sortByType(); void refresh(); + U32 getMuteListSize() { return mMuteListSize; } + private: void addNewItem(const LLMute* mute); diff --git a/indra/newview/llpanelblockedlist.cpp b/indra/newview/llpanelblockedlist.cpp index 81ed2963e6..25ae4774fc 100644 --- a/indra/newview/llpanelblockedlist.cpp +++ b/indra/newview/llpanelblockedlist.cpp @@ -141,6 +141,9 @@ void LLPanelBlockedList::updateButtons() bool hasSelected = NULL != mBlockedList->getSelectedItem(); getChildView("unblock_btn")->setEnabled(hasSelected); getChildView("blocked_gear_btn")->setEnabled(hasSelected); + + getChild("block_limit")->setTextArg("[COUNT]", llformat("%d", mBlockedList->getMuteListSize())); + getChild("block_limit")->setTextArg("[LIMIT]", llformat("%d", gSavedSettings.getS32("MuteListLimit"))); } void LLPanelBlockedList::unblockItem() diff --git a/indra/newview/skins/default/xui/en/panel_block_list_sidetray.xml b/indra/newview/skins/default/xui/en/panel_block_list_sidetray.xml index 53d0252215..4291a6859d 100644 --- a/indra/newview/skins/default/xui/en/panel_block_list_sidetray.xml +++ b/indra/newview/skins/default/xui/en/panel_block_list_sidetray.xml @@ -90,6 +90,19 @@ top_delta="0" width="31"/> + + [COUNT] entries in your block list, and the limit is [LIMIT]. + -- cgit v1.2.3 From bd3815699cf107cd79a7d0db0d8298b356652add Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 30 Jan 2017 20:02:59 +0200 Subject: MAINT-3216 Fixed "Vertical scale" does not change "Repeats per meter" on "Tab" --- indra/newview/llpanelface.cpp | 28 ++++++++++++++++++++++++---- indra/newview/llpanelface.h | 3 ++- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index ec2d37c30d..ad600358dd 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -649,7 +649,7 @@ void LLPanelFace::getState() updateUI(); } -void LLPanelFace::updateUI() +void LLPanelFace::updateUI(bool force_set_values /*false*/) { //set state of UI to match state of texture entry(ies) (calls setEnabled, setValue, etc, but NOT setVisible) LLViewerObject* objectp = LLSelectMgr::getInstance()->getSelection()->getFirstObject(); @@ -1025,7 +1025,14 @@ void LLPanelFace::updateUI() getChildView("shinyScaleV")->setEnabled(editable && specmap_id.notNull()); getChildView("bumpyScaleV")->setEnabled(editable && normmap_id.notNull()); - getChild("TexScaleV")->setValue(diff_scale_t); + if (force_set_values) + { + getChild("TexScaleV")->forceSetValue(diff_scale_t); + } + else + { + getChild("TexScaleV")->setValue(diff_scale_t); + } getChild("shinyScaleV")->setValue(norm_scale_t); getChild("bumpyScaleV")->setValue(spec_scale_t); @@ -1235,8 +1242,17 @@ void LLPanelFace::updateUI() BOOL repeats_tentative = !identical_repeats; getChildView("rptctrl")->setEnabled(identical_planar_texgen ? FALSE : enabled); - getChild("rptctrl")->setValue(editable ? repeats : 1.0f); - getChild("rptctrl")->setTentative(LLSD(repeats_tentative)); + LLSpinCtrl* rpt_ctrl = getChild("rptctrl"); + if (force_set_values) + { + //onCommit, previosly edited element updates related ones + rpt_ctrl->forceSetValue(editable ? repeats : 1.0f); + } + else + { + rpt_ctrl->setValue(editable ? repeats : 1.0f); + } + rpt_ctrl->setTentative(LLSD(repeats_tentative)); } } @@ -1974,6 +1990,8 @@ void LLPanelFace::onCommitTextureInfo( LLUICtrl* ctrl, void* userdata ) { LLPanelFace* self = (LLPanelFace*) userdata; self->sendTextureInfo(); + // vertical scale and repeats per meter depends on each other, so force set on changes + self->updateUI(true); } // Commit the number of repeats per meter @@ -2038,6 +2056,8 @@ void LLPanelFace::onCommitRepeatsPerMeter(LLUICtrl* ctrl, void* userdata) llassert(false); break; } + // vertical scale and repeats per meter depends on each other, so force set on changes + self->updateUI(true); } struct LLPanelFaceSetMediaFunctor : public LLSelectedTEFunctor diff --git a/indra/newview/llpanelface.h b/indra/newview/llpanelface.h index 9823e84cd9..078995e787 100644 --- a/indra/newview/llpanelface.h +++ b/indra/newview/llpanelface.h @@ -152,7 +152,8 @@ protected: // Make UI reflect state of currently selected material (refresh) // and UI mode (e.g. editing normal map v diffuse map) // - void updateUI(); + // @param force_set_values forces spinners to set value even if they are focused + void updateUI(bool force_set_values = false); // Convenience func to determine if all faces in selection have // identical planar texgen settings during edits -- cgit v1.2.3 From e10cc6d69dae10be846e20bbda74fc9cf9561729 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 31 Jan 2017 19:10:40 +0200 Subject: MAINT-7094 Fixed Adjust messages in the viewer for new xml tags --- .../newview/skins/default/xui/en/notifications.xml | 38 +++++++++++----------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 58869ec602..c4190a4940 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -9849,29 +9849,29 @@ Eject failed because you don't have admin permission for that parcel. fail -Can't move object '[OBJECT_NAME]' to -[OBJ_POSITION] in region [REGION_NAME] because the parcel is full. +Can't move object '[O]' to +[P] in region [R] because the parcel is full. fail -Can't move object '[OBJECT_NAME]' to -[OBJ_POSITION] in region [REGION_NAME] because your objects are not allowed on this parcel. +Can't move object '[O]' to +[P] in region [R] because your objects are not allowed on this parcel. fail -Can't move object '[OBJECT_NAME]' to -[OBJ_POSITION] in region [REGION_NAME] because there are not enough resources for this object on this parcel. +Can't move object '[O]' to +[P] in region [R] because there are not enough resources for this object on this parcel. - fail -Can't move object '[OBJECT_NAME]' to -[OBJ_POSITION] in region [REGION_NAME] because the other region is running an older version which does not support receiving this object via region crossing. + fail + Can't move object '[O]' to + [P] in region [R] because the other region is running an older version which does not support receiving this object via region crossing. fail -Can't move object '[OBJECT_NAME]' to -[OBJ_POSITION] in region [REGION_NAME] because you cannot modify the navmesh across region boundaries. +Can't move object '[O]' to +[P] in region [R] because you cannot modify the navmesh across region boundaries. fail -Can't move object '[OBJECT_NAME]' to -[OBJ_POSITION] in region [REGION_NAME] because of an unknown reason. ([FAILURE_TYPE]) +Can't move object '[O]' to +[P] in region [R] because of an unknown reason. ([F]) Date: Wed, 1 Feb 2017 10:57:12 +0200 Subject: MAINT-725 Script debug floater functionality is borked, rendering it completely useless for scripters --- indra/newview/llfloaterscriptdebug.cpp | 31 +++++++++++++++++++++- indra/newview/llfloaterscriptdebug.h | 3 +++ .../skins/default/xui/en/floater_script_debug.xml | 1 + indra/newview/skins/default/xui/en/menu_viewer.xml | 10 +++++++ 4 files changed, 44 insertions(+), 1 deletion(-) diff --git a/indra/newview/llfloaterscriptdebug.cpp b/indra/newview/llfloaterscriptdebug.cpp index 5f4bc9d301..468537e659 100644 --- a/indra/newview/llfloaterscriptdebug.cpp +++ b/indra/newview/llfloaterscriptdebug.cpp @@ -81,6 +81,36 @@ BOOL LLFloaterScriptDebug::postBuild() return FALSE; } +void LLFloaterScriptDebug::setVisible(BOOL visible) +{ + if(visible) + { + LLFloaterScriptDebugOutput* floater_output = LLFloaterReg::findTypedInstance("script_debug_output", LLUUID::null); + if (floater_output == NULL) + { + floater_output = dynamic_cast(LLFloaterReg::showInstance("script_debug_output", LLUUID::null, FALSE)); + if (floater_output) + { + addFloater(floater_output, false); + } + } + + } + LLMultiFloater::setVisible(visible); +} + +void LLFloaterScriptDebug::closeFloater(bool app_quitting/* = false*/) +{ + if(app_quitting) + { + LLMultiFloater::closeFloater(app_quitting); + } + else + { + setVisible(false); + } +} + LLFloater* LLFloaterScriptDebug::addOutputWindow(const LLUUID &object_id) { LLMultiFloater* host = LLFloaterReg::showTypedInstance("script_debug", LLSD()); @@ -125,7 +155,6 @@ void LLFloaterScriptDebug::addScriptLine(const std::string &utf8mesg, const std: floater_label = user_name; } - addOutputWindow(LLUUID::null); addOutputWindow(source_id); // add to "All" floater diff --git a/indra/newview/llfloaterscriptdebug.h b/indra/newview/llfloaterscriptdebug.h index 6d9d1eb500..8c08b234f3 100644 --- a/indra/newview/llfloaterscriptdebug.h +++ b/indra/newview/llfloaterscriptdebug.h @@ -38,7 +38,10 @@ public: LLFloaterScriptDebug(const LLSD& key); virtual ~LLFloaterScriptDebug(); virtual BOOL postBuild(); + virtual void setVisible(BOOL visible); static void show(const LLUUID& object_id); + + /*virtual*/ void closeFloater(bool app_quitting = false); static void addScriptLine(const std::string &utf8mesg, const std::string &user_name, const LLColor4& color, const LLUUID& source_id); protected: diff --git a/indra/newview/skins/default/xui/en/floater_script_debug.xml b/indra/newview/skins/default/xui/en/floater_script_debug.xml index 53d4925214..cd88048d6b 100644 --- a/indra/newview/skins/default/xui/en/floater_script_debug.xml +++ b/indra/newview/skins/default/xui/en/floater_script_debug.xml @@ -7,6 +7,7 @@ help_topic="script_debug_floater" save_rect="true" title="Script Warning/Error" + reuse_instance="true" width="450"> + + + + -- cgit v1.2.3 From eacf7252d01e8f0d0becfdb403846e08480cf754 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 1 Feb 2017 12:04:16 +0200 Subject: MAINT-7096 FIXED The last item on the block list cannot be read --- indra/newview/skins/default/xui/en/panel_block_list_sidetray.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en/panel_block_list_sidetray.xml b/indra/newview/skins/default/xui/en/panel_block_list_sidetray.xml index 4291a6859d..574e5f3cbc 100644 --- a/indra/newview/skins/default/xui/en/panel_block_list_sidetray.xml +++ b/indra/newview/skins/default/xui/en/panel_block_list_sidetray.xml @@ -105,7 +105,7 @@ Date: Wed, 1 Feb 2017 17:03:04 +0200 Subject: MAINT-7099 FIXED 'IM' and 'Voice call' menu items should be disabled for the group, which you have already left --- indra/newview/llconversationloglist.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/indra/newview/llconversationloglist.cpp b/indra/newview/llconversationloglist.cpp index ffc235bdbf..86e23e7c83 100644 --- a/indra/newview/llconversationloglist.cpp +++ b/indra/newview/llconversationloglist.cpp @@ -369,8 +369,13 @@ bool LLConversationLogList::isActionEnabled(const LLSD& userdata) bool is_p2p = LLIMModel::LLIMSession::P2P_SESSION == stype; bool is_group = LLIMModel::LLIMSession::GROUP_SESSION == stype; + bool is_group_member = is_group && gAgent.isInGroup(selected_id, TRUE); - if ("can_im" == command_name || "can_view_profile" == command_name) + if ("can_im" == command_name) + { + return is_p2p || is_group_member; + } + else if ("can_view_profile" == command_name) { return is_p2p || is_group; } @@ -380,7 +385,7 @@ bool LLConversationLogList::isActionEnabled(const LLSD& userdata) } else if ("can_call" == command_name) { - return (is_p2p || is_group) && LLAvatarActions::canCall(); + return (is_p2p || is_group_member) && LLAvatarActions::canCall(); } else if ("add_rem_friend" == command_name || "can_invite_to_group" == command_name || -- cgit v1.2.3 From 479f13d51de7d9fa67c069295e3db7d010794298 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 2 Feb 2017 17:58:01 +0200 Subject: MAINT-288 Fixed Content of 'Object contents' tab blinks after editing it's permissions --- indra/newview/llsidepaneliteminfo.cpp | 113 +++++++++++++--------------------- indra/newview/llsidepaneliteminfo.h | 1 + 2 files changed, 44 insertions(+), 70 deletions(-) diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp index 12cbff888d..af2173dd17 100644 --- a/indra/newview/llsidepaneliteminfo.cpp +++ b/indra/newview/llsidepaneliteminfo.cpp @@ -779,23 +779,7 @@ void LLSidepanelItemInfo::onCommitName() { LLPointer new_item = new LLViewerInventoryItem(item); new_item->rename(labelItemName->getText()); - if(mObjectID.isNull()) - { - new_item->updateServer(FALSE); - gInventory.updateItem(new_item); - gInventory.notifyObservers(); - } - else - { - LLViewerObject* object = gObjectList.findObject(mObjectID); - if(object) - { - object->updateInventory( - new_item, - TASK_INVENTORY_ITEM_KEY, - false); - } - } + onCommitChanges(new_item); } } @@ -816,23 +800,7 @@ void LLSidepanelItemInfo::onCommitDescription() LLPointer new_item = new LLViewerInventoryItem(item); new_item->setDescription(labelItemDesc->getText()); - if(mObjectID.isNull()) - { - new_item->updateServer(FALSE); - gInventory.updateItem(new_item); - gInventory.notifyObservers(); - } - else - { - LLViewerObject* object = gObjectList.findObject(mObjectID); - if(object) - { - object->updateInventory( - new_item, - TASK_INVENTORY_ITEM_KEY, - false); - } - } + onCommitChanges(new_item); } } @@ -908,23 +876,7 @@ void LLSidepanelItemInfo::onCommitPermissions() flags |= LLInventoryItemFlags::II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP; } new_item->setFlags(flags); - if(mObjectID.isNull()) - { - new_item->updateServer(FALSE); - gInventory.updateItem(new_item); - gInventory.notifyObservers(); - } - else - { - LLViewerObject* object = gObjectList.findObject(mObjectID); - if(object) - { - object->updateInventory( - new_item, - TASK_INVENTORY_ITEM_KEY, - false); - } - } + onCommitChanges(new_item); } else { @@ -1008,25 +960,7 @@ void LLSidepanelItemInfo::updateSaleInfo() } new_item->setSaleInfo(sale_info); - if(mObjectID.isNull()) - { - // This is in the agent's inventory. - new_item->updateServer(FALSE); - gInventory.updateItem(new_item); - gInventory.notifyObservers(); - } - else - { - // This is in an object's contents. - LLViewerObject* object = gObjectList.findObject(mObjectID); - if(object) - { - object->updateInventory( - new_item, - TASK_INVENTORY_ITEM_KEY, - false); - } - } + onCommitChanges(new_item); } else { @@ -1035,6 +969,45 @@ void LLSidepanelItemInfo::updateSaleInfo() } } +void LLSidepanelItemInfo::onCommitChanges(LLPointer item) +{ + if (item.isNull()) + { + return; + } + + if (mObjectID.isNull()) + { + // This is in the agent's inventory. + item->updateServer(FALSE); + gInventory.updateItem(item); + gInventory.notifyObservers(); + } + else + { + // This is in an object's contents. + LLViewerObject* object = gObjectList.findObject(mObjectID); + if (object) + { + object->updateInventory( + item, + TASK_INVENTORY_ITEM_KEY, + false); + + if (object->isSelected()) + { + // Since object is selected (build floater is open) object will + // receive properties update, detect serial mismatch, dirty and + // reload inventory, meanwhile some other updates will refresh it. + // So mark dirty early, this will prevent unnecessary changes + // and download will be triggered by LLPanelObjectInventory - it + // prevents flashing in content tab and some duplicated request. + object->dirtyInventory(); + } + } + } +} + LLViewerInventoryItem* LLSidepanelItemInfo::findItem() const { LLViewerInventoryItem* item = NULL; diff --git a/indra/newview/llsidepaneliteminfo.h b/indra/newview/llsidepaneliteminfo.h index 2e24e58a2a..74cf7afe35 100644 --- a/indra/newview/llsidepaneliteminfo.h +++ b/indra/newview/llsidepaneliteminfo.h @@ -89,6 +89,7 @@ protected: void onCommitSaleInfo(); void onCommitSaleType(); void updateSaleInfo(); + void onCommitChanges(LLPointer item); }; #endif // LL_LLSIDEPANELITEMINFO_H -- cgit v1.2.3 From f8790210dd7824ac0cbe2ea54815c04908615609 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Fri, 3 Feb 2017 10:42:01 +0200 Subject: MAINT-7103 New URI namespace /legacyname --- indra/llui/llurlentry.cpp | 16 ++++++++++++++++ indra/llui/llurlentry.h | 8 ++++++++ indra/llui/llurlregistry.cpp | 1 + 3 files changed, 25 insertions(+) diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index 05b7a4a9e9..b211829496 100644 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -767,6 +767,22 @@ std::string LLUrlEntryAgentCompleteName::getName(const LLAvatarName& avatar_name return avatar_name.getCompleteName(true, true); } +// +// LLUrlEntryAgentLegacyName describes a Second Life agent legacy name Url, e.g., +// secondlife:///app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/legacyname +// x-grid-location-info://lincoln.lindenlab.com/app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/legacyname +// +LLUrlEntryAgentLegacyName::LLUrlEntryAgentLegacyName() +{ + mPattern = boost::regex(APP_HEADER_REGEX "/agent/[\\da-f-]+/legacyname", + boost::regex::perl|boost::regex::icase); +} + +std::string LLUrlEntryAgentLegacyName::getName(const LLAvatarName& avatar_name) +{ + return avatar_name.getLegacyName(); +} + // // LLUrlEntryAgentDisplayName describes a Second Life agent display name Url, e.g., // secondlife:///app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/displayname diff --git a/indra/llui/llurlentry.h b/indra/llui/llurlentry.h index 413c20a657..28e9931718 100644 --- a/indra/llui/llurlentry.h +++ b/indra/llui/llurlentry.h @@ -269,6 +269,14 @@ private: /*virtual*/ std::string getName(const LLAvatarName& avatar_name); }; +class LLUrlEntryAgentLegacyName : public LLUrlEntryAgentName +{ +public: + LLUrlEntryAgentLegacyName(); +private: + /*virtual*/ std::string getName(const LLAvatarName& avatar_name); +}; + /// /// LLUrlEntryAgentDisplayName Describes a Second Life agent display name Url, e.g., /// secondlife:///app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/displayname diff --git a/indra/llui/llurlregistry.cpp b/indra/llui/llurlregistry.cpp index 23c6d5a954..fa6593267a 100644 --- a/indra/llui/llurlregistry.cpp +++ b/indra/llui/llurlregistry.cpp @@ -57,6 +57,7 @@ LLUrlRegistry::LLUrlRegistry() mUrlEntryHTTPLabel = new LLUrlEntryHTTPLabel(); registerUrl(mUrlEntryHTTPLabel); registerUrl(new LLUrlEntryAgentCompleteName()); + registerUrl(new LLUrlEntryAgentLegacyName()); registerUrl(new LLUrlEntryAgentDisplayName()); registerUrl(new LLUrlEntryAgentUserName()); // LLUrlEntryAgent*Name must appear before LLUrlEntryAgent since -- cgit v1.2.3 From fd81f83f6b571b16369b7d581198285d5a8ec363 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 3 Feb 2017 20:14:42 +0200 Subject: MAINT-2438 Fixes wrong permissions source --- indra/newview/llappearancemgr.cpp | 43 ++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 046e829070..35d08c7ab1 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -1246,31 +1246,32 @@ void LLWearableHoldingPattern::onWearableAssetFetch(LLViewerWearable *wearable) data.mWearable = wearable; use_count++; } - else if (wearable->getPermissions().allowModifyBy(gAgent.getID())) + else { - // We can't edit and do some other interactions with same asset twice, copy it - LLViewerWearable* new_wearable = LLWearableList::instance().createCopy(wearable, wearable->getName()); - data.mWearable = new_wearable; - data.mAssetID = new_wearable->getAssetID(); - - LLViewerInventoryItem* item = gInventory.getItem(data.mItemID); - if (item) + LLViewerInventoryItem* wearable_item = gInventory.getItem(data.mItemID); + if (wearable_item && wearable_item->getPermissions().allowModifyBy(gAgentID)) { + // We can't edit and do some other interactions with same asset twice, copy it + LLViewerWearable* new_wearable = LLWearableList::instance().createCopy(wearable, wearable->getName()); + data.mWearable = new_wearable; + data.mAssetID = new_wearable->getAssetID(); + // Update existing inventory item - item->setAssetUUID(new_wearable->getAssetID()); - item->setTransactionID(new_wearable->getTransactionID()); - gInventory.updateItem(item, LLInventoryObserver::INTERNAL); - item->updateServer(FALSE); + wearable_item->setAssetUUID(new_wearable->getAssetID()); + wearable_item->setTransactionID(new_wearable->getTransactionID()); + gInventory.updateItem(wearable_item, LLInventoryObserver::INTERNAL); + wearable_item->updateServer(FALSE); + + use_count++; + } + else + { + // Note: technically a bug, LLViewerWearable can identify only one item id at a time, + // yet we are tying it to multiple items here. + // LLViewerWearable need to support more then one item. + LL_WARNS() << "Same LLViewerWearable is used by multiple items! " << wearable->getAssetID() << LL_ENDL; + data.mWearable = wearable; } - use_count++; - } - else - { - // Note: technically a bug, LLViewerWearable can identify only one item id at a time, - // yet we are tying it to multiple items here. - // LLViewerWearable need to support more then one item. - LL_WARNS() << "Same LLViewerWearable is used by multiple items! " << wearable->getAssetID() << LL_ENDL; - data.mWearable = wearable; } } } -- cgit v1.2.3 From 2ee1d1b93af51e10b867396309edd3f9b1e4b42f Mon Sep 17 00:00:00 2001 From: Ansariel Hiller Date: Fri, 3 Feb 2017 21:28:36 +0000 Subject: MAINT-6959: Use localized category names --- indra/newview/llfloaterpreference.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 30dfff4ac8..df4bc043e5 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -1993,13 +1993,19 @@ void LLFloaterPreference::onChangeMaturity() std::string get_category_path(LLUUID cat_id) { LLViewerInventoryCategory* cat = gInventory.getCategory(cat_id); + std::string localized_cat_name; + if (!LLTrans::findString(localized_cat_name, "InvFolder " + cat->getName())) + { + localized_cat_name = cat->getName(); + } + if (cat->getParentUUID().notNull()) { - return get_category_path(cat->getParentUUID()) + " > " + cat->getName(); + return get_category_path(cat->getParentUUID()) + " > " + localized_cat_name; } else { - return cat->getName(); + return localized_cat_name; } } -- cgit v1.2.3 From ac9777bd8eed3899c48ba203d88911085c09e65a Mon Sep 17 00:00:00 2001 From: "callum@lindenlab.com" Date: Fri, 3 Feb 2017 16:25:33 -0800 Subject: Change destination location of updated VLC files to correct one --- indra/newview/viewer_manifest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 6fb9479564..d68c01351f 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -874,8 +874,8 @@ class DarwinManifest(ViewerManifest): self.end_prefix() # copy LibVLC plugins folder - if self.prefix(src=os.path.join(os.pardir, 'packages', 'lib', 'release', 'plugins' ), dst="plugins"): - self.path( "lib*_plugin.dylib" ) + if self.prefix(src=os.path.join(os.pardir, 'packages', 'lib', 'release', 'plugins' ), dst="lib"): + self.path( "*.dylib" ) self.path( "plugins.dat" ) self.end_prefix() -- cgit v1.2.3 From 85c24a489dd0550db253f442fc5e22a6494b7cd7 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Mon, 6 Feb 2017 13:04:22 +0200 Subject: MAINT-7104 Add Grid status floater and toolbar button --- indra/newview/CMakeLists.txt | 2 + indra/newview/app_settings/commands.xml | 10 +++ indra/newview/app_settings/settings.xml | 16 +++++ indra/newview/llfloatergridstatus.cpp | 84 ++++++++++++++++++++++ indra/newview/llfloatergridstatus.h | 56 +++++++++++++++ indra/newview/llviewerfloaterreg.cpp | 2 + indra/newview/skins/default/textures/textures.xml | 1 + .../skins/default/xui/en/floater_grid_status.xml | 18 +++++ indra/newview/skins/default/xui/en/strings.xml | 2 + 9 files changed, 191 insertions(+) create mode 100644 indra/newview/llfloatergridstatus.cpp create mode 100644 indra/newview/llfloatergridstatus.h create mode 100644 indra/newview/skins/default/xui/en/floater_grid_status.xml diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 9ac1c3520d..dbec4b5d65 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -236,6 +236,7 @@ set(viewer_SOURCE_FILES llfloatergesture.cpp llfloatergodtools.cpp llfloatergotoline.cpp + llfloatergridstatus.cpp llfloatergroupbulkban.cpp llfloatergroupinvite.cpp llfloatergroups.cpp @@ -852,6 +853,7 @@ set(viewer_HEADER_FILES llfloatergesture.h llfloatergodtools.h llfloatergotoline.h + llfloatergridstatus.h llfloatergroupbulkban.h llfloatergroupinvite.h llfloatergroups.h diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml index 9bc0a7c701..64cd11a53a 100644 --- a/indra/newview/app_settings/commands.xml +++ b/indra/newview/app_settings/commands.xml @@ -292,4 +292,14 @@ is_running_function="Floater.IsOpen" is_running_parameters="reporter" /> + diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 717deba8c7..e96401b511 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -15125,6 +15125,22 @@ 0 + GridStatusFloaterRect + + Comment + Web profile floater dimensions + Persist + 1 + Type + Rect + Value + + 0 + 520 + 625 + 0 + + HelpFloaterOpen Comment diff --git a/indra/newview/llfloatergridstatus.cpp b/indra/newview/llfloatergridstatus.cpp new file mode 100644 index 0000000000..a12f717a25 --- /dev/null +++ b/indra/newview/llfloatergridstatus.cpp @@ -0,0 +1,84 @@ +/** + * @file llfloatergridstatus.cpp + * @brief Grid status floater - uses an embedded web browser to show Grid status info + * + * $LicenseInfo:firstyear=2009&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llfloatergridstatus.h" + +#include "llhttpconstants.h" +#include "llmediactrl.h" +#include "llviewercontrol.h" + + +LLFloaterGridStatus::LLFloaterGridStatus(const Params& key) : + LLFloaterWebContent(key) +{ +} + +BOOL LLFloaterGridStatus::postBuild() +{ + LLFloaterWebContent::postBuild(); + mWebBrowser->addObserver(this); + + return TRUE; +} + +void LLFloaterGridStatus::onOpen(const LLSD& key) +{ + Params p(key); + p.trusted_content = true; + p.allow_address_entry = false; + + LLFloaterWebContent::onOpen(p); + applyPreferredRect(); + if (mWebBrowser) + { + std::string url = "http://secondlife-status.statuspage.io/"; + mWebBrowser->navigateTo(url, HTTP_CONTENT_TEXT_HTML); + } +} +// virtual +void LLFloaterGridStatus::handleReshape(const LLRect& new_rect, bool by_user) +{ + if (by_user && !isMinimized()) + { + gSavedSettings.setRect("GridStatusFloaterRect", new_rect); + } + + LLFloaterWebContent::handleReshape(new_rect, by_user); +} + +void LLFloaterGridStatus::applyPreferredRect() +{ + const LLRect preferred_rect = gSavedSettings.getRect("GridStatusFloaterRect"); + + // Don't override position that may have been set by floater stacking code. + LLRect new_rect = getRect(); + new_rect.setLeftTopAndSize( + new_rect.mLeft, new_rect.mTop, + preferred_rect.getWidth(), preferred_rect.getHeight()); + setShape(new_rect); +} diff --git a/indra/newview/llfloatergridstatus.h b/indra/newview/llfloatergridstatus.h new file mode 100644 index 0000000000..045c647f4a --- /dev/null +++ b/indra/newview/llfloatergridstatus.h @@ -0,0 +1,56 @@ +/** + * @file llfloatergridstatus.h + * @brief Grid status floater - uses an embedded web browser to show Grid status info + * + * $LicenseInfo:firstyear=2009&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LL_LLFLOATERGRIDSTATUS_H +#define LL_LLFLOATERGRIDSTATUS_H + +#include "llfloaterwebcontent.h" +#include "llviewermediaobserver.h" + +#include + +class LLMediaCtrl; + + +class LLFloaterGridStatus : + public LLFloaterWebContent +{ +public: + typedef LLSDParamAdapter<_Params> Params; + + LLFloaterGridStatus(const Params& key); + + /*virtual*/ void onOpen(const LLSD& key); + /*virtual*/ void handleReshape(const LLRect& new_rect, bool by_user = false); + +private: + /*virtual*/ BOOL postBuild(); + + void applyPreferredRect(); +}; + +#endif // LL_LLFLOATERGRIDSTATUS_H + diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index ec7a81584a..46525e8455 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -70,6 +70,7 @@ #include "llfloaterfonttest.h" #include "llfloatergesture.h" #include "llfloatergodtools.h" +#include "llfloatergridstatus.h" #include "llfloatergroups.h" #include "llfloaterhelpbrowser.h" #include "llfloaterhoverheight.h" @@ -231,6 +232,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("gestures", "floater_gesture.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("god_tools", "floater_god_tools.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); + LLFloaterReg::add("grid_status", "floater_grid_status.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("group_picker", "floater_choose_group.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("help_browser", "floater_help_browser.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 760c294f90..bd8c0d5a96 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -136,6 +136,7 @@ with the same filename but different name + diff --git a/indra/newview/skins/default/xui/en/floater_grid_status.xml b/indra/newview/skins/default/xui/en/floater_grid_status.xml new file mode 100644 index 0000000000..b97bd8056d --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_grid_status.xml @@ -0,0 +1,18 @@ + + diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index b75f631799..6f00f1731e 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -4070,6 +4070,7 @@ Try enclosing path to the editor with double quotes. Facebook Flickr Gestures + Grid status How to Inventory Map @@ -4102,6 +4103,7 @@ Try enclosing path to the editor with double quotes. Post to Facebook Upload to Flickr Gestures for your avatar + Show current Grid status How to do common tasks View and use your belongings Map of the world -- cgit v1.2.3 From 07cc16f4796e571eb804866493e87d777bdead46 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 6 Feb 2017 17:29:45 +0200 Subject: MAINT-2001 Fixes colums misbeheaving --- indra/llui/llscrolllistctrl.cpp | 4 ++-- indra/newview/skins/default/xui/en/floater_inspect.xml | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index 1190c5bb94..db8fdc46b7 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -648,7 +648,7 @@ bool LLScrollListCtrl::updateColumnWidths() S32 new_width = 0; if (column->mRelWidth >= 0) { - new_width = (S32)ll_round(column->mRelWidth * (mItemListRect.getWidth() - mTotalStaticColumnWidth - mTotalColumnPadding)); + new_width = (S32)ll_round(column->mRelWidth*mItemListRect.getWidth()); } else if (column->mDynamicWidth) { @@ -2680,7 +2680,7 @@ void LLScrollListCtrl::addColumn(const LLScrollListColumn::Params& column_params } if (new_column->mRelWidth >= 0) { - new_column->setWidth((S32)ll_round(new_column->mRelWidth * (mItemListRect.getWidth() - mTotalStaticColumnWidth - mTotalColumnPadding))); + new_column->setWidth((S32)ll_round(new_column->mRelWidth*mItemListRect.getWidth())); } else if(new_column->mDynamicWidth) { diff --git a/indra/newview/skins/default/xui/en/floater_inspect.xml b/indra/newview/skins/default/xui/en/floater_inspect.xml index ae46736ddf..63334e2b24 100644 --- a/indra/newview/skins/default/xui/en/floater_inspect.xml +++ b/indra/newview/skins/default/xui/en/floater_inspect.xml @@ -27,21 +27,21 @@ tool_tip="Select an object from this list to highlight it in-world" top="20"> + name="creation_date" /> -- cgit v1.2.3 From e138ca5e78cb9fe095a6d67a28a39a1608d38653 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Tue, 7 Feb 2017 12:56:45 +0200 Subject: MAINT-7112 FIXED URI namespace /completename is still affected by the Usernames viewer setting. --- indra/llmessage/llavatarname.cpp | 6 +++--- indra/llmessage/llavatarname.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/indra/llmessage/llavatarname.cpp b/indra/llmessage/llavatarname.cpp index 2e8886fb51..7e1246f885 100644 --- a/indra/llmessage/llavatarname.cpp +++ b/indra/llmessage/llavatarname.cpp @@ -166,10 +166,10 @@ void LLAvatarName::setExpires(F64 expires) mExpires = LLFrameTimer::getTotalSeconds() + expires; } -std::string LLAvatarName::getCompleteName(bool use_parentheses, bool force_use_display_name) const +std::string LLAvatarName::getCompleteName(bool use_parentheses, bool force_use_complete_name) const { std::string name; - if (sUseDisplayNames || force_use_display_name) + if (sUseDisplayNames || force_use_complete_name) { if (mUsername.empty() || mIsDisplayNameDefault) { @@ -180,7 +180,7 @@ std::string LLAvatarName::getCompleteName(bool use_parentheses, bool force_use_d else { name = mDisplayName; - if(sUseUsernames) + if(sUseUsernames || force_use_complete_name) { if(use_parentheses) { diff --git a/indra/llmessage/llavatarname.h b/indra/llmessage/llavatarname.h index 80b54cded9..20f7140797 100644 --- a/indra/llmessage/llavatarname.h +++ b/indra/llmessage/llavatarname.h @@ -65,7 +65,7 @@ public: // For normal names, returns "James Linden (james.linden)" // When display names are disabled returns just "James Linden" - std::string getCompleteName(bool use_parentheses = true, bool force_use_display_name = false) const; + std::string getCompleteName(bool use_parentheses = true, bool force_use_complete_name = false) const; // Returns "James Linden" or "bobsmith123 Resident" for backwards // compatibility with systems like voice and muting -- cgit v1.2.3 From 451595dc381f8c06bd67ffd06f9018aa9ddd253b Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 9 Feb 2017 21:18:23 +0200 Subject: MAINT-7095 Fixed Detached and reduced nearby chat floater does not maintain its position through viewer restart. --- indra/newview/llfloaterimnearbychat.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp index 257b39a7dd..7d0ff22ed3 100644 --- a/indra/newview/llfloaterimnearbychat.cpp +++ b/indra/newview/llfloaterimnearbychat.cpp @@ -304,6 +304,13 @@ void LLFloaterIMNearbyChat::onClose(bool app_quitting) { // Override LLFloaterIMSessionTab::onClose() so that Nearby Chat is not removed from the conversation floater LLFloaterIMSessionTab::restoreFloater(); + if (app_quitting) + { + // We are starting and closing floater in "expanded" state + // Update expanded (restored) rect and position for use in next session + forceReshape(); + storeRectControl(); + } } // virtual -- cgit v1.2.3 From 85d05c71306489d92212cd5f3e166eff540d8da1 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Mon, 13 Feb 2017 11:04:42 +0200 Subject: MAINT-5556 Active listing folder stays listed, with empty Version folder --- indra/newview/llinventorybridge.cpp | 44 ++++++++++++++++++++++++++++++------- 1 file changed, 36 insertions(+), 8 deletions(-) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index b7f5424f25..6cb7ce622f 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -275,8 +275,10 @@ BOOL LLInvFVBridge::cutToClipboard() if (cut_from_marketplacelistings && (LLMarketplaceData::instance().isInActiveFolder(mUUID) || LLMarketplaceData::instance().isListedAndActive(mUUID))) { - // Prompt the user if cutting from a marketplace active listing - LLNotificationsUtil::add("ConfirmMerchantActiveChange", LLSD(), LLSD(), boost::bind(&LLInvFVBridge::callback_cutToClipboard, this, _1, _2)); + LLUUID parent_uuid = obj->getParentUUID(); + BOOL result = perform_cutToClipboard(); + gInventory.addChangedMask(LLInventoryObserver::STRUCTURE, parent_uuid); + return result; } else { @@ -303,11 +305,7 @@ BOOL LLInvFVBridge::callback_cutToClipboard(const LLSD& notification, const LLSD S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if (option == 0) // YES { - const LLInventoryObject* obj = gInventory.getObject(mUUID); - LLUUID parent_uuid = obj->getParentUUID(); - BOOL result = perform_cutToClipboard(); - gInventory.addChangedMask(LLInventoryObserver::STRUCTURE, parent_uuid); - return result; + return perform_cutToClipboard(); } return FALSE; } @@ -3471,7 +3469,24 @@ void LLFolderBridge::pasteFromClipboard() const LLUUID &marketplacelistings_id = model->findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS, false); const BOOL paste_into_marketplacelistings = model->isObjectDescendentOf(mUUID, marketplacelistings_id); - if (paste_into_marketplacelistings && !LLMarketplaceData::instance().isListed(mUUID) && LLMarketplaceData::instance().isInActiveFolder(mUUID)) + BOOL cut_from_marketplacelistings = FALSE; + if (LLClipboard::instance().isCutMode()) + { + //Items are not removed from folder on "cut", so we need update listing folder on "paste" operation + std::vector objects; + LLClipboard::instance().pasteFromClipboard(objects); + for (std::vector::const_iterator iter = objects.begin(); iter != objects.end(); ++iter) + { + const LLUUID& item_id = (*iter); + if(gInventory.isObjectDescendentOf(item_id, marketplacelistings_id) && (LLMarketplaceData::instance().isInActiveFolder(item_id) || + LLMarketplaceData::instance().isListedAndActive(item_id))) + { + cut_from_marketplacelistings = TRUE; + break; + } + } + } + if (cut_from_marketplacelistings || (paste_into_marketplacelistings && !LLMarketplaceData::instance().isListed(mUUID) && LLMarketplaceData::instance().isInActiveFolder(mUUID))) { // Prompt the user if pasting in a marketplace active version listing (note that pasting right under the listing folder root doesn't need a prompt) LLNotificationsUtil::add("ConfirmMerchantActiveChange", LLSD(), LLSD(), boost::bind(&LLFolderBridge::callback_pasteFromClipboard, this, _1, _2)); @@ -3490,7 +3505,20 @@ void LLFolderBridge::callback_pasteFromClipboard(const LLSD& notification, const S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if (option == 0) // YES { + std::vector objects; + std::set parent_folders; + LLClipboard::instance().pasteFromClipboard(objects); + for (std::vector::const_iterator iter = objects.begin(); iter != objects.end(); ++iter) + { + const LLInventoryObject* obj = gInventory.getObject(*iter); + parent_folders.insert(obj->getParentUUID()); + } perform_pasteFromClipboard(); + for (std::set::const_iterator iter = parent_folders.begin(); iter != parent_folders.end(); ++iter) + { + gInventory.addChangedMask(LLInventoryObserver::STRUCTURE, *iter); + } + } } -- cgit v1.2.3 From 1c0a2f87790ca0df8af11f4e5d592723d22d14ea Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 13 Feb 2017 15:50:46 +0200 Subject: MAINT-299 Fixed Inventory not mentioning additional inventory shortcut --- indra/newview/skins/default/xui/en/menu_inventory_gear_default.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/skins/default/xui/en/menu_inventory_gear_default.xml b/indra/newview/skins/default/xui/en/menu_inventory_gear_default.xml index 61cc9dfe77..d95541df80 100644 --- a/indra/newview/skins/default/xui/en/menu_inventory_gear_default.xml +++ b/indra/newview/skins/default/xui/en/menu_inventory_gear_default.xml @@ -9,6 +9,7 @@ Date: Mon, 13 Feb 2017 17:39:39 +0200 Subject: MAINT-6999 Cap attachment render weight --- indra/newview/llvoavatar.cpp | 15 +++++++++------ indra/newview/llvovolume.cpp | 4 ---- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 96a1beffbc..8888879b8a 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -118,6 +118,9 @@ extern U32 JOINT_COUNT_REQUIRED_FOR_FULLRIG; const F32 MAX_HOVER_Z = 2.0; const F32 MIN_HOVER_Z = -2.0; +const F32 MIN_ATTACHMENT_COMPLEXITY = 0.f; +const F32 MAX_ATTACHMENT_COMPLEXITY = 1.0e6f; + using namespace LLAvatarAppearanceDefines; //----------------------------------------------------------------------------- @@ -9056,10 +9059,10 @@ void LLVOAvatar::calculateUpdateRenderComplexity() const LLVOVolume* volume = drawable->getVOVolume(); if (volume) { - U32 attachment_total_cost = 0; - U32 attachment_volume_cost = 0; - U32 attachment_texture_cost = 0; - U32 attachment_children_cost = 0; + F32 attachment_total_cost = 0; + F32 attachment_volume_cost = 0; + F32 attachment_texture_cost = 0; + F32 attachment_children_cost = 0; attachment_volume_cost += volume->getRenderCost(textures); @@ -9083,7 +9086,6 @@ void LLVOAvatar::calculateUpdateRenderComplexity() // add the cost of each individual texture in the linkset attachment_texture_cost += volume_texture->second; } - attachment_total_cost = attachment_volume_cost + attachment_texture_cost + attachment_children_cost; LL_DEBUGS("ARCdetail") << "Attachment costs " << attached_object->getAttachmentItemID() << " total: " << attachment_total_cost @@ -9092,7 +9094,8 @@ void LLVOAvatar::calculateUpdateRenderComplexity() << ", " << volume->numChildren() << " children: " << attachment_children_cost << LL_ENDL; - cost += attachment_total_cost; + // Limit attachment complexity to avoid signed integer flipping of the wearer's ACI + cost += (U32)llclamp(attachment_total_cost, MIN_ATTACHMENT_COMPLEXITY, MAX_ATTACHMENT_COMPLEXITY); } } } diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 098996147f..657babd92c 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -81,8 +81,6 @@ const F32 FORCE_SIMPLE_RENDER_AREA = 512.f; const F32 FORCE_CULL_AREA = 8.f; -const F32 MIN_RENDER_COMPLEXITY = 0.f; -const F32 MAX_RENDER_COMPLEXITY = 1.0e6f; U32 JOINT_COUNT_REQUIRED_FOR_FULLRIG = 1; BOOL gAnimateTextures = TRUE; @@ -3617,8 +3615,6 @@ U32 LLVOVolume::getRenderCost(texture_cost_t &textures) const shame += media_faces * ARC_MEDIA_FACE_COST; } - shame = llclamp(shame, MIN_RENDER_COMPLEXITY, MAX_RENDER_COMPLEXITY); - if (shame > mRenderComplexity_current) { mRenderComplexity_current = (S32)shame; -- cgit v1.2.3 From 4524677fe526781e4cb9a987e9504cc3b2edd154 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 13 Feb 2017 20:15:26 +0200 Subject: MAINT-397 Teleport offers are not received after disabling "do not disturb" mode --- indra/newview/llviewermessage.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index d81cb804e4..579eacc315 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -3038,16 +3038,17 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) { return; } - else if (is_do_not_disturb) - { - send_do_not_disturb_message(msg, from_id); - } else if (gSavedSettings.getBOOL("VoiceCallsFriendsOnly") && (LLAvatarTracker::instance().getBuddyInfo(from_id) == NULL)) { return; } else { + if (is_do_not_disturb) + { + send_do_not_disturb_message(msg, from_id); + } + LLVector3 pos, look_at; U64 region_handle(0); U8 region_access(SIM_ACCESS_MIN); -- cgit v1.2.3 From 67edb011b5b803c21652c9735e03a387f26a77d5 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Tue, 14 Feb 2017 13:37:45 +0200 Subject: MAINT-7104 Flash toolbar when grid status page is updated --- indra/newview/app_settings/commands.xml | 1 + indra/newview/app_settings/settings.xml | 33 +++++ indra/newview/llfloatergridstatus.cpp | 156 +++++++++++++++++---- indra/newview/llfloatergridstatus.h | 15 ++ indra/newview/llstartup.cpp | 3 + indra/newview/skins/default/textures/textures.xml | 2 +- .../default/textures/toolbar_icons/grid_status.png | Bin 0 -> 483 bytes 7 files changed, 181 insertions(+), 29 deletions(-) create mode 100644 indra/newview/skins/default/textures/toolbar_icons/grid_status.png diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml index 64cd11a53a..412d3a53b3 100644 --- a/indra/newview/app_settings/commands.xml +++ b/indra/newview/app_settings/commands.xml @@ -294,6 +294,7 @@ /> Value http://wiki.secondlife.com/wiki/[LSL_STRING] + GridStatusRSS + + Comment + URL that points to SL Grid Status RSS + Persist + 1 + Type + String + Value + https://secondlife-status.statuspage.io/history.atom + + GridStatusUpdateDelay + + Comment + Timer delay for updating Grid Status RSS. + Persist + 1 + Type + F32 + Value + 60.0 + + TestGridStatusRSSFromFile + + Comment + For testing only: Don't update rss xml file from server. + Persist + 1 + Type + Boolean + Value + 0 + LagMeterShrunk Comment diff --git a/indra/newview/llfloatergridstatus.cpp b/indra/newview/llfloatergridstatus.cpp index a12f717a25..3429203afe 100644 --- a/indra/newview/llfloatergridstatus.cpp +++ b/indra/newview/llfloatergridstatus.cpp @@ -28,57 +28,157 @@ #include "llfloatergridstatus.h" +#include "llcallbacklist.h" +#include "llcorehttputil.h" +#include "llfloaterreg.h" #include "llhttpconstants.h" #include "llmediactrl.h" +#include "llsdserialize.h" +#include "lltoolbarview.h" #include "llviewercontrol.h" +#include "llxmltree.h" +std::map LLFloaterGridStatus::sItemsMap; +const std::string DEFAULT_GRID_STATUS_URL = "http://secondlife-status.statuspage.io/"; LLFloaterGridStatus::LLFloaterGridStatus(const Params& key) : - LLFloaterWebContent(key) + LLFloaterWebContent(key), + mIsFirstUpdate(TRUE) { } BOOL LLFloaterGridStatus::postBuild() { - LLFloaterWebContent::postBuild(); - mWebBrowser->addObserver(this); + LLFloaterWebContent::postBuild(); + mWebBrowser->addObserver(this); - return TRUE; + return TRUE; } void LLFloaterGridStatus::onOpen(const LLSD& key) { - Params p(key); - p.trusted_content = true; - p.allow_address_entry = false; - - LLFloaterWebContent::onOpen(p); - applyPreferredRect(); - if (mWebBrowser) - { - std::string url = "http://secondlife-status.statuspage.io/"; - mWebBrowser->navigateTo(url, HTTP_CONTENT_TEXT_HTML); - } + Params p(key); + p.trusted_content = true; + p.allow_address_entry = false; + + LLFloaterWebContent::onOpen(p); + applyPreferredRect(); + if (mWebBrowser) + { + mWebBrowser->navigateTo(DEFAULT_GRID_STATUS_URL, HTTP_CONTENT_TEXT_HTML); + } +} + +void LLFloaterGridStatus::startGridStatusTimer() +{ + checkGridStatusRSS(); + doPeriodically(boost::bind(&LLFloaterGridStatus::checkGridStatusRSS), gSavedSettings.getF32("GridStatusUpdateDelay")); +} + +bool LLFloaterGridStatus::checkGridStatusRSS() +{ + if(gToolBarView->hasCommand(LLCommandId("gridstatus"))) + { + LLCoros::instance().launch("LLFloaterGridStatus::getGridStatusRSSCoro", + boost::bind(&LLFloaterGridStatus::getGridStatusRSSCoro)); + } + return false; +} + +void LLFloaterGridStatus::getGridStatusRSSCoro() +{ + + LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); + LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t + httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getGridStatusRSSCoro", httpPolicy)); + LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders); + + httpHeaders->append(HTTP_OUT_HEADER_CONTENT_TYPE, HTTP_CONTENT_TEXT_XML); + std::string url = gSavedSettings.getString("GridStatusRSS"); + + LLSD result = httpAdapter->getRawAndSuspend(httpRequest, url, httpOpts, httpHeaders); + LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; + LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); + if (!status) + { + return; + } + + const LLSD::Binary &rawBody = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS_RAW].asBinary(); + std::string body(rawBody.begin(), rawBody.end()); + + std::string fullpath = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"grid_status_rss.xml"); + if(!gSavedSettings.getBOOL("TestGridStatusRSSFromFile")) + { + llofstream custom_file_out(fullpath.c_str(), std::ios::trunc); + if (custom_file_out.is_open()) + { + custom_file_out << body; + custom_file_out.close(); + } + } + LLXmlTree grid_status_xml; + if (!grid_status_xml.parseFile(fullpath)) + { + return ; + } + bool new_entries = false; + LLXmlTreeNode* rootp = grid_status_xml.getRoot(); + for (LLXmlTreeNode* item = rootp->getChildByName( "entry" ); item; item = rootp->getNextNamedChild()) + { + LLXmlTreeNode* id_node = item->getChildByName("id"); + LLXmlTreeNode* updated_node = item->getChildByName("updated"); + if (!id_node || !updated_node) + { + continue; + } + std::string guid = id_node->getContents(); + std::string date = updated_node->getContents(); + if(sItemsMap.find( guid ) == sItemsMap.end()) + { + new_entries = true; + } + else + { + if(sItemsMap[guid] != date) + { + new_entries = true; + } + } + sItemsMap[guid] = date; + } + if(new_entries && !getInstance()->isFirstUpdate()) + { + gToolBarView->flashCommand(LLCommandId("gridstatus"), true); + } + getInstance()->setFirstUpdate(FALSE); } + // virtual void LLFloaterGridStatus::handleReshape(const LLRect& new_rect, bool by_user) { - if (by_user && !isMinimized()) - { - gSavedSettings.setRect("GridStatusFloaterRect", new_rect); - } + if (by_user && !isMinimized()) + { + gSavedSettings.setRect("GridStatusFloaterRect", new_rect); + } - LLFloaterWebContent::handleReshape(new_rect, by_user); + LLFloaterWebContent::handleReshape(new_rect, by_user); } void LLFloaterGridStatus::applyPreferredRect() { - const LLRect preferred_rect = gSavedSettings.getRect("GridStatusFloaterRect"); - - // Don't override position that may have been set by floater stacking code. - LLRect new_rect = getRect(); - new_rect.setLeftTopAndSize( - new_rect.mLeft, new_rect.mTop, - preferred_rect.getWidth(), preferred_rect.getHeight()); - setShape(new_rect); + const LLRect preferred_rect = gSavedSettings.getRect("GridStatusFloaterRect"); + + LLRect new_rect = getRect(); + new_rect.setLeftTopAndSize( + new_rect.mLeft, new_rect.mTop, + preferred_rect.getWidth(), preferred_rect.getHeight()); + setShape(new_rect); +} + +LLFloaterGridStatus* LLFloaterGridStatus::getInstance() +{ + return LLFloaterReg::getTypedInstance("grid_status"); } diff --git a/indra/newview/llfloatergridstatus.h b/indra/newview/llfloatergridstatus.h index 045c647f4a..1608515003 100644 --- a/indra/newview/llfloatergridstatus.h +++ b/indra/newview/llfloatergridstatus.h @@ -46,10 +46,25 @@ public: /*virtual*/ void onOpen(const LLSD& key); /*virtual*/ void handleReshape(const LLRect& new_rect, bool by_user = false); + static bool checkGridStatusRSS(); + static void getGridStatusRSSCoro(); + + void startGridStatusTimer(); + BOOL isFirstUpdate() { return mIsFirstUpdate; } + void setFirstUpdate(BOOL first_update) { mIsFirstUpdate = first_update; } + + static LLFloaterGridStatus* getInstance(); + + private: /*virtual*/ BOOL postBuild(); void applyPreferredRect(); + + static std::map sItemsMap; + + LLFrameTimer mGridStatusTimer; + BOOL mIsFirstUpdate; }; #endif // LL_LLFLOATERGRIDSTATUS_H diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index b762b2ae1c..347409fcab 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -56,6 +56,7 @@ #include "llerrorcontrol.h" #include "llfloaterreg.h" #include "llfocusmgr.h" +#include "llfloatergridstatus.h" #include "llfloaterimsession.h" #include "lllocationhistory.h" #include "llimageworker.h" @@ -1875,6 +1876,8 @@ bool idle_startup() LLFloaterReg::showInitialVisibleInstances(); + LLFloaterGridStatus::getInstance()->startGridStatusTimer(); + display_startup(); display_startup(); diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index bd8c0d5a96..d757e39366 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -136,7 +136,7 @@ with the same filename but different name - + diff --git a/indra/newview/skins/default/textures/toolbar_icons/grid_status.png b/indra/newview/skins/default/textures/toolbar_icons/grid_status.png new file mode 100644 index 0000000000..b92b93cfb4 Binary files /dev/null and b/indra/newview/skins/default/textures/toolbar_icons/grid_status.png differ -- cgit v1.2.3 From 6e06281477840e2403d52510b54bf2cd99dd8216 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Tue, 14 Feb 2017 15:46:27 +0200 Subject: MAINT-7104 whitespace clean-up --- indra/newview/llfloatergridstatus.cpp | 2 +- indra/newview/llfloatergridstatus.h | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/indra/newview/llfloatergridstatus.cpp b/indra/newview/llfloatergridstatus.cpp index 3429203afe..c47ff1c1d9 100644 --- a/indra/newview/llfloatergridstatus.cpp +++ b/indra/newview/llfloatergridstatus.cpp @@ -4,7 +4,7 @@ * * $LicenseInfo:firstyear=2009&license=viewerlgpl$ * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * Copyright (C) 2017, Linden Research, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/indra/newview/llfloatergridstatus.h b/indra/newview/llfloatergridstatus.h index 1608515003..0c3deb7d4c 100644 --- a/indra/newview/llfloatergridstatus.h +++ b/indra/newview/llfloatergridstatus.h @@ -4,7 +4,7 @@ * * $LicenseInfo:firstyear=2009&license=viewerlgpl$ * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * Copyright (C) 2017, Linden Research, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -36,32 +36,32 @@ class LLMediaCtrl; class LLFloaterGridStatus : - public LLFloaterWebContent + public LLFloaterWebContent { public: - typedef LLSDParamAdapter<_Params> Params; + typedef LLSDParamAdapter<_Params> Params; - LLFloaterGridStatus(const Params& key); + LLFloaterGridStatus(const Params& key); - /*virtual*/ void onOpen(const LLSD& key); - /*virtual*/ void handleReshape(const LLRect& new_rect, bool by_user = false); + /*virtual*/ void onOpen(const LLSD& key); + /*virtual*/ void handleReshape(const LLRect& new_rect, bool by_user = false); - static bool checkGridStatusRSS(); - static void getGridStatusRSSCoro(); + static bool checkGridStatusRSS(); + static void getGridStatusRSSCoro(); - void startGridStatusTimer(); - BOOL isFirstUpdate() { return mIsFirstUpdate; } - void setFirstUpdate(BOOL first_update) { mIsFirstUpdate = first_update; } + void startGridStatusTimer(); + BOOL isFirstUpdate() { return mIsFirstUpdate; } + void setFirstUpdate(BOOL first_update) { mIsFirstUpdate = first_update; } - static LLFloaterGridStatus* getInstance(); + static LLFloaterGridStatus* getInstance(); private: - /*virtual*/ BOOL postBuild(); + /*virtual*/ BOOL postBuild(); - void applyPreferredRect(); + void applyPreferredRect(); - static std::map sItemsMap; + static std::map sItemsMap; LLFrameTimer mGridStatusTimer; BOOL mIsFirstUpdate; -- cgit v1.2.3 From 3c249e5d5fca71714d7686c19d093962fbec313e Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Wed, 15 Feb 2017 14:52:33 +0200 Subject: MAINT-7051 Release Notes url shouldn't include the EDU parameter --- indra/newview/llappviewer.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 5eb82a2d0b..62e32c0bdc 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3312,7 +3312,12 @@ LLSD LLAppViewer::getViewerInfo() const std::string url = LLTrans::getString("RELEASE_NOTES_BASE_URL"); if (! LLStringUtil::endsWith(url, "/")) url += "/"; - url += LLURI::escape(LLVersionInfo::getChannel()) + "/"; + std::string channel = LLVersionInfo::getChannel(); + if (LLStringUtil::endsWith(boost::to_lower_copy(channel), " edu")) // Release Notes url shouldn't include the EDU parameter + { + boost::erase_tail(channel, 4); + } + url += LLURI::escape(channel) + "/"; url += LLURI::escape(LLVersionInfo::getVersion()); info["VIEWER_RELEASE_NOTES_URL"] = url; -- cgit v1.2.3 From 515a2f9c39506e22595aacee3c397daca58c9c15 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Thu, 16 Feb 2017 14:46:10 +0200 Subject: MAINT-7132 snapshot window should re-open in last selected mode --- indra/newview/llfloatersnapshot.cpp | 4 ---- indra/newview/llpanelsnapshotlocal.cpp | 3 +-- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index c0980719bb..ba3106913c 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -653,10 +653,6 @@ void LLFloaterSnapshot::Impl::setFinished(bool finished, bool ok, const std::str LLUICtrl* finished_lbl = mFloater->getChild(ok ? "succeeded_lbl" : "failed_lbl"); std::string result_text = mFloater->getString(msg + "_" + (ok ? "succeeded_str" : "failed_str")); finished_lbl->setValue(result_text); - - LLSideTrayPanelContainer* panel_container = mFloater->getChild("panel_container"); - panel_container->openPreviousPanel(); - panel_container->getCurrentPanel()->onOpen(LLSD()); } } diff --git a/indra/newview/llpanelsnapshotlocal.cpp b/indra/newview/llpanelsnapshotlocal.cpp index 3652c10586..51ec964ace 100644 --- a/indra/newview/llpanelsnapshotlocal.cpp +++ b/indra/newview/llpanelsnapshotlocal.cpp @@ -168,12 +168,11 @@ void LLPanelSnapshotLocal::onSaveFlyoutCommit(LLUICtrl* ctrl) if (saved) { mSnapshotFloater->postSave(); - goBack(); floater->notify(LLSD().with("set-finished", LLSD().with("ok", true).with("msg", "local"))); } else { - cancel(); + floater->notify(LLSD().with("set-finished", LLSD().with("ok", false).with("msg", "local"))); } } -- cgit v1.2.3 From 58cb66135257487ccbca693215f8c1d72576deeb Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 17 Feb 2017 15:19:57 +0200 Subject: MAINT-397 Fixing confusing behavior --- indra/newview/skins/default/xui/en/notifications.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index c4190a4940..a509adfcbc 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -4326,7 +4326,6 @@ Cannot offer friendship at this time. Please try again in a moment. Do Not Disturb is on. You will not be notified of incoming communications. - Other residents will receive your Do Not Disturb response (set in Preferences > General). -- Teleportation offers will be declined. - Voice calls will be rejected. Date: Mon, 20 Feb 2017 11:20:03 +0200 Subject: MAINT-7142 Use '/completename' in teleport offer and eject messages --- indra/newview/llpanelgrouproles.cpp | 2 +- indra/newview/llviewermessage.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index 00c204e702..6ac439177a 100644 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -1231,7 +1231,7 @@ void LLPanelGroupMembersSubTab::sendEjectNotifications(const LLUUID& group_id, c for (uuid_vec_t::const_iterator i = selected_members.begin(); i != selected_members.end(); ++i) { LLSD args; - args["AVATAR_NAME"] = LLSLURL("agent", *i, "displayname").getSLURLString(); + args["AVATAR_NAME"] = LLSLURL("agent", *i, "completename").getSLURLString(); args["GROUP_NAME"] = group_data->mName; LLNotifications::instance().add(LLNotification::Params("EjectAvatarFromGroup").substitutions(args)); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 579eacc315..8076c6b1df 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -7034,7 +7034,7 @@ void send_lures(const LLSD& notification, const LLSD& response) std::string target_name; gCacheName->getFullName(target_id, target_name); // for im log filenames LLSD args; - args["TO_NAME"] = LLSLURL("agent", target_id, "displayname").getSLURLString();; + args["TO_NAME"] = LLSLURL("agent", target_id, "completename").getSLURLString();; LLSD payload; -- cgit v1.2.3 From da3fde24aa6fe06077dafeff6c7cafacaa50674a Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Mon, 20 Feb 2017 11:24:30 +0200 Subject: MAINT-7133 add object name to inventory offer chat message --- indra/newview/llgiveinventory.cpp | 23 ++++++++++++++--------- indra/newview/llgiveinventory.h | 4 +++- indra/newview/skins/default/xui/en/strings.xml | 5 ++++- 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/indra/newview/llgiveinventory.cpp b/indra/newview/llgiveinventory.cpp index a9bf8a9a50..b2271cf4ff 100644 --- a/indra/newview/llgiveinventory.cpp +++ b/indra/newview/llgiveinventory.cpp @@ -306,21 +306,23 @@ bool LLGiveInventory::doGiveInventoryCategory(const LLUUID& to_agent, ////////////////////////////////////////////////////////////////////////// //static -void LLGiveInventory::logInventoryOffer(const LLUUID& to_agent, const LLUUID &im_session_id) +void LLGiveInventory::logInventoryOffer(const LLUUID& to_agent, const LLUUID &im_session_id, const std::string& item_name, bool is_folder) { // compute id of possible IM session with agent that has "to_agent" id LLUUID session_id = LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, to_agent); // If this item was given by drag-and-drop into an IM panel, log this action in the IM panel chat. LLSD args; args["user_id"] = to_agent; + args["ITEM_NAME"] = item_name; + std::string message_name = is_folder ? "inventory_folder_offered" : "inventory_item_offered"; if (im_session_id.notNull()) { - gIMMgr->addSystemMessage(im_session_id, "inventory_item_offered", args); + gIMMgr->addSystemMessage(im_session_id, message_name, args); } // If this item was given by drag-and-drop on avatar while IM panel was open, log this action in the IM panel chat. else if (LLIMModel::getInstance()->findIMSession(session_id)) { - gIMMgr->addSystemMessage(session_id, "inventory_item_offered", args); + gIMMgr->addSystemMessage(session_id, message_name, args); } // If this item was given by drag-and-drop on avatar while IM panel wasn't open, log this action to IM history. else @@ -331,7 +333,9 @@ void LLGiveInventory::logInventoryOffer(const LLUUID& to_agent, const LLUUID &im // Build a new format username or firstname_lastname for legacy names // to use it for a history log filename. full_name = LLCacheName::buildUsername(full_name); - LLIMModel::instance().logToFile(full_name, LLTrans::getString("SECOND_LIFE"), im_session_id, LLTrans::getString("inventory_item_offered-im")); + LLUIString message = LLTrans::getString(message_name + "-im"); + message.setArgs(args); + LLIMModel::instance().logToFile(full_name, LLTrans::getString("SECOND_LIFE"), im_session_id, message.getString()); } } } @@ -385,6 +389,7 @@ void LLGiveInventory::commitGiveInventoryItem(const LLUUID& to_agent, { if (!item) return; std::string name; + std::string item_name = item->getName(); LLAgentUI::buildFullname(name); LLUUID transaction_id; transaction_id.generate(); @@ -399,7 +404,7 @@ void LLGiveInventory::commitGiveInventoryItem(const LLUUID& to_agent, gAgentSessionID, to_agent, name, - item->getName(), + item_name, IM_ONLINE, IM_INVENTORY_OFFERED, transaction_id, @@ -421,7 +426,7 @@ void LLGiveInventory::commitGiveInventoryItem(const LLUUID& to_agent, LLMuteList::getInstance()->autoRemove(to_agent, LLMuteList::AR_INVENTORY); - logInventoryOffer(to_agent, im_session_id); + logInventoryOffer(to_agent, im_session_id, item_name); // add buddy to recent people list LLRecentPeople::instance().add(to_agent); @@ -501,7 +506,7 @@ bool LLGiveInventory::commitGiveInventoryCategory(const LLUUID& to_agent, items, LLInventoryModel::EXCLUDE_TRASH, giveable); - + std::string cat_name = cat->getName(); bool give_successful = true; // MAX ITEMS is based on (sizeof(uuid)+2) * count must be < // MTUBYTES or 18 * count < 1200 => count < 1200/18 => @@ -556,7 +561,7 @@ bool LLGiveInventory::commitGiveInventoryCategory(const LLUUID& to_agent, gAgent.getSessionID(), to_agent, name, - cat->getName(), + cat_name, IM_ONLINE, IM_INVENTORY_OFFERED, transaction_id, @@ -579,7 +584,7 @@ bool LLGiveInventory::commitGiveInventoryCategory(const LLUUID& to_agent, LLMuteList::getInstance()->autoRemove(to_agent, LLMuteList::AR_INVENTORY); - logInventoryOffer(to_agent, im_session_id); + logInventoryOffer(to_agent, im_session_id, cat_name, true); } return give_successful; diff --git a/indra/newview/llgiveinventory.h b/indra/newview/llgiveinventory.h index 85bc1ed49c..20e6df76e5 100644 --- a/indra/newview/llgiveinventory.h +++ b/indra/newview/llgiveinventory.h @@ -78,7 +78,9 @@ private: * logs "Inventory item offered" to IM */ static void logInventoryOffer(const LLUUID& to_agent, - const LLUUID &im_session_id = LLUUID::null); + const LLUUID &im_session_id = LLUUID::null, + const std::string& item_name = std::string(), + bool is_folder = false); static void commitGiveInventoryItem(const LLUUID& to_agent, const LLInventoryItem* item, diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 6f00f1731e..aad2c611f4 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -3628,7 +3628,10 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. Conference with [AGENT_NAME] - Inventory item offered + Inventory item '[ITEM_NAME]' offered + + + Inventory folder '[ITEM_NAME]' offered Drag items from inventory here -- cgit v1.2.3 From a6b3bb1a2d7c0bac90918f75b67a8066d95a4783 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Mon, 20 Feb 2017 14:20:43 +0200 Subject: MAINT-7146 No callback for 'Url.RemoveFriend' in LLScrollListCtrl --- indra/llui/llscrolllistctrl.cpp | 7 +++++++ indra/llui/llscrolllistctrl.h | 1 + 2 files changed, 8 insertions(+) diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index db8fdc46b7..0afa8d43f1 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -1808,6 +1808,7 @@ BOOL LLScrollListCtrl::handleRightMouseDown(S32 x, S32 y, MASK mask) registrar.add("Url.ShowProfile", boost::bind(&LLScrollListCtrl::showProfile, id, is_group)); registrar.add("Url.SendIM", boost::bind(&LLScrollListCtrl::sendIM, id)); registrar.add("Url.AddFriend", boost::bind(&LLScrollListCtrl::addFriend, id)); + registrar.add("Url.RemoveFriend", boost::bind(&LLScrollListCtrl::removeFriend, id)); registrar.add("Url.Execute", boost::bind(&LLScrollListCtrl::showNameDetails, id, is_group)); registrar.add("Url.CopyLabel", boost::bind(&LLScrollListCtrl::copyNameToClipboard, id, is_group)); registrar.add("Url.CopyUrl", boost::bind(&LLScrollListCtrl::copySLURLToClipboard, id, is_group)); @@ -1852,6 +1853,12 @@ void LLScrollListCtrl::addFriend(std::string id) LLUrlAction::addFriend(slurl); } +void LLScrollListCtrl::removeFriend(std::string id) +{ + std::string slurl = "secondlife:///app/agent/" + id + "/about"; + LLUrlAction::removeFriend(slurl); +} + void LLScrollListCtrl::showNameDetails(std::string id, bool is_group) { // open the resident's details or the group details diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h index 6325a79cd5..8343750a54 100644 --- a/indra/llui/llscrolllistctrl.h +++ b/indra/llui/llscrolllistctrl.h @@ -432,6 +432,7 @@ private: static void showProfile(std::string id, bool is_group); static void sendIM(std::string id); static void addFriend(std::string id); + static void removeFriend(std::string id); static void showNameDetails(std::string id, bool is_group); static void copyNameToClipboard(std::string id, bool is_group); static void copySLURLToClipboard(std::string id, bool is_group); -- cgit v1.2.3 From 3faad84a533b80e4a40e29e880d1608ffb0763ef Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Tue, 21 Feb 2017 18:01:23 +0200 Subject: MAINT-7036 Communicate Menu - Voice Morphing - Subscribe Now options - update --- indra/newview/llviewermenu.cpp | 9 ++++++++- indra/newview/skins/default/xui/en/menu_viewer.xml | 6 ++++++ indra/newview/skins/default/xui/en/strings.xml | 3 ++- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 99b7a98abc..d847661ce7 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -8618,7 +8618,12 @@ public: void handle_voice_morphing_subscribe() { - LLWeb::loadURLExternal(LLTrans::getString("voice_morphing_url")); + LLWeb::loadURL(LLTrans::getString("voice_morphing_url")); +} + +void handle_premium_voice_morphing_subscribe() +{ + LLWeb::loadURL(LLTrans::getString("premium_voice_morphing_url")); } class LLToggleUIHints : public view_listener_t @@ -8814,6 +8819,8 @@ void initialize_menus() // Communicate > Voice morphing > Subscribe... commit.add("Communicate.VoiceMorphing.Subscribe", boost::bind(&handle_voice_morphing_subscribe)); + // Communicate > Voice morphing > Premium perk... + commit.add("Communicate.VoiceMorphing.PremiumPerk", boost::bind(&handle_premium_voice_morphing_subscribe)); LLVivoxVoiceClient * voice_clientp = LLVivoxVoiceClient::getInstance(); enable.add("Communicate.VoiceMorphing.NoVoiceMorphing.Check" , boost::bind(&LLVivoxVoiceClient::onCheckVoiceEffect, voice_clientp, "NoVoiceMorphing")); diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 332d79e1ea..c96b7ae673 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -337,6 +337,12 @@ + + + Home position set. - http://secondlife.com/landing/voicemorphing + https://secondlife.com/destination/voice-island + https://secondlife.com/destination/voice-morphing-premium [NAME] paid you L$[AMOUNT] [REASON]. -- cgit v1.2.3 From aa52236c5570a0b971b2524da655ccff6a1bff0d Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 21 Feb 2017 19:30:41 +0200 Subject: MAINT-768 Fixed mouse hover triggers foreground and background UI --- indra/newview/llinventorylistitem.cpp | 4 ++-- indra/newview/llinventorylistitem.h | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/indra/newview/llinventorylistitem.cpp b/indra/newview/llinventorylistitem.cpp index 0601796436..12bb609df8 100644 --- a/indra/newview/llinventorylistitem.cpp +++ b/indra/newview/llinventorylistitem.cpp @@ -182,10 +182,10 @@ void LLPanelInventoryListItemBase::setValue(const LLSD& value) mSelected = value["selected"]; } -void LLPanelInventoryListItemBase::onMouseEnter(S32 x, S32 y, MASK mask) +BOOL LLPanelInventoryListItemBase::handleHover(S32 x, S32 y, MASK mask) { mHovered = true; - LLPanel::onMouseEnter(x, y, mask); + return LLPanel::handleHover(x, y, mask); } void LLPanelInventoryListItemBase::onMouseLeave(S32 x, S32 y, MASK mask) diff --git a/indra/newview/llinventorylistitem.h b/indra/newview/llinventorylistitem.h index b1ef6c74ee..d4dd212cc3 100644 --- a/indra/newview/llinventorylistitem.h +++ b/indra/newview/llinventorylistitem.h @@ -129,8 +129,8 @@ public: */ /*virtual*/ S32 notify(const LLSD& info); - /* Highlights item */ - /*virtual*/ void onMouseEnter(S32 x, S32 y, MASK mask); + /* Highlights item */ + /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask); /* Removes item highlight */ /*virtual*/ void onMouseLeave(S32 x, S32 y, MASK mask); @@ -153,6 +153,7 @@ public: LLViewerInventoryItem* getItem() const; void setSeparatorVisible(bool visible) { mSeparatorVisible = visible; } + void resetHighlight() { mHovered = FALSE; } virtual ~LLPanelInventoryListItemBase(){} -- cgit v1.2.3 From 9c015df3fab0b5cc229ad1a0393e5da50ee29883 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 21 Feb 2017 15:50:09 +0200 Subject: MAINT-389 Fixed No way to wear an outfit from Library besides drag-n-drop --- indra/newview/llinventorybridge.cpp | 96 +++++++++++++++++++++++++++---------- 1 file changed, 71 insertions(+), 25 deletions(-) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 6cb7ce622f..555c19baac 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -3941,6 +3941,37 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items mWearables=TRUE; } } + else + { + // Mark wearables and allow copy from library + LLInventoryModel* model = getInventoryModel(); + if(!model) return; + const LLInventoryCategory* category = model->getCategory(mUUID); + if (!category) return; + LLFolderType::EType type = category->getPreferredType(); + const bool is_system_folder = LLFolderType::lookupIsProtectedType(type); + + LLFindWearables is_wearable; + LLIsType is_object(LLAssetType::AT_OBJECT); + LLIsType is_gesture(LLAssetType::AT_GESTURE); + + if (checkFolderForContentsOfType(model, is_wearable) || + checkFolderForContentsOfType(model, is_object) || + checkFolderForContentsOfType(model, is_gesture)) + { + mWearables = TRUE; + } + + if (!is_system_folder) + { + items.push_back(std::string("Copy")); + if (!isItemCopyable()) + { + // For some reason there are items in library that can't be copied directly + disabled_items.push_back(std::string("Copy")); + } + } + } // Preemptively disable system folder removal if more than one item selected. if ((flags & FIRST_SELECTED_ITEM) == 0) @@ -3948,7 +3979,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items disabled_items.push_back(std::string("Delete System Folder")); } - if (!isMarketplaceListingsFolder()) + if (isAgentInventory() && !isMarketplaceListingsFolder()) { items.push_back(std::string("Share")); if (!canShare()) @@ -3956,6 +3987,9 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items disabled_items.push_back(std::string("Share")); } } + + + // Add menu items that are dependent on the contents of the folder. LLViewerInventoryCategory* category = (LLViewerInventoryCategory *) model->getCategory(mUUID); if (category && (marketplace_listings_id != mUUID)) @@ -3993,7 +4027,6 @@ void LLFolderBridge::buildContextMenuFolderOptions(U32 flags, menuentry_vec_t& const LLUUID trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH); if (trash_id == mUUID) return; if (isItemInTrash()) return; - if (!isAgentInventory()) return; if (!isItemRemovable()) { @@ -4006,9 +4039,10 @@ void LLFolderBridge::buildContextMenuFolderOptions(U32 flags, menuentry_vec_t& // BAP change once we're no longer treating regular categories as ensembles. const bool is_ensemble = (type == LLFolderType::FT_NONE || LLFolderType::lookupIsEnsembleType(type)); + const bool is_agent_inventory = isAgentInventory(); // Only enable calling-card related options for non-system folders. - if (!is_system_folder) + if (!is_system_folder && is_agent_inventory) { LLIsType is_callingcard(LLAssetType::AT_CALLINGCARD); if (mCallingCards || checkFolderForContentsOfType(model, is_callingcard)) @@ -4020,7 +4054,7 @@ void LLFolderBridge::buildContextMenuFolderOptions(U32 flags, menuentry_vec_t& } #ifndef LL_RELEASE_FOR_DOWNLOAD - if (LLFolderType::lookupIsProtectedType(type)) + if (LLFolderType::lookupIsProtectedType(type) && is_agent_inventory) { items.push_back(std::string("Delete System Folder")); } @@ -4037,8 +4071,6 @@ void LLFolderBridge::buildContextMenuFolderOptions(U32 flags, menuentry_vec_t& checkFolderForContentsOfType(model, is_object) || checkFolderForContentsOfType(model, is_gesture) ) { - items.push_back(std::string("Folder Wearables Separator")); - // Only enable add/replace outfit for non-system folders. if (!is_system_folder) { @@ -4049,25 +4081,30 @@ void LLFolderBridge::buildContextMenuFolderOptions(U32 flags, menuentry_vec_t& } items.push_back(std::string("Replace Outfit")); + + if (is_agent_inventory) + { + items.push_back(std::string("Folder Wearables Separator")); + if (is_ensemble) + { + items.push_back(std::string("Wear As Ensemble")); + } + items.push_back(std::string("Remove From Outfit")); + if (!LLAppearanceMgr::getCanRemoveFromCOF(mUUID)) + { + disabled_items.push_back(std::string("Remove From Outfit")); + } + } + if (!LLAppearanceMgr::instance().getCanReplaceCOF(mUUID)) + { + disabled_items.push_back(std::string("Replace Outfit")); + } + if (!LLAppearanceMgr::instance().getCanAddToCOF(mUUID)) + { + disabled_items.push_back(std::string("Add To Outfit")); + } + items.push_back(std::string("Outfit Separator")); } - if (is_ensemble) - { - items.push_back(std::string("Wear As Ensemble")); - } - items.push_back(std::string("Remove From Outfit")); - if (!LLAppearanceMgr::getCanRemoveFromCOF(mUUID)) - { - disabled_items.push_back(std::string("Remove From Outfit")); - } - if (!LLAppearanceMgr::instance().getCanReplaceCOF(mUUID)) - { - disabled_items.push_back(std::string("Replace Outfit")); - } - if (!LLAppearanceMgr::instance().getCanAddToCOF(mUUID)) - { - disabled_items.push_back(std::string("Add To Outfit")); - } - items.push_back(std::string("Outfit Separator")); } } @@ -4304,9 +4341,18 @@ void LLFolderBridge::modifyOutfit(BOOL append) return; } - LLAppearanceMgr::instance().wearInventoryCategory( cat, FALSE, append ); + if (isAgentInventory()) + { + LLAppearanceMgr::instance().wearInventoryCategory(cat, FALSE, append); + } + else + { + // Library, we need to copy content first + LLAppearanceMgr::instance().wearInventoryCategory(cat, TRUE, append); + } } + // +=================================================+ // | LLMarketplaceFolderBridge | // +=================================================+ -- cgit v1.2.3 From 605160d501158362ced3e62425bdcd8d28895fd5 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 15 Feb 2017 20:40:03 +0200 Subject: MAINT-7118 Swapping legacy people API with new cache --- indra/llmessage/llavatarnamecache.cpp | 22 ++++++++ indra/llmessage/llavatarnamecache.h | 10 +++- indra/newview/llavataractions.cpp | 41 +++++++------- indra/newview/llcallingcard.cpp | 12 +++-- indra/newview/llchathistory.cpp | 6 +-- indra/newview/llconversationmodel.cpp | 8 +-- indra/newview/llfloaterconversationpreview.cpp | 3 +- indra/newview/llfloaterimcontainer.cpp | 7 +-- indra/newview/llfloaterimnearbychat.cpp | 2 +- indra/newview/llfloaterproperties.cpp | 11 ++-- indra/newview/llfloaterscriptlimits.cpp | 27 ++++++++-- indra/newview/llfloaterscriptlimits.h | 3 ++ indra/newview/llgiveinventory.cpp | 7 +-- indra/newview/llgroupmgr.cpp | 8 +-- indra/newview/llimview.cpp | 20 +++---- indra/newview/llimview.h | 2 +- indra/newview/llinventorymodel.cpp | 11 ++-- indra/newview/llmutelist.cpp | 27 +++++----- indra/newview/llnamebox.cpp | 5 +- indra/newview/llnameeditor.cpp | 5 +- indra/newview/llnotificationhandlerutil.cpp | 28 +++++++--- indra/newview/llpanelgrouproles.cpp | 12 ++--- indra/newview/llpanelpicks.cpp | 6 +-- indra/newview/llselectmgr.cpp | 7 +-- indra/newview/llspeakers.cpp | 7 +-- indra/newview/llspeakers.h | 3 +- indra/newview/lltooldraganddrop.cpp | 12 ++--- indra/newview/lltoolpie.cpp | 23 ++++---- indra/newview/llviewerinventory.cpp | 10 ++-- indra/newview/llviewerinventory.h | 3 +- indra/newview/llviewermenu.cpp | 6 +-- indra/newview/llviewermessage.cpp | 74 +++++++++++++++++++------- 32 files changed, 280 insertions(+), 148 deletions(-) diff --git a/indra/llmessage/llavatarnamecache.cpp b/indra/llmessage/llavatarnamecache.cpp index 004db546b7..5a112b5432 100644 --- a/indra/llmessage/llavatarnamecache.cpp +++ b/indra/llmessage/llavatarnamecache.cpp @@ -755,6 +755,28 @@ void LLAvatarNameCache::insert(const LLUUID& agent_id, const LLAvatarName& av_na sCache[agent_id] = av_name; } +LLUUID LLAvatarNameCache::findIdByName(const std::string& name) +{ + std::map::iterator it; + std::map::iterator end = sCache.end(); + for (it = sCache.begin(); it != end; ++it) + { + if (it->second.getUserName() == name) + { + return it->first; + } + } + + // Legacy method + LLUUID id; + if (gCacheName->getUUID(name, id)) + { + return id; + } + + return LLUUID::null; +} + #if 0 F64 LLAvatarNameCache::nameExpirationFromHeaders(LLCore::HttpHeaders *headers) { diff --git a/indra/llmessage/llavatarnamecache.h b/indra/llmessage/llavatarnamecache.h index bd2715e956..63e067c939 100644 --- a/indra/llmessage/llavatarnamecache.h +++ b/indra/llmessage/llavatarnamecache.h @@ -84,7 +84,15 @@ namespace LLAvatarNameCache void insert(const LLUUID& agent_id, const LLAvatarName& av_name); void erase(const LLUUID& agent_id); - /// Provide some fallback for agents that return errors. + // A way to find agent id by UUID, very slow, also unreliable + // since it doesn't request names, just serch exsisting ones + // that are likely not in cache. + // + // Todo: Find a way to remove this. + // Curently this method is used for chat history and in some cases notices. + LLUUID findIdByName(const std::string& name); + + /// Provide some fallback for agents that return errors. void handleAgentError(const LLUUID& agent_id); // Compute name expiration time from HTTP Cache-Control header, diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 36e95c07f4..2045c3e297 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -478,15 +478,14 @@ void LLAvatarActions::kick(const LLUUID& id) // static void LLAvatarActions::freezeAvatar(const LLUUID& id) { - std::string fullname; - gCacheName->getFullName(id, fullname); + LLAvatarName av_name; LLSD payload; payload["avatar_id"] = id; - if (!fullname.empty()) + if (LLAvatarNameCache::get(id, &av_name)) { LLSD args; - args["AVATAR_NAME"] = fullname; + args["AVATAR_NAME"] = av_name.getUserName(); LLNotificationsUtil::add("FreezeAvatarFullname", args, payload, handleFreezeAvatar); } else @@ -498,15 +497,15 @@ void LLAvatarActions::freezeAvatar(const LLUUID& id) // static void LLAvatarActions::ejectAvatar(const LLUUID& id, bool ban_enabled) { - std::string fullname; - gCacheName->getFullName(id, fullname); + LLAvatarName av_name; LLSD payload; payload["avatar_id"] = id; payload["ban_enabled"] = ban_enabled; LLSD args; - if (!fullname.empty()) + bool has_name = LLAvatarNameCache::get(id, &av_name); + if (has_name) { - args["AVATAR_NAME"] = fullname; + args["AVATAR_NAME"] = av_name.getUserName(); } if (ban_enabled) @@ -515,7 +514,7 @@ void LLAvatarActions::ejectAvatar(const LLUUID& id, bool ban_enabled) } else { - if (!fullname.empty()) + if (has_name) { LLNotificationsUtil::add("EjectAvatarFullnameNoBan", args, payload, handleEjectAvatar); } @@ -991,10 +990,10 @@ bool LLAvatarActions::canShareSelectedItems(LLInventoryPanel* inv_panel /* = NUL // static void LLAvatarActions::toggleBlock(const LLUUID& id) { - std::string name; + LLAvatarName av_name; + LLAvatarNameCache::get(id, &av_name); - gCacheName->getFullName(id, name); // needed for mute - LLMute mute(id, name, LLMute::AGENT); + LLMute mute(id, av_name.getUserName(), LLMute::AGENT); if (LLMuteList::getInstance()->isMuted(mute.mID, mute.mName)) { @@ -1009,13 +1008,13 @@ void LLAvatarActions::toggleBlock(const LLUUID& id) // static void LLAvatarActions::toggleMuteVoice(const LLUUID& id) { - std::string name; - gCacheName->getFullName(id, name); // needed for mute + LLAvatarName av_name; + LLAvatarNameCache::get(id, &av_name); LLMuteList* mute_list = LLMuteList::getInstance(); bool is_muted = mute_list->isMuted(id, LLMute::flagVoiceChat); - LLMute mute(id, name, LLMute::AGENT); + LLMute mute(id, av_name.getUserName(), LLMute::AGENT); if (!is_muted) { mute_list->add(mute, LLMute::flagVoiceChat); @@ -1329,9 +1328,9 @@ bool LLAvatarActions::isFriend(const LLUUID& id) // static bool LLAvatarActions::isBlocked(const LLUUID& id) { - std::string name; - gCacheName->getFullName(id, name); // needed for mute - return LLMuteList::getInstance()->isMuted(id, name); + LLAvatarName av_name; + LLAvatarNameCache::get(id, &av_name); + return LLMuteList::getInstance()->isMuted(id, av_name.getUserName()); } // static @@ -1343,8 +1342,10 @@ bool LLAvatarActions::isVoiceMuted(const LLUUID& id) // static bool LLAvatarActions::canBlock(const LLUUID& id) { - std::string full_name; - gCacheName->getFullName(id, full_name); // needed for mute + LLAvatarName av_name; + LLAvatarNameCache::get(id, &av_name); + + std::string full_name = av_name.getUserName(); bool is_linden = (full_name.find("Linden") != std::string::npos); bool is_self = id == gAgentID; return !is_self && !is_linden; diff --git a/indra/newview/llcallingcard.cpp b/indra/newview/llcallingcard.cpp index f79d1aa609..6d20b23e9f 100644 --- a/indra/newview/llcallingcard.cpp +++ b/indra/newview/llcallingcard.cpp @@ -243,7 +243,6 @@ S32 LLAvatarTracker::addBuddyList(const LLAvatarTracker::buddy_map_t& buds) using namespace std; U32 new_buddy_count = 0; - std::string full_name; LLUUID agent_id; for(buddy_map_t::const_iterator itr = buds.begin(); itr != buds.end(); ++itr) { @@ -253,8 +252,11 @@ S32 LLAvatarTracker::addBuddyList(const LLAvatarTracker::buddy_map_t& buds) { ++new_buddy_count; mBuddyInfo[agent_id] = (*itr).second; - // IDEVO: is this necessary? name is unused? - gCacheName->getFullName(agent_id, full_name); + + // pre-request name for notifications? + LLAvatarName av_name; + LLAvatarNameCache::get(agent_id, &av_name); + addChangedMask(LLFriendObserver::ADD, agent_id); LL_DEBUGS() << "Added buddy " << agent_id << ", " << (mBuddyInfo[agent_id]->isOnline() ? "Online" : "Offline") @@ -889,7 +891,9 @@ bool LLCollectMappableBuddies::operator()(const LLUUID& buddy_id, LLRelationship bool LLCollectOnlineBuddies::operator()(const LLUUID& buddy_id, LLRelationship* buddy) { - gCacheName->getFullName(buddy_id, mFullName); + LLAvatarName av_name; + LLAvatarNameCache::get(buddy_id, &av_name); + mFullName = av_name.getUserName(); buddy_map_t::value_type value(buddy_id, mFullName); if(buddy->isOnline()) { diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 5d2997688f..9798ef3529 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -271,9 +271,9 @@ public: void mute(const LLUUID& participant_id, U32 flags) { BOOL is_muted = LLMuteList::getInstance()->isMuted(participant_id, flags); - std::string name; - gCacheName->getFullName(participant_id, name); - LLMute mute(participant_id, name, LLMute::AGENT); + LLAvatarName av_name; + LLAvatarNameCache::get(participant_id, &av_name); + LLMute mute(participant_id, av_name.getUserName(), LLMute::AGENT); if (!is_muted) { diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp index 328a638f2f..ebbbf23dee 100644 --- a/indra/newview/llconversationmodel.cpp +++ b/indra/newview/llconversationmodel.cpp @@ -602,12 +602,12 @@ bool LLConversationItemParticipant::isVoiceMuted() void LLConversationItemParticipant::muteVoice(bool mute_voice) { - std::string name; - gCacheName->getFullName(mUUID, name); + LLAvatarName av_name; + LLAvatarNameCache::get(mUUID, &av_name); LLMuteList * mute_listp = LLMuteList::getInstance(); - bool voice_already_muted = mute_listp->isMuted(mUUID, name); + bool voice_already_muted = mute_listp->isMuted(mUUID, av_name.getUserName()); - LLMute mute(mUUID, name, LLMute::AGENT); + LLMute mute(mUUID, av_name.getUserName(), LLMute::AGENT); if (voice_already_muted && !mute_voice) { mute_listp->remove(mute); diff --git a/indra/newview/llfloaterconversationpreview.cpp b/indra/newview/llfloaterconversationpreview.cpp index a358b7c10b..b48ecc8f31 100644 --- a/indra/newview/llfloaterconversationpreview.cpp +++ b/indra/newview/llfloaterconversationpreview.cpp @@ -25,6 +25,7 @@ #include "llviewerprecompiledheaders.h" +#include "llavatarnamecache.h" #include "llconversationlog.h" #include "llfloaterconversationpreview.h" #include "llimview.h" @@ -220,7 +221,7 @@ void LLFloaterConversationPreview::showHistory() else { std::string legacy_name = gCacheName->buildLegacyName(from); - gCacheName->getUUID(legacy_name, from_id); + from_id = LLAvatarNameCache::findIdByName(legacy_name); } LLChat chat; diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 7007c58b3c..3522932d03 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -2099,9 +2099,10 @@ void LLFloaterIMContainer::toggleAllowTextChat(const LLUUID& participant_uuid) void LLFloaterIMContainer::toggleMute(const LLUUID& participant_id, U32 flags) { BOOL is_muted = LLMuteList::getInstance()->isMuted(participant_id, flags); - std::string name; - gCacheName->getFullName(participant_id, name); - LLMute mute(participant_id, name, LLMute::AGENT); + + LLAvatarName av_name; + LLAvatarNameCache::get(participant_id, &av_name); + LLMute mute(participant_id, av_name.getUserName(), LLMute::AGENT); if (!is_muted) { diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp index 7d0ff22ed3..40ae22bb4e 100644 --- a/indra/newview/llfloaterimnearbychat.cpp +++ b/indra/newview/llfloaterimnearbychat.cpp @@ -218,7 +218,7 @@ void LLFloaterIMNearbyChat::loadHistory() else { std::string legacy_name = gCacheName->buildLegacyName(from); - gCacheName->getUUID(legacy_name, from_id); + from_id = LLAvatarNameCache::findIdByName(legacy_name); } LLChat chat; diff --git a/indra/newview/llfloaterproperties.cpp b/indra/newview/llfloaterproperties.cpp index 6bfc780722..1310a60638 100644 --- a/indra/newview/llfloaterproperties.cpp +++ b/indra/newview/llfloaterproperties.cpp @@ -30,6 +30,7 @@ #include #include #include "llcachename.h" +#include "llavatarnamecache.h" #include "lldbstrings.h" #include "llfloaterreg.h" @@ -274,12 +275,12 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item) if (item->getCreatorUUID().notNull()) { - std::string name; - gCacheName->getFullName(item->getCreatorUUID(), name); + LLAvatarName av_name; + LLAvatarNameCache::get(item->getCreatorUUID(), &av_name); getChildView("BtnCreator")->setEnabled(TRUE); getChildView("LabelCreatorTitle")->setEnabled(TRUE); getChildView("LabelCreatorName")->setEnabled(TRUE); - getChild("LabelCreatorName")->setValue(name); + getChild("LabelCreatorName")->setValue(av_name.getUserName()); } else { @@ -301,7 +302,9 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item) } else { - gCacheName->getFullName(perm.getOwner(), name); + LLAvatarName av_name; + LLAvatarNameCache::get(perm.getOwner(), &av_name); + name = av_name.getUserName(); } getChildView("BtnOwner")->setEnabled(TRUE); getChildView("LabelOwnerTitle")->setEnabled(TRUE); diff --git a/indra/newview/llfloaterscriptlimits.cpp b/indra/newview/llfloaterscriptlimits.cpp index c14bb4e7ae..5f0587a286 100644 --- a/indra/newview/llfloaterscriptlimits.cpp +++ b/indra/newview/llfloaterscriptlimits.cpp @@ -390,6 +390,14 @@ void LLPanelScriptLimitsRegionMemory::setErrorStatus(S32 status, const std::stri LL_WARNS() << "Can't handle remote parcel request."<< " Http Status: "<< status << ". Reason : "<< reason<getFullName(owner_id, owner_buf); // username + LLAvatarName av_name; + name_is_cached = LLAvatarNameCache::get(owner_id, &av_name); + owner_buf = av_name.getUserName(); owner_buf = LLCacheName::buildUsername(owner_buf); } if(!name_is_cached) @@ -511,9 +521,18 @@ void LLPanelScriptLimitsRegionMemory::setRegionDetails(LLSD content) if(std::find(names_requested.begin(), names_requested.end(), owner_id) == names_requested.end()) { names_requested.push_back(owner_id); - gCacheName->get(owner_id, is_group_owned, // username - boost::bind(&LLPanelScriptLimitsRegionMemory::onNameCache, - this, _1, _2)); + if (is_group_owned) + { + gCacheName->getGroup(owner_id, + boost::bind(&LLPanelScriptLimitsRegionMemory::onNameCache, + this, _1, _2)); + } + else + { + LLAvatarNameCache::get(owner_id, + boost::bind(&LLPanelScriptLimitsRegionMemory::onAvatarNameCache, + this, _1, _2)); + } } } } diff --git a/indra/newview/llfloaterscriptlimits.h b/indra/newview/llfloaterscriptlimits.h index 2ac3862b4f..16450c6527 100644 --- a/indra/newview/llfloaterscriptlimits.h +++ b/indra/newview/llfloaterscriptlimits.h @@ -38,6 +38,7 @@ class LLPanelScriptLimitsInfo; class LLTabContainer; +class LLAvatarName; class LLPanelScriptLimitsRegionMemory; @@ -116,6 +117,8 @@ public: void checkButtonsEnabled(); private: + void onAvatarNameCache(const LLUUID& id, + const LLAvatarName& av_name); void onNameCache(const LLUUID& id, const std::string& name); diff --git a/indra/newview/llgiveinventory.cpp b/indra/newview/llgiveinventory.cpp index b2271cf4ff..3ab8fed2c6 100644 --- a/indra/newview/llgiveinventory.cpp +++ b/indra/newview/llgiveinventory.cpp @@ -36,6 +36,7 @@ #include "llagentdata.h" #include "llagentui.h" #include "llagentwearables.h" +#include "llavatarnamecache.h" #include "llfloatertools.h" // for gFloaterTool #include "llhudeffecttrail.h" #include "llhudmanager.h" @@ -327,12 +328,12 @@ void LLGiveInventory::logInventoryOffer(const LLUUID& to_agent, const LLUUID &im // If this item was given by drag-and-drop on avatar while IM panel wasn't open, log this action to IM history. else { - std::string full_name; - if (gCacheName->getFullName(to_agent, full_name)) + LLAvatarName av_name; + if (LLAvatarNameCache::get(to_agent, &av_name)) { // Build a new format username or firstname_lastname for legacy names // to use it for a history log filename. - full_name = LLCacheName::buildUsername(full_name); + std::string full_name = LLCacheName::buildUsername(av_name.getUserName()); LLUIString message = LLTrans::getString(message_name + "-im"); message.setArgs(args); LLIMModel::instance().logToFile(full_name, LLTrans::getString("SECOND_LIFE"), im_session_id, message.getString()); diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp index 7545112ab9..152d0eddcd 100644 --- a/indra/newview/llgroupmgr.cpp +++ b/indra/newview/llgroupmgr.cpp @@ -38,6 +38,7 @@ #include "llappviewer.h" #include "llagent.h" +#include "llavatarnamecache.h" #include "llui.h" #include "message.h" #include "roles_constants.h" @@ -54,6 +55,7 @@ #include #include "llcorehttputil.h" + #if LL_MSVC #pragma warning(push) // disable boost::lexical_cast warning @@ -819,9 +821,9 @@ void LLGroupMgrGroupData::banMemberById(const LLUUID& participant_uuid) LLGroupMgr::getInstance()->sendGroupMemberEjects(mID, ids); LLGroupMgr::getInstance()->sendGroupMembersRequest(mID); LLSD args; - std::string name; - gCacheName->getFullName(participant_uuid, name); - args["AVATAR_NAME"] = name; + LLAvatarName av_name; + LLAvatarNameCache::get(participant_uuid, &av_name); + args["AVATAR_NAME"] = av_name.getUserName(); args["GROUP_NAME"] = mName; LLNotifications::instance().add(LLNotification::Params("EjectAvatarFromGroup").substitutions(args)); } diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 2e9332c355..ff8b8b0403 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -646,6 +646,7 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES std::string you_joined_call = LLTrans::getString("you_joined_call"); std::string you_started_call = LLTrans::getString("you_started_call"); std::string other_avatar_name = ""; + LLAvatarName av_name; std::string message; @@ -655,7 +656,8 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES // no text notifications break; case P2P_SESSION: - gCacheName->getFullName(mOtherParticipantID, other_avatar_name); // voice + LLAvatarNameCache::get(mOtherParticipantID, &av_name); + other_avatar_name = av_name.getUserName(); if(direction == LLVoiceChannel::INCOMING_CALL) { @@ -806,7 +808,7 @@ void LLIMModel::LLIMSession::addMessagesFromHistory(const std::list& histo { // convert it to a legacy name if we have a complete name std::string legacy_name = gCacheName->buildLegacyName(from); - gCacheName->getUUID(legacy_name, from_id); + from_id = LLAvatarNameCache::findIdByName(legacy_name); } std::string timestamp = msg[LL_IM_TIME]; @@ -2765,10 +2767,10 @@ void LLIMMgr::addSystemMessage(const LLUUID& session_id, const std::string& mess else { - std::string session_name; + LLAvatarName av_name; // since we select user to share item with - his name is already in cache - gCacheName->getFullName(args["user_id"], session_name); - session_name = LLCacheName::buildUsername(session_name); + LLAvatarNameCache::get(args["user_id"], &av_name); + std::string session_name = LLCacheName::buildUsername(av_name.getUserName()); LLIMModel::instance().logToFile(session_name, SYSTEM_FROM, LLUUID::null, message.getString()); } } @@ -3075,8 +3077,8 @@ void LLIMMgr::inviteToSession( { if (caller_name.empty()) { - gCacheName->get(caller_id, false, // voice - boost::bind(&LLIMMgr::onInviteNameLookup, payload, _1, _2, _3)); + LLAvatarNameCache::get(caller_id, + boost::bind(&LLIMMgr::onInviteNameLookup, payload, _1, _2)); } else { @@ -3095,9 +3097,9 @@ void LLIMMgr::inviteToSession( } } -void LLIMMgr::onInviteNameLookup(LLSD payload, const LLUUID& id, const std::string& name, bool is_group) +void LLIMMgr::onInviteNameLookup(LLSD payload, const LLUUID& id, const LLAvatarName& av_name) { - payload["caller_name"] = name; + payload["caller_name"] = av_name.getUserName(); payload["session_name"] = payload["caller_name"].asString(); std::string notify_box_type = payload["notify_box_type"].asString(); diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index da40ac8393..e3851a56e0 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -473,7 +473,7 @@ private: void processIMTypingCore(const LLIMInfo* im_info, BOOL typing); - static void onInviteNameLookup(LLSD payload, const LLUUID& id, const std::string& name, bool is_group); + static void onInviteNameLookup(LLSD payload, const LLUUID& id, const LLAvatarName& name); void notifyObserverSessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id, bool has_offline_msg); //Triggers when a session has already been added diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 287fa4c45b..855f7c750e 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -34,6 +34,7 @@ #include "llagent.h" #include "llagentwearables.h" #include "llappearancemgr.h" +#include "llavatarnamecache.h" #include "llclipboard.h" #include "llinventorypanel.h" #include "llinventorybridge.h" @@ -1022,19 +1023,19 @@ U32 LLInventoryModel::updateItem(const LLViewerInventoryItem* item, U32 mask) { // Valid UUID; set the item UUID and rename it new_item->setCreator(id); - std::string avatar_name; + LLAvatarName av_name; - if (gCacheName->getFullName(id, avatar_name)) + if (LLAvatarNameCache::get(id, &av_name)) { - new_item->rename(avatar_name); + new_item->rename(av_name.getUserName()); mask |= LLInventoryObserver::LABEL; } else { // Fetch the current name - gCacheName->get(id, FALSE, + LLAvatarNameCache::get(id, boost::bind(&LLViewerInventoryItem::onCallingCardNameLookup, new_item.get(), - _1, _2, _3)); + _1, _2)); } } diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp index 0f70c9d13f..3af9c2f912 100644 --- a/indra/newview/llmutelist.cpp +++ b/indra/newview/llmutelist.cpp @@ -53,6 +53,7 @@ #include "llxfermanager.h" #include "llagent.h" +#include "llavatarnamecache.h" #include "llviewergenericmessage.h" // for gGenericDispatcher #include "llworld.h" //for particle system banning #include "llimview.h" @@ -456,7 +457,7 @@ void LLMuteList::updateRemove(const LLMute& mute) gAgent.sendReliableMessage(); } -void notify_automute_callback(const LLUUID& agent_id, const std::string& full_name, bool is_group, LLMuteList::EAutoReason reason) +void notify_automute_callback(const LLUUID& agent_id, const LLAvatarName& full_name, LLMuteList::EAutoReason reason) { std::string notif_name; switch (reason) @@ -474,7 +475,7 @@ void notify_automute_callback(const LLUUID& agent_id, const std::string& full_na } LLSD args; - args["NAME"] = full_name; + args["NAME"] = full_name.getUserName(); LLNotificationPtr notif_ptr = LLNotifications::instance().add(notif_name, args, LLSD()); if (notif_ptr) @@ -499,17 +500,17 @@ BOOL LLMuteList::autoRemove(const LLUUID& agent_id, const EAutoReason reason) removed = TRUE; remove(automute); - std::string full_name; - if (gCacheName->getFullName(agent_id, full_name)) - { - // name in cache, call callback directly - notify_automute_callback(agent_id, full_name, false, reason); - } - else - { - // not in cache, lookup name from cache - gCacheName->get(agent_id, false, - boost::bind(¬ify_automute_callback, _1, _2, _3, reason)); + LLAvatarName av_name; + if (LLAvatarNameCache::get(agent_id, &av_name)) + { + // name in cache, call callback directly + notify_automute_callback(agent_id, av_name, reason); + } + else + { + // not in cache, lookup name from cache + LLAvatarNameCache::get(agent_id, + boost::bind(¬ify_automute_callback, _1, _2, reason)); } } diff --git a/indra/newview/llnamebox.cpp b/indra/newview/llnamebox.cpp index 1099316a19..8d32fb1d5c 100644 --- a/indra/newview/llnamebox.cpp +++ b/indra/newview/llnamebox.cpp @@ -35,6 +35,7 @@ #include "lluuid.h" #include "llcachename.h" +#include "llavatarnamecache.h" // statics std::set LLNameBox::sInstances; @@ -67,7 +68,9 @@ void LLNameBox::setNameID(const LLUUID& name_id, BOOL is_group) if (!is_group) { - got_name = gCacheName->getFullName(name_id, name); + LLAvatarName av_name; + got_name = LLAvatarNameCache::get(name_id, &av_name); + name = av_name.getUserName(); } else { diff --git a/indra/newview/llnameeditor.cpp b/indra/newview/llnameeditor.cpp index b3b1ff7c06..055754f270 100644 --- a/indra/newview/llnameeditor.cpp +++ b/indra/newview/llnameeditor.cpp @@ -28,6 +28,7 @@ #include "llnameeditor.h" #include "llcachename.h" +#include "llavatarnamecache.h" #include "llfontgl.h" @@ -65,7 +66,9 @@ void LLNameEditor::setNameID(const LLUUID& name_id, BOOL is_group) if (!is_group) { - gCacheName->getFullName(name_id, name); + LLAvatarName av_name; + LLAvatarNameCache::get(name_id, &av_name); + name = av_name.getUserName(); } else { diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp index a078889d46..4a3923ef6e 100644 --- a/indra/newview/llnotificationhandlerutil.cpp +++ b/indra/newview/llnotificationhandlerutil.cpp @@ -114,11 +114,11 @@ void LLHandlerUtil::logToIM(const EInstantMessage& session_type, } } -void log_name_callback(const std::string& full_name, const std::string& from_name, +void log_name_callback(const LLAvatarName& av_name, const std::string& from_name, const std::string& message, const LLUUID& from_id) { - LLHandlerUtil::logToIM(IM_NOTHING_SPECIAL, full_name, from_name, message, + LLHandlerUtil::logToIM(IM_NOTHING_SPECIAL, av_name.getUserName(), from_name, message, from_id, LLUUID()); } @@ -141,11 +141,11 @@ void LLHandlerUtil::logToIMP2P(const LLNotificationPtr& notification, bool to_fi if(to_file_only) { - gCacheName->get(from_id, false, boost::bind(&log_name_callback, _2, "", notification->getMessage(), LLUUID())); + LLAvatarNameCache::get(from_id, boost::bind(&log_name_callback, _2, "", notification->getMessage(), LLUUID())); } else { - gCacheName->get(from_id, false, boost::bind(&log_name_callback, _2, INTERACTIVE_SYSTEM_FROM, notification->getMessage(), from_id)); + LLAvatarNameCache::get(from_id, boost::bind(&log_name_callback, _2, INTERACTIVE_SYSTEM_FROM, notification->getMessage(), from_id)); } } @@ -167,9 +167,18 @@ void LLHandlerUtil::logGroupNoticeToIMGroup( const std::string group_name = groupData.mName; const std::string sender_name = payload["sender_name"].asString(); - // we can't retrieve sender id from group notice system message, so try to lookup it from cache LLUUID sender_id; - gCacheName->getUUID(sender_name, sender_id); + if (payload.has("sender_id")) + { + sender_id = payload["sender_id"].asUUID(); + } + + if (sender_id.notNull()) + { + // Legacy support and fallback method + // if we can't retrieve sender id from group notice system message, try to lookup it from cache + sender_id = LLAvatarNameCache::findIdByName(sender_name); + } logToIM(IM_SESSION_GROUP_START, group_name, sender_name, payload["message"], payload["group_id"], sender_id); @@ -219,7 +228,12 @@ std::string LLHandlerUtil::getSubstitutionName(const LLNotificationPtr& notifica { from_id = notification->getPayload()["from_id"]; } - if(!gCacheName->getFullName(from_id, res)) + LLAvatarName av_name; + if(LLAvatarNameCache::get(from_id, &av_name)) + { + res = av_name.getUserName(); + } + else { res = ""; } diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index 6ac439177a..8440e9ee50 100644 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -1168,9 +1168,9 @@ void LLPanelGroupMembersSubTab::confirmEjectMembers() if (selection_count == 1) { LLSD args; - std::string fullname; - gCacheName->getFullName(mMembersList->getValue(), fullname); - args["AVATAR_NAME"] = fullname; + LLAvatarName av_name; + LLAvatarNameCache::get(mMembersList->getValue(), &av_name); + args["AVATAR_NAME"] = av_name.getUserName(); LLSD payload; LLNotificationsUtil::add("EjectGroupMemberWarning", args, @@ -1862,9 +1862,9 @@ void LLPanelGroupMembersSubTab::confirmBanMembers() if (selection_count == 1) { LLSD args; - std::string fullname; - gCacheName->getFullName(mMembersList->getValue(), fullname); - args["AVATAR_NAME"] = fullname; + LLAvatarName av_name; + LLAvatarNameCache::get(mMembersList->getValue(), &av_name); + args["AVATAR_NAME"] = av_name.getUserName(); LLSD payload; LLNotificationsUtil::add("BanGroupMemberWarning", args, diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp index 55c09d85ea..77bc99da83 100644 --- a/indra/newview/llpanelpicks.cpp +++ b/indra/newview/llpanelpicks.cpp @@ -384,9 +384,9 @@ void LLPanelPicks::processProperties(void* data, EAvatarProcessorType type) LLAvatarPicks* avatar_picks = static_cast(data); if(avatar_picks && getAvatarId() == avatar_picks->target_id) { - std::string full_name; - gCacheName->getFullName(getAvatarId(), full_name); - getChild("pick_title")->setTextArg("[NAME]", full_name); + LLAvatarName av_name; + LLAvatarNameCache::get(getAvatarId(), &av_name); + getChild("pick_title")->setTextArg("[NAME]", av_name.getUserName()); // Save selection, to be able to edit same item after saving changes. See EXT-3023. LLUUID selected_id = mPicksList->getSelectedValue()[PICK_ID]; diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index ee7c22800a..5ebf7cfe13 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -33,6 +33,7 @@ // library includes #include "llcachename.h" +#include "llavatarnamecache.h" #include "lldbstrings.h" #include "lleconomy.h" #include "llgl.h" @@ -5385,9 +5386,9 @@ void LLSelectMgr::processObjectPropertiesFamily(LLMessageSystem* msg, void** use LLFloaterReporter *reporterp = LLFloaterReg::findTypedInstance("reporter"); if (reporterp) { - std::string fullname; - gCacheName->getFullName(owner_id, fullname); - reporterp->setPickedObjectProperties(name, fullname, owner_id); + LLAvatarName av_name; + LLAvatarNameCache::get(owner_id, &av_name); + reporterp->setPickedObjectProperties(name, av_name.getUserName(), owner_id); } } else if (request_flags & OBJECT_PAY_REQUEST) diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index e7971028bf..19d1af34f9 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -29,6 +29,7 @@ #include "llspeakers.h" #include "llagent.h" +#include "llavatarnamecache.h" #include "llappviewer.h" #include "llimview.h" #include "llgroupmgr.h" @@ -75,13 +76,13 @@ void LLSpeaker::lookupName() { if (mDisplayName.empty()) { - gCacheName->get(mID, false, boost::bind(&LLSpeaker::onNameCache, this, _1, _2, _3)); + LLAvatarNameCache::get(mID, boost::bind(&LLSpeaker::onNameCache, this, _1, _2)); // todo: can be group??? } } -void LLSpeaker::onNameCache(const LLUUID& id, const std::string& full_name, bool is_group) +void LLSpeaker::onNameCache(const LLUUID& id, const LLAvatarName& av_name) { - mDisplayName = full_name; + mDisplayName = av_name.getUserName(); } bool LLSpeaker::isInVoiceChannel() diff --git a/indra/newview/llspeakers.h b/indra/newview/llspeakers.h index 617bae3984..d1dbf72fe9 100644 --- a/indra/newview/llspeakers.h +++ b/indra/newview/llspeakers.h @@ -34,6 +34,7 @@ #include "llcoros.h" class LLSpeakerMgr; +class LLAvatarName; // data for a given participant in a voice channel class LLSpeaker : public LLRefCount, public LLOldEvents::LLObservable, public LLHandleProvider, public boost::signals2::trackable @@ -61,7 +62,7 @@ public: ~LLSpeaker() {}; void lookupName(); - void onNameCache(const LLUUID& id, const std::string& full_name, bool is_group); + void onNameCache(const LLUUID& id, const LLAvatarName& full_name); bool isInVoiceChannel(); diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 27c4c90857..49436ee406 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -1584,12 +1584,12 @@ static void show_object_sharing_confirmation(const std::string name, } static void get_name_cb(const LLUUID& id, - const std::string& full_name, + const LLAvatarName& av_name, LLInventoryObject* inv_obj, const LLSD& dest, const LLUUID& dest_agent) { - show_object_sharing_confirmation(full_name, + show_object_sharing_confirmation(av_name.getUserName(), inv_obj, dest, id, @@ -1634,17 +1634,17 @@ bool LLToolDragAndDrop::handleGiveDragAndDrop(LLUUID dest_agent, LLUUID session_ // If no IM session found get the destination agent's name by id. if (NULL == session) { - std::string fullname; + LLAvatarName av_name; // If destination agent's name is found in cash proceed to showing the confirmation dialog. // Otherwise set up a callback to show the dialog when the name arrives. - if (gCacheName->getFullName(dest_agent, fullname)) + if (LLAvatarNameCache::get(dest_agent, &av_name)) { - show_object_sharing_confirmation(fullname, inv_obj, dest, dest_agent, LLUUID::null); + show_object_sharing_confirmation(av_name.getUserName(), inv_obj, dest, dest_agent, LLUUID::null); } else { - gCacheName->get(dest_agent, false, boost::bind(&get_name_cb, _1, _2, inv_obj, dest, dest_agent)); + LLAvatarNameCache::get(dest_agent, boost::bind(&get_name_cb, _1, _2, inv_obj, dest, dest_agent)); } return true; diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index e79ce55854..9acf9080bf 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -883,7 +883,7 @@ BOOL LLToolPie::handleTooltipLand(std::string line, std::string tooltip_msg) } else if (hover_parcel->getIsGroupOwned()) { - if (gCacheName->getGroupName(owner, name)) + if (gCacheName->getFullName(owner, name)) //group? { line.append(name); line.append(LLTrans::getString("TooltipIsGroup")); @@ -893,14 +893,19 @@ BOOL LLToolPie::handleTooltipLand(std::string line, std::string tooltip_msg) line.append(LLTrans::getString("RetrievingData")); } } - else if(gCacheName->getFullName(owner, name)) - { - line.append(name); - } - else - { - line.append(LLTrans::getString("RetrievingData")); - } + else + { + LLAvatarName av_name; + if (LLAvatarNameCache::get(owner, &av_name)) + { + name = av_name.getUserName(); + line.append(name); + } + else + { + line.append(LLTrans::getString("RetrievingData")); + } + } } else { diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index caffeadb73..bf79a0595c 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -1126,10 +1126,10 @@ void create_inventory_item(const LLUUID& agent_id, const LLUUID& session_id, void create_inventory_callingcard(const LLUUID& avatar_id, const LLUUID& parent /*= LLUUID::null*/, LLPointer cb/*=NULL*/) { std::string item_desc = avatar_id.asString(); - std::string item_name; - gCacheName->getFullName(avatar_id, item_name); + LLAvatarName av_name; + LLAvatarNameCache::get(avatar_id, &av_name); create_inventory_item(gAgent.getID(), gAgent.getSessionID(), - parent, LLTransactionID::tnull, item_name, item_desc, LLAssetType::AT_CALLINGCARD, + parent, LLTransactionID::tnull, av_name.getUserName(), item_desc, LLAssetType::AT_CALLINGCARD, LLInventoryType::IT_CALLINGCARD, NOT_WEARABLE, PERM_MOVE | PERM_TRANSFER, cb); } @@ -2071,9 +2071,9 @@ PermissionMask LLViewerInventoryItem::getPermissionMask() const //---------- -void LLViewerInventoryItem::onCallingCardNameLookup(const LLUUID& id, const std::string& name, bool is_group) +void LLViewerInventoryItem::onCallingCardNameLookup(const LLUUID& id, const LLAvatarName& name) { - rename(name); + rename(name.getUserName()); gInventory.addChangedMask(LLInventoryObserver::LABEL, getUUID()); gInventory.notifyObservers(); } diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h index 074d51b8b3..b3053e365b 100644 --- a/indra/newview/llviewerinventory.h +++ b/indra/newview/llviewerinventory.h @@ -39,6 +39,7 @@ class LLFolderView; class LLFolderBridge; class LLViewerInventoryCategory; class LLInventoryCallback; +class LLAvatarName; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class LLViewerInventoryItem @@ -158,7 +159,7 @@ public: PermissionMask getPermissionMask() const; // callback - void onCallingCardNameLookup(const LLUUID& id, const std::string& name, bool is_group); + void onCallingCardNameLookup(const LLUUID& id, const LLAvatarName& name); // If this is a broken link, try to fix it and any other identical link. BOOL regenerateLink(); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index d847661ce7..a92ecd2036 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -6560,10 +6560,10 @@ class LLMuteParticle : public view_listener_t if (id.notNull()) { - std::string name; - gCacheName->getFullName(id, name); + LLAvatarName av_name; + LLAvatarNameCache::get(id, &av_name); - LLMute mute(id, name, LLMute::AGENT); + LLMute mute(id, av_name.getUserName(), LLMute::AGENT); if (LLMuteList::getInstance()->isMuted(mute.mID)) { LLMuteList::getInstance()->remove(mute); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 8076c6b1df..ab76653ba6 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1390,6 +1390,14 @@ void inventory_offer_mute_callback(const LLUUID& blocked_id, gSavedSettings.getString("NotificationChannelUUID")), OfferMatcher(blocked_id)); } + +void inventory_offer_mute_avatar_callback(const LLUUID& blocked_id, + const LLAvatarName& av_name) +{ + inventory_offer_mute_callback(blocked_id, av_name.getUserName(), false); +} + + std::string LLOfferInfo::mResponderType = "offer_info"; LLOfferInfo::LLOfferInfo() @@ -1538,7 +1546,14 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& { if (notification_ptr != NULL) { - gCacheName->get(mFromID, mFromGroup, boost::bind(&inventory_offer_mute_callback, _1, _2, _3)); + if (mFromGroup) + { + gCacheName->getGroup(mFromID, boost::bind(&inventory_offer_mute_callback, _1, _2, _3)); + } + else + { + LLAvatarNameCache::get(mFromID, boost::bind(&inventory_offer_mute_avatar_callback, _1, _2)); + } } } @@ -1695,7 +1710,14 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const llassert(notification_ptr != NULL); if (notification_ptr != NULL) { - gCacheName->get(mFromID, mFromGroup, boost::bind(&inventory_offer_mute_callback, _1, _2, _3)); + if (mFromGroup) + { + gCacheName->getGroup(mFromID, boost::bind(&inventory_offer_mute_callback, _1, _2, _3)); + } + else + { + LLAvatarNameCache::get(mFromID, boost::bind(&inventory_offer_mute_avatar_callback, _1, _2)); + } } } @@ -1744,12 +1766,12 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const } else { - std::string full_name; - if (gCacheName->getFullName(mFromID, full_name)) + LLAvatarName av_name; + if (LLAvatarNameCache::get(mFromID, &av_name)) { from_string = LLTrans::getString("InvOfferAnObjectNamed") + " "+ LLTrans::getString("'") + mFromName - + LLTrans::getString("'")+" " + LLTrans::getString("InvOfferOwnedBy") + full_name; - chatHistory_string = mFromName + " " + LLTrans::getString("InvOfferOwnedBy") + " " + full_name; + + LLTrans::getString("'")+" " + LLTrans::getString("InvOfferOwnedBy") + av_name.getUserName(); + chatHistory_string = mFromName + " " + LLTrans::getString("InvOfferOwnedBy") + " " + av_name.getUserName(); } else { @@ -2601,9 +2623,9 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) { original_name = original_name.substr(0, index); } + std::string legacy_name = gCacheName->buildLegacyName(original_name); - LLUUID agent_id; - gCacheName->getUUID(legacy_name, agent_id); + LLUUID agent_id = LLAvatarNameCache::findIdByName(legacy_name); if (agent_id.isNull()) { @@ -2662,6 +2684,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) payload["subject"] = subj; payload["message"] = mes; payload["sender_name"] = name; + payload["sender_id"] = agent_id; payload["group_id"] = group_id; payload["inventory_name"] = item_name; payload["received_time"] = LLDate::now(); @@ -6183,7 +6206,7 @@ void handle_show_mean_events(void *) //LLFloaterBump::showInstance(); } -void mean_name_callback(const LLUUID &id, const std::string& full_name, bool is_group) +void mean_name_callback(const LLUUID &id, const LLAvatarName& av_name) { static const U32 max_collision_list_size = 20; if (gMeanCollisionList.size() > max_collision_list_size) @@ -6200,7 +6223,7 @@ void mean_name_callback(const LLUUID &id, const std::string& full_name, bool is_ LLMeanCollisionData *mcd = *iter; if (mcd->mPerp == id) { - mcd->mFullName = full_name; + mcd->mFullName = av_name.getUserName(); } } } @@ -6254,7 +6277,7 @@ void process_mean_collision_alert_message(LLMessageSystem *msgsystem, void **use { LLMeanCollisionData *mcd = new LLMeanCollisionData(gAgentID, perp, time, type, mag); gMeanCollisionList.push_front(mcd); - gCacheName->get(perp, false, boost::bind(&mean_name_callback, _1, _2, _3)); + LLAvatarNameCache::get(perp, boost::bind(&mean_name_callback, _1, _2)); } } LLFloaterBump* bumps_floater = LLFloaterBump::getInstance(); @@ -7031,8 +7054,8 @@ void send_lures(const LLSD& notification, const LLSD& response) // Record the offer. { - std::string target_name; - gCacheName->getFullName(target_id, target_name); // for im log filenames + LLAvatarName av_name; + LLAvatarNameCache::get(target_id, &av_name); // for im log filenames LLSD args; args["TO_NAME"] = LLSLURL("agent", target_id, "completename").getSLURLString();; @@ -7117,10 +7140,10 @@ bool teleport_request_callback(const LLSD& notification, const LLSD& response) return false; } - std::string from_name; - gCacheName->getFullName(from_id, from_name); + LLAvatarName av_name; + LLAvatarNameCache::get(from_id, &av_name); - if(LLMuteList::getInstance()->isMuted(from_id) && !LLMuteList::getInstance()->isLinden(from_name)) + if(LLMuteList::getInstance()->isMuted(from_id) && !LLMuteList::getInstance()->isLinden(av_name.getUserName())) { return false; } @@ -7395,8 +7418,7 @@ bool callback_load_url(const LLSD& notification, const LLSD& response) } static LLNotificationFunctorRegistration callback_load_url_reg("LoadWebPage", callback_load_url); - -// We've got the name of the person who owns the object hurling the url. +// We've got the name of the person or group that owns the object hurling the url. // Display confirmation dialog. void callback_load_url_name(const LLUUID& id, const std::string& full_name, bool is_group) { @@ -7438,6 +7460,12 @@ void callback_load_url_name(const LLUUID& id, const std::string& full_name, bool } } +// We've got the name of the person who owns the object hurling the url. +void callback_load_url_avatar_name(const LLUUID& id, const LLAvatarName& av_name) +{ + callback_load_url_name(id, av_name.getUserName(), false); +} + void process_load_url(LLMessageSystem* msg, void**) { LLUUID object_id; @@ -7475,8 +7503,14 @@ void process_load_url(LLMessageSystem* msg, void**) // Add to list of pending name lookups gLoadUrlList.push_back(payload); - gCacheName->get(owner_id, owner_is_group, - boost::bind(&callback_load_url_name, _1, _2, _3)); + if (owner_is_group) + { + gCacheName->getGroup(owner_id, boost::bind(&callback_load_url_name, _1, _2, _3)); + } + else + { + LLAvatarNameCache::get(owner_id, boost::bind(&callback_load_url_avatar_name, _1, _2)); + } } -- cgit v1.2.3 From 2428b484e3a6ce23eaf29bd93579252e8e303f69 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 17 Feb 2017 15:56:42 -0500 Subject: DRTVWR-418: Attempt to make sense of Havok.cmake Linux logic. Aside from crazy indentation, much of Havok.cmake is redundant testing of DEBUG_PREBUILT and conditional MESSAGE(STATUS ...) output, not to mention repeating stanzas for each of debug_dir, release_dir and relwithdebinfo_dir. Use local functions and foreach() to try to manage redundancy so the details of what it's actually trying to do don't get lost in the noise. --- indra/cmake/Havok.cmake | 124 +++++++++++++++++++++--------------------------- 1 file changed, 55 insertions(+), 69 deletions(-) diff --git a/indra/cmake/Havok.cmake b/indra/cmake/Havok.cmake index 99e7334118..d67d3df9f3 100644 --- a/indra/cmake/Havok.cmake +++ b/indra/cmake/Havok.cmake @@ -49,89 +49,75 @@ unset(HK_DEBUG_LIBRARIES) unset(HK_RELEASE_LIBRARIES) unset(HK_RELWITHDEBINFO_LIBRARIES) +if (DEBUG_PREBUILT) + # DEBUG_EXEC() reports each execute_process() before invoking + function(DEBUG_EXEC) + message(STATUS ARGN) + execute_process(ARGN) + endfunction(DEBUG_EXEC) + # DEBUG_MESSAGE() displays debugging message + function(DEBUG_MESSAGE) + message(STATUS ARGN) + endfunction(DEBUG_MESSAGE) +else (DEBUG_PREBUILT) + # without DEBUG_PREBUILT, DEBUG_EXEC() is just execute_process() + function(DEBUG_EXEC) + execute_process(ARGN) + endfunction(DEBUG_EXEC) + # without DEBUG_PREBUILT, DEBUG_MESSAGE() is a no-op + function(DEBUG_MESSAGE) + endfunction(DEBUG_MESSAGE) +endif (DEBUG_PREBUILT) + # *TODO: Figure out why we need to extract like this... foreach(HAVOK_LIB ${HAVOK_LIBS}) - find_library(HAVOK_DEBUG_LIB_${HAVOK_LIB} ${HAVOK_LIB} PATHS ${HAVOK_DEBUG_LIBRARY_PATH}) - find_library(HAVOK_RELEASE_LIB_${HAVOK_LIB} ${HAVOK_LIB} PATHS ${HAVOK_RELEASE_LIBRARY_PATH}) - find_library(HAVOK_RELWITHDEBINFO_LIB_${HAVOK_LIB} ${HAVOK_LIB} PATHS ${HAVOK_RELWITHDEBINFO_LIBRARY_PATH}) - - if(LINUX) - set(debug_dir "${HAVOK_DEBUG_LIBRARY_PATH}/${HAVOK_LIB}") - set(release_dir "${HAVOK_RELEASE_LIBRARY_PATH}/${HAVOK_LIB}") - set(relwithdebinfo_dir "${HAVOK_RELWITHDEBINFO_LIBRARY_PATH}/${HAVOK_LIB}") + find_library(HAVOK_DEBUG_LIB_${HAVOK_LIB} ${HAVOK_LIB} PATHS ${HAVOK_DEBUG_LIBRARY_PATH}) + find_library(HAVOK_RELEASE_LIB_${HAVOK_LIB} ${HAVOK_LIB} PATHS ${HAVOK_RELEASE_LIBRARY_PATH}) + find_library(HAVOK_RELWITHDEBINFO_LIB_${HAVOK_LIB} ${HAVOK_LIB} PATHS ${HAVOK_RELWITHDEBINFO_LIBRARY_PATH}) + + if(LINUX) + set(debug_dir "${HAVOK_DEBUG_LIBRARY_PATH}/${HAVOK_LIB}") + set(release_dir "${HAVOK_RELEASE_LIBRARY_PATH}/${HAVOK_LIB}") + set(relwithdebinfo_dir "${HAVOK_RELWITHDEBINFO_LIBRARY_PATH}/${HAVOK_LIB}") # Try to avoid extracting havok library each time we run cmake. if("${havok_${HAVOK_LIB}_extracted}" STREQUAL "" AND EXISTS "${PREBUILD_TRACKING_DIR}/havok_${HAVOK_LIB}_extracted") file(READ ${PREBUILD_TRACKING_DIR}/havok_${HAVOK_LIB}_extracted "havok_${HAVOK_LIB}_extracted") - if(DEBUG_PREBUILT) - message(STATUS "havok_${HAVOK_LIB}_extracted: \"${havok_${HAVOK_LIB}_extracted}\"") - endif(DEBUG_PREBUILT) + DEBUG_MESSAGE("havok_${HAVOK_LIB}_extracted: \"${havok_${HAVOK_LIB}_extracted}\"") endif("${havok_${HAVOK_LIB}_extracted}" STREQUAL "" AND EXISTS "${PREBUILD_TRACKING_DIR}/havok_${HAVOK_LIB}_extracted") if(${PREBUILD_TRACKING_DIR}/havok_source_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/havok_${HAVOK_LIB}_extracted OR NOT ${havok_${HAVOK_LIB}_extracted} EQUAL 0) - if(DEBUG_PREBUILT) - MESSAGE(STATUS "Extracting ${HAVOK_LIB}...") - endif(DEBUG_PREBUILT) - set(cmd "mkdir") - - if(DEBUG_PREBUILT) - MESSAGE(STATUS "${cmd} ${debug_dir}") - endif(DEBUG_PREBUILT) - exec_program( ${cmd} ${HAVOK_DEBUG_LIBRARY_PATH} ARGS ${debug_dir} OUTPUT_VARIABLE rv) - - if(DEBUG_PREBUILT) - MESSAGE(STATUS "${cmd} ${release_dir}") - endif(DEBUG_PREBUILT) - exec_program( ${cmd} ${HAVOK_RELEASE_LIBRARY_PATH} ARGS ${release_dir} OUTPUT_VARIABLE rv) - - if(DEBUG_PREBUILT) - MESSAGE(STATUS "${cmd} ${relwithdebinfo_dir}") - endif(DEBUG_PREBUILT) - exec_program( ${cmd} ${HAVOK_RELWITHDEBINFO_LIBRARY_PATH} ARGS ${relwithdebinfo_dir} OUTPUT_VARIABLE rv) - - set(cmd "ar") - set(arg " -xv") - set(arg "${arg} ../lib${HAVOK_LIB}.a") - if(DEBUG_PREBUILT) - MESSAGE(STATUS "cd ${debug_dir} && ${cmd} ${arg}") - endif(DEBUG_PREBUILT) - exec_program( ${cmd} ${debug_dir} ARGS ${arg} OUTPUT_VARIABLE rv) - - if(DEBUG_PREBUILT) - MESSAGE(STATUS "cd ${release_dir} && ${cmd} ${arg}") - endif(DEBUG_PREBUILT) - exec_program( ${cmd} ${release_dir} ARGS ${arg} OUTPUT_VARIABLE rv) - - if(DEBUG_PREBUILT) - MESSAGE(STATUS "cd ${relwithdebinfo_dir} && ${cmd} ${arg}") - endif(DEBUG_PREBUILT) - exec_program( ${cmd} ${relwithdebinfo_dir} ARGS ${arg} OUTPUT_VARIABLE rv) + DEBUG_MESSAGE("Extracting ${HAVOK_LIB}...") + + foreach(lib debug_dir release_dir relwithdebinfo_dir) + DEBUG_EXEC("mkdir" lib) + DEBUG_EXEC("ar" "-xv" "../lib${HAVOK_LIB}.a" + WORKING_DIRECTORY lib) + endforeach(lib) # Just assume success for now. set(havok_${HAVOK_LIB}_extracted 0) file(WRITE ${PREBUILD_TRACKING_DIR}/havok_${HAVOK_LIB}_extracted "${havok_${HAVOK_LIB}_extracted}") - endif(${PREBUILD_TRACKING_DIR}/havok_source_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/havok_${HAVOK_LIB}_extracted OR NOT ${havok_${HAVOK_LIB}_extracted} EQUAL 0) - - file(GLOB extracted_debug "${debug_dir}/*.o") - file(GLOB extracted_release "${release_dir}/*.o") - file(GLOB extracted_relwithdebinfo "${relwithdebinfo_dir}/*.o") - - if(DEBUG_PREBUILT) - MESSAGE(STATUS "extracted_debug ${debug_dir}/*.o") - MESSAGE(STATUS "extracted_release ${release_dir}/*.o") - MESSAGE(STATUS "extracted_relwithdebinfo ${relwithdebinfo_dir}/*.o") - endif(DEBUG_PREBUILT) - - list(APPEND HK_DEBUG_LIBRARIES ${extracted_debug}) - list(APPEND HK_RELEASE_LIBRARIES ${extracted_release}) - list(APPEND HK_RELWITHDEBINFO_LIBRARIES ${extracted_relwithdebinfo}) - else(LINUX) - # Win32 - list(APPEND HK_DEBUG_LIBRARIES ${HAVOK_DEBUG_LIB_${HAVOK_LIB}}) - list(APPEND HK_RELEASE_LIBRARIES ${HAVOK_RELEASE_LIB_${HAVOK_LIB}}) - list(APPEND HK_RELWITHDEBINFO_LIBRARIES ${HAVOK_RELWITHDEBINFO_LIB_${HAVOK_LIB}}) - endif (LINUX) + endif() + + file(GLOB extracted_debug "${debug_dir}/*.o") + file(GLOB extracted_release "${release_dir}/*.o") + file(GLOB extracted_relwithdebinfo "${relwithdebinfo_dir}/*.o") + + DEBUG_MESSAGE("extracted_debug ${debug_dir}/*.o") + DEBUG_MESSAGE("extracted_release ${release_dir}/*.o") + DEBUG_MESSAGE("extracted_relwithdebinfo ${relwithdebinfo_dir}/*.o") + + list(APPEND HK_DEBUG_LIBRARIES ${extracted_debug}) + list(APPEND HK_RELEASE_LIBRARIES ${extracted_release}) + list(APPEND HK_RELWITHDEBINFO_LIBRARIES ${extracted_relwithdebinfo}) + else(LINUX) + # Win32 + list(APPEND HK_DEBUG_LIBRARIES ${HAVOK_DEBUG_LIB_${HAVOK_LIB}}) + list(APPEND HK_RELEASE_LIBRARIES ${HAVOK_RELEASE_LIB_${HAVOK_LIB}}) + list(APPEND HK_RELWITHDEBINFO_LIBRARIES ${HAVOK_RELWITHDEBINFO_LIB_${HAVOK_LIB}}) + endif (LINUX) endforeach(HAVOK_LIB) endif(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED) -- cgit v1.2.3 From 56d04963d46bda05d118764e3914740c318b09cf Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 17 Feb 2017 16:44:47 -0500 Subject: DRTVWR-418: Fix CMake syntax for Havok.cmake refactoring. --- indra/cmake/Havok.cmake | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/indra/cmake/Havok.cmake b/indra/cmake/Havok.cmake index d67d3df9f3..243b9f5e34 100644 --- a/indra/cmake/Havok.cmake +++ b/indra/cmake/Havok.cmake @@ -50,25 +50,24 @@ unset(HK_RELEASE_LIBRARIES) unset(HK_RELWITHDEBINFO_LIBRARIES) if (DEBUG_PREBUILT) - # DEBUG_EXEC() reports each execute_process() before invoking - function(DEBUG_EXEC) - message(STATUS ARGN) - execute_process(ARGN) - endfunction(DEBUG_EXEC) # DEBUG_MESSAGE() displays debugging message function(DEBUG_MESSAGE) - message(STATUS ARGN) + # prints message args separated by semicolons rather than spaces, + # but making it pretty is a lot more work + message(STATUS "${ARGN}") endfunction(DEBUG_MESSAGE) else (DEBUG_PREBUILT) - # without DEBUG_PREBUILT, DEBUG_EXEC() is just execute_process() - function(DEBUG_EXEC) - execute_process(ARGN) - endfunction(DEBUG_EXEC) # without DEBUG_PREBUILT, DEBUG_MESSAGE() is a no-op function(DEBUG_MESSAGE) endfunction(DEBUG_MESSAGE) endif (DEBUG_PREBUILT) +# DEBUG_EXEC() reports each execute_process() before invoking +function(DEBUG_EXEC) + DEBUG_MESSAGE(${ARGN}) + execute_process(COMMAND ${ARGN}) +endfunction(DEBUG_EXEC) + # *TODO: Figure out why we need to extract like this... foreach(HAVOK_LIB ${HAVOK_LIBS}) find_library(HAVOK_DEBUG_LIB_${HAVOK_LIB} ${HAVOK_LIB} PATHS ${HAVOK_DEBUG_LIBRARY_PATH}) @@ -89,10 +88,10 @@ foreach(HAVOK_LIB ${HAVOK_LIBS}) if(${PREBUILD_TRACKING_DIR}/havok_source_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/havok_${HAVOK_LIB}_extracted OR NOT ${havok_${HAVOK_LIB}_extracted} EQUAL 0) DEBUG_MESSAGE("Extracting ${HAVOK_LIB}...") - foreach(lib debug_dir release_dir relwithdebinfo_dir) - DEBUG_EXEC("mkdir" lib) + foreach(lib ${debug_dir} ${release_dir} ${relwithdebinfo_dir}) + DEBUG_EXEC("mkdir" ${lib}) DEBUG_EXEC("ar" "-xv" "../lib${HAVOK_LIB}.a" - WORKING_DIRECTORY lib) + WORKING_DIRECTORY ${lib}) endforeach(lib) # Just assume success for now. -- cgit v1.2.3 From 8fd147f59dea7d545618c1c5a5a1f1caff9432bc Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Tue, 21 Feb 2017 10:25:55 -0800 Subject: Add 3p Dullahan packages for windows 32/64 and darwin64 --- autobuild.xml | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/autobuild.xml b/autobuild.xml index 975a4ebd64..2284c87230 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -507,6 +507,60 @@ version 1.500564 + dullahan + + copyright + Copyright (c) 2017, Linden Research, Inc. + description + A headless browser SDK that uses the Chromium Embedded Framework (CEF). It is designed to make it easier to write applications that render modern web content directly to a memory buffer, inject synthesized mouse and keyboard events as well as interact with web based features like JavaScript or cookies. + license + MPL + license_file + LICENSES/LICENSE.txt + name + dullahan + platforms + + darwin64 + + archive + + hash + cee1a8a803a083cd26f72d1120e59bee + url + http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/2820/6482/dullahan-1.1.601_3.2704-darwin64-502809.tar.bz2 + + name + darwin64 + + windows + + archive + + hash + 0a7831886570ed6485a462db33d30ca5 + url + http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/2822/6489/dullahan-1.1.601_3.2704-windows-502809.tar.bz2 + + name + windows + + windows64 + + archive + + hash + a9a42672f14d9cbb42ffc50677ad2d42 + url + http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/2821/6492/dullahan-1.1.601_3.2704-windows64-502809.tar.bz2 + + name + windows64 + + + version + 1.1.601_3.2704 + elfio license -- cgit v1.2.3 From 038c555fc4254de62a477d1c83a2131970b0b2b5 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 21 Feb 2017 17:12:27 -0500 Subject: DRTVWR-418: In viewer64-mac-havok fork, turn on Xcode 8 Havok. This is known not to work yet: the relevant Havok libraries are not being bundled with llphysicsextensions, therefore the viewer can't link with any Havok symbols. --- autobuild.xml | 16 ++++++---------- build.sh | 4 ++-- indra/cmake/Havok.cmake | 5 +++++ 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index 975a4ebd64..51beb0ddaf 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -1322,9 +1322,9 @@ archive hash - cbaa7619050123c3fd2a88959f88bd47 + bd749bc181e8d75718267bc0ecf4c5bf url - http://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/749/1553/havok_source-2012.1-2-darwin64-500739.tar.bz2 + http://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/2750/6262/havok_source-2012.1-2-darwin64-502736.tar.bz2 name darwin64 @@ -1358,9 +1358,9 @@ archive hash - dab55cc0555d7126fda925e20af851ea + 03be19251601027841c767f723dae1d4 url - http://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/1194/2807/havok_source-2012.1-2-windows-501181.tar.bz2 + http://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/2756/6286/havok_source-2012.1-2-windows-502736.tar.bz2 name windows @@ -1370,9 +1370,9 @@ archive hash - 7bbc1c3512a5665b7576b4b0357a9eb7 + de3884eeed32297845add77d5ecc7e6b url - http://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/1195/2816/havok_source-2012.1-2-windows64-501181.tar.bz2 + http://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/2755/6280/havok_source-2012.1-2-windows64-502736.tar.bz2 name windows64 @@ -3357,7 +3357,6 @@ -G Xcode - -DHAVOK:BOOL=OFF default @@ -3386,7 +3385,6 @@ -G Xcode - -DHAVOK:BOOL=OFF name @@ -3421,7 +3419,6 @@ -G Xcode - -DHAVOK:BOOL=OFF name @@ -3448,7 +3445,6 @@ -G Xcode - -DHAVOK:BOOL=OFF name diff --git a/build.sh b/build.sh index 9ca130b5d5..a8f4158bff 100755 --- a/build.sh +++ b/build.sh @@ -97,14 +97,14 @@ pre_build() # nat 2016-12-20: disable HAVOK on Mac until we get a 64-bit Mac build. RELEASE_CRASH_REPORTING=ON + HAVOK=ON SIGNING=() if [ "$arch" == "Darwin" ] - then HAVOK=OFF + then if [ "$variant" == "Release" ] then SIGNING=("-DENABLE_SIGNING:BOOL=YES" \ "-DSIGNING_IDENTITY:STRING=Developer ID Application: Linden Research, Inc.") fi - else HAVOK=ON fi "$autobuild" configure --quiet -c $variant -- \ diff --git a/indra/cmake/Havok.cmake b/indra/cmake/Havok.cmake index 243b9f5e34..811a126b8f 100644 --- a/indra/cmake/Havok.cmake +++ b/indra/cmake/Havok.cmake @@ -8,6 +8,11 @@ use_prebuilt_binary(havok-source) set(Havok_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/havok/Source) list(APPEND Havok_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/havok/Demo) +# HK_DISABLE_IMPLICIT_VVECTOR3_CONVERSION suppresses an intended conversion +# function which Xcode scolds us will unconditionally enter infinite +# recursion if called. This hides that function. +add_definitions("-DHK_DISABLE_IMPLICIT_VVECTOR3_CONVERSION") + set(HAVOK_DEBUG_LIBRARY_PATH ${LIBS_PREBUILT_DIR}/lib/debug/havok-fulldebug) set(HAVOK_RELEASE_LIBRARY_PATH ${LIBS_PREBUILT_DIR}/lib/release/havok) -- cgit v1.2.3 From 5534ab4e182b8403cf0ed514059e346d55f18162 Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Tue, 21 Feb 2017 15:06:21 -0800 Subject: First round of changes to replace LLCEFLib with Dullahan. Mostly Windows changes in this batch since I'm working on Windows box but some speculative macOS ones too although they are quite untested --- autobuild.xml | 70 ------- indra/cmake/CEFPlugin.cmake | 6 +- indra/media_plugins/cef/media_plugin_cef.cpp | 218 +++++++++++---------- indra/newview/llappviewer.cpp | 10 +- .../newview/skins/default/xui/da/floater_about.xml | 2 +- indra/newview/skins/default/xui/de/strings.xml | 2 +- indra/newview/skins/default/xui/en/strings.xml | 2 +- indra/newview/skins/default/xui/es/strings.xml | 4 +- indra/newview/skins/default/xui/fr/strings.xml | 2 +- indra/newview/skins/default/xui/it/strings.xml | 2 +- indra/newview/skins/default/xui/ja/strings.xml | 2 +- indra/newview/skins/default/xui/pl/strings.xml | 2 +- indra/newview/skins/default/xui/pt/strings.xml | 2 +- indra/newview/skins/default/xui/ru/strings.xml | 2 +- indra/newview/skins/default/xui/tr/strings.xml | 2 +- indra/newview/skins/default/xui/zh/strings.xml | 2 +- indra/newview/viewer_manifest.py | 17 +- 17 files changed, 143 insertions(+), 204 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index 2284c87230..94f3c6df88 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -2113,76 +2113,6 @@ version 0.0.1 - llceflib - - copyright - Copyright (c) 2014, Linden Research, Inc. - description - LLCefLib implements a headless web browser, rendering modern web content to a memory buffer and providing an API for injecting mouse and keyboard events. It uses the Chromium Embedded Framework (https://bitbucket.org/chromiumembedded/cef) - license - LGPL - license_file - LICENSES/LICENSE-source.txt - name - llceflib - platforms - - darwin - - archive - - hash - 2845033912eb947a1401847ece1469ce - hash_algorithm - md5 - url - http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-llceflib_3p-llceflib/rev/321153/arch/Darwin/installer/llceflib-1.5.3.321153-darwin-321153.tar.bz2 - - name - darwin - - darwin64 - - archive - - hash - 3af1210d90aeb9f4d5deea6020ee0d55 - url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/1611/3591/llceflib-1.6.0.501600-darwin64-501600.tar.bz2 - - name - darwin64 - - windows - - archive - - hash - 9d19271829a372e028dd3c75605ded9c - hash_algorithm - md5 - url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/1518/3437/llceflib-1.6.0.501501-windows-501501.tar.bz2 - - name - windows - - windows64 - - archive - - hash - da1835b11be4442f22fef36820ad46ac - url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/1517/3434/llceflib-1.6.0.501501-windows64-501501.tar.bz2 - - name - windows64 - - - version - 1.6.0.501600 - llphysicsextensions_source copyright diff --git a/indra/cmake/CEFPlugin.cmake b/indra/cmake/CEFPlugin.cmake index 9cfb7d14c7..b8e569d3a8 100644 --- a/indra/cmake/CEFPlugin.cmake +++ b/indra/cmake/CEFPlugin.cmake @@ -6,7 +6,7 @@ if (USESYSTEMLIBS) set(CEFPLUGIN OFF CACHE BOOL "CEFPLUGIN support for the llplugin/llmedia test apps.") else (USESYSTEMLIBS) - use_prebuilt_binary(llceflib) + use_prebuilt_binary(dullahan) set(CEFPLUGIN ON CACHE BOOL "CEFPLUGIN support for the llplugin/llmedia test apps.") set(CEF_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/cef) @@ -16,7 +16,7 @@ if (WINDOWS) set(CEF_PLUGIN_LIBRARIES libcef.lib libcef_dll_wrapper.lib - llceflib.lib + dullahan.lib ) elseif (DARWIN) FIND_LIBRARY(APPKIT_LIBRARY AppKit) @@ -31,7 +31,7 @@ elseif (DARWIN) set(CEF_PLUGIN_LIBRARIES ${ARCH_PREBUILT_DIRS_RELEASE}/libcef_dll_wrapper.a - ${ARCH_PREBUILT_DIRS_RELEASE}/libLLCefLib.a + ${ARCH_PREBUILT_DIRS_RELEASE}/libdullahan.a ${APPKIT_LIBRARY} ${CEF_LIBRARY} ) diff --git a/indra/media_plugins/cef/media_plugin_cef.cpp b/indra/media_plugins/cef/media_plugin_cef.cpp index eaba71a6ad..b78af1b348 100644 --- a/indra/media_plugins/cef/media_plugin_cef.cpp +++ b/indra/media_plugins/cef/media_plugin_cef.cpp @@ -36,11 +36,12 @@ #include "llpluginmessageclasses.h" #include "media_plugin_base.h" -#include "boost/function.hpp" -#include "boost/bind.hpp" -#include "llCEFLib.h" +#include + +#include "dullahan.h" //#include "volume_catcher.h" + //////////////////////////////////////////////////////////////////////////////// // class MediaPluginCEF : @@ -56,7 +57,7 @@ public: private: bool init(); - void onPageChangedCallback(unsigned char* pixels, int x, int y, int width, int height, bool is_popup); + void onPageChangedCallback(const unsigned char* pixels, int x, int y, const int width, const int height, bool is_popup); void onCustomSchemeURLCallback(std::string url); void onConsoleMessageCallback(std::string message, std::string source, int line); void onStatusMessageCallback(std::string value); @@ -67,17 +68,17 @@ private: void onAddressChangeCallback(std::string url); void onNavigateURLCallback(std::string url, std::string target); bool onHTTPAuthCallback(const std::string host, const std::string realm, std::string& username, std::string& password); - void onCursorChangedCallback(LLCEFLib::ECursorType type, unsigned int handle); + void onCursorChangedCallback(dullahan::ECursorType type, unsigned int handle); void onFileDownloadCallback(std::string filename); const std::string onFileDialogCallback(); void postDebugMessage(const std::string& msg); void authResponse(LLPluginMessage &message); - LLCEFLib::EKeyboardModifier decodeModifiers(std::string &modifiers); + dullahan::EKeyboardModifier decodeModifiers(std::string &modifiers); void deserializeKeyboardData(LLSD native_key_data, uint32_t& native_scan_code, uint32_t& native_virtual_key, uint32_t& native_modifiers); - void keyEvent(LLCEFLib::EKeyEvent key_event, int key, LLCEFLib::EKeyboardModifier modifiers, LLSD native_key_data); - void unicodeInput(const std::string &utf8str, LLCEFLib::EKeyboardModifier modifiers, LLSD native_key_data); + void keyEvent(dullahan::EKeyEvent key_event, int key, dullahan::EKeyboardModifier modifiers, LLSD native_key_data); + void unicodeInput(const std::string &utf8str, dullahan::EKeyboardModifier modifiers, LLSD native_key_data); void checkEditState(); void setVolume(F32 vol); @@ -97,7 +98,7 @@ private: std::string mCachePath; std::string mCookiePath; std::string mPickedFile; - LLCEFLib* mLLCEFLib; + dullahan* mCEFLib; U8 *mPopupBuffer; U32 mPopupW; @@ -130,7 +131,7 @@ MediaPluginBase(host_send_func, host_user_data) mCachePath = ""; mCookiePath = ""; mPickedFile = ""; - mLLCEFLib = new LLCEFLib(); + mCEFLib = new dullahan(); mPopupBuffer = NULL; mPopupW = 0; @@ -164,8 +165,11 @@ void MediaPluginCEF::postDebugMessage(const std::string& msg) //////////////////////////////////////////////////////////////////////////////// // -void MediaPluginCEF::onPageChangedCallback(unsigned char* pixels, int x, int y, int width, int height, bool is_popup) +void MediaPluginCEF::onPageChangedCallback(const unsigned char* pixels, int x, int y, const int width, const int height, bool is_popup) { + + OutputDebugStringA("@"); + if( is_popup ) { delete mPopupBuffer; @@ -252,8 +256,8 @@ void MediaPluginCEF::onLoadStartCallback() { LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "navigate_begin"); //message.setValue("uri", event.getEventUri()); // not easily available here in CEF - needed? - message.setValueBoolean("history_back_available", mLLCEFLib->canGoBack()); - message.setValueBoolean("history_forward_available", mLLCEFLib->canGoForward()); + message.setValueBoolean("history_back_available", mCEFLib->canGoBack()); + message.setValueBoolean("history_forward_available", mCEFLib->canGoForward()); sendMessage(message); } @@ -261,7 +265,7 @@ void MediaPluginCEF::onLoadStartCallback() // void MediaPluginCEF::onRequestExitCallback() { - mLLCEFLib->shutdown(); + mCEFLib->shutdown(); LLPluginMessage message("base", "goodbye"); sendMessage(message); @@ -274,8 +278,8 @@ void MediaPluginCEF::onLoadEndCallback(int httpStatusCode) LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "navigate_complete"); //message.setValue("uri", event.getEventUri()); // not easily available here in CEF - needed? message.setValueS32("result_code", httpStatusCode); - message.setValueBoolean("history_back_available", mLLCEFLib->canGoBack()); - message.setValueBoolean("history_forward_available", mLLCEFLib->canGoForward()); + message.setValueBoolean("history_back_available", mCEFLib->canGoBack()); + message.setValueBoolean("history_forward_available", mCEFLib->canGoForward()); sendMessage(message); } @@ -358,25 +362,25 @@ const std::string MediaPluginCEF::onFileDialogCallback() return mPickedFile; } -void MediaPluginCEF::onCursorChangedCallback(LLCEFLib::ECursorType type, unsigned int handle) +void MediaPluginCEF::onCursorChangedCallback(dullahan::ECursorType type, unsigned int handle) { std::string name = ""; switch (type) { - case LLCEFLib::CT_POINTER: + case dullahan::CT_POINTER: name = "arrow"; break; - case LLCEFLib::CT_IBEAM: + case dullahan::CT_IBEAM: name = "ibeam"; break; - case LLCEFLib::CT_NORTHSOUTHRESIZE: + case dullahan::CT_NORTHSOUTHRESIZE: name = "splitv"; break; - case LLCEFLib::CT_EASTWESTRESIZE: + case dullahan::CT_EASTWESTRESIZE: name = "splith"; break; - case LLCEFLib::CT_HAND: + case dullahan::CT_HAND: name = "hand"; break; @@ -428,7 +432,7 @@ void MediaPluginCEF::receiveMessage(const char* message_string) } else if (message_name == "idle") { - mLLCEFLib->update(); + mCEFLib->update(); // this seems bad but unless the state changes (it won't until we figure out // how to get CEF to tell us if copy/cut/paste is available) then this function @@ -437,7 +441,7 @@ void MediaPluginCEF::receiveMessage(const char* message_string) } else if (message_name == "cleanup") { - mLLCEFLib->requestExit(); + mCEFLib->requestExit(); } else if (message_name == "shm_added") { @@ -479,47 +483,48 @@ void MediaPluginCEF::receiveMessage(const char* message_string) { if (message_name == "init") { - // event callbacks from LLCefLib - mLLCEFLib->setOnPageChangedCallback(boost::bind(&MediaPluginCEF::onPageChangedCallback, this, _1, _2, _3, _4, _5, _6)); - mLLCEFLib->setOnCustomSchemeURLCallback(boost::bind(&MediaPluginCEF::onCustomSchemeURLCallback, this, _1)); - mLLCEFLib->setOnConsoleMessageCallback(boost::bind(&MediaPluginCEF::onConsoleMessageCallback, this, _1, _2, _3)); - mLLCEFLib->setOnStatusMessageCallback(boost::bind(&MediaPluginCEF::onStatusMessageCallback, this, _1)); - mLLCEFLib->setOnTitleChangeCallback(boost::bind(&MediaPluginCEF::onTitleChangeCallback, this, _1)); - mLLCEFLib->setOnLoadStartCallback(boost::bind(&MediaPluginCEF::onLoadStartCallback, this)); - mLLCEFLib->setOnLoadEndCallback(boost::bind(&MediaPluginCEF::onLoadEndCallback, this, _1)); - mLLCEFLib->setOnAddressChangeCallback(boost::bind(&MediaPluginCEF::onAddressChangeCallback, this, _1)); - mLLCEFLib->setOnNavigateURLCallback(boost::bind(&MediaPluginCEF::onNavigateURLCallback, this, _1, _2)); - mLLCEFLib->setOnHTTPAuthCallback(boost::bind(&MediaPluginCEF::onHTTPAuthCallback, this, _1, _2, _3, _4)); - mLLCEFLib->setOnFileDownloadCallback(boost::bind(&MediaPluginCEF::onFileDownloadCallback, this, _1)); - mLLCEFLib->setOnFileDialogCallback(boost::bind(&MediaPluginCEF::onFileDialogCallback, this)); - mLLCEFLib->setOnCursorChangedCallback(boost::bind(&MediaPluginCEF::onCursorChangedCallback, this, _1, _2)); - mLLCEFLib->setOnRequestExitCallback(boost::bind(&MediaPluginCEF::onRequestExitCallback, this)); - - LLCEFLib::LLCEFLibSettings settings; - settings.initial_width = 1024; - settings.initial_height = 1024; - // The LLCEFLibSettings struct in the Windows 32-bit - // llceflib's build 500907 does not have a page_zoom_factor - // member. Set below. - //settings.page_zoom_factor = message_in.getValueReal("factor"); - settings.plugins_enabled = mPluginsEnabled; - settings.media_stream_enabled = false; // MAINT-6060 - WebRTC media removed until we can add granualrity/query UI - settings.javascript_enabled = mJavascriptEnabled; - settings.cookies_enabled = mCookiesEnabled; - settings.cookie_store_path = mCookiePath; + // event callbacks from Dullahan + mCEFLib->setOnPageChangedCallback(std::bind(&MediaPluginCEF::onPageChangedCallback, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, std::placeholders::_4, std::placeholders::_5, std::placeholders::_6)); + mCEFLib->setOnCustomSchemeURLCallback(std::bind(&MediaPluginCEF::onCustomSchemeURLCallback, this, std::placeholders::_1)); + mCEFLib->setOnConsoleMessageCallback(std::bind(&MediaPluginCEF::onConsoleMessageCallback, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)); + mCEFLib->setOnStatusMessageCallback(std::bind(&MediaPluginCEF::onStatusMessageCallback, this, std::placeholders::_1)); + mCEFLib->setOnTitleChangeCallback(std::bind(&MediaPluginCEF::onTitleChangeCallback, this, std::placeholders::_1)); + mCEFLib->setOnLoadStartCallback(std::bind(&MediaPluginCEF::onLoadStartCallback, this)); + mCEFLib->setOnLoadEndCallback(std::bind(&MediaPluginCEF::onLoadEndCallback, this, std::placeholders::_1)); + mCEFLib->setOnAddressChangeCallback(std::bind(&MediaPluginCEF::onAddressChangeCallback, this, std::placeholders::_1)); + mCEFLib->setOnNavigateURLCallback(std::bind(&MediaPluginCEF::onNavigateURLCallback, this, std::placeholders::_1, std::placeholders::_2)); + mCEFLib->setOnHTTPAuthCallback(std::bind(&MediaPluginCEF::onHTTPAuthCallback, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, std::placeholders::_4)); + mCEFLib->setOnFileDownloadCallback(std::bind(&MediaPluginCEF::onFileDownloadCallback, this, std::placeholders::_1)); + mCEFLib->setOnFileDialogCallback(std::bind(&MediaPluginCEF::onFileDialogCallback, this)); + mCEFLib->setOnCursorChangedCallback(std::bind(&MediaPluginCEF::onCursorChangedCallback, this, std::placeholders::_1, std::placeholders::_2)); + mCEFLib->setOnRequestExitCallback(std::bind(&MediaPluginCEF::onRequestExitCallback, this)); + + dullahan::dullahan_settings settings; + settings.accept_language_list = mHostLanguage; + settings.background_color = 0xffffff; settings.cache_enabled = true; settings.cache_path = mCachePath; - settings.accept_language_list = mHostLanguage; - settings.user_agent_substring = mLLCEFLib->makeCompatibleUserAgentString(mUserAgentSubtring); + settings.cookie_store_path = mCookiePath; + settings.cookies_enabled = mCookiesEnabled; + settings.flash_enabled = mPluginsEnabled; + settings.frame_rate = 60; + settings.initial_height = 1024; + settings.initial_width = 1024; + settings.java_enabled = false; + settings.javascript_enabled = mJavascriptEnabled; + settings.media_stream_enabled = false; // MAINT-6060 - WebRTC media removed until we can add granualrity/query UI + settings.plugins_enabled = mPluginsEnabled; + settings.user_agent_substring = mCEFLib->makeCompatibleUserAgentString(mUserAgentSubtring); + settings.webgl_enabled = true; - bool result = mLLCEFLib->init(settings); + bool result = mCEFLib->init(settings); if (!result) { // if this fails, the media system in viewer will put up a message } // now we can set page zoom factor - mLLCEFLib->setPageZoom(message_in.getValueReal("factor")); + mCEFLib->setPageZoom(message_in.getValueReal("factor")); // Plugin gets to decide the texture parameters to use. mDepth = 4; @@ -530,7 +535,7 @@ void MediaPluginCEF::receiveMessage(const char* message_string) message.setValueU32("internalformat", GL_RGB); message.setValueU32("format", GL_BGRA); message.setValueU32("type", GL_UNSIGNED_BYTE); - message.setValueBoolean("coords_opengl", true); + message.setValueBoolean("coords_opengl", false); sendMessage(message); } else if (message_name == "set_user_data_path") @@ -563,7 +568,7 @@ void MediaPluginCEF::receiveMessage(const char* message_string) }; }; - mLLCEFLib->setSize(mWidth, mHeight); + mCEFLib->setSize(mWidth, mHeight); LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "size_change_response"); message.setValue("name", name); @@ -581,7 +586,7 @@ void MediaPluginCEF::receiveMessage(const char* message_string) else if (message_name == "load_uri") { std::string uri = message_in.getValue("uri"); - mLLCEFLib->navigate(uri); + mCEFLib->navigate(uri); } else if (message_name == "set_cookie") { @@ -592,7 +597,7 @@ void MediaPluginCEF::receiveMessage(const char* message_string) std::string path = message_in.getValue("path"); bool httponly = message_in.getValueBoolean("httponly"); bool secure = message_in.getValueBoolean("secure"); - mLLCEFLib->setCookie(uri, name, value, domain, path, httponly, secure); + mCEFLib->setCookie(uri, name, value, domain, path, httponly, secure); } else if (message_name == "mouse_event") { @@ -603,16 +608,16 @@ void MediaPluginCEF::receiveMessage(const char* message_string) y = mHeight - y; - // only even send left mouse button events to LLCEFLib + // only even send left mouse button events to the CEF library // (partially prompted by crash in OS X CEF when sending right button events) // we catch the right click in viewer and display our own context menu anyway S32 button = message_in.getValueS32("button"); - LLCEFLib::EMouseButton btn = LLCEFLib::MB_MOUSE_BUTTON_LEFT; + dullahan::EMouseButton btn = dullahan::MB_MOUSE_BUTTON_LEFT; if (event == "down" && button == 0) { - mLLCEFLib->mouseButton(btn, LLCEFLib::ME_MOUSE_DOWN, x, y); - mLLCEFLib->setFocus(true); + mCEFLib->mouseButton(btn, dullahan::ME_MOUSE_DOWN, x, y); + mCEFLib->setFocus(); std::stringstream str; str << "Mouse down at = " << x << ", " << y; @@ -620,7 +625,7 @@ void MediaPluginCEF::receiveMessage(const char* message_string) } else if (event == "up" && button == 0) { - mLLCEFLib->mouseButton(btn, LLCEFLib::ME_MOUSE_UP, x, y); + mCEFLib->mouseButton(btn, dullahan::ME_MOUSE_UP, x, y); std::stringstream str; str << "Mouse up at = " << x << ", " << y; @@ -628,11 +633,11 @@ void MediaPluginCEF::receiveMessage(const char* message_string) } else if (event == "double_click") { - mLLCEFLib->mouseButton(btn, LLCEFLib::ME_MOUSE_DOUBLE_CLICK, x, y); + mCEFLib->mouseButton(btn, dullahan::ME_MOUSE_DOUBLE_CLICK, x, y); } else { - mLLCEFLib->mouseMove(x, y); + mCEFLib->mouseMove(x, y); } } else if (message_name == "scroll_event") @@ -642,7 +647,7 @@ void MediaPluginCEF::receiveMessage(const char* message_string) const int scaling_factor = 40; y *= -scaling_factor; - mLLCEFLib->mouseWheel(x, y); + mCEFLib->mouseWheel(x, y); } else if (message_name == "text_event") { @@ -662,28 +667,28 @@ void MediaPluginCEF::receiveMessage(const char* message_string) #if 0 if (event == "down") { - //mLLCEFLib->keyPress(key, true); - mLLCEFLib->keyboardEvent(LLCEFLib::KE_KEY_DOWN, (uint32_t)key, 0, LLCEFLib::KM_MODIFIER_NONE, 0, 0, 0); + //mCEFLib->keyPress(key, true); + mCEFLib->keyboardEvent(dullahan::KE_KEY_DOWN, (uint32_t)key, 0, dullahan::KM_MODIFIER_NONE, 0, 0, 0); } else if (event == "up") { - //mLLCEFLib->keyPress(key, false); - mLLCEFLib->keyboardEvent(LLCEFLib::KE_KEY_UP, (uint32_t)key, 0, LLCEFLib::KM_MODIFIER_NONE, 0, 0, 0); + //mCEFLib->keyPress(key, false); + mCEFLib->keyboardEvent(dullahan::KE_KEY_UP, (uint32_t)key, 0, dullahan::KM_MODIFIER_NONE, 0, 0, 0); } #else // Treat unknown events as key-up for safety. - LLCEFLib::EKeyEvent key_event = LLCEFLib::KE_KEY_UP; + dullahan::EKeyEvent key_event = dullahan::KE_KEY_UP; if (event == "down") { - key_event = LLCEFLib::KE_KEY_DOWN; + key_event = dullahan::KE_KEY_DOWN; } else if (event == "repeat") { - key_event = LLCEFLib::KE_KEY_REPEAT; + key_event = dullahan::KE_KEY_REPEAT; } - keyEvent(key_event, key, LLCEFLib::KM_MODIFIER_NONE, native_key_data); + keyEvent(key_event, key, dullahan::KM_MODIFIER_NONE, native_key_data); #endif #elif LL_WINDOWS @@ -693,14 +698,14 @@ void MediaPluginCEF::receiveMessage(const char* message_string) LLSD native_key_data = message_in.getValueLLSD("native_key_data"); // Treat unknown events as key-up for safety. - LLCEFLib::EKeyEvent key_event = LLCEFLib::KE_KEY_UP; + dullahan::EKeyEvent key_event = dullahan::KE_KEY_UP; if (event == "down") { - key_event = LLCEFLib::KE_KEY_DOWN; + key_event = dullahan::KE_KEY_DOWN; } else if (event == "repeat") { - key_event = LLCEFLib::KE_KEY_REPEAT; + key_event = dullahan::KE_KEY_REPEAT; } keyEvent(key_event, key, decodeModifiers(modifiers), native_key_data); @@ -720,15 +725,15 @@ void MediaPluginCEF::receiveMessage(const char* message_string) } if (message_name == "edit_cut") { - mLLCEFLib->editCut(); + //$1 mCEFLib->editCut(); } if (message_name == "edit_copy") { - mLLCEFLib->editCopy(); + //$1 mCEFLib->editCopy(); } if (message_name == "edit_paste") { - mLLCEFLib->editPaste(); + //$1 mCEFLib->editPaste(); } } else if (message_class == LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER) @@ -736,24 +741,24 @@ void MediaPluginCEF::receiveMessage(const char* message_string) if (message_name == "set_page_zoom_factor") { F32 factor = (F32)message_in.getValueReal("factor"); - mLLCEFLib->setPageZoom(factor); + mCEFLib->setPageZoom(factor); } if (message_name == "browse_stop") { - mLLCEFLib->stop(); + mCEFLib->stop(); } else if (message_name == "browse_reload") { bool ignore_cache = true; - mLLCEFLib->reload(ignore_cache); + mCEFLib->reload(ignore_cache); } else if (message_name == "browse_forward") { - mLLCEFLib->goForward(); + mCEFLib->goForward(); } else if (message_name == "browse_back") { - mLLCEFLib->goBack(); + mCEFLib->goBack(); } else if (message_name == "cookies_enabled") { @@ -765,7 +770,7 @@ void MediaPluginCEF::receiveMessage(const char* message_string) } else if (message_name == "show_web_inspector") { - mLLCEFLib->showDevTools(true); + mCEFLib->showDevTools(); } else if (message_name == "plugins_enabled") { @@ -790,23 +795,23 @@ void MediaPluginCEF::receiveMessage(const char* message_string) } } -LLCEFLib::EKeyboardModifier MediaPluginCEF::decodeModifiers(std::string &modifiers) +dullahan::EKeyboardModifier MediaPluginCEF::decodeModifiers(std::string &modifiers) { int result = 0; if (modifiers.find("shift") != std::string::npos) - result |= LLCEFLib::KM_MODIFIER_SHIFT; + result |= dullahan::KM_MODIFIER_SHIFT; if (modifiers.find("alt") != std::string::npos) - result |= LLCEFLib::KM_MODIFIER_ALT; + result |= dullahan::KM_MODIFIER_ALT; if (modifiers.find("control") != std::string::npos) - result |= LLCEFLib::KM_MODIFIER_CONTROL; + result |= dullahan::KM_MODIFIER_CONTROL; if (modifiers.find("meta") != std::string::npos) - result |= LLCEFLib::KM_MODIFIER_META; + result |= dullahan::KM_MODIFIER_META; - return (LLCEFLib::EKeyboardModifier)result; + return (dullahan::EKeyboardModifier)result; } //////////////////////////////////////////////////////////////////////////////// @@ -833,7 +838,7 @@ void MediaPluginCEF::deserializeKeyboardData(LLSD native_key_data, uint32_t& nat //////////////////////////////////////////////////////////////////////////////// // -void MediaPluginCEF::keyEvent(LLCEFLib::EKeyEvent key_event, int key, LLCEFLib::EKeyboardModifier modifiers_x, LLSD native_key_data = LLSD::emptyMap()) +void MediaPluginCEF::keyEvent(dullahan::EKeyEvent key_event, int key, dullahan::EKeyboardModifier modifiers_x, LLSD native_key_data = LLSD::emptyMap()) { #if LL_DARWIN @@ -852,7 +857,7 @@ void MediaPluginCEF::keyEvent(LLCEFLib::EKeyEvent key_event, int key, LLCEFLib:: char eventUChars = static_cast(native_key_data["event_umodchars"].isUndefined() ? 0 : native_key_data["event_umodchars"].asInteger()); bool eventIsRepeat = native_key_data["event_isrepeat"].asBoolean(); - mLLCEFLib->keyboardEventOSX(eventType, eventModifiers, (eventChars) ? &eventChars : NULL, + mCEFLib->keyboardEventOSX(eventType, eventModifiers, (eventChars) ? &eventChars : NULL, (eventUChars) ? &eventUChars : NULL, eventIsRepeat, eventKeycode); #elif LL_WINDOWS @@ -860,15 +865,15 @@ void MediaPluginCEF::keyEvent(LLCEFLib::EKeyEvent key_event, int key, LLCEFLib:: U32 wparam = ll_U32_from_sd(native_key_data["w_param"]); U64 lparam = ll_U32_from_sd(native_key_data["l_param"]); - mLLCEFLib->nativeKeyboardEvent(msg, wparam, lparam); + mCEFLib->nativeKeyboardEvent(msg, wparam, lparam); #endif }; -void MediaPluginCEF::unicodeInput(const std::string &utf8str, LLCEFLib::EKeyboardModifier modifiers, LLSD native_key_data = LLSD::emptyMap()) +void MediaPluginCEF::unicodeInput(const std::string &utf8str, dullahan::EKeyboardModifier modifiers, LLSD native_key_data = LLSD::emptyMap()) { #if LL_DARWIN - //mLLCEFLib->keyPress(utf8str[0], true); - //mLLCEFLib->keyboardEvent(LLCEFLib::KE_KEY_DOWN, (uint32_t)(utf8str[0]), 0, LLCEFLib::KM_MODIFIER_NONE, 0, 0, 0); + //mCEFLib->keyPress(utf8str[0], true); + //mCEFLib->keyboardEvent(dullahan::KE_KEY_DOWN, (uint32_t)(utf8str[0]), 0, dullahan::KM_MODIFIER_NONE, 0, 0, 0); if (!native_key_data.has("event_chars") || !native_key_data.has("event_umodchars") || !native_key_data.has("event_keycode") || !native_key_data.has("event_modifiers")) return; @@ -877,13 +882,13 @@ void MediaPluginCEF::unicodeInput(const std::string &utf8str, LLCEFLib::EKeyboar uint32_t keyCode = native_key_data["event_keycode"].asInteger(); uint32_t rawmodifiers = native_key_data["event_modifiers"].asInteger(); - mLLCEFLib->injectUnicodeText(unicodeChar, unmodifiedChar, keyCode, rawmodifiers); + mCEFLib->injectUnicodeText(unicodeChar, unmodifiedChar, keyCode, rawmodifiers); #elif LL_WINDOWS U32 msg = ll_U32_from_sd(native_key_data["msg"]); U32 wparam = ll_U32_from_sd(native_key_data["w_param"]); U64 lparam = ll_U32_from_sd(native_key_data["l_param"]); - mLLCEFLib->nativeKeyboardEvent(msg, wparam, lparam); + mCEFLib->nativeKeyboardEvent(msg, wparam, lparam); #endif }; @@ -891,9 +896,12 @@ void MediaPluginCEF::unicodeInput(const std::string &utf8str, LLCEFLib::EKeyboar // void MediaPluginCEF::checkEditState() { - bool can_cut = mLLCEFLib->editCanCut(); - bool can_copy = mLLCEFLib->editCanCopy(); - bool can_paste = mLLCEFLib->editCanPaste(); + //$1 bool can_cut = mCEFLib->editCanCut(); + //$1 bool can_copy = mCEFLib->editCanCopy(); + //$1 bool can_paste = mCEFLib->editCanPaste(); + bool can_cut = false; + bool can_copy = false; + bool can_paste = false; if ((can_cut != mCanCut) || (can_copy != mCanCopy) || (can_paste != mCanPaste)) { diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 65c3e70b66..d7b91ba741 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -125,7 +125,7 @@ #include "llcoros.h" #include "llexception.h" #if !LL_LINUX -#include "cef/llceflib.h" +#include "cef/dullahan.h" #if LL_WINDOWS #include "vlc/libvlc_version.h" #endif // LL_WINDOWS @@ -3393,13 +3393,15 @@ LLSD LLAppViewer::getViewerInfo() const } #if !LL_LINUX - info["LLCEFLIB_VERSION"] = LLCEFLIB_VERSION; + // TODO this is terrible, but how else to accurately get back entire version from + // both CEF and Dullahan when there is no #define anymore? + info["LIBCEF_VERSION"] = "Calculating..."; #else - info["LLCEFLIB_VERSION"] = "Undefined"; + info["LIBCEF_VERSION"] = "Undefined"; #endif -#if LL_WINDOWS +#if !LL_LINUX std::ostringstream ver_codec; ver_codec << LIBVLC_VERSION_MAJOR; ver_codec << "."; diff --git a/indra/newview/skins/default/xui/da/floater_about.xml b/indra/newview/skins/default/xui/da/floater_about.xml index 779b168ae0..7654f0dcd6 100644 --- a/indra/newview/skins/default/xui/da/floater_about.xml +++ b/indra/newview/skins/default/xui/da/floater_about.xml @@ -24,7 +24,7 @@ Grafik kort: [GRAPHICS_CARD] J2C Decoder Version: [J2C_VERSION] Audio Driver Version: [AUDIO_DRIVER_VERSION] -LLCEFLib/CEF Version: [LLCEFLIB_VERSION] +CEF Version: [LIBCEF_VERSION] LibVLC Version: [LIBVLC_VERSION] Voice Server Version: [VOICE_VERSION] diff --git a/indra/newview/skins/default/xui/de/strings.xml b/indra/newview/skins/default/xui/de/strings.xml index 4a2cbcc81f..d3d0423d44 100644 --- a/indra/newview/skins/default/xui/de/strings.xml +++ b/indra/newview/skins/default/xui/de/strings.xml @@ -79,7 +79,7 @@ Erstellungszeit VFS (Cache): [VFS_TIME] J2C-Decoderversion: [J2C_VERSION] Audiotreiberversion: [AUDIO_DRIVER_VERSION] -LLCEFLib/CEF-Version: [LLCEFLIB_VERSION] +CEF-Version: [LIBCEF_VERSION] LibVLC-Version: [LIBVLC_VERSION] Voice-Server-Version: [VOICE_VERSION] diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 6b3422d892..c19ab5a570 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -61,7 +61,7 @@ VFS (cache) creation time: [VFS_TIME] J2C Decoder Version: [J2C_VERSION] Audio Driver Version: [AUDIO_DRIVER_VERSION] -LLCEFLib/CEF Version: [LLCEFLIB_VERSION] +CEF Version: [LIBCEF_VERSION] LibVLC Version: [LIBVLC_VERSION] Voice Server Version: [VOICE_VERSION] diff --git a/indra/newview/skins/default/xui/es/strings.xml b/indra/newview/skins/default/xui/es/strings.xml index 192d32c267..a56d7d6de7 100644 --- a/indra/newview/skins/default/xui/es/strings.xml +++ b/indra/newview/skins/default/xui/es/strings.xml @@ -70,8 +70,8 @@ Tiempo de creación de VFS (caché): [VFS_TIME] Versión de J2C Decoder: [J2C_VERSION] Versión de Audio Driver: [AUDIO_DRIVER_VERSION] -Versión de LLCEFLib/CEF: [LLCEFLIB_VERSION] -Versión de LibVLC: [LLCEFLIB_VERSION] +Versión de CEF: [LIBCEF_VERSION] +Versión de LibVLC: [LIBVLC_VERSION] Versión de Voice Server: [VOICE_VERSION] diff --git a/indra/newview/skins/default/xui/fr/strings.xml b/indra/newview/skins/default/xui/fr/strings.xml index 40a41b93ab..10c9be0795 100644 --- a/indra/newview/skins/default/xui/fr/strings.xml +++ b/indra/newview/skins/default/xui/fr/strings.xml @@ -79,7 +79,7 @@ Durée de création VFS (cache) : [VFS_TIME] Version J2C Decoder : [J2C_VERSION] Version Audio Driver : [AUDIO_DRIVER_VERSION] -Version LLCEFLib/CEF : [LLCEFLIB_VERSION] +Version CEF : [LIBCEF_VERSION] Version LibVLC : [LIBVLC_VERSION] Version serveur vocal : [VOICE_VERSION] diff --git a/indra/newview/skins/default/xui/it/strings.xml b/indra/newview/skins/default/xui/it/strings.xml index 8246f91d17..d158cfd311 100644 --- a/indra/newview/skins/default/xui/it/strings.xml +++ b/indra/newview/skins/default/xui/it/strings.xml @@ -76,7 +76,7 @@ Data/ora creazione VFS (cache): [VFS_TIME] Versione J2C Decoder: [J2C_VERSION] Versione Driver audio: [AUDIO_DRIVER_VERSION] -Versione LLCEFLib/CEF: [LLCEFLIB_VERSION] +Versione CEF: [LIBCEF_VERSION] Versione LibVLC: [LIBVLC_VERSION] Versione Server voice: [VOICE_VERSION] diff --git a/indra/newview/skins/default/xui/ja/strings.xml b/indra/newview/skins/default/xui/ja/strings.xml index 586b8ab2d3..b3c92dbe8d 100644 --- a/indra/newview/skins/default/xui/ja/strings.xml +++ b/indra/newview/skins/default/xui/ja/strings.xml @@ -79,7 +79,7 @@ VFS(キャッシュ)作成時間: [VFS_TIME] J2C デコーダバージョン:[J2C_VERSION] オーディオドライババージョン:[AUDIO_DRIVER_VERSION] -LLCEFLib/CEF バージョン: [LLCEFLIB_VERSION] +CEF バージョン: [LIBCEF_VERSION] LibVLC バージョン: [LIBVLC_VERSION] ボイスサーバーバージョン:[VOICE_VERSION] diff --git a/indra/newview/skins/default/xui/pl/strings.xml b/indra/newview/skins/default/xui/pl/strings.xml index e9dd18043d..9aece1221d 100644 --- a/indra/newview/skins/default/xui/pl/strings.xml +++ b/indra/newview/skins/default/xui/pl/strings.xml @@ -43,7 +43,7 @@ Wersja OpenGL: [OPENGL_VERSION] Wersja dekodera J2C: [J2C_VERSION] Wersja sterownika dźwięku (Audio Driver): [AUDIO_DRIVER_VERSION] -Wersja LLCEFLib/CEF: [LLCEFLIB_VERSION] +Wersja CEF: [LIBCEF_VERSION] Wersja LibVLC: [LIBVLC_VERSION] Wersja serwera głosu (Voice Server): [VOICE_VERSION] diff --git a/indra/newview/skins/default/xui/pt/strings.xml b/indra/newview/skins/default/xui/pt/strings.xml index 207b4e7097..0d7585a424 100644 --- a/indra/newview/skins/default/xui/pt/strings.xml +++ b/indra/newview/skins/default/xui/pt/strings.xml @@ -70,7 +70,7 @@ Tempo de criação de VFS (cache): [VFS_TIME] Versão do J2C Decoder: [J2C_VERSION] Versão do driver de áudio: [AUDIO_DRIVER_VERSION] -Versão de LLCEFLib/CEF: [LLCEFLIB_VERSION] +Versão de CEF: [LIBCEF_VERSION] Versão da LibVLC: [LIBVLC_VERSION] Versão do servidor de voz: [VOICE_VERSION] diff --git a/indra/newview/skins/default/xui/ru/strings.xml b/indra/newview/skins/default/xui/ru/strings.xml index e44d63b3b9..7b1dcae021 100644 --- a/indra/newview/skins/default/xui/ru/strings.xml +++ b/indra/newview/skins/default/xui/ru/strings.xml @@ -79,7 +79,7 @@ SLURL: <nolink>[SLURL]</nolink> Версия декодера J2C: [J2C_VERSION] Версия драйвера звука: [AUDIO_DRIVER_VERSION] -Версия LLCEFLib/CEF: [LLCEFLIB_VERSION] +Версия CEF: [LIBCEF_VERSION] Версия LibVLC: [LIBVLC_VERSION] Версия голосового сервера: [VOICE_VERSION] diff --git a/indra/newview/skins/default/xui/tr/strings.xml b/indra/newview/skins/default/xui/tr/strings.xml index 7b4bf1fca6..dda7902e94 100644 --- a/indra/newview/skins/default/xui/tr/strings.xml +++ b/indra/newview/skins/default/xui/tr/strings.xml @@ -79,7 +79,7 @@ VFS (önbellek) oluşturma zamanı: [VFS_TIME] J2C Kod Çözücü Sürümü: [J2C_VERSION] Ses Sürücüsü Sürümü: [AUDIO_DRIVER_VERSION] -LLCEFLib/CEF Sürümü: [LLCEFLIB_VERSION] +CEF Sürümü: [LIBCEF_VERSION] LibVLC Sürümü: [LIBVLC_VERSION] Ses Sunucusu Sürümü: [VOICE_VERSION] diff --git a/indra/newview/skins/default/xui/zh/strings.xml b/indra/newview/skins/default/xui/zh/strings.xml index ec08c9f91e..9e88e96284 100644 --- a/indra/newview/skins/default/xui/zh/strings.xml +++ b/indra/newview/skins/default/xui/zh/strings.xml @@ -79,7 +79,7 @@ VFS(快取)建立時間:[VFS_TIME] J2C 解碼器版本: [J2C_VERSION] 音效驅動程式版本: [AUDIO_DRIVER_VERSION] -LLCEFLib/CEF版本:[LLCEFLIB_VERSION] +CEF版本:[LIBCEF_VERSION] LibVLC版本:[LIBVLC_VERSION]N] 語音伺服器版本: [VOICE_VERSION] diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index d68c01351f..c5bd91e396 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -447,7 +447,7 @@ class WindowsManifest(ViewerManifest): self.path("libcef.dll") self.path("libEGL.dll") self.path("libGLESv2.dll") - self.path("llceflib_host.exe") + self.path("dullahan_host.exe") self.path("natives_blob.bin") self.path("snapshot_blob.bin") self.path("widevinecdmadapter.dll") @@ -461,7 +461,7 @@ class WindowsManifest(ViewerManifest): self.path("libcef.dll") self.path("libEGL.dll") self.path("libGLESv2.dll") - self.path("llceflib_host.exe") + self.path("dullahan_host.exe") self.path("natives_blob.bin") self.path("snapshot_blob.bin") self.path("widevinecdmadapter.dll") @@ -839,22 +839,21 @@ class DarwinManifest(ViewerManifest): except OSError as err: print "Can't symlink %s -> %s: %s" % (src, dst, err) - # LLCefLib helper apps go inside SLPlugin.app + # Dullahan helper apps go inside SLPlugin.app if self.prefix(src="", dst="SLPlugin.app/Contents/Frameworks"): - for helperappfile in ('LLCefLib Helper.app', - 'LLCefLib Helper EH.app'): + for helperappfile in ('DullahanHelper.app'): self.path2basename(relpkgdir, helperappfile) pluginframeworkpath = self.dst_path_of('Chromium Embedded Framework.framework'); # Putting a Frameworks directory under Contents/MacOS - # isn't canonical, but the path baked into LLCefLib - # Helper.app/Contents/MacOS/LLCefLib Helper is: + # isn't canonical, but the path baked into Dullahan + # Helper.app/Contents/MacOS/DullahanHelper is: # @executable_path/Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework # (notice, not @executable_path/../Frameworks/etc.) # So we'll create a symlink (below) from there back to the # Frameworks directory nested under SLPlugin.app. helperframeworkpath = \ - self.dst_path_of('LLCefLib Helper.app/Contents/MacOS/' + self.dst_path_of('DullahanHelper.app/Contents/MacOS/' 'Frameworks/Chromium Embedded Framework.framework') self.end_prefix() @@ -918,7 +917,7 @@ class DarwinManifest(ViewerManifest): # Life.app/Contents/Frameworks/Chromium Embedded Framework.framework origin, target = pluginframeworkpath, frameworkpath symlinkf(target, origin) - # from SLPlugin.app/Contents/Frameworks/LLCefLib + # from SLPlugin.app/Contents/Frameworks/Dullahan # Helper.app/Contents/MacOS/Frameworks/Chromium Embedded # Framework.framework back to # SLPlugin.app/Contents/Frameworks/Chromium Embedded Framework.framework -- cgit v1.2.3 From 49b448b7782811949560d155c273ac8444e25fc1 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 22 Feb 2017 18:31:12 +0200 Subject: MAINT-7118 fixed erroneous name check --- indra/newview/lltoolpie.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 9acf9080bf..fc052ae3aa 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -883,7 +883,7 @@ BOOL LLToolPie::handleTooltipLand(std::string line, std::string tooltip_msg) } else if (hover_parcel->getIsGroupOwned()) { - if (gCacheName->getFullName(owner, name)) //group? + if (gCacheName->getGroupName(owner, name)) { line.append(name); line.append(LLTrans::getString("TooltipIsGroup")); -- cgit v1.2.3 From ea4ef0b4e0a9d001b22724b238e811c371d3bbba Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Wed, 22 Feb 2017 19:21:01 -0800 Subject: Pull in new version of p64_3p-Dullahan with support for flippyingh pixels/mouse, copy/cut/paste and new version info --- autobuild.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index 94f3c6df88..3a9d7f2f01 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -538,9 +538,9 @@ archive hash - 0a7831886570ed6485a462db33d30ca5 + a220602c9a691553f2f7f1fad3777802 url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/2822/6489/dullahan-1.1.601_3.2704-windows-502809.tar.bz2 + http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/2893/6744/dullahan-1.0.620_3.2704.1434.gec3e9ed-windows-502882.tar.bz2 name windows @@ -550,16 +550,16 @@ archive hash - a9a42672f14d9cbb42ffc50677ad2d42 + 55aa333945e17ae54851b621e53a0381 url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/2821/6492/dullahan-1.1.601_3.2704-windows64-502809.tar.bz2 + http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/2894/6749/dullahan-1.0.620_3.2704.1434.gec3e9ed-windows64-502882.tar.bz2 name windows64 version - 1.1.601_3.2704 + 1.0.620_3.2704.1434.gec3e9ed elfio -- cgit v1.2.3 From 2c8299d643156bb39528c3a56cac330c0dcd5df9 Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Wed, 22 Feb 2017 19:21:55 -0800 Subject: reenable support for copy/cut/paste to/from a web page --- indra/media_plugins/cef/media_plugin_cef.cpp | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/indra/media_plugins/cef/media_plugin_cef.cpp b/indra/media_plugins/cef/media_plugin_cef.cpp index b78af1b348..1637976422 100644 --- a/indra/media_plugins/cef/media_plugin_cef.cpp +++ b/indra/media_plugins/cef/media_plugin_cef.cpp @@ -507,6 +507,8 @@ void MediaPluginCEF::receiveMessage(const char* message_string) settings.cookie_store_path = mCookiePath; settings.cookies_enabled = mCookiesEnabled; settings.flash_enabled = mPluginsEnabled; + settings.flip_mouse_y = false; + settings.flip_pixels_y = true; settings.frame_rate = 60; settings.initial_height = 1024; settings.initial_width = 1024; @@ -535,7 +537,7 @@ void MediaPluginCEF::receiveMessage(const char* message_string) message.setValueU32("internalformat", GL_RGB); message.setValueU32("format", GL_BGRA); message.setValueU32("type", GL_UNSIGNED_BYTE); - message.setValueBoolean("coords_opengl", false); + message.setValueBoolean("coords_opengl", true); sendMessage(message); } else if (message_name == "set_user_data_path") @@ -606,8 +608,6 @@ void MediaPluginCEF::receiveMessage(const char* message_string) S32 x = message_in.getValueS32("x"); S32 y = message_in.getValueS32("y"); - y = mHeight - y; - // only even send left mouse button events to the CEF library // (partially prompted by crash in OS X CEF when sending right button events) // we catch the right click in viewer and display our own context menu anyway @@ -725,15 +725,15 @@ void MediaPluginCEF::receiveMessage(const char* message_string) } if (message_name == "edit_cut") { - //$1 mCEFLib->editCut(); + mCEFLib->editCut(); } if (message_name == "edit_copy") { - //$1 mCEFLib->editCopy(); + mCEFLib->editCopy(); } if (message_name == "edit_paste") { - //$1 mCEFLib->editPaste(); + mCEFLib->editPaste(); } } else if (message_class == LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER) @@ -896,12 +896,9 @@ void MediaPluginCEF::unicodeInput(const std::string &utf8str, dullahan::EKeyboar // void MediaPluginCEF::checkEditState() { - //$1 bool can_cut = mCEFLib->editCanCut(); - //$1 bool can_copy = mCEFLib->editCanCopy(); - //$1 bool can_paste = mCEFLib->editCanPaste(); - bool can_cut = false; - bool can_copy = false; - bool can_paste = false; + bool can_cut = mCEFLib->editCanCut(); + bool can_copy = mCEFLib->editCanCopy(); + bool can_paste = mCEFLib->editCanPaste(); if ((can_cut != mCanCut) || (can_copy != mCanCopy) || (can_paste != mCanPaste)) { -- cgit v1.2.3 From 8f4cb2bc15656e705e0037ea62aec13c923ba78f Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Wed, 22 Feb 2017 19:22:15 -0800 Subject: Use new version info from CEF plugin to display in About box --- indra/newview/llappviewer.cpp | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index d7b91ba741..15b8ecfcea 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -126,9 +126,7 @@ #include "llexception.h" #if !LL_LINUX #include "cef/dullahan.h" -#if LL_WINDOWS #include "vlc/libvlc_version.h" -#endif // LL_WINDOWS #endif // LL_LINUX // Third party library includes @@ -3393,22 +3391,28 @@ LLSD LLAppViewer::getViewerInfo() const } #if !LL_LINUX - // TODO this is terrible, but how else to accurately get back entire version from - // both CEF and Dullahan when there is no #define anymore? - info["LIBCEF_VERSION"] = "Calculating..."; + std::ostringstream cef_ver_codec; + cef_ver_codec << "Dullahan: "; + cef_ver_codec << DULLAHAN_VERSION_MAJOR; + cef_ver_codec << "."; + cef_ver_codec << DULLAHAN_VERSION_MINOR; + cef_ver_codec << "."; + cef_ver_codec << DULLAHAN_VERSION_BUILD; + cef_ver_codec << " - CEF: "; + cef_ver_codec << CEF_VERSION; + info["LIBCEF_VERSION"] = cef_ver_codec.str(); #else info["LIBCEF_VERSION"] = "Undefined"; - #endif #if !LL_LINUX - std::ostringstream ver_codec; - ver_codec << LIBVLC_VERSION_MAJOR; - ver_codec << "."; - ver_codec << LIBVLC_VERSION_MINOR; - ver_codec << "."; - ver_codec << LIBVLC_VERSION_REVISION; - info["LIBVLC_VERSION"] = ver_codec.str(); + std::ostringstream vlc_ver_codec; + vlc_ver_codec << LIBVLC_VERSION_MAJOR; + vlc_ver_codec << "."; + vlc_ver_codec << LIBVLC_VERSION_MINOR; + vlc_ver_codec << "."; + vlc_ver_codec << LIBVLC_VERSION_REVISION; + info["LIBVLC_VERSION"] = vlc_ver_codec.str(); #else info["LIBVLC_VERSION"] = "Undefined"; #endif -- cgit v1.2.3 From f88881884fe3fd72eb0cada7cb23095ae53f8658 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Thu, 23 Feb 2017 12:17:59 +0200 Subject: MAINT-7138 Fix Agent Limit field and spinner cap in Region/Estate floater --- indra/llmessage/message_prehash.cpp | 1 + indra/llmessage/message_prehash.h | 1 + indra/newview/llfloaterregioninfo.cpp | 4 ++++ indra/newview/llregioninfomodel.cpp | 4 ++++ indra/newview/llregioninfomodel.h | 2 ++ 5 files changed, 12 insertions(+) diff --git a/indra/llmessage/message_prehash.cpp b/indra/llmessage/message_prehash.cpp index 5c6b3d5fab..6675e12649 100644 --- a/indra/llmessage/message_prehash.cpp +++ b/indra/llmessage/message_prehash.cpp @@ -618,6 +618,7 @@ char const* const _PREHASH_GroupAccountSummaryRequest = LLMessageStringTable::ge char const* const _PREHASH_GroupVoteHistoryRequest = LLMessageStringTable::getInstance()->getString("GroupVoteHistoryRequest"); char const* const _PREHASH_ParamValue = LLMessageStringTable::getInstance()->getString("ParamValue"); char const* const _PREHASH_MaxAgents = LLMessageStringTable::getInstance()->getString("MaxAgents"); +char const* const _PREHASH_HardMaxAgents = LLMessageStringTable::getInstance()->getString("HardMaxAgents"); char const* const _PREHASH_CreateNewOutfitAttachments = LLMessageStringTable::getInstance()->getString("CreateNewOutfitAttachments"); char const* const _PREHASH_RegionHandle = LLMessageStringTable::getInstance()->getString("RegionHandle"); char const* const _PREHASH_TeleportProgress = LLMessageStringTable::getInstance()->getString("TeleportProgress"); diff --git a/indra/llmessage/message_prehash.h b/indra/llmessage/message_prehash.h index e696c3b0ca..a510b4498f 100644 --- a/indra/llmessage/message_prehash.h +++ b/indra/llmessage/message_prehash.h @@ -618,6 +618,7 @@ extern char const* const _PREHASH_GroupAccountSummaryRequest; extern char const* const _PREHASH_GroupVoteHistoryRequest; extern char const* const _PREHASH_ParamValue; extern char const* const _PREHASH_MaxAgents; +extern char const* const _PREHASH_HardMaxAgents; extern char const* const _PREHASH_CreateNewOutfitAttachments; extern char const* const _PREHASH_RegionHandle; extern char const* const _PREHASH_TeleportProgress; diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 843dbbf25e..75d7d787b1 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -357,6 +357,7 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg) std::string sim_type = LLTrans::getString("land_type_unknown"); U64 region_flags; U8 agent_limit; + S32 hard_agent_limit; F32 object_bonus_factor; U8 sim_access; F32 water_height; @@ -366,6 +367,7 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg) F32 sun_hour; msg->getString("RegionInfo", "SimName", sim_name); msg->getU8("RegionInfo", "MaxAgents", agent_limit); + msg->getS32("RegionInfo2", "HardMaxAgents", hard_agent_limit); msg->getF32("RegionInfo", "ObjectBonusFactor", object_bonus_factor); msg->getU8("RegionInfo", "SimAccess", sim_access); msg->getF32Fast(_PREHASH_RegionInfo, _PREHASH_WaterHeight, water_height); @@ -412,6 +414,8 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg) panel->getChild("object_bonus_spin")->setValue(LLSD(object_bonus_factor) ); panel->getChild("access_combo")->setValue(LLSD(sim_access) ); + panel->getChild("agent_limit_spin")->setMaxValue(hard_agent_limit); + LLPanelRegionGeneralInfo* panel_general = LLFloaterRegionInfo::getPanelGeneral(); if (panel) { diff --git a/indra/newview/llregioninfomodel.cpp b/indra/newview/llregioninfomodel.cpp index 25c576468b..25d7be831f 100644 --- a/indra/newview/llregioninfomodel.cpp +++ b/indra/newview/llregioninfomodel.cpp @@ -40,6 +40,7 @@ void LLRegionInfoModel::reset() { mSimAccess = 0; mAgentLimit = 0; + mHardAgentLimit = 100; mRegionFlags = 0; mEstateID = 0; @@ -143,6 +144,7 @@ void LLRegionInfoModel::update(LLMessageSystem* msg) msg->getU32Fast(_PREHASH_RegionInfo, _PREHASH_ParentEstateID, mParentEstateID); msg->getU8Fast(_PREHASH_RegionInfo, _PREHASH_SimAccess, mSimAccess); msg->getU8Fast(_PREHASH_RegionInfo, _PREHASH_MaxAgents, mAgentLimit); + msg->getF32Fast(_PREHASH_RegionInfo, _PREHASH_ObjectBonusFactor, mObjectBonusFactor); msg->getF32Fast(_PREHASH_RegionInfo, _PREHASH_BillableFactor, mBillableFactor); msg->getF32Fast(_PREHASH_RegionInfo, _PREHASH_WaterHeight, mWaterHeight); @@ -158,6 +160,8 @@ void LLRegionInfoModel::update(LLMessageSystem* msg) msg->getF32(_PREHASH_RegionInfo, _PREHASH_SunHour, mSunHour); LL_DEBUGS("Windlight Sync") << "Got region sun hour: " << mSunHour << LL_ENDL; + msg->getS32Fast(_PREHASH_RegionInfo2, _PREHASH_HardMaxAgents, mHardAgentLimit); + if (msg->has(_PREHASH_RegionInfo3)) { msg->getU64Fast(_PREHASH_RegionInfo3, _PREHASH_RegionFlagsExtended, mRegionFlags); diff --git a/indra/newview/llregioninfomodel.h b/indra/newview/llregioninfomodel.h index ea9640efda..baeff82fef 100644 --- a/indra/newview/llregioninfomodel.h +++ b/indra/newview/llregioninfomodel.h @@ -53,6 +53,8 @@ public: U8 mSimAccess; U8 mAgentLimit; + S32 mHardAgentLimit; + U64 mRegionFlags; U32 mEstateID; U32 mParentEstateID; -- cgit v1.2.3 From 043d13d5e48b1397de1f84cb19b7d2d85a9757f1 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 23 Feb 2017 19:38:12 +0200 Subject: MAINT-2132 Fixed Avatar hasn't animation while moving if wear and detach object in edit mode --- indra/newview/llselectmgr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 5ebf7cfe13..353c61da0c 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -6619,7 +6619,7 @@ void LLSelectMgr::updateSelectionCenter() { mSelectedObjects->mSelectType = getSelectTypeForObject(object); - if (mSelectedObjects->mSelectType == SELECT_TYPE_ATTACHMENT && isAgentAvatarValid()) + if (mSelectedObjects->mSelectType == SELECT_TYPE_ATTACHMENT && isAgentAvatarValid() && object->getParent() != NULL) { mPauseRequest = gAgentAvatarp->requestPause(); } -- cgit v1.2.3 From 210e2a8bfbd8f3b681802d087de2f3e81eb31a87 Mon Sep 17 00:00:00 2001 From: "callum@lindenlab.com" Date: Thu, 23 Feb 2017 10:16:47 -0800 Subject: Pull in latest 3P Dullahan with change to cursor changed function signature --- autobuild.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index 3a9d7f2f01..1f99de7492 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -526,9 +526,9 @@ archive hash - cee1a8a803a083cd26f72d1120e59bee + 075774167b429018808c9c055c554734 url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/2820/6482/dullahan-1.1.601_3.2704-darwin64-502809.tar.bz2 + http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/2899/6761/dullahan-1.0.620_3.2704.1434.gec3e9ed-darwin64-502888.tar.bz2 name darwin64 @@ -538,9 +538,9 @@ archive hash - a220602c9a691553f2f7f1fad3777802 + d53c641f81d4dcd27c6725120c70ab4a url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/2893/6744/dullahan-1.0.620_3.2704.1434.gec3e9ed-windows-502882.tar.bz2 + http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/2900/6768/dullahan-1.0.620_3.2704.1434.gec3e9ed-windows-502888.tar.bz2 name windows @@ -550,9 +550,9 @@ archive hash - 55aa333945e17ae54851b621e53a0381 + 3e755e4ab5ab16f3a05b9f5f519c802f url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/2894/6749/dullahan-1.0.620_3.2704.1434.gec3e9ed-windows64-502882.tar.bz2 + http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/2901/6773/dullahan-1.0.620_3.2704.1434.gec3e9ed-windows64-502888.tar.bz2 name windows64 -- cgit v1.2.3 From f04bfdd70ed6003bd3a333cfd99f91530f18f7ad Mon Sep 17 00:00:00 2001 From: "callum@lindenlab.com" Date: Thu, 23 Feb 2017 10:17:52 -0800 Subject: Update media plugin CEF code to match new Dullahan --- indra/media_plugins/cef/media_plugin_cef.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/media_plugins/cef/media_plugin_cef.cpp b/indra/media_plugins/cef/media_plugin_cef.cpp index 1637976422..d0ba8e5b3c 100644 --- a/indra/media_plugins/cef/media_plugin_cef.cpp +++ b/indra/media_plugins/cef/media_plugin_cef.cpp @@ -68,7 +68,7 @@ private: void onAddressChangeCallback(std::string url); void onNavigateURLCallback(std::string url, std::string target); bool onHTTPAuthCallback(const std::string host, const std::string realm, std::string& username, std::string& password); - void onCursorChangedCallback(dullahan::ECursorType type, unsigned int handle); + void onCursorChangedCallback(dullahan::ECursorType type); void onFileDownloadCallback(std::string filename); const std::string onFileDialogCallback(); @@ -362,7 +362,7 @@ const std::string MediaPluginCEF::onFileDialogCallback() return mPickedFile; } -void MediaPluginCEF::onCursorChangedCallback(dullahan::ECursorType type, unsigned int handle) +void MediaPluginCEF::onCursorChangedCallback(dullahan::ECursorType type) { std::string name = ""; @@ -496,7 +496,7 @@ void MediaPluginCEF::receiveMessage(const char* message_string) mCEFLib->setOnHTTPAuthCallback(std::bind(&MediaPluginCEF::onHTTPAuthCallback, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, std::placeholders::_4)); mCEFLib->setOnFileDownloadCallback(std::bind(&MediaPluginCEF::onFileDownloadCallback, this, std::placeholders::_1)); mCEFLib->setOnFileDialogCallback(std::bind(&MediaPluginCEF::onFileDialogCallback, this)); - mCEFLib->setOnCursorChangedCallback(std::bind(&MediaPluginCEF::onCursorChangedCallback, this, std::placeholders::_1, std::placeholders::_2)); + mCEFLib->setOnCursorChangedCallback(std::bind(&MediaPluginCEF::onCursorChangedCallback, this, std::placeholders::_1)); mCEFLib->setOnRequestExitCallback(std::bind(&MediaPluginCEF::onRequestExitCallback, this)); dullahan::dullahan_settings settings; -- cgit v1.2.3 From bff83a7f415635cf575520bc747e5da7a5b1ef0f Mon Sep 17 00:00:00 2001 From: "callum@lindenlab.com" Date: Thu, 23 Feb 2017 10:26:46 -0800 Subject: Whoopps. Apologies for leaving Windows debug spam in code :( --- indra/media_plugins/cef/media_plugin_cef.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/indra/media_plugins/cef/media_plugin_cef.cpp b/indra/media_plugins/cef/media_plugin_cef.cpp index d0ba8e5b3c..0116b18a99 100644 --- a/indra/media_plugins/cef/media_plugin_cef.cpp +++ b/indra/media_plugins/cef/media_plugin_cef.cpp @@ -167,9 +167,6 @@ void MediaPluginCEF::postDebugMessage(const std::string& msg) // void MediaPluginCEF::onPageChangedCallback(const unsigned char* pixels, int x, int y, const int width, const int height, bool is_popup) { - - OutputDebugStringA("@"); - if( is_popup ) { delete mPopupBuffer; -- cgit v1.2.3 From fd756828a762082c8ae4fa3d69516241ecb1b858 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 24 Feb 2017 17:41:39 +0200 Subject: MAINT-3509 Fixed Context menu orphaned when Inventory floater is closed by keyboard shortcut --- indra/llui/llmenugl.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 8425774d46..022f814bbc 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -3342,6 +3342,12 @@ BOOL LLMenuBarGL::handleAcceleratorKey(KEY key, MASK mask) return TRUE; } + if (result && !getHighlightedItem() && LLMenuGL::sMenuContainer->hasVisibleMenu()) + { + // close menus originating from other menu bars + LLMenuGL::sMenuContainer->hideMenus(); + } + return result; } -- cgit v1.2.3 From 94c2ebdea4cd9f9189d491baafe5aa08a8cfb7df Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Fri, 24 Feb 2017 14:20:48 -0500 Subject: MAINT-7156: do not use the server-supplied agent email when sending a postcard because it is obfuscated and not needed --- indra/newview/llpanelsnapshotpostcard.cpp | 36 ------------------------------- indra/newview/llpostcard.cpp | 4 +--- indra/newview/llpostcard.h | 3 +-- 3 files changed, 2 insertions(+), 41 deletions(-) diff --git a/indra/newview/llpanelsnapshotpostcard.cpp b/indra/newview/llpanelsnapshotpostcard.cpp index be8bde09f8..ebf9153da9 100644 --- a/indra/newview/llpanelsnapshotpostcard.cpp +++ b/indra/newview/llpanelsnapshotpostcard.cpp @@ -57,7 +57,6 @@ public: LLPanelSnapshotPostcard(); /*virtual*/ BOOL postBuild(); /*virtual*/ void onOpen(const LLSD& key); - /*virtual*/ S32 notify(const LLSD& info); private: /*virtual*/ std::string getWidthSpinnerName() const { return "postcard_snapshot_width"; } @@ -79,7 +78,6 @@ private: void onSend(); bool mHasFirstMsgFocus; - std::string mAgentEmail; }; static LLPanelInjector panel_class("llpanelsnapshotpostcard"); @@ -108,36 +106,9 @@ BOOL LLPanelSnapshotPostcard::postBuild() // virtual void LLPanelSnapshotPostcard::onOpen(const LLSD& key) { - // pick up the user's up-to-date email address - if (mAgentEmail.empty()) - { - gAgent.sendAgentUserInfoRequest(); - - std::string name_string; - LLAgentUI::buildFullname(name_string); - getChild("name_form")->setValue(LLSD(name_string)); - } - LLPanelSnapshot::onOpen(key); } -// virtual -S32 LLPanelSnapshotPostcard::notify(const LLSD& info) -{ - if (!info.has("agent-email")) - { - llassert(info.has("agent-email")); - return 0; - } - - if (mAgentEmail.empty()) - { - mAgentEmail = info["agent-email"].asString(); - } - - return 1; -} - // virtual void LLPanelSnapshotPostcard::updateControls(const LLSD& info) { @@ -190,7 +161,6 @@ void LLPanelSnapshotPostcard::sendPostcard() if (!url.empty()) { LLResourceUploadInfo::ptr_t uploadInfo(new LLPostcardUploadInfo( - mAgentEmail, getChild("name_form")->getValue().asString(), getChild("to_form")->getValue().asString(), getChild("subject_form")->getValue().asString(), @@ -253,12 +223,6 @@ void LLPanelSnapshotPostcard::onSend() return; } - if (mAgentEmail.empty() || !boost::regex_match(mAgentEmail, email_format)) - { - LLNotificationsUtil::add("PromptSelfEmail"); - return; - } - std::string subject(getChild("subject_form")->getValue().asString()); if(subject.empty() || !mHasFirstMsgFocus) { diff --git a/indra/newview/llpostcard.cpp b/indra/newview/llpostcard.cpp index 2e639b56eb..d5775042c1 100644 --- a/indra/newview/llpostcard.cpp +++ b/indra/newview/llpostcard.cpp @@ -40,11 +40,10 @@ /////////////////////////////////////////////////////////////////////////////// -LLPostcardUploadInfo::LLPostcardUploadInfo(std::string emailFrom, std::string nameFrom, std::string emailTo, +LLPostcardUploadInfo::LLPostcardUploadInfo(std::string nameFrom, std::string emailTo, std::string subject, std::string message, LLVector3d globalPosition, LLPointer image, invnUploadFinish_f finish) : LLBufferedAssetUploadInfo(LLUUID::null, image, finish), - mEmailFrom(emailFrom), mNameFrom(nameFrom), mEmailTo(emailTo), mSubject(subject), @@ -58,7 +57,6 @@ LLSD LLPostcardUploadInfo::generatePostBody() LLSD postcard = LLSD::emptyMap(); postcard["pos-global"] = mGlobalPosition.getValue(); postcard["to"] = mEmailTo; - postcard["from"] = mEmailFrom; postcard["name"] = mNameFrom; postcard["subject"] = mSubject; postcard["msg"] = mMessage; diff --git a/indra/newview/llpostcard.h b/indra/newview/llpostcard.h index 24157be636..1e932ae03f 100644 --- a/indra/newview/llpostcard.h +++ b/indra/newview/llpostcard.h @@ -53,13 +53,12 @@ private: class LLPostcardUploadInfo : public LLBufferedAssetUploadInfo { public: - LLPostcardUploadInfo(std::string emailFrom, std::string nameFrom, std::string emailTo, + LLPostcardUploadInfo(std::string nameFrom, std::string emailTo, std::string subject, std::string message, LLVector3d globalPosition, LLPointer image, invnUploadFinish_f finish); virtual LLSD generatePostBody(); private: - std::string mEmailFrom; std::string mNameFrom; std::string mEmailTo; std::string mSubject; -- cgit v1.2.3 From 08940da90ee944dd838b1db65658c39bb0aa80d4 Mon Sep 17 00:00:00 2001 From: "callum@lindenlab.com" Date: Fri, 24 Feb 2017 15:44:36 -0800 Subject: First round of changes to make the macOS 64 build work --- indra/media_plugins/cef/CMakeLists.txt | 3 ++ indra/media_plugins/cef/media_plugin_cef.cpp | 49 ++++++++++++++-------------- indra/newview/viewer_manifest.py | 7 ++++ 3 files changed, 34 insertions(+), 25 deletions(-) diff --git a/indra/media_plugins/cef/CMakeLists.txt b/indra/media_plugins/cef/CMakeLists.txt index 1c41fadcaf..bc924eabf0 100644 --- a/indra/media_plugins/cef/CMakeLists.txt +++ b/indra/media_plugins/cef/CMakeLists.txt @@ -93,6 +93,9 @@ if (DARWIN) LINK_FLAGS "-exported_symbols_list ${CMAKE_CURRENT_SOURCE_DIR}/../base/media_plugin_base.exp" ) + ## turns on C++11 using Cmake + target_compile_features(media_plugin_cef PRIVATE cxx_range_for) + add_custom_command(TARGET media_plugin_cef POST_BUILD COMMAND ${CMAKE_INSTALL_NAME_TOOL} -change "@executable_path/Chromium Embedded Framework" "@executable_path/../../../../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" diff --git a/indra/media_plugins/cef/media_plugin_cef.cpp b/indra/media_plugins/cef/media_plugin_cef.cpp index 0116b18a99..99958e0d81 100644 --- a/indra/media_plugins/cef/media_plugin_cef.cpp +++ b/indra/media_plugins/cef/media_plugin_cef.cpp @@ -41,7 +41,6 @@ #include "dullahan.h" //#include "volume_catcher.h" - //////////////////////////////////////////////////////////////////////////////// // class MediaPluginCEF : @@ -839,23 +838,23 @@ void MediaPluginCEF::keyEvent(dullahan::EKeyEvent key_event, int key, dullahan:: { #if LL_DARWIN - if (!native_key_data.has("event_type") || - !native_key_data.has("event_modifiers") || - !native_key_data.has("event_keycode") || - !native_key_data.has("event_isrepeat")) - return; + // if (!native_key_data.has("event_type") || + // !native_key_data.has("event_modifiers") || + // !native_key_data.has("event_keycode") || + // !native_key_data.has("event_isrepeat")) + // return; - uint32_t eventType = native_key_data["event_type"].asInteger(); - if (!eventType) - return; - uint32_t eventModifiers = native_key_data["event_modifiers"].asInteger(); - uint32_t eventKeycode = native_key_data["event_keycode"].asInteger(); - char eventChars = static_cast(native_key_data["event_chars"].isUndefined() ? 0 : native_key_data["event_chars"].asInteger()); - char eventUChars = static_cast(native_key_data["event_umodchars"].isUndefined() ? 0 : native_key_data["event_umodchars"].asInteger()); - bool eventIsRepeat = native_key_data["event_isrepeat"].asBoolean(); + // uint32_t eventType = native_key_data["event_type"].asInteger(); + // if (!eventType) + // return; + // uint32_t eventModifiers = native_key_data["event_modifiers"].asInteger(); + // uint32_t eventKeycode = native_key_data["event_keycode"].asInteger(); + // char eventChars = static_cast(native_key_data["event_chars"].isUndefined() ? 0 : native_key_data["event_chars"].asInteger()); + // char eventUChars = static_cast(native_key_data["event_umodchars"].isUndefined() ? 0 : native_key_data["event_umodchars"].asInteger()); + // bool eventIsRepeat = native_key_data["event_isrepeat"].asBoolean(); - mCEFLib->keyboardEventOSX(eventType, eventModifiers, (eventChars) ? &eventChars : NULL, - (eventUChars) ? &eventUChars : NULL, eventIsRepeat, eventKeycode); + // mCEFLib->keyboardEventOSX(eventType, eventModifiers, (eventChars) ? &eventChars : NULL, + // (eventUChars) ? &eventUChars : NULL, eventIsRepeat, eventKeycode); #elif LL_WINDOWS U32 msg = ll_U32_from_sd(native_key_data["msg"]); @@ -871,15 +870,15 @@ void MediaPluginCEF::unicodeInput(const std::string &utf8str, dullahan::EKeyboar #if LL_DARWIN //mCEFLib->keyPress(utf8str[0], true); //mCEFLib->keyboardEvent(dullahan::KE_KEY_DOWN, (uint32_t)(utf8str[0]), 0, dullahan::KM_MODIFIER_NONE, 0, 0, 0); - if (!native_key_data.has("event_chars") || !native_key_data.has("event_umodchars") || - !native_key_data.has("event_keycode") || !native_key_data.has("event_modifiers")) - return; - uint32_t unicodeChar = native_key_data["event_chars"].asInteger(); - uint32_t unmodifiedChar = native_key_data["event_umodchars"].asInteger(); - uint32_t keyCode = native_key_data["event_keycode"].asInteger(); - uint32_t rawmodifiers = native_key_data["event_modifiers"].asInteger(); - - mCEFLib->injectUnicodeText(unicodeChar, unmodifiedChar, keyCode, rawmodifiers); + // if (!native_key_data.has("event_chars") || !native_key_data.has("event_umodchars") || + // !native_key_data.has("event_keycode") || !native_key_data.has("event_modifiers")) + // return; + // uint32_t unicodeChar = native_key_data["event_chars"].asInteger(); + // uint32_t unmodifiedChar = native_key_data["event_umodchars"].asInteger(); + // uint32_t keyCode = native_key_data["event_keycode"].asInteger(); + // uint32_t rawmodifiers = native_key_data["event_modifiers"].asInteger(); + + // CP removed to build mCEFLib->injectUnicodeText(unicodeChar, unmodifiedChar, keyCode, rawmodifiers); #elif LL_WINDOWS U32 msg = ll_U32_from_sd(native_key_data["msg"]); diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index c5bd91e396..3b80f519f4 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -858,6 +858,13 @@ class DarwinManifest(ViewerManifest): self.end_prefix() + # the helper app needs to have it's @executable_path modified to point to the + # same location we drop the CEF framework shortcut + helperexecutablepath = self.dst_path_of('SLPlugin.app/Contents/Frameworks/DullahanHelper.app/Contents/MacOS/DullahanHelper') + self.run_command('install_name_tool -change ' + '"@executable_path/Chromium Embedded Framework" ' + '"@executable_path/Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" "%s"' % helperexecutablepath) + # SLPlugin plugins if self.prefix(src="", dst="llplugin"): self.path2basename("../media_plugins/cef/" + self.args['configuration'], -- cgit v1.2.3 From ba99caa574d1e346aecf2f0fe39d46d340f8afbf Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Mon, 27 Feb 2017 16:43:17 +0200 Subject: MAINT-1206 "Save as" only works once when making skins in the new appearance editor --- indra/newview/llsidepanelappearance.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp index 3e95811bb8..d6bf2164a0 100644 --- a/indra/newview/llsidepanelappearance.cpp +++ b/indra/newview/llsidepanelappearance.cpp @@ -388,7 +388,7 @@ void LLSidepanelAppearance::toggleWearableEditPanel(BOOL visible, LLViewerWearab return; } - if (mEditWearable->getVisible() == visible && (!visible || mEditWearable->getWearable() != wearable)) + if (mEditWearable->getVisible() == visible && (!visible || mEditWearable->getWearable() == wearable)) { // visibility isn't changing and panel doesn't need an update, hence nothing to do return; -- cgit v1.2.3 From 6c80f7369aaf2cddea55e288b5c402fba54f5d98 Mon Sep 17 00:00:00 2001 From: pavelkproductengine Date: Mon, 27 Feb 2017 19:27:18 +0200 Subject: MAINT-3235 Stand button not centered when left toolbar is empty --- indra/newview/llmoveview.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp index c3dd08c327..4999318973 100644 --- a/indra/newview/llmoveview.cpp +++ b/indra/newview/llmoveview.cpp @@ -730,9 +730,16 @@ void LLPanelStandStopFlying::updatePosition() panel_ssf_container->setOrigin(0, y_pos); } - S32 x_pos = bottom_tb_center-getRect().getWidth()/2 - left_tb_width; - - setOrigin( x_pos, 0); + if (gToolBarView != NULL && gToolBarView->getToolbar(LLToolBarEnums::TOOLBAR_LEFT)->hasButtons()) + { + S32 x_pos = bottom_tb_center - getRect().getWidth() / 2 - left_tb_width; + setOrigin( x_pos, 0); + } + else + { + S32 x_pos = bottom_tb_center - getRect().getWidth() / 2; + setOrigin( x_pos, 0); + } } // EOF -- cgit v1.2.3 From 9bd3a99f20ff6e73f5ea2245a21a94c5882ca673 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 28 Feb 2017 18:34:18 +0200 Subject: MAINT-908 Build Tool has wrong screen priority and can stay behind other floaters when called --- indra/newview/llviewermenu.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index a92ecd2036..605d1a04e6 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -8402,6 +8402,15 @@ class LLToolsSelectTool : public view_listener_t { LLToolMgr::getInstance()->getCurrentToolset()->selectToolByIndex(5); } + + // Note: if floater is not visible LLViewerWindow::updateLayout() will + // attempt to open it, but it won't bring it to front or de-minimize. + if (gFloaterTools && (gFloaterTools->isMinimized() || !gFloaterTools->isShown() || !gFloaterTools->isFrontmost())) + { + gFloaterTools->setMinimized(FALSE); + gFloaterTools->openFloater(); + gFloaterTools->setVisibleAndFrontmost(TRUE); + } return true; } }; -- cgit v1.2.3 From b4c4a951c161e43bf66141248f0c94b97848ae98 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 1 Mar 2017 17:53:26 +0200 Subject: MAINT-3604 Extend llTextBox message lines according to it's length --- indra/newview/lltoastscripttextbox.cpp | 57 +++++++++------- indra/newview/lltoastscripttextbox.h | 3 + .../skins/default/xui/en/panel_notify_textbox.xml | 78 ++++++++++++---------- 3 files changed, 79 insertions(+), 59 deletions(-) diff --git a/indra/newview/lltoastscripttextbox.cpp b/indra/newview/lltoastscripttextbox.cpp index 78d9e92b5c..776ae2ece9 100644 --- a/indra/newview/lltoastscripttextbox.cpp +++ b/indra/newview/lltoastscripttextbox.cpp @@ -28,31 +28,21 @@ #include "lltoastscripttextbox.h" -#include "llfocusmgr.h" - -#include "llbutton.h" +#include "lllslconstants.h" #include "llnotifications.h" -#include "llviewertexteditor.h" - -#include "llavatarnamecache.h" -#include "lluiconstants.h" -#include "llui.h" -#include "llviewercontrol.h" -#include "lltrans.h" #include "llstyle.h" +#include "lluiconstants.h" +#include "llviewertexteditor.h" -#include "llglheaders.h" -#include "llagent.h" - -const S32 LLToastScriptTextbox::DEFAULT_MESSAGE_MAX_LINE_COUNT= 7; +const S32 LLToastScriptTextbox::DEFAULT_MESSAGE_MAX_LINE_COUNT= 14; LLToastScriptTextbox::LLToastScriptTextbox(const LLNotificationPtr& notification) : LLToastPanel(notification) { buildFromFile( "panel_notify_textbox.xml"); - LLTextEditor* text_editorp = getChild("text_editor_box"); - text_editorp->setValue(notification->getMessage()); + mInfoText = getChild("text_editor_box"); + mInfoText->setValue(notification->getMessage()); getChild("ignore_btn")->setClickedCallback(boost::bind(&LLToastScriptTextbox::onClickIgnore, this)); @@ -73,13 +63,7 @@ LLToastScriptTextbox::LLToastScriptTextbox(const LLNotificationPtr& notification pSubmitBtn->setClickedCallback((boost::bind(&LLToastScriptTextbox::onClickSubmit, this))); setDefaultBtn(pSubmitBtn); - S32 maxLinesCount; - std::istringstream ss( getString("message_max_lines_count") ); - if (!(ss >> maxLinesCount)) - { - maxLinesCount = DEFAULT_MESSAGE_MAX_LINE_COUNT; - } - //snapToMessageHeight(pMessageText, maxLinesCount); + snapToMessageHeight(); } // virtual @@ -92,7 +76,6 @@ void LLToastScriptTextbox::close() die(); } -#include "lllslconstants.h" void LLToastScriptTextbox::onClickSubmit() { LLViewerTextEditor* pMessageText = getChild("message"); @@ -119,3 +102,29 @@ void LLToastScriptTextbox::onClickIgnore() mNotification->respond(response); close(); } + +void LLToastScriptTextbox::snapToMessageHeight() +{ + LLPanel* info_pan = getChild("info_panel"); + if (!info_pan) + { + return; + } + + S32 maxLinesCount; + std::istringstream ss( getString("message_max_lines_count") ); + if (!(ss >> maxLinesCount)) + { + maxLinesCount = DEFAULT_MESSAGE_MAX_LINE_COUNT; + } + + + S32 maxTextHeight = (mInfoText->getFont()->getLineHeight() * maxLinesCount); + S32 oldTextHeight = mInfoText->getRect().getHeight(); + S32 newTextHeight = llmin(mInfoText->getTextBoundingRect().getHeight(), maxTextHeight); + + S32 heightDelta = newTextHeight - oldTextHeight; + + reshape( getRect().getWidth(), llmax(getRect().getHeight() + heightDelta, MIN_PANEL_HEIGHT)); + info_pan->reshape(info_pan->getRect().getWidth(),newTextHeight); +} diff --git a/indra/newview/lltoastscripttextbox.h b/indra/newview/lltoastscripttextbox.h index 7d33446248..7aee02dd00 100644 --- a/indra/newview/lltoastscripttextbox.h +++ b/indra/newview/lltoastscripttextbox.h @@ -48,9 +48,12 @@ public: private: + LLTextBox* mInfoText; + void onClickSubmit(); void onClickIgnore(); + void snapToMessageHeight(); static const S32 DEFAULT_MESSAGE_MAX_LINE_COUNT; }; diff --git a/indra/newview/skins/default/xui/en/panel_notify_textbox.xml b/indra/newview/skins/default/xui/en/panel_notify_textbox.xml index d5b6057233..a679ca7f8c 100644 --- a/indra/newview/skins/default/xui/en/panel_notify_textbox.xml +++ b/indra/newview/skins/default/xui/en/panel_notify_textbox.xml @@ -1,7 +1,7 @@ + value="14" /> - + - + - + left="0" + name="textbox_panel" + top_pad="5" + width="305"> + + + top_pad="5"> -- cgit v1.2.3 From 26d81d3d6cc56f8f8df9f33ff27229671fb8a2db Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 15 Mar 2017 16:01:39 +0200 Subject: MAINT-7199 Field "From" on the tab "Send via E-mail" should be initialized to the agent full name --- indra/newview/llpanelsnapshotpostcard.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/indra/newview/llpanelsnapshotpostcard.cpp b/indra/newview/llpanelsnapshotpostcard.cpp index ebf9153da9..3d18e837af 100644 --- a/indra/newview/llpanelsnapshotpostcard.cpp +++ b/indra/newview/llpanelsnapshotpostcard.cpp @@ -106,6 +106,14 @@ BOOL LLPanelSnapshotPostcard::postBuild() // virtual void LLPanelSnapshotPostcard::onOpen(const LLSD& key) { + LLUICtrl* name_form = getChild("name_form"); + if (name_form && name_form->getValue().asString().empty()) + { + std::string name_string; + LLAgentUI::buildFullname(name_string); + getChild("name_form")->setValue(LLSD(name_string)); + } + LLPanelSnapshot::onOpen(key); } -- cgit v1.2.3 From bdecc9cce982ab35ce1d74444515f536e66d4356 Mon Sep 17 00:00:00 2001 From: "callum@lindenlab.com" Date: Wed, 15 Mar 2017 16:33:51 -0700 Subject: Next part of the 'SL-641 Update CEF -> cef-bin -> Dullahan -> p64_3p-Dullahan -> media_plugin_cef.cpp to current latest version' puzzle - fix @rpath/@executable paths for macOS --- indra/newview/viewer_manifest.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 3dd44fb19e..3a8cd0c626 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -867,11 +867,9 @@ class DarwinManifest(ViewerManifest): self.end_prefix() - # the helper app needs to have it's @executable_path modified to point to the - # same location we drop the CEF framework shortcut helperexecutablepath = self.dst_path_of('SLPlugin.app/Contents/Frameworks/DullahanHelper.app/Contents/MacOS/DullahanHelper') self.run_command('install_name_tool -change ' - '"@executable_path/Chromium Embedded Framework" ' + '"@rpath/Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" ' '"@executable_path/Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" "%s"' % helperexecutablepath) # SLPlugin plugins @@ -896,6 +894,12 @@ class DarwinManifest(ViewerManifest): self.end_prefix("llplugin") + # do this install_name_tool *after* media plugin is copied over + dylibexecutablepath = self.dst_path_of('llplugin/media_plugin_cef.dylib') + self.run_command('install_name_tool -change ' + '"@rpath/Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" ' + '"@executable_path/../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" "%s"' % dylibexecutablepath) + self.end_prefix("Resources") # CEF framework goes inside Second Life.app/Contents/Frameworks -- cgit v1.2.3 From bc268526b742068027da960c53815b7891bf45c7 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 16 Mar 2017 17:34:47 +0200 Subject: MAINT-7208 Some messages had links that were not highlighted --- indra/newview/skins/default/xui/en/floater_tos.xml | 2 +- indra/newview/skins/default/xui/en/strings.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/skins/default/xui/en/floater_tos.xml b/indra/newview/skins/default/xui/en/floater_tos.xml index 590d9d1844..612c894b59 100644 --- a/indra/newview/skins/default/xui/en/floater_tos.xml +++ b/indra/newview/skins/default/xui/en/floater_tos.xml @@ -70,7 +70,7 @@ top="32" word_wrap="true" width="552"> - You will need to go to my.secondlife.com and log in to accept the Terms of Service before you can proceed. Thank you! + You will need to go to https://my.secondlife.com and log in to accept the Terms of Service before you can proceed. Thank you! Despite our best efforts, something unexpected has gone wrong. -Please check status.secondlifegrid.net to see if there is a known problem with the service. +Please check http://status.secondlifegrid.net to see if there is a known problem with the service. If you continue to experience problems, please check your network and firewall setup. -- cgit v1.2.3 From 3c637e49452229e8df3cce833a275daaef650d9c Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Fri, 17 Mar 2017 10:18:31 +0200 Subject: MAINT-7215 Add "+" button next to filter editor in Avatar rendering settings floater --- indra/newview/llfloateravatarrendersettings.cpp | 61 ++++++++++++++++++++-- indra/newview/llfloateravatarrendersettings.h | 4 ++ .../xui/en/floater_avatar_render_settings.xml | 21 ++++++-- .../xui/en/menu_avatar_rendering_settings_add.xml | 18 +++++++ .../default/xui/en/panel_preferences_graphics1.xml | 2 - 5 files changed, 94 insertions(+), 12 deletions(-) create mode 100644 indra/newview/skins/default/xui/en/menu_avatar_rendering_settings_add.xml diff --git a/indra/newview/llfloateravatarrendersettings.cpp b/indra/newview/llfloateravatarrendersettings.cpp index 530b3bd481..e7ac3f2737 100644 --- a/indra/newview/llfloateravatarrendersettings.cpp +++ b/indra/newview/llfloateravatarrendersettings.cpp @@ -28,6 +28,7 @@ #include "llfloateravatarrendersettings.h" #include "llavatarnamecache.h" +#include "llfloateravatarpicker.h" #include "llfiltereditor.h" #include "llfloaterreg.h" #include "llnamelistctrl.h" @@ -71,6 +72,7 @@ LLFloaterAvatarRenderSettings::LLFloaterAvatarRenderSettings(const LLSD& key) { mContextMenu = new LLSettingsContextMenu(this); LLRenderMuteList::getInstance()->addObserver(&sAvatarRenderMuteListObserver); + mCommitCallbackRegistrar.add("Settings.AddNewEntry", boost::bind(&LLFloaterAvatarRenderSettings::onClickAdd, this, _2)); } LLFloaterAvatarRenderSettings::~LLFloaterAvatarRenderSettings() @@ -84,12 +86,20 @@ BOOL LLFloaterAvatarRenderSettings::postBuild() LLFloater::postBuild(); mAvatarSettingsList = getChild("render_settings_list"); mAvatarSettingsList->setRightMouseDownCallback(boost::bind(&LLFloaterAvatarRenderSettings::onAvatarListRightClick, this, _1, _2, _3)); - + this->setVisibleCallback(boost::bind(&LLFloaterAvatarRenderSettings::removePicker, this)); getChild("people_filter_input")->setCommitCallback(boost::bind(&LLFloaterAvatarRenderSettings::onFilterEdit, this, _2)); return TRUE; } +void LLFloaterAvatarRenderSettings::removePicker() +{ + if(mPicker.get()) + { + mPicker.get()->closeFloater(); + } +} + void LLFloaterAvatarRenderSettings::draw() { if(mNeedsUpdate) @@ -185,15 +195,15 @@ void LLFloaterAvatarRenderSettings::onCustomAction (const LLSD& userdata, const if ("default" == command_name) { new_setting = S32(LLVOAvatar::AV_RENDER_NORMALLY); - } + } else if ("never" == command_name) - { + { new_setting = S32(LLVOAvatar::AV_DO_NOT_RENDER); } else if ("always" == command_name) - { + { new_setting = S32(LLVOAvatar::AV_ALWAYS_RENDER); - } + } LLVOAvatar *avatarp = find_avatar(av_id); if (avatarp) @@ -233,3 +243,44 @@ void LLFloaterAvatarRenderSettings::setNeedsUpdate() if(!instance) return; instance->mNeedsUpdate = true; } + +void LLFloaterAvatarRenderSettings::onClickAdd(const LLSD& userdata) +{ + const std::string command_name = userdata.asString(); + S32 visual_setting = 0; + if ("never" == command_name) + { + visual_setting = S32(LLVOAvatar::AV_DO_NOT_RENDER); + } + else if ("always" == command_name) + { + visual_setting = S32(LLVOAvatar::AV_ALWAYS_RENDER); + } + + LLView * button = findChild("plus_btn", TRUE); + LLFloater* root_floater = gFloaterView->getParentFloater(this); + LLFloaterAvatarPicker * picker = LLFloaterAvatarPicker::show(boost::bind(&LLFloaterAvatarRenderSettings::callbackAvatarPicked, this, _1, visual_setting), + FALSE, TRUE, FALSE, root_floater->getName(), button); + + if (root_floater) + { + root_floater->addDependentFloater(picker); + } + + mPicker = picker->getHandle(); +} + +void LLFloaterAvatarRenderSettings::callbackAvatarPicked(const uuid_vec_t& ids, S32 visual_setting) +{ + if (ids.empty()) return; + + LLVOAvatar *avatarp = find_avatar(ids[0]); + if (avatarp) + { + avatarp->setVisualMuteSettings(LLVOAvatar::VisualMuteSettings(visual_setting)); + } + else + { + LLRenderMuteList::getInstance()->saveVisualMuteSetting(ids[0], visual_setting); + } +} diff --git a/indra/newview/llfloateravatarrendersettings.h b/indra/newview/llfloateravatarrendersettings.h index 367b0620ac..fe727bcf32 100644 --- a/indra/newview/llfloateravatarrendersettings.h +++ b/indra/newview/llfloateravatarrendersettings.h @@ -50,15 +50,19 @@ public: void onFilterEdit(const std::string& search_string); void onCustomAction (const LLSD& userdata, const LLUUID& av_id); bool isActionChecked(const LLSD& userdata, const LLUUID& av_id); + void onClickAdd(const LLSD& userdata); static void setNeedsUpdate(); private: bool isHiddenRow(const std::string& av_name); + void callbackAvatarPicked(const uuid_vec_t& ids, S32 visual_setting); + void removePicker(); bool mNeedsUpdate; LLListContextMenu* mContextMenu; LLNameListCtrl* mAvatarSettingsList; + LLHandle mPicker; std::string mNameFilter; }; diff --git a/indra/newview/skins/default/xui/en/floater_avatar_render_settings.xml b/indra/newview/skins/default/xui/en/floater_avatar_render_settings.xml index dd37e329e5..03e812d36d 100644 --- a/indra/newview/skins/default/xui/en/floater_avatar_render_settings.xml +++ b/indra/newview/skins/default/xui/en/floater_avatar_render_settings.xml @@ -23,22 +23,33 @@ height="23" layout="topleft" left="8" - right="-8" + right="-47" label="Filter People" max_length_chars="300" name="people_filter_input" text_color="Black" text_pad_left="10" top="4" /> + + + + + + + + + diff --git a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml index 652b7fd029..4692a226d9 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml @@ -303,8 +303,6 @@ name="AlwaysRenderFriends" top_delta="24" width="256"> -