From 79b3669aacc5659ec57165a8859fc533331edb08 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Mon, 28 Jul 2008 22:12:11 +0000 Subject: [PATCH] update proxy preferences without a restart (thanks Sean) --- chrome/content/zotero/preferences/preferences.js | 11 +++++++++++ chrome/content/zotero/preferences/preferences.xul | 12 +++--------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/chrome/content/zotero/preferences/preferences.js b/chrome/content/zotero/preferences/preferences.js index b8f92d18f..d1a085e6d 100644 --- a/chrome/content/zotero/preferences/preferences.js +++ b/chrome/content/zotero/preferences/preferences.js @@ -1118,4 +1118,15 @@ function refreshProxyList() { document.getElementById('proxyTree').currentIndex = -1; document.getElementById('proxyTree-delete').disabled = true; + document.getElementById('zotero-proxies-autoRecognize').checked = Zotero.Prefs.get("proxies.autoRecognize"); + document.getElementById('zotero-proxies-transparent').checked = Zotero.Prefs.get("proxies.transparent"); +} + +/** + * Updates proxy autoRecognize and transparent settings based on checkboxes + */ +function updateProxyPrefs() { + Zotero.Prefs.set("proxies.autoRecognize", document.getElementById('zotero-proxies-autoRecognize').checked); + Zotero.Prefs.set("proxies.transparent", document.getElementById('zotero-proxies-transparent').checked); + Zotero.Proxies.init() } \ No newline at end of file diff --git a/chrome/content/zotero/preferences/preferences.xul b/chrome/content/zotero/preferences/preferences.xul index 7a50df876..7180b20ed 100644 --- a/chrome/content/zotero/preferences/preferences.xul +++ b/chrome/content/zotero/preferences/preferences.xul @@ -357,18 +357,12 @@ To add a new preference: - - - - - - - + + command="zotero-proxies-update"/> + command="zotero-proxies-update"/>