www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 17c3d1cc342e2f7a443e94ab62c4984609d3a1d5
parent ce210afe2d722e051bae146fea5f12dc19b64fa8
Author: Simon Kornblith <simon@simonster.com>
Date:   Mon, 28 Jul 2008 22:12:11 +0000

update proxy preferences without a restart (thanks Sean)


Diffstat:
Mchrome/content/zotero/preferences/preferences.js | 11+++++++++++
Mchrome/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 @@ -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 @@ -357,18 +357,12 @@ To add a new preference: <prefpane id="zotero-prefpane-proxies" label="&zotero.preferences.prefpane.proxies;" image="chrome://zotero/skin/prefs-proxies.png"> - <preferences> - <preference id="pref-proxies-autoRecognize" name="extensions.zotero.proxies.autoRecognize" type="bool"/> - <preference id="pref-proxies-transparent" name="extensions.zotero.proxies.transparent" type="bool"/> - </preferences> - <groupbox> - <caption label="&zotero.preferences.proxies.proxyOptions;"/> - + <command id="zotero-proxies-update" oncommand="updateProxyPrefs()"/> <checkbox id="zotero-proxies-autoRecognize" label="&zotero.preferences.proxies.autoRecognize;" - preference="pref-proxies-autoRecognize" oncommand="Zotero.Proxies.init()"/> + command="zotero-proxies-update"/> <checkbox id="zotero-proxies-transparent" label="&zotero.preferences.proxies.transparent;" - preference="pref-proxies-transparent" oncommand="Zotero.Proxies.init()"/> + command="zotero-proxies-update"/> </groupbox> <groupbox flex="1">