Commit Graph

17034 Commits

Author SHA1 Message Date
Jehan c2470611d9 app: fix variable typo.
Small bug in commit 0bdb747. A variable was initialized twice and
another none. That's for peer programming. :-)
2014-04-20 19:24:03 +12:00
Michael Natterer 0bdb74710a app: rename the value-1...value-4 actions to opacity, size, aspect, angle 2014-04-19 20:09:39 +02:00
Michael Natterer 6e726f248f app: use the right aspect and angle actions for GimpBrushTool 2014-04-19 19:53:40 +02:00
Michael Natterer fb8b05a149 app: FG select: remove some redundant "display" parameters 2014-04-19 03:35:31 +02:00
Michael Natterer 6b10b0511a app: FG select: refresh the preview when matting options change 2014-04-19 02:51:00 +02:00
Michael Natterer de710e72d1 app: FG select: default to drawing foreground strokes 2014-04-19 02:50:38 +02:00
Michael Natterer 6ec272fde7 Bug 312780 - Add undo to foreground selection tool
Implement undoing strokes by keeping copies of the changed parts
of the trimap around in internal undo/redo stacks.
2014-04-19 00:34:21 +02:00
Michael Natterer df8a148db0 app: make the transform tool's undo functions static 2014-04-18 23:03:22 +02:00
Michael Natterer b8a3f395e5 app: FG select: turn the "Preview" button into an actual toggle button 2014-04-18 22:37:33 +02:00
Michael Natterer 35f23b5311 app: FG select: use the FG select stock icon/text instead "Apply"
and GTK_RESPONSE_APPLY instead of a private RESPONSE_APPLY.
2014-04-18 22:15:35 +02:00
Michael Natterer 1756779771 app: FG select: refactor to use the standard tool cancel/commit logic
Simplifies things and prevents losing a complex selection on tool change.
2014-04-18 22:06:07 +02:00
Michael Natterer ebc4910a7c app: FG select: reorder functions to match all other tools 2014-04-18 21:52:38 +02:00
Michael Natterer 5ba7eaa5c7 app: FG select: remove trailing space from the "status_mode" message
such formatting should not be done intranslatable strings, instead
add the space between the two messages when putting them together
using an untranslatable format string.
2014-04-18 21:42:08 +02:00
Michael Natterer 667f4e2d3a app: FG select: rename "Reset" to "Cancel" because that's what it does
Also call update_gui() at the right places so we don't leave the GUI
in an inconsistent state.
2014-04-18 21:38:53 +02:00
Michael Natterer b4ba791381 app: implement the gimp_overlay_dialog_set_response_sensitive() stub 2014-04-18 21:38:15 +02:00
Michael Natterer a53c2f8b30 app: cancel the active tool before going brightness/contrast->levels->curves
because changing tools now automatically commits the old tool.
2014-04-18 21:15:46 +02:00
Michael Natterer be8f43ff06 app: enable scale image's resolution chain button only if xres == yres
(the edit_resolution feature of GimpSizeBox is currently used
only by the scale image dialog)
2014-04-18 19:17:56 +02:00
Michael Natterer 3abb84022a app: enable image new's resolution chain button only if xres == yres 2014-04-18 18:43:32 +02:00
Michael Natterer a8592e7352 app: only enable the resolution chain button if xres and yres are the same 2014-04-18 17:57:02 +02:00
Michael Natterer 2e3011bddf app: FG select: implement GimpTool::initialize()
And create/show the GUI there, so it only becomes visible after
actually activating the tool with a click. Also refuse to operate
on invisible drawables.
2014-04-17 10:55:07 +02:00
Michael Natterer d695c98d74 app: free select: start the draw tool more subclass-friendly 2014-04-17 10:51:50 +02:00
Michael Natterer a876c1b4b0 app: always overlay FG select's GUI on the canvas 2014-04-17 08:48:42 +02:00
Michael Natterer a18f196dd3 app: FG select: fix condition for upchaining in key_press()
Fixes committing the free select using return.
2014-04-17 01:59:34 +02:00
Michael Natterer 2d797bf8d5 app: FG select: remove parameters from stroke_paint()
and factor out a cancel_paint() function.
2014-04-17 01:52:21 +02:00
Michael Natterer e138333204 app: FG select: implement canceling the current stroke (right mouse button) 2014-04-17 01:46:32 +02:00
Michael Natterer 05abd5a37d app: don't call gimp_free_select_tool_select() from FG select
It doesn't serve any purpose since its implementation doesn't
do anything in FREE_SELECT mode.
2014-04-17 01:42:38 +02:00
Michael Natterer 61aaa11158 app: reorder some prototypes in FG select 2014-04-17 01:40:08 +02:00
Michael Natterer 8836a1eae1 app: general cleanup in the foreground select tool
- fix some indentation
- implement GimpTool::options_notify() instead of a signal callback
- consistently chain up first in FREE_SELECT state
- misc. cleanup
2014-04-16 23:03:57 +02:00
Michael Natterer b1a0b4555e Bug 726181 - Heal tool mode is ignored - always in "Normal" mode
Make the paint mode menu insensitive for the heal tool.
2014-04-15 17:15:32 +02:00
Michael Natterer 36ca865aaa pdb: use boolean not int32 for booleans in the apply lens compat wrapper 2014-04-14 13:05:28 +02:00
Michael Natterer f5a1bbb07b app: integrate the layer dialog's "Mode" label into the combo box 2014-04-14 13:04:42 +02:00
Michael Natterer 260a4a51b1 plug-ins, pdb: remove the lens-apply plug-in and add a compat procedure 2014-04-13 21:18:35 +02:00
Michael Natterer 60da428c73 app: add gegl:apply-lens to Filters -> Distorts 2014-04-13 20:58:25 +02:00
Michael Natterer 6d5b6a648d app: turn the paint tool fallback cursor cross into a circle 2014-04-12 22:17:55 +02:00
Michael Natterer 2a9b6bf569 app: make blend's and straight line's start-line-end drawing look nicer
Use circle handles instead of crosses, and put the items into a stroke
group so they don't look ugly when drawing over each other.
2014-04-12 22:10:26 +02:00
Michael Natterer 36905bf46c app: foreground select: the initial rough selection is an unknown area
not the foreground area. This seems to make the tool do something useful.
2014-04-12 21:31:38 +02:00
Michael Natterer 693d0d082b app: don't draw a redundant fallback crosshair when a line preview is shown
and introduce some local variables is gimp_paint_tool_draw() to reduce
clutter.
2014-04-12 15:26:11 +02:00
Michael Natterer d897188e32 app: also move the "draw brush outline" logic from brush to paint tool
So all paint tools honor the setting.

