Commit Graph

16924 Commits

Author SHA1 Message Date
Jehan 6af7f47238 Bug 724338: free the GimpImageFile's icon when its contents is updated.
The main consequence was that file icons were stuck to the first
filetype's icon selected in file dialogs.
2014-02-17 12:49:29 +13:00
Michael Natterer 16938bb667 Bug 676522 - Make DND work between images in *one* dockable...
...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.
2014-02-15 21:29:36 +01:00
Jehan 6208d21979 Bug 622758 - Fix error display for thumbnail creation
Do not stay forever in "Creating Preview..." state during
auto-thumbnailing, and fix error showing when creation fails.
2014-02-14 15:08:45 +13:00
Michael Natterer 3e618320d3 Bug 724295 - multiple svg gradients in a single file not listed correctly
Clear the parsed lis of stops after each gradient, or they will all
look the same.
2014-02-13 22:06:12 +01:00
Daniel Sabo a059c0e7eb app: Fix on canvas widgets ignoring clicks from tablets - bug 614441
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.
2014-02-10 22:28:08 +01:00
Michael Natterer aabd64e070 Bug 722400 - GIMP segfaults when trying to save a modified, newly created image
If for whatever reason making an uri from the documents folder fails,
return the uri of the home directory.
2014-02-08 10:18:29 +01:00
Michael Natterer 0cc292693d Bug 723649 - Increase/Decrease brush size relative actions don't work
The actions have accidentially been added to the group that changes
the brush's angle not its size.
2014-02-07 21:18:26 +01:00
Michael Natterer 4d6640ff79 Bug 721249 - pdb.gimp_context_set_brush_size() dont't work
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.
2014-02-06 23:26:53 +01:00
Michael Natterer b13c68fda6 Bug 701159 - Wrong name in transform tool dialogs...
...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.
2014-02-05 00:57:28 +01:00
Michael Natterer 1335bc42c8 app: halt the transform tool when switching layer|selection|path transform 2014-02-04 23:28:59 +01:00
Michael Natterer 651be184b7 Bug 721066 - There is a 2nd, broken, "GEGL Operation" tool in the toolbox
Make the operation tool invisible by default.
2014-02-04 00:19:30 +01:00
Michael Natterer 9fe869236b Bug 721249 - pdb.gimp_context_set_brush_size() dont't work
Don't reset the brush size before each PDB paint stroke.
2014-02-03 23:05:56 +01:00
Michael Natterer 7385e030dd app, libgimp: add increment parameters to gimp_prop_widget_set_factor()
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.
2014-02-03 22:57:51 +01:00
Michael Natterer 55b299f63d app: tiny formatting fix in drawable-actions.c 2014-02-03 22:33:16 +01:00
Daniel Sabo db52f88308 app: Set Gimp specific TileHandler properties
Remove a dependency on GEGL setting Gimp specific properties
on custom tile handlers.
2014-02-02 02:12:02 -08:00
Michael Natterer fcecafa479 Bug 723213 - colors/levels/auto is broken for high bitdepth images
Port gimp_levels_config_stretch_channel() to histograms with
variable number of bins. Still behaves differently for different
bit depths tho.
2014-01-30 00:19:37 +01:00
Michael Natterer 5054241ca6 Bug 722034 - Incorrect snapping behaviour for scale tool
Always snap to the center of transform tool handles.
2014-01-29 23:40:35 +01:00
Michael Natterer 7fca15c27d Bug 722975 - crash when removing tag from palette while filtering by same tag
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.
2014-01-26 21:03:28 +01:00
Michael Natterer a96a0d0bed pdb: add translation context to the newly added PDB functions 2014-01-13 01:27:37 +01:00
Michael Natterer b4462e9e19 app,libgimp,pdb: add a "drawable_color" PDB group
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.
2014-01-12 23:12:21 +01:00
Daniel Sabo afc40ffda0 Add automake 1.13+ test outputs to .gitignore 2014-01-10 15:31:34 -08:00
João S. O. Bueno 8c14f3822a Adds generated files after hue-saturation-overlap call. Addresses #634008 2014-01-08 20:20:05 -02:00
Michael Natterer 84c132addc Bug 721553 - License text contains obsolete FSF postal address
These files were forgotten when changing license from GPL2 to GPL3.
2014-01-05 14:25:46 +01:00
Michael Natterer ef85845372 app: add gimp_paint_options_set_default_brush_size()
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.
2014-01-04 15:48:34 +01:00
Michael Natterer 2ea1c6e9a1 plug-ins, pdb: remove the apply-canvas plug-in and add a compat procedure 2014-01-01 19:21:00 +01:00
Michael Natterer ca938c1275 app: add gegl:texturize-canvas to the menus as "Apply Canvas" 2014-01-01 19:07:48 +01:00
Michael Natterer 254b86d4fa Bug 721215 - Preprocessor string concatenation and translation...
...don't work together

