diff --git a/doc/contributions.txt b/doc/contributions.txt index 29cb6fa152..464211418d 100755 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -829,6 +829,7 @@ Kitty Barnett MAINT-6153 MAINT-6154 MAINT-6568 + STORM-2149 Kolor Fall Komiko Okamoto Korvel Noh diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index 05735f1bfc..90bb25b6ef 100644 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -102,6 +102,18 @@ void LLCloseAllFoldersFunctor::doFolder(LLFolderViewFolder* folder) void LLCloseAllFoldersFunctor::doItem(LLFolderViewItem* item) { } +//--------------------------------------------------------------------------- + +void LLAllDescendentsPassedFilter::doFolder(LLFolderViewFolder* folder) +{ + mAllDescendentsPassedFilter &= (folder) && (folder->passedFilter()) && (folder->descendantsPassedFilter()); +} + +void LLAllDescendentsPassedFilter::doItem(LLFolderViewItem* item) +{ + mAllDescendentsPassedFilter &= (item) && (item->passedFilter()); +} + ///---------------------------------------------------------------------------- /// Class LLFolderViewScrollContainer ///---------------------------------------------------------------------------- diff --git a/indra/llui/llfolderview.h b/indra/llui/llfolderview.h index c166c97d87..60a29e6d69 100644 --- a/indra/llui/llfolderview.h +++ b/indra/llui/llfolderview.h @@ -409,6 +409,18 @@ public: virtual void doItem(LLFolderViewItem* item); }; +class LLAllDescendentsPassedFilter : public LLFolderViewFunctor +{ +public: + LLAllDescendentsPassedFilter() : mAllDescendentsPassedFilter(true) {} + /*virtual*/ ~LLAllDescendentsPassedFilter() {} + /*virtual*/ void doFolder(LLFolderViewFolder* folder); + /*virtual*/ void doItem(LLFolderViewItem* item); + bool allDescendentsPassedFilter() const { return mAllDescendentsPassedFilter; } +protected: + bool mAllDescendentsPassedFilter; +}; + // Flags for buildContextMenu() const U32 SUPPRESS_OPEN_ITEM = 0x1; const U32 FIRST_SELECTED_ITEM = 0x2; diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp index ae48df7c6b..92ab2ed10e 100644 --- a/indra/llui/llfolderviewitem.cpp +++ b/indra/llui/llfolderviewitem.cpp @@ -1277,6 +1277,11 @@ BOOL LLFolderViewFolder::needsArrange() return mLastArrangeGeneration < getRoot()->getArrangeGeneration(); } +bool LLFolderViewFolder::descendantsPassedFilter(S32 filter_generation) +{ + return getViewModelItem()->descendantsPassedFilter(filter_generation); +} + // Passes selection information on to children and record selection // information if necessary. BOOL LLFolderViewFolder::setSelection(LLFolderViewItem* selection, BOOL openitem, diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index c2ce343449..f518812261 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -1807,6 +1807,12 @@ bool LLNotifications::getIgnoreAllNotifications() { return mIgnoreAllNotifications; } + +bool LLNotifications::getIgnored(const std::string& name) +{ + LLNotificationTemplatePtr templatep = getTemplate(name); + return (mIgnoreAllNotifications) || ( (templatep->mForm->getIgnoreType() != LLNotificationForm::IGNORE_NO) && (templatep->mForm->getIgnored()) ); +} bool LLNotifications::isVisibleByRules(LLNotificationPtr n) { diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h index 37b60ac108..0a74b2cac0 100644 --- a/indra/llui/llnotifications.h +++ b/indra/llui/llnotifications.h @@ -970,6 +970,8 @@ public: void setIgnoreAllNotifications(bool ignore); bool getIgnoreAllNotifications(); + bool getIgnored(const std::string& name); + bool isVisibleByRules(LLNotificationPtr pNotification); private: diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index 08c3d8fb94..31490766a0 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -428,6 +428,21 @@ S32 LLScrollListCtrl::getItemCount() const return mItemList.size(); } +BOOL LLScrollListCtrl::hasSelectedItem() const +{ + item_list::iterator iter; + for (iter = mItemList.begin(); iter < mItemList.end(); ) + { + LLScrollListItem* itemp = *iter; + if (itemp && itemp->getSelected()) + { + return TRUE; + } + iter++; + } + return FALSE; +} + // virtual LLScrolListInterface function (was deleteAllItems) void LLScrollListCtrl::clearRows() { diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h index c156038282..0726a1d7c5 100644 --- a/indra/llui/llscrolllistctrl.h +++ b/indra/llui/llscrolllistctrl.h @@ -206,6 +206,8 @@ public: virtual BOOL isSelected(const LLSD& value) const; + BOOL hasSelectedItem() const; + BOOL handleClick(S32 x, S32 y, MASK mask); BOOL selectFirstItem(); BOOL selectNthItem( S32 index ); diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index 021edbecb6..1ce9b0c15e 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -837,20 +837,20 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) // HACK - highlight buttons for next click mRadioGroupMove->setVisible(move_visible); - if (!gGrabBtnSpin && - !gGrabBtnVertical && - !(mask == MASK_VERTICAL) && - !(mask == MASK_SPIN) ) + if (!(gGrabBtnSpin || + gGrabBtnVertical || + (mask == MASK_VERTICAL) || + (mask == MASK_SPIN))) { mRadioGroupMove->setValue("radio move"); } - else if (gGrabBtnVertical || - (mask == MASK_VERTICAL) ) + else if ((mask == MASK_VERTICAL) || + (gGrabBtnVertical && (mask != MASK_SPIN))) { mRadioGroupMove->setValue("radio lift"); } - else if (gGrabBtnSpin || - (mask == MASK_SPIN) ) + else if ((mask == MASK_SPIN) || + (gGrabBtnSpin && (mask != MASK_VERTICAL))) { mRadioGroupMove->setValue("radio spin"); } diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 1fec7a7c19..3fa1e782fb 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -2429,15 +2429,12 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root if ("delete" == action) { - LLSD args; - args["QUESTION"] = LLTrans::getString(root->getSelectedCount() > 1 ? "DeleteItems" : "DeleteItem"); static bool sDisplayedAtSession = false; - std::set::iterator set_iter = selected_items.begin(); - LLFolderViewModelItemInventory * viewModel = NULL; + bool has_folder_items = false; - for (; set_iter != selected_items.end(); ++set_iter) + for (std::set::iterator set_iter = selected_items.begin(); set_iter != selected_items.end(); ++set_iter) { - viewModel = dynamic_cast((*set_iter)->getViewModelItem()); + LLFolderViewModelItemInventory * viewModel = dynamic_cast((*set_iter)->getViewModelItem()); if (viewModel && viewModel->hasChildren()) { has_folder_items = true; @@ -2449,16 +2446,34 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root bool ignore = !(LLUI::sSettingGroups["ignores"]->getBOOL("DeleteItems")); if (ignore) { - if (!sDisplayedAtSession) { LLUI::sSettingGroups["ignores"]->setBOOL("DeleteItems", TRUE); sDisplayedAtSession = true; } - } } - LLNotificationsUtil::add("DeleteItems", args, LLSD(), boost::bind(&LLInventoryAction::onItemsRemovalConfirmation, _1, _2, root->getHandle())); + + LLAllDescendentsPassedFilter f; + for (std::set::iterator it = selected_items.begin(); (it != selected_items.end()) && (f.allDescendentsPassedFilter()); ++it) + { + if (LLFolderViewFolder* folder = dynamic_cast(*it)) + { + folder->applyFunctorRecursively(f); + } + } + + // Fall through to the generic confirmation if the user choose to ignore the specialized one + if ( (!f.allDescendentsPassedFilter()) && (!LLNotifications::instance().getIgnored("DeleteFilteredItems")) ) + { + LLNotificationsUtil::add("DeleteFilteredItems", LLSD(), LLSD(), boost::bind(&LLInventoryAction::onItemsRemovalConfirmation, _1, _2, root->getHandle())); + } + else + { + LLSD args; + args["QUESTION"] = LLTrans::getString(root->getSelectedCount() > 1 ? "DeleteItems" : "DeleteItem"); + LLNotificationsUtil::add("DeleteItems", args, LLSD(), boost::bind(&LLInventoryAction::onItemsRemovalConfirmation, _1, _2, root->getHandle())); + } // Note: marketplace listings will be updated in the callback if delete confirmed return; } diff --git a/indra/newview/llpanelgroup.h b/indra/newview/llpanelgroup.h index ee34197cdc..1eb13ad491 100644 --- a/indra/newview/llpanelgroup.h +++ b/indra/newview/llpanelgroup.h @@ -172,6 +172,8 @@ public: virtual void setupCtrls (LLPanel* parent) {}; + virtual void onFilterChanged() { } + protected: LLUUID mGroupID; BOOL mAllowEdit; diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index d6f1402c56..8ebc4a0129 100644 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -516,6 +516,7 @@ void LLPanelGroupSubTab::setSearchFilter(const std::string& filter) mSearchFilter = filter; LLStringUtil::toLower(mSearchFilter); update(GC_ALL); + onFilterChanged(); } void LLPanelGroupSubTab::activate() @@ -2886,6 +2887,16 @@ void LLPanelGroupActionsSubTab::activate() LLPanelGroupSubTab::activate(); update(GC_ALL); + mActionDescription->clear(); + mActionList->deselectAllItems(); + mActionList->deleteAllItems(); + buildActionsList(mActionList, + GP_ALL_POWERS, + GP_ALL_POWERS, + NULL, + FALSE, + TRUE, + FALSE); } void LLPanelGroupActionsSubTab::deactivate() @@ -2914,19 +2925,31 @@ void LLPanelGroupActionsSubTab::update(LLGroupChange gc) if (mGroupID.isNull()) return; - mActionList->deselectAllItems(); mActionMembers->deleteAllItems(); mActionRoles->deleteAllItems(); - mActionDescription->clear(); + if(mActionList->hasSelectedItem()) + { + LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID); + if (gdatap && gdatap->isMemberDataComplete() && gdatap->isRoleDataComplete()) + { + handleActionSelect(); + } + } +} + +void LLPanelGroupActionsSubTab::onFilterChanged() +{ + mActionDescription->clear(); + mActionList->deselectAllItems(); mActionList->deleteAllItems(); buildActionsList(mActionList, - GP_ALL_POWERS, - GP_ALL_POWERS, - NULL, - FALSE, - TRUE, - FALSE); + GP_ALL_POWERS, + GP_ALL_POWERS, + NULL, + FALSE, + TRUE, + FALSE); } void LLPanelGroupActionsSubTab::handleActionSelect() diff --git a/indra/newview/llpanelgrouproles.h b/indra/newview/llpanelgrouproles.h index 0e37ef874b..2107e2d9e1 100644 --- a/indra/newview/llpanelgrouproles.h +++ b/indra/newview/llpanelgrouproles.h @@ -322,6 +322,7 @@ public: virtual bool needsApply(std::string& mesg); virtual bool apply(std::string& mesg); virtual void update(LLGroupChange gc); + virtual void onFilterChanged(); void handleActionSelect(); diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 1b1ec057f0..7c62e656f3 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -3066,13 +3066,15 @@ void login_callback(S32 option, void *userdata) */ void show_release_notes_if_required() { - if (LLVersionInfo::getChannelAndVersion() != gLastRunVersion + static bool release_notes_shown = false; + if (!release_notes_shown && (LLVersionInfo::getChannelAndVersion() != gLastRunVersion) && LLVersionInfo::getViewerMaturity() != LLVersionInfo::TEST_VIEWER // don't show Release Notes for the test builds && gSavedSettings.getBOOL("UpdaterShowReleaseNotes") && !gSavedSettings.getBOOL("FirstLoginThisInstall")) { LLSD info(LLAppViewer::instance()->getViewerInfo()); LLWeb::loadURLInternal(info["VIEWER_RELEASE_NOTES_URL"]); + release_notes_shown = true; } } diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index f04e4fdfcf..0a2c40e31c 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -870,7 +870,7 @@ Do you wish to proceed? icon="alertmodal.tga" name="JoinGroupNoCost" type="alertmodal"> -You are joining group [NAME]. +You are joining group <nolink>[NAME]</nolink>. Do you wish to proceed? group confirm @@ -961,7 +961,7 @@ Sorry, trial users can't join groups. icon="alertmodal.tga" name="JoinGroupMaxGroups" type="alertmodal"> -You cannot join '[group_name]': +You cannot join '<nolink>[group_name]</nolink>': You are already a member of [group_count] groups, the maximum number allowed is [max_groups] success group_id @@ -977,7 +977,7 @@ You are already a member of [group_count] groups, the maximum number allowed is icon="alertmodal.tga" name="JoinGroupClosedEnrollment" type="alertmodal"> -You cannot join '[group_name]': +You cannot join '<nolink>[group_name]</nolink>': The group no longer has open enrollment. group_id success @@ -1066,7 +1066,7 @@ Your selling price will be L$[SALE_PRICE] and will be authorized for sale to [NA icon="alertmodal.tga" name="ReturnObjectsDeededToGroup" type="alertmodal"> -Are you sure you want to return all objects shared with the group '[NAME]' on this parcel of land back to their previous owner's inventory? +Are you sure you want to return all objects shared with the group '<nolink>[NAME]</nolink>' on this parcel of land back to their previous owner's inventory? *WARNING* This will delete the non-transferable objects deeded to the group! @@ -1169,7 +1169,7 @@ Are you sure you want to disable all objects in this region? icon="alertmodal.tga" name="ReturnObjectsNotOwnedByGroup" type="alertmodal"> -Return the objects on this parcel of land that are *NOT* shared with the group [NAME] back to their owners? +Return the objects on this parcel of land that are NOT shared with the group <nolink>[NAME]</nolink> back to their owners? Objects: [N] confirm @@ -2036,7 +2036,7 @@ Eject the following avatars from your land? name="EjectAvatarFromGroup" persist="true" type="notify"> -You ejected [AVATAR_NAME] from group [GROUP_NAME]. +You ejected [AVATAR_NAME] from group <nolink>[GROUP_NAME]</nolink>. group @@ -3447,7 +3447,7 @@ Please select a smaller area and try again. By deeding this parcel, the group will be required to have and maintain sufficient land use credits. The purchase price of the land is not refunded to the owner. If a deeded parcel is sold, the sale price will be divided evenly among group members. -Deed this [AREA] m² of land to the group '[GROUP_NAME]'? +Deed this [AREA] m² of land to the group '<nolink>[GROUP_NAME]</nolink>'? group confirm group confirm -You have left the group '[group_name]'. +You have left the group '<nolink>[group_name]</nolink>'. group @@ -6300,6 +6300,22 @@ You cannot undo this action. notext="Cancel" yestext="OK"/> + + + + Your inventory is currently filtered and not all of the items you're about to delete are currently visible. + +Are you sure you want to delete them? + confirm + + -The objects on the selected parcel of land shared with the group [GROUPNAME] have been returned back to their owner's inventory. +The objects on the selected parcel of land shared with the group <nolink>[GROUPNAME]</nolink> have been returned back to their owner's inventory. Transferable deeded objects have been returned to their previous owners. Non-transferable objects that are deeded to the group have been deleted. group @@ -8709,7 +8725,7 @@ To grant this permission please update your viewer to the latest version from [D show_toast="false" type="notify"> group -[GROUPNAME]'s '<nolink>[TITLE]</nolink>' +<nolink>[GROUPNAME]</nolink>'s '<nolink>[TITLE]</nolink>' [MESSAGE]