Hey,
I was looking through the new fileselector code and found a couple of issues that I think should be worked out. Namely, with the inclusion of input and output formats that are done through extensions.
Previously, the file dialog called the extensions code to get a menu that contained all the input/output formats that could be handled, and each one had a key attached to it that specified which extension should be used. I'm not saying that this is a good thing, there is too much GUI code in the extensions system with that solution. But, I still think that the extensions system needs to be queried on the matter, and get that key passed into the save functions.
Probably the best thing would be a list of verbs, but I don't know if that is the best option as these aren't actions as much as selections. So, I'm proposing this:
GSList * Inkscape::Extension::get_input_list (void);
This will return a list of items that are:
gchar * name gchar * extension gchar * key
And then the GUI code can do what ever it wants with them, so long as it returns the key when it finishes (along with the filename ;)
Thoughts?
--Ted
Ted Gould wrote:
Hey,
I was looking through the new fileselector code and found a couple of issues that I think should be worked out. Namely, with the inclusion of input and output formats that are done through extensions.
Previously, the file dialog called the extensions code to get a menu that contained all the input/output formats that could be handled, and each one had a key attached to it that specified which extension should be used. I'm not saying that this is a good thing, there is too much GUI code in the extensions system with that solution. But, I still think that the extensions system needs to be queried on the matter, and get that key passed into the save functions.
Probably the best thing would be a list of verbs, but I don't know if that is the best option as these aren't actions as much as selections. So, I'm proposing this:
GSList * Inkscape::Extension::get_input_list (void);
This will return a list of items that are:
gchar * name gchar * extension gchar * key
And then the GUI code can do what ever it wants with them, so long as it returns the key when it finishes (along with the filename ;)
Thoughts?
--Ted
Eventually, the file-type mechanism will be covered by the "new improved" Gtk2.4 file selector, which looks a lot like the Windows or Nautilus selector. In which case it will be more like URI/mime-type. But that is still distant; for now, this seems ok.
We were looking earlier to replace all file names with Mental's URIs, but did not get very far. (I did not understand the sp_module_open() design). Look at importing a file into SVG on Win32 to see the shortcomings of our current way.
Bob
On Tue, 16 Mar 2004, Ted Gould wrote:
I was looking through the new fileselector code and found a couple of issues that I think should be worked out. Namely, with the inclusion of input and output formats that are done through extensions.
So, I'm proposing this:
GSList * Inkscape::Extension::get_input_list (void);
This will return a list of items that are:
gchar * name gchar * extension gchar * key
And then the GUI code can do what ever it wants with them, so long as it returns the key when it finishes (along with the filename ;)
Can you also return the mimetype?
Bryce
On Tue, 2004-03-16 at 13:10, Bryce Harrington wrote:
On Tue, 16 Mar 2004, Ted Gould wrote:
gchar * name gchar * extension gchar * key
And then the GUI code can do what ever it wants with them, so long as it returns the key when it finishes (along with the filename ;)
Can you also return the mimetype?
Yup, and I think I'm going to do tooltip too! Code is half done - I'll hopefully get it in CVS tonight (atleast the extensions side stuff).
--Ted
participants (3)
-
Bob Jamison
-
Bryce Harrington
-
Ted Gould