new menu plugins: "help", "system_preferences" and "disks"
description of plugin interface extended with possible redirection to another plugin
This commit is contained in:
parent
7fd361d8ac
commit
87d99e8173
18 changed files with 125 additions and 21 deletions
15
pythonrewrite/plugins/disks/disks.cs
Normal file
15
pythonrewrite/plugins/disks/disks.cs
Normal file
|
@ -0,0 +1,15 @@
|
|||
<?cs # $Id$ ?>
|
||||
|
||||
<h1><?cs var:html_escape(Lang.Plugins.disks.Title.Disks) ?></h1>
|
||||
|
||||
<?cs # TODO: add no-disks-available warning ?>
|
||||
|
||||
<?cs if:subcount(Data.Disks) == 0 ?>
|
||||
NO DISKS
|
||||
<?cs else ?>
|
||||
<?cs # we use "loop" instead of "each" to keep the order of the disks ?>
|
||||
<?cs loop: index = #0, subcount(Data.Disks)-1, #1 ?>
|
||||
<?cs call:show_volume(index) ?>
|
||||
<?cs /loop ?>
|
||||
<?cs /if ?>
|
||||
|
17
pythonrewrite/plugins/disks/disks.py
Normal file
17
pythonrewrite/plugins/disks/disks.py
Normal file
|
@ -0,0 +1,17 @@
|
|||
import CryptoBoxPlugin
|
||||
|
||||
class disks(CryptoBoxPlugin.CryptoBoxPlugin):
|
||||
|
||||
pluginCapabilities = [ "menu" ]
|
||||
requestAuth = False
|
||||
rank = 10
|
||||
|
||||
def doAction(self):
|
||||
self.cbox.reReadContainerList()
|
||||
return "disks"
|
||||
|
||||
|
||||
def getStatus(self):
|
||||
return "TODO"
|
||||
|
||||
|
5
pythonrewrite/plugins/disks/lang/en.hdf
Normal file
5
pythonrewrite/plugins/disks/lang/en.hdf
Normal file
|
@ -0,0 +1,5 @@
|
|||
Name = Disk overview
|
||||
Link = Disks
|
||||
|
||||
Title.Disks = Available disks
|
||||
|
BIN
pythonrewrite/plugins/disks/plugin_icon.png
Normal file
BIN
pythonrewrite/plugins/disks/plugin_icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
Loading…
Add table
Add a link
Reference in a new issue