diff --git a/indra/newview/app_settings/settings_alchemy.xml b/indra/newview/app_settings/settings_alchemy.xml index a69201150c16e821fe59c6d1e01c2914d27e8a88..98adff3d6cacdfc4b1310164ecc4a7a553ca948f 100644 --- a/indra/newview/app_settings/settings_alchemy.xml +++ b/indra/newview/app_settings/settings_alchemy.xml @@ -849,6 +849,17 @@ <key>Value</key> <boolean>0</boolean> </map> + <key>ChatTimestampSeconds</key> + <map> + <key>Comment</key> + <string>Display seconds in chat log timestamp</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <boolean>0</boolean> + </map> <key>CmdLineSquirrelInstall</key> <map> <key>Comment</key> diff --git a/indra/newview/llconversationlog.cpp b/indra/newview/llconversationlog.cpp index 2d8a04435f8bc18d5b45705f5ed88439b86ccb48..0985a36a82b2aba853b316445ba73a4e3955e95b 100644 --- a/indra/newview/llconversationlog.cpp +++ b/indra/newview/llconversationlog.cpp @@ -115,6 +115,10 @@ const std::string LLConversation::createTimestamp(const U64Seconds& utc_time) static const std::string time_fmt_str = fmt::format(FMT_STRING("[{:s}]/[{:s}]/[{:s}] [{:s}]:[{:s}]"), LLTrans::getString("TimeMonth"), LLTrans::getString("TimeDay"), LLTrans::getString("TimeYear"), LLTrans::getString("TimeHour"), LLTrans::getString("TimeMin")); std::string timeStr = time_fmt_str; + if (gSavedSettings.getBOOL("ChatTimestampSeconds")) + { + timeStr += fmt::format(":[{}]", LLTrans::getString ("TimeSec")); + } LLSD substitution; substitution["datetime"] = (S32)utc_time.value(); diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp index efcc411fdc188e0a55cacaf8fd4057edcdee8e07..2e8c079b347a735d2bcfa648b6beaa242de81b17 100644 --- a/indra/newview/llfloaterimsessiontab.cpp +++ b/indra/newview/llfloaterimsessiontab.cpp @@ -432,6 +432,10 @@ std::string LLFloaterIMSessionTab::appendTime() static const std::string time_str = fmt::format(FMT_STRING("[{}]:[{}]"), LLTrans::getString("TimeHour"), LLTrans::getString("TimeMin")); std::string timeStr = time_str; + if (gSavedSettings.getBOOL("ChatTimestampSeconds")) + { + timeStr += fmt::format(":[{}]", LLTrans::getString ("TimeSec")); + } LLSD substitution; substitution["datetime"] = (S32) utc_time; diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp index 32caf17a405b8224a7737bee804acb6f2ce0f49e..20b76db862246c4f929aa493e6489a2645d9fe53 100644 --- a/indra/newview/lllogchat.cpp +++ b/indra/newview/lllogchat.cpp @@ -310,6 +310,10 @@ std::string LLLogChat::timestamp(bool withdate) static const std::string timestamp_short_fmt = fmt::format(FMT_STRING("[{}]:[{}]"), LLTrans::getString("TimeHour"), LLTrans::getString("TimeMin")); timeStr = timestamp_short_fmt; } + if (gSavedSettings.getBOOL("ChatTimestampSeconds")) + { + timeStr += fmt::format(":[{}]", LLTrans::getString ("TimeSec")); + } LLSD substitution; substitution["datetime"] = (S32)time_corrected(); diff --git a/indra/newview/skins/default/xui/en/menu_im_session_showmodes.xml b/indra/newview/skins/default/xui/en/menu_im_session_showmodes.xml index b0adca0e0ec4713a187d5bc8e27818749f56c35a..59e48b2dbd8a67e8bc683757a5d7b34a8915f643 100644 --- a/indra/newview/skins/default/xui/en/menu_im_session_showmodes.xml +++ b/indra/newview/skins/default/xui/en/menu_im_session_showmodes.xml @@ -24,6 +24,15 @@ parameter="expanded_view"/> </menu_item_check> <menu_item_separator layout="topleft" /> + <menu_item_check name="ChatTimestampSeconds" label="Display seconds in all chat timestamps"> + <menu_item_check.on_click + function="ToggleControl" + parameter="ChatTimestampSeconds" /> + <menu_item_check.on_check + function="CheckControl" + parameter="ChatTimestampSeconds" /> + </menu_item_check> + <menu_item_separator layout="topleft" /> <menu_item_check name="IMShowTime" label="Show time"> <menu_item_check.on_click function="IMSession.Menu.Action"