gimp_config_file_copy(): build the error format string separately and
in a way that is parsable by xgettext.
2014-01-01 16:32:27 +01:00
Michael Natterer 262d312dfc app: make GimpCurveView's cursor label look pretty for 0..100 ranges
and generally clean up the cursor label code a bit.
2013-12-26 16:33:59 +01:00
Elle Stone f79bff0719 Increase Levels, Curves increments to 10000.
1000 increments is not enough for just barely noticeable
shadow adjustments in linear gamma color spaces.
2013-12-26 15:41:02 +01:00
Shlomi Fish e4260434b6 app: Fix compiliation if gexiv2/gexiv2.h is not in the default include path. 2013-12-24 11:46:16 -05:00
Michael Natterer 81c02e7db1 Bug 720492 - Letter spacing in Text Tool not reset to default
Also reset the "letter-spacing" property in gimp_text_options_reset().
2013-12-20 13:11:53 +01:00
Daniel Sabo dca3559f13 app: Allow painting in Foreground Select's preview mode 2013-12-14 02:49:00 -08:00
Jehan 2707cff890 app: update a comment for translators.
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.
2013-12-14 10:26:55 +13:00
Daniel Sabo e9d3bf8f19 Improve Foreground Select tool's GUI
* 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.
2013-12-13 12:20:19 -08:00
Jehan 735f00b886 Bug 679214 - widget direction set to system locale, not user-set lang
In particular a RTL-localized OS, where the user sets GIMP to a LTR lang
would still have a RTL UI (menus, etc.). And vice versa.
2013-12-11 13:14:09 +13:00
Michael Natterer 00cd9b4e47 app: add some CPPFLAGS in core/Makefile.am to fix the build on OSX 2013-12-11 00:41:24 +01:00
Jehan 8707701bee Bug 720163 - Typo fix for a console gimp-error message
s/configuation/configuration/
2013-12-10 14:48:08 +13:00
Simone Karin Lehmann 513ef7fd5d Use 'About GIMP' in help menu on OS X+Win, correct German translation
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.
2013-12-09 21:17:29 +01:00
Elle Stone a4821914d3 Bug 720045 - Add black point compensation to Preferences/Color Management
Make black point compensation configurable separately for both proof
and display.
2013-12-09 02:23:31 +01:00
Michael Natterer 6a02f4a19e app: fix formatting in gimpselection.c 2013-12-08 23:43:47 +01:00
Jehan 7ef45be890 app: handle migration on OSX of GIMP 2.8.2's config folder.
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.
2013-12-05 11:48:20 +13:00
Daniel Sabo 845139f910 gegl-tool: Blacklist "display" ops by category 2013-12-03 09:43:00 -08:00
Jehan 4e7bfb4e81 app: a bunch of actions which should be inactive when there is no image 2013-12-03 13:23:31 +13:00
Michael Natterer 0e1978d273 Bug 719634 - Palette editor not working for New Palettes (cannot drop colors)
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.
2013-12-01 18:04:51 +01:00
Téo Mazars 9e429993c7 app: add gegl:wind to Filters -> Distorts 2013-12-01 12:57:15 +01:00
Michael Henning 95becc7615 Bug 719593 - On clang, brush outline is not displayed
Don't access path_data->len after path_data has been freed.
2013-11-30 16:34:37 -05:00
Michael Natterer 6c73f28b6d Bug 719560 - Build failure with freetype 2.5.1
Apply patch from su-v that fixes the freetype include to
the madness devised and recommended by freetype.
2013-11-29 21:57:46 +01:00
Michael Natterer 2eb74becb8 app: add G_GNUC_PRINTF() to places where the args are a va_list
The trick is to use G_GNUC_PRINTF (n, 0).
2013-11-29 00:33:05 +01:00
Massimo Valentini b81641e25f app: fix two typos 2013-11-28 19:44:45 +01:00
Nils Philippsen 2e6af22686 initialize length to appease cppcheck
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.
2013-11-28 17:43:14 +01:00
Michael Natterer 174dee3427 Bug 525705 - skip thumbnailing entirely on files with insufficient...
...read permissions

