...from the command line on some platforms/window managers
file_open_from_command_line(): display the progress in the active
display if there is no empty display. This way the progress appears in
the display that was opened from the previous command line argument.
- don't include <gdk-pixbuf/gdk-pixbuf.h> in headers in app/
- instead, include it in many .c files instead of <glib-object.h>,
finally acknowledging the fact that app/ depends on gdk-pixbuf almost
globally
- fix up includes as if libgimpbase depended in GIO, which it soon will
Use g_slist_find_custom(), g_ascii_strcasecmp() rather than iterating
over lists of extensions, then over single characters again and
comparing the output of g_ascii_tolower().
opening many images from the command line used to print:
(gimp-2.9:): GLib-GObject-CRITICAL **: g_object_add_weak_pointer:
assertion 'G_IS_OBJECT (object)' failed
because only the first finds the empty display
- Add new enum GimpComponentType which contains u8, u16, u32 etc.
- Change GimpPrecision to be u8-linear, u8-gamma, u16-linear etc.
- Add all the needed formats to gimp-babl.c
- Bump the XCF version to 5 and make sure version 4 with the old
GimpPrecision enum values is loaded correctly
This change blows up the precision enums in "New Image" and
Image->Precision so we can test all this stuff. It is undecided what
format will be user-visible options in 2.10.
...PNG Description encoding error.
Don't unconditionally display all error messages from thumbnail saving.
Instead, return the error from gimp_imagefile_create_thumbnai()
and gimp_imagefile_save_thumbnail() and display it only if thumbnail
creation was the actual user-intended action (like clicking the preview
in a file dialog). Do not display the error when thumbnailing is just
a side effect of loading/saving an image.
Remove plain .gz .bz2 .xz from the extensions the file-compressor
plug-in registers, and make sure is only ends up in "save_procs", so
at least "exporting" to foo.xcf.gz is not possible any longer. With
some effort, one can still "save" to foo.png.gz tho, but it's much
harder now.
file_procedure_in_group(): consider "file-uri-save" to be in both the
SAVE and the EXPORT groups.
gimp_plug_in_manager_register_save_handler(): allow a procedure to be
in both "save_procs" and "export_procs".
The logic in the file save/export dialog checks uri prefixes and
extensions just fine, so nothing bad seems to happen from this change,
I hope...
Fix this and other issues more globally by moving the logic that
formats the image's display name into the GimpImage object, and return
the properly formatted name, e.g. "Foo.xcf", or "[Foo] (imported)"
from gimp_image_get_display_name().
Also add gimp_image_get_display_path() which returns the full path
instead. Use the two functions for formatting the image title, and
apply various other fixes that make sure the UI always uses the same
string to identify the image.
Call gimp_object_name_changed() whenever the save/export status
changes, so the image's cached display name and path get cleared.
file_open_with_proc_and_display(): Use gimp_image_get_any_uri() to
check if the opened file has the same URI as the one passed in so
the logic works for non-XCF too.
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.
create a dummy indexed format if neccessary, which can only be used
for checking with babl_format_is_palette(). Port the rest of
GimpImageFile from GimpImageType to Babl*.
In file_open_with_proc_and_display(), don't use the passed load_proc
(which can be NULL) but the actually used load_proc to determine if
the file was imported.
The code in file_procedure_find() tries to lazy-open the image file, so
it's not opened if unnecessary. To keep track of whether the image was
opened or not, it overrides head_size to keep track of this. head_size
is also assigned the return value of fread() in the loop. The patch
separates this by introducing another variable.
I think it's best to move the file opening code outside the while loop,
as it's most likely bound to be opened anyway, and the penalty is not
too bad.
we normally do this because the initial display takes ownership of the
newly created image, but in no-interface mode we would simply unref
the image away, which is bad.
An image can not be considered both exported and imported at the same
time, so stop consider it as imported after we consider it exported.
Also add an automatic regression test.
Add "gboolean merge_active_group" to gimp_image_merge_visible_layers()
and pass FALSE from the PDB wrapper so plug-in invoked layer merging
always acts on the toplevel container as it did in 2.6. Do the same
when opening an image as layer.
Also, added a "Merge within active group only" toggle to the merge
layers dialog and pass it down to the core, but default to TRUE here
so.
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.
Begin to consider GimpObject::name as private and always use
gimp_object_get_name(). Change gimp_object_get_name() to take an
untyped pointer so we don't have to do so awfully many casts. There is
a runtime check for the type inside the function anyway.
The only purpose of this change is to avoid having the "update"
signal twice on GimpGroupLayer (from GimpDrawable and from
GimpProjectable). Switch back to normal g_signal_connect()
in the projection.
We have no reason to believe that the original layer names when
importing multi-layered images are not good enough, so stop adding the
filename as a prefix to the names.
Since save and export are separate activities we need to keep track of
image dirtiness for both of them. For this purpose, add a
'export_dirty' member to GimpImage which has the same semantics as
'dirty', but for export. Set it to clean whenever a document is
exported by whatever means. Do this with a new function
gimp_image_export_clean_all(). Also add gimp_image_is_export_dirty().
With no export target but with an import source, show
"Overwrite <filename>" in the File menu. This also means we can't set
GIMP_FILE_EXPORT_TO_URI_KEY along with import source any longer.