Add Firestorm help SLUrl
parent
8ef2d26d8f
commit
cf9528018e
|
|
@ -1349,6 +1349,26 @@ std::string LLUrlEntrySL::getLabel(const std::string &url, const LLUrlLabelCallb
|
|||
return unescapeUrl(url);
|
||||
}
|
||||
|
||||
// <FS:Ansariel> FS Help SLUrl
|
||||
///
|
||||
/// FSHelpDebugUrlEntrySL Describes a Firestorm Help SLURL, e.g.
|
||||
/// secondlife://app/fshelp/showdebug/DisplayIM
|
||||
///
|
||||
FSHelpDebugUrlEntrySL::FSHelpDebugUrlEntrySL()
|
||||
{
|
||||
mPattern = boost::regex("(hop|secondlife|inworldz|iw):///app/fshelp/showdebug/\\S+",
|
||||
boost::regex::perl|boost::regex::icase);
|
||||
mMenuName = "menu_url_slapp.xml";
|
||||
mTooltip = LLTrans::getString("TooltipFSHelpDebugSLUrl");
|
||||
}
|
||||
|
||||
std::string FSHelpDebugUrlEntrySL::getLabel(const std::string &url, const LLUrlLabelCallback &cb)
|
||||
{
|
||||
std::string::size_type pos = url.find("showdebug/") + 10;
|
||||
return url.substr(pos);
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
//
|
||||
// LLUrlEntrySLLabel Describes a generic SLURL, e.g., a Url that starts
|
||||
/// with secondlife:// with the ability to specify a custom label.
|
||||
|
|
|
|||
|
|
@ -490,6 +490,19 @@ public:
|
|||
/*virtual*/ std::string getLocation(const std::string &url) const;
|
||||
};
|
||||
|
||||
// <FS:Ansariel> FS Help SLUrl
|
||||
///
|
||||
/// FSHelpDebugUrlEntrySL Describes a Firestorm Help SLURL, e.g.
|
||||
/// secondlife://app/fshelp/showdebug/DisplayIM
|
||||
///
|
||||
class FSHelpDebugUrlEntrySL : public LLUrlEntryBase
|
||||
{
|
||||
public:
|
||||
FSHelpDebugUrlEntrySL();
|
||||
/*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb);
|
||||
};
|
||||
// </FS:Ansariel>
|
||||
|
||||
///
|
||||
/// LLUrlEntrySL Describes a generic SLURL, e.g., a Url that starts
|
||||
/// with secondlife:// (used as a catch-all for cases not matched above)
|
||||
|
|
|
|||
|
|
@ -82,6 +82,7 @@ LLUrlRegistry::LLUrlRegistry()
|
|||
registerUrl(new LLUrlEntryPlace());
|
||||
registerUrl(new LLUrlEntryInventory());
|
||||
registerUrl(new LLUrlEntryExperienceProfile());
|
||||
registerUrl(new FSHelpDebugUrlEntrySL()); // <FS:Ansariel> FS Help SLUrl
|
||||
//LLUrlEntrySL and LLUrlEntrySLLabel have more common pattern,
|
||||
//so it should be registered in the end of list
|
||||
registerUrl(new LLUrlEntrySL());
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
#include "llagent.h"
|
||||
#include "llavataractions.h"
|
||||
#include "llcommandhandler.h"
|
||||
#include "llfloatersettingsdebug.h"
|
||||
#include "lllogchat.h"
|
||||
#include "llnotificationsutil.h"
|
||||
|
||||
|
|
@ -140,3 +141,30 @@ public:
|
|||
|
||||
// Creating the object registers with the dispatcher.
|
||||
FSSlurlCommandHandler gFSSlurlHandler;
|
||||
|
||||
class FSHelpSlurlCommandHandler : public LLCommandHandler
|
||||
{
|
||||
public:
|
||||
// not allowed from outside the app
|
||||
FSHelpSlurlCommandHandler() : LLCommandHandler("fshelp", UNTRUSTED_THROTTLE) { }
|
||||
|
||||
bool handle(const LLSD& params, const LLSD& query_map, LLMediaCtrl* web)
|
||||
{
|
||||
if (params.size() < 2)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (params[0].asString() == "showdebug")
|
||||
{
|
||||
std::string setting_name = params[1].asString();
|
||||
LLFloaterSettingsDebug::showControl(setting_name);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
// Creating the object registers with the dispatcher.
|
||||
FSHelpSlurlCommandHandler gFSHelpSlurlCommandHandler;
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@
|
|||
// [/RLVa:KB]
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llwindow.h"
|
||||
#include "llfloaterreg.h"
|
||||
|
||||
LLFloaterSettingsDebug::LLFloaterSettingsDebug(const LLSD& key)
|
||||
: LLFloater(key)
|
||||
|
|
@ -598,3 +599,10 @@ void LLFloaterSettingsDebug::updateControl()
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterSettingsDebug::showControl(const std::string& control)
|
||||
{
|
||||
LLFloaterSettingsDebug* instance = LLFloaterReg::showTypedInstance<LLFloaterSettingsDebug>("settings_debug", "all", TRUE);
|
||||
instance->mSearchSettingsInput->setText(control);
|
||||
instance->onUpdateFilter();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ public:
|
|||
void onClickDefault();
|
||||
void onCopyToClipboard();
|
||||
void onSanityCheck();
|
||||
static void showControl(const std::string& control);
|
||||
|
||||
private:
|
||||
// key - selects which settings to show, one of:
|
||||
|
|
|
|||
|
|
@ -697,6 +697,9 @@ Warten Sie kurz und versuchen Sie dann noch einmal, sich anzumelden.
|
|||
<string name="TooltipSLAPP">
|
||||
Anklicken, um Befehl secondlife:// auszuführen
|
||||
</string>
|
||||
<string name="TooltipFSHelpDebugSLUrl">
|
||||
Anklicken, um das Fenster mit Debug-Einstellungen für diese Einstellung zu öffnen
|
||||
</string>
|
||||
<string name="CurrentURL" value=" CurrentURL: [CurrentURL]"/>
|
||||
<string name="TooltipEmail">
|
||||
Klicken, um eine E-Mail zu verfassen
|
||||
|
|
|
|||
|
|
@ -339,6 +339,7 @@ Please try logging in again in a minute.</string>
|
|||
<string name="TooltipObjectIMUrl">Click to view this object's description</string>
|
||||
<string name="TooltipMapUrl">Click to view this location on a map</string>
|
||||
<string name="TooltipSLAPP">Click to run the secondlife:// command</string>
|
||||
<string name="TooltipFSHelpDebugSLUrl">Click to open the debug settings window for this setting</string>
|
||||
<string name="CurrentURL" value=" CurrentURL: [CurrentURL]" />
|
||||
<string name="TooltipEmail">Click to compose an email</string>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue