Login Response support for destination_guide_url, OpenSimExtras support (properly) search-server-url, and support the new destination-guide-url from OpenSimExtras

Expands SignaledType's callback to accept const Type& as argument.
typedefs Signal::slot_type to slot_t so that SignaledType can be altered without needing to update all lines setting slots.

Merges floater_directory.xml with floater_directory(2|3).xml
Condenses translations down to one xml(, finally the nightmare is over).
Better ui code support for classic find all panel
Not like anyone cares, but ShowcaseURLDefault no longer persists value changes between sessions.

Moves SearchType and getSearchUrl(SearchType ty, bool is_web) from HippoGridInfo into a namespace in llpaneldirfind.cpp, the only place where it is used; so that it may wrap the sim feature lookup.

Thanks to Shyotl for the help in dynamically maintaining tab positions for dynamic tabs.
This commit is contained in:
Inusaito Sayori
2014-07-31 08:12:00 -04:00
parent f3a48bb0f0
commit 7fee70543d
20 changed files with 359 additions and 3112 deletions

View File

@@ -260,99 +260,6 @@ void HippoGridInfo::setDirectoryFee(int fee)
// ********************************************************************
// Grid Info
std::string HippoGridInfo::getSearchUrl(SearchType ty, bool is_web) const
{
// Don't worry about whether or not mSearchUrl is empty here anymore -- MC
if (is_web)
{
if (mPlatform == PLATFORM_SECONDLIFE)
{
// Second Life defaults
if (ty == SEARCH_ALL_EMPTY)
{
return gSavedSettings.getString("SearchURLDefault");
}
else if (ty == SEARCH_ALL_QUERY)
{
return gSavedSettings.getString("SearchURLQuery");
}
else if (ty == SEARCH_ALL_TEMPLATE)
{
return gSavedSettings.getString("SearchURLSuffix2");
}
else
{
llinfos << "Illegal search URL type " << ty << llendl;
return "";
}
}
else if (!mSearchUrl.empty())
{
// Search url sent to us in the login response
if (ty == SEARCH_ALL_EMPTY)
{
return (mSearchUrl);
}
else if (ty == SEARCH_ALL_QUERY)
{
return (mSearchUrl + "q=[QUERY]&s=[COLLECTION]&");
}
else if (ty == SEARCH_ALL_TEMPLATE)
{
return "lang=[LANG]&mat=[MATURITY]&t=[TEEN]&region=[REGION]&x=[X]&y=[Y]&z=[Z]&session=[SESSION]&dice=[DICE]";
}
else
{
llinfos << "Illegal search URL type " << ty << llendl;
return "";
}
}
else
{
// OpenSim and other web search defaults
if (ty == SEARCH_ALL_EMPTY)
{
return gSavedSettings.getString("SearchURLDefaultOpenSim");
}
else if (ty == SEARCH_ALL_QUERY)
{
return gSavedSettings.getString("SearchURLQueryOpenSim");
}
else if (ty == SEARCH_ALL_TEMPLATE)
{
return gSavedSettings.getString("SearchURLSuffixOpenSim");
}
else
{
llinfos << "Illegal search URL type " << ty << llendl;
return "";
}
}
}
else
{
// Use the old search all
if (ty == SEARCH_ALL_EMPTY)
{
return (mSearchUrl + "panel=All&");
}
else if (ty == SEARCH_ALL_QUERY)
{
return (mSearchUrl + "q=[QUERY]&s=[COLLECTION]&");
}
else if (ty == SEARCH_ALL_TEMPLATE)
{
return "lang=[LANG]&m=[MATURITY]&t=[TEEN]&region=[REGION]&x=[X]&y=[Y]&z=[Z]&session=[SESSION]&dice=[DICE]";
}
else
{
llinfos << "Illegal search URL type " << ty << llendl;
return "";
}
}
}
//static
void HippoGridInfo::onXmlElementStart(void* userData, const XML_Char* name, const XML_Char** atts)
{