Merge viewer-neko

master
Ansariel 2017-06-09 11:49:10 +02:00
commit 2347b25808
15 changed files with 152 additions and 38 deletions

View File

@ -829,6 +829,7 @@ Kitty Barnett
MAINT-6153
MAINT-6154
MAINT-6568
STORM-2149
Kolor Fall
Komiko Okamoto
Korvel Noh

View File

@ -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
///----------------------------------------------------------------------------

View File

@ -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;

View File

@ -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,

View File

@ -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)
{

View File

@ -970,6 +970,8 @@ public:
void setIgnoreAllNotifications(bool ignore);
bool getIgnoreAllNotifications();
bool getIgnored(const std::string& name);
bool isVisibleByRules(LLNotificationPtr pNotification);
private:

View File

@ -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()
{

View File

@ -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 );

View File

@ -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");
}

View File

@ -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<LLFolderViewItem*>::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<LLFolderViewItem*>::iterator set_iter = selected_items.begin(); set_iter != selected_items.end(); ++set_iter)
{
viewModel = dynamic_cast<LLFolderViewModelItemInventory *>((*set_iter)->getViewModelItem());
LLFolderViewModelItemInventory * viewModel = dynamic_cast<LLFolderViewModelItemInventory *>((*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<LLFolderViewItem*>::iterator it = selected_items.begin(); (it != selected_items.end()) && (f.allDescendentsPassedFilter()); ++it)
{
if (LLFolderViewFolder* folder = dynamic_cast<LLFolderViewFolder*>(*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;
}

View File

@ -172,6 +172,8 @@ public:
virtual void setupCtrls (LLPanel* parent) {};
virtual void onFilterChanged() { }
protected:
LLUUID mGroupID;
BOOL mAllowEdit;

View File

@ -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()

View File

@ -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();

View File

@ -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;
}
}

View File

@ -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 &lt;nolink&gt;[NAME]&lt;/nolink&gt;.
Do you wish to proceed?
<tag>group</tag>
<tag>confirm</tag>
@ -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 &apos;&lt;nolink&gt;[group_name]&lt;/nolink&gt;&apos;:
You are already a member of [group_count] groups, the maximum number allowed is [max_groups]
<tag>success</tag>
<tag>group_id</tag>
@ -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 &apos;&lt;nolink&gt;[group_name]&lt;/nolink&gt;&apos;:
The group no longer has open enrollment.
<tag>group_id</tag>
<tag>success</tag>
@ -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 &apos;[NAME]&apos; on this parcel of land back to their previous owner&apos;s inventory?
Are you sure you want to return all objects shared with the group &apos;&lt;nolink&gt;[NAME]&lt;/nolink&gt;&apos; on this parcel of land back to their previous owner&apos;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 &lt;nolink&gt;[NAME]&lt;/nolink&gt; back to their owners?
Objects: [N]
<tag>confirm</tag>
@ -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 &lt;nolink&gt;[GROUP_NAME]&lt;/nolink&gt;.
<tag>group</tag>
</notification>
@ -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 &apos;[GROUP_NAME]&apos;?
Deed this [AREA] m² of land to the group &apos;&lt;nolink&gt;[GROUP_NAME]&lt;/nolink&gt;&apos;?
<tag>group</tag>
<tag>confirm</tag>
<usetemplate
@ -3464,7 +3464,7 @@ By deeding this parcel, the group will be required to have and maintain sufficie
The deed will include a simultaneous land contribution to the group from &apos;[NAME]&apos;.
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 &apos;[GROUP_NAME]&apos;?
Deed this [AREA] m² of land to the group &apos;&lt;nolink&gt;[GROUP_NAME]&lt;/nolink&gt;&apos;?
<tag>group</tag>
<tag>confirm</tag>
<usetemplate
@ -4441,7 +4441,7 @@ Leave Group?
icon="notify.tga"
name="GroupDepart"
type="notify">
You have left the group &apos;[group_name]&apos;.
You have left the group &apos;&lt;nolink&gt;[group_name]&lt;/nolink&gt;&apos;.
<tag>group</tag>
</notification>
@ -6300,6 +6300,22 @@ You cannot undo this action.
notext="Cancel"
yestext="OK"/>
</notification>
<notification
icon="alertmodal.tga"
name="DeleteFilteredItems"
type="alertmodal">
<unique/>
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?
<tag>confirm</tag>
<usetemplate
ignoretext="Confirm before deleting filtered items"
name="okcancelignore"
notext="Cancel"
yestext="OK"/>
</notification>
<notification
icon="alertmodal.tga"
@ -7538,7 +7554,7 @@ The objects on the selected parcel of land owned by the resident &apos;[NAME]&ap
name="GroupObjectsReturned"
persist="true"
type="notify">
The objects on the selected parcel of land shared with the group [GROUPNAME] have been returned back to their owner&apos;s inventory.
The objects on the selected parcel of land shared with the group &lt;nolink&gt;[GROUPNAME]&lt;/nolink&gt; have been returned back to their owner&apos;s inventory.
Transferable deeded objects have been returned to their previous owners.
Non-transferable objects that are deeded to the group have been deleted.
<tag>group</tag>
@ -8709,7 +8725,7 @@ To grant this permission please update your viewer to the latest version from [D
show_toast="false"
type="notify">
<tag>group</tag>
[GROUPNAME]&apos;s &apos;&lt;nolink&gt;[TITLE]&lt;/nolink&gt;&apos;
&lt;nolink&gt;[GROUPNAME]&lt;/nolink&gt;&apos;s &apos;&lt;nolink&gt;[TITLE]&lt;/nolink&gt;&apos;
[MESSAGE]
<form name="form">
<button
@ -8840,7 +8856,7 @@ Click Accept to join the call or Decline to decline the invitation. Click mute t
icon="notify.tga"
name="VoiceInviteGroup"
type="notify">
[NAME] has joined a Voice Chat call with the group [GROUP].
[NAME] has joined a Voice Chat call with the group &lt;nolink&gt;[GROUP]&lt;/nolink&gt;.
Click Accept to join the call or Decline to decline the invitation. Click mute to permanently block all messages from this caller.
<tag>group</tag>
<tag>confirm</tag>