Ref/unref the dialog around saving the image insatead of connecting to
"destroy" and NULLifying the local dialog variable on destruction,
which has caused weird crashes on fedora.
- add gimp_image_get,get_xcf_compat_mode()
- add a compat toggle to GimpFileDialog which is shown and sensitive
only for a save (not export), and if the image structure allows
to save an old version at all. The button also has a tooltip
which explains why it is sensitive and what it does
- add "gboolean xcf_compat" to file_save_dialog_save_image()
- in file_save_dialog_save_image(), call image_set_xcf_compat_mode(TRUE)
only around the call to file_save() and set it to FALSE after saving
- in xcf_save_invoker(), honor the image's XCF compat flag and save an
RLE-compressed XCF if possible
The above is very convoluted and doesn't pass the "xcf_compat" boolean
directly because we can't change the parameters of gimp-xcf-save, and
because the gimp-xcf-save might be called indirectly.
Follows updated save+export specification.
For renamed actions (file-export and file-export-to respectively to
file-export-as and file-export to mimick file-save*), menurc from
GIMP 2.8 will be correctly migrated.
...for Non-XCF files.
When the entered extension in save or export is on the other group,
add a link to the warning dialog which allows to jump directly to the
export or save dialog, with the same filename pre-entered.
Current implementation had 2 issues, fixed by this commit:
1/ after the file save dialog is closed, the image would not close.
2/ if you switched the visible tab before saving the new image, it
would save and close the visible tab, instead of the expected one.
Only auto-add .xcf if it's a save (not an export) dialog, instead do
not auto-add anything and ask the user to enter an extension, that's
less mysterious than saving in the last-exported format which the user
maybe doesn't remember or want.
by having two booleans "export_backward" and "export_forward" in the
api instead of just an "export" one that would destroy the "imported
from" state. This change fixes the state of the "Overwrite" menu item,
so it stays visible until the file got either saved or exported to
another filename.
This also reverts commit a4beeecf2b, so
Ctrl-S is always invokable even if invisible.
We should handle import-URI and export-URI at a lower level so
e.g. the import URI is reset when gimp_dnd_xds_save_image() is
used.
This change also simplifies unit testing.
Forget the import source after save. We interpret a save as that the
user is not interested in being able to quickly export back to the
original any longer. The effect of this is that if we have an
'Overwrite' menu item, it becomes insensitive and set to 'Export to'.
When the user specifies a filename in the save dialog, make sure the
overwrite confirmation is not shown if the filename will be
altered. It doesn't make sense to ask for permission to overwrite a
file that will never be overwritten.
The Save a copy-URI shall only be remembered when the URI has been
entered through the dialog, so move it from file_save() to
file_save_dialog_response(). This is a preparation for the future
where we need to pass TRUE to save_a_copy without the URI being
remembered.
Merge file_savefile_write_with_uri_and_proc() and
file_save_dialog_save_image() which contains the same logic. Call the
result file_save_dialog_save_image() in lack of a better name, and
keep it in file-save-dialog.[ch] for now in lack of a better place.
Gather save dialog uri defaults in one place. Move the small bits of
it from file_save_dialog_new() to gimp_file_dialog_set_save_image()
where the rest is.
The source filename convention would indicate that gimpfile.h
holds code for the GimpFile object. Rename it to gimp-file.h
to make clear that it doesn't.
Introduce file_save_dialog_unknown_ext_msg() so that we don't need to
have a copy-pasted huge error message (and prepare for more intricate
message handling).
2009-01-17 Michael Natterer <mitch@gimp.org>
* all files with a GPL header and all COPYING files:
Change licence to GPLv3 (and to LGPLv3 for libgimp).
Cleaned up some copyright headers and regenerated the parsers in
the ImageMap plugin.
svn path=/trunk/; revision=27913