Commit Graph

2723 Commits

Author SHA1 Message Date
Ell 5bcde32caf enums: run gimp-mkenums from the build dir
Commit 1e6acbd4e1 modified the
generated enum recipes to run gimp-mkenums from the source
directory, instead of the build directory, so that only the
basenames of the corresponding header files would appear in
the comment at the top of the generated files.  This was a
mistake -- $(GIMP_MKENUMS) is expecting to be invoked from the
build directory.

Switch back to running gimp-mkenums from the build directory.  To
avoid including the relative path from the build directory to the
source directory in the generated file, add a @basename@ production
variable to gimp-mkenums, which exapnds to the basename of the
input file, and use it instead of @filename@ in the recipes for the
generated enum files.
2017-05-22 20:29:18 -04:00
Ell f9fa0d1b18 enums: don't write generated enum files to src-dir if unchanged
When regenerating an enum file, don't copy it back to the source
directory if it hasn't actually changed.  This allows using a read-
only source directory where the enum header is newer than the
generated file, as long as they're not really out of sync.

OTOH, *do* touch the generated source-dir file even when unchanged,
in order to avoid re-running its recipe on the next build, however,
allow this to silently fail (which is harmless).
2017-05-22 17:58:04 -04:00
Michael Natterer 8f2471b112 Bug 772667 - instant freeze on rotate
Limit the number of lines drawn in the transform tool canvas grid to
one line every 5 image pixels. This should probably be done in display
pixels, didn't change that yet.
2017-05-14 22:28:51 +02:00
Michael Natterer 465eba3260 app: factor out button-2-motion handling code in GimpDisplayShell
less code in the huge gimp_display_shell_canvas_tool_events().
Also fix the rotating cursor in gimp_display_shell_start_scrolling().
2017-05-11 21:31:41 +02:00
Ell 1e6acbd4e1 enums: generate enum files in source dir
We check them into git, so this makes it easier to keep them in
sync when using a separate build directory.

Case in point -- this commit also syncs a few enum files that went
out-of-sync with their headers.
2017-05-06 17:26:16 -04:00
Jehan 8c814a24d3 app: use gimp_unit_get_scaled_digits() in the Pointer Information dock.
gimp_unit_get_digits() won't return relevant information when using
higher resolution. gimp_unit_get_scaled_digits() will provide the right
amount of details relatively to the actual print resolution of the
active image.
2017-05-06 22:57:43 +02:00
Thomas Manni 3c7a54829d app: call the active vectors handler at the end of gimp_display_shell_connect
This enables correct display of the active path (in red color instead of blue)
when xcf files containing paths are opened.
2017-05-02 18:24:51 +02:00
Michael Natterer 4f5bd08b9e app: remove unused includes from gimpdisplayshell-dnd.c 2017-05-01 19:09:00 +02:00
Michael Natterer 536cc8531a app: keep the src image's resolution and unit in copied/cut GimpBuffers
and use them for the new image in "Paste as new image". We were using
the resolution and unit of the image the paste command was invoked
from, which is entirely random and useless.
2017-05-01 18:39:13 +02:00
Ell c97209ba4a app: fix abbreviated commit hashes
The abbreviated commit hash we show in the shell and the about
dialog is currently just the last 7 characters of 'git describe',
based on the assumption that abbreviated hashes are always 7-digits
long.  When the hash is longer than that, we're just showing a
nonsense commit.

This was never a good idea, since users can override this, and
since disambiguation can result in longer hashes, but since git
2.11, the default abbreviated hash length is determined based on
the size of the repository, which currently results in 10 digits
for us.

Let's just do it right.
2017-03-21 23:05:42 -04:00
Michael Natterer 157d70e396 Bug 768066 - Color picker tool should indicate pick position
Add optional coordinate display to GimpColorFrame, and enable it for
the color picker tool and the sample point dockable.
2017-03-11 00:01:01 +01:00
Michael Natterer dda54c1df8 Deprecate stock items for good and change all icon defines to GIMP_ICON_*
Try to sort all GIMP_ICON_* defines into FDO categories like in
https://specifications.freedesktop.org/icon-naming-spec/latest/ar01s04.html

