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

improved: plugin_manager - usable for the different plugin types now
master
lars 16 years ago
parent 414389951e
commit 97ebd4c92e
  1. 8
      plugins/date/lang/en.hdf
  2. BIN
      plugins/plugin_manager/gtk-ok_nuvola.png
  3. BIN
      plugins/plugin_manager/gtk-stop_nuvola.png
  4. 6
      plugins/plugin_manager/lang/en.hdf
  5. 52
      plugins/plugin_manager/plugin_list.cs
  6. 11
      plugins/volume_mount/lang/en.hdf
  7. 5
      plugins/volume_mount/volume_mount.py
  8. 2
      plugins/volume_mount/volume_umount.cs

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

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

@ -2,13 +2,18 @@
<style type="text/css">
table.plugin_list {
text-align: center;
}
text-align: center;
}
table.plugin_list td, table.plugin_list th {
padding-left: 5px;
padding-right: 5px;
}
padding-left: 5px;
padding-right: 5px;
}
table.plugin_list td img {
width: 24px;
height: 24px;
}
</style>
@ -19,46 +24,37 @@
<?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">
<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>
<th></th>
<th colspan="3"><?cs var:html_escape(Lang.Plugins.plugin_manager.Text.PluginTypes) ?></th>
<th></th>
<th></th>
<th></th>
</tr>
<?cs each:x = Settings.PluginList ?><?cs if:x.Types.system
?><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>
<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.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.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
<?cs each:x = Settings.PluginList
?><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><?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 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>
</tr><?cs /each ?>
</table>
<p>
<input type="hidden" name="store" value="1" />
<button type="submit"><?cs var:html_escape(Lang.Plugins.plugin_manager.Button.SaveSettings) ?></button>
</p>

@ -30,7 +30,7 @@ SuccessMessage {
WarningMessage {
MountFailed {
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 {
@ -38,9 +38,16 @@ WarningMessage {
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 {
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 {

@ -40,8 +40,9 @@ class volume_mount(CryptoBoxPlugin.CryptoBoxPlugin):
self.cbox.log.info("the device (%s) is already mounted" % self.device)
return "volume_status"
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.hdf["Data.Warning"] = "Plugins.volume_mount.InvalidContainerType"
return "volume_status"
try:
self.container.mount()
@ -94,7 +95,7 @@ class volume_mount(CryptoBoxPlugin.CryptoBoxPlugin):
try:
self.container.umount()
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))
return "volume_status"
self.cbox.log.info("successfully unmounted the container: %s" % self.device)

@ -5,6 +5,6 @@
<?cs call:print_form_header("umount", "volume_mount") ?>
<p><input type="hidden" name="device" value="<?cs var:html_escape(Data.CurrentDisk.device) ?>" />
<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>

Loading…
Cancel
Save