Add GimpPaintTool::get_outline() which either returns an outline, or
calls gimp_paint_tool_set_draw_cursor() and implement it in
GimpBrushTool and GimpInkTool. Handle all brush/circle/fallback
drawing in gimp_paint_tool_draw().
2014-04-12 15:03:15 +02:00
Michael Natterer 1ade034c49 app: move "show paint tool cursor" logic from GimpBrushTool to GimpPaintTool
Now all paint tools (also ink and mypaint brush) honor the setting and
can work without mouse cursor.
2014-04-12 12:54:08 +02:00
Michael Natterer 66010e6c6d Bug 623734 - No brush outline with dynamics set to 'size' on 'pressure'
Improve the logic in gimp_brush_tool_draw() and draw a brush-sized
circle if the actual brush outline got scaled away by dynamics.
2014-04-12 01:13:11 +02:00
Michael Natterer 7257574b93 Bug 726495 - "Text to path" delivers a path offset from the text
In gimp_text_layout_render() do a cairo_save/restore() around drawing
the (possibly offset and transformed) text, so we can later get the
rendered path from cairo_copy_path() relative to the original coords
and not relative to the offset and transformed coords.
2014-04-11 16:56:29 +02:00
Michael Natterer 614c61a3dd Don't #include <glib.h> before <lcms.h>
The include claimed to be because of "inline" in the lcms header, but
that was probably lcms1, since there is no trace of inline in the
lcms2 header.
2014-04-10 20:48:22 +02:00
Michael Natterer e3a98eade2 app: use gimp_paint_tool_set_draw_circle() in the ink tool
so we get at least a rough preview of where the paint will go.
2014-04-09 15:27:37 +02:00
Michael Natterer 703c2c78c4 app: add gimp_paint_tool_set_draw_circle()
which enables drawing a circle with a given radius at the cursor
location.
2014-04-09 15:27:31 +02:00
Michael Natterer e8459beb24 app: don't create a fallback crosshair in gimp_brush_tool_create_outline()
Instead, draw the crosshair in gimp_brush_tool_draw() if create_outline()
didn't return an item *and* if there is no brush tool cursor.

