SL-14842 Clear history should be it's own button

master
Andrey Kleshchev 2021-04-22 20:10:10 +03:00
parent 6da0a6873b
commit a391cf9cbc
5 changed files with 14 additions and 19 deletions

View File

@ -656,7 +656,9 @@ void LLPanelPlaces::onTabSelected()
// Hide menus
bool supports_create = mActivePanel->getCreateMenu() != NULL;
childSetVisible("add_btn_panel", supports_create);
childSetVisible("trash_btn_panel", supports_create);
// favorites and inventory can remove items, history can clear history
childSetVisible("trash_btn_panel", TRUE);
}
void LLPanelPlaces::onTeleportButtonClicked()
@ -1224,7 +1226,9 @@ void LLPanelPlaces::createTabs()
// Hide menus
bool supports_create = mActivePanel->getCreateMenu() != NULL;
childSetVisible("add_btn_panel", supports_create);
childSetVisible("trash_btn_panel", supports_create);
// favorites and inventory can remove items, history can clear history
childSetVisible("trash_btn_panel", TRUE);
}
mTabsCreated = true;

View File

@ -534,6 +534,12 @@ void LLTeleportHistoryPanel::onTeleport()
confirmTeleport(itemp->getIndex());
}
// virtual
void LLTeleportHistoryPanel::onRemoveSelected()
{
LLNotificationsUtil::add("ConfirmClearTeleportHistory", LLSD(), LLSD(), boost::bind(&LLTeleportHistoryPanel::onClearTeleportHistoryDialog, this, _1, _2));
}
/*
// virtual
void LLTeleportHistoryPanel::onCopySLURL()
@ -1032,10 +1038,6 @@ void LLTeleportHistoryPanel::onGearMenuAction(const LLSD& userdata)
mLastSelectedFlatlList->resetSelection();
}
}
else if ("clear_history" == command_name)
{
LLNotificationsUtil::add("ConfirmClearTeleportHistory", LLSD(), LLSD(), boost::bind(&LLTeleportHistoryPanel::onClearTeleportHistoryDialog, this, _1, _2));
}
S32 index = -1;
if (mLastSelectedFlatlList)

View File

@ -54,7 +54,7 @@ public:
void onShowProfile() override;
void onTeleport() override;
///*virtual*/ void onCopySLURL();
void onRemoveSelected() override {};
void onRemoveSelected() override;
void updateVerbs() override;
bool isSingleItemSelected() override;

View File

@ -49,15 +49,4 @@
function="TeleportHistory.GearMenu.Enable"
parameter="copy_slurl" />
</menu_item_call>
<menu_item_separator layout="topleft" />
<menu_item_call
label="Clear Teleport History"
name="Clear Teleport History">
<menu_item_call.on_click
function="TeleportHistory.GearMenu.Action"
parameter="clear_history" />
<on_enable
function="TeleportHistory.GearMenu.Enable"
parameter="clear_history" />
</menu_item_call>
</toggleable_menu>

View File

@ -8710,7 +8710,7 @@ This upload will cost L$[PRICE], do you wish to continue with the upload?
icon="alertmodal.tga"
name="ConfirmClearTeleportHistory"
type="alertmodal">
Are you sure you want to delete your teleport history?
This will delete the entire list of places you have visited, and cannot be undone. Continue?
<tag>confirm</tag>
<usetemplate
name="okcancelbuttons"