do some magic EXPECTO PATRONUM

This commit is contained in:
bittenbythedark
2019-03-01 16:23:30 +01:00
parent b80be075d7
commit 1c6bdf7aef
9 changed files with 52 additions and 49 deletions

View File

@@ -1 +0,0 @@
# singuosfork

View File

@@ -48,8 +48,8 @@ HippoGridInfo::HippoGridInfo(const std::string& gridName) :
mWebSite(LLStringUtil::null),
mSupportUrl(LLStringUtil::null),
mRegisterUrl(LLStringUtil::null),
mPasswordUrl(LLStringUtil::null),
mPartnerUrl(LLStringUtil::null),
mPasswordUrl(LLStringUtil::null),
mSearchUrl(LLStringUtil::null),
mGridMessage(""),
mXmlState(XML_VOID),
@@ -216,16 +216,16 @@ void HippoGridInfo::setRegisterUrl(const std::string& url)
mRegisterUrl = url;
}
void HippoGridInfo::setPasswordUrl(const std::string& url)
{
mPasswordUrl = url;
}
void HippoGridInfo::setPartnerUrl(const std::string& url)
{
mPartnerUrl = url;
}
void HippoGridInfo::setPasswordUrl(const std::string& url)
{
mPasswordUrl = url;
}
void HippoGridInfo::setSearchUrl(const std::string& url)
{
mSearchUrl = url;
@@ -283,10 +283,10 @@ void HippoGridInfo::onXmlElementStart(void* userData, const XML_Char* name, cons
self->mXmlState = XML_SUPPORT;
else if ((strcasecmp(name, "register") == 0) || (strcasecmp(name, "account") == 0))
self->mXmlState = XML_REGISTER;
else if (strcasecmp(name, "password") == 0)
self->mXmlState = XML_PASSWORD;
else if (strcasecmp(name, "partner") == 0)
self->mXmlState = XML_PARTNER;
else if (strcasecmp(name, "password") == 0)
self->mXmlState = XML_PASSWORD;
else if (strcasecmp(name, "search") == 0)
self->mXmlState = XML_SEARCH;
else if (strcasecmp(name, "message") == 0)
@@ -355,8 +355,8 @@ void HippoGridInfo::onXmlCharacterData(void* userData, const XML_Char* s, int le
case XML_WEBSITE: self->mWebSite.assign(s, len); break;
case XML_SUPPORT: self->mSupportUrl.assign(s, len); break;
case XML_REGISTER: self->mRegisterUrl.assign(s, len); break;
case XML_PASSWORD: self->mPasswordUrl.assign(s, len); break;
case XML_PARTNER: self->mPartnerUrl.assign(s, len); break;
case XML_PASSWORD: self->mPasswordUrl.assign(s, len); break;
case XML_MESSAGE: self->mGridMessage.assign(s, len); break;
case XML_VOID: break;
@@ -902,8 +902,8 @@ void HippoGridManager::parseData(LLSD &gridInfo, bool mergeIfNewer)
if (gridMap.has("website")) grid->setWebSite(gridMap["website"]);
if (gridMap.has("support")) grid->setSupportUrl(gridMap["support"]);
if (gridMap.has("register")) grid->setRegisterUrl(gridMap["register"]);
if (gridMap.has("password")) grid->setPasswordUrl(gridMap["password"]);
if (gridMap.has("partner")) grid->setPartnerUrl(gridMap["partner"]);
if (gridMap.has("password")) grid->setPasswordUrl(gridMap["password"]);
if (gridMap.has("search")) grid->setSearchUrl(gridMap["search"]);
if (gridMap.has("render_compat")) grid->setRenderCompat(gridMap["render_compat"]);
if (gridMap.has("auto_update")) grid->mAutoUpdate = gridMap["auto_update"];
@@ -938,8 +938,8 @@ void HippoGridManager::saveFile()
gridInfo[i]["website"] = grid->getWebSite();
gridInfo[i]["support"] = grid->getSupportUrl();
gridInfo[i]["register"] = grid->getRegisterUrl();
gridInfo[i]["password"] = grid->getPasswordUrl();
gridInfo[i]["partner"] = grid->getPartnerUrl();
gridInfo[i]["password"] = grid->getPasswordUrl();
gridInfo[i]["search"] = grid->getSearchUrl();
gridInfo[i]["render_compat"] = grid->isRenderCompat();

View File

@@ -48,8 +48,8 @@ public:
const std::string& getWebSite() const { return mWebSite; }
const std::string& getSupportUrl() const { return mSupportUrl; }
const std::string& getRegisterUrl() const { return mRegisterUrl; }
const std::string& getPasswordUrl() const { return mPasswordUrl; }
const std::string& getPartnerUrl() const { return mPartnerUrl; }
const std::string& getPasswordUrl() const { return mPasswordUrl; }
// Returns the url base used for the Web Search tab
const std::string& getSearchUrl() const { return mSearchUrl; }
const std::string& getGridMessage() const { return mGridMessage; }
@@ -76,8 +76,8 @@ public:
void setWebSite (const std::string& website);
void setSupportUrl(const std::string& url);
void setRegisterUrl(const std::string& url);
void setPasswordUrl(const std::string& url);
void setPartnerUrl(const std::string& url);
void setPasswordUrl(const std::string& url);
// sets the url base used for the Web Search tab
void setSearchUrl(const std::string& url);
void setGridMessage(const std::string& message);
@@ -113,8 +113,8 @@ private:
std::string mWebSite;
std::string mSupportUrl;
std::string mRegisterUrl;
std::string mPasswordUrl;
std::string mPartnerUrl;
std::string mPasswordUrl;
std::string mSearchUrl;
std::string mVoiceConnector;
bool mIsInProductionGrid;
@@ -137,7 +137,7 @@ private:
{
XML_VOID, XML_PLATFORM, XML_GRIDNAME, XML_GRIDNICK,
XML_LOGINURI, XML_LOGINPAGE, XML_HELPERURI,
XML_WEBSITE, XML_SUPPORT, XML_REGISTER, XML_PASSWORD, XML_PARTNER, XML_SEARCH, XML_MESSAGE
XML_WEBSITE, XML_SUPPORT, XML_REGISTER, XML_PARTNER, XML_PASSWORD, XML_SEARCH, XML_MESSAGE
};
XmlState mXmlState;

View File

@@ -130,8 +130,8 @@ BOOL HippoPanelGridsImpl::postBuild()
requires<LLLineEditor>("website");
requires<LLLineEditor>("support");
requires<LLLineEditor>("register");
requires<LLLineEditor>("password");
requires<LLLineEditor>("partner");
requires<LLLineEditor>("password");
requires<LLLineEditor>("search");
requires<LLButton>("btn_delete");
requires<LLButton>("btn_add");
@@ -245,8 +245,8 @@ void HippoPanelGridsImpl::loadCurGrid()
childSetText("support", gridInfo->getSupportUrl());
childSetText("search", gridInfo->getSearchUrl());
childSetText("register", gridInfo->getRegisterUrl());
childSetText("password", gridInfo->getPasswordUrl());
childSetText("partner", gridInfo->getPartnerUrl());
childSetText("password", gridInfo->getPasswordUrl());
childSetValue("render_compat", gridInfo->isRenderCompat());
enableEditing(!gridInfo->getLocked());
} else {
@@ -261,8 +261,8 @@ void HippoPanelGridsImpl::loadCurGrid()
childSetText("support", empty);
childSetText("search", empty);
childSetText("register", empty);
childSetText("password", empty);
childSetText("partner", empty);
childSetText("password", empty);
childSetValue("render_compat", true);
enableEditing(true);
}
@@ -364,8 +364,8 @@ bool HippoPanelGridsImpl::saveCurGrid()
gridInfo->setWebSite(childGetValue("website"));
gridInfo->setSupportUrl(childGetValue("support"));
gridInfo->setRegisterUrl(childGetValue("register"));
gridInfo->setPasswordUrl(childGetValue("password"));
gridInfo->setPartnerUrl(childGetValue("partner"));
gridInfo->setPasswordUrl(childGetValue("password"));
gridInfo->setSearchUrl(childGetValue("search"));
gridInfo->setRenderCompat(childGetValue("render_compat"));
@@ -423,8 +423,8 @@ void HippoPanelGridsImpl::retrieveGridInfo()
if (grid->getWebSite() != "") childSetText("website", grid->getWebSite());
if (grid->getSupportUrl() != "") childSetText("support", grid->getSupportUrl());
if (grid->getRegisterUrl() != "") childSetText("register", grid->getRegisterUrl());
if (grid->getPasswordUrl() != "") childSetText("password", grid->getPasswordUrl());
if (grid->getPartnerUrl() != "") childSetText("partner", grid->getPartnerUrl());
if (grid->getPasswordUrl() != "") childSetText("password", grid->getPasswordUrl());
if (grid->getSearchUrl() != "") childSetText("search", grid->getSearchUrl());
if (grid->getGridMessage() != "") childSetText("gridmessage", grid->getGridMessage());
}
@@ -537,10 +537,10 @@ void HippoPanelGridsImpl::onClickAdvanced(void *data)
self->childSetVisible("support", false);
self->childSetVisible("register_label", false);
self->childSetVisible("register", false);
self->childSetVisible("password_label", false);
self->childSetVisible("password", false);
self->childSetVisible("partner_label", false);
self->childSetVisible("partner", false);
self->childSetVisible("password_label", false);
self->childSetVisible("password", false);
self->childSetVisible("search_label", false);
self->childSetVisible("search", false);
self->childSetVisible("render_compat", false);
@@ -558,10 +558,10 @@ void HippoPanelGridsImpl::onClickAdvanced(void *data)
self->childSetVisible("support", true);
self->childSetVisible("register_label", true);
self->childSetVisible("register", true);
self->childSetVisible("password_label", true);
self->childSetVisible("password", true);
self->childSetVisible("partner_label", true);
self->childSetVisible("partner", true);
self->childSetVisible("password_label", true);
self->childSetVisible("password", true);
self->childSetVisible("search_label", true);
self->childSetVisible("search", true);
self->childSetVisible("render_compat", true);
@@ -587,8 +587,8 @@ void HippoPanelGridsImpl::enableEditing(bool b)
"website",
"support",
"register",
"password",
"partner",
"password",
"search",
"btn_delete",
"btn_gridinfo",

View File

@@ -92,6 +92,7 @@ void LFSimFeatureHandler::setSupportedFeatures()
mGridName = gHippoGridManager->getConnectedGrid()->getGridName() != grid_name ? grid_name : LLStringUtil::null;
}
}
has_feature_or_default(mEventsURL, extras, "EventsURL");
has_feature_or_default(mSayRange, extras, "say-range");
has_feature_or_default(mShoutRange, extras, "shout-range");
has_feature_or_default(mWhisperRange, extras, "whisper-range");
@@ -105,6 +106,7 @@ void LFSimFeatureHandler::setSupportedFeatures()
mMapServerURL = LLStringUtil::null;
mSearchURL.reset();
mGridName.reset();
mEventsURL.reset();
}
mSayRange.reset();
mShoutRange.reset();

