Commit graph

3638 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
Massimo Valentini
cc836e7c84 Bug 703806: GIMP crashes when scaling an image
during an image rescale, while spinning the main-loop,
layer-groups preview generation used to start before their
layers were fully rescaled, so it tried to access tiles that
were not yet there
(cherry picked from commit 3cc923d5a5)
2013-07-09 19:46:09 +02:00
Michael Natterer
dd9f57f8de Bug 701335 - Gimp crashing on creating huge clipboard brush
Change the maximum size of clipboard patterns and brushes to 1024x1024.
2013-06-21 12:43:29 +02:00
Massimo Valentini
ba98aedcb1 Bug 680290: -90 degree rotation distortion of layer
The previous code did not consider that a transformation
described by a matrix with non integer values in the 3rd
column or by a non affine matrix requires interpolation

and make floating point arithmetic rounding errors
consistent with INTERPOLATION_NONE
2013-06-01 17:07:24 +02:00
Michael Natterer
dd8aeeec92 Bug 700215 - Gradient name changes do not persist across sessions...
if the gradient itself isn't changed.

GimpData: implement GimpObject::name_changed() and set the "dirty"
flag to TRUE. Don't set dirty in GimpData::dirty()'s default impl
because that calls gimp_object_name_changed() anyway.
(cherry picked from commit 5280a02ed8)
2013-05-29 22:30:40 +02:00
Michael Natterer
a57ad1a997 Bug 700707 - Missing time data in tool-options/*.settings files
strftime() the time using %H:%M:%S which should work on
all platforms, unlike %T.
(cherry picked from commit 51181648f7)
2013-05-25 11:22:59 +02: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 Henning
4055ccbe9c app: fix broken build on windows due to not #including windows.h
This was broken after 7392679be9
The corresponding commit on master did not break the build because
windows.h is already included there.
2013-04-20 22:19:12 -04:00
Petr Kubiznak
7392679be9 Bug 593167 - Support Windows in gimp_get_default_unit()
Function gimp_get_default_unit ported for Windows using standard GetLocaleInfo() function (from windows.h).
(cherry picked from commit 194ef70d74)
2013-03-30 10:22:07 -04:00
Michael Natterer
c1502c6ff7 Bug 692668 - Browse For Patterns
Increase the max size of the clipboard brush and pattern to 2048x2048
pixels. Still arbitrary but much better.
(cherry picked from commit 8bc4f008e7)
2013-03-26 23:58:22 +01:00
Michael Natterer
2893b1199c Bug 695980 - Dereferencing type-punned pointer compile warning
Use local variables to avoid type-punned pointer warning.
2013-03-23 00:04:51 +01:00
Téo Mazars
1ecf12950b Bug 674622 - Misalignment in scaling layers of different sizes
Again bad use of ROUND() on signed values...
(cherry picked from commit d1cd90c170)
2013-02-13 20:02:52 +01:00
Michael Natterer
6a39d21494 Bug 689523 - GIMP crashes (segfault) when loading a context with a font...
Make gimp_context_get|set_font_name() actually deal with
context->font_name, so the context can do its job of keeping the name
of an unavailable object around.
(cherry picked from commit c262fee244)
2013-01-18 01:05:01 +01:00
Nils Philippsen
67753516b7 fix copy-paste error
(cherry picked from commit fc625feb40)
2013-01-09 15:38:56 +01:00
Massimo Valentini
9d74224731 Bug 433436: transformation tools cause offsets 2012-10-13 15:02:04 +02:00
Michael Natterer
2cd165a8b8 Bug 682742 - Module manager: turning off modules has no effect
Use gimp_config_writer_string() instead of gimp_config_writer_printf()
to serialize module-load-inhibit so backslashes and other stuff gets
properly escaped.
(cherry picked from commit 6c41f58fea)
2012-10-09 01:28:04 +02:00
Michael Natterer
027c744227 Bug 684698 - Preferences-Folders: only 15 folder items accepted
Raise "max_paths" from 16 to 256 in all calls to gimp_path_parse().
(cherry picked from commit 2a30a2bb74)
2012-09-26 23:31:48 +02:00
Michael Natterer
0d879c2aae app: plug string leak in gimp_image_format_display_uri()
(cherry picked from commit 7597b83bd8)
2012-09-21 10:35:22 +02:00
Michael Natterer
d4ebc9562d app: add a workaround to make GimpModuleDB's "verbose" flag work
so we get module output from gimp --verbose.
(cherry picked from commit 4db6a970de)
2012-09-08 12:50:41 +02:00
Michael Natterer
f3a4200e72 Bug 683462 - cropping with rectangular select tool leaves misaligned...
Reset the tool on image changes again, but not if only the active
drawable changes, so keep bug #678890 closed:

Introduce new dirty flag GIMP_DIRTY_ACTIVE_DRAWABLE and set it on all
tools' dirty_mask except for rect select. Check the new flag when
reseting the active tool because of a drawable change.
(cherry picked from commit e546f2b43b)
2012-09-07 00:00:24 +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
24130eec55 Bug 681799 - Canvas size doesn't show preview after canceling once
gimp_viewable_get_pixbuf(): if there is a cached pixbuf of the right
size, actually return it, instead of the local "pixbuf" variable which
is always NULL.
(cherry picked from commit 276b507285)
2012-08-14 09:30:21 +02:00
Michael Natterer
92f348a96c app: improve error message when failing to load an ABR version 6 brush
(cherry picked from commit 47c94fc228)
2012-08-04 00:06:34 +02:00
Michael Natterer
64b1ade7b0 Bug 586462 - Layer inserts misplaced
Another attempt to fix paste/drop positions for good.

Paste/drop target is either the selected area of a drawable, the
drawable itself, or the image:

- if the paste is larger than the target, center on the target
- if there is a viewport, and the viewport intersects with the
  target, center on the intersection
- otherwise, center on the target

Finally, if we did viewport-centered pasting, make sure the paste is
as completely within image bounds as possible.
(cherry picked from commit eda6fa1c14)
2012-07-30 16:28:25 +02:00
Michael Natterer
f4ce57aa97 Bug 676566 - Window title becomes "Untitled" after exporting without saving
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.

(cherry picked from commit 220b28677b)
2012-07-17 22:59:09 +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
Michael Natterer
be2feeb111 Bug 676164 - Text Tool selects hidden layers
Also fix the other layer picking functions to not pick invisible
layers.
(cherry picked from commit b50e924df0)
2012-05-17 00:18:44 +02:00
Michael Natterer
8d6004e063 Bug 676107 - Picking logic doesn't take group visibility into account
gimp_layer_get_opacity_at(): use gimp_item_is_visible() not
get_visible() so we use the layer's effective visibility.
(cherry picked from commit 4d1173570a)
2012-05-15 19:48:56 +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
Michael Natterer
46127dc789 Move gimpdir and thumbnails to proper places on OSX
gimpdir goes to ~/Library/Gimp/x.y
thumbnails go to ~/Library/Caches/org.freedesktop.thumbnails

The thumbnail location is not standardized yet, but is the only
location that makes sense. Also fix user install to search old
gimpdirs to migrate in both Library and the classic location.
Remove the obsolete CABON_CFLAGS from all makefiles.
(cherry picked from commit 9112d68488)
2012-05-12 14:44:08 +02:00
Michael Natterer
32a0c6355e app: fix UI tag matching to always work case-insensitively
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().
(cherry picked from commit 30b4fe8510)
2012-05-05 19:00:32 +02:00
Michael Natterer
e1dcba190e app: don't leak one TempBuf per blurred brush mask/pixmap 2012-04-04 11:35:59 +02:00
Michael Natterer
b262c93048 app: create an own GimpOperationBrightnessContrast
and use it instead of gegl:brightness-contrast because the GEGL op is
giving different reaults.
2012-03-13 15:02:17 +01:00
Ville Sokk
082d758a34 Bug 558795 - Using same quick mask color across sessions
Add configuration option for quick mask color.
2012-03-03 02:45:10 +01:00
Michael Natterer
8ea6d3a94f app: when scaling, use the proper image api to move guides and sample points
so the image's "foo-moved" signals are emitted and the display can
follow. Moving them around manually was needed before the displayed
guides and sample points were proper views of the resp. core objects.
2012-02-24 00:31:27 +01:00
Mikael Magnusson
5c19c75f71 app: fix typo in error message 2012-02-16 11:25:23 +01:00
Michael Natterer
7f5a43f3e1 app: rename GimpToolInfo::menu_path to ::menu_label
"path" is a really ancient pre-GtkAction terminology here.
2012-02-14 10:00:26 +01:00
Michael Natterer
ddb1f968b5 app: fix include guards in gimpbrush-transform.h to not use the old filename 2012-02-12 18:41:52 +01:00
Nils Philippsen
4ec7def1d0 put operators on end of line in long expressions
This fixes commit 3a151bd1a9, GIMP is
deviating from the GNU coding style here.
2012-02-11 16:50:44 +01:00
Nils Philippsen
3a151bd1a9 app: check top_directory for plausibility 2012-02-10 16:20:15 +01:00
Massimo Valentini
2303d292c3 app: initialize var before usage
to silence valgrind

==12105== Conditional jump or move depends on uninitialised value(s)
==12105==    at 0x6B069C: gimp_data_set_folder_tags (gimp/app/core/gimpdata.c:885)
==12105==    by 0x6B155E: gimp_data_factory_load_data (gimp/app/core/gimpdatafactory.c:922)
==12105==    by 0x64F34D0: gimp_datafiles_read_directories (gimp/libgimpbase/gimpdatafiles.c:155)
==12105==    by 0x6B1293: gimp_data_factory_data_load (gimp/app/core/gimpdatafactory.c:354)
==12105==    by 0x6B1E1C: gimp_data_factory_data_init (gimp/app/core/gimpdatafactory.c:239)
==12105==    by 0x6871D2: gimp_restore (gimp/app/core/gimp.c:952)
==12105==    by 0x47EABA: app_run (gimp/app/app.c:217)
==12105==    by 0x47E64D: main (gimp/app/main.c:440)
==12105==  Uninitialised value was created by a stack allocation
==12105==    at 0x6B1190: gimp_data_factory_data_load (gimp/app/core/gimpdatafactory.c:319)
2012-02-10 12:24:32 +01:00
Michael Natterer
0729c25bc0 app: set tags for all subdirectories a data file lives in
GimpData: add gimp_data_set_folder_tags() and remove the tag logic
from gimp_data_set_filename(). The function gets the toplevel data
directory passed so it knows where to stop assigning tags.

GimpDataFactory: when loading data, keep track of the currently
processed data hierachy's toplevel directory, and pass it to above new
function. Also make sure obsolete files don't get folder-tagged.
2012-02-09 10:02:49 +01:00
Michael Natterer
2414301799 Review the last few commits and apply some style fanaticism
some completely unrelated,
2012-02-07 20:36:55 +01:00
Massimo Valentini
39368a410d plugged memory leaks 2012-02-07 17:32:02 +01:00
Alexia Death
f7554c299e app: use deletable flag for sorting user data above system data
Previously flag writable was used. This caused ritable and editable
brushes to sort first. This was not clearly understood criteria.
Now user brushes in writable folders are sorted first.
2012-02-01 21:05:16 +02:00
Michael Natterer
569b262e2d app: various tool options and tool preset fixes
- 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.
2012-01-23 22:40:49 +01:00
Alexia Death
4fe9955b3e app: fix some brushes not going small enough correctly
That limit may need to be removed completely some day...
2012-01-20 21:12:19 +02:00
Michael Natterer
23ed56d75d app: gimp_data_factory_load_data(): fix handling of obsolete and writable
Make sure obsolete files are immutable, and propagate a folder's
"writable" state into its subfolders. Also clean up the function's
control flow to not fry the reader's brain.
2012-01-14 20:54:35 +01:00
Alexia Death
63c0db45ae app: For generated brushes scale is applied to radius, so divide by 2 2012-01-08 13:45:09 +02:00
Michael Natterer
056e09a6cb Remove the makefile.msc build system, it is unmaintained since 2008 2011-12-16 15:53:56 +01:00