Add defines for all icons we override, rename some icons to their FDO
standard names, and mark the ones we duplicate with a comment so we
don't forget to rename those to standard names in 3.0.
2017-03-05 16:01:59 +01:00
Ell d545b460d9 app: defer image menu updates to an idle function
In DEs which use a global menu, such as Unity, updating the menu
can be expensive.  This particularly affects canvas scaling and
rotation, for which updating the menu synchronously causes notable
lag.
2017-03-01 03:53:18 -05:00
Michael Natterer 3cf423f0cd *: rename NORMAL to NORMAL_LEGACY and NORMAL_LINEAR to NORMAL
and make NORMAL_LEGACY immutable.
2017-02-26 16:26:34 +01:00
Ell c11c955ef5 app: fix comment typo in previous commit 2017-02-23 05:39:46 -05:00
Ell 4c5f6a8e5b Bug 778966 - severe input lag with ruler and one window mode ...
.. due to gdk_pixbuf_scale() with themes using the pixbuf engine

Make GimpDisplayShell a subclass of GtkEventBox, so that it gets its
own window, isolating its events from those of its ancestors.

In particular, the "expose" event handler of GtkNotebook, which the
shell is a child of in SWM, is particularly slow with themes that
use the pixbuf engine.  If the notebook and the shell use the same
window, this can cause notable, and somtimes severe, lag when the
rulers or scrollbars are updated frequently, such as when rapidly
moving the cursor.
2017-02-22 18:46:10 -05:00
Ell f34ef2ab35 app: annhilate <math.h> from the face of last commit 2017-02-19 18:48:18 -05:00
Ell 1572bccc9f app: add support for subpixel image grids
In particular, this enables grids whose points of intersection
are at the middle of the image's pixels, which is useful for
undistorted painting with odd-sized brushes using tools other than
the pencil.

This commit also changes the grid visibility behavior, so that the
the visibiltiy of horizontal and vertical grid lines (depending on
the zoom level) is independent.
2017-02-19 18:13:41 -05:00
Michael Natterer 7da7bab09c app: get rid of icons in dialog buttons (use labels not stock IDs)
Nobody has them anymore, and they are deprecated in GTK+ 3.x. This
also fixes all conflicting mnemonics except those I missed, but we can
fix them now.
2017-02-12 16:18:54 +01:00
Jehan f44fb1ece4 app: more gimp_unit_get_scaled_digits() usage.
The print size displayed in image property and title format should use
gimp_unit_get_scaled_digits() instead of gimp_unit_get_digits() and
adding 1, which is quite random or magic number-y.
2017-01-24 00:28:33 +01:00
Jehan 2762662ca9 app: use gimp_unit_get_accurate_digits() in a few places. 2017-01-23 20:59:28 +01:00
Michael Natterer dba909a9fa Bug 776370 - Changing active layer breaks the GEGL operation dialog
We can't just switch to a GimpOperationTool by using the normal
gimp_context_set_tool() or gimp_context_tool_changed() because it
needs additional initialization like setting an operation at all.

In gimp_gegl_procedure_execute_async(), g_object_set_data() the used
procedure on the newly created tool.

In gimp_display_shell_initialize_tool(), when we re-create the active
tool because of a drawable change, check for the procedure and invoke
it again, instead of simply creating an empty operation tool by
calling gimp_context_tool_changed().
2017-01-23 00:05:18 +01:00
Jehan f836892314 Bug 763734 - better decimal places for physical units.
Compute the ideal decimal precision for cursor position and length
status so that you get the best precision on physical units depending
on the current resolution, yet avoiding over-precision (which can be
misleading). The unit's "digits" value is now used as a minimum
precision only.
2017-01-20 00:40:27 +01:00
Michael Natterer 66060e3307 app, libgimp*, plug-ins: replace enum GimpLayerModeEffects by GimpLayerMode
with proper value names. Mark most values as _BROKEN because they use
weird alpha compositing that has to die. Move GimpLayerModeEffects to
libgimpbase, deprecate it, and set it as compat enum for GimpLayerMode.
Add the GimpLayerModeEffects values as compat constants to script-fu
and pygimp.
2017-01-08 23:00:19 +01:00
Michael Natterer 237d83dc7f Bug 773462 - Color Picker should support range...
...regardless of image color precision

