Permalink
Browse files

Satisfy SV-2101: Add LiruOnlineNotificationBehavior to allow configur…

…ation of behavior when FriendOnline notification is clicked
  • Loading branch information...
1 parent b8ca422 commit e11b70415d4cee4401de0bd0acf41b28e2d00a8c @Lirusaito Lirusaito committed Jun 28, 2016
Showing with 25 additions and 13 deletions.
  1. +22 −11 indra/newview/app_settings/settings.xml
  2. +3 −2 indra/newview/llcallingcard.cpp
@@ -796,17 +796,6 @@
<key>Value</key>
<integer>1</integer>
</map>
- <key>LiruResizeRootWithScreen</key>
- <map>
- <key>Comment</key>
- <string>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).</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
<key>LiruLegacyScrollToEnd</key>
<map>
<key>Comment</key>
@@ -978,6 +967,17 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>LiruOnlineNotificationBehavior</key>
+ <map>
+ <key>Comment</key>
+ <string>Determines if Friend is Online notifications will do anything when clicked. (0 does nothing, 1 starts an IM (default), 2 opens profile.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
<key>LiruRegionRestartMinimized</key>
<map>
<key>Comment</key>
@@ -991,6 +991,17 @@
<key>IsCOA</key>
<integer>1</integer>
</map>
+ <key>LiruResizeRootWithScreen</key>
+ <map>
+ <key>Comment</key>
+ <string>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).</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
<key>LiruScriptErrorsStealFocus</key>
<map>
<key>Comment</key>
@@ -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<S32> 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
{

0 comments on commit e11b704

Please sign in to comment.