Commit 35d45bf4 authored by Kitty Barnett's avatar Kitty Barnett
Browse files

Merged with .Catznip tip

--HG--
branch : Catznip
parents f5f4ecad d314ceb8
......@@ -785,7 +785,7 @@ Function .onInstSuccess
# Quote the updater executable and the viewer executable because each
# must be a distinct command-line token, but DO NOT quote the language
# string because it must decompose into separate command-line tokens.
Exec '"$INSTDIR\$INSTEXE" precheck "$INSTDIR\$VIEWER_EXE" $SHORTCUT_LANG_PARAM'
Exec '"$INSTDIR\$VIEWER_EXE" $SHORTCUT_LANG_PARAM'
#
FunctionEnd
......
......@@ -242,7 +242,8 @@ void LLFloaterConversationPreview::onSearch(ESearchDirection eDirection)
void LLFloaterConversationPreview::refreshMonthFilter()
{
// Timestamps, if present, will conform to TIMESTAMP_AND_STUFF so we can sa saextract by character index (see lllogchat.cpp)
// Timestamps, if present, will conform to TIMESTAMP_AND_STUFF so we can extract by character index (see lllogchat.cpp)
// (although as it turns out we can't trust any log that was imported from a different viewer)
int idxMessage = 0; month_lookup_type_t::iterator monthLookup = mMonthLookup.end(), yearLookup = mMonthLookup.end();
for (std::list<LLSD>::const_iterator itMessage = mMessages->cbegin(), endMessage = mMessages->cend(); itMessage != endMessage; ++itMessage, ++idxMessage)
{
......@@ -251,26 +252,36 @@ void LLFloaterConversationPreview::refreshMonthFilter()
continue;
std::string strTime = sdMessage[LL_IM_TIME].asString();
int nYear = boost::lexical_cast<int>(strTime.data(), 4);
int nMonth = boost::lexical_cast<int>(strTime.data() + 5, 2);
if (strTime.length() < 9)
continue;
if ( (monthLookup != mMonthLookup.end()) || (monthLookup->second.first != nYear) || (monthLookup->second.second != nMonth) )
try
{
yearLookup = mMonthLookup.find(std::make_pair(nYear, 0));
monthLookup = mMonthLookup.find(std::make_pair(nYear, nMonth));
}
int nYear = boost::lexical_cast<int>(strTime.data(), 4);
int nMonth = boost::lexical_cast<int>(strTime.data() + 5, 2);
if (mMonthLookup.end() != monthLookup)
{
monthLookup->second.second = idxMessage;
if ( (monthLookup != mMonthLookup.end()) || (monthLookup->second.first != nYear) || (monthLookup->second.second != nMonth) )
{
yearLookup = mMonthLookup.find(std::make_pair(nYear, 0));
monthLookup = mMonthLookup.find(std::make_pair(nYear, nMonth));
}
if (mMonthLookup.end() != monthLookup)
{
monthLookup->second.second = idxMessage;
}
else
{
if ( (yearLookup != mMonthLookup.end()) || (yearLookup->second.first != nYear) )
yearLookup = mMonthLookup.insert(std::make_pair(std::make_pair(nYear, 0), std::make_pair(idxMessage, idxMessage))).first;
monthLookup = mMonthLookup.insert(std::make_pair(std::make_pair(nYear, nMonth), std::make_pair(idxMessage, idxMessage))).first;
}
yearLookup->second.second = idxMessage;
}
else
catch (const boost::bad_lexical_cast&)
{
if ( (yearLookup != mMonthLookup.end()) || (yearLookup->second.first != nYear) )
yearLookup = mMonthLookup.insert(std::make_pair(std::make_pair(nYear, 0), std::make_pair(idxMessage, idxMessage))).first;
monthLookup = mMonthLookup.insert(std::make_pair(std::make_pair(nYear, nMonth), std::make_pair(idxMessage, idxMessage))).first;
continue;
}
yearLookup->second.second = idxMessage;
}
if (LLStringOps::sMonthList.empty())
......@@ -278,15 +289,18 @@ void LLFloaterConversationPreview::refreshMonthFilter()
mFilterCombo->clear();
mFilterCombo->add(getString("DefaultFilter"));
mFilterCombo->addSeparator();
for (const auto& kvYearMonth : mMonthLookup)
if (!mMonthLookup.empty())
{
std::string strItem;
if (kvYearMonth.first.second > 0)
strItem = llformat("%s %d", LLStringOps::sMonthList[kvYearMonth.first.second - 1].c_str(), kvYearMonth.first.first);
else
strItem = llformat("-- %d --", kvYearMonth.first.first);
mFilterCombo->add(strItem, LLSD().with("year", kvYearMonth.first.first).with("month", kvYearMonth.first.second));
mFilterCombo->addSeparator();
for (const auto& kvYearMonth : mMonthLookup)
{
std::string strItem;
if (kvYearMonth.first.second > 0)
strItem = llformat("%s %d", LLStringOps::sMonthList[kvYearMonth.first.second - 1].c_str(), kvYearMonth.first.first);
else
strItem = llformat("-- %d --", kvYearMonth.first.first);
mFilterCombo->add(strItem, LLSD().with("year", kvYearMonth.first.first).with("month", kvYearMonth.first.second));
}
}
mFilterCombo->selectFirstItem();
......
......@@ -66,7 +66,7 @@ const std::string GRID_SLURL_BASE = "slurl_base";
const std::string GRID_APP_SLURL_BASE = "app_slurl_base";
// [SL:KB] - Patch: Viewer-Branding | Checked: Catznip-2.8
const std::string DEFAULT_LOGIN_PAGE = "http://viewer.catznip.com/login/";
const std::string DEFAULT_LOGIN_PAGE = "https://www-staging.catznip.com/login/?channel=";
// [/SL:KB]
//const std::string DEFAULT_LOGIN_PAGE = "https://viewer-splash.secondlife.com/";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment