diff --git a/indra/newview/app_settings/settings_ascent.xml b/indra/newview/app_settings/settings_ascent.xml
index ec2b81116..ff03528a0 100644
--- a/indra/newview/app_settings/settings_ascent.xml
+++ b/indra/newview/app_settings/settings_ascent.xml
@@ -620,5 +620,16 @@
Value
tp2
+ SinguCmdLineAway
+
diff --git a/indra/newview/ascentprefssys.cpp b/indra/newview/ascentprefssys.cpp
index 88a3361fc..493bb7a69 100644
--- a/indra/newview/ascentprefssys.cpp
+++ b/indra/newview/ascentprefssys.cpp
@@ -71,6 +71,7 @@ LLPrefsAscentSys::LLPrefsAscentSys()
childSetCommitCallback("AscentCmdLineOfferTp", onCommitCmdLine, this);
childSetCommitCallback("AscentCmdLineMapTo", onCommitCmdLine, this);
childSetCommitCallback("AscentCmdLineTP2", onCommitCmdLine, this);
+ childSetCommitCallback("SinguCmdLineAway", onCommitCmdLine, this);
refreshValues();
refresh();
@@ -169,6 +170,7 @@ void LLPrefsAscentSys::onCommitCmdLine(LLUICtrl* ctrl, void* user_data)
self->childSetEnabled("AscentCmdLineMapTo", enabled);
self->childSetEnabled("map_to_keep_pos", enabled);
self->childSetEnabled("AscentCmdLineTP2", enabled);
+ self->childSetEnabled("SinguCmdLineAway", enabled);
}
gSavedSettings.setString("AscentCmdLinePos", self->childGetValue("AscentCmdLinePos"));
@@ -184,6 +186,7 @@ void LLPrefsAscentSys::onCommitCmdLine(LLUICtrl* ctrl, void* user_data)
gSavedSettings.setString("AscentCmdLineOfferTp", self->childGetValue("AscentCmdLineOfferTp"));
gSavedSettings.setString("AscentCmdLineMapTo", self->childGetValue("AscentCmdLineMapTo"));
gSavedSettings.setString("AscentCmdLineTP2", self->childGetValue("AscentCmdLineTP2"));
+ gSavedSettings.setString("SinguCmdLineAway", self->childGetValue("SinguCmdLineAway"));
}
void LLPrefsAscentSys::refreshValues()
@@ -225,6 +228,7 @@ void LLPrefsAscentSys::refreshValues()
mCmdLineMapTo = gSavedSettings.getString("AscentCmdLineMapTo");
mCmdMapToKeepPos = gSavedSettings.getBOOL("AscentMapToKeepPos");
mCmdLineTP2 = gSavedSettings.getString("AscentCmdLineTP2");
+ mCmdLineAway = gSavedSettings.getString("SinguCmdLineAway");
//Security ----------------------------------------------------------------------------
mBroadcastViewerEffects = gSavedSettings.getBOOL("BroadcastViewerEffects");
@@ -276,6 +280,7 @@ void LLPrefsAscentSys::refresh()
childSetEnabled("AscentCmdLineMapTo", mCmdLine);
childSetEnabled("map_to_keep_pos", mCmdLine);
childSetEnabled("AscentCmdLineTP2", mCmdLine);
+ childSetEnabled("SinguCmdLineAway", mCmdLine);
childSetValue("AscentCmdLinePos", mCmdLinePos);
childSetValue("AscentCmdLineGround", mCmdLineGround);
@@ -290,6 +295,7 @@ void LLPrefsAscentSys::refresh()
childSetValue("AscentCmdLineOfferTp", mCmdLineOfferTp);
childSetValue("AscentCmdLineMapTo", mCmdLineMapTo);
childSetValue("AscentCmdLineTP2", mCmdLineTP2);
+ childSetValue("SinguCmdLineAway", mCmdLineAway);
}
void LLPrefsAscentSys::cancel()
@@ -330,6 +336,7 @@ void LLPrefsAscentSys::cancel()
gSavedSettings.setString("AscentCmdLineMapTo", mCmdLineMapTo);
gSavedSettings.setBOOL("AscentMapToKeepPos", mCmdMapToKeepPos);
gSavedSettings.setString("AscentCmdLineTP2", mCmdLineTP2);
+ gSavedSettings.setString("SinguCmdLineAway", mCmdLineAway);
//Security ----------------------------------------------------------------------------
gSavedSettings.setBOOL("BroadcastViewerEffects", mBroadcastViewerEffects);
diff --git a/indra/newview/ascentprefssys.h b/indra/newview/ascentprefssys.h
index d439a2242..c31751574 100644
--- a/indra/newview/ascentprefssys.h
+++ b/indra/newview/ascentprefssys.h
@@ -88,6 +88,7 @@ protected:
std::string mCmdLineMapTo;
BOOL mCmdMapToKeepPos;
std::string mCmdLineTP2;
+ std::string mCmdLineAway;
//Security ----------------------------------------------------------------------------
BOOL mBroadcastViewerEffects;
diff --git a/indra/newview/chatbar_as_cmdline.cpp b/indra/newview/chatbar_as_cmdline.cpp
index 4539b3a34..a0051de59 100644
--- a/indra/newview/chatbar_as_cmdline.cpp
+++ b/indra/newview/chatbar_as_cmdline.cpp
@@ -55,6 +55,7 @@
#include "llfloateravatarlist.h"
#include "llviewerobjectlist.h"
#include "llviewertexteditor.h"
+#include "llviewermenu.h"
#include "llvoavatar.h"
#include "lltooldraganddrop.h"
#include "llinventorymodel.h"
@@ -398,6 +399,10 @@ bool cmd_line_chat(std::string revised_text, EChatType type)
cmdline_tp2name(name);
}
return false;
+ }else if(command == utf8str_tolower(gSavedSettings.getString("SinguCmdLineAway")))
+ {
+ handle_fake_away_status(NULL);
+ return false;
}else if(command == "typingstop")
{
std::string text;
diff --git a/indra/newview/llviewermenu.h b/indra/newview/llviewermenu.h
index a6d96c08c..4a32dfe26 100644
--- a/indra/newview/llviewermenu.h
+++ b/indra/newview/llviewermenu.h
@@ -99,6 +99,7 @@ bool toggle_build_mode();
void handle_object_build(void*);
void handle_save_snapshot(void *);
void handle_toggle_flycam();
+void handle_fake_away_status(void*);
bool handle_sit_or_stand();
bool handle_give_money_dialog();
diff --git a/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_system.xml b/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_system.xml
index 117457d1e..7cb672eb6 100644
--- a/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_system.xml
+++ b/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_system.xml
@@ -74,6 +74,8 @@
Teleport to avatar (usage: cmd name)
+ Toggle Fake Away Status (usage: cmd)
+