From 1fb1c12068f76d0a6fd22c6d56d575a45c806e12 Mon Sep 17 00:00:00 2001 From: Beeks Date: Thu, 26 Aug 2010 17:18:32 -0400 Subject: [PATCH] Minor fix to AscentPrefsVan for linux - And in general. Thanks for bringing that to my attention, Verissimo! Aside from that, getting ready to actually activate another vanity feature. Probably see it in a couple hours. Signed-off-by: Beeks --- indra/newview/app_settings/settings.xml | 428 ++++++++++-------- indra/newview/ascentprefssys.cpp | 67 ++- indra/newview/ascentprefsvan.cpp | 76 +++- .../en-us/panel_preferences_ascent_system.xml | 15 +- .../en-us/panel_preferences_ascent_vanity.xml | 20 +- 5 files changed, 356 insertions(+), 250 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index ff949c603..b3c9829f6 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -114,203 +114,241 @@ 0 - AscentCmdLine - - Comment - Would you like the chatbar to be able to be used for command line functions? - Persist - 1 - Type - Boolean - Value - 1 - - AscentCmdLineClearChat - - Comment - Clear chat history to stop lag from chat spam - Persist - 1 - Type - String - Value - clrchat - - AscentCmdLineHeight - - Comment - Teleport to height function command - Persist - 1 - Type - String - Value - gth - - AscentCmdLinePos - - Comment - Teleport to position function command - Persist - 1 - Type - String - Value - gtp - - AscentCmdLineGround - - Comment - Teleport to ground function command - Persist - 1 - Type - String - Value - flr - - AscentCmdLineTeleportHome - - Comment - Teleport to home function command - Persist - 1 - Type - String - Value - tph - - AscentCmdLineRezPlatform - - Comment - Rez a platform underneath you - Persist - 1 - Type - String - Value - rezplat - - AscentPlatformSize - - Comment - How wide the rezzed platform will appear to be. - Persist - 1 - Type - F32 - Value - 30 - - AscentCmdLineMapTo - - Comment - Teleport to a region by name rapidly - Persist - 1 - Type - String - Value - mapto - - AscentCmdLineDrawDistance - - Comment - Change draw distance quickly - Persist - 1 - Type - String - Value - dd - - AscentCmdTeleportToCam - - Comment - Teleport to your camera - Persist - 1 - Type - String - Value - tp2cam - - AscentCmdLineKeyToName - - Comment - Use a fast key to name querry - Persist - 1 - Type - String - Value - key2name - - AscentCmdLineOfferTp - - Comment - Offer a teleport to target avatar - Persist - 1 - Type - String - Value - offertp - - AscentCmdLineCalc - - Comment - Calculates an expression - Persist - 1 - Type - String - Value - calc - - AscentCmdLineTP2 - - Comment - Teleport to a person by name, partials work. - Persist - 1 - Type - String - Value - tp2 - - AscentAutoCloseOOC - - Comment - Auto-close OOC chat (i.e. add \"))\" if not found and \"((\" was used) - Persist - 1 - Type - Boolean - Value - 0 - - AscentAllowMUpose - - Comment - Allow MU* pose style in chat and IM (with ':' as a synonymous to '/me ') - Persist - 1 - Type - Boolean - Value - 0 - + AscentCmdLine + + Comment + Would you like the chatbar to be able to be used for command line functions? + Persist + 1 + Type + Boolean + Value + 1 + + AscentCmdLineClearChat + + Comment + Clear chat history to stop lag from chat spam + Persist + 1 + Type + String + Value + clrchat + + AscentCmdLineHeight + + Comment + Teleport to height function command + Persist + 1 + Type + String + Value + gth + + AscentCmdLinePos + + Comment + Teleport to position function command + Persist + 1 + Type + String + Value + gtp + + AscentCmdLineGround + + Comment + Teleport to ground function command + Persist + 1 + Type + String + Value + flr + + AscentCmdLineTeleportHome + + Comment + Teleport to home function command + Persist + 1 + Type + String + Value + tph + + AscentCmdLineRezPlatform + + Comment + Rez a platform underneath you + Persist + 1 + Type + String + Value + rezplat + + AscentPlatformSize + + Comment + How wide the rezzed platform will appear to be. + Persist + 1 + Type + F32 + Value + 30 + + AscentCmdLineMapTo + + Comment + Teleport to a region by name rapidly + Persist + 1 + Type + String + Value + mapto + + AscentCmdLineDrawDistance + + Comment + Change draw distance quickly + Persist + 1 + Type + String + Value + dd + + AscentCmdTeleportToCam + + Comment + Teleport to your camera + Persist + 1 + Type + String + Value + tp2cam + + AscentCmdLineKeyToName + + Comment + Use a fast key to name querry + Persist + 1 + Type + String + Value + key2name + + AscentCmdLineOfferTp + + Comment + Offer a teleport to target avatar + Persist + 1 + Type + String + Value + offertp + + AscentCmdLineCalc + + Comment + Calculates an expression + Persist + 1 + Type + String + Value + calc + + AscentCmdLineTP2 + + Comment + Teleport to a person by name, partials work. + Persist + 1 + Type + String + Value + tp2 + + AscentUseCustomTag + + Comment + Show a custom local tag. + Persist + 1 + Type + Boolean + Value + 0 + + AscentCustomTagColor + + Comment + Color of custom local tag. + Persist + 1 + Type + Color4 + Value + + 0.5 + 1.0 + 0.25 + 1.0 + + + AscentCustomTagLabel + + Comment + Label for the custom local tag + Persist + 1 + Type + String + Value + Custom + + AscentAutoCloseOOC + + Comment + Auto-close OOC chat (i.e. add \"))\" if not found and \"((\" was used) + Persist + 1 + Type + Boolean + Value + 0 + + AscentAllowMUpose + + Comment + Allow MU* pose style in chat and IM (with ':' as a synonymous to '/me ') + Persist + 1 + Type + Boolean + Value + 0 + AscentStoreSettingsPerAccount - Comment - Toggles whether to save certain settings per-account, rather than per-install. - Persist - 0 - Type - Boolean - Value - 0 + Comment + Toggles whether to save certain settings per-account, rather than per-install. + Persist + 0 + Type + Boolean + Value + 0 AscentDataSeparator diff --git a/indra/newview/ascentprefssys.cpp b/indra/newview/ascentprefssys.cpp index ae394020a..b04775bac 100644 --- a/indra/newview/ascentprefssys.cpp +++ b/indra/newview/ascentprefssys.cpp @@ -34,7 +34,6 @@ //File include #include "ascentprefssys.h" -#include "ascentprefsvan.h" #include "llcolorswatch.h" #include "llvoavatar.h" #include "llagent.h" @@ -244,9 +243,20 @@ void LLPrefsAscentSysImpl::apply() { std::string short_date, long_date, short_time, long_time, timestamp; - gSavedSettings.setU32("LinksForChattingObjects", childGetValue("objects_link").asInteger()); + //General ------------------------------------------------------------------------------ + gSavedSettings.setBOOL("DoubleClickTeleport", childGetValue("double_click_teleport_check")); + gSavedSettings.setBOOL("PreviewAnimInWorld", childGetValue("preview_anim_in_world_check")); + gSavedSettings.setBOOL("SaveScriptsAsMono", childGetValue("save_scripts_as_mono_check")); + gSavedSettings.setBOOL("AscentAlwaysRezInGroup", childGetValue("always_rez_in_group_check")); - //Save User Interface + //Chat/IM ------------------------------------------------------------------------------ + //Missing the echo/log option. + gSavedSettings.setBOOL("PlayTypingSound", childGetValue("play_typing_sound_check")); + gSavedSettings.setBOOL("AscentHideTypingNotification", childGetValue("hide_typing_check")); + //MU Pose missing. + //Auto-close missing. + gSavedSettings.setU32("LinksForChattingObjects", childGetValue("objects_link").asInteger()); + LLComboBox* combo = getChild("time_format_combobox"); if (combo) { mTimeFormat = combo->getCurrentIndex(); @@ -290,37 +300,46 @@ void LLPrefsAscentSysImpl::apply() timestamp = "%a %b %d %Y" + timestamp; } - gSavedSettings.setString("ShortDateFormat", short_date); - gSavedSettings.setString("LongDateFormat", long_date); - gSavedSettings.setString("ShortTimeFormat", short_time); - gSavedSettings.setString("LongTimeFormat", long_time); - gSavedSettings.setString("TimestampFormat", timestamp); + gSavedSettings.setString("ShortDateFormat", short_date); + gSavedSettings.setString("LongDateFormat", long_date); + gSavedSettings.setString("ShortTimeFormat", short_time); + gSavedSettings.setString("LongTimeFormat", long_time); + gSavedSettings.setString("TimestampFormat", timestamp); gSavedSettings.setBOOL("SecondsInChatAndIMs", childGetValue("seconds_in_chat_and_ims_check")); - //Save Chat/IM - gSavedSettings.setBOOL("PlayTypingSound", childGetValue("play_typing_sound_check")); - - //Save Performance + //Performance ---------------------------------------------------------------------------- + gSavedSettings.setBOOL("FetchInventoryOnLogin", childGetValue("fetch_inventory_on_login_check")); gSavedSettings.setBOOL("WindEnabled", childGetValue("enable_wind")); - - //Save Privacy - - gSavedSettings.setBOOL("AscentHideTypingNotification", childGetValue("hide_typing_check")); - - //Save Misc - gSavedSettings.setBOOL("DoubleClickTeleport", childGetValue("double_click_teleport_check")); + //Missing "Enabled Clouds" gSavedSettings.setBOOL("SpeedRez", childGetValue("speed_rez_check")); gSavedSettings.setU32("SpeedRezInterval", childGetValue("speed_rez_interval").asReal()); - gSavedSettings.setBOOL("PreviewAnimInWorld", childGetValue("preview_anim_in_world_check")); + + //Commandline ---------------------------------------------------------------------------- + //Missing "Use Command Line" + gSavedSettings.setString("AscentCmdLinePos", childGetValue("AscentCmdLinePos")); + gSavedSettings.setString("AscentCmdLineGround", childGetValue("AscentCmdLineGround")); + gSavedSettings.setString("AscentCmdLineHeight", childGetValue("AscentCmdLineHeight")); + gSavedSettings.setString("AscentCmdLineTeleportHome", childGetValue("AscentCmdLineTeleportHome")); + gSavedSettings.setString("AscentCmdLineRezPlatform", childGetValue("AscentCmdLineRezPlatform")); + //Platform Size + gSavedSettings.setString("AscentCmdLineCalc", childGetValue("AscentCmdLineCalc")); + gSavedSettings.setString("AscentCmdLineClearChat", childGetValue("AscentCmdLineClearChat")); + //------------------------------------------------------------------------------------- + gSavedSettings.setString("AscentCmdLineDrawDistance", childGetValue("AscentCmdLineDrawDistance")); + gSavedSettings.setString("AscentCmdTeleportToCam", childGetValue("AscentCmdTeleportToCam")); + gSavedSettings.setString("AscentCmdLineKeyToName", childGetValue("AscentCmdLineKeyToName")); + gSavedSettings.setString("AscentCmdLineOfferTp", childGetValue("AscentCmdLineOfferTp")); + gSavedSettings.setString("AscentCmdLineMapTo", childGetValue("AscentCmdLineMapTo")); + gSavedSettings.setBOOL("AscentCmdLineMapToKeepPos", childGetValue("AscentCmdLineMapToKeepPos")); + gSavedSettings.setString("AscentCmdLineTP2", childGetValue("AscentCmdLineTP2")); + + + //Privacy -------------------------------------------------------------------------------- gSavedSettings.setBOOL("BroadcastViewerEffects", childGetValue("broadcast_viewer_effects")); gSavedSettings.setBOOL("DisablePointAtAndBeam", childGetValue("disable_point_at_and_beams_check")); gSavedSettings.setBOOL("PrivateLookAt", childGetValue("private_look_at_check")); gSavedSettings.setBOOL("RevokePermsOnStandUp", childGetValue("revoke_perms_on_stand_up_check")); - gSavedSettings.setBOOL("SaveScriptsAsMono", childGetValue("save_scripts_as_mono_check")); - gSavedSettings.setBOOL("FetchInventoryOnLogin", childGetValue("fetch_inventory_on_login_check")); - gSavedSettings.setBOOL("AscentAlwaysRezInGroup", childGetValue("always_rez_in_group_check")); - refreshValues(); } diff --git a/indra/newview/ascentprefsvan.cpp b/indra/newview/ascentprefsvan.cpp index c5d0eed1e..3b20ce398 100644 --- a/indra/newview/ascentprefsvan.cpp +++ b/indra/newview/ascentprefsvan.cpp @@ -62,9 +62,14 @@ public: private: static void onCommitCheckBox(LLUICtrl* ctrl, void* user_data); void refreshValues(); + //General + BOOL mUseAccountSettings; + //Colors BOOL mShowSelfClientTag; BOOL mShowSelfClientTagColor; - BOOL mUseAccountSettings; + BOOL mCustomTagOn; + std::string mCustomTagLabel; + LLColor4 mCustomTagColor; LLColor4 mEffectColor; U32 mSelectedClient; }; @@ -75,6 +80,22 @@ LLPrefsAscentVanImpl::LLPrefsAscentVanImpl() { LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_ascent_vanity.xml"); childSetCommitCallback("use_account_settings_check", onCommitCheckBox, this); + childSetCommitCallback("customize_own_tag_check", onCommitCheckBox, this); + + if (gSavedSettings.getBOOL("AscentUseCustomTag")) + { + childEnable("custom_tag_label_text"); + childEnable("custom_tag_label_box"); + childEnable("custom_tag_color_text"); + childEnable("custom_tag_color_swatch"); + } + else + { + childDisable("custom_tag_label_text"); + childDisable("custom_tag_label_box"); + childDisable("custom_tag_color_text"); + childDisable("custom_tag_color_swatch"); + } refresh(); } @@ -82,8 +103,31 @@ LLPrefsAscentVanImpl::LLPrefsAscentVanImpl() //static void LLPrefsAscentVanImpl::onCommitCheckBox(LLUICtrl* ctrl, void* user_data) { + LLPrefsAscentVanImpl* self = (LLPrefsAscentVanImpl*)user_data; - self->refresh(); + + llinfos << "Control named " << ctrl->getControlName() << llendl; + if (ctrl->getControlName() == "AscentStoreSettingsPerAccount") + { + self->refresh(); + } + else + { + if (gSavedSettings.getBOOL("AscentUseCustomTag")) + { + self->childEnable("custom_tag_label_text"); + self->childEnable("custom_tag_label_box"); + self->childEnable("custom_tag_color_text"); + self->childEnable("custom_tag_color_swatch"); + } + else + { + self->childDisable("custom_tag_label_text"); + self->childDisable("custom_tag_label_box"); + self->childDisable("custom_tag_color_text"); + self->childDisable("custom_tag_color_swatch"); + } + } } void LLPrefsAscentVanImpl::refreshValues() @@ -103,7 +147,7 @@ void LLPrefsAscentVanImpl::refreshValues() } else { - mSelectedClient = gSavedPerAccountSettings.getU32("AscentSpoofClientIndex"); + mSelectedClient = gSavedPerAccountSettings.getU32("AscentSpoofClientIndex"); mEffectColor = gSavedPerAccountSettings.getColor4("EffectColor"); } } @@ -111,10 +155,13 @@ void LLPrefsAscentVanImpl::refreshValues() void LLPrefsAscentVanImpl::refresh() { refreshValues(); - //General + //General -------------------------------------------------------------------------------- childSetValue("use_account_settings_check", mUseAccountSettings); - //Colors - llinfos << "Refreshing Vanity panel." << llendl; + + //Colors --------------------------------------------------------------------------------- + LLComboBox* combo = getChild("tag_spoofing_combobox"); + combo->setCurrentByIndex(mSelectedClient); + childSetValue("show_self_tag_check", mShowSelfClientTag); childSetValue("show_self_tag_color_check", mShowSelfClientTagColor); @@ -134,9 +181,7 @@ void LLPrefsAscentVanImpl::refresh() } - // tag spoofing comboxbox - LLComboBox* combo = getChild("tag_spoofing_combobox"); - combo->setCurrentByIndex(mSelectedClient); + } @@ -149,8 +194,10 @@ void LLPrefsAscentVanImpl::apply() { std::string client_uuid; U32 client_index; - - //Colors + //General ----------------------------------------------------------------------------- + + + //Colors ------------------------------------------------------------------------------ LLComboBox* combo = getChild("tag_spoofing_combobox"); if (combo) { @@ -158,7 +205,7 @@ void LLPrefsAscentVanImpl::apply() //Don't rebake if it's not neccesary. if (client_index != mSelectedClient) { - client_uuid = combo->getSelectedValue(); + client_uuid = combo->getSelectedValue().asString(); if (!gSavedSettings.getBOOL("AscentStoreSettingsPerAccount")) { gSavedSettings.setString("AscentSpoofClientUUID", client_uuid); @@ -177,6 +224,8 @@ void LLPrefsAscentVanImpl::apply() avatar->forceBakeAllTextures(slam_for_debug); } } + gSavedSettings.setBOOL("AscentShowSelfTag", childGetValue("show_self_tag_check")); + gSavedSettings.setBOOL("AscentShowSelfTagColor", childGetValue("show_self_tag_color_check")); if (!gSavedSettings.getBOOL("AscentStoreSettingsPerAccount")) { @@ -189,8 +238,7 @@ void LLPrefsAscentVanImpl::apply() gSavedPerAccountSettings.setColor4("EffectColor", childGetValue("effect_color_swatch")); } - gSavedSettings.setBOOL("AscentShowSelfTag", childGetValue("show_self_tag_check")); - gSavedSettings.setBOOL("AscentShowSelfTagColor", childGetValue("show_self_tag_color_check")); + refreshValues(); } diff --git a/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_system.xml b/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_system.xml index 7b8fc9e31..2ddac3726 100644 --- a/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_system.xml +++ b/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_system.xml @@ -17,12 +17,6 @@ tool_tip="The Animation upload window will play animations on your avatar when previewing them." mouse_opaque="true" name="preview_anim_in_world_check" radio_style="false" width="400" /> - + name="AscentCmdLineMapToKeepPos" radio_style="false" width="270" + control_name="AscentCmdLineMapToKeepPos"/> Teleport to avatar (usage: cmd name) @@ -299,6 +294,12 @@ tool_tip="Turns off broadcasting headturns and lookat beacons for yourself." mouse_opaque="true" name="private_look_at_check" radio_style="false" width="400" /> + diff --git a/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_vanity.xml b/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_vanity.xml index 1e45d8352..07a2b24b9 100644 --- a/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_vanity.xml +++ b/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_vanity.xml @@ -90,32 +90,32 @@ tool_tip="Enabling this set your avatar name color to your client tag color or custom set color." mouse_opaque="true" name="show_self_tag_color_check" radio_style="false" width="400" /> - + mouse_opaque="true" name="custom_tag_label_text" v_pad="0" width="394"> Tag Label: - + mouse_opaque="true" name="custom_tag_color_text" v_pad="0" width="394"> Tag color: