From e11b70415d4cee4401de0bd0acf41b28e2d00a8c Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Tue, 28 Jun 2016 07:56:02 -0400 Subject: [PATCH] Satisfy SV-2101: Add LiruOnlineNotificationBehavior to allow configuration of behavior when FriendOnline notification is clicked --- indra/newview/app_settings/settings.xml | 33 ++++++++++++++++--------- indra/newview/llcallingcard.cpp | 5 ++-- 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index e8de089ea..ec6776cb1 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -796,17 +796,6 @@ Value 1 - LiruResizeRootWithScreen - - Comment - When false, the ui view won't resize when the screen does (floaters won't move around without user interaction, but they also might be restricted from moving everywhere). - Persist - 1 - Type - Boolean - Value - 1 - LiruLegacyScrollToEnd Comment @@ -978,6 +967,17 @@ Value 0 + LiruOnlineNotificationBehavior + + Comment + Determines if Friend is Online notifications will do anything when clicked. (0 does nothing, 1 starts an IM (default), 2 opens profile. + Persist + 1 + Type + S32 + Value + 1 + LiruRegionRestartMinimized Comment @@ -991,6 +991,17 @@ IsCOA 1 + LiruResizeRootWithScreen + + Comment + When false, the ui view won't resize when the screen does (floaters won't move around without user interaction, but they also might be restricted from moving everywhere). + Persist + 1 + Type + Boolean + Value + 1 + LiruScriptErrorsStealFocus Comment diff --git a/indra/newview/llcallingcard.cpp b/indra/newview/llcallingcard.cpp index b85cd8fad..ed6fecfca 100644 --- a/indra/newview/llcallingcard.cpp +++ b/indra/newview/llcallingcard.cpp @@ -749,13 +749,14 @@ static void on_avatar_name_cache_notify(const LLUUID& agent_id, // Popup a notify box with online status of this agent LLNotificationPtr notification; - if (online) + static const LLCachedControl behavior(gSavedSettings, "LiruOnlineNotificationBehavior", 1); + if (online && behavior) { notification = LLNotifications::instance().add("FriendOnlineOffline", args, payload, - boost::bind(&LLAvatarActions::startIM, agent_id)); + behavior == 1 ? boost::bind(&LLAvatarActions::startIM, agent_id) : boost::bind(LLAvatarActions::showProfile, agent_id, false)); } else {