class CustomToolDict(DesktopEntryDict): (source)
Known subclasses: zim.gui.customtools.CustomTool
This is a specialized desktop entry type that is used for custom tools for the "Tools" menu in zim. It uses a non-standard Exec spec with zim specific escapes for "X-Zim-ExecTool".
The following fields are expanded:
Other additional keys are:
These tools should always be executed with 3 arguments: notebook, page & pageview.
| Method | get_pixbuf |
Get the application icon as a GdkPixbuf.Pixbuf. @param size: the icon size as gtk constant @returns: a pixbuf object or None |
| Method | isvalid |
Check if all required fields are set. @returns: True if all required fields are set |
| Method | parse_exec |
No summary |
| Method | run |
No summary |
| Method | update |
Same as dict.update() |
| Property | execcmd |
Undocumented |
| Property | icon |
Undocumented |
| Property | isreadonly |
Undocumented |
| Property | replaceselection |
Undocumented |
| Property | showincontextmenu |
Undocumented |
| Property | showintoolbar |
Undocumented |
| Class Variable | _definitions |
Undocumented |
| Instance Variable | _tmpfile |
Undocumented |
Inherited from DesktopEntryDict:
| Method | __init__ |
Constructor |
| Property | cmd |
Undocumented |
| Property | comment |
Undocumented |
| Property | key |
Undocumented |
| Property | name |
Undocumented |
| Property | nodisplay |
Undocumented |
| Property | tryexeccmd |
Undocumented |
Inherited from Application (via DesktopEntryDict):
| Method | __eq__ |
Undocumented |
| Method | __repr__ |
Undocumented |
| Method | pipe |
Run the application in a sub-process and capture the output. Like run(), but connects to stdin and stdout for the sub-process. |
| Method | spawn |
No summary |
| Method | tryexec |
No summary |
| Constant | STATUS_OK |
Undocumented |
| Static Method | _lookup |
Lookup cmd in PATH |
| Method | _checkargs |
Undocumented |
| Method | _cmd |
Undocumented |
| Parameters | |
| size | the icon size as gtk constant |
| Returns | |
| a pixbuf object or None | |
| Parameters | |
| args | list of either URLs or File objects |
| Returns | |
| the full command to execute as a tuple | |
zim.applications.Application.run| Parameters | |
| notebook | Undocumented |
| page | Undocumented |
| pageview | Undocumented |
| args | additional arguments to give to the command as tuple or list |
| cwd | the folder to set as working directory for the command |
| Raises | |
ApplicationError | if the sub-process returned an error. |