Apply modified patch from Sven Neumann which implements just that.
2013-11-23 18:05:55 +01:00
Michael Natterer 527d81a181 Bug 701168 - Select | Shrink: A better label for "Shrink from image border"
Change the weird button labels in the shrink and border dialogs to
"Selected areas continue outside the image" and add tooltips.
2013-11-22 22:00:08 +01:00
Michael Natterer 07e6dc1270 Bug 678043 - Single Window Mode does not remember hide docks option
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.
2013-11-21 23:00:44 +01:00
Michael Natterer c2eda33c1c app: also copy the metadata in gimp_image_duplicate() 2013-11-21 21:43:28 +01:00
Michael Natterer 4fb7fc918a Bug 704896 - pop ups are annoying when opening multiple files...
...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.
2013-11-20 23:17:40 +01:00
Michael Natterer 29d95f4c39 pdb: fix gimp_layer_new_from_drawable() PDB wrapper
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.
2013-11-19 21:39:13 +01:00
Jehan 4b14ed2e5e file-export* labels and actions renamed.
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.
2013-11-18 09:07:32 +13:00
Michael Natterer 83bd1c86fa app: gimp_brush_load_brush(): add special error for possible old files
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.
2013-11-17 01:28:57 +01:00
Téo Mazars c41c2452c5 app,pdb: add a compatibility wrapper for contrast-stretch-hsv
... and remove the old plugin
2013-11-16 16:50:49 +01:00
Téo Mazars 5152e1061c app: add gegl:stretch-contrast-hsv to Colors/Auto/
before removing the old plugin
2013-11-16 16:31:35 +01:00
Michael Natterer 2b7f38f473 app: don't ignore the return value of gimp_rectangle_intersect()
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.
2013-11-16 09:38:29 +01:00
Michael Natterer 3e711fec09 Bug 711476 - Problems using animated GIH brushes
Show the error message from gimp_brush_load_brush() instead of
a generic "File is corrupt". Doesn't fix anything.
2013-11-16 08:51:25 +01:00
Téo Mazars 120e9ccf39 app,pdb: add a compatibility wrapper to contrast-stretch
... and remove the old plug-in
2013-11-15 19:12:56 +01:00
Téo Mazars 5efcc0eb09 app: add gegl:stretch-contrast to Colors/Auto/
before removing the plug-in
2013-11-15 19:12:56 +01:00
Hartmut Kuhse 8dc7ff4504 app: metadata undo: unref instead of free 2013-11-14 21:45:06 +01:00
Téo Mazars 7aeb9da6e3 app: follow gegl:dot removal
gegl:dot is now included in gegl:pixelize
2013-11-11 16:52:10 +01:00
Michael Natterer 98cef1273b Bug 704980 - uclibc - base-utils.c: execinfo.h: No such file or directory
Forgot to apply the same fix to master.
2013-11-10 22:09:54 +01:00
Daniel Sabo e56344294c app: Port to gtk-mac-integration
Replace deprecated Carbon APIs with Cocoa.

