Another point about OCAL export. It seems that both of us are working on filedialog.cpp, where I notice you've added two new classes FileImportFromOCALDialog and FileExportToOCALDialog to the file which already has three classes FileOpenDialog, FileSaveDialog and FileSaveDialog. I havn't been able to try the latest bits yet, but am I right in thinking that these OCAL dialogs are not file dialogs in the sense that they allow you pick a file from the file system?

If this is the case, then they really don't belong in filedialog.cpp. Basically I'm hoping to get inkscape to support native file dialogs for various platforms (Windows, MacOS etc). filedialogs.cpp is the place where the class factories for the platform specific dialog implementations will be, with platform specific implementations all located within separate files.

This is why I recently renamed the class FileSaveDialogImpl to FileSaveDialogImplGtk and put it in a separate file, because there's soon to come a FileSaveDialogImplWin32; and maybe one day someone will add a FileSaveDialogImplMacOS or whatever. However, you don't need to do all that for the ocal dialogs. You certainly don't need to have an addition class FileImportFromOCALDialogImplGtk; because noone should ever implement a FileImportFromOCALDialogImplWin32 or a FileImportFromOCALDialogImplMacOS or a FileImportFromOCALDialogImplBeOS!

The other problem IMHO is that even before FileImportFromOCALDialog and FileExportToOCALDialog came along, when filedialogs.cpp had only 3 class implementations, that was still 2 too many*! So for these reasons I recommend you relocate these classes to another file maybe called ocaldialogs.cpp and ocaldialogs.h or something. You can also do away with both FileExportToOCALDialogImpl and FileImportFromOCALDialogImplGtk moving all their functionality into FileImportFromOCALDialog and FileExportToOCALDialog; because there will never be platform specific implementations of these dialogs.

I hope this helps
Best regards
Joel

* Soon I'm hoping to relocate FileExportDialog to another file, because it's really quite a different beast from FileOpenDialog and FileSaveDialog.


From: "Bruno Dilly" <bruno.dilly@...400...>
Sent: 18 August 2007 18:31
To: "bulia byak" <buliabyak@...400...>
Subject: Re: [Inkscape-devel] Import from OCAL feature


On 8/18/07, bulia byak wrote:
> On 8/18/07, Bruno Dilly wrote:
> > bulia, to select the row: if you are using the keyboard you must press
> > enter, and if you are using the mouse you must double click.
>
> Hmm, I'm afraid this must not be documented - it must be fixed instead
> :) It's very unintuitive and plain wrong: single click must select,
> double click or Enter must open selected (closing the dialog).
>

OK, I will change it

> Anyway, now that I double click, I can import something, but only PNG
> files. Any SVG file fails to show or open, writing in the console:
>
> (inkscape:23667): glibmm-CRITICAL **:
> unhandled exception (type Glib::Error) in signal handler:
> domain: gdk-pixbuf-error-quark
> code : 3
> what : Couldn't recognize the image file format for file
> '/tmp/johnny_automatic_pen.svg'
>

I couldn't reproduce the bug. Everything is working fine here, I've
imported a lot of SVG files, including johnny_automatic_pen.svg. Could
you make a test for me? Try to import the file directly from /tmp/,
with the Import feature. Is it working for you?

Do you have any other information that you think could help me to find
what is happening?

> By the way, it would be nice to have a line added to the dialog that
> would show some information about the selected image: filename,
> format, file size, date, etc.

Good idea, I will see it later

>
> --
> bulia byak
> Inkscape. Draw Freely.
> http://www.inkscape.org
>

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Inkscape-devel mailing list
Inkscape-devel@...941...rge.net
https://lists.sourceforge.net/lists/listinfo/inkscape-devel