Updated the code to allow people to control whether to get client definition updates, now that the updater works.
Signed-off-by: Beeks <HgDelirium@gmail.com>
This commit is contained in:
@@ -713,6 +713,17 @@
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>AscentUpdateTagsOnLoad</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Allowed client to update client definitions file.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>AscentUploadFolder</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
#include "llcolorswatch.h"
|
||||
#include "llvoavatar.h"
|
||||
#include "llagent.h"
|
||||
#include "llfloaterchat.h"
|
||||
#include "llstartup.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "v4color.h"
|
||||
@@ -63,6 +64,7 @@ public:
|
||||
private:
|
||||
static void onCommitCheckBox(LLUICtrl* ctrl, void* user_data);
|
||||
static void onCommitColor(LLUICtrl* ctrl, void* user_data);
|
||||
static void onManualClientUpdate(void* data);
|
||||
void refreshValues();
|
||||
//General
|
||||
BOOL mUseAccountSettings;
|
||||
@@ -93,6 +95,7 @@ LLPrefsAscentVanImpl::LLPrefsAscentVanImpl()
|
||||
childSetCommitCallback("Y Modifier", LLPrefsAscentVan::onCommitUpdateAvatarOffsets);
|
||||
childSetCommitCallback("Z Modifier", LLPrefsAscentVan::onCommitUpdateAvatarOffsets);
|
||||
|
||||
childSetAction("update_clientdefs", onManualClientUpdate, this);
|
||||
refresh();
|
||||
|
||||
}
|
||||
@@ -120,6 +123,30 @@ void LLPrefsAscentVanImpl::onCommitColor(LLUICtrl* ctrl, void* user_data)
|
||||
}
|
||||
}
|
||||
|
||||
void LLPrefsAscentVanImpl::onManualClientUpdate(void* data)
|
||||
{
|
||||
LLChat chat;
|
||||
chat.mSourceType = CHAT_SOURCE_SYSTEM;
|
||||
chat.mText = llformat("Definitions already up-to-date.");
|
||||
if (LLVOAvatar::updateClientTags())
|
||||
{
|
||||
chat.mText = llformat("Client definitions updated.");
|
||||
LLVOAvatar::loadClientTags();
|
||||
for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin();
|
||||
iter != LLCharacter::sInstances.end(); ++iter)
|
||||
{
|
||||
LLVOAvatar* avatarp = (LLVOAvatar*) *iter;
|
||||
if(avatarp)
|
||||
{
|
||||
LLVector3 root_pos_last = avatarp->mRoot.getWorldPosition();
|
||||
avatarp->mClientTag = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
LLFloaterChat::addChat(chat);
|
||||
|
||||
}
|
||||
|
||||
//static
|
||||
void LLPrefsAscentVanImpl::onCommitCheckBox(LLUICtrl* ctrl, void* user_data)
|
||||
{
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
#include "llemote.h"
|
||||
|
||||
#include "llfirstuse.h"
|
||||
#include "llfloaterchat.h"
|
||||
#include "llheadrotmotion.h"
|
||||
|
||||
#include "llhudeffecttrail.h"
|
||||
@@ -1525,7 +1526,17 @@ void LLVOAvatar::initClass()
|
||||
}
|
||||
|
||||
{
|
||||
updateClientTags();
|
||||
if (gSavedSettings.getBOOL("AscentUpdateTagsOnLoad"))
|
||||
{
|
||||
if (updateClientTags())
|
||||
{
|
||||
LLChat chat;
|
||||
chat.mSourceType = CHAT_SOURCE_SYSTEM;
|
||||
chat.mText = llformat("Client definitions are up-to-date.");
|
||||
LLFloaterChat::addChat(chat);
|
||||
}
|
||||
}
|
||||
|
||||
loadClientTags();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,9 +15,9 @@
|
||||
<panel border="true" left="1" bottom="-190" height="180" width="500" mouse_opaque="true"
|
||||
follows="left|top|right|bottom" label="Colors" name="Colors">
|
||||
<!-- Client tag options -->
|
||||
<view_border bevel_style="none" border_thickness="1" bottom="-115" follows="top|left"
|
||||
height="110" left="5" name="GraphicsBorder" width="485" />
|
||||
<check_box bottom_delta="90" control_name="AscentUseTag" enabled="true"
|
||||
<view_border bevel_style="none" border_thickness="1" bottom="-135" follows="top|left"
|
||||
height="130" left="5" name="GraphicsBorder" width="485" />
|
||||
<check_box bottom_delta="110" control_name="AscentUseTag" enabled="true"
|
||||
follows="left|top" font="SansSerifSmall" height="16" initial_value="true"
|
||||
label="Use Client Tag:" left_delta="0"
|
||||
tool_tip="Enabling this will show your client tag on your avatar name locally."
|
||||
@@ -100,29 +100,48 @@
|
||||
tool_tip="Enabling this will show the amount of time an avatar has been idle."
|
||||
mouse_opaque="true" name="show_idle_time_check" radio_style="false"
|
||||
width="400" />
|
||||
<check_box bottom_delta="-20" control_name="AscentUpdateTagsOnLoad" enabled="true"
|
||||
follows="left|top" font="SansSerifSmall" height="16" initial_value="true"
|
||||
label="Automatically check website for updates to client definitions" left_delta="-230"
|
||||
tool_tip="Enabling this will allow ascent to download fresh definitions when needed."
|
||||
mouse_opaque="true" name="update_tags_check" radio_style="false"
|
||||
width="400" />
|
||||
<button bottom_delta="0" control_name="ManualUpdate" name="update_clientdefs" follows="left|top"
|
||||
label="Manual Update" height="18" left_delta="340" width="100"/>
|
||||
<!-- End of Client Tag settings -->
|
||||
<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom="-143" drop_shadow_visible="true" enabled="true" follows="left|top"
|
||||
bottom="-158" drop_shadow_visible="true" enabled="true" follows="left|top"
|
||||
font="SansSerifSmall" h_pad="0" halign="left" height="10" left="10"
|
||||
mouse_opaque="true" name="effects_color_textbox" v_pad="0" width="394">
|
||||
Color For My Effects:
|
||||
</text>
|
||||
<color_swatch border_color="0.45098 0.517647 0.607843 1" bottom="-169"
|
||||
can_apply_immediately="false" color="1 1 1 1"
|
||||
enabled="true" follows="left|top" height="48" label="" left="153"
|
||||
mouse_opaque="true" name="effect_color_swatch"
|
||||
tool_tip="Click to open Color Picker" width="32" />
|
||||
<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom="-178" drop_shadow_visible="true" enabled="true" follows="left|top"
|
||||
<color_swatch border_color="0.45098 0.517647 0.607843 1" bottom_delta="-34"
|
||||
can_apply_immediately="true" color="1 1 1 1" control_name="EffectColor"
|
||||
enabled="true" follows="left|top" height="47" label="Effects" left="148"
|
||||
mouse_opaque="true" name="effect_color_swatch" width="44" />
|
||||
<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom="-205" drop_shadow_visible="true" enabled="true" follows="left|top"
|
||||
font="SansSerifSmall" h_pad="0" halign="left" height="10" left="10"
|
||||
mouse_opaque="true" name="friends_color_textbox" v_pad="0" width="394">
|
||||
Color For My Friends:
|
||||
</text>
|
||||
<color_swatch border_color="0.45098 0.517647 0.607843 1" bottom="-204"
|
||||
can_apply_immediately="false" color="1 1 1 1"
|
||||
enabled="true" follows="left|top" height="48" label="" left="153"
|
||||
mouse_opaque="true" name="friend_color_swatch"
|
||||
tool_tip="Click to open Color Picker" width="32" />
|
||||
Color For:
|
||||
(Radar, Tag, Minimap)
|
||||
</text>
|
||||
<color_swatch border_color="0.45098 0.517647 0.607843 1" bottom_delta="-34"
|
||||
can_apply_immediately="true" color="1 1 1 1" control_name="FriendColor"
|
||||
enabled="true" follows="left|top" height="47" label="Friends" left="148"
|
||||
mouse_opaque="true" name="friend_color_swatch" width="44" />
|
||||
<color_swatch border_color="0.45098 0.517647 0.607843 1" bottom_delta="0"
|
||||
can_apply_immediately="true" color="1 1 1 1" control_name="EMColor"
|
||||
enabled="true" follows="left|top" height="47" label="EMs" left_delta="54"
|
||||
mouse_opaque="true" name="em_color_swatch" width="44" />
|
||||
<color_swatch border_color="0.45098 0.517647 0.607843 1" bottom_delta="0"
|
||||
can_apply_immediately="true" color="0.6 0.6 1 1"
|
||||
enabled="true" follows="left|top" height="47" label="Lindens" left_delta="54"
|
||||
mouse_opaque="true" name="linden_color_swatch" width="44" />
|
||||
<color_swatch border_color="0.45098 0.517647 0.607843 1" bottom_delta="0"
|
||||
can_apply_immediately="true" color="0.8 1 1 1" mouse_opaque="true"
|
||||
enabled="true" follows="left|top" height="47" label="Muted" left_delta="54"
|
||||
name="muted_color_swatch" width="44" />
|
||||
</panel>
|
||||
<panel border="true" left="1" bottom="-190" height="180" width="500" mouse_opaque="true"
|
||||
follows="left|top|right|bottom" label="Body Dynamics" name="Body Dynamics">
|
||||
|
||||
Reference in New Issue
Block a user