CHUI preference cleanup, will need more polishing

meow-7.2.2
Cinders 2013-07-16 10:13:12 -06:00
parent b223c42cfc
commit b4f672f954
3 changed files with 261 additions and 175 deletions

View File

@ -599,20 +599,21 @@ BOOL LLFloaterPreference::postBuild()
tabcontainer->selectFirstTab();
getChild<LLUICtrl>("cache_location")->setEnabled(FALSE); // make it read-only but selectable (STORM-227)
// getChildView("log_path_string")->setEnabled(FALSE);// do the same for chat logs path // was removed in prefs refactoring -Zi
getChildView("log_path_string")->setEnabled(FALSE);// do the same for chat logs path
getChildView("log_path_string-panelsetup")->setEnabled(FALSE);// and the redundant instance -WoLf
std::string cache_location = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "");
setCacheLocation(cache_location);
getChild<LLUICtrl>("log_path_string")->setEnabled(FALSE); // make it read-only but selectable
getChild<LLComboBox>("language_combobox")->setCommitCallback(boost::bind(&LLFloaterPreference::onLanguageChange, this));
getChild<LLComboBox>("FriendIMOptions")->setCommitCallback(boost::bind(&LLFloaterPreference::onNotificationsChange, this,"FriendIMOptions"));
getChild<LLComboBox>("NonFriendIMOptions")->setCommitCallback(boost::bind(&LLFloaterPreference::onNotificationsChange, this,"NonFriendIMOptions"));
getChild<LLComboBox>("ConferenceIMOptions")->setCommitCallback(boost::bind(&LLFloaterPreference::onNotificationsChange, this,"ConferenceIMOptions"));
getChild<LLComboBox>("GroupChatOptions")->setCommitCallback(boost::bind(&LLFloaterPreference::onNotificationsChange, this,"GroupChatOptions"));
getChild<LLComboBox>("NearbyChatOptions")->setCommitCallback(boost::bind(&LLFloaterPreference::onNotificationsChange, this,"NearbyChatOptions"));
// <FS:CR> [CHUI MERGE]
// We don't use these in FS Communications UI, should we in the future? Disabling for now.
//getChild<LLComboBox>("FriendIMOptions")->setCommitCallback(boost::bind(&LLFloaterPreference::onNotificationsChange, this,"FriendIMOptions"));
//getChild<LLComboBox>("NonFriendIMOptions")->setCommitCallback(boost::bind(&LLFloaterPreference::onNotificationsChange, this,"NonFriendIMOptions"));
//getChild<LLComboBox>("ConferenceIMOptions")->setCommitCallback(boost::bind(&LLFloaterPreference::onNotificationsChange, this,"ConferenceIMOptions"));
//getChild<LLComboBox>("GroupChatOptions")->setCommitCallback(boost::bind(&LLFloaterPreference::onNotificationsChange, this,"GroupChatOptions"));
//getChild<LLComboBox>("NearbyChatOptions")->setCommitCallback(boost::bind(&LLFloaterPreference::onNotificationsChange, this,"NearbyChatOptions"));
// </FS:CR>
// ## Zi: Optional Edit Appearance Lighting
gSavedSettings.getControl("AppearanceCameraMovement")->getCommitSignal()->connect(boost::bind(&LLFloaterPreference::onAppearanceCameraChanged, this));
@ -961,11 +962,14 @@ void LLFloaterPreference::onOpen(const LLSD& key)
//get the options that were checked
onNotificationsChange("FriendIMOptions");
onNotificationsChange("NonFriendIMOptions");
onNotificationsChange("ConferenceIMOptions");
onNotificationsChange("GroupChatOptions");
onNotificationsChange("NearbyChatOptions");
// <FS:CR> [CHUI MERGE]
// We don't use these in FS Communications UI, should we in the future? Disabling for now.
//onNotificationsChange("FriendIMOptions");
//onNotificationsChange("NonFriendIMOptions");
//onNotificationsChange("ConferenceIMOptions");
//onNotificationsChange("GroupChatOptions");
//onNotificationsChange("NearbyChatOptions");
// </FS:CR>
LLPanelLogin::setAlwaysRefresh(true);
refresh();
@ -1531,7 +1535,7 @@ void LLFloaterPreference::refreshEnabledState()
// [RLVa:KB] - Checked: 2010-04-09 (RLVa-1.2.0e) | Modified: RLVa-1.2.0e
if (rlv_handler_t::isEnabled())
childSetEnabled("busy_response", !gRlvHandler.hasBehaviour(RLV_BHVR_SENDIM));
childSetEnabled("do_not_disturb_response", !gRlvHandler.hasBehaviour(RLV_BHVR_SENDIM));
// [/RLVa:KB]
// [RLVa:KB] - Checked: 2013-05-11 (RLVa-1.4.9)
@ -2090,13 +2094,16 @@ void LLFloaterPreference::setPersonalInfo(const std::string& visibility, bool im
getChildView("send_im_to_email")->setEnabled(TRUE);
getChild<LLUICtrl>("send_im_to_email")->setValue(im_via_email);
getChildView("favorites_on_login_check")->setEnabled(TRUE);
// getChildView("log_path_string")->setEnabled(FALSE);// LineEditor becomes readonly in this case. || Moved to PostBuild to disable on not logged in state -WoLf || <FS:TM> CHUI Merge removed by ll, check where this was moved to in FS and see if it needs updating
getChildView("log_path_button")->setEnabled(TRUE);
getChildView("chat_font_size")->setEnabled(TRUE);
getChildView("open_log_path_button")->setEnabled(TRUE);
getChildView("log_path_button-panelsetup")->setEnabled(TRUE);// second set of controls for panel_preferences_setup -WoLf
getChildView("open_log_path_button-panelsetup")->setEnabled(TRUE);
std::string Chatlogsdir = gDirUtilp->getOSUserAppDir();
getChildView("conversation_log_combo")->setEnabled(TRUE); // <FS:CR>
getChildView("LogNearbyChat")->setEnabled(TRUE); // <FS:CR>
getChildView("log_nearby_chat")->setEnabled(TRUE); // <FS:CR> Readd after CHUI merge
//[FIX FIRE-2765 : SJ] Set Chatlog Reset Button on enabled when Chatlogpath isn't the default folder
if (gSavedPerAccountSettings.getString("InstantMessageLogPath") != gDirUtilp->getOSUserAppDir())
{

View File

@ -220,14 +220,6 @@
top_pad="1"
height="16"
width="400" />
<check_box
control_name="IMShowTime"
name="IMShowTime"
label="Show timestamps in chat history and IMs"
layout="topleft"
top_pad="1"
height="16"
width="400" />
<check_box
control_name="IMShowNamesForP2PConv"
name="IMShowNamesForP2PConv"
@ -485,25 +477,24 @@
label="Group Chats"
layout="topleft"
top_pad="1"
left="40"
left_delta="10"
height="18"
tool_tip="Check to see popups when a Group Chat message arrives"
width="400" />
width="200" />
<check_box
control_name="EnableIMChatPopups"
name="EnableIMChatPopups"
label="IM Chats"
layout="topleft"
top_pad="0"
left="40"
left_pad="10"
height="18"
tool_tip="Check to see popups when an instant message arrives"
width="400" />
width="200" />
<check_box
layout="topleft"
follows="left|top"
top_pad="10"
top_pad="4"
left="30"
width="400"
height="18"
@ -516,7 +507,7 @@
layout="topleft"
follows="left|top"
top_pad="1"
left="40"
left_delta="10"
width="400"
height="18"
name="FSLogImToChatConsole"
@ -528,7 +519,6 @@
layout="topleft"
follows="left|top"
top_pad="1"
left="40"
width="400"
height="18"
name="FSLogGroupImToChatConsole"
@ -538,7 +528,8 @@
<text
follows="left|top"
height="15"
left="50"
top_pad="3"
left_delta="4"
name="FSShowGroupNameLength_label"
width="275">
Length of group name to be printed in chat history
@ -568,31 +559,21 @@
control_name="FSShowIMInChatHistory"
label="Show IMs in nearby chat window"/>
<check_box
enabled_control="FSShowIMInChatHistory"
layout="topleft"
follows="left|top"
top_pad="1"
left="50"
left_delta="10"
width="155"
height="18"
name="FSLogIMInChatHistory"
control_name="FSLogIMInChatHistory"
label="Save IMs in nearby chat"/>
<text
top_delta="2"
name="requires_save_chat_logs"
follows="left|top"
layout="topleft"
left_pad="0"
height="18"
width="200"
text_color="White_25">
(requires saving nearby chat logs)
</text>
<text
top_pad="10"
top_pad="1"
follows="left|top"
height="15"
left="50"
left="44"
name="FSIMChatHistoryFade_label"
width="325">
Fade IM text into the background of the chat history window
@ -626,7 +607,6 @@
layout="topleft"
follows="left|top"
top_pad="1"
left="30"
width="400"
height="18"
name="FSIMChatFlashOnFriendStatusChange"
@ -637,7 +617,6 @@
layout="topleft"
follows="left|top"
top_pad="1"
left="30"
width="400"
height="18"
name="FSReportMutedGroupChat"
@ -969,7 +948,7 @@
layout="topleft"
follows="left|top"
top_pad="0"
left="50"
left_delta="10"
width="30"
height="18"
control_name="FSMuteGroupWhenNoticesDisabled"
@ -989,7 +968,7 @@
</text>
<check_box
control_name="FSHideTimestampsNearbyChat"
height="18"
height="16"
label="Hide timestamp in Nearby Chat"
layout="topleft"
left="30"
@ -998,13 +977,20 @@
width="400" />
<check_box
control_name="FSHideTimestampsIM"
height="18"
height="16"
label="Hide timestamp in IMs"
layout="topleft"
left="30"
name="hide_timestamps_im"
top_pad="0"
width="400" />
<check_box
control_name="IMShowTime"
name="IMShowTime"
label="Show timestamps in chat history and IMs"
layout="topleft"
top_pad="0"
height="16"
width="400" />
<!-- Console -->
<text
name="console_enhancements"

View File

@ -22,141 +22,235 @@
tab_min_width="50"
tab_position="top" >
<!--General-->
<panel
top_pad="5"
bottom="-1"
left="1"
right="-1"
follows="all"
label="General"
name="tab-general" >
<!--General-->
<panel
top_pad="5"
bottom="-1"
left="1"
right="-1"
follows="all"
label="General"
name="tab-general" >
<panel.string
name="log_in_to_change">
log in to change
name="log_in_to_change">
log in to change
</panel.string>
<button
follows="left|top"
height="23"
label="Clear History"
tool_tip="Clear login image, last location, teleport history, web, and texture cache"
layout="topleft"
left="30"
name="clear_cache"
top_pad="10"
width="145">
<button
follows="left|top"
height="23"
label="Clear History"
tool_tip="Clear login image, last location, teleport history, web, and texture cache"
layout="topleft"
left="30"
name="clear_cache"
top_pad="10"
width="145">
<button.commit_callback
function="Pref.WebClearCache" />
</button>
function="Pref.WebClearCache" />
</button>
<text
type="string"
length="1"
follows="left|top"
height="10"
layout="topleft"
left_pad="10"
mouse_opaque="false"
name="cache_size_label"
text_color="LtGray_50"
width="300">
<text
type="string"
length="1"
follows="left|top"
height="10"
layout="topleft"
left_pad="10"
mouse_opaque="false"
name="cache_size_label"
text_color="LtGray_50"
width="300">
(Locations, images, web, search history)
</text>
</text>
<check_box
height="16"
enabled="true"
label="Publish my avatar in search listings"
layout="topleft"
left="30"
name="online_searchresults"
top_pad="10"
width="350" />
<check_box
height="16"
enabled="true"
label="Publish my avatar in search listings"
layout="topleft"
left="30"
name="online_searchresults"
top_pad="10"
width="350" />
<check_box
height="16"
enabled="false"
label="Only friends and groups know I'm online"
layout="topleft"
left="30"
name="online_visibility"
top_pad="3"
width="350" />
<check_box
height="16"
enabled="false"
label="Only friends and groups know I'm online"
layout="topleft"
left="30"
name="online_visibility"
top_pad="3"
width="350" />
<check_box
enabled_control="EnableVoiceChat"
control_name="AutoDisengageMic"
height="16"
label="Switch off microphone when ending calls"
layout="topleft"
left="30"
name="auto_disengage_mic_check"
top_pad="3"
width="350" />
<check_box
enabled_control="EnableVoiceChat"
control_name="AutoDisengageMic"
height="16"
label="Switch off microphone when ending calls"
layout="topleft"
left="30"
name="auto_disengage_mic_check"
top_pad="3"
width="350" />
<check_box
control_name="AutoAcceptNewInventory"
height="16"
label="Automatically accept new inventory items"
layout="topleft"
left="30"
name="Auto_Accept_New_Inventory"
top_pad="3"
width="350" />
<check_box
control_name="AutoAcceptNewInventory"
height="16"
label="Automatically accept new inventory items"
layout="topleft"
left="30"
name="Auto_Accept_New_Inventory"
top_pad="3"
width="350" />
<check_box
control_name="FSUseLegacyInventoryAcceptMessages"
height="16"
label="Use legacy inventory offer accept/decline messages"
layout="topleft"
left="30"
name="FSUseLegacyInventoryAcceptMessages"
tool_tip="If enabled, the viewer will only send accept and decline messages after pressing the according button. If disabled, the accept response will be sent automatically as soon as the inventory offer has been received. This option has no effect if inventory offers are accepted automatically."
top_pad="3"
width="350" />
<check_box
control_name="FSUseLegacyInventoryAcceptMessages"
height="16"
label="Use legacy inventory offer accept/decline messages"
layout="topleft"
left="30"
name="FSUseLegacyInventoryAcceptMessages"
tool_tip="If enabled, the viewer will only send accept and decline messages after pressing the according button. If disabled, the accept response will be sent automatically as soon as the inventory offer has been received. This option has no effect if inventory offers are accepted automatically."
top_pad="3"
width="350" />
<check_box
control_name="ShowInInventory"
height="16"
label="Automatically show newly accepted items in inventory"
layout="topleft"
left="30"
name="Show_In_Inventory"
top_pad="3"
width="350" />
<check_box
control_name="ShowInInventory"
height="16"
label="Automatically show newly accepted items in inventory"
layout="topleft"
left="30"
name="Show_In_Inventory"
top_pad="3"
width="350" />
<check_box
control_name="ShowNewInventory"
height="16"
label="Automatically view notecards, textures, landmarks after accepting"
layout="topleft"
left="30"
name="Show_New_Inventory"
top_pad="3"
width="350" />
control_name="ShowNewInventory"
height="16"
label="Automatically view notecards, textures, landmarks after accepting"
layout="topleft"
left="30"
name="Show_New_Inventory"
top_pad="3"
width="350" />
<check_box
control_name="FSCreateGiveInventoryParticleEffect"
height="16"
label="Create particle effects upon giving inventory objects to other avatars"
layout="topleft"
left="30"
name="FSCreateGiveInventoryParticleEffect"
top_pad="3"
width="350" />
control_name="FSCreateGiveInventoryParticleEffect"
height="16"
label="Create particle effects upon giving inventory objects to other avatars"
layout="topleft"
left="30"
name="FSCreateGiveInventoryParticleEffect"
top_pad="3"
width="350" />
<check_box
control_name="ShowFavoritesOnLogin"
<check_box
control_name="ShowFavoritesOnLogin"
enabled="false"
label="Show my Favorite Landmarks at Login (via &apos;Start At&apos; drop-down menu)"
layout="topleft"
left="30"
name="favorites_on_login_check"
top_pad="3"
height="16"
width="350" />
<text
type="string"
length="1"
follows="left|top"
height="10"
layout="topleft"
left="30"
mouse_opaque="false"
name="logging_label"
width="100">
Save:
</text>
<check_box
enabled="false"
control_name="LogNearbyChat"
name="LogNearbyChat"
label="Save Nearby chat"
layout="topleft"
top_delta="-2"
left_pad="2"
height="18"
tool_tip="Record nearby chat messages to your hard drive"
width="200" />
<combo_box
enabled="false"
control_name="KeepConversationLogTranscripts"
height="23"
layout="topleft"
left="32"
top_pad="0"
name="conversation_log_combo"
width="165">
<item
label="Log and transcripts"
value="2"/>
<item
label="Log only"
value="1"/>
<item
label="No log or transcripts"
value="0"/>
</combo_box>
<button
enabled="false"
follows="left|top"
height="23"
label="Clear log..."
layout="topleft"
left_pad="4"
name="clear_log"
top_delta="0"
width="110">
<button.commit_callback
function="Pref.ClearLog" />
</button>
<button
enabled="false"
label="Show my Favorite Landmarks at Login (via &apos;Start At&apos; drop-down menu)"
follows="left|top"
height="23"
label="Delete transcripts..."
layout="topleft"
left_pad="5"
top_delta="0"
name="delete_transcripts"
width="140">
<commit_callback
function="Pref.DeleteTranscripts" />
</button>
<text
layout="topleft"
follows="left|top"
left="30"
name="favorites_on_login_check"
top_pad="3"
height="16"
width="350" />
text_color="White"
height="12"
top_pad="4"
width="55">
Location:
</text>
<line_editor
control_name="InstantMessageLogPath"
follows="left|top"
border_style="line"
border_thickness="1"
font="SansSerif"
height="23"
layout="topleft"
left_pad="55"
max_length="4096"
name="log_path_string"
top_delta="-5"
width="285">
</line_editor>
<button
follows="left|top"
@ -165,12 +259,12 @@
layout="topleft"
left="30"
name="block_list"
top_pad="5"
top="380"
width="255">
<!-- <button.commit_callback
function="SideTray.ShowPanel"-->
<button.commit_callback
function="Pref.BlockList"/>
<!-- <button.commit_callback
function="SideTray.ShowPanel"-->
<button.commit_callback
function="Pref.BlockList"/>
</button>
</panel>
@ -295,7 +389,6 @@
tool_tip="Prevents your selection point from showing to others"
top_pad="4"
width="350" />
</panel>
<!--Autoresponse-->
@ -322,7 +415,7 @@
Automatic response when in UNAVAILABLE (ie, BUSY) mode:
</text>
<text_editor
control_name="BusyModeResponse"
control_name="DoNotDisturbModeResponse"
use_ellipses="false"
commit_on_focus_lost = "true"
follows="left|top"
@ -330,7 +423,7 @@
layout="topleft"
left="35"
top_pad="10"
name="busy_response"
name="do_not_disturb_response"
width="475"
word_wrap="true">
log_in_to_change