Commit Graph

174 Commits

Author SHA1 Message Date
Jehan bdece29d8c app: keep track of compatibility mode on an image.
If one explicitly enables the compatibility mode, one expects this to
be applied on following saves of the same image as well.
2015-09-01 15:20:28 +02:00
Nils Philippsen 0b900239d5 Ref/unref dialog->image around saving as well...
...to avoid warnings that happen if the image got closed before the
saving finishes.

(amends commit a0e48ad29e)
2015-07-17 17:10:20 +02:00
Michael Natterer a0e48ad29e Bug 739003 - Crashes in file_save_dialog_response()
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.
2015-07-14 13:22:06 +02:00
Michael Natterer 950f753ede Bug 736907 - Compat mode for XCF
- 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.
2014-10-20 22:54:11 +02:00
Michael Natterer 58f579cbe6 app: fix GFile porting leaks in file-save-dialog.c 2014-07-08 02:26:51 +02:00
Michael Natterer 221fa11544 app: URI -> GFile in file-save-dialog.c 2014-07-08 01:07:07 +02:00
Michael Natterer ff6ea69569 app: change the image's various URIs to GFiles
which gets rid of a lot of temporarily added GFile code again because
we don't need to convert between URI and GFile any longer.
2014-07-07 23:58:11 +02:00
Michael Natterer 0f8d84d5e9 app: port all file_open() and file_save() functions to GFile 2014-07-07 23:58:11 +02:00
Jehan 4b14ed2e5e file-export* labels and actions renamed.
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.
2013-11-18 09:07:32 +13:00
Michael Natterer b56145626e Bug 706221 - File/Save (As) dialog: add a link to the Export dialog...
...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.
2013-08-23 20:35:24 +02:00
Mikael Magnusson 6cb9ef6e38 app: add back needed NULL checks 2013-06-16 19:58:47 +02:00
Mikael Magnusson 0091645129 app: remove pointless NULL checks 2013-06-16 01:31:13 +02:00
Jehan 5c6c55e50a Bug 685557 - fix closing and saving a new image.
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.
2012-11-27 23:57:24 +09:00
Michael Natterer 2f8d45611c Bug 677974 - GIMP suggests XCF as default export format
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.
2012-06-12 22:33:47 +02:00
Michael Natterer 39c18e9a48 app: make file_save() aware of the difference between overwrite and export
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.
2012-05-18 18:57:58 +02:00
Michael Natterer 8559a28fd4 app: don't mess with the dialog's sensitivity while checking the extension
so the same widget (e.g. the entry) stays focused after dismissing the
extension mismatch message dialog.
2012-02-14 12:18:34 +01:00
Mukund Sivaraman 29e7d032a3 app (file-save-dialog): Remove dead code and variables 2011-10-06 09:01:51 +05:30
Martin Nordholts 6c6cf7a881 app: Move import and export URI updates to file_save()
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.
2011-02-02 22:31:27 +01:00
Martin Nordholts 1702822720 app: Fix copy-paste error in file-save-dialog.c
Fix what must have been a copy-paste error, we can not want to set
GIMP_FILE_SAVE_LAST_URI_KEY after we have exported.
2011-02-02 22:31:27 +01:00
Martin Nordholts 366cddc856 app: gimp_image_get/set_imported/exported/save_a_copy_uri()
Add more proper core API for GimpImage URI management.
2011-02-02 22:28:46 +01:00
Martin Nordholts 8d61a61c0e app: Remove GIMP_FILE_EXPORT_TO_URI_KEY
Remove GIMP_FILE_EXPORT_TO_URI_KEY which is always identical to
GIMP_FILE_EXPORT_URI_KEY.
2011-02-02 22:28:46 +01:00
Martin Nordholts 5819c3c83a app: Have an "Export" button, not "Save", in export dialogs 2009-12-06 08:58:44 +01:00
Michael Natterer c5b856f16f Use gimp_display_get_image() instead of display->image 2009-10-06 19:20:44 +02:00
Martin Nordholts c181f4eb05 app: Add and use gimp_image_is_dirty() 2009-07-03 21:11:21 +02:00
Martin Nordholts 631e128ddd app: Forget import source after saving as XCF
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'.
2009-07-02 22:17:36 +02:00
Sven Neumann 6742ebc949 app: don't call gimp_ui_manager_update() directly
gimp_ui_manager_update() should not be called directly. Instead call
gimp_image_flush() after doing changes that need to be reflected in
the menus.
2009-05-17 11:02:31 +02:00
Martin Nordholts c03c93ba44 app: Don't bother asking for overwrite if the extension is invalid 2009-05-16 13:02:55 +02:00
Martin Nordholts c23370c3af app: Emit the GimpImage::exported signal when image is exported 2009-05-16 13:02:55 +02:00
Martin Nordholts 2fcf33db5d app: Don't reset save-a-copy URI on URI change 2009-05-16 13:02:55 +02:00
Martin Nordholts 11e5ecc5ca app: Update 'Export to' to the most recent export URI
When an image have been successfully exported we shall set the 'Export
to' URI to the target URI.
2009-05-16 13:02:54 +02:00
Martin Nordholts 72bc3aeed3 app: Remember last export URI for each image 2009-05-16 13:02:54 +02:00
Martin Nordholts 64f7d9b93b app: Improve save and export error messages 2009-05-16 09:48:13 +02:00
Martin Nordholts 0971d61fc4 app: Add an 'export' mode to the file save dialog 2009-05-16 09:48:12 +02:00
Martin Nordholts 3025dac653 app: Introduce and use GimpFileChooserAction
Introduce and use GimpFileChooserAction in the core so that we can
differentiate Save from Export later.
2009-05-16 09:48:12 +02:00
Martin Nordholts f10bf1d7fd app: Fix save overwrite logic for files with added extensions
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.
2009-05-15 19:41:13 +02:00
Martin Nordholts 8033f4c0d5 app: Fix potential memory leak in save dialog code
Fix potential memory leak in save dialog code with a new helper function
file_save_dialog_get_uri(). We must free zero-length strings.
2009-05-15 19:41:13 +02:00
Martin Nordholts 9c2aae1281 app: Update name of file_save_dialog_save_image() parameter
Rename file_save_dialog_save_image() parameter save_a_copy to
change_saved_state since that is the semantics it has now.
2009-05-06 17:09:31 +02:00
Martin Nordholts a0d9f6e57e app: Rename file_save() parameter save_a_copy to change_saved_state
Rename file_save() parameter save_a_copy to change_saved_state since
that is the semantics it has now.
2009-05-06 15:03:30 +02:00
Martin Nordholts edac194b23 app: Move save-on-copy URI remembering to the appropriate place
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.
2009-05-04 21:04:37 +02:00
Martin Nordholts 82d327a550 Revert "app: Move last-save URI management to file_save()"
This reverts commit f6cd700dd6. We
can't save the last-save-URI on such a low level.
2009-05-03 09:29:04 +02:00
Martin Nordholts f6cd700dd6 app: Move last-save URI management to file_save()
Move the logic to remember the URI of the last saved file from
file_save_dialog_response() to the more central place file_save().
2009-05-03 08:45:19 +02:00
Martin Nordholts 8064bbf22e app: Pass Gimp instead of GimpContext to file_save() 2009-05-03 08:35:01 +02:00
Martin Nordholts 3c1366a0c1 app: Merge almost identical higher level file_save() wrappers
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.
2009-05-02 15:58:32 +02:00
Martin Nordholts 290d433edf app: Remove image refs in file_save_dialog_save_image()
The function file_save() also refs the image so there is no for
file_save_dialog_save_image() to do the same.
2009-05-02 15:33:05 +02:00
Martin Nordholts 1bd506d91d app: Make file_save_dialog_save_image() more general
Move out specialized logic from file_save_dialog_save_image() to make
it more similar to file_write_with_uri_and_proc() in file-commands.c
2009-05-02 09:05:34 +02:00
Martin Nordholts a93346d0a0 app: Gather save dialog uri defaults in one 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.
2009-05-01 12:23:46 +02:00
Sven Neumann b0af6524b4 app/file: Rename gimpfile.h to gimp-file.h and fix include guards
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.
2009-05-01 09:03:13 +02:00
Martin Nordholts e622dc3cad app: Introduce gimpfile.h
Introduce gimpfile.h which for now contains defines for GObject data
keys used when managing save and open dialog URI defaults. More are to
be added.
2009-04-30 20:00:18 +02:00
Martin Nordholts 7bddad1320 app: Introduce file_save_dialog_unknown_ext_msg()
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-04-25 18:14:13 +02:00
Michael Natterer d9b5207aa2 Change licence to GPLv3 (and to LGPLv3 for libgimp).
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
2009-01-17 22:28:01 +00:00