summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
authorYchebotarev ProductEngine <ychebotarev@productengine.com>2010-01-19 17:13:21 +0200
committerYchebotarev ProductEngine <ychebotarev@productengine.com>2010-01-19 17:13:21 +0200
commit82de841c52357642d30b6d89b11da079f9c0f5d1 (patch)
tree8ed3ec82392b6afd2ddf2023035fdfa45cd74c0b /indra/newview/llviewermenu.cpp
parent4610e911c959cdd21728822ae80b9e717ccd3012 (diff)
parent00c05a885fb1cbee967065798f57d74bf47f2478 (diff)
merge
--HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r--indra/newview/llviewermenu.cpp39
1 files changed, 16 insertions, 23 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index db462dee44..d96d7df24a 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -48,7 +48,7 @@
#include "llconsole.h"
#include "lldebugview.h"
#include "llfilepicker.h"
-#include "llfirstuse.h"
+//#include "llfirstuse.h"
#include "llfloaterbuy.h"
#include "llfloaterbuycontents.h"
#include "llfloaterbuycurrency.h"
@@ -2490,7 +2490,7 @@ class LLObjectBuild : public view_listener_t
LLToolMgr::getInstance()->getCurrentToolset()->selectTool( LLToolCompCreate::getInstance() );
// Could be first use
- LLFirstUse::useBuild();
+ //LLFirstUse::useBuild();
return true;
}
};
@@ -2535,7 +2535,7 @@ void handle_object_edit()
LLViewerJoystick::getInstance()->setNeedsReset(true);
// Could be first use
- LLFirstUse::useBuild();
+ //LLFirstUse::useBuild();
return;
}
@@ -2586,7 +2586,7 @@ class LLLandBuild : public view_listener_t
LLToolMgr::getInstance()->getCurrentToolset()->selectTool( LLToolCompCreate::getInstance() );
// Could be first use
- LLFirstUse::useBuild();
+ //LLFirstUse::useBuild();
return true;
}
};
@@ -2823,7 +2823,7 @@ bool handle_go_to()
}
// Could be first use
- LLFirstUse::useGoTo();
+ //LLFirstUse::useGoTo();
return true;
}
@@ -3364,13 +3364,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;
@@ -3380,15 +3380,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
{
@@ -3396,23 +3396,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;
}
@@ -3667,7 +3660,7 @@ void near_sit_down_point(BOOL success, void *)
gAgent.setControlFlags(AGENT_CONTROL_SIT_ON_GROUND);
// Might be first sit
- LLFirstUse::useSit();
+ //LLFirstUse::useSit();
}
}
@@ -5185,7 +5178,7 @@ void toggle_debug_menus(void*)
gSavedSettings.setBOOL("UseDebugMenus", visible);
if(visible)
{
- LLFirstUse::useDebugMenus();
+ //LLFirstUse::useDebugMenus();
}
show_debug_menus();
}
@@ -7896,7 +7889,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");