added: volume_mount - warning message for mounting of invalid filesystem types

improved: plugin_manager - usable for the different plugin types now
This commit is contained in:
lars 2006-11-07 13:48:06 +00:00
parent 414389951e
commit 97ebd4c92e
8 changed files with 48 additions and 40 deletions

View file

@ -22,9 +22,11 @@ Text.Months {
12 = December 12 = December
} }
SuccessMessage.DateChanged { SuccessMessage {
Title = Date changed DateChanged {
Text = The date was changed successfully. Title = Date changed
Text = The date was changed successfully.
}
} }
WarningMessage { WarningMessage {

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View file

@ -10,6 +10,8 @@ Text {
PluginRank = Priority PluginRank = Priority
PluginEnabled = Enabled? PluginEnabled = Enabled?
RequestsAuth = Requires admin? RequestsAuth = Requires admin?
VolumePlugins = Volume plugins VolumePlugin = Volume
SystemPlugins = System plugins SystemPlugin = System
MenuPlugin = Menu
PluginTypes = Type of plugin
} }

View file

@ -2,13 +2,18 @@
<style type="text/css"> <style type="text/css">
table.plugin_list { table.plugin_list {
text-align: center; text-align: center;
} }
table.plugin_list td, table.plugin_list th { table.plugin_list td, table.plugin_list th {
padding-left: 5px; padding-left: 5px;
padding-right: 5px; padding-right: 5px;
} }
table.plugin_list td img {
width: 24px;
height: 24px;
}
</style> </style>
@ -19,46 +24,37 @@
<?cs call:print_form_header("manage_plugins", "plugin_manager") ?> <?cs call:print_form_header("manage_plugins", "plugin_manager") ?>
<h2><?cs var:html_escape(Lang.Plugins.plugin_manager.Text.SystemPlugins) ?></h2>
<p>
<table class="plugin_list"> <table class="plugin_list">
<tr>
<th></th>
<th colspan="3"><?cs var:html_escape(Lang.Plugins.plugin_manager.Text.PluginTypes) ?></th>
<th></th>
<th></th>
<th></th>
</tr>
<tr> <tr>
<th><?cs var:html_escape(Lang.Plugins.plugin_manager.Text.PluginName) ?></th> <th><?cs var:html_escape(Lang.Plugins.plugin_manager.Text.PluginName) ?></th>
<th><?cs var:html_escape(Lang.Plugins.plugin_manager.Text.MenuPlugin) ?></th>
<th><?cs var:html_escape(Lang.Plugins.plugin_manager.Text.SystemPlugin) ?></th>
<th><?cs var:html_escape(Lang.Plugins.plugin_manager.Text.VolumePlugin) ?></th>
<th><?cs var:html_escape(Lang.Plugins.plugin_manager.Text.PluginRank) ?></th> <th><?cs var:html_escape(Lang.Plugins.plugin_manager.Text.PluginRank) ?></th>
<th><?cs var:html_escape(Lang.Plugins.plugin_manager.Text.PluginEnabled) ?></th> <th><?cs var:html_escape(Lang.Plugins.plugin_manager.Text.PluginEnabled) ?></th>
<th><?cs var:html_escape(Lang.Plugins.plugin_manager.Text.RequestsAuth) ?></th> <th><?cs var:html_escape(Lang.Plugins.plugin_manager.Text.RequestsAuth) ?></th>
</tr> </tr>
<?cs each:x = Settings.PluginList ?><?cs if:x.Types.system <?cs each:x = Settings.PluginList
?><input type="hidden" name="<?cs var:name(x) ?>_listed" value="1" /><tr> ?><input type="hidden" name="<?cs var:name(x) ?>_listed" value="1" /><tr>
<td style="text-align:left"><?cs var:html_escape(name(x)) ?></td> <td style="text-align:left"><?cs var:html_escape(name(x)) ?></td>
<td><?cs if:x.Types.menu ?><img src="icons/plugin_manager?image=gtk-ok_nuvola.png" alt="X" /><?cs else ?><img src="icons/plugin_manager?image=gtk-stop_nuvola.png" alt="-" /><?cs /if ?></td>
<td><?cs if:x.Types.system ?><img src="icons/plugin_manager?image=gtk-ok_nuvola.png" alt="X" /><?cs else ?><img src="icons/plugin_manager?image=gtk-stop_nuvola.png" alt="-" /><?cs /if ?></td>
<td><?cs if:x.Types.volume ?><img src="icons/plugin_manager?image=gtk-ok_nuvola.png" alt="X" /><?cs else ?><img src="icons/plugin_manager?image=gtk-stop_nuvola.png" alt="-" /><?cs /if ?></td>
<td><input style="text-align:right" type="text" size="3" name="<?cs var:name(x) ?>_rank" value="<?cs var:html_escape(x.Rank) ?>" /></td> <td><input style="text-align:right" type="text" size="3" name="<?cs var:name(x) ?>_rank" value="<?cs var:html_escape(x.Rank) ?>" /></td>
<td><input type="checkbox" name="<?cs var:name(x) ?>_enabled" <?cs if:x.Enabled ?>checked="checked"<?cs /if ?> /></td> <td><input type="checkbox" name="<?cs var:name(x) ?>_enabled" <?cs if:x.Enabled ?>checked="checked"<?cs /if ?> /></td>
<td><input type="checkbox" name="<?cs var:name(x) ?>_auth" <?cs if:x.RequestAuth ?>checked="checked"<?cs /if ?> /></td> <td><input type="checkbox" name="<?cs var:name(x) ?>_auth" <?cs if:x.RequestAuth ?>checked="checked"<?cs /if ?> /></td>
</tr><?cs /if ?><?cs /each ?> </tr><?cs /each ?>
</table></p> </table>
<h2><?cs var:html_escape(Lang.Plugins.plugin_manager.Text.VolumePlugins) ?></h2>
<p>
<table class="plugin_list">
<tr>
<th><?cs var:html_escape(Lang.Plugins.plugin_manager.Text.PluginName) ?></th>
<th><?cs var:html_escape(Lang.Plugins.plugin_manager.Text.PluginRank) ?></th>
<th><?cs var:html_escape(Lang.Plugins.plugin_manager.Text.PluginEnabled) ?></th>
<th><?cs var:html_escape(Lang.Plugins.plugin_manager.Text.RequestsAuth) ?></th>
</tr>
<?cs each:x = Settings.PluginList ?><?cs if:x.Types.volume
?><input type="hidden" name="<?cs var:name(x) ?>_listed" value="1" /><tr>
<td style="text-align:left"><?cs var:html_escape(name(x)) ?></td>
<td><input style="text-align:right" type="text" size="3" name="<?cs var:name(x) ?>_rank" value="<?cs var:html_escape(x.Rank) ?>" /></td>
<td><input type="checkbox" name="<?cs var:name(x) ?>_enabled" <?cs if:x.Enabled ?>checked="checked"<?cs /if ?> /></td>
<td><input type="checkbox" name="<?cs var:name(x) ?>_auth" <?cs if:x.RequestAuth ?>checked="checked"<?cs /if ?> /></td>
</tr><?cs /if ?><?cs /each ?>
</table></p>
<p> <p>
<input type="hidden" name="store" value="1" /> <input type="hidden" name="store" value="1" />
<button type="submit"><?cs var:html_escape(Lang.Plugins.plugin_manager.Button.SaveSettings) ?></button> <button type="submit"><?cs var:html_escape(Lang.Plugins.plugin_manager.Button.SaveSettings) ?></button>
</p> </p>

View file

@ -30,7 +30,7 @@ SuccessMessage {
WarningMessage { WarningMessage {
MountFailed { MountFailed {
Title = Activation failed Title = Activation failed
Text = The encrypted filesystem could not be activated. Probably the given password was wrong. Please try again. Text = The volume could not be activated for some reason. Sorry!
} }
MountCryptoFailed { MountCryptoFailed {
@ -38,9 +38,16 @@ WarningMessage {
Text = Maybe you entered the wrong password? Text = Maybe you entered the wrong password?
} }
InvalidContainerType {
Title = Unknown format
Text = The type of this volume ist not known. Maybe you want to initialize itfirst?
Link.Text = Format volume
Link.Rel = format_fs
}
UmountFailed { UmountFailed {
Title = Deactivation failed Title = Deactivation failed
Text = The encrypted filesystem could not be deactivated. Probably some files are still in use. Close all unclean programs (for example that widely used word processor). In case of emergency just shut down the CryptoBox! Text = The volume could not be deactivated. Probably some files are still in use. In case of emergency just shut down the CryptoBox!
} }
IsAlreadyMounted { IsAlreadyMounted {

View file

@ -40,8 +40,9 @@ class volume_mount(CryptoBoxPlugin.CryptoBoxPlugin):
self.cbox.log.info("the device (%s) is already mounted" % self.device) self.cbox.log.info("the device (%s) is already mounted" % self.device)
return "volume_status" return "volume_status"
if self.container.getType() != self.container.Types["plain"]: if self.container.getType() != self.container.Types["plain"]:
## not a plain container - fail silently ## not a plain container
self.cbox.log.info("plugin 'volume_mount' - invalid container type") self.cbox.log.info("plugin 'volume_mount' - invalid container type")
self.hdf["Data.Warning"] = "Plugins.volume_mount.InvalidContainerType"
return "volume_status" return "volume_status"
try: try:
self.container.mount() self.container.mount()
@ -94,7 +95,7 @@ class volume_mount(CryptoBoxPlugin.CryptoBoxPlugin):
try: try:
self.container.umount() self.container.umount()
except CBUmountError, errMsg: except CBUmountError, errMsg:
self.hdf["Data.Warning"] = "InvalidType" self.hdf["Data.Warning"] = "UmountFailed"
self.cbox.log.warn("could not umount the volume (%s): %s" % (self.device, errMsg)) self.cbox.log.warn("could not umount the volume (%s): %s" % (self.device, errMsg))
return "volume_status" return "volume_status"
self.cbox.log.info("successfully unmounted the container: %s" % self.device) self.cbox.log.info("successfully unmounted the container: %s" % self.device)

View file

@ -5,6 +5,6 @@
<?cs call:print_form_header("umount", "volume_mount") ?> <?cs call:print_form_header("umount", "volume_mount") ?>
<p><input type="hidden" name="device" value="<?cs var:html_escape(Data.CurrentDisk.device) ?>" /> <p><input type="hidden" name="device" value="<?cs var:html_escape(Data.CurrentDisk.device) ?>" />
<input type="hidden" name="action" value="umount" /> <input type="hidden" name="action" value="umount" />
<button type="submit" tabindex="2"><?cs var:html_escape(Lang.Button.Umount) ?></button></p> <button type="submit" tabindex="2"><?cs var:html_escape(Lang.Plugins.volume_mount.Button.Umount) ?></button></p>
</form> </form>