Feature Request: Provide a way to open SLURLs without needing to post them in chat
Adds chatbar as commandline command /open, which also allows opening urls as a bonus.
This commit is contained in:
@@ -598,6 +598,17 @@
|
||||
<key>Value</key>
|
||||
<string>/away</string>
|
||||
</map>
|
||||
<key>SinguCmdLineURL</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Open SLURLS and URLs from chatbar.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string>/open</string>
|
||||
</map>
|
||||
<key>SinguCompleteNameProfiles</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
||||
@@ -74,6 +74,7 @@ LLPrefsAscentSys::LLPrefsAscentSys()
|
||||
getChild<LLUICtrl>("AscentCmdLineMapTo")->setCommitCallback(boost::bind(&LLPrefsAscentSys::onCommitCmdLine, this, _1, _2));
|
||||
getChild<LLUICtrl>("AscentCmdLineTP2")->setCommitCallback(boost::bind(&LLPrefsAscentSys::onCommitCmdLine, this, _1, _2));
|
||||
getChild<LLUICtrl>("SinguCmdLineAway")->setCommitCallback(boost::bind(&LLPrefsAscentSys::onCommitCmdLine, this, _1, _2));
|
||||
getChild<LLUICtrl>("SinguCmdLineURL")->setCommitCallback(boost::bind(&LLPrefsAscentSys::onCommitCmdLine, this, _1, _2));
|
||||
|
||||
//Security ----------------------------------------------------------------------------
|
||||
getChild<LLUICtrl>("disable_click_sit_check")->setCommitCallback(boost::bind(&LLPrefsAscentSys::onCommitCheckBox, this, _1, _2));
|
||||
@@ -179,6 +180,7 @@ void LLPrefsAscentSys::onCommitCmdLine(LLUICtrl* ctrl, const LLSD& value)
|
||||
childSetEnabled("map_to_keep_pos", enabled);
|
||||
childSetEnabled("AscentCmdLineTP2", enabled);
|
||||
childSetEnabled("SinguCmdLineAway", enabled);
|
||||
childSetEnabled("SinguCmdLineURL", enabled);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -240,6 +242,7 @@ void LLPrefsAscentSys::refreshValues()
|
||||
mCmdMapToKeepPos = gSavedSettings.getBOOL("AscentMapToKeepPos");
|
||||
mCmdLineTP2 = gSavedSettings.getString("AscentCmdLineTP2");
|
||||
mCmdLineAway = gSavedSettings.getString("SinguCmdLineAway");
|
||||
mCmdLineURL = gSavedSettings.getString("SinguCmdLineURL");
|
||||
|
||||
//Security ----------------------------------------------------------------------------
|
||||
mBroadcastViewerEffects = gSavedSettings.getBOOL("BroadcastViewerEffects");
|
||||
@@ -314,6 +317,7 @@ void LLPrefsAscentSys::refresh()
|
||||
childSetEnabled("map_to_keep_pos", mCmdLine);
|
||||
childSetEnabled("AscentCmdLineTP2", mCmdLine);
|
||||
childSetEnabled("SinguCmdLineAway", mCmdLine);
|
||||
childSetEnabled("SinguCmdLineURL", mCmdLine);
|
||||
|
||||
//Security ----------------------------------------------------------------------------
|
||||
childSetValue("AscentCmdLinePos", mCmdLinePos);
|
||||
@@ -330,6 +334,7 @@ void LLPrefsAscentSys::refresh()
|
||||
childSetValue("AscentCmdLineMapTo", mCmdLineMapTo);
|
||||
childSetValue("AscentCmdLineTP2", mCmdLineTP2);
|
||||
childSetValue("SinguCmdLineAway", mCmdLineAway);
|
||||
childSetValue("SinguCmdLineURL", mCmdLineURL);
|
||||
|
||||
//Build -------------------------------------------------------------------------------
|
||||
childSetValue("alpha", mAlpha);
|
||||
@@ -392,6 +397,7 @@ void LLPrefsAscentSys::cancel()
|
||||
gSavedSettings.setBOOL("AscentMapToKeepPos", mCmdMapToKeepPos);
|
||||
gSavedSettings.setString("AscentCmdLineTP2", mCmdLineTP2);
|
||||
gSavedSettings.setString("SinguCmdLineAway", mCmdLineAway);
|
||||
gSavedSettings.setString("SinguCmdLineURL", mCmdLineURL);
|
||||
|
||||
//Security ----------------------------------------------------------------------------
|
||||
gSavedSettings.setBOOL("BroadcastViewerEffects", mBroadcastViewerEffects);
|
||||
|
||||
@@ -93,6 +93,7 @@ protected:
|
||||
BOOL mCmdMapToKeepPos;
|
||||
std::string mCmdLineTP2;
|
||||
std::string mCmdLineAway;
|
||||
std::string mCmdLineURL;
|
||||
|
||||
//Security ----------------------------------------------------------------------------
|
||||
BOOL mBroadcastViewerEffects;
|
||||
|
||||
@@ -237,8 +237,9 @@ bool cmd_line_chat(std::string revised_text, EChatType type)
|
||||
static LLCachedControl<bool> sAscentCmdLineMapToKeepPos(gSavedSettings, "AscentMapToKeepPos");
|
||||
static LLCachedControl<std::string> sAscentCmdLineCalc(gSavedSettings, "AscentCmdLineCalc");
|
||||
static LLCachedControl<std::string> sAscentCmdLineTP2(gSavedSettings, "AscentCmdLineTP2");
|
||||
static LLCachedControl<std::string> sSinguCmdLineClearChat(gSavedSettings, "SinguCmdLineAway");
|
||||
static LLCachedControl<std::string> sAscentCmdLineClearChat(gSavedSettings, "AscentCmdLineClearChat");
|
||||
static LLCachedControl<std::string> sSinguCmdLineAway(gSavedSettings, "SinguCmdLineAway");
|
||||
static LLCachedControl<std::string> sSinguCmdLineURL(gSavedSettings, "SinguCmdLineURL");
|
||||
|
||||
if(sAscentCmdLine)
|
||||
{
|
||||
@@ -423,11 +424,19 @@ bool cmd_line_chat(std::string revised_text, EChatType type)
|
||||
}
|
||||
return false;
|
||||
}
|
||||
else if(command == utf8str_tolower(sSinguCmdLineClearChat))
|
||||
else if(command == utf8str_tolower(sSinguCmdLineAway))
|
||||
{
|
||||
handle_fake_away_status(NULL);
|
||||
return false;
|
||||
}
|
||||
else if(command == utf8str_tolower(sSinguCmdLineURL))
|
||||
{
|
||||
if (revised_text.length() > command.length() + 1)
|
||||
{
|
||||
LLUrlAction::clickAction(revised_text.substr(command.length()+1));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
else if(command == "typingstop")
|
||||
{
|
||||
std::string text;
|
||||
|
||||
@@ -59,10 +59,12 @@
|
||||
<line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="-20" follows="top" height="20" max_length="256" name="AscentCmdLineCalc" width="200"/>
|
||||
<text bottom_delta="-18" follows="top" height="16" name="cmd_line_text_15">Clear the chat history (usage: cmd)</text>
|
||||
<line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="-20" follows="top" height="20" max_length="256" tool_tip="Clears the Chat History to prevent lag effects from chat spammers." name="AscentCmdLineClearChat" width="200"/>
|
||||
<text bottom_delta="-18" follows="top" height="16" name="cmd_line_text_16">Open url/slurl (usage: cmd slurl)</text>
|
||||
<line_editor bottom_delta="-20" follows="top" height="20" max_length="256" name="SinguCmdLineURL" width="200"/>
|
||||
<!-- Column Split -->
|
||||
<view_border bevel_style="none" border_thickness="1" bottom_delta="-5" follows="top|left" height="295"
|
||||
<view_border bevel_style="none" border_thickness="1" bottom_delta="-5" follows="top|left" height="333"
|
||||
left="230" name="CmdDivisor" width="0"/>
|
||||
<text bottom_delta="277" follows="top" height="16" left_delta="10" name="cmd_line_text_9">Change Draw Distance (usage: cmd meters)</text>
|
||||
<text bottom_delta="315" follows="top" height="16" left_delta="10" name="cmd_line_text_9">Change Draw Distance (usage: cmd meters)</text>
|
||||
<line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="-20" follows="top" height="20" max_length="256" name="AscentCmdLineDrawDistance" width="200"/>
|
||||
<text bottom_delta="-18" follows="top" height="16" name="cmd_line_text_10">Teleport to cam position (usage: cmd)</text>
|
||||
<line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="-20" follows="top" height="20" max_length="256" name="AscentCmdTeleportToCam" width="200"/>
|
||||
|
||||
Reference in New Issue
Block a user