View File

@@ -65,6 +65,7 @@ public:
boost::signals2::connection setSupportsExportCallback(const SignaledType<bool>::slot_t& slot) { return mSupportsExport.connect(slot); }
boost::signals2::connection setDestinationGuideURLCallback(const SignaledType<std::string>::slot_t& slot) { return mDestinationGuideURL.connect(slot); }
boost::signals2::connection setSearchURLCallback(const SignaledType<std::string>::slot_t& slot) { return mSearchURL.connect(slot); }
boost::signals2::connection setEventsURLCallback(const SignaledType<std::string>::slot_t& slot) { return mEventsURL.connect(slot); }
boost::signals2::connection setSayRangeCallback(const SignaledType<U32>::slot_t& slot) { return mSayRange.connect(slot); }
boost::signals2::connection setShoutRangeCallback(const SignaledType<U32>::slot_t& slot) { return mShoutRange.connect(slot); }
boost::signals2::connection setWhisperRangeCallback(const SignaledType<U32>::slot_t& slot) { return mWhisperRange.connect(slot); }
@@ -74,6 +75,7 @@ public:
std::string destinationGuideURL() const { return mDestinationGuideURL; }
std::string mapServerURL() const { return mMapServerURL; }
std::string searchURL() const { return mSearchURL; }
const std::string& getEventsURL() const { return mEventsURL.ref(); }
const std::string& gridName() const { return mGridName.ref(); }
U32 sayRange() const { return mSayRange; }
U32 shoutRange() const { return mShoutRange; }
@@ -87,6 +89,7 @@ private:
std::string mMapServerURL;
SignaledType<std::string> mSearchURL;
SignaledType<std::string> mGridName;
SignaledType<std::string> mEventsURL;
SignaledType<U32> mSayRange;
SignaledType<U32> mShoutRange;
SignaledType<U32> mWhisperRange;

