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.
One possible way to decrease the incompatibilities
between letter spacing in a tagged gtk_text_buffer
and in an equivalent pango_layout
Remove also a valgrind reported invalid write in
gimptextbuffer.c
no matter how editing was started (double click, keyboard activate, F2).
Connect to "editing-started" of the name cell and set the object's
real name directly on the GtkCellEditable, instead of trying to hack
around in the tree store before the actual editing starts.
so all the view renderers already have the right context when the
parent interface code selects the right item, which in turn requires
the context to be already set on the renderers. Fixes warnings when
dragging dockables around.
Really find a *widget* in gimp_dialog_factory_find_widget(), don't
just return the first found session info's widget. It's perfectly fine
for a session info to have a NULL widget, if that dialog is not
currently open.
- move the code that sets the tool options' "defined" and "serialize"
properties from GimpToolInto to GimpToolOptions so they are always
set correctly.
- make GimpToolOptions fix broken serialized NULL tools automatically.
- make sure a GimpToolPreset's tool options always has a tool set. If all
fails, set a NULL tool explicitly and let the logic in GimpToolOptions
find the right tool.
- set GimpToolPreset's "use" booleans to FALSE for context properties
that have no effect on the tool.
- set GimpToolPresetEditor's toggle insensitive for these properties.
Because it's generally the right thing to do, and server grabs broke
badly with input devices / client side windows.
gimpdisplayshell-grab.c: change logic to only server-grab if an event
is passed to the pointer grab/ungrab functions, but always use
gtk_grab_add/remove() which is sufficient in most cases.
gimpdisplayshell-tool-events.c: have the grab functions grab the
server only for space-bar scrolling and do all tool interaction,
including ruler clicks, with gtk_grab_add/remove(). Refactor things
a bit to also use the grab API for button-2 scrolling.
gimpdeviceinfo-coords.c: transform the event's coords to the canvas'
coordinate system, they might come from a ruler now.
This fixes the following bugs:
Bug 645315 - gimp_display_shell_pointer_grab: gdk_pointer_grab failed...
Bug 644351 - Gimp misses some strokes especially when drawing fast
Bug 645747 - Gimp is now unusable on xfce4
Dragging a channel preview (not RGBA) over a layer preview
GIMP used to print:
Gimp-Core-CRITICAL **: gimp_container_get_child_index: ...
assertion `GIMP_IS_CONTAINER (container)' failed
but don't fix it for item trees yet (refactoring only). Kill the
"exclusive liked" function which only existed because it was so easy
to have, but was always utterly useless. Prove me wrong and I will
revive it.
Add new utility function gimp_get_all_modifiers_mask() which returns
all modifiers used for "useful" things on the current platform, like
in the commit below.
and remove them from the various public construct() functions. Had to
change construction in GimpDataFactoryView slightly because of GObject
construct property constraints.
by checking for gimp_get_toggle_behavior_mask() instead of
GDK_CONTROL_MASK. This is a total hack but happens to simply
do the right thing on all platforms.
and remove it from all other places. We only want to have the virtual
modifiers when displaying a modifier string (and in some other cases,
but these are all handled internally by GTK+).
- gimp_modifiers_to_channel_op() translates a modifier state to REPLACE,
ADD, SUBTRACT or INTERSECT.
- gimp_replace_virtual_modifiers() uses gdk_keymap_add_virtual_modifiers()
to replace the physical bits in a modifier state to their virtual
counterparts (and not just adds the virtual ones like the GDK
function).
Introduced two virtual functions to a GimpViewable
'set_expanded' and 'get_expanded'
and a PROP_GROUP_ITEM_FLAGS to load/save the expanded state
of layer_groups and use them.
Add an explicit search entry, so the treeview's automatic search
popup doesn't break our grab and closes the dialog in the middle
of setting up the serach popup.
instead of checking for event->button == 3, so context menus
work correctly on the Mac. Didn't change the image menu yet
because thet requires some more refactoring.
which is look at the right modifier when checking if a key event
can invoke an accelerator. Also get the mnemonic modifier from
GTK instead of hardcoding it, and don't check for it if mnemonics
are disabled, which is the right thing to do on all platforms.
Apparently wilber_get_extents is called the first time
with a cairo_t with device_offset different than the other
times, since the path is copied the first time, afterwards
it appears offset.
Make GimpToolbox and GimpToolPalette use the GimpUIManager and
GimpDialogFactory of the top container instead of holding references
on their own. If they hold references on their own, we need to update
these when we move e.g. GimpToolbox between different top level
containers such as GimpDockWindow and GimpImageWindow. Failure to do
this cased problems talked about in bug 646794 (case 2).