chat text fixes + initial feature work.

- Repaired ability to disable chat toasts
- iniitial implementation to disable chat icons
- initial groundwork for separate color for chat header names
meow-7.2.2
Arrehn 2010-12-02 01:29:48 -05:00
parent 436346afa1
commit dc5250f237
7 changed files with 112 additions and 9 deletions

View File

@ -1,6 +1,42 @@
<?xml version="1.0" ?>
<llsd>
<map>
<key>EnableGroupChatPopups</key>
<map>
<key>Comment</key>
<string>Enable Incoming Group Chat Popups</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>EnableIMChatPopups</key>
<map>
<key>Comment</key>
<string>Enable Incoming IM Chat Popups</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>ShowChatMiniIcons</key>
<map>
<key>Comment</key>
<string>Toggles the display of mini icons in chat history</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>RestrainedLove</key>
<map>
<key>Comment</key>

View File

@ -329,8 +329,15 @@ public:
setTimeField(chat);
LLAvatarIconCtrl* icon = getChild<LLAvatarIconCtrl>("avatar_icon");
// Hacky preference to hide avatar icons for people who don't like them by overdrawing them. Will change to disable soon. -AO
bool display_mini_icon = gSavedSettings.getBOOL("ShowChatMiniIcons");
if (!display_mini_icon)
{
icon->setColor(LLUIColorTable::instance().getColor("Transparent"));
}
if(mSourceType != CHAT_SOURCE_AGENT || mAvatarID.isNull())
icon->setDrawTooltip(false);

View File

@ -133,6 +133,19 @@ void toast_callback(const LLSD& msg){
return;
}
// *NOTE Skip toasting if the user disable it in preferences/debug settings ~Alexandrea
LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession(msg["session_id"]);
if (!gSavedSettings.getBOOL("EnableGroupChatPopups") && session->isGroupSessionType())
{
return;
}
if (!gSavedSettings.getBOOL("EnableIMChatPopups") && !session->isGroupSessionType())
{
return;
}
// Skip toasting if we have open window of IM with this session id
LLIMFloater* open_im_floater = LLIMFloater::findInstance(msg["session_id"]);
if (open_im_floater && open_im_floater->getVisible())

View File

@ -343,7 +343,7 @@
reference="AvatarListItemIconOfflineColor" />
<color
name="BackgroundChatColor"
reference="White" />
reference="DkGray" />
<color
name="ButtonBorderColor"
reference="Unused?" />
@ -559,7 +559,7 @@
reference="DkGray" />
<color
name="HTMLLinkColor"
reference="0.75 0.92 0.49 1.0" />
reference="AccentColor" />
<color
name="HealthTextColor"
reference="White" />
@ -756,7 +756,10 @@
reference="White" />
<color
name="ObjectBubbleColor"
reference="DkGray_66" />
reference="DkGray_66" />
<color
name="ChatNameColor"
reference="AccentColor" />
<color
name="ObjectChatColor"
reference="EmphasisColor" />

View File

@ -32,7 +32,7 @@
left_pad="5"
right="-120"
name="user_name"
text_color="white"
text_color="ChatNameColor"
bg_readonly_color="black"
top="0"
use_ellipses="true"

View File

@ -76,6 +76,16 @@
left="30"
name="play_typing_animation"
top_pad="5"
width="400" />
<check_box
control_name="ShowChatMiniIcons"
height="16"
initial_value="true"
label="Show avatar icons within chat history"
layout="topleft"
left="30"
name="ShowChatMiniIcons"
top_pad="5"
width="400" />
<check_box
enabled="false"

View File

@ -19,7 +19,7 @@
name="effects_color_textbox"
top_pad="10"
width="200">
My effects (selection beam):
Selection effects (particle beam):
</text>
<color_swatch
can_apply_immediately="true"
@ -79,7 +79,7 @@
name="text_box1"
top_delta="5"
width="95">
Me
My text
</text>
<color_swatch
can_apply_immediately="true"
@ -206,6 +206,40 @@
width="95">
Errors
</text>
<color_swatch
can_apply_immediately="true"
color="ChatNameColor"
follows="left|top"
height="24"
label_height="0"
label_width="60"
layout="topleft"
left="360"
name="ChatNameColor"
top_pad="-15"
width="44">
<color_swatch.init_callback
function="Pref.getUIColor"
parameter="ChatNameColor" />
<color_swatch.commit_callback
function="Pref.applyUIColor"
parameter="ChatNameColor" />
</color_swatch>
<text
type="string"
length="1"
follows="left|top"
height="10"
layout="topleft"
left_pad="5"
mouse_opaque="false"
name="text_box3"
top_delta="5"
width="95">
Avatar Names
</text>
<color_swatch
can_apply_immediately="true"
color="LtYellow"
@ -239,7 +273,7 @@
</text>
<color_swatch
can_apply_immediately="true"
color="EmphasisColor"
color="HTMLLinkColor"
follows="left|top"
height="24"
label_height="0"
@ -351,7 +385,7 @@
initial_value="0.5"
layout="topleft"
label_width="115"
label="Inctive :"
label="Inactive :"
left="50"
max_val="1.00"
min_val="0.00"