Split enum value GIMP_COLOR_FRAME_MODE_RGB into RGB_PERCENT and RGB_U8,
which display the current % values, and values in a range of 0..255.
2017-01-03 01:20:30 +01:00
Jehan 3fa016fb4b app: clean out tab indentations. 2016-12-21 04:05:32 +01:00
Michael Natterer 2e63533602 app: add GimpDockContainer::get_dialog_factory()
and use it where possible instead of gimp_dialog_factory_get_singleton().
Also reduce using this function in some other places.
2016-11-25 13:26:08 +01:00
Michael Natterer a3c65e6d17 app: get rid of including menus/ stuff from widgets/ and other places
Add GimpMenuFactory can always be found in a GimpDialogManager, use
gimp_dialog_factory_get_menu_factory() where we have a dialog factory
instead of accessing "global_menu_factory" or redundantly passing a
menu factory around where we already pass around a dialog factory.
2016-11-23 19:38:44 +01:00
Michael Natterer b1ca8a161c app: allow to zoom with middle mouse button + control + drag up/down 2016-11-16 14:41:30 +01:00
Michael Natterer be6b6c7ba4 Bug 642565 - Use private pointer instead GET_PRIVATE macro in GimpCanvasItem
Do as the but title says, based on a patch from Javier Jardón.
2016-11-07 14:14:16 +01:00
Michael Natterer f5ecc53f3e Fix a lot of warnings all over the place
Deprecated stuff, unused variables. Includes parts of a patch from
Shlomi Fish from bug #768855.
2016-10-31 01:36:35 +01:00
Michael Natterer f9170b667e Bug 647957 - GimpColorFrame's CMYK mode is not color managed
Convert GimpRGB to CMYK using a color transform to the configured CMYK
profile instead of the naive gimp_rgb_to_cmyk().

Add gimp_color_frame_set_color_config() and call it on all color
frames in the GUI (color picker tool, cursor info, sample point view).
Keep a GimpColorTransform around that does the conversion.

Also color manages the frame's color area now (visible in the sample
point view), which was forgotten earlier. Addresses bug #467930.
2016-10-18 22:48:04 +02:00
Michael Natterer 151b44e4bb Bug 759939 - Ghost brush outline in FG Select tool
Fix the check that keeps events on overlay widgets from entering the
tool event mechanism, they have no business there.

gimp_overlay_child_realize(): set the embedding widget's event mask on
all overlay children, so their windows will be used as event window,
so their events become distinguishable from events on the parent (the
canvas).

gimp_display_shell_canvas_tool_events(): fix the check for events on
overlays, and skip them for real this time.
2016-10-14 22:14:11 +02:00
Michael Natterer aa0afe0d01 app: invoke the right action when the quick mask button is clicked
instead of implementing the toggling in display/. One more bit
moved to actiona/.
2016-10-01 01:06:02 +02:00
Michael Natterer beb3279bf2 Bug 320447 - fast switching between "color managed display" and "softproof"
Add a SELECT_SOFTPROOF_PROFILE mode to the color profile dialog and
use it to select a profile from a newly added "Soft-Proofing Profile..."
menu item in view -> color management.
2016-09-30 20:56:04 +02:00
Michael Natterer 88ff45eb05 app: keep the statusbar progress from drawing over the right docks
In a blocking operation we don't give the main loop time to lay out
the statusbar correctly after showing the progress bar. Force a size
on the progress bar using gtk_widget_size_allocate(). This sucks.
2016-09-28 00:44:14 +02:00
Michael Natterer c5957f146b app: remove the "filters_dialog" member from GimpDisplayShell
and attach the dialog using dialogs_attach_dialog().
2016-09-25 01:06:13 +02:00
Michael Natterer 3f1104b626 app: remove the "grid_dialog" member from GimpDisplayShell
and attach the dialog to the image, just like other dialogs.
2016-09-24 14:49:43 +02:00
Massimo Valentini 5037ff35ca Bug 771444: Tablet stylus misbehaves when crossing...
the edge of a dock in multi-window-mode

when the pointer is grabbed do not process a
motion-notify-event having the wrong 'device' member.

