From 9bc5c4435e69daed4e9fcfaa3e22f1f4d2a1fd75 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sat, 23 Sep 2006 00:22:29 +0000 Subject: [PATCH] Cloess #221, Add status line in preferences pane to indicate if preferences don't take effect immediately --- .../chromeFiles/content/scholar/preferences.js | 16 +++++++++++++++- .../chromeFiles/content/scholar/preferences.xul | 4 +++- .../locale/en-US/scholar/scholar.properties | 3 ++- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/chrome/chromeFiles/content/scholar/preferences.js b/chrome/chromeFiles/content/scholar/preferences.js index b4761268f..b4dfeede5 100644 --- a/chrome/chromeFiles/content/scholar/preferences.js +++ b/chrome/chromeFiles/content/scholar/preferences.js @@ -11,6 +11,7 @@ var openURLMenu; var openURLResolvers; var openURLServerField; var openURLVersionMenu; +var scholarPaneOnTopInitial; /* To add a new preference: @@ -28,7 +29,7 @@ var openURLVersionMenu; function init() { autoUpdateBox = document.getElementById('autoUpdateBox'); - autoUpdateBox.checked = Scholar.Prefs.get('automaticScraperUpdates'); + autoUpdateBox.checked = scholarPaneOnTopInitial = Scholar.Prefs.get('automaticScraperUpdates'); positionMenu = document.getElementById('positionMenu'); positionMenu.selectedIndex = Scholar.Prefs.get('scholarPaneOnTop') ? 0 : 1; @@ -83,4 +84,17 @@ function onOpenURLSelected() function onOpenURLCustomized() { openURLMenu.value = "custom"; +} + +function onPositionChange() +{ + var statusLine = document.getElementById('statusLine'); + if ((positionMenu.selectedIndex == 0) != scholarPaneOnTopInitial) + { + statusLine.value = Scholar.getString('scholar.preferences.status.positionChange'); + } + else + { + statusLine.value = ''; + } } \ No newline at end of file diff --git a/chrome/chromeFiles/content/scholar/preferences.xul b/chrome/chromeFiles/content/scholar/preferences.xul index 09c8202d2..59cd0d152 100644 --- a/chrome/chromeFiles/content/scholar/preferences.xul +++ b/chrome/chromeFiles/content/scholar/preferences.xul @@ -19,7 +19,7 @@ +