Includes code by:
Simone Karin Lehmann
Michael Natterer
Daniel Sabo
2013-11-10 18:22:01 +01:00
Michael Natterer 5ad15cecbe app: fix typo in last commit 2013-11-08 23:33:54 +01:00
Michael Natterer 9057b63c1b app: add the same <Primary>D shortcut in the image close dialog
and change the button label to "_Discard Changes" so it's the same as
in quit.
2013-11-08 23:26:34 +01:00
Michael Natterer 25c4acbd15 app: always use <Primary>D for the shortcut in the quit dialog
(do not take it from the button's mnemonic)
2013-11-08 23:18:28 +01:00
Michael Natterer ca3440aa1e app: make quitting by keyboard shortcuts easier
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.
2013-11-08 22:46:10 +01:00
Michael Natterer 65066ff46b app: add gimp_get_primary_accelerator_mask() to gimpwidgets-utils 2013-11-08 10:00:20 +01:00
Michael Natterer beb184e395 app: show file:// uris as filename in the close and quit dialogs
and make the quit dialog's "Exported to foo" string easier to
translate by constructing the markup in a separate step.
2013-11-07 19:14:04 +01:00
Michael Natterer 936780676b app: make the "exported to foo" string in the quit dialog nicer 2013-11-07 12:49:03 +01:00
Nils Philippsen 391de600f1 app: don't ignore return value
...of gtk_widget_translate_coordinates()
2013-11-07 12:28:28 +01:00
Michael Natterer 9fe3da2bf2 app: in the quit dialog, mention if the image has been exported
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.
2013-11-07 11:35:48 +01:00
Michael Natterer 78ad0327da app: add new accessor gimp_container_tree_view_get_name_cell() 2013-11-07 11:32:23 +01:00
Michael Natterer fab7a994fc app: formatting in gimppluginmanager-restore.c 2013-11-06 21:20:00 +01:00
Michael Natterer fbfaa960e1 Bug 705797 - Empty right panel cannot be completely closed
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.
2013-11-03 16:04:58 +01:00
Michael Natterer 61c2ef40f7 Bug 711329 - Artifacts on crop tool's passepartout when set to "allow growing"
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.
2013-11-03 15:21:22 +01:00
Michael Natterer 57d291e130 app: cache the GeglBuffer used for display filters in GimpDisplayShell
so it is not created and destroyed all the time.
2013-11-02 20:56:25 +01:00
Michael Natterer c7051b4caa app: variable renaming in gimpdisplayshell-render.c for better readability 2013-11-02 03:11:44 +01:00
Michael Natterer c3ae7d587d app: port gimp_display_shell_render() to GimpColorDisplay::convert_buffer()
which means applying a series of nops until the display filters are
ported.
2013-11-02 00:48:02 +01:00
Michael Natterer aea161c9a5 app: also include <gegl.h> when we include "libgimpwidgets/gimpwidgets.h" 2013-11-01 22:28:18 +01:00
Michael Schumacher 8db3b4312d Global EXIF -> Exif string change (official spelling) 2013-10-29 22:48:46 +01:00
Michael Natterer 8488248ec6 app: should also register a loader for XCF version 6... 2013-10-28 19:44:01 +01:00
Michael Natterer 95829c01cf app: save XCF version 6 when the image has metadata 2013-10-28 19:40:41 +01:00
Hartmut Kuhse 21bed1e2fb Completely rewrite metadata handling using gexiv2
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
2013-10-27 01:02:17 +02:00
Jehan 8267220651 app: the "Tabs Position" menu should only be active in single window mode.
Thanks to Téo for pointing this out.
2013-10-25 14:50:04 +13:00
Jehan 2aabbbd9c7 Bug 662787 - Segfaults when trying to set a large text size
If a font size is too big for cairo or pango to deal with, nicely back
up from rendering and alert the user via an error dialog.
2013-10-24 20:23:51 +13:00
Michael Natterer 6e3495ff69 app: treat an empty ("" not NULL) plug-in proc_install->menu_path as NULL
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.
2013-10-20 18:28:13 +02:00
Daniel Sabo 71bddaa23c app: Remove deprecated "babl-tolerance" setting 2013-10-19 17:02:04 -07:00
Michael Natterer 33f361f634 app: include gimp-gegl-nodes.h in gimpchannel.c 2013-10-20 00:35:20 +02:00
Michael Natterer d4790a74fb app: always disable CL before GEGL is initialized
This way we only enable if wanted in gimprc, instead of always
enabling, and then disabling again if wanted in gimprc.
2013-10-20 00:34:18 +02:00
Michael Natterer 41c92af49b app: add gimp_gegl_node_set_color() and use it in GimpChannel 2013-10-19 17:31:56 +02:00
Michael Natterer e0c64a817d Bug 701232 - Painting tools still slow when used in Quick Mask mode
Set the format of GimpChannel's gegl:color node depending on whether
the buffer is linear or gamma-corrected.
2013-10-18 01:01:26 +02:00
Jehan fe481275e2 Bug 675554 - fix overriden language environment variables on Windows.
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.
2013-10-16 00:33:17 +13:00
Michael Natterer 697572ccc0 app,libgimp*: fix includes to follow our include policy
- 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
2013-10-15 01:58:39 +02:00
Jehan f4d676c8bb tests: sessionrc-expected* updated with new (tabs-position) settings.
3 tests were failing on a `make distcheck` because of this.
2013-10-13 22:22:21 +13:00