Removed commented out code.

This commit is contained in:
TighMacFanatic
2011-05-29 20:18:44 -04:00
parent da23cd1f42
commit 3813ccb15a
5 changed files with 194 additions and 236 deletions

View File

@@ -57,22 +57,22 @@ LLPrefsAscentChat::LLPrefsAscentChat()
childSetCommitCallback("date_format_combobox", onCommitTimeDate, this); childSetCommitCallback("date_format_combobox", onCommitTimeDate, this);
childSetCommitCallback("AscentInstantMessageResponseAnyone", onCommitAutoResponse, this); childSetCommitCallback("AscentInstantMessageResponseAnyone", onCommitAutoResponse, this);
childSetCommitCallback("AscentInstantMessageResponseFriends", onCommitAutoResponse, this); childSetCommitCallback("AscentInstantMessageResponseFriends", onCommitAutoResponse, this);
childSetCommitCallback("AscentInstantMessageResponseMuted", onCommitAutoResponse, this); childSetCommitCallback("AscentInstantMessageResponseMuted", onCommitAutoResponse, this);
childSetCommitCallback("AscentInstantMessageShowOnTyping", onCommitAutoResponse, this); childSetCommitCallback("AscentInstantMessageShowOnTyping", onCommitAutoResponse, this);
childSetCommitCallback("AscentInstantMessageShowResponded", onCommitAutoResponse, this); childSetCommitCallback("AscentInstantMessageShowResponded", onCommitAutoResponse, this);
childSetCommitCallback("AscentInstantMessageResponseRepeat", onCommitAutoResponse, this); childSetCommitCallback("AscentInstantMessageResponseRepeat", onCommitAutoResponse, this);
childSetCommitCallback("AscentInstantMessageResponseItem", onCommitAutoResponse, this); childSetCommitCallback("AscentInstantMessageResponseItem", onCommitAutoResponse, this);
childSetCommitCallback("im_response", onCommitAutoResponse, this); childSetCommitCallback("im_response", onCommitAutoResponse, this);
childSetCommitCallback("KeywordsOn", onCommitKeywords, this); childSetCommitCallback("KeywordsOn", onCommitKeywords, this);
childSetCommitCallback("KeywordsList", onCommitKeywords, this); childSetCommitCallback("KeywordsList", onCommitKeywords, this);
childSetCommitCallback("KeywordsSound", onCommitKeywords, this); childSetCommitCallback("KeywordsSound", onCommitKeywords, this);
childSetCommitCallback("KeywordsInChat", onCommitKeywords, this); childSetCommitCallback("KeywordsInChat", onCommitKeywords, this);
childSetCommitCallback("KeywordsInIM", onCommitKeywords, this); childSetCommitCallback("KeywordsInIM", onCommitKeywords, this);
childSetCommitCallback("KeywordsChangeColor", onCommitKeywords, this); childSetCommitCallback("KeywordsChangeColor", onCommitKeywords, this);
childSetCommitCallback("KeywordsColor", onCommitKeywords, this); childSetCommitCallback("KeywordsColor", onCommitKeywords, this);
childSetCommitCallback("KeywordsPlaySound", onCommitKeywords, this); childSetCommitCallback("KeywordsPlaySound", onCommitKeywords, this);
refreshValues(); refreshValues();
refresh(); refresh();
@@ -235,9 +235,9 @@ void LLPrefsAscentChat::refreshValues()
//Chat/IM ----------------------------------------------------------------------------- //Chat/IM -----------------------------------------------------------------------------
mWoLfVerticalIMTabs = gSavedSettings.getBOOL("WoLfVerticalIMTabs"); mWoLfVerticalIMTabs = gSavedSettings.getBOOL("WoLfVerticalIMTabs");
mIMAnnounceIncoming = gSavedSettings.getBOOL("AscentInstantMessageAnnounceIncoming"); mIMAnnounceIncoming = gSavedSettings.getBOOL("AscentInstantMessageAnnounceIncoming");
mHideTypingNotification = gSavedSettings.getBOOL("AscentHideTypingNotification"); mHideTypingNotification = gSavedSettings.getBOOL("AscentHideTypingNotification");
mShowGroupNameInChatIM = gSavedSettings.getBOOL("OptionShowGroupNameInChatIM"); mShowGroupNameInChatIM = gSavedSettings.getBOOL("OptionShowGroupNameInChatIM");
mPlayTypingSound = gSavedSettings.getBOOL("PlayTypingSound"); mPlayTypingSound = gSavedSettings.getBOOL("PlayTypingSound");
mHideNotificationsInChat = gSavedSettings.getBOOL("HideNotificationsInChat"); mHideNotificationsInChat = gSavedSettings.getBOOL("HideNotificationsInChat");
mEnableMUPose = gSavedSettings.getBOOL("AscentAllowMUpose"); mEnableMUPose = gSavedSettings.getBOOL("AscentAllowMUpose");
mEnableOOCAutoClose = gSavedSettings.getBOOL("AscentAutoCloseOOC"); mEnableOOCAutoClose = gSavedSettings.getBOOL("AscentAutoCloseOOC");
@@ -305,10 +305,6 @@ void LLPrefsAscentChat::refreshValues()
void LLPrefsAscentChat::refresh() void LLPrefsAscentChat::refresh()
{ {
//Chat -------------------------------------------------------------------------------- //Chat --------------------------------------------------------------------------------
/*
LLRadioGroup* radioLinkOptions = getChild<LLRadioGroup>("objects_link");
radioLinkOptions->selectNthItem(mLinksForChattingObjects);
*/
// time format combobox // time format combobox
LLComboBox* combo = getChild<LLComboBox>("time_format_combobox"); LLComboBox* combo = getChild<LLComboBox>("time_format_combobox");
if (combo) if (combo)
@@ -413,9 +409,9 @@ void LLPrefsAscentChat::cancel()
//Chat/IM ----------------------------------------------------------------------------- //Chat/IM -----------------------------------------------------------------------------
gSavedSettings.setBOOL("WoLfVerticalIMTabs", mWoLfVerticalIMTabs); gSavedSettings.setBOOL("WoLfVerticalIMTabs", mWoLfVerticalIMTabs);
gSavedSettings.setBOOL("AscentInstantMessageAnnounceIncoming", mIMAnnounceIncoming); gSavedSettings.setBOOL("AscentInstantMessageAnnounceIncoming", mIMAnnounceIncoming);
gSavedSettings.setBOOL("AscentHideTypingNotification", mHideTypingNotification); gSavedSettings.setBOOL("AscentHideTypingNotification", mHideTypingNotification);
gSavedSettings.setBOOL("OptionShowGroupNameInChatIM", mShowGroupNameInChatIM); gSavedSettings.setBOOL("OptionShowGroupNameInChatIM", mShowGroupNameInChatIM);
gSavedSettings.setBOOL("PlayTypingSound", mPlayTypingSound); gSavedSettings.setBOOL("PlayTypingSound", mPlayTypingSound);
gSavedSettings.setBOOL("HideNotificationsInChat", mHideNotificationsInChat); gSavedSettings.setBOOL("HideNotificationsInChat", mHideNotificationsInChat);
gSavedSettings.setBOOL("AscentAllowMUpose", mEnableMUPose); gSavedSettings.setBOOL("AscentAllowMUpose", mEnableMUPose);
gSavedSettings.setBOOL("AscentAutoCloseOOC", mEnableOOCAutoClose); gSavedSettings.setBOOL("AscentAutoCloseOOC", mEnableOOCAutoClose);

View File

@@ -39,13 +39,13 @@
class LLPrefsAscentChat : public LLPanel class LLPrefsAscentChat : public LLPanel
{ {
public: public:
LLPrefsAscentChat(); LLPrefsAscentChat();
~LLPrefsAscentChat(); ~LLPrefsAscentChat();
void apply(); void apply();
void cancel(); void cancel();
void refresh(); void refresh();
void refreshValues(); void refreshValues();
protected: protected:
static void onSpellAdd(void* data); static void onSpellAdd(void* data);
@@ -54,21 +54,21 @@ protected:
static void onSpellEditCustom(void* data); static void onSpellEditCustom(void* data);
static void onSpellBaseComboBoxCommit(LLUICtrl* ctrl, void* userdata); static void onSpellBaseComboBoxCommit(LLUICtrl* ctrl, void* userdata);
static void onCommitTimeDate(LLUICtrl* ctrl, void *userdata); static void onCommitTimeDate(LLUICtrl* ctrl, void *userdata);
static void onCommitAutoResponse(LLUICtrl* ctrl, void* user_data); static void onCommitAutoResponse(LLUICtrl* ctrl, void* user_data);
static void onCommitKeywords(LLUICtrl* ctrl, void* user_data); static void onCommitKeywords(LLUICtrl* ctrl, void* user_data);
//Chat/IM ----------------------------------------------------------------------------- //Chat/IM -----------------------------------------------------------------------------
BOOL mWoLfVerticalIMTabs; BOOL mWoLfVerticalIMTabs;
BOOL mIMAnnounceIncoming; BOOL mIMAnnounceIncoming;
BOOL mHideTypingNotification; BOOL mHideTypingNotification;
BOOL mShowGroupNameInChatIM; BOOL mShowGroupNameInChatIM;
BOOL mPlayTypingSound; BOOL mPlayTypingSound;
BOOL mHideNotificationsInChat; BOOL mHideNotificationsInChat;
BOOL mEnableMUPose; BOOL mEnableMUPose;
BOOL mEnableOOCAutoClose; BOOL mEnableOOCAutoClose;
U32 mLinksForChattingObjects; U32 mLinksForChattingObjects;
U32 mTimeFormat; U32 mTimeFormat;
U32 mDateFormat; U32 mDateFormat;
U32 tempTimeFormat; U32 tempTimeFormat;
U32 tempDateFormat; U32 tempDateFormat;
BOOL mSecondsInChatAndIMs; BOOL mSecondsInChatAndIMs;
@@ -94,13 +94,13 @@ protected:
//Text Options ------------------------------------------------------------------------ //Text Options ------------------------------------------------------------------------
BOOL mSpellDisplay; BOOL mSpellDisplay;
BOOL mKeywordsOn; BOOL mKeywordsOn;
std::string mKeywordsList; std::string mKeywordsList;
BOOL mKeywordsInChat; BOOL mKeywordsInChat;
BOOL mKeywordsInIM; BOOL mKeywordsInIM;
BOOL mKeywordsChangeColor; BOOL mKeywordsChangeColor;
LLColor4 mKeywordsColor; LLColor4 mKeywordsColor;
BOOL mKeywordsPlaySound; BOOL mKeywordsPlaySound;
LLUUID mKeywordsSound; LLUUID mKeywordsSound;
}; };
#endif #endif

View File

@@ -303,7 +303,6 @@ void LLPrefsAscentSys::cancel()
gSavedSettings.setBOOL("AscentBuildAlwaysEnabled", mBuildAlwaysEnabled); gSavedSettings.setBOOL("AscentBuildAlwaysEnabled", mBuildAlwaysEnabled);
gSavedSettings.setBOOL("AscentFlyAlwaysEnabled", mAlwaysShowFly); gSavedSettings.setBOOL("AscentFlyAlwaysEnabled", mAlwaysShowFly);
gSavedSettings.setBOOL("AscentDisableMinZoomDist", mDisableMinZoom); gSavedSettings.setBOOL("AscentDisableMinZoomDist", mDisableMinZoom);
// gSavedSettings.setBOOL("AscentPowerfulWizard", mPowerUser);
gSavedSettings.setBOOL("AscentUseSystemFolder", mUseSystemFolder); gSavedSettings.setBOOL("AscentUseSystemFolder", mUseSystemFolder);
gSavedSettings.setBOOL("AscentSystemTemporary", mUploadToSystem); gSavedSettings.setBOOL("AscentSystemTemporary", mUploadToSystem);
gSavedSettings.setBOOL("FetchInventoryOnLogin", mFetchInventoryOnLogin); gSavedSettings.setBOOL("FetchInventoryOnLogin", mFetchInventoryOnLogin);

View File

@@ -52,27 +52,27 @@
LLPrefsAscentVan::LLPrefsAscentVan() LLPrefsAscentVan::LLPrefsAscentVan()
{ {
LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_ascent_vanity.xml"); LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_ascent_vanity.xml");
childSetCommitCallback("tag_spoofing_combobox", onCommitClientTag, this); childSetCommitCallback("tag_spoofing_combobox", onCommitClientTag, this);
childSetCommitCallback("show_my_tag_check", onCommitCheckBox, this); childSetCommitCallback("show_my_tag_check", onCommitCheckBox, this);
childSetCommitCallback("show_self_tag_check", onCommitCheckBox, this); childSetCommitCallback("show_self_tag_check", onCommitCheckBox, this);
childSetCommitCallback("show_self_tag_color_check", onCommitCheckBox, this); childSetCommitCallback("show_self_tag_color_check", onCommitCheckBox, this);
childSetCommitCallback("customize_own_tag_check", onCommitCheckBox, this); childSetCommitCallback("customize_own_tag_check", onCommitCheckBox, this);
childSetCommitCallback("show_friend_tag_check", onCommitCheckBox, this); childSetCommitCallback("show_friend_tag_check", onCommitCheckBox, this);
childSetCommitCallback("use_status_check", onCommitCheckBox, this); childSetCommitCallback("use_status_check", onCommitCheckBox, this);
childSetCommitCallback("custom_tag_label_box", onCommitTextModified, this); childSetCommitCallback("custom_tag_label_box", onCommitTextModified, this);
childSetCommitCallback("X Modifier", onCommitUpdateAvatarOffsets); childSetCommitCallback("X Modifier", onCommitUpdateAvatarOffsets);
childSetCommitCallback("Y Modifier", onCommitUpdateAvatarOffsets); childSetCommitCallback("Y Modifier", onCommitUpdateAvatarOffsets);
childSetCommitCallback("Z Modifier", onCommitUpdateAvatarOffsets); childSetCommitCallback("Z Modifier", onCommitUpdateAvatarOffsets);
childSetAction("update_clientdefs", onManualClientUpdate, this); childSetAction("update_clientdefs", onManualClientUpdate, this);
refreshValues(); refreshValues();
refresh(); refresh();
} }
LLPrefsAscentVan::~LLPrefsAscentVan() LLPrefsAscentVan::~LLPrefsAscentVan()
@@ -82,32 +82,32 @@ LLPrefsAscentVan::~LLPrefsAscentVan()
//static //static
void LLPrefsAscentVan::onCommitClientTag(LLUICtrl* ctrl, void* userdata) void LLPrefsAscentVan::onCommitClientTag(LLUICtrl* ctrl, void* userdata)
{ {
std::string client_uuid; std::string client_uuid;
U32 client_index; U32 client_index;
LLPrefsAscentVan* self = (LLPrefsAscentVan*)userdata; LLPrefsAscentVan* self = (LLPrefsAscentVan*)userdata;
LLComboBox* combo = (LLComboBox*)ctrl; LLComboBox* combo = (LLComboBox*)ctrl;
if (combo) if (combo)
{ {
client_index = combo->getCurrentIndex(); client_index = combo->getCurrentIndex();
//Don't rebake if it's not neccesary. //Don't rebake if it's not neccesary.
if (client_index != self->mSelectedClient) if (client_index != self->mSelectedClient)
{ {
client_uuid = combo->getSelectedValue().asString(); client_uuid = combo->getSelectedValue().asString();
gSavedSettings.setString("AscentReportClientUUID", client_uuid); gSavedSettings.setString("AscentReportClientUUID", client_uuid);
gSavedSettings.setU32("AscentReportClientIndex", client_index); gSavedSettings.setU32("AscentReportClientIndex", client_index);
LLVOAvatar* avatar = gAgent.getAvatarObject(); LLVOAvatar* avatar = gAgent.getAvatarObject();
if (avatar) if (avatar)
{ {
// Slam pending upload count to "unstick" things // Slam pending upload count to "unstick" things
bool slam_for_debug = true; bool slam_for_debug = true;
avatar->forceBakeAllTextures(slam_for_debug); avatar->forceBakeAllTextures(slam_for_debug);
} }
} }
} }
} }
//static //static
@@ -115,157 +115,131 @@ void LLPrefsAscentVan::onCommitUpdateAvatarOffsets(LLUICtrl* ctrl, void* userdat
{ {
if (!gAgent.getID().isNull()) if (!gAgent.getID().isNull())
{ {
gAgent.sendAgentSetAppearance(); gAgent.sendAgentSetAppearance();
} }
} }
//static //static
void LLPrefsAscentVan::onCommitTextModified(LLUICtrl* ctrl, void* userdata) void LLPrefsAscentVan::onCommitTextModified(LLUICtrl* ctrl, void* userdata)
{ {
LLPrefsAscentVan* self = (LLPrefsAscentVan*)userdata; LLPrefsAscentVan* self = (LLPrefsAscentVan*)userdata;
if (ctrl->getName() == "custom_tag_label_box") if (ctrl->getName() == "custom_tag_label_box")
{ {
gSavedSettings.setString("AscentCustomTagLabel", self->childGetValue("custom_tag_label_box")); gSavedSettings.setString("AscentCustomTagLabel", self->childGetValue("custom_tag_label_box"));
} }
} }
/*
//static
void LLPrefsAscentVan::onCommitColor(LLUICtrl* ctrl, void* user_data)
{
LLPrefsAscentVan* self = (LLPrefsAscentVan*)user_data;
llinfos << "Control named " << ctrl->getControlName() << " aka " << ctrl->getName() << llendl;
if (ctrl->getName() == "custom_tag_color_swatch")
{
llinfos << "Recreating color message for tag update." << llendl;
gSavedSettings.setString("AscentCustomTagLabel", self->childGetValue("custom_tag_label_box"));
// gSavedSettings.setColor4("AscentCustomTagColor", self->childGetValue("custom_tag_color_swatch"));
if (!gAgent.getID().isNull())
{
gAgent.sendAgentSetAppearance();
gAgent.resetClientTag();
}
}
}
*/
//static //static
void LLPrefsAscentVan::onManualClientUpdate(void* data) void LLPrefsAscentVan::onManualClientUpdate(void* data)
{ {
LLChat chat; LLChat chat;
chat.mSourceType = CHAT_SOURCE_SYSTEM; chat.mSourceType = CHAT_SOURCE_SYSTEM;
chat.mText = llformat("Definitions already up-to-date."); chat.mText = llformat("Definitions already up-to-date.");
if (LLVOAvatar::updateClientTags()) if (LLVOAvatar::updateClientTags())
{ {
chat.mText = llformat("Client definitions updated."); chat.mText = llformat("Client definitions updated.");
LLVOAvatar::loadClientTags(); LLVOAvatar::loadClientTags();
for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin(); for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin();
iter != LLCharacter::sInstances.end(); ++iter) iter != LLCharacter::sInstances.end(); ++iter)
{ {
LLVOAvatar* avatarp = (LLVOAvatar*) *iter; LLVOAvatar* avatarp = (LLVOAvatar*) *iter;
if(avatarp) if(avatarp)
{ {
LLVector3 root_pos_last = avatarp->mRoot.getWorldPosition(); LLVector3 root_pos_last = avatarp->mRoot.getWorldPosition();
avatarp->mClientTag = ""; avatarp->mClientTag = "";
} }
} }
} }
LLFloaterChat::addChat(chat); LLFloaterChat::addChat(chat);
} }
//static //static
void LLPrefsAscentVan::onCommitCheckBox(LLUICtrl* ctrl, void* user_data) void LLPrefsAscentVan::onCommitCheckBox(LLUICtrl* ctrl, void* user_data)
{ {
LLPrefsAscentVan* self = (LLPrefsAscentVan*)user_data; LLPrefsAscentVan* self = (LLPrefsAscentVan*)user_data;
// llinfos << "Control named " << ctrl->getControlName() << llendl; // llinfos << "Control named " << ctrl->getControlName() << llendl;
/*
if (ctrl->getControlName() == "AscentStoreSettingsPerAccount") if (ctrl->getName() == "show_friend_tag_check")
{ {
self->refresh(); for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin();
} iter != LLCharacter::sInstances.end(); ++iter)
*/ {
if (ctrl->getName() == "show_friend_tag_check") LLVOAvatar* avatarp = (LLVOAvatar*) *iter;
{ if(avatarp)
for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin(); {
iter != LLCharacter::sInstances.end(); ++iter) LLVector3 root_pos_last = avatarp->mRoot.getWorldPosition();
{ avatarp->mClientTag = "";
LLVOAvatar* avatarp = (LLVOAvatar*) *iter; }
if(avatarp) }
{ }
LLVector3 root_pos_last = avatarp->mRoot.getWorldPosition();
avatarp->mClientTag = "";
}
}
}
else if (ctrl->getName() == "use_status_check") else if (ctrl->getName() == "use_status_check")
{ {
for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin(); for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin();
iter != LLCharacter::sInstances.end(); ++iter) iter != LLCharacter::sInstances.end(); ++iter)
{ {
LLVOAvatar* avatarp = (LLVOAvatar*) *iter; LLVOAvatar* avatarp = (LLVOAvatar*) *iter;
if(avatarp) if(avatarp)
{ {
LLVector3 root_pos_last = avatarp->mRoot.getWorldPosition(); LLVector3 root_pos_last = avatarp->mRoot.getWorldPosition();
avatarp->mClientTag = ""; avatarp->mClientTag = "";
} }
} }
BOOL showCustomColors = gSavedSettings.getBOOL("AscentUseStatusColors"); BOOL showCustomColors = gSavedSettings.getBOOL("AscentUseStatusColors");
self->childSetEnabled("friends_color_textbox", showCustomColors); self->childSetEnabled("friends_color_textbox", showCustomColors);
self->childSetEnabled("friend_color_swatch", showCustomColors); self->childSetEnabled("friend_color_swatch", showCustomColors);
self->childSetEnabled("estate_owner_color_swatch", showCustomColors); self->childSetEnabled("estate_owner_color_swatch", showCustomColors);
self->childSetEnabled("linden_color_swatch", showCustomColors); self->childSetEnabled("linden_color_swatch", showCustomColors);
self->childSetEnabled("muted_color_swatch", showCustomColors); self->childSetEnabled("muted_color_swatch", showCustomColors);
} }
else if (ctrl->getName() == "customize_own_tag_check") else if (ctrl->getName() == "customize_own_tag_check")
{ {
BOOL showCustomOptions = gSavedSettings.getBOOL("AscentUseCustomTag"); BOOL showCustomOptions = gSavedSettings.getBOOL("AscentUseCustomTag");
self->childSetEnabled("custom_tag_label_text", showCustomOptions); self->childSetEnabled("custom_tag_label_text", showCustomOptions);
self->childSetEnabled("custom_tag_label_box", showCustomOptions); self->childSetEnabled("custom_tag_label_box", showCustomOptions);
self->childSetEnabled("custom_tag_color_text", showCustomOptions); self->childSetEnabled("custom_tag_color_text", showCustomOptions);
self->childSetEnabled("custom_tag_color_swatch", showCustomOptions); self->childSetEnabled("custom_tag_color_swatch", showCustomOptions);
} }
if (!gAgent.getID().isNull()) if (!gAgent.getID().isNull())
{ {
gAgent.sendAgentSetAppearance(); gAgent.sendAgentSetAppearance();
gAgent.resetClientTag(); gAgent.resetClientTag();
} }
} }
// Store current settings for cancel // Store current settings for cancel
void LLPrefsAscentVan::refreshValues() void LLPrefsAscentVan::refreshValues()
{ {
//General -------------------------------------------------------------------------------- //General --------------------------------------------------------------------------------
mUseAccountSettings = gSavedSettings.getBOOL("AscentStoreSettingsPerAccount"); mUseAccountSettings = gSavedSettings.getBOOL("AscentStoreSettingsPerAccount");
mShowTPScreen = !gSavedSettings.getBOOL("AscentDisableTeleportScreens"); mShowTPScreen = !gSavedSettings.getBOOL("AscentDisableTeleportScreens");
mPlayTPSound = gSavedSettings.getBOOL("OptionPlayTpSound"); mPlayTPSound = gSavedSettings.getBOOL("OptionPlayTpSound");
mShowLogScreens = !gSavedSettings.getBOOL("AscentDisableLogoutScreens"); mShowLogScreens = !gSavedSettings.getBOOL("AscentDisableLogoutScreens");
//Tags\Colors ---------------------------------------------------------------------------- //Tags\Colors ----------------------------------------------------------------------------
mAscentUseTag = gSavedSettings.getBOOL("AscentUseTag"); mAscentUseTag = gSavedSettings.getBOOL("AscentUseTag");
mReportClientUUID = gSavedSettings.getString("AscentReportClientUUID"); mReportClientUUID = gSavedSettings.getString("AscentReportClientUUID");
mSelectedClient = gSavedSettings.getU32("AscentReportClientIndex"); mSelectedClient = gSavedSettings.getU32("AscentReportClientIndex");
mShowSelfClientTag = gSavedSettings.getBOOL("AscentShowSelfTag"); mShowSelfClientTag = gSavedSettings.getBOOL("AscentShowSelfTag");
mShowSelfClientTagColor = gSavedSettings.getBOOL("AscentShowSelfTagColor"); mShowSelfClientTagColor = gSavedSettings.getBOOL("AscentShowSelfTagColor");
mShowFriendsTag = gSavedSettings.getBOOL("AscentShowFriendsTag"); mShowFriendsTag = gSavedSettings.getBOOL("AscentShowFriendsTag");
mCustomTagOn = gSavedSettings.getBOOL("AscentUseCustomTag"); mCustomTagOn = gSavedSettings.getBOOL("AscentUseCustomTag");
mCustomTagLabel = gSavedSettings.getString("AscentCustomTagLabel"); mCustomTagLabel = gSavedSettings.getString("AscentCustomTagLabel");
mCustomTagColor = gSavedSettings.getColor4("AscentCustomTagColor"); mCustomTagColor = gSavedSettings.getColor4("AscentCustomTagColor");
mShowOthersTag = gSavedSettings.getBOOL("AscentShowOthersTag"); mShowOthersTag = gSavedSettings.getBOOL("AscentShowOthersTag");
mShowOthersTagColor = gSavedSettings.getBOOL("AscentShowOthersTagColor"); mShowOthersTagColor = gSavedSettings.getBOOL("AscentShowOthersTagColor");
mShowIdleTime = gSavedSettings.getBOOL("AscentShowIdleTime"); mShowIdleTime = gSavedSettings.getBOOL("AscentShowIdleTime");
mUseStatusColors = gSavedSettings.getBOOL("AscentUseStatusColors"); mUseStatusColors = gSavedSettings.getBOOL("AscentUseStatusColors");
mUpdateTagsOnLoad = gSavedSettings.getBOOL("AscentUpdateTagsOnLoad"); mUpdateTagsOnLoad = gSavedSettings.getBOOL("AscentUpdateTagsOnLoad");
mEffectColor = gSavedSettings.getColor4("EffectColor"); mEffectColor = gSavedSettings.getColor4("EffectColor");
mFriendColor = gSavedSettings.getColor4("AscentFriendColor"); mFriendColor = gSavedSettings.getColor4("AscentFriendColor");
mEstateOwnerColor = gSavedSettings.getColor4("AscentEstateOwnerColor"); mEstateOwnerColor = gSavedSettings.getColor4("AscentEstateOwnerColor");
mLindenColor = gSavedSettings.getColor4("AscentLindenColor"); mLindenColor = gSavedSettings.getColor4("AscentLindenColor");
mMutedColor = gSavedSettings.getColor4("AscentMutedColor"); mMutedColor = gSavedSettings.getColor4("AscentMutedColor");
//mCustomColor = gSavedSettings.getColor4("MoyMiniMapCustomColor"); //mCustomColor = gSavedSettings.getColor4("MoyMiniMapCustomColor");
//Body Dynamics -------------------------------------------------------------------------- //Body Dynamics --------------------------------------------------------------------------
mBreastPhysicsToggle = gSavedSettings.getBOOL("EmeraldBreastPhysicsToggle"); mBreastPhysicsToggle = gSavedSettings.getBOOL("EmeraldBreastPhysicsToggle");
@@ -283,31 +257,23 @@ void LLPrefsAscentVan::refreshValues()
// Update controls based on current settings // Update controls based on current settings
void LLPrefsAscentVan::refresh() void LLPrefsAscentVan::refresh()
{ {
//General -------------------------------------------------------------------------------- //General --------------------------------------------------------------------------------
//Tags\Colors ---------------------------------------------------------------------------- //Tags\Colors ----------------------------------------------------------------------------
LLComboBox* combo = getChild<LLComboBox>("tag_spoofing_combobox"); LLComboBox* combo = getChild<LLComboBox>("tag_spoofing_combobox");
combo->setCurrentByIndex(mSelectedClient); combo->setCurrentByIndex(mSelectedClient);
/*
getChild<LLColorSwatchCtrl>("effect_color_swatch")->set(mEffectColor); childSetEnabled("friends_color_textbox", mUseStatusColors);
getChild<LLColorSwatchCtrl>("custom_tag_color_swatch")->set(mCustomTagColor); childSetEnabled("friend_color_swatch", mUseStatusColors);
getChild<LLColorSwatchCtrl>("friend_color_swatch")->set(mFriendColor); childSetEnabled("estate_owner_color_swatch", mUseStatusColors);
getChild<LLColorSwatchCtrl>("linden_color_swatch")->set(mLindenColor); childSetEnabled("linden_color_swatch", mUseStatusColors);
getChild<LLColorSwatchCtrl>("muted_color_swatch")->set(mMutedColor); childSetEnabled("muted_color_swatch", mUseStatusColors);
getChild<LLColorSwatchCtrl>("estate_owner_color_swatch")->set(mEstateOwnerColor);
//getChild<LLColorSwatchCtrl>("custom_color_swatch")->set(mCustomColor);
*/
childSetEnabled("friends_color_textbox", mUseStatusColors);
childSetEnabled("friend_color_swatch", mUseStatusColors);
childSetEnabled("estate_owner_color_swatch", mUseStatusColors);
childSetEnabled("linden_color_swatch", mUseStatusColors);
childSetEnabled("muted_color_swatch", mUseStatusColors);
childSetEnabled("custom_tag_label_text", mCustomTagOn); childSetEnabled("custom_tag_label_text", mCustomTagOn);
childSetEnabled("custom_tag_label_box", mCustomTagOn); childSetEnabled("custom_tag_label_box", mCustomTagOn);
childSetValue("custom_tag_label_box", gSavedSettings.getString("AscentCustomTagLabel")); childSetValue("custom_tag_label_box", gSavedSettings.getString("AscentCustomTagLabel"));
childSetEnabled("custom_tag_color_text", mCustomTagOn); childSetEnabled("custom_tag_color_text", mCustomTagOn);
childSetEnabled("custom_tag_color_swatch", mCustomTagOn); childSetEnabled("custom_tag_color_swatch", mCustomTagOn);
//Body Dynamics -------------------------------------------------------------------------- //Body Dynamics --------------------------------------------------------------------------
childSetEnabled("EmeraldBoobMass", mBreastPhysicsToggle); childSetEnabled("EmeraldBoobMass", mBreastPhysicsToggle);
@@ -320,32 +286,32 @@ void LLPrefsAscentVan::refresh()
// Reset settings to local copy // Reset settings to local copy
void LLPrefsAscentVan::cancel() void LLPrefsAscentVan::cancel()
{ {
//General -------------------------------------------------------------------------------- //General --------------------------------------------------------------------------------
gSavedSettings.setBOOL("AscentStoreSettingsPerAccount", mUseAccountSettings); gSavedSettings.setBOOL("AscentStoreSettingsPerAccount", mUseAccountSettings);
gSavedSettings.setBOOL("AscentDisableTeleportScreens", !mShowTPScreen); gSavedSettings.setBOOL("AscentDisableTeleportScreens", !mShowTPScreen);
gSavedSettings.setBOOL("OptionPlayTpSound", mPlayTPSound); gSavedSettings.setBOOL("OptionPlayTpSound", mPlayTPSound);
gSavedSettings.setBOOL("AscentDisableLogoutScreens", !mShowLogScreens); gSavedSettings.setBOOL("AscentDisableLogoutScreens", !mShowLogScreens);
//Tags\Colors ---------------------------------------------------------------------------- //Tags\Colors ----------------------------------------------------------------------------
gSavedSettings.setBOOL("AscentUseTag", mAscentUseTag); gSavedSettings.setBOOL("AscentUseTag", mAscentUseTag);
gSavedSettings.setString("AscentReportClientUUID", mReportClientUUID); gSavedSettings.setString("AscentReportClientUUID", mReportClientUUID);
gSavedSettings.setU32("AscentReportClientIndex", mSelectedClient); gSavedSettings.setU32("AscentReportClientIndex", mSelectedClient);
gSavedSettings.setBOOL("AscentShowSelfTag", mShowSelfClientTag); gSavedSettings.setBOOL("AscentShowSelfTag", mShowSelfClientTag);
gSavedSettings.setBOOL("AscentShowSelfTagColor", mShowSelfClientTagColor); gSavedSettings.setBOOL("AscentShowSelfTagColor", mShowSelfClientTagColor);
gSavedSettings.setBOOL("AscentShowFriendsTag", mShowFriendsTag); gSavedSettings.setBOOL("AscentShowFriendsTag", mShowFriendsTag);
gSavedSettings.setBOOL("AscentUseCustomTag", mCustomTagOn); gSavedSettings.setBOOL("AscentUseCustomTag", mCustomTagOn);
gSavedSettings.setString("AscentCustomTagLabel", mCustomTagLabel); gSavedSettings.setString("AscentCustomTagLabel", mCustomTagLabel);
gSavedSettings.setColor4("AscentCustomTagColor", mCustomTagColor); gSavedSettings.setColor4("AscentCustomTagColor", mCustomTagColor);
gSavedSettings.setBOOL("AscentShowOthersTag", mShowOthersTag); gSavedSettings.setBOOL("AscentShowOthersTag", mShowOthersTag);
gSavedSettings.setBOOL("AscentShowOthersTagColor", mShowOthersTagColor); gSavedSettings.setBOOL("AscentShowOthersTagColor", mShowOthersTagColor);
gSavedSettings.setBOOL("AscentShowIdleTime", mShowIdleTime); gSavedSettings.setBOOL("AscentShowIdleTime", mShowIdleTime);
gSavedSettings.setBOOL("AscentUseStatusColors", mUseStatusColors); gSavedSettings.setBOOL("AscentUseStatusColors", mUseStatusColors);
gSavedSettings.setBOOL("AscentUpdateTagsOnLoad", mUpdateTagsOnLoad); gSavedSettings.setBOOL("AscentUpdateTagsOnLoad", mUpdateTagsOnLoad);
gSavedSettings.setColor4("EffectColor", mEffectColor); gSavedSettings.setColor4("EffectColor", mEffectColor);
gSavedSettings.setColor4("AscentFriendColor", mFriendColor); gSavedSettings.setColor4("AscentFriendColor", mFriendColor);
gSavedSettings.setColor4("AscentEstateOwnerColor", mEstateOwnerColor); gSavedSettings.setColor4("AscentEstateOwnerColor", mEstateOwnerColor);
gSavedSettings.setColor4("AscentLindenColor", mLindenColor); gSavedSettings.setColor4("AscentLindenColor", mLindenColor);
gSavedSettings.setColor4("AscentMutedColor", mMutedColor); gSavedSettings.setColor4("AscentMutedColor", mMutedColor);
// gSavedSettings.setColor4("MoyMiniMapCustomColor", mCustomColor); // gSavedSettings.setColor4("MoyMiniMapCustomColor", mCustomColor);
//Body Dynamics -------------------------------------------------------------------------- //Body Dynamics --------------------------------------------------------------------------
@@ -364,6 +330,6 @@ void LLPrefsAscentVan::cancel()
// Update local copy so cancel has no effect // Update local copy so cancel has no effect
void LLPrefsAscentVan::apply() void LLPrefsAscentVan::apply()
{ {
refreshValues(); refreshValues();
refresh(); refresh();
} }

View File

@@ -38,48 +38,45 @@
class LLPrefsAscentVan : public LLPanel class LLPrefsAscentVan : public LLPanel
{ {
public: public:
LLPrefsAscentVan(); LLPrefsAscentVan();
~LLPrefsAscentVan(); ~LLPrefsAscentVan();
void apply(); void apply();
void cancel(); void cancel();
void refresh(); void refresh();
void refreshValues(); void refreshValues();
// LLPanel* getPanel();
protected: protected:
static void onCommitClientTag(LLUICtrl* ctrl, void* userdata); static void onCommitClientTag(LLUICtrl* ctrl, void* userdata);
static void onCommitUpdateAvatarOffsets(LLUICtrl* ctrl, void* userdata); static void onCommitUpdateAvatarOffsets(LLUICtrl* ctrl, void* userdata);
static void onCommitCheckBox(LLUICtrl* ctrl, void* user_data); static void onCommitCheckBox(LLUICtrl* ctrl, void* user_data);
static void onCommitTextModified(LLUICtrl* ctrl, void* userdata); static void onCommitTextModified(LLUICtrl* ctrl, void* userdata);
// static void onCommitColor(LLUICtrl* ctrl, void* user_data); static void onManualClientUpdate(void* data);
static void onManualClientUpdate(void* data); //General
//General BOOL mUseAccountSettings;
BOOL mUseAccountSettings; BOOL mShowTPScreen;
BOOL mShowTPScreen; BOOL mPlayTPSound;
BOOL mPlayTPSound; BOOL mShowLogScreens;
BOOL mShowLogScreens; //Tags\Colors
//Tags\Colors
BOOL mAscentUseTag; BOOL mAscentUseTag;
std::string mReportClientUUID; std::string mReportClientUUID;
U32 mSelectedClient; U32 mSelectedClient;
BOOL mShowSelfClientTag; BOOL mShowSelfClientTag;
BOOL mShowSelfClientTagColor; BOOL mShowSelfClientTagColor;
BOOL mShowFriendsTag; BOOL mShowFriendsTag;
BOOL mCustomTagOn; BOOL mCustomTagOn;
std::string mCustomTagLabel; std::string mCustomTagLabel;
LLColor4 mCustomTagColor; LLColor4 mCustomTagColor;
BOOL mShowOthersTag; BOOL mShowOthersTag;
BOOL mShowOthersTagColor; BOOL mShowOthersTagColor;
BOOL mShowIdleTime; BOOL mShowIdleTime;
BOOL mUseStatusColors; BOOL mUseStatusColors;
BOOL mUpdateTagsOnLoad; BOOL mUpdateTagsOnLoad;
LLColor4 mEffectColor; LLColor4 mEffectColor;
LLColor4 mFriendColor; LLColor4 mFriendColor;
LLColor4 mEstateOwnerColor; LLColor4 mEstateOwnerColor;
LLColor4 mLindenColor; LLColor4 mLindenColor;
LLColor4 mMutedColor; LLColor4 mMutedColor;
//Body Dynamics //Body Dynamics
BOOL mBreastPhysicsToggle; BOOL mBreastPhysicsToggle;
F32 mBoobMass; F32 mBoobMass;