diff options
| author | Ted Gould <ted@gould.cx> | 2008-02-29 21:37:22 +0000 |
|---|---|---|
| committer | gouldtj <gouldtj@users.sourceforge.net> | 2008-02-29 21:37:22 +0000 |
| commit | 23c6090f0f77b6cd8b47e80e69974519e22f4ecf (patch) | |
| tree | 91fc6ca41a0daacd1f336038b2e77eacc1315ae0 /src/extension/input.cpp | |
| parent | Copy perspectives, too, when pasting 3D boxes (solves LP #195867) (diff) | |
| download | inkscape-23c6090f0f77b6cd8b47e80e69974519e22f4ecf.tar.gz inkscape-23c6090f0f77b6cd8b47e80e69974519e22f4ecf.zip | |
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)
Diffstat (limited to '')
| -rw-r--r-- | src/extension/input.cpp | 69 |
1 files changed, 36 insertions, 33 deletions
diff --git a/src/extension/input.cpp b/src/extension/input.cpp index 7ac97b9ed..cdc4f32f4 100644 --- a/src/extension/input.cpp +++ b/src/extension/input.cpp @@ -94,8 +94,8 @@ Input::Input (Inkscape::XML::Node * in_repr, Implementation::Implementation * in } /** - \return None - \brief Destroys an Input extension + \return None + \brief Destroys an Input extension */ Input::~Input (void) { @@ -103,44 +103,44 @@ Input::~Input (void) g_free(extension); g_free(filetypename); g_free(filetypetooltip); - g_free(output_extension); + g_free(output_extension); return; } /** \return Whether this extension checks out - \brief Validate this extension + \brief Validate this extension - This function checks to make sure that the input extension has - a filename extension and a MIME type. Then it calls the parent - class' check function which also checks out the implmentation. + This function checks to make sure that the input extension has + a filename extension and a MIME type. Then it calls the parent + class' check function which also checks out the implmentation. */ bool Input::check (void) { - if (extension == NULL) - return FALSE; - if (mimetype == NULL) - return FALSE; + if (extension == NULL) + return FALSE; + if (mimetype == NULL) + return FALSE; - return Extension::check(); + return Extension::check(); } /** \return A new document - \brief This function creates a document from a file - \param uri The filename to create the document from - - This function acts as the first step in creating a new document - from a file. The first thing that this does is make sure that the - file actually exists. If it doesn't, a NULL is returned. If the - file exits, then it is opened using the implmentation of this extension. - - After opening the document the output_extension is set. What this - accomplishes is that save can try to use an extension that supports - the same fileformat. So something like opening and saveing an - Adobe Illustrator file can be transparent (not recommended, but - transparent). This is all done with undo being turned off. + \brief This function creates a document from a file + \param uri The filename to create the document from + + This function acts as the first step in creating a new document + from a file. The first thing that this does is make sure that the + file actually exists. If it doesn't, a NULL is returned. If the + file exits, then it is opened using the implmentation of this extension. + + After opening the document the output_extension is set. What this + accomplishes is that save can try to use an extension that supports + the same fileformat. So something like opening and saveing an + Adobe Illustrator file can be transparent (not recommended, but + transparent). This is all done with undo being turned off. */ SPDocument * Input::open (const gchar *uri) @@ -167,7 +167,7 @@ Input::open (const gchar *uri) /** \return IETF mime-type for the extension - \brief Get the mime-type that describes this extension + \brief Get the mime-type that describes this extension */ gchar * Input::get_mimetype(void) @@ -177,7 +177,7 @@ Input::get_mimetype(void) /** \return Filename extension for the extension - \brief Get the filename extension for this extension + \brief Get the filename extension for this extension */ gchar * Input::get_extension(void) @@ -187,7 +187,7 @@ Input::get_extension(void) /** \return The name of the filetype supported - \brief Get the name of the filetype supported + \brief Get the name of the filetype supported */ gchar * Input::get_filetypename(void) @@ -200,7 +200,7 @@ Input::get_filetypename(void) /** \return Tooltip giving more information on the filetype - \brief Get the tooltip for more information on the filetype + \brief Get the tooltip for more information on the filetype */ gchar * Input::get_filetypetooltip(void) @@ -210,16 +210,19 @@ Input::get_filetypetooltip(void) /** \return A dialog to get settings for this extension - \brief Create a dialog for preference for this extension + \brief Create a dialog for preference for this extension - Calls the implementation to get the preferences. + Calls the implementation to get the preferences. */ bool Input::prefs (const gchar *uri) { - if (!loaded()) + if (!loaded()) { set_state(Extension::STATE_LOADED); - if (!loaded()) return false; + } + if (!loaded()) { + return false; + } Gtk::Widget * controls; controls = imp->prefs_input(this, uri); |
