diff options
author | Erik Kundiman <erik@megapahit.org> | 2024-08-23 22:45:04 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2024-08-23 22:45:04 +0800 |
commit | f95c6a4d8d9887c75f23e0512645143760f26210 (patch) | |
tree | 100f84649cb7f69fa4371bd80b9a78f659eee53c | |
parent | a9113d199645fcd3db46e120c0d9e86fb3f1ce93 (diff) | |
parent | 2b0a318facb9b698ed6818be6e0f4488cb6ba272 (diff) |
Merge branch 'main' into 2024.06-atlasaurus
18 files changed, 58 insertions, 14 deletions
diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp index 2024579021..17f403e8e8 100644 --- a/indra/llplugin/llpluginclassmedia.cpp +++ b/indra/llplugin/llpluginclassmedia.cpp @@ -1211,6 +1211,10 @@ void LLPluginClassMedia::receivePluginMessage(const LLPluginMessage &message) mMediaName = message.getValue("name"); mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_NAME_CHANGED); } + else if(message_name == "title_text") + { + mMediaTitle = message.getValue("title"); + } else if(message_name == "nowplaying_text") { mMediaNowPlaying = message.getValue("nowplaying"); diff --git a/indra/llplugin/llpluginclassmedia.h b/indra/llplugin/llpluginclassmedia.h index 109f3880c5..80862284ff 100644 --- a/indra/llplugin/llpluginclassmedia.h +++ b/indra/llplugin/llpluginclassmedia.h @@ -311,6 +311,7 @@ public: const std::string& getMediaName() const { return mMediaName; }; + const std::string& getMediaTitle() const { return mMediaTitle; }; const std::string& getMediaNowPlaying() const { return mMediaNowPlaying; }; std::string getMediaDescription() const { return mMediaDescription; }; @@ -429,6 +430,7 @@ protected: bool mCanPaste; std::string mMediaName; + std::string mMediaTitle; std::string mMediaNowPlaying; std::string mMediaDescription; diff --git a/indra/media_plugins/libvlc/media_plugin_libvlc.cpp b/indra/media_plugins/libvlc/media_plugin_libvlc.cpp index 8ae9931dd4..b090734c72 100644 --- a/indra/media_plugins/libvlc/media_plugin_libvlc.cpp +++ b/indra/media_plugins/libvlc/media_plugin_libvlc.cpp @@ -295,6 +295,13 @@ void MediaPluginLibVLC::eventCallbacks(const libvlc_event_t* event, void* ptr) } break; case libvlc_MediaMetaChanged: + auto title = libvlc_media_get_meta(parent->mLibVLCMedia, libvlc_meta_Title); + if (title) + { + LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "title_text"); + message.setValue("title", title); + parent->sendMessage(message); + } auto now_playing = libvlc_media_get_meta(parent->mLibVLCMedia, libvlc_meta_NowPlaying); if (now_playing) { diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index fc50691ece..c004534617 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -1249,7 +1249,10 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL LLStyle::Params body_message_params; body_message_params.color(txt_color); - body_message_params.readonly_color(txt_color); + if (args["COLOR"]) + body_message_params.readonly_color(LLUIColorTable::instance().getColor(args["COLOR"])); + else + body_message_params.readonly_color(txt_color); body_message_params.font.name(font_name); body_message_params.font.size(font_size); body_message_params.font.style(input_append_params.font.style); diff --git a/indra/newview/llviewermedia_streamingaudio.cpp b/indra/newview/llviewermedia_streamingaudio.cpp index 15b6e3f802..6e3d84b3bf 100644 --- a/indra/newview/llviewermedia_streamingaudio.cpp +++ b/indra/newview/llviewermedia_streamingaudio.cpp @@ -118,8 +118,12 @@ int LLStreamingAudio_MediaPlugins::isPlaying() auto nowPlaying = mMediaPlugin->getMediaNowPlaying(); if (mNowPlaying != nowPlaying) { - LLNotificationsUI::LLNotificationManager::instance().onChat(LLChat{llformat("Now playing %s.", nowPlaying.c_str())}, LLSD{}); + mTitle = mMediaPlugin->getMediaTitle(); mNowPlaying = nowPlaying; + LLChat chat{llformat("Now playing %s.", nowPlaying.c_str())}; + chat.mFromName = mTitle; + chat.mSourceType = CHAT_SOURCE_SYSTEM; + LLNotificationsUI::LLNotificationManager::instance().onChat(chat, LLSD{}); } switch (status) diff --git a/indra/newview/llviewermedia_streamingaudio.h b/indra/newview/llviewermedia_streamingaudio.h index 5abefcdb0b..e1f7cd71d9 100644 --- a/indra/newview/llviewermedia_streamingaudio.h +++ b/indra/newview/llviewermedia_streamingaudio.h @@ -56,6 +56,7 @@ private: LLPluginClassMedia *mMediaPlugin; std::string mURL; + std::string mTitle; std::string mNowPlaying; F32 mGain; }; diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 2634e0d12a..0f339405be 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -816,9 +816,20 @@ void LLVOAvatar::debugAvatarRezTime(std::string notification_name, std::string c //------------------------------------------------------------------------ LLVOAvatar::~LLVOAvatar() { - if (gSavedSettings.getBOOL("IMShowArrivalsDepartures") && !getFullname().empty()) + if (gSavedSettings.getBOOL("IMShowArrivalsDepartures")) { - LLNotificationsUI::LLNotificationManager::instance().onChat(LLChat{llformat("%s left.", getFullname().c_str())}, LLSD{}); + LLAvatarName av_name; + LLAvatarNameCache::get(getID(), &av_name); + auto display_name = av_name.getDisplayName(); + if (!display_name.empty()) + { + LLChat chat{llformat("%s left.", display_name.c_str())}; + chat.mFromName = display_name; + chat.mFromID = getID(); + LLSD args; + args["COLOR"] = "ChatHistoryTextColor"; + LLNotificationsUI::LLNotificationManager::instance().onChat(chat, args); + } } if (!mFullyLoaded) { @@ -2511,8 +2522,18 @@ U32 LLVOAvatar::processUpdateMessage(LLMessageSystem *mesgsys, { if (*id_it == getID() && !isSelf()) { - LLNotificationsUI::LLNotificationManager::instance() - .onChat(LLChat{llformat("%s arrived (%.1f m).", getFullname().c_str(), dist_vec(*pos_it, gAgent.getPositionGlobal()))}, LLSD{}); + LLAvatarName av_name; + LLAvatarNameCache::get(getID(), &av_name); + auto display_name = av_name.getDisplayName(); + if (!display_name.empty()) + { + LLChat chat{llformat("%s arrived (%.1f m).", display_name.c_str(), dist_vec(*pos_it, gAgent.getPositionGlobal()))}; + chat.mFromName = display_name; + chat.mFromID = getID(); + LLSD args; + args["COLOR"] = "ChatHistoryTextColor"; + LLNotificationsUI::LLNotificationManager::instance().onChat(chat, args); + } break; } } diff --git a/indra/newview/skins/default/textures/icons/Info_Over.png b/indra/newview/skins/default/textures/icons/Info_Over.png Binary files differindex 82d650ef4b..11bf174ec6 100644 --- a/indra/newview/skins/default/textures/icons/Info_Over.png +++ b/indra/newview/skins/default/textures/icons/Info_Over.png diff --git a/indra/newview/skins/default/textures/icons/back_arrow_off.png b/indra/newview/skins/default/textures/icons/back_arrow_off.png Binary files differindex d0d8b31006..0adf0b677e 100644 --- a/indra/newview/skins/default/textures/icons/back_arrow_off.png +++ b/indra/newview/skins/default/textures/icons/back_arrow_off.png diff --git a/indra/newview/skins/default/textures/icons/back_arrow_over.png b/indra/newview/skins/default/textures/icons/back_arrow_over.png Binary files differindex 4a247e0f1f..13ce6a8e4d 100644 --- a/indra/newview/skins/default/textures/icons/back_arrow_over.png +++ b/indra/newview/skins/default/textures/icons/back_arrow_over.png diff --git a/indra/newview/skins/default/textures/icons/back_arrow_press.png b/indra/newview/skins/default/textures/icons/back_arrow_press.png Binary files differindex 3e9f1a6e96..311a90ac22 100644 --- a/indra/newview/skins/default/textures/icons/back_arrow_press.png +++ b/indra/newview/skins/default/textures/icons/back_arrow_press.png diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 11eafcb45d..b0b7dd51e2 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -780,9 +780,9 @@ with the same filename but different name scale.left="4" scale.top="24" scale.right="26" scale.bottom="4" /> <texture name="Window_Foreground" file_name="windows/Window_Foreground.png" preload="true" scale.left="4" scale.top="24" scale.right="26" scale.bottom="4" /> - <texture name="Window_NoTitle_Background" file_name="windows/Window_Background.png" preload="true" + <texture name="Window_NoTitle_Background" file_name="windows/Window_NoTitle_Background.png" preload="true" scale.left="4" scale.top="24" scale.right="26" scale.bottom="4" /> - <texture name="Window_NoTitle_Foreground" file_name="windows/Window_Foreground.png" preload="true" + <texture name="Window_NoTitle_Foreground" file_name="windows/Window_NoTitle_Foreground.png" preload="true" scale.left="4" scale.top="24" scale.right="26" scale.bottom="4" /> <texture name="YouAreHere_Badge" file_name="icons/YouAreHere_Badge.png" preload="false" /> diff --git a/indra/newview/skins/default/textures/windows/Inspector_I.png b/indra/newview/skins/default/textures/windows/Inspector_I.png Binary files differindex 82d650ef4b..c36555c90d 100644 --- a/indra/newview/skins/default/textures/windows/Inspector_I.png +++ b/indra/newview/skins/default/textures/windows/Inspector_I.png diff --git a/indra/newview/skins/default/textures/windows/Window_Background.png b/indra/newview/skins/default/textures/windows/Window_Background.png Binary files differindex f19fb0300b..83b45f9343 100644 --- a/indra/newview/skins/default/textures/windows/Window_Background.png +++ b/indra/newview/skins/default/textures/windows/Window_Background.png diff --git a/indra/newview/skins/default/textures/windows/Window_Foreground.png b/indra/newview/skins/default/textures/windows/Window_Foreground.png Binary files differindex 15d2ff72b6..db4b58916f 100644 --- a/indra/newview/skins/default/textures/windows/Window_Foreground.png +++ b/indra/newview/skins/default/textures/windows/Window_Foreground.png diff --git a/indra/newview/skins/default/textures/windows/Window_NoTitle_Background.png b/indra/newview/skins/default/textures/windows/Window_NoTitle_Background.png Binary files differindex d01f82a310..64afa47b7c 100644 --- a/indra/newview/skins/default/textures/windows/Window_NoTitle_Background.png +++ b/indra/newview/skins/default/textures/windows/Window_NoTitle_Background.png diff --git a/indra/newview/skins/default/textures/windows/Window_NoTitle_Foreground.png b/indra/newview/skins/default/textures/windows/Window_NoTitle_Foreground.png Binary files differindex 1966400641..c883197d8b 100644 --- a/indra/newview/skins/default/textures/windows/Window_NoTitle_Foreground.png +++ b/indra/newview/skins/default/textures/windows/Window_NoTitle_Foreground.png diff --git a/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml b/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml index cfca246321..970c6ad2f5 100644 --- a/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml @@ -64,29 +64,31 @@ top="6" use_ellipses="true" value="(loading)" - width="180" /> + width="0" /> <text - follows="left|right" + follows="right" font="SansSerifSmall" height="15" layout="topleft" left_pad="5" + right="-47" name="avatar_arrival_time" - top="6" + top="5" text_color="LtGray_50" value="0s" - width="35" /> + width="200" /> <text - follows="left|right" + follows="right" font="SansSerifSmall" height="15" layout="topleft" left_pad="5" + right="-132" name="avatar_distance" top="6" text_color="LtGray_50" value="0m" - width="35" /> + width="60" /> <text follows="right" font="SansSerifSmall" |