View File

@@ -70,9 +70,8 @@
#include <iosfwd>
#include <boost/date_time.hpp>
//Include Gridmanager for Profile
#include "hippogridmanager.h"
#include "hippopanelgrids.h"
#include "hippogridmanager.h" // Include Gridmanager for OpenSim Support in profiles, provides ability for the helpbutton to redirect to GRID Websites Help page
// [RLVa:KB]
#include "rlvhandler.h"

View File

@@ -54,6 +54,8 @@
#include "llweb.h"
#include "llworldmap.h"
#include "lluictrlfactory.h"
#include "hippogridmanager.h"
#include "lfsimfeaturehandler.h"
//static
std::list<LLPanelEvent*> LLPanelEvent::sAllPanels;
@@ -69,6 +71,10 @@ LLPanelEvent::~LLPanelEvent()
sAllPanels.remove(this);
}
void enable_create(const std::string& url, LLView* btn)
{
btn->setEnabled(!url.empty());
}
BOOL LLPanelEvent::postBuild()
{
@@ -97,8 +103,15 @@ BOOL LLPanelEvent::postBuild()
mNotifyBtn = getChild<LLButton>( "notify_btn");
mNotifyBtn->setClickedCallback(boost::bind(&LLPanelEvent::onClickNotify,this));
mCreateEventBtn = getChild<LLButton>( "create_event_btn");
mCreateEventBtn->setClickedCallback(boost::bind(&LLPanelEvent::onClickCreateEvent,this));
mCreateEventBtn = getChild<LLButton>("create_event_btn");
mCreateEventBtn->setClickedCallback(boost::bind(&LLPanelEvent::onClickCreateEvent, this));
if (!gHippoGridManager->getConnectedGrid()->isSecondLife())
{
auto& inst(LFSimFeatureHandler::instance());
mCreateEventBtn->setEnabled(!inst.getEventsURL().empty());
inst.setEventsURLCallback(boost::bind(enable_create, _1, mCreateEventBtn));
}
return TRUE;
}
@@ -286,8 +299,8 @@ bool LLPanelEvent::callbackCreateEventWebPage(const LLSD& notification, const LL
if (0 == option)
{
LL_INFOS() << "Loading events page " << EVENTS_URL << LL_ENDL;
LLWeb::loadURL(EVENTS_URL);
const std::string& opensim_events = LFSimFeatureHandler::instance().getEventsURL();
LLWeb::loadURL(opensim_events.empty() ? EVENTS_URL : opensim_events);
}
return false;
}

