//
// Radegast Metaverse Client
-// Copyright (c) 2009-2013, Radegast Development Team
+// Copyright (c) 2009-2014, Radegast Development Team
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
if (!s.ContainsKey("reconnect_time")) s["reconnect_time"] = 120;
+ if (!s.ContainsKey("resolve_uri_time")) s["resolve_uri_time"] = 100;
+
+ if (!s.ContainsKey("resolve_uris")) s["resolve_uris"] = true;
+
if (!s.ContainsKey("transaction_notification_chat")) s["transaction_notification_chat"] = true;
if (!s.ContainsKey("transaction_notification_dialog")) s["transaction_notification_dialog"] = true;
{
s["disable_http_inventory"] = mono;
}
+
+ if (!s.ContainsKey("on_script_question"))
+ {
+ s["on_script_question"] = "Ask";
+ }
+
}
public frmSettings(RadegastInstance instance)
cbAutoReconnect.Checked = s["auto_reconnect"].AsBoolean();
cbAutoReconnect.CheckedChanged += new EventHandler(cbAutoReconnect_CheckedChanged);
+ cbResolveURIs.Checked = s["resolve_uris"].AsBoolean();
+ cbResolveURIs.CheckedChanged += new EventHandler(cbResolveURIs_CheckedChanged); ;
+
cbHideLoginGraphics.Checked = s["hide_login_graphics"].AsBoolean();
cbHideLoginGraphics.CheckedChanged += new EventHandler(cbHideLoginGraphics_CheckedChanged);
txtReconnectTime.Text = s["reconnect_time"].AsInteger().ToString();
+ txtResolveURITime.Text = s["resolve_uri_time"].AsInteger().ToString();
+
cbRadegastClientTag.Checked = s["send_rad_client_tag"];
cbRadegastClientTag.CheckedChanged += (sender, e) =>
{
s["disable_http_inventory"] = cbDisableHTTPInventory.Checked;
};
+ cbShowScriptErrors.Checked = s["show_script_errors"];
+ cbShowScriptErrors.CheckedChanged += (sender, e) =>
+ {
+ s["show_script_errors"] = cbShowScriptErrors.Checked;
+ };
autoSitPrefsUpdate();
pseudoHomePrefsUpdated();
LSLHelperPrefsUpdate();
+ cbAutoScriptPermission.Text = s["on_script_question"];
+
UpdateEnabled();
}
s["auto_reconnect"] = OSD.FromBoolean(cbAutoReconnect.Checked);
}
+ private void cbResolveURIs_CheckedChanged(object sender, EventArgs e)
+ {
+ s["resolve_uris"] = OSD.FromBoolean(cbResolveURIs.Checked);
+ }
+
void cbFriendsNotifications_CheckedChanged(object sender, EventArgs e)
{
s["show_friends_online_notifications"] = OSD.FromBoolean(cbFriendsNotifications.Checked);
s["reconnect_time"] = t;
}
+ private void txtResolveURITime_TextChanged(object sender, EventArgs e)
+ {
+ string input = System.Text.RegularExpressions.Regex.Replace(txtResolveURITime.Text, @"[^\d]", "");
+ int t = 100;
+ int.TryParse(input, out t);
+
+ if (txtResolveURITime.Text != t.ToString())
+ {
+ txtResolveURITime.Text = t.ToString();
+ txtResolveURITime.Select(txtResolveURITime.Text.Length, 0);
+ }
+
+ s["resolve_uri_time"] = t;
+ }
+
private void cbRadegastLogToFile_CheckedChanged(object sender, EventArgs e)
{
s["log_to_file"] = OSD.FromBoolean(cbRadegastLogToFile.Checked);
}
#endregion LSL Helper
+ private void cbAutoScriptPermission_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ s["on_script_question"] = cbAutoScriptPermission.Text;
+ }
+
}
}