diff options
| author | Felipe Corr??a da Silva Sanches <juca@members.fsf.org> | 2011-05-27 23:37:38 +0000 |
|---|---|---|
| committer | Felipe C. da S. Sanches <juca@members.fsf.org> | 2011-05-27 23:37:38 +0000 |
| commit | 3d6053d862638f21a5028cbf9f6eb77c9b4bc791 (patch) | |
| tree | bfe4752ca523ed36d03736c54b7f9752b496a417 /src/extension/extension.cpp | |
| parent | typography extensions: (diff) | |
| download | inkscape-3d6053d862638f21a5028cbf9f6eb77c9b4bc791.tar.gz inkscape-3d6053d862638f21a5028cbf9f6eb77c9b4bc791.zip | |
Add "silent" option to extension inx file so that extension authors can opt-out of displaying the "working, please wait" dialog.
Extensions that are tipically slow can still have the dialog show up by simply not adding this attribute to the inx file.
(bzr r10240)
Diffstat (limited to 'src/extension/extension.cpp')
| -rw-r--r-- | src/extension/extension.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/extension/extension.cpp b/src/extension/extension.cpp index e67a4b95f..a70c79943 100644 --- a/src/extension/extension.cpp +++ b/src/extension/extension.cpp @@ -59,6 +59,7 @@ Parameter * get_param (const gchar * name); */ Extension::Extension (Inkscape::XML::Node * in_repr, Implementation::Implementation * in_imp) : _help(NULL) + , silent(false) , _gui(true) { repr = in_repr; @@ -105,6 +106,9 @@ Extension::Extension (Inkscape::XML::Node * in_repr, Implementation::Implementat if (!strcmp(chname, "dependency")) { _deps.push_back(new Dependency(child_repr)); } /* dependency */ + if (!strcmp(chname, "options")) { + silent = !strcmp( child_repr->attribute("silent"), "true" ); + } child_repr = sp_repr_next(child_repr); } @@ -310,6 +314,16 @@ Extension::get_repr (void) } /** + \return bool + \brief Whether this extension should hide the "working, please wait" dialog +*/ +bool +Extension::is_silent (void) +{ + return silent; +} + +/** \return The textual id of this extension \brief Get the ID of this extension - not a copy don't delete! */ |