View File

@@ -211,22 +211,9 @@
font="SansSerifSmall"
follows="left|top|right" border_visible="false" mouse_opaque="false"
drop_shadow_visible="true" border_drop_shadow_visible="false" />
<!-- Password URL -->
<text type="string" length="1" enabled="true" name="partner_label"
height="10" width="100" left="12" bottom_delta="-20" visible="false"
h_pad="0" v_pad="0" halign="left"
font="SansSerifSmall"
follows="left|top" bg_visible="false" border_visible="false" mouse_opaque="true"
drop_shadow_visible="true" border_drop_shadow_visible="false">
Partner URL:
</text>
<line_editor max_length="254" enabled="true" name="partner"
handle_edit_keys_directly="true" visible="false"
height="18" left="120" right="-12" bottom_delta="-4"
halign="right"
font="SansSerifSmall"
follows="left|top|right" border_visible="false" mouse_opaque="false"
drop_shadow_visible="true" border_drop_shadow_visible="false" />
<!-- Partner URL -->
<text name="partner_label" height="10" width="100" left="12" bottom_delta="-20" follows="left|top">Partner URL:</text>
<line_editor max_length="254" name="partner" handle_edit_keys_directly="true" height="18" left="120" right="-12" bottom_delta="-4" font="SansSerifSmall" follows="left|top|right"/>
<!-- Search URL -->
<text type="string" length="1" enabled="true" name="search_label"
height="10" width="100" left="12" bottom_delta="-20" visible="false"