From ae388359592ad7a73b5aaac6b73469169bf4410d Mon Sep 17 00:00:00 2001 From: Latif Khalifa Date: Wed, 18 Sep 2013 06:55:30 +0200 Subject: [PATCH 1/4] Version 1.8.3 --- indra/llcommon/llversionviewer.h.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/llcommon/llversionviewer.h.in b/indra/llcommon/llversionviewer.h.in index ec1ed2f31..f97e2acd0 100644 --- a/indra/llcommon/llversionviewer.h.in +++ b/indra/llcommon/llversionviewer.h.in @@ -35,7 +35,7 @@ const S32 LL_VERSION_MAJOR = 1; const S32 LL_VERSION_MINOR = 8; -const S32 LL_VERSION_PATCH = 2; +const S32 LL_VERSION_PATCH = 3; const S32 LL_VERSION_BUILD = ${vBUILD}; const char * const LL_CHANNEL = "${VIEWER_CHANNEL}"; From 892d224b9cdf9ab65c40eedca25f345016d0194e Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Thu, 19 Sep 2013 23:29:36 -0400 Subject: [PATCH 2/4] [Issue 1105] Add Parameter "format" to scroll list cells to define how a date cell will format its displayed date Defaults to use RFC1123 to maintain expected behavior --- indra/llui/llscrolllistcell.cpp | 3 ++- indra/llui/llscrolllistcell.h | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/indra/llui/llscrolllistcell.cpp b/indra/llui/llscrolllistcell.cpp index 8ebf6bc04..dba472842 100644 --- a/indra/llui/llscrolllistcell.cpp +++ b/indra/llui/llscrolllistcell.cpp @@ -438,13 +438,14 @@ void LLScrollListCheck::setEnabled(BOOL enable) LLScrollListDate::LLScrollListDate( const LLScrollListCell::Params& p) : LLScrollListText(p), + mFormat(p.format), mDate(p.value().asDate()) {} void LLScrollListDate::setValue(const LLSD& value) { mDate = value.asDate(); - LLScrollListText::setValue(mDate.asRFC1123()); + LLScrollListText::setValue(mFormat.empty() ? mDate.asRFC1123() : mDate.toHTTPDateString(mFormat)); } const LLSD LLScrollListDate::getValue() const diff --git a/indra/llui/llscrolllistcell.h b/indra/llui/llscrolllistcell.h index 3e4a9cd06..84c196a05 100644 --- a/indra/llui/llscrolllistcell.h +++ b/indra/llui/llscrolllistcell.h @@ -61,6 +61,7 @@ public: Optional userdata; Optional value; Optional tool_tip; + Optional format; Optional font; Optional font_color; @@ -77,6 +78,7 @@ public: visible("visible", true), value("value"), tool_tip("tool_tip", ""), + format("format", ""), font("font"/*, LLFontGL::getFontSansSerifSmall()*/), font_color("font_color", LLColor4::black), font_style("font-style"), @@ -230,6 +232,7 @@ public: virtual const LLSD getValue() const; private: + std::string mFormat; LLDate mDate; }; From 104099aed58e42e6a61527a5457a33f3ccfd690f Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Thu, 19 Sep 2013 23:37:58 -0400 Subject: [PATCH 3/4] [Issue 1105] Fix Last Login row in groups not sorting properly Updated llgroupmgr.cpp's formatDateString() from upstream -Corrected it to actually use ISO 8601 format. Also fixes notices tab to use the new format parameter to sort properly. --- indra/newview/llgroupmgr.cpp | 17 +++++++++++------ indra/newview/llpanelgroupgeneral.cpp | 6 +++++- indra/newview/llpanelgroupnotices.cpp | 6 +++--- indra/newview/llpanelgrouproles.cpp | 4 ++++ 4 files changed, 23 insertions(+), 10 deletions(-) diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp index 70eddbcdc..3bd9c3715 100644 --- a/indra/newview/llgroupmgr.cpp +++ b/indra/newview/llgroupmgr.cpp @@ -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(result[3]); + S32 month = boost::lexical_cast(result[1]); + S32 day = boost::lexical_cast(result[2]); + + // ISO 8601 date format + date_string = llformat("%04d-%02d-%02dT00:00:00Z", year, month, day); } } diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp index ac3ecd30e..2b1bbf804 100644 --- a/indra/newview/llpanelgroupgeneral.cpp +++ b/indra/newview/llpanelgroupgeneral.cpp @@ -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 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); } diff --git a/indra/newview/llpanelgroupnotices.cpp b/indra/newview/llpanelgroupnotices.cpp index 001a1179a..39c86e307 100644 --- a/indra/newview/llpanelgroupnotices.cpp +++ b/indra/newview/llpanelgroupnotices.cpp @@ -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"; diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index 2a540e1c1..d713ff9e8 100644 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -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 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); From e9ca27322bf514372c8feb59afab27f5e2fbfd91 Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Thu, 19 Sep 2013 23:40:14 -0400 Subject: [PATCH 4/4] Run trim on input start locations, in case copy paste brought some spaces along for the ride --- indra/newview/llpanellogin.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 11ae08101..c641c95cc 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -1038,6 +1038,7 @@ void LLPanelLogin::onLocationSLURL() { LLComboBox* location_combo = getChild("start_location_combo"); std::string location = location_combo->getValue().asString(); + LLStringUtil::trim(location); LL_DEBUGS("AppInit")<