From 8ab943f470552dd9469d6025bcd359a67ad5513e Mon Sep 17 00:00:00 2001 From: "Andrew A. de Laix" Date: Fri, 10 Dec 2010 15:41:14 -0800 Subject: fix working directory in install script and remove dependency on open option --args which is 10.6 only. Also fix erroneous check in process launcher which was mistakenly reporting a failed execution of the new updater script. --- indra/llcommon/llprocesslauncher.cpp | 9 +-------- indra/viewer_components/updater/scripts/darwin/update_install | 3 ++- 2 files changed, 3 insertions(+), 9 deletions(-) (limited to 'indra') diff --git a/indra/llcommon/llprocesslauncher.cpp b/indra/llcommon/llprocesslauncher.cpp index 81e5f8820d..4b0f6b0251 100644 --- a/indra/llcommon/llprocesslauncher.cpp +++ b/indra/llcommon/llprocesslauncher.cpp @@ -265,14 +265,7 @@ int LLProcessLauncher::launch(void) delete[] fake_argv; mProcessID = id; - - // At this point, the child process will have been created (since that's how vfork works -- the child borrowed our execution context until it forked) - // If the process doesn't exist at this point, the exec failed. - if(!isRunning()) - { - result = -1; - } - + return result; } diff --git a/indra/viewer_components/updater/scripts/darwin/update_install b/indra/viewer_components/updater/scripts/darwin/update_install index b174b3570a..bfc12ada11 100755 --- a/indra/viewer_components/updater/scripts/darwin/update_install +++ b/indra/viewer_components/updater/scripts/darwin/update_install @@ -5,5 +5,6 @@ # to a marker file which should be created if the installer fails.q # -open ../Resources/mac-updater.app --args -dmg "$1" -name "Second Life Viewer 2" -marker "$2" +cd "$(dirname $0)" +../Resources/mac-updater.app/Contents/MacOS/mac-updater -dmg "$1" -name "Second Life Viewer 2" -marker "$2" & exit 0 -- cgit v1.2.3 From ac2253abc430093ae15708bfb582448fb36c00ed Mon Sep 17 00:00:00 2001 From: "Andrew A. de Laix" Date: Fri, 10 Dec 2010 16:11:16 -0800 Subject: fix quoting in script to work with spaces in directory names. --- indra/viewer_components/updater/scripts/darwin/update_install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/viewer_components/updater/scripts/darwin/update_install b/indra/viewer_components/updater/scripts/darwin/update_install index bfc12ada11..9df382f119 100755 --- a/indra/viewer_components/updater/scripts/darwin/update_install +++ b/indra/viewer_components/updater/scripts/darwin/update_install @@ -5,6 +5,6 @@ # to a marker file which should be created if the installer fails.q # -cd "$(dirname $0)" +cd "$(dirname "$0")" ../Resources/mac-updater.app/Contents/MacOS/mac-updater -dmg "$1" -name "Second Life Viewer 2" -marker "$2" & exit 0 -- cgit v1.2.3 From 4f9e6ff2ffcd3c277399d35e5765b8525b3e1b53 Mon Sep 17 00:00:00 2001 From: brad kittenbrink Date: Fri, 10 Dec 2010 17:27:17 -0800 Subject: Defensive coding for linux updater script for consistency with alain's work on the mac script. Should be safer if the user is installing to a path with spaces in it. --- indra/viewer_components/updater/scripts/linux/update_install | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/viewer_components/updater/scripts/linux/update_install b/indra/viewer_components/updater/scripts/linux/update_install index fef5ef7d09..a271926e25 100755 --- a/indra/viewer_components/updater/scripts/linux/update_install +++ b/indra/viewer_components/updater/scripts/linux/update_install @@ -1,10 +1,10 @@ #! /bin/bash -INSTALL_DIR=$(cd "$(dirname $0)/.." ; pwd) -export LD_LIBRARY_PATH=$INSTALL_DIR/lib +INSTALL_DIR=$(cd "$(dirname "$0")/.." ; pwd) +export LD_LIBRARY_PATH="$INSTALL_DIR/lib" bin/linux-updater.bin --file "$1" --dest "$INSTALL_DIR" --name "Second Life Viewer 2" --stringsdir "$INSTALL_DIR/skins/default/xui/en" --stringsfile "strings.xml" if [ $? -ne 0 ] - then touch $2 + then touch "$2" fi -rm -f $1 +rm -f "$1" -- cgit v1.2.3 From 27f3470b7ecff97e5e7798a3cf120260c209fc42 Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Wed, 15 Dec 2010 15:44:06 +0200 Subject: STORM-786 FIXED Fixed disappearing controls in avatar picks list. Caused by an improper fix of STORM-690. Made the way we switch between profile view panels (profile view / pick_info / pick_edit) more robust. It now suits both My Profile and Profile View panels. --- indra/newview/llpanelprofile.cpp | 126 +++++++++++++++++++++++++++++++++------ indra/newview/llpanelprofile.h | 29 ++++++++- 2 files changed, 135 insertions(+), 20 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp index 6038ab20d8..f4e8392916 100644 --- a/indra/newview/llpanelprofile.cpp +++ b/indra/newview/llpanelprofile.cpp @@ -114,9 +114,102 @@ public: LLAgentHandler gAgentHandler; +//-- LLPanelProfile::ChildStack begins ---------------------------------------- +LLPanelProfile::ChildStack::ChildStack(LLPanel* parent) +: mParent(parent) +{ + llassert_always(parent != NULL); +} + +/// Save current parent's child views and remove them from the child list. +bool LLPanelProfile::ChildStack::push() +{ + view_list_t vlist = *mParent->getChildList(); + + for (view_list_t::const_iterator it = vlist.begin(); it != vlist.end(); ++it) + { + LLView* viewp = *it; + mParent->removeChild(viewp); + } + + mStack.push_back(vlist); + dump(); + return true; +} + +/// Restore saved children (adding them back to the child list). +bool LLPanelProfile::ChildStack::pop() +{ + if (mStack.size() == 0) + { + llwarns << "Empty stack" << llendl; + llassert(mStack.size() == 0); + return false; + } + + view_list_t& top = mStack.back(); + for (view_list_t::const_iterator it = top.begin(); it != top.end(); ++it) + { + LLView* viewp = *it; + mParent->addChild(viewp); + } + + mStack.pop_back(); + dump(); + return true; +} + +/// Temporarily add all saved children back. +void LLPanelProfile::ChildStack::preParentReshape() +{ + mSavedStack = mStack; + while(mStack.size() > 0) + { + pop(); + } +} + +/// Add the temporarily saved children back. +void LLPanelProfile::ChildStack::postParentReshape() +{ + mStack = mSavedStack; + mSavedStack = stack_t(); + + for (stack_t::const_iterator stack_it = mStack.begin(); stack_it != mStack.end(); ++stack_it) + { + const view_list_t& vlist = (*stack_it); + for (view_list_t::const_iterator list_it = vlist.begin(); list_it != vlist.end(); ++list_it) + { + LLView* viewp = *list_it; + lldebugs << "removing " << viewp->getName() << llendl; + mParent->removeChild(viewp); + } + } +} + +void LLPanelProfile::ChildStack::dump() +{ + unsigned lvl = 0; + lldebugs << "child stack dump:" << llendl; + for (stack_t::const_iterator stack_it = mStack.begin(); stack_it != mStack.end(); ++stack_it, ++lvl) + { + std::ostringstream dbg_line; + dbg_line << "lvl #" << lvl << ":"; + const view_list_t& vlist = (*stack_it); + for (view_list_t::const_iterator list_it = vlist.begin(); list_it != vlist.end(); ++list_it) + { + dbg_line << " " << (*list_it)->getName(); + } + lldebugs << dbg_line.str() << llendl; + } +} + +//-- LLPanelProfile::ChildStack ends ------------------------------------------ + LLPanelProfile::LLPanelProfile() : LLPanel() , mTabCtrl(NULL) + , mChildStack(this) , mAvatarId(LLUUID::null) { } @@ -136,6 +229,15 @@ BOOL LLPanelProfile::postBuild() return TRUE; } +// virtual +void LLPanelProfile::reshape(S32 width, S32 height, BOOL called_from_parent) +{ + // Temporarily add saved children back and reshape them. + mChildStack.preParentReshape(); + LLPanel::reshape(width, height, called_from_parent); + mChildStack.postParentReshape(); +} + void LLPanelProfile::onOpen(const LLSD& key) { // open the desired panel @@ -177,7 +279,6 @@ void LLPanelProfile::onOpen(const LLSD& key) } } -//*TODO redo panel toggling void LLPanelProfile::togglePanel(LLPanel* panel, const LLSD& key) { // TRUE - we need to open/expand "panel" @@ -204,21 +305,10 @@ void LLPanelProfile::onTabSelected(const LLSD& param) } } -void LLPanelProfile::setAllChildrenVisible(BOOL visible) -{ - const child_list_t* child_list = getChildList(); - child_list_const_iter_t child_it = child_list->begin(); - for (; child_it != child_list->end(); ++child_it) - { - LLView* viewp = *child_it; - viewp->setVisible(visible); - } -} - void LLPanelProfile::openPanel(LLPanel* panel, const LLSD& params) { // Hide currently visible panel (STORM-690). - setAllChildrenVisible(FALSE); + mChildStack.push(); // Add the panel or bring it to front. if (panel->getParent() != this) @@ -231,7 +321,7 @@ void LLPanelProfile::openPanel(LLPanel* panel, const LLSD& params) } panel->setVisible(TRUE); - + panel->setFocus(TRUE); // prevent losing focus by the floater panel->onOpen(params); LLRect new_rect = getRect(); @@ -249,15 +339,17 @@ void LLPanelProfile::closePanel(LLPanel* panel) removeChild(panel); // Make the underlying panel visible. + mChildStack.pop(); + + // Prevent losing focus by the floater const child_list_t* child_list = getChildList(); if (child_list->size() > 0) { - child_list->front()->setVisible(TRUE); - child_list->front()->setFocus(TRUE); // prevent losing focus by the floater + child_list->front()->setFocus(TRUE); } else { - llwarns << "No underlying panel to make visible." << llendl; + llwarns << "No underlying panel to focus." << llendl; } } } diff --git a/indra/newview/llpanelprofile.h b/indra/newview/llpanelprofile.h index d2bcee8076..577b71f284 100644 --- a/indra/newview/llpanelprofile.h +++ b/indra/newview/llpanelprofile.h @@ -41,7 +41,7 @@ class LLPanelProfile : public LLPanel public: /*virtual*/ BOOL postBuild(); - + /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); /*virtual*/ void onOpen(const LLSD& key); virtual void togglePanel(LLPanel*, const LLSD& key = LLSD()); @@ -58,8 +58,6 @@ protected: virtual void onTabSelected(const LLSD& param); - virtual void setAllChildrenVisible(BOOL visible); - LLTabContainer* getTabCtrl() { return mTabCtrl; } const LLUUID& getAvatarId() { return mAvatarId; } @@ -72,8 +70,33 @@ protected: private: + //-- ChildStack begins ---------------------------------------------------- + class ChildStack + { + LOG_CLASS(LLPanelProfile::ChildStack); + public: + ChildStack(LLPanel* parent); + + bool push(); + bool pop(); + void preParentReshape(); + void postParentReshape(); + + private: + void dump(); + + typedef LLView::child_list_t view_list_t; + typedef std::list stack_t; + + stack_t mStack; + stack_t mSavedStack; + LLPanel* mParent; + }; + //-- ChildStack ends ------------------------------------------------------ + LLTabContainer* mTabCtrl; profile_tabs_t mTabContainer; + ChildStack mChildStack; LLUUID mAvatarId; }; -- cgit v1.2.3 From 10d9328b86991272b6cbc7eda73e8f09afccfb52 Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Wed, 15 Dec 2010 16:00:37 +0200 Subject: STORM-786 ADDITIONAL FIX Fixed Windows build. --- indra/newview/llpanelprofile.cpp | 11 ++++++++--- indra/newview/llpanelprofile.h | 3 ++- 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp index f4e8392916..b035d7d473 100644 --- a/indra/newview/llpanelprofile.cpp +++ b/indra/newview/llpanelprofile.cpp @@ -115,10 +115,15 @@ LLAgentHandler gAgentHandler; //-- LLPanelProfile::ChildStack begins ---------------------------------------- -LLPanelProfile::ChildStack::ChildStack(LLPanel* parent) -: mParent(parent) +LLPanelProfile::ChildStack::ChildStack() +: mParent(NULL) +{ +} + +void LLPanelProfile::ChildStack::setParent(LLPanel* parent) { llassert_always(parent != NULL); + mParent = parent; } /// Save current parent's child views and remove them from the child list. @@ -209,9 +214,9 @@ void LLPanelProfile::ChildStack::dump() LLPanelProfile::LLPanelProfile() : LLPanel() , mTabCtrl(NULL) - , mChildStack(this) , mAvatarId(LLUUID::null) { + mChildStack.setParent(this); } BOOL LLPanelProfile::postBuild() diff --git a/indra/newview/llpanelprofile.h b/indra/newview/llpanelprofile.h index 577b71f284..0a572e6f25 100644 --- a/indra/newview/llpanelprofile.h +++ b/indra/newview/llpanelprofile.h @@ -75,7 +75,8 @@ private: { LOG_CLASS(LLPanelProfile::ChildStack); public: - ChildStack(LLPanel* parent); + ChildStack(); + void setParent(LLPanel* parent); bool push(); bool pop(); -- cgit v1.2.3 From 73962e2134035855def0177db171d8eddaa193cb Mon Sep 17 00:00:00 2001 From: Seth ProductEngine Date: Thu, 16 Dec 2010 00:50:03 +0200 Subject: STORM-771 FIXED Pasting wearable items from clipboard to Current Outfit or an outfit folder now creates links to these items. --- indra/newview/llinventorybridge.cpp | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 5ba87423c7..ab0acbae50 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -104,6 +104,7 @@ void remove_inventory_category_from_avatar_step2( BOOL proceed, LLUUID category_ bool move_task_inventory_callback(const LLSD& notification, const LLSD& response, LLMoveInv*); bool confirm_attachment_rez(const LLSD& notification, const LLSD& response); void teleport_via_landmark(const LLUUID& asset_id); +static BOOL can_move_to_outfit(LLInventoryItem* inv_item, BOOL move_is_into_current_outfit); // +=================================================+ // | LLInvFVBridge | @@ -2341,6 +2342,10 @@ void LLFolderBridge::pasteFromClipboard() LLInventoryModel* model = getInventoryModel(); if(model && isClipboardPasteable()) { + const LLUUID ¤t_outfit_id = model->findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT, false); + const BOOL move_is_into_current_outfit = (mUUID == current_outfit_id); + const BOOL move_is_into_outfit = (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT); + const LLUUID parent_id(mUUID); LLDynamicArray objects; @@ -2353,7 +2358,14 @@ void LLFolderBridge::pasteFromClipboard() LLInventoryItem *item = model->getItem(item_id); if (item) { - if(LLInventoryClipboard::instance().isCutMode()) + if (move_is_into_current_outfit || move_is_into_outfit) + { + if (can_move_to_outfit(item, move_is_into_current_outfit)) + { + dropToOutfit(item, move_is_into_current_outfit); + } + } + else if(LLInventoryClipboard::instance().isCutMode()) { // move_inventory_item() is not enough, //we have to update inventory locally too @@ -2381,9 +2393,13 @@ void LLFolderBridge::pasteFromClipboard() void LLFolderBridge::pasteLinkFromClipboard() { - const LLInventoryModel* model = getInventoryModel(); + LLInventoryModel* model = getInventoryModel(); if(model) { + const LLUUID ¤t_outfit_id = model->findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT, false); + const BOOL move_is_into_current_outfit = (mUUID == current_outfit_id); + const BOOL move_is_into_outfit = (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT); + const LLUUID parent_id(mUUID); LLDynamicArray objects; @@ -2393,7 +2409,15 @@ void LLFolderBridge::pasteLinkFromClipboard() ++iter) { const LLUUID &object_id = (*iter); - if (LLInventoryCategory *cat = model->getCategory(object_id)) + if (move_is_into_current_outfit || move_is_into_outfit) + { + LLInventoryItem *item = model->getItem(object_id); + if (item && can_move_to_outfit(item, move_is_into_current_outfit)) + { + dropToOutfit(item, move_is_into_current_outfit); + } + } + else if (LLInventoryCategory *cat = model->getCategory(object_id)) { const std::string empty_description = ""; link_inventory_item( -- cgit v1.2.3