merge changes from snowstorm team review build
commit
ebbadcf772
|
|
@ -219,6 +219,7 @@ Boroondas Gupte
|
|||
VWR-20891
|
||||
VWR-23455
|
||||
VWR-24487
|
||||
VWR-26066
|
||||
WEB-262
|
||||
Bulli Schumann
|
||||
CT-218
|
||||
|
|
|
|||
|
|
@ -52,8 +52,20 @@ LLDirIterator::Impl::Impl(const std::string &dirname, const std::string &mask)
|
|||
{
|
||||
fs::path dir_path(dirname);
|
||||
|
||||
// Check if path exists.
|
||||
if (!fs::exists(dir_path))
|
||||
bool is_dir = false;
|
||||
|
||||
// Check if path is a directory.
|
||||
try
|
||||
{
|
||||
is_dir = fs::is_directory(dir_path);
|
||||
}
|
||||
catch (fs::basic_filesystem_error<fs::path>& e)
|
||||
{
|
||||
llwarns << e.what() << llendl;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!is_dir)
|
||||
{
|
||||
llwarns << "Invalid path: \"" << dir_path.string() << "\"" << llendl;
|
||||
return;
|
||||
|
|
@ -66,7 +78,7 @@ LLDirIterator::Impl::Impl(const std::string &dirname, const std::string &mask)
|
|||
}
|
||||
catch (fs::basic_filesystem_error<fs::path>& e)
|
||||
{
|
||||
llerrs << e.what() << llendl;
|
||||
llwarns << e.what() << llendl;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -82,7 +94,7 @@ LLDirIterator::Impl::Impl(const std::string &dirname, const std::string &mask)
|
|||
}
|
||||
catch (boost::regex_error& e)
|
||||
{
|
||||
llerrs << "\"" << exp << "\" is not a valid regular expression: "
|
||||
llwarns << "\"" << exp << "\" is not a valid regular expression: "
|
||||
<< e.what() << llendl;
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3848,7 +3848,7 @@
|
|||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string>https://www.xstreetsl.com/modules.php?name=Marketplace&CategoryID=233</string>
|
||||
<string>https://marketplace.secondlife.com/products/search?search[category_id]=200&search[maturity][]=General&search[page]=1&search[per_page]=12</string>
|
||||
</map>
|
||||
<key>GridCrossSections</key>
|
||||
<map>
|
||||
|
|
|
|||
|
|
@ -27,10 +27,16 @@
|
|||
|
||||
#include "lldateutil.h"
|
||||
|
||||
#include <boost/date_time/gregorian/gregorian.hpp>
|
||||
#include <boost/date_time/posix_time/ptime.hpp>
|
||||
|
||||
// Linden libraries
|
||||
#include "lltrans.h"
|
||||
#include "llui.h"
|
||||
|
||||
using namespace boost::gregorian;
|
||||
using namespace boost::posix_time;
|
||||
|
||||
static S32 DAYS_PER_MONTH_NOLEAP[] =
|
||||
{ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
|
||||
static S32 DAYS_PER_MONTH_LEAP[] =
|
||||
|
|
@ -186,3 +192,24 @@ std::string LLDateUtil::ageFromDate(const std::string& date_string)
|
|||
//{
|
||||
// return ageFromDateISO(date_string, LLDate::now());
|
||||
//}
|
||||
|
||||
S32 LLDateUtil::secondsSinceEpochFromString(const std::string& format, const std::string& str)
|
||||
{
|
||||
date_input_facet *facet = new date_input_facet(format);
|
||||
|
||||
std::stringstream ss;
|
||||
ss << str;
|
||||
ss.imbue(std::locale(ss.getloc(), facet));
|
||||
|
||||
date d;
|
||||
ss >> d;
|
||||
|
||||
ptime time_t_date(d);
|
||||
ptime time_t_epoch(date(1970,1,1));
|
||||
|
||||
// We assume that the date defined by str is in UTC, so the difference
|
||||
// is calculated with no time zone corrections.
|
||||
time_duration diff = time_t_date - time_t_epoch;
|
||||
|
||||
return diff.total_seconds();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,6 +69,20 @@ namespace LLDateUtil
|
|||
//std::string ageFromDateISO(const std::string& date_string);
|
||||
|
||||
//std::string ageFromDate(S32 born_year, S32 born_month, S32 born_day, const LLDate& now);
|
||||
|
||||
/**
|
||||
* Convert a string of a specified date format into seconds since the Epoch.
|
||||
*
|
||||
* Many of the format flags are those used by strftime(...), but not all.
|
||||
* For the full list of supported time format specifiers
|
||||
* see http://www.boost.org/doc/libs/1_47_0/doc/html/date_time/date_time_io.html#date_time.format_flags
|
||||
*
|
||||
* @param format Format characters string. Example: "%A %b %d, %Y"
|
||||
* @param str Date string containing the time in specified format.
|
||||
*
|
||||
* @return Number of seconds since 01/01/1970 UTC.
|
||||
*/
|
||||
S32 secondsSinceEpochFromString(const std::string& format, const std::string& str);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@
|
|||
#include "llappviewer.h"
|
||||
#include "llmapimagetype.h"
|
||||
#include "llweb.h"
|
||||
#include "llslider.h"
|
||||
#include "llsliderctrl.h"
|
||||
#include "message.h"
|
||||
#include "llwindow.h" // copyTextToClipboard()
|
||||
#include <algorithm>
|
||||
|
|
@ -1029,7 +1029,7 @@ void LLFloaterWorldMap::adjustZoomSliderBounds()
|
|||
|
||||
F32 min_power = log(pixels_per_region/256.f)/log(2.f);
|
||||
|
||||
getChild<LLSlider>("zoom slider")->setMinValue(min_power);
|
||||
getChild<LLSliderCtrl>("zoom slider")->setMinValue(min_power);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@
|
|||
#include "llqueryflags.h"
|
||||
|
||||
#include "llagent.h"
|
||||
#include "lldateutil.h"
|
||||
#include "lliconctrl.h"
|
||||
#include "llfloaterreg.h"
|
||||
#include "lllineeditor.h"
|
||||
|
|
@ -1056,6 +1057,14 @@ void LLGroupMoneyDetailsTabEventHandler::processReply(LLMessageSystem* msg,
|
|||
msg->getS32Fast(_PREHASH_MoneyData, _PREHASH_CurrentInterval, current_interval );
|
||||
msg->getStringFast(_PREHASH_MoneyData, _PREHASH_StartDate, start_date);
|
||||
|
||||
std::string time_str = LLTrans::getString("GroupMoneyDate");
|
||||
LLSD substitution;
|
||||
|
||||
// We don't do time zone corrections of the calculated number of seconds
|
||||
// because we don't have a full time stamp, only a date.
|
||||
substitution["datetime"] = LLDateUtil::secondsSinceEpochFromString("%A %b %d, %Y", start_date);
|
||||
LLStringUtil::format (time_str, substitution);
|
||||
|
||||
if ( interval_days != mImplementationp->mIntervalLength ||
|
||||
current_interval != mImplementationp->mCurrentInterval )
|
||||
{
|
||||
|
|
@ -1064,7 +1073,7 @@ void LLGroupMoneyDetailsTabEventHandler::processReply(LLMessageSystem* msg,
|
|||
return;
|
||||
}
|
||||
|
||||
std::string text = start_date;
|
||||
std::string text = time_str;
|
||||
text.append("\n\n");
|
||||
|
||||
S32 total_amount = 0;
|
||||
|
|
@ -1203,7 +1212,15 @@ void LLGroupMoneySalesTabEventHandler::processReply(LLMessageSystem* msg,
|
|||
// Start with the date.
|
||||
if (text == mImplementationp->mLoadingText)
|
||||
{
|
||||
text = start_date + "\n\n";
|
||||
std::string time_str = LLTrans::getString("GroupMoneyDate");
|
||||
LLSD substitution;
|
||||
|
||||
// We don't do time zone corrections of the calculated number of seconds
|
||||
// because we don't have a full time stamp, only a date.
|
||||
substitution["datetime"] = LLDateUtil::secondsSinceEpochFromString("%A %b %d, %Y", start_date);
|
||||
LLStringUtil::format (time_str, substitution);
|
||||
|
||||
text = time_str + "\n\n";
|
||||
}
|
||||
|
||||
S32 transactions = msg->getNumberOfBlocksFast(_PREHASH_HistoryData);
|
||||
|
|
@ -1408,12 +1425,26 @@ void LLGroupMoneyPlanningTabEventHandler::processReply(LLMessageSystem* msg,
|
|||
}
|
||||
|
||||
text.append(LLTrans::getString("SummaryForTheWeek"));
|
||||
text.append(start_date);
|
||||
|
||||
std::string date_format_str = LLTrans::getString("GroupPlanningDate");
|
||||
std::string time_str = date_format_str;
|
||||
LLSD substitution;
|
||||
// We don't do time zone corrections of the calculated number of seconds
|
||||
// because we don't have a full time stamp, only a date.
|
||||
substitution["datetime"] = LLDateUtil::secondsSinceEpochFromString("%m/%d/%Y", start_date);
|
||||
LLStringUtil::format (time_str, substitution);
|
||||
|
||||
text.append(time_str);
|
||||
|
||||
if (current_interval == 0)
|
||||
{
|
||||
text.append(LLTrans::getString("NextStipendDay"));
|
||||
text.append(next_stipend_date);
|
||||
|
||||
time_str = date_format_str;
|
||||
substitution["datetime"] = LLDateUtil::secondsSinceEpochFromString("%m/%d/%Y", next_stipend_date);
|
||||
LLStringUtil::format (time_str, substitution);
|
||||
|
||||
text.append(time_str);
|
||||
text.append("\n\n");
|
||||
text.append(llformat("%-24sL$%6d\n", LLTrans::getString("GroupMoneyBalance").c_str(), balance ));
|
||||
text.append(1, '\n');
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@
|
|||
#include "llbottomtray.h"
|
||||
#include "llcompilequeue.h"
|
||||
#include "llconsole.h"
|
||||
#include "lldaycyclemanager.h"
|
||||
#include "lldebugview.h"
|
||||
#include "llenvmanager.h"
|
||||
#include "llfilepicker.h"
|
||||
|
|
@ -100,6 +101,7 @@
|
|||
#include "llworldmap.h"
|
||||
#include "pipeline.h"
|
||||
#include "llviewerjoystick.h"
|
||||
#include "llwaterparammanager.h"
|
||||
#include "llwlanimator.h"
|
||||
#include "llwlparammanager.h"
|
||||
#include "llfloatercamera.h"
|
||||
|
|
@ -7667,6 +7669,40 @@ class LLWorldEnvPreset : public view_listener_t
|
|||
}
|
||||
};
|
||||
|
||||
class LLWorldEnableEnvPreset : public view_listener_t
|
||||
{
|
||||
bool handleEvent(const LLSD& userdata)
|
||||
{
|
||||
std::string item = userdata.asString();
|
||||
|
||||
if (item == "delete_water")
|
||||
{
|
||||
LLWaterParamManager::preset_name_list_t user_waters;
|
||||
LLWaterParamManager::instance().getUserPresetNames(user_waters);
|
||||
return !user_waters.empty();
|
||||
}
|
||||
else if (item == "delete_sky")
|
||||
{
|
||||
LLWLParamManager::preset_name_list_t user_skies;
|
||||
LLWLParamManager::instance().getUserPresetNames(user_skies);
|
||||
return !user_skies.empty();
|
||||
}
|
||||
else if (item == "delete_day_cycle")
|
||||
{
|
||||
LLDayCycleManager::preset_name_list_t user_days;
|
||||
LLDayCycleManager::instance().getUserPresetNames(user_days);
|
||||
return !user_days.empty();
|
||||
}
|
||||
else
|
||||
{
|
||||
llwarns << "Unknown item" << llendl;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/// Post-Process callbacks
|
||||
class LLWorldPostProcess : public view_listener_t
|
||||
{
|
||||
|
|
@ -7906,6 +7942,7 @@ void initialize_menus()
|
|||
|
||||
view_listener_t::addMenu(new LLWorldEnvSettings(), "World.EnvSettings");
|
||||
view_listener_t::addMenu(new LLWorldEnvPreset(), "World.EnvPreset");
|
||||
view_listener_t::addMenu(new LLWorldEnableEnvPreset(), "World.EnableEnvPreset");
|
||||
view_listener_t::addMenu(new LLWorldPostProcess(), "World.PostProcess");
|
||||
|
||||
view_listener_t::addMenu(new LLWorldToggleMovementControls(), "World.Toggle.MovementControls");
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@
|
|||
user_resize="false"
|
||||
width="630">
|
||||
<web_browser
|
||||
tab_stop="true"
|
||||
trusted_content="true"
|
||||
follows="left|right|top|bottom"
|
||||
layout="topleft"
|
||||
|
|
|
|||
|
|
@ -557,6 +557,9 @@
|
|||
<menu_item_call.on_click
|
||||
function="World.EnvPreset"
|
||||
parameter="delete_water"/>
|
||||
<menu_item_call.on_enable
|
||||
function="World.EnableEnvPreset"
|
||||
parameter="delete_water"/>
|
||||
</menu_item_call>
|
||||
</menu>
|
||||
|
||||
|
|
@ -583,6 +586,9 @@
|
|||
<menu_item_call.on_click
|
||||
function="World.EnvPreset"
|
||||
parameter="delete_sky"/>
|
||||
<menu_item_call.on_enable
|
||||
function="World.EnableEnvPreset"
|
||||
parameter="delete_sky"/>
|
||||
</menu_item_call>
|
||||
</menu>
|
||||
|
||||
|
|
@ -609,6 +615,9 @@
|
|||
<menu_item_call.on_click
|
||||
function="World.EnvPreset"
|
||||
parameter="delete_day_cycle"/>
|
||||
<menu_item_call.on_enable
|
||||
function="World.EnableEnvPreset"
|
||||
parameter="delete_day_cycle"/>
|
||||
</menu_item_call>
|
||||
</menu>
|
||||
</menu>
|
||||
|
|
|
|||
|
|
@ -2238,6 +2238,7 @@ Returns a string with the requested data about the region
|
|||
<string name="Unknown">(Unknown)</string>
|
||||
<string name="SummaryForTheWeek" value="Summary for this week, beginning on " />
|
||||
<string name="NextStipendDay" value="The next stipend day is " />
|
||||
<string name="GroupPlanningDate">[mthnum,datetime,utc]/[day,datetime,utc]/[year,datetime,utc]</string>
|
||||
<string name="GroupIndividualShare" value=" Group Individual Share" />
|
||||
<string name="GroupColumn" value=" Group" />
|
||||
<string name="Balance">Balance</string>
|
||||
|
|
@ -2394,6 +2395,7 @@ Returns a string with the requested data about the region
|
|||
<string name="GroupMoneyBalance">Balance</string>
|
||||
<string name="GroupMoneyCredits">Credits</string>
|
||||
<string name="GroupMoneyDebits">Debits</string>
|
||||
<string name="GroupMoneyDate">[weekday,datetime,utc] [mth,datetime,utc] [day,datetime,utc], [year,datetime,utc]</string>
|
||||
|
||||
<!-- viewer object -->
|
||||
<string name="ViewerObjectContents">Contents</string>
|
||||
|
|
|
|||
Loading…
Reference in New Issue