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>
|
<key>Value</key>
|
||||||
<string>/away</string>
|
<string>/away</string>
|
||||||
</map>
|
</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>
|
<key>SinguCompleteNameProfiles</key>
|
||||||
<map>
|
<map>
|
||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ LLPrefsAscentSys::LLPrefsAscentSys()
|
|||||||
getChild<LLUICtrl>("AscentCmdLineMapTo")->setCommitCallback(boost::bind(&LLPrefsAscentSys::onCommitCmdLine, this, _1, _2));
|
getChild<LLUICtrl>("AscentCmdLineMapTo")->setCommitCallback(boost::bind(&LLPrefsAscentSys::onCommitCmdLine, this, _1, _2));
|
||||||
getChild<LLUICtrl>("AscentCmdLineTP2")->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>("SinguCmdLineAway")->setCommitCallback(boost::bind(&LLPrefsAscentSys::onCommitCmdLine, this, _1, _2));
|
||||||
|
getChild<LLUICtrl>("SinguCmdLineURL")->setCommitCallback(boost::bind(&LLPrefsAscentSys::onCommitCmdLine, this, _1, _2));
|
||||||
|
|
||||||
//Security ----------------------------------------------------------------------------
|
//Security ----------------------------------------------------------------------------
|
||||||
getChild<LLUICtrl>("disable_click_sit_check")->setCommitCallback(boost::bind(&LLPrefsAscentSys::onCommitCheckBox, this, _1, _2));
|
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("map_to_keep_pos", enabled);
|
||||||
childSetEnabled("AscentCmdLineTP2", enabled);
|
childSetEnabled("AscentCmdLineTP2", enabled);
|
||||||
childSetEnabled("SinguCmdLineAway", enabled);
|
childSetEnabled("SinguCmdLineAway", enabled);
|
||||||
|
childSetEnabled("SinguCmdLineURL", enabled);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -240,6 +242,7 @@ void LLPrefsAscentSys::refreshValues()
|
|||||||
mCmdMapToKeepPos = gSavedSettings.getBOOL("AscentMapToKeepPos");
|
mCmdMapToKeepPos = gSavedSettings.getBOOL("AscentMapToKeepPos");
|
||||||
mCmdLineTP2 = gSavedSettings.getString("AscentCmdLineTP2");
|
mCmdLineTP2 = gSavedSettings.getString("AscentCmdLineTP2");
|
||||||
mCmdLineAway = gSavedSettings.getString("SinguCmdLineAway");
|
mCmdLineAway = gSavedSettings.getString("SinguCmdLineAway");
|
||||||
|
mCmdLineURL = gSavedSettings.getString("SinguCmdLineURL");
|
||||||
|
|
||||||
//Security ----------------------------------------------------------------------------
|
//Security ----------------------------------------------------------------------------
|
||||||
mBroadcastViewerEffects = gSavedSettings.getBOOL("BroadcastViewerEffects");
|
mBroadcastViewerEffects = gSavedSettings.getBOOL("BroadcastViewerEffects");
|
||||||
@@ -314,6 +317,7 @@ void LLPrefsAscentSys::refresh()
|
|||||||
childSetEnabled("map_to_keep_pos", mCmdLine);
|
childSetEnabled("map_to_keep_pos", mCmdLine);
|
||||||
childSetEnabled("AscentCmdLineTP2", mCmdLine);
|
childSetEnabled("AscentCmdLineTP2", mCmdLine);
|
||||||
childSetEnabled("SinguCmdLineAway", mCmdLine);
|
childSetEnabled("SinguCmdLineAway", mCmdLine);
|
||||||
|
childSetEnabled("SinguCmdLineURL", mCmdLine);
|
||||||
|
|
||||||
//Security ----------------------------------------------------------------------------
|
//Security ----------------------------------------------------------------------------
|
||||||
childSetValue("AscentCmdLinePos", mCmdLinePos);
|
childSetValue("AscentCmdLinePos", mCmdLinePos);
|
||||||
@@ -330,6 +334,7 @@ void LLPrefsAscentSys::refresh()
|
|||||||
childSetValue("AscentCmdLineMapTo", mCmdLineMapTo);
|
childSetValue("AscentCmdLineMapTo", mCmdLineMapTo);
|
||||||
childSetValue("AscentCmdLineTP2", mCmdLineTP2);
|
childSetValue("AscentCmdLineTP2", mCmdLineTP2);
|
||||||
childSetValue("SinguCmdLineAway", mCmdLineAway);
|
childSetValue("SinguCmdLineAway", mCmdLineAway);
|
||||||
|
childSetValue("SinguCmdLineURL", mCmdLineURL);
|
||||||
|
|
||||||
//Build -------------------------------------------------------------------------------
|
//Build -------------------------------------------------------------------------------
|
||||||
childSetValue("alpha", mAlpha);
|
childSetValue("alpha", mAlpha);
|
||||||
@@ -392,6 +397,7 @@ void LLPrefsAscentSys::cancel()
|
|||||||
gSavedSettings.setBOOL("AscentMapToKeepPos", mCmdMapToKeepPos);
|
gSavedSettings.setBOOL("AscentMapToKeepPos", mCmdMapToKeepPos);
|
||||||
gSavedSettings.setString("AscentCmdLineTP2", mCmdLineTP2);
|
gSavedSettings.setString("AscentCmdLineTP2", mCmdLineTP2);
|
||||||
gSavedSettings.setString("SinguCmdLineAway", mCmdLineAway);
|
gSavedSettings.setString("SinguCmdLineAway", mCmdLineAway);
|
||||||
|
gSavedSettings.setString("SinguCmdLineURL", mCmdLineURL);
|
||||||
|
|
||||||
//Security ----------------------------------------------------------------------------
|
//Security ----------------------------------------------------------------------------
|
||||||
gSavedSettings.setBOOL("BroadcastViewerEffects", mBroadcastViewerEffects);
|
gSavedSettings.setBOOL("BroadcastViewerEffects", mBroadcastViewerEffects);
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ protected:
|
|||||||
BOOL mCmdMapToKeepPos;
|
BOOL mCmdMapToKeepPos;
|
||||||
std::string mCmdLineTP2;
|
std::string mCmdLineTP2;
|
||||||
std::string mCmdLineAway;
|
std::string mCmdLineAway;
|
||||||
|
std::string mCmdLineURL;
|
||||||
|
|
||||||
//Security ----------------------------------------------------------------------------
|
//Security ----------------------------------------------------------------------------
|
||||||
BOOL mBroadcastViewerEffects;
|
BOOL mBroadcastViewerEffects;
|
||||||
|
|||||||
@@ -237,8 +237,9 @@ bool cmd_line_chat(std::string revised_text, EChatType type)
|
|||||||
static LLCachedControl<bool> sAscentCmdLineMapToKeepPos(gSavedSettings, "AscentMapToKeepPos");
|
static LLCachedControl<bool> sAscentCmdLineMapToKeepPos(gSavedSettings, "AscentMapToKeepPos");
|
||||||
static LLCachedControl<std::string> sAscentCmdLineCalc(gSavedSettings, "AscentCmdLineCalc");
|
static LLCachedControl<std::string> sAscentCmdLineCalc(gSavedSettings, "AscentCmdLineCalc");
|
||||||
static LLCachedControl<std::string> sAscentCmdLineTP2(gSavedSettings, "AscentCmdLineTP2");
|
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> sAscentCmdLineClearChat(gSavedSettings, "AscentCmdLineClearChat");
|
||||||
|
static LLCachedControl<std::string> sSinguCmdLineAway(gSavedSettings, "SinguCmdLineAway");
|
||||||
|
static LLCachedControl<std::string> sSinguCmdLineURL(gSavedSettings, "SinguCmdLineURL");
|
||||||
|
|
||||||
if(sAscentCmdLine)
|
if(sAscentCmdLine)
|
||||||
{
|
{
|
||||||
@@ -423,11 +424,19 @@ bool cmd_line_chat(std::string revised_text, EChatType type)
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if(command == utf8str_tolower(sSinguCmdLineClearChat))
|
else if(command == utf8str_tolower(sSinguCmdLineAway))
|
||||||
{
|
{
|
||||||
handle_fake_away_status(NULL);
|
handle_fake_away_status(NULL);
|
||||||
return false;
|
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")
|
else if(command == "typingstop")
|
||||||
{
|
{
|
||||||
std::string text;
|
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"/>
|
<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>
|
<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"/>
|
<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 -->
|
<!-- 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"/>
|
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"/>
|
<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>
|
<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"/>
|
<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