Merge remote-tracking branch 'Liru/master'
This commit is contained in:
@@ -926,13 +926,18 @@ LLGroupMgrGroupData* LLGroupMgr::getGroupData(const LLUUID& id)
|
||||
// so that the sorter can sort by year before month before day.
|
||||
static void formatDateString(std::string &date_string)
|
||||
{
|
||||
tm t;
|
||||
if (sscanf(date_string.c_str(), "%u/%u/%u", &t.tm_mon, &t.tm_mday, &t.tm_year) == 3 && t.tm_year > 1900)
|
||||
using namespace boost;
|
||||
cmatch result;
|
||||
const regex expression("([0-9]{1,2})/([0-9]{1,2})/([0-9]{4})");
|
||||
if (regex_match(date_string.c_str(), result, expression))
|
||||
{
|
||||
t.tm_year -= 1900;
|
||||
t.tm_mon--;
|
||||
t.tm_hour = t.tm_min = t.tm_sec = 0;
|
||||
timeStructToFormattedString(&t, gSavedSettings.getString("ShortDateFormat"), date_string);
|
||||
// convert matches to integers so that we can pad them with zeroes on Linux
|
||||
S32 year = boost::lexical_cast<S32>(result[3]);
|
||||
S32 month = boost::lexical_cast<S32>(result[1]);
|
||||
S32 day = boost::lexical_cast<S32>(result[2]);
|
||||
|
||||
// ISO 8601 date format
|
||||
date_string = llformat("%04d-%02d-%02dT00:00:00Z", year, month, day);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -844,7 +844,11 @@ void LLPanelGroupGeneral::addMember(LLGroupMemberData* member)
|
||||
|
||||
item_params.columns.add().column("title").value(member->getTitle()).font/*.name*/("SANSSERIF_SMALL").font_style(style);
|
||||
|
||||
item_params.columns.add().column("online").value(member->getOnlineStatus()).font/*.name*/("SANSSERIF_SMALL").font_style(style);
|
||||
static const LLCachedControl<std::string> format(gSavedSettings, "ShortDateFormat");
|
||||
static const std::string online(LLTrans::getString("group_member_status_online"));
|
||||
item_params.columns.add().column("online").value(member->getOnlineStatus())
|
||||
.format(format).type(member->getOnlineStatus() == online ? "text" : "date")
|
||||
.font/*.name*/("SANSSERIF_SMALL").font_style(style);
|
||||
|
||||
/*LLScrollListItem* member_row =*/ mListVisibleMembers->addNameItemRow(item_params);
|
||||
}
|
||||
|
||||
@@ -455,7 +455,6 @@ void LLPanelGroupNotices::processNotices(LLMessageSystem* msg)
|
||||
msg->getBOOL("Data","HasAttachment",has_attachment,i);
|
||||
msg->getU8("Data","AssetType",asset_type,i);
|
||||
msg->getU32("Data","Timestamp",timestamp,i);
|
||||
time_t t = timestamp;
|
||||
|
||||
LLSD row;
|
||||
row["id"] = id;
|
||||
@@ -480,9 +479,10 @@ void LLPanelGroupNotices::processNotices(LLMessageSystem* msg)
|
||||
std::string format(gSavedSettings.getString("ShortDateFormat"));
|
||||
if (gSavedSettings.getBOOL("LiruGroupNoticeTimes"))
|
||||
format += " " + gSavedSettings.getString("ShortTimeFormat");
|
||||
timeToFormattedString(t, format, buffer);
|
||||
row["columns"][3]["type"] = "date";
|
||||
row["columns"][3]["format"] = format;
|
||||
row["columns"][3]["column"] = "date";
|
||||
row["columns"][3]["value"] = buffer;
|
||||
row["columns"][3]["value"] = LLDate(timestamp);
|
||||
|
||||
buffer = llformat( "%u", timestamp);
|
||||
row["columns"][4]["column"] = "sort";
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
#include "lltabcontainer.h"
|
||||
#include "lltextbox.h"
|
||||
#include "lltexteditor.h"
|
||||
#include "lltrans.h"
|
||||
#include "llviewertexturelist.h"
|
||||
#include "llviewerwindow.h"
|
||||
#include "llfocusmgr.h"
|
||||
@@ -1536,7 +1537,10 @@ void LLPanelGroupMembersSubTab::addMemberToList(LLGroupMemberData* data)
|
||||
item_params.columns.add().column("donated").value(donated.getString())
|
||||
.font/*.name*/("SANSSERIF_SMALL")/*.style("NORMAL")*/;
|
||||
|
||||
static const LLCachedControl<std::string> format(gSavedSettings, "ShortDateFormat");
|
||||
static const std::string online(LLTrans::getString("group_member_status_online"));
|
||||
item_params.columns.add().column("online").value(data->getOnlineStatus())
|
||||
.format(format).type(data->getOnlineStatus() == online ? "text" : "date")
|
||||
.font/*.name*/("SANSSERIF_SMALL")/*.style("NORMAL")*/;
|
||||
mMembersList->addNameItemRow(item_params);
|
||||
|
||||
|
||||
@@ -1038,6 +1038,7 @@ void LLPanelLogin::onLocationSLURL()
|
||||
{
|
||||
LLComboBox* location_combo = getChild<LLComboBox>("start_location_combo");
|
||||
std::string location = location_combo->getValue().asString();
|
||||
LLStringUtil::trim(location);
|
||||
LL_DEBUGS("AppInit")<<location<<LL_ENDL;
|
||||
|
||||
LLStartUp::setStartSLURL(location); // calls onUpdateStartSLURL, above
|
||||
|
||||
Reference in New Issue
Block a user