From 4a2dceff49983d203f2458d6f4ea39e87aa35ba5 Mon Sep 17 00:00:00 2001 From: Lis Linden Date: Wed, 13 Jan 2010 16:24:26 -0500 Subject: EXT-3027 About Land dialog: Media panel layout issues --- .../skins/default/xui/en/floater_about_land.xml | 213 +++++++++++---------- 1 file changed, 117 insertions(+), 96 deletions(-) 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 33fdd923ad..f68e0c239f 100644 --- a/indra/newview/skins/default/xui/en/floater_about_land.xml +++ b/indra/newview/skins/default/xui/en/floater_about_land.xml @@ -209,7 +209,7 @@ + diff --git a/indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml b/indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml index 1dd4eb095c..ab3cc036d5 100644 --- a/indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml +++ b/indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml @@ -4,7 +4,6 @@ follows="all" height="570" min_height="350" - label="home_tab" help_topic="sidetray_home" layout="topleft" top="0" -- cgit v1.2.3 From 3b55ac4fbbee79533ce5952d326dad3ec071dd8b Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Thu, 14 Jan 2010 16:35:33 -0800 Subject: Fix for EXT-4207 (Viewer crash clicking on an object that starts a script that navigates in a while(1) loop) Don't allow LLViewerMediaImpl to process a navigateInternal during the call to LLPluginClassMedia::idle(). This prevents untimely destruction of the LLPluginClassMedia and LLPluginMessagePipe objects, which was causing the crash. Reviewed by Rick. --- indra/newview/llviewermedia.cpp | 36 ++++++++++++++++++++++++++++++++++++ indra/newview/llviewermedia.h | 5 +++++ 2 files changed, 41 insertions(+) diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 023c288d92..1d07b5d489 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -1006,6 +1006,8 @@ LLViewerMediaImpl::LLViewerMediaImpl( const LLUUID& texture_id, mInNearbyMediaList(false), mClearCache(false), mBackgroundColor(LLColor4::white), + mNavigateSuspended(false), + mNavigateSuspendedDeferred(false), mIsUpdated(false) { @@ -1696,6 +1698,13 @@ void LLViewerMediaImpl::navigateInternal() // Helpful to have media urls in log file. Shouldn't be spammy. llinfos << "media id= " << mTextureId << " url=" << mMediaURL << " mime_type=" << mMimeType << llendl; + if(mNavigateSuspended) + { + llwarns << "Deferring navigate." << llendl; + mNavigateSuspendedDeferred = true; + return; + } + if(mMimeTypeProbe != NULL) { llwarns << "MIME type probe already in progress -- bailing out." << llendl; @@ -1902,7 +1911,17 @@ void LLViewerMediaImpl::update() return; } + // Make sure a navigate doesn't happen during the idle -- it can cause mMediaSource to get destroyed, which can cause a crash. + setNavigateSuspended(true); + mMediaSource->idle(); + + setNavigateSuspended(false); + + if(mMediaSource == NULL) + { + return; + } if(mMediaSource->isPluginExited()) { @@ -2559,6 +2578,23 @@ void LLViewerMediaImpl::setNavState(EMediaNavState state) } } +void LLViewerMediaImpl::setNavigateSuspended(bool suspend) +{ + if(mNavigateSuspended != suspend) + { + mNavigateSuspended = suspend; + if(!suspend) + { + // We're coming out of suspend. If someone tried to do a navigate while suspended, do one now instead. + if(mNavigateSuspendedDeferred) + { + mNavigateSuspendedDeferred = false; + navigateInternal(); + } + } + } +} + void LLViewerMediaImpl::cancelMimeTypeProbe() { if(mMimeTypeProbe != NULL) diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index 8a5cd804aa..668f3b563d 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -326,6 +326,9 @@ public: EMediaNavState getNavState() { return mMediaNavState; } void setNavState(EMediaNavState state); + void setNavigateSuspended(bool suspend); + bool isNavigateSuspended() { return mNavigateSuspended; }; + void cancelMimeTypeProbe(); private: // a single media url with some data and an impl. @@ -372,6 +375,8 @@ private: bool mInNearbyMediaList; // used by LLFloaterNearbyMedia::refreshList() for performance reasons bool mClearCache; LLColor4 mBackgroundColor; + bool mNavigateSuspended; + bool mNavigateSuspendedDeferred; private: BOOL mIsUpdated ; -- cgit v1.2.3 From 30c5d4477c3b731a50039850c7fcb52e9a59f32d Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Fri, 15 Jan 2010 00:39:16 +0000 Subject: EXT-4340: Fixed and re-enabled the llviewerhelputil unit test. --- indra/newview/CMakeLists.txt | 2 +- indra/newview/tests/llviewerhelputil_test.cpp | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 923d4a52d3..b44f1a5c6c 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1770,8 +1770,8 @@ else (LL_TESTS) lldateutil.cpp llmediadataclient.cpp lllogininstance.cpp + llviewerhelputil.cpp ) - # DISABLED TEST: llviewerhelputil.cpp /* not testing anything useful and hard to mock LLAgent dependency */ ################################################## # DISABLING PRECOMPILED HEADERS USAGE FOR TESTS diff --git a/indra/newview/tests/llviewerhelputil_test.cpp b/indra/newview/tests/llviewerhelputil_test.cpp index ec612c4606..d7dd199722 100644 --- a/indra/newview/tests/llviewerhelputil_test.cpp +++ b/indra/newview/tests/llviewerhelputil_test.cpp @@ -78,9 +78,21 @@ static void substitute_string(std::string &input, const std::string &search, con } } +class LLAgent +{ +public: + LLAgent() {} + ~LLAgent() {} + BOOL isGodlike() const { return FALSE; } +private: + int dummy; +}; +LLAgent gAgent; + std::string LLWeb::expandURLSubstitutions(const std::string &url, const LLSD &default_subs) { + (void)gAgent.isGodlike(); // ref symbol to stop compiler from stripping it std::string new_url = url; substitute_string(new_url, "[TOPIC]", default_subs["TOPIC"].asString()); substitute_string(new_url, "[VERSION]", gVersion); @@ -91,6 +103,7 @@ std::string LLWeb::expandURLSubstitutions(const std::string &url, return new_url; } + //---------------------------------------------------------------------------- namespace tut -- cgit v1.2.3 From 04f1a83b2e0517fb9f3730a31941d79adf603059 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Thu, 14 Jan 2010 19:44:07 -0500 Subject: EXT-3955 : [ AppearanceSP ] "Add to Current Outfit" confusing for outfits, remove it Removed "Add to Current Outfit" from right-click outfits context menu. --- indra/newview/llinventorybridge.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 20d7f5214b..6e72a7a4f7 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -2448,7 +2448,7 @@ void LLFolderBridge::folderOptionsMenu() const LLInventoryCategory* category = model->getCategory(mUUID); LLFolderType::EType type = category->getPreferredType(); - const bool is_default_folder = category && LLFolderType::lookupIsProtectedType(type); + const bool is_system_folder = category && LLFolderType::lookupIsProtectedType(type); // BAP change once we're no longer treating regular categories as ensembles. const bool is_ensemble = category && (type == LLFolderType::FT_NONE || LLFolderType::lookupIsEnsembleType(type)); @@ -2462,8 +2462,8 @@ void LLFolderBridge::folderOptionsMenu() mItems.push_back("Delete"); } - // Only enable calling-card related options for non-default folders. - if (!is_sidepanel && !is_default_folder) + // Only enable calling-card related options for non-system folders. + if (!is_sidepanel && !is_system_folder) { LLIsType is_callingcard(LLAssetType::AT_CALLINGCARD); if (mCallingCards || checkFolderForContentsOfType(model, is_callingcard)) @@ -2497,10 +2497,14 @@ void LLFolderBridge::folderOptionsMenu() mItems.push_back(std::string("Folder Wearables Separator")); } - // Only enable add/replace outfit for non-default folders. - if (!is_default_folder) + // Only enable add/replace outfit for non-system folders. + if (!is_system_folder) { - mItems.push_back(std::string("Add To Outfit")); + // Adding an outfit onto another (versus replacing) doesn't make sense. + if (type != LLFolderType::FT_OUTFIT) + { + mItems.push_back(std::string("Add To Outfit")); + } mItems.push_back(std::string("Replace Outfit")); } if (is_ensemble) -- cgit v1.2.3 From f16d357b3b8965c1d8c59a0e4050d331ef77080b Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Thu, 14 Jan 2010 20:26:36 -0500 Subject: EXT-4271 : Remove "LLInventoryModel::accountForUpdate accounted..." spam Took out llinfos spam. --- indra/newview/llinventorymodel.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index a468a9a95c..c603af9166 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -1994,9 +1994,9 @@ void LLInventoryModel::accountForUpdate(const LLCategoryUpdate& update) const descendents_actual += update.mDescendentDelta; cat->setDescendentCount(descendents_actual); cat->setVersion(++version); - llinfos << "accounted: '" << cat->getName() << "' " - << version << " with " << descendents_actual - << " descendents." << llendl; + lldebugs << "accounted: '" << cat->getName() << "' " + << version << " with " << descendents_actual + << " descendents." << llendl; } } if(!accounted) -- cgit v1.2.3 From 6d8081cebf629c31efce4d5eb71360c1bd259721 Mon Sep 17 00:00:00 2001 From: Erica Date: Thu, 14 Jan 2010 18:35:32 -0800 Subject: Beacon arrow art now appears clickable --- .../skins/default/textures/world/BeaconArrow.png | Bin 1072 -> 1965 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/indra/newview/skins/default/textures/world/BeaconArrow.png b/indra/newview/skins/default/textures/world/BeaconArrow.png index d6b3077b11..12dc246d51 100644 Binary files a/indra/newview/skins/default/textures/world/BeaconArrow.png and b/indra/newview/skins/default/textures/world/BeaconArrow.png differ -- cgit v1.2.3 From 30a47979a13af8d6c3e89ce5dddb5d7c37011012 Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Fri, 15 Jan 2010 09:43:27 +0000 Subject: EXT-3976: Re-enabled all newview unit tests. These were turned off by change 0db87c1f22a9, but I'm assuming this was done in error as the tests compile and run fine and the commit message made no mention or reason for turning them off. --- indra/newview/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index b44f1a5c6c..958b9521fa 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1761,7 +1761,6 @@ if (INSTALL) endif (INSTALL) if (LL_TESTS) -else (LL_TESTS) # To add a viewer unit test, just add the test .cpp file below # This creates a separate test project per file listed. include(LLAddBuildTest) -- cgit v1.2.3 From c6108f0fadd54a60c8bbeecb3f3604073a934c73 Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Fri, 15 Jan 2010 11:07:37 +0000 Subject: EXT-4125: Regexes hurt my head! Updated the regex to match a free URL in plain text with no http: protocol. This now explicitly does not match e-mail addresses, such as test@lindenlab.com (yay negative lookbehind regexes). It additionally matches URLs with a port or path after it, e.g., secondlife.com/status. I've added a bunch more unit tests to asset positive and negative matches for this regex, because no human can do this in their head. --- indra/llui/llurlentry.cpp | 2 +- indra/llui/tests/llurlentry_test.cpp | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index 1b6dd1b264..4927e57a52 100644 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -204,7 +204,7 @@ LLUrlEntryHTTPNoProtocol::LLUrlEntryHTTPNoProtocol() mPattern = boost::regex("(" "\\bwww\\.\\S+\\.\\S+" // i.e. www.FOO.BAR "|" // or - "\\b[^ \\t\\n\\r\\f\\v:/]+\\.(?:com|net|edu|org)[^[:space:][:alnum:]]*\\>" // i.e. FOO.net + "(? Date: Fri, 15 Jan 2010 12:37:56 +0000 Subject: EXT-4233: Display "?" button on torn-off floaters. This involved tracking the torn-off state of a floater, which we apparently weren't doing before. Also, making sure that we update the title bar buttons when the floater changes torn-off state. --- indra/llui/llfloater.cpp | 6 ++++-- indra/llui/llfloater.h | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index a17e306325..980cd2abd7 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -233,6 +233,7 @@ LLFloater::LLFloater(const LLSD& key, const LLFloater::Params& p) mAutoFocus(TRUE), // automatically take focus when opened mCanDock(false), mDocked(false), + mTornOff(false), mHasBeenDraggedWhileMinimized(FALSE), mPreviousMinimizedBottom(0), mPreviousMinimizedLeft(0) @@ -1456,6 +1457,7 @@ void LLFloater::onClickTearOff(LLFloater* self) } self->setTornOff(false); } + self->updateButtons(); } // static @@ -1748,8 +1750,8 @@ void LLFloater::updateButtons() if (i == BUTTON_HELP) { // don't show the help button if the floater is minimized - // or if it is a tear-off hosted floater - if (isMinimized() || mButtonsEnabled[BUTTON_TEAR_OFF]) + // or if it is a docked tear-off floater + if (isMinimized() || (mButtonsEnabled[BUTTON_TEAR_OFF] && ! mTornOff)) { enabled = false; } diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h index daf558de24..f70495c0f0 100644 --- a/indra/llui/llfloater.h +++ b/indra/llui/llfloater.h @@ -256,7 +256,7 @@ public: bool isDocked() const { return mDocked; } virtual void setDocked(bool docked, bool pop_on_undock = true); - virtual void setTornOff(bool torn_off) {} + virtual void setTornOff(bool torn_off) { mTornOff = torn_off; } // Return a closeable floater, if any, given the current focus. static LLFloater* getClosableFloaterFromFocus(); @@ -387,6 +387,7 @@ private: bool mCanDock; bool mDocked; + bool mTornOff; static LLMultiFloater* sHostp; static BOOL sQuitting; -- cgit v1.2.3 From eb560796faaac95609edb90b19b3e08299f730eb Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Fri, 15 Jan 2010 13:19:51 +0000 Subject: EXT-3836: Don't show "?" button in script-generated dialogs. --- indra/newview/skins/default/xui/en/floater_script.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en/floater_script.xml b/indra/newview/skins/default/xui/en/floater_script.xml index f44ba6d873..c3e974d978 100644 --- a/indra/newview/skins/default/xui/en/floater_script.xml +++ b/indra/newview/skins/default/xui/en/floater_script.xml @@ -7,7 +7,6 @@ layout="topleft" left="0" name="script_floater" - help_topic="script_floater" top="0" can_dock="true" can_minimize="true" -- cgit v1.2.3 From 5c09d482a47a8894ebebc9d3c8053b25a280f58e Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Fri, 15 Jan 2010 18:01:31 +0000 Subject: EXT-4148 EXT-4230: Lots of help ID updates. Updated the logic of the help ID detection to search sub-panels before searching active tabs. For some reason, certain tabs are still visible and active even though they are not being displayed on screen. I also removed a bunch of help IDs for button panels that just confuse things. Also went through all of the side panel tabs and added new help IDs where appropriate. These are: profile_classified_info profile_edit_classified profile_pick_info profile_edit_pick my_inventory_tab recent_inventory_tab --- indra/llui/lluictrl.cpp | 16 ++++++++-------- .../skins/default/xui/en/panel_classified_info.xml | 1 + .../skins/default/xui/en/panel_edit_classified.xml | 1 + indra/newview/skins/default/xui/en/panel_edit_pick.xml | 1 + .../skins/default/xui/en/panel_main_inventory.xml | 2 ++ indra/newview/skins/default/xui/en/panel_pick_info.xml | 1 + indra/newview/skins/default/xui/en/panel_picks.xml | 1 - .../newview/skins/default/xui/en/sidepanel_inventory.xml | 1 - .../newview/skins/default/xui/en/sidepanel_item_info.xml | 3 +-- .../newview/skins/default/xui/en/sidepanel_task_info.xml | 3 +-- 10 files changed, 16 insertions(+), 14 deletions(-) diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp index f016c0af89..3ade46d367 100644 --- a/indra/llui/lluictrl.cpp +++ b/indra/llui/lluictrl.cpp @@ -868,14 +868,6 @@ bool LLUICtrl::findHelpTopic(std::string& help_topic_out) if (panel) { - // does the panel have an active tab with a help topic? - LLPanel *tab = panel->childGetVisibleTabWithHelp(); - if (tab) - { - help_topic_out = tab->getHelpTopic(); - return true; // success (tab) - } - // does the panel have a sub-panel with a help topic? LLPanel *subpanel = panel->childGetVisiblePanelWithHelp(); if (subpanel) @@ -884,6 +876,14 @@ bool LLUICtrl::findHelpTopic(std::string& help_topic_out) return true; // success (subpanel) } + // does the panel have an active tab with a help topic? + LLPanel *tab = panel->childGetVisibleTabWithHelp(); + if (tab) + { + help_topic_out = tab->getHelpTopic(); + return true; // success (tab) + } + // otherwise, does the panel have a help topic itself? if (!panel->getHelpTopic().empty()) { diff --git a/indra/newview/skins/default/xui/en/panel_classified_info.xml b/indra/newview/skins/default/xui/en/panel_classified_info.xml index 5c594d3f14..677bdbc3d2 100644 --- a/indra/newview/skins/default/xui/en/panel_classified_info.xml +++ b/indra/newview/skins/default/xui/en/panel_classified_info.xml @@ -7,6 +7,7 @@ left="0" min_height="350" name="panel_classified_info" + help_topic="profile_classified_info" top="0" width="333">