In gimp_source_tool_draw(), don't add an additional crosshair if
create_outline() returned an item.

This fixes both "no cursor at all" and "both outline and crosshair
shown" for certain prefs settings conbinations (bug #623734).
2014-04-09 14:53:24 +02:00
Michael Natterer d43022e5c4 Bug 727762 - Undo- and redobutton in Undo History Dialog (gimpundoeditor)...
...don't work

Make action_data_get_display() return the right display also if the
action callback's user_data is a GimpImageEditor (GimpUndoEditor in
this case). The undo and redo actions now require a display, not only
an image, so this broke as a side effect.
2014-04-09 01:23:58 +02:00
Michael Natterer 88e4d7e468 app: commit ongoing tool operations on tool change instead of cancelling
On tool change, we used to simply halt tools before switching to the
new one, which meant losing ongoing live-previewed tool changes, like
transforms, warps and color corrections. This change makes them being
applied to the image instead before switching to the new tool:

Add enum value GIMP_TOOL_ACTION_COMMIT that is passed to
GimpTool::control() before tool switching. Handle the new enum value
in all tools, and actually commit the previewed stuff. This changes
the behavior of GimpCageTool, GimpImageMapTool, GimpTransformTool and
GimpWarpTool.
2014-04-04 22:34:26 +02:00
Michael Natterer 661317f74c libgimpwidgets: make using GimpColorProfileComboBox easier
If the passed dialog is a GimpColorProfileChooserDialog, handle its
"response" signal automatically and also destroy it when the combo box
is destroyed (before we leaked all dialogs). Remove the same callback
from all places using GimpColorProfileComboBox.
2014-04-04 17:09:54 +02:00
Michael Natterer 40d42d113e app: make tool_manager_select_tool() a private function 2014-04-04 16:47:51 +02:00
Michael Natterer 3f826d02fa libgimpwidgets: make GimpColorProfileComboBox use lcms
and improve gimp_color_profile_combo_box_set_active() to get the
profile's label from the ICC file if no label was provided. Simplifies
all its callers and removes code duplication.
2014-04-02 13:03:52 +02:00
Michael Natterer 80a71f1e50 app: use GDK_KEY_foo not GDK_foo in the action search dialog 2014-04-02 01:29:44 +02:00
Michael Natterer d7037650df libgimpcolor: add gimp_lcms_profile_get_label()
which returns a string meant to label the profile in the GUI, it's
either the profile's description, its model, or "(unnamed profile)" as
a fallback. Use the function instead of duplicating that logic
inconsistently and imcompletely all over the place.
2014-03-30 03:12:42 +02:00
Michael Natterer 32e47cf70d libgimpcolor: add gimp_lcms_profile_is_equal()
and remove all of our own MD5 digest code and API. is_equal() uses
lcms' own MD5 API which I missed before. Thanks Elle for pointing that
out :)
2014-03-29 10:40:47 +01:00
Michael Natterer b4a2fa916c app: fix string leak in prefs_profile_combo_box_new() 2014-03-27 19:11:13 +01:00
Michael Natterer dc8a3e8de5 libgimpwidgets: remove gimp_color_profile_chooser_dialog_get_desc()
and port its only user (the prefs dialog) to the code all other users
of GimpColorProfileChooserDialog use.
2014-03-23 23:50:54 +01:00
Michael Natterer b3395d989e libgimpcolor: return an optional MD5 digest from gimp_lcms_create_srgb_profile()
pass NULL in most places, use the feature in the lcms.c plu-gin.
2014-03-23 23:34:47 +01:00
Michael Natterer db9f7c195a app: remove sanity checks on the content of the 'icc-profile' parasite
We now validate the parasite at attach time.
2014-03-23 21:19:06 +01:00
Michael Natterer 4f10ff3ad4 app: validate 'icc-profile' parasites before attaching them
The must be persistent and undoable and contain an RGB ICC profile.
2014-03-23 19:46:09 +01:00
Michael Natterer e69ea05102 app: remove some <unistd.h> and other includes
that were needed before we switched to using GLib APIs in these files.
2014-03-22 20:26:20 +01:00
Michael Natterer 60f23afde2 app: add a small infrastructure to validate known parasites
when they are added to items, images or globally, from the PDF or an
XCF file. None of the validation functions does anything currently,
they simply return TRUE.
2014-03-22 00:18:48 +01:00
Daniel Sabo 5cee9408be app,gimpwidgets: Add some missing libs so the tests build 2014-03-20 03:15:50 -07:00
Michael Natterer 89e0c04d13 app: add gimp_image_get_profile() which returns a cmsHPROFILE 2014-03-17 02:29:46 +01:00
Michael Natterer a83851eb37 app: use gimp_parasite_name() instead of parasite->name in gimpimage.c 2014-03-17 02:29:46 +01:00
Michael Natterer e80eaf2524 app: start an image profile API in core/gimpimage-profile.[ch]
add lowlevel functions gimp_image_get,set_icc_profile() which deal
with ICC profiles in a GimpParasite.
2014-03-16 23:50:41 +01:00
Michael Natterer a0479e8d8b app: link the tests against lcms 2014-03-16 19:52:17 +01:00
Michael Natterer 89fe232735 app: remove plug_in_icc_profile_info() and _file_info()
because they are unused now.
2014-03-16 19:38:36 +01:00
Michael Natterer ed13993aff app: use a GimpColorProfileView in GimpImageProfileView
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.
2014-03-16 18:36:12 +01:00
Michael Natterer fea22c345c Bug 706361 - Printer queue dosn't show the filename of the printing image
Change the gimp-image-get-name procedure to return the same string
as shown in the image title, and mention in its API docs that this
string is meant for annotating UI elements only.
2014-03-15 17:53:10 +01:00
Michael Natterer 9c7cd2508f app, libgimpwidgets: move GimpProfileChooserDialog to libgimpwidgets
and call it GimpColorProfileChooserDialog. Make libgimpwidgets
depend on lcms and make it query the profile directly.
2014-03-14 22:03:08 +01:00
Daniel Sabo 2381bf87c7 app: Use ABYSS_CLAMP for display_shell_render() (bug 709708) 2014-03-14 13:21:47 -07:00
Daniel Sabo 834a7c5a47 app: Use ABYSS_CLAMP for image and drawable previews (bug 709708) 2014-03-14 13:21:47 -07:00
Michael Natterer 86e002da33 app: move all GimpProfileChooserDialog to a private struct
and make the preview widget look the same as the profile tab
in the image properties dialg.
2014-03-14 20:26:15 +01:00
Michael Natterer 35606094e6 app: be more robust about possible profile info return values 2014-03-14 20:26:15 +01:00
Michael Natterer 60014630fa app: gimp_procedure_execute(): don't use a NULL plug-ins error message
return_vals[1] being present and being a string doesn't neccessarily
mean it comes from the plug-in, it might just as well be its first
return value, which gets generated and NULL-initialized by the plug-in
execution code even if the plug-in didn't actually return anything.
2014-03-14 20:26:15 +01:00
Michael Natterer a894f2a689 app: some formatting cleanup in GimpImageWindow 2014-03-13 22:39:03 +01:00
Michael Natterer 8607486237 app: make sure GimpImageWindow notifies all its shells of monitor changes
Call gimp_color_managed_profile_changed() on all newly added shells,
and on all shells in GimpWindow::monitor_changed().
2014-03-13 22:39:03 +01:00
Michael Natterer e72388ddf4 app: add signal GimpWindow::monitor_changed()
and emit it when the window moves between monitors or screens.
2014-03-13 22:39:03 +01:00
João S. O. Bueno 72ac53705f Adds "fill" arrange modes to the Align Tool
The Align Tool had to be used in a very hacky way if one
intended to evenly distribute items across an image,
or other reference object (it would actually require one to
calculate the item spacing out of GIMP). This adds vertical
and horizontal fill modes: the reference object is divided
in N equal segments, where N is the number of items,
and each item is placed in the center of one of
these segments. The existing "offset" parameter
is used as an extra margin for the distribution,
and can be set to negative values, so that the items can
even get moved outside the boundaries of the reference object.
2014-03-13 03:38:53 -03:00
João S. O. Bueno 8d85c0c41c Enables aligning of elements using the active Path
For some reason, using the image active Path as
a reference for the align tool was displayed
in the UI, but disabled in the code.
2014-03-12 22:44:26 -03:00
Michael Natterer 9a8aa70b85 xcf: forgot to register a loader for XCF version 7 2014-03-12 15:25:08 +01:00
Michael Natterer 4267ea5d12 app: set the idle_id to 0 in gimp_image_profile_view_query()
fixes warnings from dispose() about removing a source that doesn't
exist.
2014-03-10 01:25:16 +01:00
Michael Natterer 626ef7b30f app: set the sensitivity of the new double precision actions 2014-03-09 21:02:14 +01:00
Michael Natterer 2e2c6c2cf2 app: fix wrong version number comment in xcf-save.c 2014-03-09 19:07:58 +01:00
Michael Natterer e7ff0589cb app: shuffle precision enum values around to make room for U64
and add code to handle the old values from XCF files < version 7.
2014-03-09 01:46:08 +01:00
Michael Natterer 3c918353fb app: add double precision support, for completeness
and because it makes us look utterly cool.
2014-03-09 00:43:55 +01:00
Michael Natterer 774e064fbf Bug 691169 - Gimp fails to open files with UTF8 characters as filenames...
...when started via Windows Explorer (e.g. the file context menu)

