summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
authorbrad kittenbrink <brad@lindenlab.com>2009-08-13 01:28:38 -0400
committerbrad kittenbrink <brad@lindenlab.com>2009-08-13 01:28:38 -0400
commit39c2a584f47785c826c3bc133106f3689120bf32 (patch)
tree898695d92fc467672618f08260106ab773e456b5 /indra/newview/llviewermenu.cpp
parenta15feff98c13cd693e60fc59345609c007de16db (diff)
parentefd58603da6062d90a5d7019987409994bc73858 (diff)
Merged latest viewer-2.0.0-3 change up through svn r130333 into login-api.
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r--indra/newview/llviewermenu.cpp32
1 files changed, 22 insertions, 10 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index eb676d3188..a6157aa1e0 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -102,7 +102,6 @@
#include "llfloaterfonttest.h"
#include "llfloatergesture.h"
#include "llfloatergodtools.h"
-#include "llfloatergroupinfo.h"
#include "llfloatergroupinvite.h"
#include "llfloatergroups.h"
#include "llfloaterhtml.h"
@@ -5106,19 +5105,20 @@ void print_agent_nvpairs(void*)
void show_debug_menus()
{
- // this can get called at login screen where there is no menu so only toggle it if one exists
+ // this might get called at login screen where there is no menu so only toggle it if one exists
if ( gMenuBarView )
{
BOOL debug = gSavedSettings.getBOOL("UseDebugMenus");
+ BOOL qamode = gSavedSettings.getBOOL("QAMode");
gMenuBarView->setItemVisible("Advanced", debug);
- gMenuBarView->setItemEnabled("Advanced", debug);
+// gMenuBarView->setItemEnabled("Advanced", debug); // Don't disable Advanced keyboard shortcuts when hidden
- gMenuBarView->setItemVisible("Debug", debug);
- gMenuBarView->setItemEnabled("Debug", debug);
+ gMenuBarView->setItemVisible("Debug", qamode);
+ gMenuBarView->setItemEnabled("Debug", qamode);
- gMenuBarView->setItemVisible("Develop", debug);
- gMenuBarView->setItemEnabled("Develop", debug);
+ gMenuBarView->setItemVisible("Develop", qamode);
+ gMenuBarView->setItemEnabled("Develop", qamode);
// Server ('Admin') menu hidden when not in godmode.
const bool show_server_menu = debug && (gAgent.getGodLevel() > GOD_NOT);
@@ -5280,9 +5280,7 @@ class LLWorldCreateLandmark : public view_listener_t
bool handleEvent(const LLSD& userdata)
{
LLSideTray::getInstance()->showPanel("panel_places", LLSD().insert("type", "create_landmark"));
-
- // Floater "Add Landmark" functionality moved to Side Tray
- //LLFloaterReg::showInstance("add_landmark");
+
return true;
}
};
@@ -5373,6 +5371,19 @@ class LLAvatarAddFriend : public view_listener_t
}
};
+class LLAvatarAddContact : public view_listener_t
+{
+ bool handleEvent(const LLSD& userdata)
+ {
+ LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() );
+ if(avatar)
+ {
+ create_inventory_callingcard(avatar->getID());
+ }
+ return true;
+ }
+};
+
bool complete_give_money(const LLSD& notification, const LLSD& response, LLObjectSelectionHandle handle)
{
S32 option = LLNotification::getSelectedOption(notification, response);
@@ -7931,6 +7942,7 @@ void initialize_menus()
// Avatar pie menu
view_listener_t::addMenu(new LLObjectMute(), "Avatar.Mute");
view_listener_t::addMenu(new LLAvatarAddFriend(), "Avatar.AddFriend");
+ view_listener_t::addMenu(new LLAvatarAddContact(), "Avatar.AddContact");
view_listener_t::addMenu(new LLAvatarFreeze(), "Avatar.Freeze");
view_listener_t::addMenu(new LLAvatarDebug(), "Avatar.Debug");
view_listener_t::addMenu(new LLAvatarVisibleDebug(), "Avatar.VisibleDebug");