Commit graph

4150 commits

Author SHA1 Message Date
Michael Natterer
a1cd4144df Bug 704118 - crash on invalid number of PLTE entries
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.

(cherry picked from commit 37372555e5)
2013-07-14 22:33:52 +02:00
Michael Natterer
3632680049 Bug 703692 - Unable to Resize Large Left Dock Area
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.

(cherry picked from commit a2334b0b15)
2013-07-14 13:30:53 +02:00
Michael Natterer
38ab5f9d64 Bug 703692 - Unable to Resize Large Left Dock Area
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.

(cherry picked from commit 6a5e37b68d)
2013-07-13 18:53:59 +02:00
Michael Natterer
bd91caf778 app: port GimpImagePropView's file size querying to GIO 2013-06-25 19:18:25 +02:00
Michael Natterer
7ee3235bd0 Bug 688537 - Toolbox occasionally has spaces or tool names after the icons
Explicitly set the toolbox' style to GTK_TOOLBAR_ICONS to protect it
from user toolbar preferences.
(cherry picked from commit e1bfc0a362)
2013-05-17 14:43:56 +02:00
Michael Natterer
7b42013bae Bug 695687 - GimpSpinScale's label is unreadable on dark themes
Draw the label like GtkEntry draws its text: with different colors
inside and outside the progress bar.
(cherry picked from commit ce8ae69440)
2013-05-14 02:02:30 +02:00
Jehan
e083b6790d Revert "app: GimpContainerEntry's text is red when not a valid item."
Somehow breaks the completion popup.

This reverts commit 202c8ed762.
2013-04-29 22:17:18 +09:00
Jehan
202c8ed762 app: GimpContainerEntry's text is red when not a valid item.
If the selected item in a GimpContainerEntry is invalid, or else when the entry
is being updated, the text shows in red.
(cherry picked from commit 64fe3af1a9)
2013-04-29 08:48:29 +09:00
Michael Natterer
9069bd8d79 Bug 688348 - Layer tab and Images tab: not updated on dropping...
...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.
(cherry picked from commit bacc9c9635)
2013-04-23 21:09:40 +02:00
Michael Natterer
4cd97c8cf7 app: make gimp_dock_window_constructed() more readable
by adding a local "factory_context" variable instead of calling
gimp_dialog_factory_get_context (dock_window->p->dialog_factory)
multiple times.
(cherry picked from commit 076f375e78)

This is not a bugfix, just to seamlessly pick the next commit...
2013-04-23 21:09:04 +02:00
Michael Natterer
380437e65e app: make GimpContainerEntry robust against reordered parent class destruction
So it will not warn on GTK+ 3.x. One less patch to do in gtk3-port.
(cherry picked from commit e746fa51da)
2013-04-21 21:49:50 +02:00
Massimo Valentini
ca52016116 Bug 698426: ALL text disappears when changing font ...
of selected text in on-canvas editor

