From 23c6090f0f77b6cd8b47e80e69974519e22f4ecf Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 29 Feb 2008 21:37:22 +0000 Subject: r18220@shi: ted | 2008-02-29 13:18:55 -0800 Okay, sadly I'm not keeping the version history because I'm not convenced that SVK will do it right. One mega-patch, but that's life. Reshuffle the exection-env and prefdialog code so that the state machines aren't intertwines, which fixes a whole host of bugs with them. I think the behavior is correct now. Make it so that the effects can count how many preferences they have to determine if the dialog should be shown (fix above). Once this code was written it was easy to make it show an ellipsis on the verb if there is a dialog or not. This involved removing ellipsis from those effects that had it hard coded. Make it so that the parameters know that their command line options are going into a list. They don't have to acknowledge it, but they can, and specifically notebook does and handles it differently. This should fix the notebooks on Win32, but doesn't apparently completely. Change the script extension on windows to use pythonw instead of python so that the command line doesn't appear all the time. (bzr r4908) --- src/extension/extension.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'src/extension/extension.h') diff --git a/src/extension/extension.h b/src/extension/extension.h index e4f2dc88e..4af65dc92 100644 --- a/src/extension/extension.h +++ b/src/extension/extension.h @@ -94,7 +94,7 @@ private: static std::ofstream error_file; /**< This is the place where errors get reported */ protected: - Inkscape::XML::Node *repr; /**< The XML description of the Extension */ + Inkscape::XML::Node *repr; /**< The XML description of the Extension */ Implementation::Implementation * imp; /**< An object that holds all the functions for making this work */ ExpirationTimer * timer; /**< Timeout to unload after a given time */ @@ -123,6 +123,23 @@ private: This only gets created if there are parameters in this extension */ +public: + /** \brief A function to get the the number of parameters that + the extension has. + \return The number of parameters. */ + unsigned int param_count ( ) { return parameters == NULL ? 0 : + g_slist_length(parameters); }; + /** \brief A function to get the the number of parameters that + are visible to the user that the extension has. + \return The number of visible parameters. + + \note Currently this just calls param_count as visible isn't implemented + but in the future it'll do something different. Please call + the appropriate function in code so that it'll work in the + future. + */ + unsigned int param_visible_count ( ) { return param_count(); }; + public: /** An error class for when a parameter is called on a type it is not */ class param_wrong_type {}; -- cgit v1.2.3