From acac61fcbd9752aaa1abc35a979db1b8b24ed967 Mon Sep 17 00:00:00 2001 From: lars Date: Wed, 31 Jan 2007 00:25:26 +0000 Subject: [PATCH] always umount config partitions during shutdown - otherwise tmpfs would stay mounted prepare the "help" dataset values for multiple reloading of the dataset clarify text for no-write-allowed keep only some specific link parameters during dis/enabling help --- src/cryptobox/core/main.py | 4 ++-- src/cryptobox/web/dataset.py | 5 ++++- templates/language.hdf | 2 +- templates/macros.cs | 22 +++++++++++++++------- 4 files changed, 22 insertions(+), 11 deletions(-) diff --git a/src/cryptobox/core/main.py b/src/cryptobox/core/main.py index 57151d1..59c568c 100644 --- a/src/cryptobox/core/main.py +++ b/src/cryptobox/core/main.py @@ -72,8 +72,8 @@ class CryptoBox: self.log.info("Storing local settings ...") ## problems with storing are logged automatically self.prefs.write() - if self.prefs.get_active_partition(): - self.prefs.umount_partition() + # TODO: improve the configuration partition handling + self.prefs.umount_partition() ## shutdown logging as the last step try: self.log.info("Turning off logging ...") diff --git a/src/cryptobox/web/dataset.py b/src/cryptobox/web/dataset.py index b60ecc0..f4713f3 100644 --- a/src/cryptobox/web/dataset.py +++ b/src/cryptobox/web/dataset.py @@ -76,7 +76,10 @@ class WebInterfaceDataset(dict): self["Settings.LinkAttrs.help"] = "1" except (AttributeError, KeyError): ## no setting or first start before request - pass + ## reset values - just in case we are called more than once + self["Settings.Help"] = "0" + if "Settings.LinkAttrs.help" in self: + del self["Settings.LinkAttrs.help"] try: self["Data.ScriptURL.Prot"] = cherrypy.request.scheme diff --git a/templates/language.hdf b/templates/language.hdf index e103886..1a4df20 100644 --- a/templates/language.hdf +++ b/templates/language.hdf @@ -92,7 +92,7 @@ WarningMessage { DeviceNotWriteable { Title = No write permissions - Text = Sorry - the CryptoBox is not allowed to write on this device. Anyway it is still possible, that you can open it for writing. Please ask the administrator of the CryptoBox in case you believe, that this is a mistake. + Text = Sorry - the CryptoBox is not allowed to write on this device. Anyway it is still possible, that you can open it and change its content. Please ask the administrator of the CryptoBox in case you believe, that this is a mistake. } } diff --git a/templates/macros.cs b/templates/macros.cs index 03ac89f..f44f954 100644 --- a/templates/macros.cs +++ b/templates/macros.cs @@ -172,7 +172,12 @@ def:reload_link(attr, value) ?> +# show a link for enabling or disabling the help texts ?>