PE merge.
commit
b4feec1277
|
|
@ -35,6 +35,7 @@
|
|||
|
||||
#include "llbutton.h"
|
||||
#include "llfloaterreg.h"
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llsdutil.h"
|
||||
#include "llsdutil_math.h"
|
||||
#include "llregionhandle.h"
|
||||
|
|
@ -632,8 +633,7 @@ void LLLandmarksPanel::onAddAction(const LLSD& userdata) const
|
|||
LLViewerInventoryItem* landmark = LLLandmarkActions::findLandmarkForAgentPos();
|
||||
if(landmark)
|
||||
{
|
||||
LLSideTray::getInstance()->showPanel("panel_places",
|
||||
LLSD().with("type", "landmark").with("id",landmark->getUUID()));
|
||||
LLNotificationsUtil::add("LandmarkAlreadyExists");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -639,6 +639,21 @@ LLPanel* LLSideTray::showPanel (const std::string& panel_name, const LLSD& para
|
|||
return NULL;
|
||||
}
|
||||
|
||||
void LLSideTray::togglePanel(LLPanel* &sub_panel, const std::string& panel_name, const LLSD& params)
|
||||
{
|
||||
if(!sub_panel)
|
||||
return;
|
||||
|
||||
if (sub_panel->isInVisibleChain())
|
||||
{
|
||||
LLSideTray::getInstance()->collapseSideBar();
|
||||
}
|
||||
else
|
||||
{
|
||||
LLSideTray::getInstance()->showPanel(panel_name, params);
|
||||
}
|
||||
}
|
||||
|
||||
// This is just LLView::findChildView specialized to restrict the search to LLPanels.
|
||||
// Optimization for EXT-4068 to avoid searching down to the individual item level
|
||||
// when inventories are large.
|
||||
|
|
|
|||
|
|
@ -94,7 +94,15 @@ public:
|
|||
* if no such tab - return NULL, otherwise a pointer to the panel
|
||||
* Pass params as array, or they may be overwritten(example - params["name"]="nearby")
|
||||
*/
|
||||
LLPanel* showPanel (const std::string& panel_name, const LLSD& params);
|
||||
LLPanel* showPanel (const std::string& panel_name, const LLSD& params);
|
||||
|
||||
/**
|
||||
* Toggling Side Tray tab which contains "sub_panel" child of "panel_name" panel.
|
||||
* If "sub_panel" is not visible Side Tray is opened to display it,
|
||||
* otherwise Side Tray is collapsed.
|
||||
* params are passed to "panel_name" panel onOpen().
|
||||
*/
|
||||
void togglePanel (LLPanel* &sub_panel, const std::string& panel_name, const LLSD& params);
|
||||
|
||||
/*
|
||||
* get the panel (don't show it or do anything else with it)
|
||||
|
|
|
|||
|
|
@ -3365,13 +3365,13 @@ void handle_show_side_tray()
|
|||
root->addChild(side_tray);
|
||||
}
|
||||
|
||||
class LLShowPanelPeopleTab : public view_listener_t
|
||||
// Toggle one of "People" panel tabs in side tray.
|
||||
class LLTogglePanelPeopleTab : public view_listener_t
|
||||
{
|
||||
bool handleEvent(const LLSD& userdata)
|
||||
{
|
||||
std::string panel_name = userdata.asString();
|
||||
|
||||
// Open tab of the "People" panel in side tray.
|
||||
LLSD param;
|
||||
param["people_panel_tab_name"] = panel_name;
|
||||
|
||||
|
|
@ -3381,15 +3381,15 @@ class LLShowPanelPeopleTab : public view_listener_t
|
|||
|
||||
if (panel_name == "friends_panel")
|
||||
{
|
||||
return togglePanel(friends_panel, param);
|
||||
return togglePeoplePanel(friends_panel, panel_name, param);
|
||||
}
|
||||
else if (panel_name == "groups_panel")
|
||||
{
|
||||
return togglePanel(groups_panel, param);
|
||||
return togglePeoplePanel(groups_panel, panel_name, param);
|
||||
}
|
||||
else if (panel_name == "nearby_panel")
|
||||
{
|
||||
return togglePanel(nearby_panel, param);
|
||||
return togglePeoplePanel(nearby_panel, panel_name, param);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -3397,23 +3397,16 @@ class LLShowPanelPeopleTab : public view_listener_t
|
|||
}
|
||||
}
|
||||
|
||||
static bool togglePanel(LLPanel* &panel, const LLSD& param)
|
||||
static bool togglePeoplePanel(LLPanel* &panel, const std::string& panel_name, const LLSD& param)
|
||||
{
|
||||
if(!panel)
|
||||
{
|
||||
panel = LLSideTray::getInstance()->findChild<LLPanel>(param["people_panel_tab_name"].asString());
|
||||
panel = LLSideTray::getInstance()->getPanel(panel_name);
|
||||
if(!panel)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (panel->isInVisibleChain())
|
||||
{
|
||||
LLSideTray::getInstance()->collapseSideBar();
|
||||
}
|
||||
else
|
||||
{
|
||||
LLSideTray::getInstance()->showPanel("panel_people", param);
|
||||
}
|
||||
LLSideTray::getInstance()->togglePanel(panel, "panel_people", param);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -7940,7 +7933,7 @@ void initialize_menus()
|
|||
view_listener_t::addMenu(new LLSelfEnableRemoveAllAttachments(), "Self.EnableRemoveAllAttachments");
|
||||
|
||||
// we don't use boost::bind directly to delay side tray construction
|
||||
view_listener_t::addMenu( new LLShowPanelPeopleTab(), "SideTray.PanelPeopleTab");
|
||||
view_listener_t::addMenu( new LLTogglePanelPeopleTab(), "SideTray.PanelPeopleTab");
|
||||
|
||||
// Avatar pie menu
|
||||
view_listener_t::addMenu(new LLObjectMute(), "Avatar.Mute");
|
||||
|
|
|
|||
|
|
@ -738,6 +738,7 @@ void start_new_inventory_observer()
|
|||
|
||||
class LLDiscardAgentOffer : public LLInventoryFetchComboObserver
|
||||
{
|
||||
LOG_CLASS(LLDiscardAgentOffer);
|
||||
public:
|
||||
LLDiscardAgentOffer(const LLUUID& folder_id, const LLUUID& object_id) :
|
||||
mFolderID(folder_id),
|
||||
|
|
@ -1114,7 +1115,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
|
|||
// * callback may be called immediately,
|
||||
// * adding the mute sends a message,
|
||||
// * we can't build two messages at once.
|
||||
if (2 == button)
|
||||
if (2 == button) // Block
|
||||
{
|
||||
gCacheName->get(mFromID, mFromGroup, boost::bind(&inventory_offer_mute_callback,_1,_2,_3,_4,this));
|
||||
}
|
||||
|
|
@ -2054,6 +2055,13 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
|
|||
//if (((is_busy && !is_owned_by_me) || is_muted))
|
||||
if ( is_muted || mute_im)
|
||||
{
|
||||
// Prefetch the offered item so that it can be discarded by the appropriate observer. (EXT-4331)
|
||||
LLInventoryFetchObserver::item_ref_t items;
|
||||
items.push_back(info->mObjectID);
|
||||
LLInventoryFetchObserver* fetch_item = new LLInventoryFetchObserver();
|
||||
fetch_item->fetchItems(items);
|
||||
delete fetch_item;
|
||||
|
||||
// Same as closing window
|
||||
info->forceResponse(IOR_DECLINE);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1401,6 +1401,16 @@ Please try again later.
|
|||
You have added "[LANDMARK_NAME]" to your [FOLDER_NAME] folder.
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="alert.tga"
|
||||
name="LandmarkAlreadyExists"
|
||||
type="alert">
|
||||
You already have a landmark for this location.
|
||||
<usetemplate
|
||||
name="okbutton"
|
||||
yestext="OK"/>
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="alertmodal.tga"
|
||||
name="CannotCreateLandmarkNotOwner"
|
||||
|
|
|
|||
Loading…
Reference in New Issue