It is necessary to escape font names containing '&'
2013-04-21 17:59:53 +02:00
Michael Natterer
839734463a Bug 694417 - GIMP Segmentation Faults (Segfault, Crash) after Changing Color...
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.
(cherry picked from commit 804313bbec)
2013-04-21 17:54:32 +02:00
Nils Philippsen
37757e4e8d app: let the tag popup own its tag objects
This should fix crashes in which tag objects got accessed after they
were disposed, because they still were stored with the popup object.
(cherry picked from commit b109e05806)
2013-04-16 11:36:57 +02:00
Michael Natterer
3aaa69642e app: allow to pass NULL to gimp_window_set_primary_focus_widget()
(cherry picked from commit 754e4eb919)
2013-04-10 19:31:10 +02:00
Michael Natterer
53d083c844 Bug 675549 - image region does not have focus unless clicked on
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.
(cherry picked from commit 5880685472)
2013-04-09 15:48:12 +02:00
Michael Natterer
15c5a9db32 Bug 696240 - Changing Gradient From Script-Fu Drop Down Causes GIMP to Crash
gimp_gradient_select_run_callback(): Don't free the color values array
twice.
(cherry picked from commit ed2849cd52)
2013-03-21 01:52:24 +01:00
Michael Natterer
1bc8d4eb9d app: GimpBrushEditor: fix display of spacing for normal brushes
it was doing *all* the UI settings only for generated brushes.
(cherry picked from commit b941986bbb)
2013-03-14 22:54:34 +01:00
Michael Natterer
32e80d3263 app: fixed paned packing in GimpDeviceEditor
so the widgets don't become smaller than their requisition.
(cherry picked from commit d837a6d7df)
2013-03-13 22:08:07 +01:00
Michael Natterer
de8830ed4b Bug 397359 - Can't access color management parameters
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.
(cherry picked from commit bc190a6bab)
2013-03-13 10:40:57 +01:00
Michael Natterer
872c9c1680 Bug 694026 - "Button Bar" state not retained on brushes and dynamics editor
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).
(cherry picked from commit 6f5b4ad1f4)
2013-02-17 16:50:18 +01:00
Michael Natterer
6dcd7c425e Bug 686929 - Newly created toolbox is too tall and too narrow
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.
(cherry picked from commit 7e273bc6d0)
2013-01-17 19:39:47 +01:00
Michael Henning
5bd861330f app: fix memory leak in widgets/gimpgradientselect.c
Found using clang's scan-build.
(cherry picked from commit 42c74722e1f610579e53711706b8fbefc439a058)
2013-01-10 17:21:25 -05:00
Michael Natterer
67cb43963e Bug 689087 - Drag-and-drop foo.jpg behaves different from 'gimp foo.jpg'...
Prefer text/uri-list over image/* to make dropping from file managers
always behave like opening the image directly.
(cherry picked from commit 454639f9d9)
2013-01-09 00:33:32 +01:00
Jehan
a2772a721f Bug 689523: data bootstrap initial values in the text style editor at construction.
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.
2012-12-12 12:37:22 +09:00
Jehan
c6b81f2f4e 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-28 00:01:25 +09:00
Michael Natterer
67a1f9e40c Bug 688715 - Unconfigured eraser should be set to eraser tool
I don't know what I tested before, but it didn't work. This patch does
the magic in two places, one of which I missed.
(cherry picked from commit 4e340b613b)
2012-11-23 01:23:25 +01:00
Michael Natterer
54ae57f290 Bug 688715 - Unconfigured eraser should be set to eraser tool
If a device has no saved settings, and it is a GDK_SOURCE_ERASER, set
it to the eraser tool.
(cherry picked from commit 512fbcbbb2)
2012-11-22 23:45:52 +01:00
Michael Natterer
43a1daa5e1 Bug 688305 - drag and drop for guides broken if 'gtk-enable-tooltips = 0' is set
Fix GimpSpinScale too: add the needed events ourselves, and handle
motion hints (which the parent classes add) in motion().
(cherry picked from commit 85a099f988)
2012-11-18 20:05:48 +01:00
Michael Natterer
f63e5671ae Bug 676940 - Group children prevent droping layer at bottom of stack
...and don't forget to return the drop_path from
gimp_container_tree_view_drop_status().
(cherry picked from commit 3ef2baea67)
2012-11-12 01:31:28 +01:00
Michael Natterer
982d08492f Bug 676940 - Group children prevent droping layer at bottom of stack
Treat dropping on the empty space at the bottom like dropping after
the last toplevel item.
(cherry picked from commit 05e12b88bc)
2012-11-12 01:26:39 +01:00
Michael Natterer
acc610ec8a app: remove redundant code from the last commit
(cherry picked from commit f71afd245f)
2012-11-10 00:09:37 +01:00
Michael Natterer
50c1e2d872 Bug 683011 - Text tool discards text attributes in the on-canvas dialog...
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.
(cherry picked from commit abd2e78bdf)
2012-11-09 23:29:59 +01:00
Michael Natterer
6ed49d3997 Bug 687256 - Please explain the terms wheel, curve, axis
Add translator comments to GimpDeviceInfoEditor.
(cherry picked from commit 90608d3a22)
2012-10-31 21:15:59 +01:00
Michael Natterer
a8f96a5e3a app: add a translator comment for _("%s Message")
(cherry picked from commit 9efda84818)
2012-10-31 16:08:43 +01:00
Michael Natterer
4187c415fb Bug 687070 - Modifier+Space doesn't work as shortcut
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.
(cherry picked from commit 99dfc5930f)
2012-10-28 23:36:31 +01:00
Michael Natterer
cb8cd73f33 Bug 635303 - Can't attach a dialog at the bottom of a minimized toolbox
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.
(cherry picked from commit 74bc070147)
2012-10-07 19:51:44 +02:00
Michael Natterer
7deac97a9a Bug 684945 - Export can incorrectly default to changing format...
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.
(cherry picked from commit aa6151d1af)
2012-10-02 23:09:57 +02:00
Michael Natterer
0e2bce2b82 app: make handling of coordinates more robust against broken input drivers
Initialize the axes[] array with zeros and change pressure curve
mapping to not try to "interpolate" shit like NaN and crash.
(cherry picked from commit c7b9728cc8)
2012-09-05 11:37:47 +02:00
Michael Natterer
b142ec6a35 Bug 681699 - Inapplicable files are listed with 'All images' filter...
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.
(cherry picked from commit 14f6d5ee44)
2012-09-02 23:25:43 +02:00
Michael Natterer
3445d5f214 Bug 669795 - Toolbox can't be shrinked to 1 or 2 columns
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.
(cherry picked from commit 573faa39b0)
2012-07-30 18:08:28 +02:00
Michael Henning
7fd0895c0c Bug 680795 - GIMP segfaults in gimp_clipboard_set_buffer when...
Fix segfault in gimp_clipboard_set_buffer when n_target_entries is 0.
(cherry picked from commit e060da8278)
2012-07-30 16:58:25 +02:00
Michael Natterer
cab6d84867 Bug 677987 - Don't allow to assign keybindings with arrow keys...
Disable assigning arrow-key bindings in gimpactionview.c
(cherry picked from commit decc03ae04)
2012-07-26 18:34:51 +02:00
Michael Natterer
310a8c4458 app: get the help_id from the right action in gimp_editor_add_action_button()
(cherry picked from commit 4fbf01baef)
2012-06-12 22:52:24 +02:00
Michael Natterer
687fbf4583 Bug 677823 - Shift + mouse click to link all layers does not work
This got lost during layer group porting, reimplement it, but restrict
"all layers" to the clicked layer's branch in the tree.
(cherry picked from commit 67b5a509b6)
2012-06-12 21:41:39 +02:00
Massimo Valentini
c3bf36f3d6 app: remove a weak ptr when the object lives longer than the ptr
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)
2012-06-04 19:32:41 +02:00
Michael Natterer
4437b90b63 Bug 676821 - No drag layers in "window layers", after commit...
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.
(cherry picked from commit 92a3944442)
2012-05-25 21:27:50 +02:00
Michael Natterer
e2ad99b98e app: set GimpContainerTreeView->dnd_renderer to NULL more reliably
specifically in button_release() and when the container changes, we
can badly crash in some situations otherwise.
(cherry picked from commit 27a767ee54)
2012-05-22 13:02:33 +02:00
Michael Natterer
6899757b09 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.
(cherry picked from commit 39c18e9a48)
2012-05-18 18:59:10 +02:00
Michael Natterer
1e402a46f0 Bug 675994 - Opening image with a saved selection breaks histogram updating
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.
(cherry picked from commit ab4c613a70)
2012-05-14 01:47:14 +02:00