This avoids a harmful device change.
2016-09-22 18:18:40 +02:00
Michael Natterer 67863dabf9 Bug 637313 - Should be possible to copy/paste whole layers in a single step
Use the newly added clipboard for entire images to copy/paste layers
(we only create single-layer clipboard images, and use only the first
layer of any recieved image, the layers can be arbitrarily complex
though):

- change gimp_edit_copy,cut,paste() to return/take a GimpObject
  that can be a GimpImage or GimpBuffer
- cut/copy the whole layer if there is no selection
- always paste layers as new layers, not floating selections
- always paste news layers on top of the active layer, where
  we would attach a floating selection
- add enum GimpPasteType { FLOATING, FLOATING_INTO, NEW_LAYER }
- add GimpPasteType parameter to gimp_edit_paste() and handle all
  three cases there because there is now a lot of common code
  involved
- change all callers accordingly, use only legacy buffer pasting
  from the PDB for now
2016-09-20 00:20:07 +02:00
Michael Natterer 4df9a1d568 Get rid of gtk_misc_set_alignment(label) and use gtk_label_set_x,yalign() 2016-09-08 19:11:20 +02:00
Jehan 6c674e973c app, libgimp*, plug-ins, icons: revert icon names into freedesktop...
... standard icon names and GTK+ icon names as second choice.
We should only use GIMP specific icon names as last resort, when there
is no standard or GTK+ names dedicated to the function.
This is made possible thanks to commit 3cc77b0.

s/gimp-document-recent/document-open-recent/
s/gimp-indent/format-indent-more/
s/gimp-next/go-next/
s/gimp-previous/go-previous/
s/gimp-save/document-save/
s/gimp-save-as/document-save-as/
s/gimp-revert/document-revert/
s/gimp-open/document-open/
s/gimp-document-recent/document-open-recent/
s/gimp-quit/window-close/ ou s/gimp-quit/application-exit/
s/gimp-warning/dialog-warning/
s/gimp-edit-clear/edit-clear/

s/gimp-justify-.*/gtk-justify-.*/
s/gimp-font/gtk-select-font/
s/gimp-color-palette/gtk-select-color/
s/gimp-cancel/gtk-cancel/
2016-09-03 15:49:29 +02:00
Ell 26b978d2a8 app: avoid expensive rotated scale calculation when scale_x == scale_y
Ditto for the rulers' resolution calculation.
2016-08-09 22:28:21 +00:00
Ell 5663daa6e7 app: code layout/typo fixes
The sort of things that only become visible *after* pushing.
2016-08-09 21:55:19 +00:00
Ell 5bdb20c839 app: make rulers rotation aware
Place the rulers' origin at the top-left corner of the canvas
(screen space) bounding box, and set their scale to the image-
space scale along the screen-space horizontal/vertical directions
(in other words, measuring a distance using the rulers should
give the same results as the measure tool; note that rotation
comes into play here only when the horizontal and vertical
image or screen resolutions are different, since otherwise the
scale is direction invariant.)

Make scrollbar step match ruler step under the new behavior.
2016-08-09 21:31:07 +00:00
Ell 720b73ca86 app: fix a few canvas scroll/scale rounding inconsistencies
Apply rounding more consistently across some of the scroll/scale
functions, to avoid annoying one-pixel-off scrollbar size/position
issues.
2016-08-09 21:31:06 +00:00
Ell e384d533e7 app: don't round results of gimp_display_shell_transform_bounds()
The rounding causes some one-pixel-off errors in the canvas scaling
code; the rest of its callers shouldn't be affected.
2016-08-09 21:31:06 +00:00
Michael Natterer 4ea518fee3 Bug 768736 - Button order differs in "Quit GIMP" and "Close View"...
...dialogs with modified images

Move the "Discard Changes" button to the right (affirmative) position
in gimp_display_shell_close_dialog().
2016-07-24 23:55:35 +02:00
Ell cd767505fc app: make GimpNavigationView rotation aware
Rotate the viewport marker to correctly reflect the visible part
of the image.
2016-07-21 21:25:49 +00:00
Ell 168b935d43 app: make scale_{to_rectangle,fit_in,fill,shrink_wrap} rotation aware
Use the (screen space) bounding box of the rectangle/canvas for these
functions.
2016-07-21 21:24:06 +00:00