diff options
author | James Cook <james@lindenlab.com> | 2009-10-30 17:54:52 -0400 |
---|---|---|
committer | James Cook <james@lindenlab.com> | 2009-10-30 17:54:52 -0400 |
commit | 1de55a587071c379f8155f300e82dacded68fa27 (patch) | |
tree | a1821c6882355422afc2d4f8bec9deea005fae66 | |
parent | 4aee82ad98a94ee8215109f125a899a222c80c60 (diff) | |
parent | 59c6dc7ed6be989a9fd7a0688fe6e823d3b68baa (diff) |
merge
-rw-r--r-- | indra/llcommon/llstring.cpp | 29 | ||||
-rw-r--r-- | indra/llui/llfloater.cpp | 18 |
2 files changed, 19 insertions, 28 deletions
diff --git a/indra/llcommon/llstring.cpp b/indra/llcommon/llstring.cpp index f2edd5c559..721e5670e7 100644 --- a/indra/llcommon/llstring.cpp +++ b/indra/llcommon/llstring.cpp @@ -963,30 +963,29 @@ bool LLStringUtil::formatDatetime(std::string& replacement, std::string token, // if never fell into those two ifs above, param must be utc if (secFromEpoch < 0) secFromEpoch = 0; - LLDate * datetime = new LLDate((F64)secFromEpoch); + LLDate datetime((F64)secFromEpoch); std::string code = LLStringOps::getDatetimeCode (token); // special case to handle timezone if (code == "%Z") { if (param == "utc") + { replacement = "GMT"; - else if (param == "slt") - replacement = "SLT"; - else if (param != "local") // *TODO Vadim: not local? then what? + } + else if (param == "local") + { + replacement = ""; // user knows their own timezone + } + else + { + // "slt" = Second Life Time, which is deprecated. + // If not utc or user local time, fallback to Pacific time replacement = LLStringOps::getDaylightSavings() ? "PDT" : "PST"; - - return true; - } - replacement = datetime->toHTTPDateString(code); - - if (code.empty()) - { - return false; - } - else - { + } return true; } + replacement = datetime.toHTTPDateString(code); + return !code.empty(); } // LLStringUtil::format recogizes the following patterns. diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 6dcc1957a9..8c72b079ee 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -268,21 +268,14 @@ LLFloater::LLFloater(const LLSD& key, const LLFloater::Params& p) mButtonsEnabled[i] = FALSE; mButtons[i] = NULL; } - for (S32 i = 0; i < 4; i++) - { - mResizeBar[i] = NULL; - mResizeHandle[i] = NULL; - } + addDragHandle(); + addResizeCtrls(); initFromParams(p); // chrome floaters don't take focus at all setFocusRoot(!getIsChrome()); - addDragHandle(); - addResizeCtrls(); - enableResizeCtrls(mResizable); - initFloater(); } @@ -2589,7 +2582,7 @@ void LLFloater::setupParamsForExport(Params& p, LLView* parent) void LLFloater::initFromParams(const LLFloater::Params& p) { - // *NOTE: We have too many classes derived from LLPanel to retrofit them + // *NOTE: We have too many classes derived from LLFloater to retrofit them // all to pass in params via constructors. So we use this method. // control_name, tab_stop, focus_lost_callback, initial_value, rect, enabled, visible @@ -2603,11 +2596,10 @@ void LLFloater::initFromParams(const LLFloater::Params& p) setCanMinimize(p.can_minimize); setCanClose(p.can_close); setCanDock(p.can_dock); + setCanResize(p.can_resize); + setResizeLimits(p.min_width, p.min_height); mDragOnLeft = p.can_drag_on_left; - mResizable = p.can_resize; - mMinWidth = p.min_width; - mMinHeight = p.min_height; mHeaderHeight = p.header_height; mLegacyHeaderHeight = p.legacy_header_height; mSingleInstance = p.single_instance; |