There is now a preference option that determines whether windows
should be opened on the same monitor as before. It should be disabled
when the machine gets monitors plugged/unplugged dynamically ("laptop")
and enabled when there is a static multi-monitor setup ("wokstation").
This is merely the current simplistic policy on top of the newly added
underlying infrastructure:
- pass integer monitor numbers around in all places where we already
pass around a GdkScreen. Pass the "current" monitor to these changed
APIs, where "current" is either the monitor where the action-triggering
widget is, or if that is unavailable the monitor where the mouse is.
- add gimp_widget_get_monitor() in order to easily get to the monitor,
just like gtk_widget_get_screen().
- add screen and monitor parameters in some places that were missed
before.
- in sessionrc, save all window positions relative to the window's
monitor, and save the monitor separately, if it's not the screen's
primary monitor.
- when restoring window positions, use the stored monitor when the new
prefs options says so (use the screen's primary monitor if there is
no stored monitor), otherwise use current monitor that is now passed
around.
which filters out some implementation details but mainly all the
tool-specific options actions which only exist as redirect targets for
the generic tool opaticy, size, aspect and angle actions. Use the new
function from the shortcut editor and from action search so stuff is
consistently hidden.
and parse the profile in gimpimageprofileview.c instead of calling the
lcms plug-in. Make the app link against lcms. This is WIP because the
widget is of course the wrong place for such profile parsing code.
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.
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.
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.
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.
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.
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.
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.
Improvements:
- setenv/getenv() are not thread-safe, hence they should be run only at
startup before any threading occurs.
- it is counter-productive to load the huge ISO-639 XML file each time
the user opens the Preferences dialog or the text tool options.
Some languages have no 2-letter ISO-639-1. This is the case in particular
for 3 languages we have translations for: ast (Asturian), csb (Kashubian)
and nds (Low German), which have only 3-letter ISO-639-2/3 codes.
They were not visible in the list of languages in the Preferences dialog
until now.
setenv() does not behave well on some systems, in particular OSX (and
probably some BSDs), when the set value is NULL. In this case, let's
unsetenv() the environment variable instead.
Make sure an indexed image always has a colormap. This was the case
before, except one could set a NULL colormap via the PDB.
Add gimp_image_unset_colormap(), and make gimp_image_set_colormap()
never set the colormap to NULL, even if NULL is passed. Change the
only places where actual unsetting makes sense to use unset().
Make some GUI places deal gracefully with palettes/colormaps with zero
entries.
Small fix for the last commit: set a silly small initial size request
on the wrap_box so it doesn't initially request too much and breaks
dock layout deserialization.
gimp_container_grid_view_viewport_resized(): set the wrap_box'
required width to just one cell_width, not cell_width * columns. This
way it can shrink also when attached to a toolbox dock. It remains
unclear why it could nicely shrink in all other dock columns.
Showing the current system locale between square brackets in the
"System Language" item was causing some issues on some systems (showing
some very weird and long value).
This was mostly a cosmetic change anyway with limited gain. Let's
just get rid of it. The main part of the feature (each language
displayed in itself) is still there.
glib's g_getenv() doc says: "The returned string may be overwritten by
the next call to g_getenv(), g_setenv() or g_unsetenv()". And I do
g_setenv() calls just after, while I wish to keep the value intact.
As a consequence, even though the previous commit seemed to work just fine,
I duplicate the return value of g_getenv(), just to be on the safe side.
The trick works by temporarily resetting the current locale to localize
each language label in its own lang.
One exception is English that is equivalent to the "C" code, and we make
also some special exception for Chinese where there are very different
variant depending on the region.
I also ensure the "System Language" string is translated in whatever
language is the system actually set to.
- 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.
which allows adjustment-based prop widgets to display the property
value multiplied by factor. Remove gimp_prop_opacity_spin_scale_new()
because that's simply a factor of 100.0.
so we can make histograms of the gamma-corrected image data. Pass
TRUE all over the place so the histogram works perceptually. This
needs more thinking...
If we add a chain button to link x/y or width/height properties, also
add a coordinate pick button for these properties. This looks totally
ugly and is broken for most cases where it happens, but it works
nicely for e.g. gegl:fractal-explorer or gegl:grid. This clearly needs
some metadata for operation properties to be useful.
which allows to display a value different from the original
adjustment's value.
This is sortof a hack but insanely useful to map normalized config
values to a nicer range (e.g. 0.0 -> 1.0 to 0 ->100).
...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.
gimp_overlay_child_size_allocate(): invalidate the old and new
position of the child, and simplify the code by calling our own
invalidate() function instead of duplicating its code.
gimp_overlay_child_expose(): process pending updates on the overlay
child's offscreen window before getting its pixmap.
...one image onto another
gimp_dock_window_display_changed(): make sure the "auto-follow-active"
logic works both ways: when the active image or display is changed in
a dockable, update the global context. Fixes multi-window mode.
gimp_context_real_set_display(): make sure a context's display and
image are always in a consistent state and never have a display that
is not display->image: when display is the same as context->display,
check that the context's image matches display->image, so that after a
gimp_context_set_display(), the context is consistent in all
cases. Fixes single-window mode.
Don't pass a NULL pointer to gimp_text_buffer_get_font_tag() because
it is dereferenced in a call to strcmp().
gimp_context_get_font_name() returns NULL when the selected text
includes spans with different fonts. Add the same special handling for
spans with inconsistent sizes too, and add comments that we should
have the same for the color.
Original patch from Massimo Valentini.
- reorder enum GimpCursorType to be in angular order
- add gimp_cursor_rotate(cursor_type, angle)
- rotate the shell's cursors automatically in the setter
We cannot simply randomy move the focus from e.g. a text entry back to
the canvas. Instead introduce global handling of "Escape" and a
"primary_focus_widget" that is always set the the image window's
active canvas. When Escape is pressed, move the focus to that primary
focus widget, or beep if it is already there. Text widgets still get
the key events before that logic and can consume the Escape.
Create all display filters with "color-config" and "color-managed"
parameters set, not only the automatically added color management
display filter. This way we don't only support removing and adding the
filter again, but also support potential other color management
modules.
Adds an icon-pixbuf property to GimpViewable that is used for a default
implementation of new_pixbuf.
Extend gimp_icon_picker to allow the user to pick non-stock icons for tool
presets (or any other class derived from GimpViewable). Icons can come
from any file GdkPixbuf can load or from image data on the clipboard.
gimp_docked_iface_get_aux_info(): always save the button bar state,
not only if it is "false" because we cannot know the default value any
longer (the button bar visibility used to always default to "true", so
saving only a non-default "false" was fine).
Set the dock window's geometry hints after the tool palette's style is
known, not after the toolbox' style is known, so we get the right tool
button dimensions for minimum size and size increments.
This was causing first a visual issue where the style editor UI would
show no default font/size/style at instanciation, but even a crash
when the user would change the font size or style (bold, italic...)
from this UI before selecting a font or writing a text.
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.
When font, size or color were changed, set the text buffer's current
insert_tags just as we already do for the bold, italic etc. toggle
buttons. Changed gimp_text_style_editor_list_tags() to also return
the tags for font, size or color.
Apply and heavily modify patch from remyDev which adds "lock position"
to GimpItem, similar to "lock content". Lock position disables all
sorts of translation and transform, from the GUI and the PDB.
Cleaned up some aspects of the lock content code as well because a
second instance of similar code always shows what went wrong the first
time.
Don't allow to assign Modifier+Space shortcuts, there is so much code
dealing with Space in canvas event handling, we can't have it invoke
arbitrary actions at the same time.
Ensure a minimum size of the drop area and make sure it stays visible
at the bottom of a minimized toolbox. This wastes a few pixels at the
bottom of a toolbox that contains no dockables.
Fix default export extension to be as specified:
1. last export of this image
2. imported extension
3. last export of any image
4. png
2 and 3 were reversed in the code.
In order the fix the obvious confusion, add another file filter which
contains all the types that are savable with the dialog, name it
either "All XCF images" or "All export images", and make it the
default filter.
Reduce the requested width of the "You can drop foo here" label to 16
pixels, which makes is look a bit crappy, but at least the toolbox
becomes shrinkable to < 3 columns. Whoever keeps this empty space
around without using it shall henceforth be punished by having to see
that distorted and misplaced label.
Closing the display filter editor with a filter selected
in the listview on the right, used to produce (quitting GIMP):
==32359== Invalid write of size 8
==32359== at 0x8808DF5: g_nullify_pointer (glib/glib/gutils.c:2099)
==32359== by 0x8358781: weak_refs_notify (glib/gobject/gobject.c:2469)
==32359== by 0x4C3730A: gimp_color_display_dispose (gimp-2-8/libgimpwidgets/gimpcolordisplay.c:197)
==32359== by 0x83596A7: g_object_unref (glib/gobject/gobject.c:2986)
==32359== by 0x4C37EFA: gimp_color_display_stack_dispose (gimp-2-8/libgimpwidgets/gimpcolordisplaystack.c:150)
==32359== by 0x83596A7: g_object_unref (glib/gobject/gobject.c:2986)
==32359== by 0x53F1C3: gimp_display_shell_filter_set (gimp-2-8/app/display/gimpdisplayshell-filter.c:58)
==32359== by 0x536A50: gimp_display_shell_dispose (gimp-2-8/app/display/gimpdisplayshell.c:765)
Remove the button_release handler again, setting dnd_widget to NULL on
container change is enough to fix the crash I've seen, I added the
other handler just out of paranoia and apparently didn't test it.
Add (too) simple heuristic that connects to subsequent numeric property
widgets with a chain button if their property names have the suffixes
"x" and "y", or "width" and "height".
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.
In fact, it broke much more than that because the way XCF loading
replaced the image's mask prevented the image's "mask-changed" signal
from ever being emitted. Add private API gimp_image_take_mask() which
properly sets the mask and use it for image construction and the XCF
selection loading hack.
Add gimp_tag_has_prefix() and use it in GimpTagEntry when completing
patrially entered tag names, and fix two uses of strcmp() in
GimpTagPopup to use gimp_tag_compare_with_string().
Fix the places that passed the color by either temp_buf_data_clear()
or memset(), and assign x and y manually, they are going to vanish
completely soon.
The default value is 1.0 which is linear and the old behavior, values above
1.0 gives finer control in the lower portions of the range, the lower half of
the widget behaves like before doing small relative adjustments.
because it would require really evil hacks to honor these properties
in the gegl projection if they were on the mask, and because they
actually belong to the layer.
reset the "time" property after applying the stored setting, otherwise
explicitly storing the config as setting will also copy the time, and
the stored object will be considered to be among the automatically
stored recently used settings
Conditional jump or move depends on uninitialised value(s)
==29000== at 0x4C33CBC: gimp_color_area_set_color (gimp/libgimpwidgets/gimpcolorarea.c:425)
==29000== by 0x4C3505B: gimp_color_button_set_color (gimp/libgimpwidgets/gimpcolorbutton.c:642)
==29000== by 0x5DA5BE: gimp_text_style_editor_set_color (gimp/app/widgets/gimptextstyleeditor.c:700)
==29000== by 0x5DB0D4: gimp_text_style_editor_update_idle (gimp/app/widgets/gimptextstyleeditor.c:1090)
==29000== by 0x57E9E95: gdk_threads_dispatch (gtk-2-24/gdk/gdk.c:512)
Steps to reproduce:
<Ctrl>N <Enter> T
click on canvas
type something
select the text entered and change its color using
the color button from the text style editor
Conditional jump or move depends on uninitialised value(s)
==28871== at 0x4A09863: bcmp (/builddir/build/BUILD/valgrind-3.6.1/memcheck/mc_replace_strmem.c:692)
==28871== by 0x4C487C7: gimp_int_store_row_inserted (gimp/libgimpwidgets/gimpintstore.c:220)
==28871== by 0x8342B03: g_closure_invoke (glib/gobject/gclosure.c:774)
==28871== by 0x8353129: signal_emit_unlocked_R (glib/gobject/gsignal.c:3232)
==28871== by 0x835A72A: g_signal_emit_valist (glib/gobject/gsignal.c:3033)
==28871== by 0x835A8F1: g_signal_emit (glib/gobject/gsignal.c:3090)
==28871== by 0x529EF63: gtk_list_store_insert (gtk-2-24/gtk/gtkliststore.c:1039)
==28871== by 0x5CEB6B: gimp_stroke_editor_constructed (gimp/app/widgets/gimpstrokeeditor.c:229)
==28871== by 0x8348222: g_object_newv (glib/gobject/gobject.c:1731)
==28871== by 0x8348565: g_object_new_valist (glib/gobject/gobject.c:1820)
==28871== by 0x8348873: g_object_new (glib/gobject/gobject.c:1535)
==28871== by 0x5CEE74: gimp_stroke_editor_new (gimp/app/widgets/gimpstrokeeditor.c:320)
==28871== by 0x4C3842: stroke_dialog_new (gimp/app/dialogs/stroke-dialog.c:176)
==28871== by 0x4A3B5C: select_stroke_cmd_callback (gimp/app/actions/select-commands.c:349)
Steps to reproduce:
On a 64 bits machine run gimp-2.7
<Ctrl>N <Enter> <Ctrl>A
and activate <Edit>/Stroke Selection... (<Alt>E S)
- make it respect RTL mode better, something is still weird though
- don't fiddle with the entry's inner_border
- place label and number on the same line
- adjust size_request to respect the label's requisition
- set the label to ellipsize
Instead, either destroy the child instead of removing it, or remove
*and* destroy it in cases where the remove() api on the "parent"
doesn't match GTK+'s parent/child relation (like with all our dock
widgets). We can't rely on remove() to implicitly detstroy, because
there might be arbitrary other code holding references, such as
accessibility modules and whatnot. Most likely fixes unclear crashes
in accessibility code and other crashes we blamed GTK+ for.