Delete the re-inserted 'ige_mac_menu_add_app_menu_group()' function
call. GIMP has migrated to external gtk-mac-integration for the global
menubar integration - ige_mac_menu* functions are no longer available.
This is useful for debugging though current consensus is that the finale
user should not care about the technical name of an action.
I did also some minor code cleanup when setting up the model columns.
Fix various bugs, improve code design and efficiency, change feature
name, update the feature up to our standards (now uses GIMP preferences,
session management, less overwhelming settings...).
Also now action history is tightly tied to GimpAction and logs all
action activation (however it activates, and the show_unavailable
parameter also applies to history).
Search algorithm greatly improved with basic tokenization, better
ordering, filtering, etc.
...after in-DND image switching
This was actually two issues:
First, DND data is normally transferred on drop. In this situation the
contents of the source widget change in the middle of DND, so when the
drop happens there is nothing to transfer. Fixed this by attaching the
thing to transfer (image, item, color etc) to the GdkDragContext when
the DND operation starts, and trying to retrieve it on drop. Only when
nothing is attached we fall back to the traditional way of asking the
source widget. This is expected and an obvious fix.
Second, and not so obvious, the source part of the GTK+-internal state
of the DND operation (GtkDragSourceInfo) contains a *reference* (not a
copy) of the source widget's target list. When we change images in the
middle of DND, the source layer view's target list gets modified, and
because GtkDragSourceInfo only references it, the state of the ongoing
DND operation gets destroyed with it. Fixed this by changing
gimp_dnd_data_source_remove() to never change a source widget's target
list but instead create a new list without the removed target and
replace the source widget's list, keeping the ongoing drag's list
unaffected.
Also kept all the GIMP_LOG() stuff I added during debugging there, it
turned out to be quite useful.
Disable extended input events when the cursor moves to a child of
the canvas widget. Otherwise GTK will try and fail to deliver an
extended event to the child widget, and end up sending it to the
canvas instead.
Port selection/path stroking to using the PDB-controllable
paint options that live in GimpPDBContext.
Change gimp_item_stroke()'s "use_default_values" boolean which was
introduced at a time where we had no better way by a GimpPaintOptions
parameter. If a non-NULL paint_options is passed (when called from the
PDB), use it for stroking; if NULL is passed, use the actual paint
tool options from the GUI (when called from the menus or the stroke
dialog). In the PDB wrappers, get the right paint options object from
the PDB context associated with the calling plug-in.
...when acting on a path or selection
Factor out the code that checks if an active item exists and if it's
transformable (not locked etc.) and use that function in more places.
This fixes both the wrong dialog labels and the tool running into
broken states when the selection or a path are being transformed.
Step and page increments can't be reasonable calculated or guessed
based on the GUI widget's factor, so pass them each time we call
set_factor(). This change reintroduces sane ranges for the levels tool
for != u8 images again.
Each of the following cleans up tag refcounting, fixes access to
released memory, or other small glitches. Not sure which change
actually fixed the bug:
gimp_data_remove_tag(): remove the found tag, not the passed in tag
(which is to be treated only as a value for comparison).
gimp_tagged_remove_tag(): don't continue the loop after the tag to
remove has been found, there can only be one matching tag, and the
list element has become invalid.
gimptagentry.c: keep references around for the members of
entry->common_tags, and make sure the references are always dropped
properly. In assign_tags(), reference the "add" and "remove" lists for
paranoia and safety reasons.
Which contains all the API from the "color" group, but with a
gimp_drawable namespace and with support for high bit depths. The
group is actually a copy of "color" with cruft removed and some API
ported to using float instead of integer API.
Deprecated all "color" functions that already have a ported version in
"drawable_color".
This is unfinished WIP, some functions in "drawable_color" still have
the old API.
and use it globally instead of two different methods, one of which was
forgotten to be ported to the new aspect ratio range where 0.0 means
1:1. Add a FIXME comment in paint_tools.pdb where I think setting the
default size is a bug, see #721249.
The current comment is technical and not meant for translators, but it
ends up in po file. Move it where it won't be extracted and add a real
comment for translators. Ideally this string should not be extracted by
xgettext, but it won't verify domains.
* Add a dialog with Preview, Apply, and Reset buttons instead of
depending only on hidden keyboard shortcuts.
* Change default paint mode to Unknown.
* Disable engine list when there is only one engine available.
* Hide useless Anti-Alias toggle.
* Write to selection instead of the layer mask.
Use 'About GIMP' in help menu on OS X, use '_About' on Linux.
Slightly modified by Sven Claussner to use 'About GIMP' on Windows.
Apply German translation patch.
GIMP 2.8.2's config was "~/Library/Gimp/x.y", before it got moved to
"~/Library/Application Support/x.y" and after being saved in the home
like other UNIXes. The migration code will now check all 3 places in the
right order on OSX.
Thanks to Simone Karin Lehmann for the original proposition.
Allow to drop colors also on the palette view's parent viewport, so
colors can be dropped everywhere inside the scrolled window, also when
the palette view is invisible because it has zero colors. Also allow
dropping of palettes on the viewport to change the editor's active
palette.
The code was technically correct previously: It wrote the uninitialized
length only as a placeholder to overwrite it later on. Yet it's better
to not confuse tools (or people) analysing the code. Besides that having
0 for the length in the file while the payload is being written may aid
debugging e.g. crashes in that code later on.
If docks are hidden and single-window-mode is active, emit
"notify::hide-docks" manually on gimp->config in session_restore() so
GimpImageWindow syncs its state at the right time.
...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.
We must always call gimp_item_convert() even if the source drawable is
in the same image, or we might end up with a layer of wrong pixel
format. This was probably broken for years.
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.
The obsolete .gbp format had a 3-byte pattern following a 1-byte
brush, when embedded in a brush pipe, the current code tries to load
that pattern as a brush, and encounters the '3' in the header. Detect
that and suggest to re-save the file because the plug-in still loads
the legacy format.
In gimp_drawable_resize(), don't blindly copy the width and height
returned by gimp_rectangle_intersect(), we have to check if the
function actually returned TRUE.
This mitigates the pain of having to confirm quitting when images have
only be exported but not saved: Introduce a <Primary>D shortcut in the
quit dialog and tell about it using a hint label at the bottom, so
quitting with dirty images is now a matter of pressing <Primary>Q
<Primary>D which is much easier to memorize than <Primary>Q
<Mnemonic>D.
Install a cell_data_func for the dirty image list's text renderer abd
construct the label manually, using the same string and logic as in
the close dialog.
Reduce the minimum width of the "You can drop foo here" label to one
pixel, so it can be hidden as completely as possible while keeping the
label visible.
Calculate GimpCanvasPassepartout's extents using a cairo_region_xor()
of the crop rectangle and the image extents, instead of a
cairo_region_subtract(). This fixes the artifacts and has the nice
side effect that the passepartout now colors both the parts of the
image that will be removed *and* the parts of the image that will be
newly added.
Based on original patches from Hartmut Kuhse and modified
by Michael Natterer. Changes include:
- remove libexif dependency and add a hard dependency on gexiv2
- typedef GExiv2Metadata to GimpMetadata to avoid having to
include gexiv2 globally
- add basic GimpMetadata handling functions to libgimpbase
- add image and image file specific metadata functions to libgimp,
including the exif orientation image rotate dialog
- port plug-ins to use the new APIs
- port file-tiff-save's UI to GtkBuilder
- add new plug-in "metadata" to view the image's metadata
- keep metadata around as GimpImage member in the core
- update the image's metadata on image size, resolution and precision
changes
- obsolete the old metadata parasites
- migrate the old parasites to new GimpMetadata object on XCF load
gimp_plug_in_handle_proc_install(): don't set the new procedure's menu
path nor its menu label if proc_install->menu_path is "", so we don't
run into action and menu creating confusion later. Do it here and not
later so the "" string never enters the system.
If any of the locale environment variables used for UI language is set
(LANGUAGE, LC_ALL, LC_MESSAGES and LANG), do not let Windows' default UI
language override these.
Language set in GIMP preferences still have higher priority.
- 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
by turning the -1 into n_children - 1 directly in gimp_container_reorder()
instead of having all subclasses deal with the -1 separately. Remove -1
handling from gimp_list_reorder().
Also, optimize reordering to the same index away without increasing
the function's cost (it was doing a gimp_container_have() before, now
it doees gimp_container_get_child_index(), which both have the same
cost).
The documentation was missing information about GIMP_ADD_CHANNEL_MASK
mask type, also about possible failure cases, and had an unclosed
bracket typo.
Also make nicer output and list formatting with the new pdb paragraph
feature.
Single newlines in procedure descriptions are still considered normal
spaces. But 2 newlines are transformed into 1 newline. 3 newlines into
2 newlines. And so on.
This allows for a start of nicer output in the procedure browser or C
file comments (and consequently in generated html doc).
I specifically moved the file opening/closing logic to the common
code. This makes the code easier to understand for me since there
is less duplication. In fact, this commit removes more lines than
it adds.
Totally WIP and later supposed to give simple access to all sorts of
things that can provide a GeglBuffer via the GimpPickable
interface. Currently only dropping of drawables and images is
supported.
The new by-row iteration doesn't re-write the length
value for each row. In general it is not safe to modify
the iterator data because the internal logic depends
on the public data, but this specific case is new.
Call gimp_filter_set_is_last_node() directly from the
GimpContainer::add(), ::remove() and ::reorder() implementations so it
is always called and things always have the correct state. More
precisely, don't call it in functions that are only called if the
stack has a graph, or that are called while the graph is being
created, because it has the side effect of emitting a signal that
might (and in fact did) trigger another recursive creation of the same
graph.
When removing the container of a GimpContainerView,
gimp_container_view_remove_container() must be the last call. It was
causing a `GIMP_IS_CONTAINER (container)' failure in subsequent
gimp_container_get_children_type().
For good practice, unsetting a container works now the exact reversed
order as the setting of a container.
Wrong order of destruction functions were causing critical warnings on
g_signal_handlers_disconnect_by_func() calls.
Also g_object_ref/unref() the container because the tree handler might
hold the last ref to the container, once it's disconnected the container
could be gone.
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().
Along with this change, the snap preferences have been moved from
GimpDisplayConfig to GimpDisplayOptions, where it makes much more sense.
One of the consequences is that there is no need to duplicate these
values in GimpDisplayShell anymore to differenciate defaults and
current settings.
gimp_operation_tool_aux_selected() is called with a NULL drawable
when the combo is destroyed, but at that time the GeglNode we set
the buffer on is already gone. Instead of adding evil if()s,
connect_object() the combo's "select-item" signal to the node
instead of the tool, so it gets disconnected automatically.
...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.
removing the area that is going to be rendered from the dirty area
before rendering it, prevents tile-handler-projection to render it
again.
This was the reason why caching showed an improvement also during
the construction of the projection. And it was a regression that
I introduced in a previous commit
when toggling the visibility of a single layer image with
alpha channel, zoomed at 50%, the projection wasn't
properly redrawn. It seems there's a GEGL bug exposed
by normal layer mode operation fast path.
measure the time it takes to render projection chunks and continue
rendering until 0.01 seconds have passed. This ways we avoid excessive
expose roundtrips.
so we can control how much time it takes, and can further optimize it.
This is needed for gtk3 because it should happen between clock ticks,
not in the expose handler, and in gtk2 the old code would have the
unfortunate property to potentially render at very high frame rates,
including all the overhead of exposing.
In gimpgrouplayer.c always gimp_pickable_flush() after
gimp_projectable_structure_changed() so all queued updates are
actually flushed to the projection buffer's invalid area, and are
constructed upon reading. This would have been neccessary before for
group layers, but worked anyway until we changed
gimp_projection_get_buffer() to construct the buffer on idle time
initially in order to make images appear more responsively after
loading.
which removes a rectangle from the handler's dirty region, for cases
where the caller knows that the rectangle has been explicitly
constructed. Only needed by the gtk3-port branch.