When built against GLib >= 2.39.90, use g_win32_get_command_line()
and g_option_context_parse_strv() which handle all sorts of windows
filename encodings properly.
2014-03-08 22:39:47 +01:00
Michael Natterer 91bb872d26 app: write "Unstable Development Version" across the empty image window 2014-03-07 11:33:14 +01:00
Michael Natterer 2303ce910d Bug 725734 - Themes not alphabetized
qsort() the array returned by themes_list_themes().
2014-03-06 11:57:16 +01:00
Michael Natterer 30ae88ef07 Bug 725556 - Feather selection extremely slow
gimp_gegl_apply_feather(): add a "dest_rect" parameter to restrict
the feather area. Pass the selection bounds plus the feather radius.

For consistency, newly add gimp_gegl_apply_border,grow,shrink() and use
them in gimpchannel.c
2014-03-04 22:11:50 +01:00
Michael Natterer 6e4f9185be Bug 725112 - Small canvas doesn't update when zoomed out
gimp_tile_handler_projection_invalidate(): need to invalidate
all levels up to max_z not max_z - 1. Spotted by Massimo.
2014-03-04 19:32:14 +01:00
Michael Natterer 4be11a8c0e Bug 725112 - Small canvas doesn't update when zoomed out
Remove all code that tries to calculate the maximum level of the tile
pyramid, because that's essentially impossible. Instead simply keep
track of the max_z encountered in GeglTileSource::command().
2014-02-28 23:05:02 +01:00
Michael Natterer 57da340f78 app, libgimp: pass "use-opencl" to plug-ins
and configure Gegl on the plug-in side accordingly. This bumps
the GIMP protocol version.
2014-02-25 21:25:40 +01:00
Daniel Sabo 0adccbd59a app: Set GEGL's license setting to enable GPL3 ops. 2014-02-25 10:18:49 -08:00
Michael Natterer a7cd595241 app: fix crashing typo in previous commit 2014-02-23 01:28:34 +01:00
Massimo Valentini 9498cc615d Bug 722676: Pasting image from clipboard sometimes does not work.
Change gimp_pixbuf_create_buffer() to copy the pixels if a linear
buffer cannot be created. Add functions that convert between
GimpTempBuf and GdkPixbuf. Fix users of gimp_pixbuf_create_buffer()
to make the least possible copies. Patch modified by Mitch.
2014-02-23 00:49:56 +01:00
Michael Natterer 5be611cad7 app: away with more action search window size code 2014-02-21 22:27:38 +01:00
Michael Natterer 3085eb8b1c app: further simplify action search window size management 2014-02-21 22:14:43 +01:00
Michael Natterer 73da55cced app: rename some action search functions to be more verbose 2014-02-21 21:10:39 +01:00
Michael Natterer 053ef96059 app: remove all window position fiddling from the action search dialog
Session management already does that.
2014-02-21 21:00:38 +01:00
Michael Natterer 9f3f4dcd72 app: remove a useless hbox from the action search dialog
and don't show it, that's done generically by GimpDialogFactory.
2014-02-21 20:30:30 +01:00