From 3d6053d862638f21a5028cbf9f6eb77c9b4bc791 Mon Sep 17 00:00:00 2001 From: Felipe Corr??a da Silva Sanches Date: Fri, 27 May 2011 20:37:38 -0300 Subject: 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) --- src/extension/extension.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/extension/extension.cpp') 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); } @@ -309,6 +313,16 @@ Extension::get_repr (void) return repr; } +/** + \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! -- cgit v1.2.3