Commit Graph

19269 Commits

Author SHA1 Message Date
Øyvind Kolås 5a7fd54d34 app: split addition and subract in legacy and new 2017-01-10 01:40:14 +01:00
Michael Natterer 60e1d8e35f app: move the LCH layer modes to layer-modes/ 2017-01-10 01:04:49 +01:00
Øyvind Kolås 92047ea949 app: layer op fission cleanup 2017-01-10 00:00:31 +01:00
Michael Natterer b001626b31 app: move overlay to operations/layer-modes/ and call it GimpOperationOverlay 2017-01-09 23:54:51 +01:00
Øyvind Kolås b6be1b768e app: duplicate difference mode, new and legacy 2017-01-09 23:49:08 +01:00
Øyvind Kolås 9d5893f402 app: add the ops for screen blend ops 2017-01-09 23:25:59 +01:00
Øyvind Kolås 3a50cdcd4f app: split screen op in legacy and new 2017-01-09 23:19:29 +01:00
Michael Natterer 60dcb17874 app: fix layer mode in test-xcf.c 2017-01-09 22:18:05 +01:00
Michael Natterer fd070eeb25 app: start moving layer modes into their own build directories
New directories:

operations/layer-modes/
operations/layer-modes-legacy/
2017-01-09 21:58:18 +01:00
Øyvind Kolås 076621dd75 app: split dodge op in legacy and new 2017-01-09 20:10:17 +01:00
Øyvind Kolås c2583faa5a app: add new multiply op 2017-01-09 20:10:04 +01:00
Øyvind Kolås 735887286a app: do not let pixel encoding determine layer modes
See bug #757485 - woth noting that this also enables linear and thus correct
compositing when using 8bpc perceptual gamma as the layer storage format.
2017-01-09 20:09:50 +01:00
Michael Natterer 07600c6db6 libgimpbase: proper names for the GimpChannelType enum
Register the old value names as compat. Also add some forgotten
values and enums to gimpcompatenums.h
2017-01-09 19:40:30 +01:00
Michael Natterer 178794f6f1 libgimpbase: rename enum GimpHueRange's values
and add compat cruft for the old names.
2017-01-09 02:45:16 +01:00
Michael Natterer 152adbb1bd Rename GIMP_LAYER_MODE_FOO_BROKEN to GIMP_LAYER_MODE_FOO_LEGACY
"Broken" sounds like it needs fixing, but it's legacy compat stuff
that will have to stay for all eternity.
2017-01-09 01:27:20 +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
Ell fc293f04d9 configure.ac: require gexiv2 >= 0.10.3
Commit f8e291b uses the `gexiv2_metadata_get_tag_raw()` function,
which was added in 0.10.3.
2017-01-06 18:24:30 -05:00
Øyvind Kolås 03185f8070 app: normalize some layer mode alpha/opacity handling
Make overlay, Lch color, Lch hue, Lch saturation and Lch lightness mode handle
alpha more like how normal does it. This is a change that we ideally might want
applied to other layer modes as well to get rid of MIN() calls.
2017-01-06 04:53:40 +01:00
Michael Natterer 22a95d63a1 app: fix error handling in gimp_tool_preset_deserialize_property()
when parsing of an object property fails, we need to set *expected to
G_TOKEN_NONE to tell the config parser that something has gone wrong,
or it will continue parsing and run into trouble with the inconsistent
state (it will try to set an error over the already set error, causing
a warning).
2017-01-06 03:15:39 +01:00
Hartmut Kuhse 66bc98d299 Revert "New GimpMetadata as subclass of GExiv2Metadata"
This reverts commit 3ab08c8bfd.
2017-01-03 19:36:22 +01:00
Hartmut Kuhse 3ab08c8bfd New GimpMetadata as subclass of GExiv2Metadata 2017-01-03 19:26:35 +01:00
Jehan 8111ad62da Bug 776417 - improve Sample Average and Sample Merged description.
The "accumulated" (color value) adjective does not look like the best
word in both descriptions. Respectively, the first is an averaged
value whereas the second would be a "merged" or "composited" value.
If native speakers have comments or better propositions, they are
welcome to speak up.
2017-01-03 04:21:42 +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
Øyvind Kolås e2bcf88089 XCF: use version >=9 if layer mode is one of the new LCH modes 2017-01-01 21:53:03 +01:00
Jehan c2665a2e43 app: tooltip of Color Picker's "Sample average" option mixed up.
This should be "Sample merge"'s tooltip.
2017-01-01 19:22:29 +01:00
Michael Natterer 3d986425b2 Bug 768058 - Color picker tool should be able to ignore snapping
Don't snap to anything when picking colors.
2017-01-01 17:59:26 +01:00
Michael Natterer adad7c651c Bug 167203 - color picker tools should always draw outline
Move the entire drawing control logic to gimp_color_tool_oper_update()
which gets invoked on hovering, and don't mess with it in
button_press() and button_release(). Tested to work with the color
picker, paint and filter tools.
2017-01-01 17:35:57 +01:00
Thomas Manni 4ac59f842f Bug 776648 - Spin buttons of histogram box do not take image precision into account
Adapt step and page increments of histogram box spin buttons adjustment according to
the number of histogram bins.
2016-12-31 16:15:08 +01:00
Øyvind Kolås 41674893b2 Bug 757686 - There is no easy way to do a radiometrically correct...
...invert operation

Add linear invert menu item, and improve invert tooltips.
2016-12-30 15:38:04 +01:00
Kristian Rietveld 7c35d75bf9 Bug 776294 - Screenshot buttons cannot be clicked
Disable the new "automatic window tabbing" feature introduced on macOS
Sierra. It breaks GTK+ applications and we would need proper support for
this in GTK+ if we want to use it.
2016-12-28 16:14:40 +01:00
Michael Natterer af02104365 app: s/gegl:color-reduction/gegl:dither/ in sanity.c and gimpgegltool.c 2016-12-26 18:55:08 +01:00
Michael Natterer 9d4fad1f18 Bug 776503 - brightness-contrast in split preview mode changes...
...parameters of the tool

Take GimpFilterTool's split preview guide into account when starting a
drag to change the tool's parameters.
2016-12-26 17:50:11 +01:00
Michael Natterer fc9da4c9a3 app: allow to toggle the histogram dialog between gamma and linear
Change GimpHistogram to take a "gboolean linear" parameter and always
honor that parameter, so both kinds of histograms can now be created
for all drawables.

Add a horrible "Linear" toggle to the histogram dockable which always
defaults to the active layer's actual pixel format, but can be
switched at any time. This UI is ugly and needs to change.

On the PDB, default to gamma-corrected if the plug-in is unaware of
higher precision, and to the drawable's native pixel format otherwise.

Other places using histograms (e.g. levels, curves) are unchanged.
2016-12-26 17:32:17 +01:00
Øyvind Kolås 5627ad589f app: use gegl:dither instead of gegl:reduction 2016-12-24 19:40:12 +01:00
Michael Natterer 75be560e2a app: make sure the blend tools doesn't stay around on removed drawables
Set gimp_tool_control_set_preserve() to TRUE and set an appropriate
dirty_mask, just like all tools which have a permanent on-canvas state
outside of a simple press-drag-release.
2016-12-24 18:40:25 +01:00
Jehan e31f8e1195 app: fix indentation. 2016-12-22 17:05:26 +01:00
Jehan 6217527828 app: fix typo s/depecrated/deprecated/. 2016-12-21 22:50:01 +01:00
Massimo Valentini 99050ecee6 Bug 769022 - Improve text along path when path is short.
Extend the text along the tangent of the last path stroke.
2016-12-21 22:35:17 +01:00
Jehan 3fa016fb4b app: clean out tab indentations. 2016-12-21 04:05:32 +01:00
Jehan 3b41d16086 app: cleaned out tabs. 2016-12-20 16:20:42 +01:00
Michael Natterer 31869cb255 app: hide double precision from the Image -> Precision menu
unless the image actually *is* in double precision (e.g. due
to being imported from a double precision file).
2016-12-12 11:53:22 +01:00
Michael Natterer 3710c0dd0c app: hide double precision from File -> New and from templates 2016-12-12 11:52:35 +01:00
Michael Natterer aaa9ae1ada Bug 698278 - Preferences|Reset ignores /etc/gimp/2.0/gimprc
Make gimp_rc_load() public as gimp_rc_load_system() and
gimp_rc_load_user() and call gimp_rc_load_system() from the
preferences dialog's reset code.
2016-12-11 20:19:42 +01:00
Michael Natterer 350c6ca1f7 Bug 775134 - mypaint-brush: Saved color in a brush isn't taken into account
gimp_mybrush_core_create_brushes(): don't set the current FG or BG on
the brush if its RESTORE_COLOR setting is 1.0 (TRUE).
2016-12-11 19:39:33 +01:00
Michael Natterer 619a885696 Bug 775391 - Collapse "Radius" widget when "Sample average" is unchecked
Use gimp_prop_expanding_frame_new() for the widgets.
2016-12-07 12:51:48 +01:00
Jehan afccaa9105 Bug 775646 - Levels Tool: handles difficult to read with dark theme.
The white, gray and dark sliders of GimpHandleBar have a black contour.
This makes the white and gray slider visible even with similar colored
background. On the other hand, the black slider is barely visible on a
dark background (and could even be made totally invisible using the same
color). So let's use a light-gray contour on the dark slider, making now
all sliders working with any background color.
2016-12-07 01:40:43 +01:00
Michael Natterer c3510405c4 app: make sure fg, bg, brush, pattern etc. changes don't write gimprc
gimp_dialog_config_fill,stroke_options_notify(): ignore notifications
on the fill and stroke option's parent class properties, they are not
serialized and completely irrelevent here.
2016-12-06 19:24:11 +01:00
Jehan f296988665 Bug 775396 - Delete Layer/Channel/Path should be consistently the last...
option in respective dialogs.
2016-12-04 19:25:00 +01:00
Alexia Death 43681a6d4c app: flush blur cache and other caches when invalid 2016-11-29 21:25:25 +02:00
Jehan 52ad5bb2a1 app: remove focusability of toolbox buttons.
Commit c83ee61 got overridded by commit b5cc2a9.
Reintroducing the changes.
2016-11-28 15:55:03 +01:00
Alexia Death 724b2a571f app: fix a bug introduced in blur cacheing 2016-11-27 15:39:27 +02:00
Alexia Death a4dee3e281 app: disable hardness blur for pipes, fix other pixmaps to blur only pixmap 2016-11-26 21:21:01 +02:00
Alexia Death 0c04275a32 app: cache bitmap brushes expensive hardness and disable dynamic change 2016-11-26 19:11:26 +02:00
Alexia Death 61475fba83 bug 771621 hardness blur cliping is avoided by shrinking the stamp first 2016-11-26 12:06:16 +02: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
Thomas Manni ecc49ed9c6 iscissors: ensure first and last isegments are distinct before closing the curve 2016-11-25 07:44:49 +01:00
Jehan 4a9a0723f5 Revert "app: handle gtk_accel_map_change_entry () failure..."
This reverts commit eab4929a78.

Oups it would seem gtk_accel_map_change_entry() could return FALSE even
when the expected shortcut is correctly set (my guess is that it was
already the same shortcut, so indeed no "change" happened, though it is
not a failure either; yet I haven't checked if that is the actual
reason).
Let's just revert this. It's not always a good thing to be too thorough!
Sorry for this!
2016-11-25 06:14:04 +01:00
Jehan 84ee79c71d app: clean out many tabs under app/core/. 2016-11-25 05:51:03 +01:00
Jehan 31ae4238d2 app: do not allow Alt+[0-9] shortcuts.
These are used for display switching, and even though you could
remap these shortcuts, it would work only until you close an image,
open a new one, or reorder tabs in SWM, in which case your shortcut
would end up forcefully overrided, which is a bad user experience.
If we want to give more flexibility and allow one to map these
shortcuts, we must also make sure the display showing actions won't
override customized shortcuts. In the meantime, it is better to
simply forbid these in our preferences.
2016-11-25 05:41:23 +01:00
Jehan eab4929a78 app: handle gtk_accel_map_change_entry () failure...
... for "windows-display-*" actions.
I should not happen, but let's be thorough and properly handle failure
with a message since this is a runtime issue.
2016-11-25 05:16:35 +01:00
Jehan 2081de5a6c app: remove transient actions with gimp_action_group_remove_action().
gtk_action_group_remove_action() removes the action from the group while
not actually cleaning any accelerator. This is a problem for transient
actions which have only a meaning within the current session, such as
the display switching actions named with the display ID (unique within
the session only).
Current commit, combined with the previous one (commit c0ee959), fix
"windows-display-*" actions being saved inside menurc.
2016-11-25 04:50:09 +01:00
Jehan c0ee95995f app: save menurc after having deleted all the displays.
Some actions are not meant to be saved, in particular the
"windows-display-*" which have only a meaning during a same session
since display IDs are session-dependent. So let display deletion
happen first so that proper cleaning of action is done when writing
menurc.
2016-11-25 04:48:01 +01:00
Jehan 94a5b7c97a app: cleaning out tabs. 2016-11-25 01:42:47 +01:00
Michael Natterer 6131b00b54 Bug 774890 - "Keyboard shortcuts" dialog does not show all actions
Revert "app: action search should search accross all available actions."

This reverts commit 53b3673bd8.

Had to revert these two commits, quoting comment 6 of the bug:

Thinking again, that entire change is unfortunately wrong, the only
right UI manager is in fact

gimp_ui_managers_from_name ("<Image>")->data

because it's the global popup <Image> UI manager which is independent
of a display and it always in the right state for the currently
active image, all other UI managers are wrong.
2016-11-24 21:08:34 +01:00
Michael Natterer 1517a0952b Bug 774890 - "Keyboard shortcuts" dialog does not show all actions
Revert "app: do not show the actions from <Dockable> GimpUIManager."

This reverts commit b795ae2296.
2016-11-24 21:07:53 +01:00
Michael Natterer 5e71512ddf app: indentation in gimpdockable.h was horribly broken 2016-11-24 20:14:54 +01:00
Jehan 7a60fd0d7b app: better defaults for image dimension.
Current defaults are from another time. Acceptable defaults could be
common screen resolutions. 1366x768 is apparently the most common
(according to various stats on the web), but since we target advanced
graphics artists, let's go for 1920x1080, which is the second most
common resolution, also known as Full HD.
For unstable builds, let's have at least one odd number, uncommon ratio
and higher values, encouraging tests with less common numbers and bigger
images. I chose 2001x1984. Feel free to update to any other funky values
following these "unstable" rules.
2016-11-24 01:05:58 +01:00
Jehan 391908079a Bug 774906 - Replace File>New default ppi of 72...
... with something more suitable.
72 PPI is from a time where people thought this was a common screen
resolution. This is not the case nowadays, and anyway images targetted
for screen display should not bother with PPI resolution at all, only
with actual pixel dimensions.
PPI resolution is more useful for printing. And for this case, 300 is
quite an accepted OK value for most cases. So this is likely a better
default for GIMP.
2016-11-24 01:03:59 +01:00
Alexia Death cb27605482 app: hardness overrides identity matrix on brush transform 2016-11-23 22:30:37 +02: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
Jehan b795ae2296 app: do not show the actions from <Dockable> GimpUIManager.
<Dockable> has this whole list of actions named similarly to dialogs-*
actions, and we don't want these to take precedence, especially since
they would always create a new dock instead of just showing the existing
one if already present.
Also fix the redundancy check on already added actions.
2016-11-23 07:58:18 +01:00
Jehan 877b0244b5 app: minor indentation fix. 2016-11-23 07:01:41 +01:00
Jehan a68edf51c6 app: tab cleaning. 2016-11-23 06:04:19 +01:00
Jehan 53b3673bd8 app: action search should search accross all available actions.
It was only searching through the "<Image>" GimpUIManager, so several
action groups were ignored, for instance all palettes-* actions.
2016-11-23 04:01:30 +01:00
Jehan 754034146d app: plug-in-repeat and plug-in-reshow were renamed...
... in commit ac50da2a, respectively into filters-repeat and
filters-reshow.
2016-11-22 22:55:50 +01:00
Jehan f5c06a2d38 app: string which should be translated too.
There is no reasons not to translate the "occurs" text which will be
in the color names in palettes extracted from images. It indicates on
how many pixels a given extracted color was occuring. We should also
translate the full string (not just "occurs") since some language will
have to reorder words, and may even use different bracket characters.
So I also add a translator comment to make sure the translators get
what the %s and %d stand for in this string.
2016-11-22 22:42:27 +01:00
Jehan ced32ceabf app: some tab cleaning. 2016-11-22 22:22:59 +01:00
Michael Natterer 21ab694715 Bug 754171 - cmd - missing modifier key to configure input controllers
Forgot GimpControllerMouse when fixing this bug. Also apply
the cleanup from the commit below.
2016-11-22 19:46:24 +01:00
Michael Natterer fb1dcd0239 app: clean up gimp_controller_keyboard,wheel_scroll()
to not use two nested if()s, and always return the result of
gimp_controller_event() when an event matches.
2016-11-22 19:43:51 +01:00
Jehan 3e85121eb9 Bug 774733 - segmentation fault when discarding text information.
Always check pointer before dereferencing it, when it can be NULL.
2016-11-21 20:42:56 +01:00
Jehan 2a232398c4 app: check and clean out duplicate accelerators on startup.
Duplicate accelerators are not supposed to happen. It is not possible
to set them through the GUI in particular. Nevertheless
gtk_accel_map_load() would apparently let duplicates pass, which could
happen after editing the menurc directly, or using the development
version (no action name migration happens there), or simply after a
potential bug. This is then very annoying because you may see several
actions displaying the same shortcut but only one actually work. And
trying to re-set through GUI the shortcut to the one action you wish to
run does not fix the duplicate issue (you have to laboriously find which
other action use the same accelerator and delete it first).
Better be safe than sorry and make a quick check at startup, then delete
the accelerator on one of the duplicates (you can't guess which one was
actually wanted, but at least you will facilitate manual reset through
the GUI).
2016-11-21 17:06:16 +01:00
Jehan 0cccc20c0a app: delete duplicate accelerators.
Redundant accelerators were:
- <Primary><Shift>y on dialogs-mypaint-brushes and edit-strong-redo.
  Since the <Primary>z vs <Primary>y has quite a strong history for
  undo/redo actions, and dialogs-mypaint-brushes is quite new, let's
  unmap the latest.
- <shift>l on tools-seamless-clone and tools-unified-transform.
  Since the Seamless clone tool is still in the playground and we
  don't even know if it will make it out quite soon, let's give
  priority to the Unified Transform tool.
2016-11-21 15:59:20 +01:00
Jehan d22af8fb38 app: cleaning out some tabs. 2016-11-20 00:40:07 +01:00
Jehan 1ce279dbfe app: s/"Paste Buffer as _New"/"Paste Buffer as _New Image"/
To differentiate with "Paste Buffer as New _Layer".
2016-11-20 00:15:26 +01:00
Michael Natterer 571f5c86b3 Bug 689750 - Crash on shrinking a selection by an invalid value
Limit selection shrinking to MIN (sel_width, sel_height) / 2, larger
values make no sense.

Limit selection bordering to the same value and growing to
MAX (image_width, image_height).
2016-11-17 12:57:08 +01:00
Jehan a4ff65cbad app: replace gtk_hbox_new() by gtk_box_new().
This is a wrapper for the GTK+3 migration.
2016-11-17 00:46:29 +01:00
Michael Natterer 5129b8519b app: don't g_warning() on filenames that can't be turned into UTF-8
gimp_data_get_identifier(): use g_printerr() instead.
2016-11-16 15:30:44 +01:00
Michael Natterer 82a2754540 Bug 343090 - Most brushes and all patterns appear renameable but aren't
Introduce virtual function GimpViewable::is_name_editable() and class
member "gboolean name_editable" for the default value. Default to
FALSE and only return TRUE if the name can actually be edited by the
user.

When attemting an edit, check the new API and beep instead of starting
the edit.
2016-11-16 15:13:08 +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 014fdb87e5 app: make switching paint tools to color picker mode more robust
Don't rely on the exact modifier being pressed or released. Instead,
check if only the right modifier is pressed after *each* modifier
change, and switch to color picking if it is; disable color picking
otherwise. This greatly reduces the risk of missing the user's wish to
pick colors because of other modifiers being pressed and released in
whatever order.

Probably fixes bug #734743.
2016-11-16 13:16:24 +01:00
Michael Natterer 61f91c7cd2 app: be more deterministic in a list view's name column (name editing etc.)
We handle multi-selection by letting GtkTreeView handle button press
when the widget is in GTK_SELECTION_MULTIPLE mode. Change that code to
only do that when one of the participating modifiers (shift and
control on Linux and Windows, shift and cmd on macOS) is pressed.

This makes sure that the same thing is not randomly handled by two
different pieces of code, and probably fixes bug #738440, tho I can't
be sure.
2016-11-16 13:02:09 +01:00
Michael Natterer a694fdd152 app: fix warning in xcf_save_prop(): xcf_write_int32() takes guint32* 2016-11-15 18:43:51 +01:00
Michael Natterer 1415a78fa1 Bug 774383 - Text layer created by gimp-text-fontname doesn't...
...respect border when resized

gimp_text_layout_new(): in FIXED box mode, subtract (2 * border) when
setting the layout width.
2016-11-15 13:23:00 +01:00
Michael Natterer 4f9095798d Bug 769738 - Add color tags/labels for layers/channels/paths
Forgot to add XCF saving and loading of color tags.
2016-11-14 23:02:43 +01:00
Michael Natterer 54dc424b31 app: better progress indication in gimp_babl_init_fishes() 2016-11-14 19:58:20 +01:00
Michael Natterer 702d050fe3 app: minor indentation fix in gimpdrawablefilter.c 2016-11-14 19:57:42 +01:00
Richard Gitschlag b27cdfa99a Bug 644032 - Color banding in Hue-Saturation with overlap
When calculating an overlap between two ranges, interpolate the hue
adjustment from config->hue[primary_range] and
config->hue[secondary_range] BEFORE mapping it to the input value.
This fixes odd edge cases where only one of the ranges crosses the
red/magenta wraparound, or if adjustments to different channels yield
more than 180 degree difference from each other.
2016-11-13 10:56:15 +01:00
Øyvind Kolås 3bc2d25ccd app: preinit more fishes commonly used for filters on u8 images 2016-11-11 13:55:05 +01:00
Michael Natterer 17ac37ef8e app: pass a status_callback to gimp_babl_init_fishes()
and make it report progress. Also call it at the end of initialization.
2016-11-11 13:09:12 +01:00
Michael Natterer 7386ed4a19 Revert "app: initialize GEGL after showing the splash"
This reverts commit 93da8ca8b6.
2016-11-11 12:34:10 +01:00
Michael Natterer 49b47674f6 Revert "app: move the call to gimp_gegl_init() to gimp_real_initialize()"
This reverts commit 99c040095d.
2016-11-11 12:33:39 +01:00
Michael Natterer 0788db4702 app: split babl fish creating to a separate function gimp_babl_init_fishes()
and call that function later in gimp_real_initialize() so the splash
is always fully drawn when it's called.
2016-11-11 01:06:14 +01:00
Øyvind Kolås 99b9a60e8b app: pre-initialize some babl fishes 2016-11-11 00:54:04 +01:00
Michael Natterer 99c040095d app: move the call to gimp_gegl_init() to gimp_real_initialize() 2016-11-11 00:48:30 +01:00
Michael Natterer 93da8ca8b6 app: initialize GEGL after showing the splash
It will soon become more expensive, so the splash should be
visible already.
2016-11-10 23:57:28 +01:00
Michael Natterer 7abe5ddb95 app: move the gamma setting to the top of the convert precision dialog
and don't show the dithering options if they can't be selected,
instead of just making them insensitive.
2016-11-10 23:43:27 +01:00
Michael Natterer ccf151446d app: cleanup enum order and comments in the dither GUI code 2016-11-10 23:19:12 +01:00
Øyvind Kolås 30a8edeab5 app: treat half precision float the same as single and double
.. which is to say encourage use of linear gamma, by making it one fewer step
to end up in linear than gamma corrected.
2016-11-10 15:20:18 +01:00
Michael Natterer da49a3fadf app: always default to linear for float precision and gamma for 8-bit
In the "New Image" and "Convert Precision" dialogs. The "Gamma/Linear"
switches get adjusted automatically to the new defaults, but can be
changed manually.
2016-11-10 13:50:56 +01:00
Michael Natterer 0631f1c629 Bug 735895 - Precision Conversion "Dithering" dialog
Don't offer dithering options when converting to 16 bit, it doesn't
make much sense to dither for anything but 8 bit. Thanks to Elle for
testing that this assumption is indeed true.

Use a properly commented #define instead of just a hardcoded "8 bits"
to make clear that this is a pure GUI "restriction".
2016-11-10 12:14:40 +01:00
Michael Natterer e3115f1565 Bug 774155 - gimp crashes on pressing OK in grid configuration
Pass the right user_data to grid_dialog_response().

Unrelated: call gimp_image_flush() so the menus get updated after
confirming the new grid.
2016-11-10 01:06:59 +01:00
Michael Natterer 91df48ef37 Bug 735895 - Precision Conversion "Dithering" dialog
Disable the convert precision dialog's dithering controls when
converting to higher bit depths o to anything > 16 bit.

Make sure the disabled dithering widgets always says "None", which
implies duplicating the bit depth checking logic in both the dialog
and its callback, in order to protect the values in GimpDialogConfig
from being overwritten by NONE.
2016-11-09 13:10:56 +01:00
Michael Natterer 56ce447bc9 Bug 735895 - Precision Conversion "Dithering" dialog
gimp_drawable_convert_type(): never dither when converting to a higher
bit depth, or to anything more than 16 bits.
2016-11-09 12:45:52 +01:00
Michael Natterer ab5a27d74a app: CLAMP(bits, 1, 16) in gimp_gegl_apply_color_reduction()
which is the range of the GEGL op's properties.
2016-11-09 12:33:13 +01:00
Michael Natterer 4f6dd8a66f app: reorganize GimpTemplateEditor's "Precision" controls
to have separate "precision" and "gamma" widgets, like the image's
"Precision" menu.
2016-11-09 12:21:39 +01:00
Michael Natterer 2f7009d427 app: add 'component-type' and 'linear' properties to GimpTemplate
The new properties are "virtual", they share their storage with the
"precision" property and are not serialized, they are meant for GUI
property widgets.
2016-11-09 12:03:38 +01:00
Michael Natterer c1ae0864de app: add gimp_babl_linear()
which completes gimp_babl_component_type() and gimp_babl_precision().
2016-11-09 12:02:12 +01:00
Michael Natterer ad7259beb7 Bug 772317 - Change detach icon of transform tools on-canvas dialog
Use GIMP_STOCK_DETACH which looks horrible but is the right icon and
can be fixed by the icon masters.
2016-11-08 17:36:07 +01:00
Alexis Wilhelm 768d06614f Bug 316479 - The Perspective Tool creates an empy image...
...instead of transforming it

Add gimp_matrix3_will_explode() which determines if a transform
matrix will blow up something in a rectangle to infinity, and use
the function so set both the GIMP and GEGL code paths to clip the
transform to the input size.
2016-11-08 17:26:21 +01:00
Michael Natterer ac2b9a5e41 configure.ac: require gegl >= 0.3.10
which will be good enough for about five minutes...
2016-11-08 17:07:54 +01:00
Michael Natterer 7c29077acd app: allow to remove the last added IScissors segment with backspace 2016-11-08 13:45:12 +01:00
Michael Natterer 87d38194d7 app, pdb: use GeglDitherMethod instead of simply an integer 2016-11-07 20:41:39 +01:00
Michael Natterer c767179ced app, pdb: fix bug in recent gimp-drawable-threshold change
Actually use the passed ranges again, instead of using uninitialized
local variables.
2016-11-07 20:27:36 +01:00
Michael Natterer 5e2a61850e app: file_open_image(): fix opening of unknown remote files
This got lost when dropping the file-uri plug-in and switching to
interal download using GIO. The file-uri plug-in would just download
whatever remote thing and open it locally, using local magic matching.

We now do the same internally and try the magic matching again on the
downloaded file.
2016-11-07 18:35:48 +01:00
Michael Natterer 2a9b20d384 Bug 772789 - Mac DMG 2.8.18 gets plug-ins path wrong, can't open JPEG files
Don't migrate any paths from an older gimprc. This unfortunately kills
all manually added paths, but makes sure all paths default to the
files of the new GIMP version, could be improved by parsing the path
and replacing only the right elements.
2016-11-07 17:04:05 +01:00
Michael Natterer 483c282687 Bug 766988 - Colors applied to images are not color managed
Add color management to GimpDrawableFilter and GimpFilterTool, GEGL
ops applied to drawables can be applied in color managed space
now. Sadly, this is very slow, so disabled by default.

I'm sure the profile guessing based on the operation's format doesn't
always work, but this general bug counts as fixed now.
2016-11-07 15:39:48 +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
Jehan 123a9092ed app: fix the angular value when tilt_y == tilt_x == 0.0.
Further improves commit bb17853. We can see in the generic tilt
computation that if tilt_y is 0, whatever the value of tilt_x, tilt
becomes 0.
2016-11-07 13:39:09 +01:00
Michael Natterer be66d1a2be app: make an assertion more correct in GimpDrawableUndo 2016-11-07 13:10:21 +01:00
Jeremiah Darais bb1785396f Bug 760737 - Brush angle jumps when tablet pen is tilted horizontally.
Fix cursor rotation jump when tablet pen is tilted horizontally.
This changes to the correct values for the special case of tilt_x == 0.0.

Reviewer (Jehan)'s note: computing the convergence of the tilt function
in the `else` block, when tilt_x approaches 0, tilt value indeed
converges to 0.25 with tilt_y > 0 and 0.75 (or -0.25 which is the same)
with tilt_y < 0.
2016-11-07 02:51:04 +01:00
Michael Natterer bcdd2e8d1a app: cleanup in GimpOperationProfileTransform 2016-11-06 21:08:10 +01:00
Jehan 58d84f6ebe Bug 750178 - Remove "again" from "Export the image again".
This "again" is meaningless in this context.
2016-11-06 20:57:41 +01:00
Jehan 4a0653e12d Bug 773960 - smudge tool not working in tiling symmetry.
Initialization was failing when a paint buffer could not be returned for
a stroke (which was bound to happen in tiling). Instead it must just
ignore the coordinates which won't result in painting, and continue to
the next ones.
2016-11-06 17:14:55 +01:00
Michael Natterer 7c2bfd3246 Bug 745313 - Description of Equalize wrong in PDB
gimp_drawable_equalize(): is mask_only is FALSE, suspend the selection
around gimp_drawable_apply_operation() so the operation affects the
entire drawable.
2016-11-04 22:28:59 +01:00
Michael Natterer 3c7fbe93b3 app: make gimp_item_mask_bounds() and _intersect() honor a suspended selection
and remove the same check from the stroke and fill code.
2016-11-04 22:28:59 +01:00
Hartmut Kuhse 146b7bde86 app: typo: make string translatable 2016-11-04 16:23:33 +01:00
Hartmut Kuhse 4d1dd479ca Revert "Update German translation"
This reverts commit 750aa5a495.
2016-11-04 15:44:59 +01:00
Hartmut Kuhse 750aa5a495 Update German translation 2016-11-04 15:03:46 +01:00
Michael Natterer 1449d3cb8f app: remove the "Recent Filters" actions from action search again
The code was still checking for "plug-in-recent-*". Also, rename the
actions to "filters-recent-*" instead of "filter-recent-*" for
consistency with the other filters actions.
2016-11-03 22:37:13 +01:00
Michael Natterer 3cef404e20 app, pdb, libgimp: allow to choose the channel when thresholding
so the threshold can now be based on the GimpHistogramChannel enum.
Add a channel menu to the threshold dialog and a channel argument to
the PDB procedure (which is new in 2.10).

If I hadn't forgotten what the "RGB" channel is supposed to do I would
have implemented the RGB mode in GimpOperationThreshold correctly.
Right now I'm just guessing. Anyone?
2016-11-01 22:45:37 +01:00
Michael Natterer 3307c71966 pdb, app, libgimp: change ranges for histogram and threshold to 0.0..1.0
They used to be 0..255, inherited from the old gimp_histogram() and
gimp_threshold() procedures. This commit deprecates these old
procedures and changes the ranges in the new gimp_drawable_histogram()
and gimp_drawable_threshold() to double with a 0.0..1.0 range.
2016-11-01 20:57: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 b4120e3f61 Bug 767650 - Uncommitted scissors selection is discarded on tool change
gimp_iscissors_tool_commit(): if the curve is not closed, close and
recalculate it.
2016-10-30 23:08:13 +01:00
Michael Natterer bc6679974b app: clean up template-options-dialog like other dialogs 2016-10-30 20:54:47 +01:00
Michael Natterer d551a675fa Bug 773460 - Color Picker shows wrong values
Remove rounding from the RGB, HSV and CMYK modes of GimpColorFrame,
and add one decimal digit.
2016-10-30 19:28:24 +01:00
Michael Natterer 9f9307edcb app: color manage the new color tag color areas 2016-10-30 18:05:57 +01:00
Michael Natterer 967ac88c35 app: remove the "edit" button from GimpItemTreeView
the layers and paths dialogs were already hiding it, now it's gone
also from the channels dialog. It was redundant anyway.
2016-10-30 17:36:32 +01:00
Michael Natterer bd8f15a758 app: reduce code duplication in the filling/stroking code
Move most of the fill/stroke callback code to items-commands.[ch] and
call the new functions from the respective selection and vectors
files.
2016-10-30 17:02:59 +01:00
Michael Natterer 31fcd79dd9 Bug 769738 - Add color tags/labels for layers/channels/paths
Add property "color-tag" of type enum GimpColorTag to GimpItem so all
layers, channels and paths can be tagged with a color.

For interoperability, use the color list from Krita which is a
superset of Photoshop's colors.

Features a "Color Tag" submenu in the layers, channels and paths
menus, a row of color radio buttons in the properties dialogs,
undo and PDB API.

As a side effect, some common code is now factores out into
items-actions.[ch] and items-commands.[ch] which adds visible, linked
and lock actions for layers and channels.
2016-10-29 17:02:16 +02:00
Michael Natterer afedbd0010 app: set "always-show-image" on some menu items generically
- the GimpDockBook item which has the current dockable's menu as submenu
- all menu items which have colors or previews as images
2016-10-28 23:11:44 +02:00
Michael Natterer 440a1bae82 app: one more round of general dialog cleanup
- consistent coding style
- hide public structs
- add callbacks to move logic out of app/dialogs/
2016-10-27 21:26:07 +02:00
Michael Natterer f47c012ab5 app: fix layer-options-dialog.c return width and height again
Being able to create layers is important...
2016-10-27 21:00:14 +02:00
Michael Natterer b81b60950b app: bring the "Switches" column to the channel and path properties dialogs
Introduce item-options-dialog.[ch] which abstracts this away and use
it from the layer, channel, vectors options dialogs. This is all
pretty ugly but better than duplicating that code three times. The
vector-options-dialog is now completely pointless but I kept it anyway
for now, let's see what unique path options we come up with.
2016-10-26 16:51:56 +02:00
Alexandre Prokoudine 1133a8bff3 Makes 'Switches' in the Layer Attributes dialog translatable 2016-10-25 01:09:29 +03:00
Michael Natterer 6813dd0975 app: consistent titles for the new channel and new path dialogs. 2016-10-23 23:01:47 +02:00
Michael Natterer 9a969a2b53 Bug 770901 - Improve the "New Layer" and "Layer Attributes" dialogs
Add toggles for visible, linked, lock pixels, lock position, lock alpha.
2016-10-23 22:45:08 +02:00
Michael Natterer 5ce223b552 app: cleanup in GimpEditSelectionTool
Rename and reorder members to be more clear. Move variables to local
scopes. Minor code reorganization.
2016-10-23 17:49:47 +02:00
Michael Natterer 3518a15064 Bug 770901 - Improve the "New Layer" and "Layer Attributes" dialogs
Add "Mode", "Opacity" and "Offset" controls to the dialogs. Remember
the "New Layer" mode and opacity in GimpDialogConfig.

Also addresses bug #361810.
2016-10-21 22:54:10 +02:00
Michael Natterer ca2156ee35 app: language.c contains no translatable strings, remove "gimp-intl.h" 2016-10-21 18:44:39 +02:00
Michael Natterer 34eff7322e Bug 599573 - Remember dialog defaults between Gimp sessions
Add resize and fill options for the "Layer Boundary Size" and
"Canvas Size" dialogs to GimpDialogConfig.
2016-10-20 00:31:59 +02:00
Michael Natterer bfeb93afe6 app: add a tooltip to the resize dialog's "resize text layers" toggle
"Resizing text layers will make them uneditable"
2016-10-19 12:56:50 +02: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 fce404cea2 app: minor formatting paranoia in GimpContainerTreeView 2016-10-18 20:19:52 +02:00
Michael Natterer b8bb52b721 Bug 773058 - Enable grid views of dynamics and tool presets 2016-10-17 18:43:22 +02:00
Michael Natterer 3dc5d3da9f Bug 155164 - Merge Palettes is unimplemented
We have multiple selection in lists, so finally fix merge palette.
2016-10-17 09:25:51 +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 3a52bf4cce Bug 731279 - Tool Preset Editor not working correctly
Call gimp_context_tool_preset_changed() on the global user context,
not on the tool preset list's or tool preset editor's local
context. Fixes restoring of presets in MWM. Tracked down by Jose
Americo Gobbo.
2016-10-13 11:36:51 +02:00
Michael Natterer 3d1c5641f7 Bug 731279 - Tool Preset Editor not working correctly
Have "Save" and "Restore" buttons in both the tool preset list/grid
and the tool preset editor. The save button stores the active tool's
options in the preset, if possible.
2016-10-12 23:51:24 +02:00
Michael Natterer b8db0aa54e app: actually edit the template's color profile in GimpTemplateEditor
The "add default profile of image type" code was resetting it without
implementing the FIXME of setting it again. Spotted by Elle.
2016-10-12 23:48:06 +02:00
Michael Natterer 33276a000e app: add precondition check on "object" in gimp_context_set_by_type() 2016-10-12 22:44:19 +02:00
Michael Natterer 2e1a5bcba9 app: don't leak GimpTemplate's "color_profile" GFile in finalize() 2016-10-12 21:56:14 +02:00
Michael Natterer f722bc99d2 app: remove GimpDataEditor's save button, it was useless and confusing 2016-10-12 20:43:35 +02:00
Michael Natterer d1e3d7c5c7 Bug 731279 - Tool Preset Editor not working correctly
This fixes restoring of brush properties (size, spacing angle etc.)
from presets, which was utterly broken before. The fix consists of
two parts:

- In tool_manager_preset_changed(), always copy the brush properties
  again after setting the preview on the tool options, in order to
  override brush properites that get copied from a linked brush when
  that brush gets set on the tool options.

But no amount of copying stuff again and again would help without:

- In gimp_context_set_by_type(), don't use g_object_set() to set the
  object (brush, pattern etc.). Instead, build a GValue and call
  gimp_context_set_property(). This may seem odd, but avoids a
  g_object_freeze_notify()/thaw_notify() around the g_object_set(),
  which was causing "notify" to be emitted at the very end, after
  everything this context change has triggered. GimpContext is an
  essential core object and there is an expectation of a reasonable
  order of signal emissions and callbacks being called. The "notify"
  at the end was keeping any callbacks of the context's "foo-changed"
  signals to override anything an earlier callback had done, if a
  "notify" callback was overriding that overriding again.

This was probably the reason for a lot of odd behavior observed over
the years. In fact, I have been searching for this for at least 5
years.
2016-10-12 20:33:23 +02:00
Michael Natterer 184f0929ce Bug 771678 - Parametric Brush Aspect Ratio and Angle values...
...are not submitted to respective Tool Options sliders

Treat brush angle and aspect ratio like all other paint options values
that can be linked to brush defaults and take their default values
from the brush. They were special casing their defaults to constants,
and GimpBrushGenerated was adding the passed dynamic radius and aspect
values to its own. This was totally incomprehensible.

Now GimpBrushGenerated's transform_size() and transform_mask()
implementations just translate between these APIs value ranges and the
brush's own value range and only use the passed values (not the
brush's native values), which makes the editor <-> tool options
interaction and the painted brush shape predictable.

Also connect the active brush's property notifications to the paint
options properties, so the paint options follow a brush edit live if
the respective "linked" toggles are checked.

And some cleanup.
2016-10-12 00:21:12 +02:00
Michael Natterer dc0ffa4891 Bug 764024 - Allow to choose fill color when resizing layers and images
Add a fill type combo to the crop tool options, only visible
when "Allow enlarging" is checked.
2016-10-10 00:21:36 +02:00
Michael Natterer 997ae1e28b Bug 764024 - Allow to choose fill color when resizing layers and images
Add a GimpFillType argument to GimpItem::resize() and fill type
widgets to the canvas and layer resize dialogs. Fill the new parts of
the drawable according to fill type in gimp_drawable_resize(). Make
sure places that need the old behavior get GIMP_FILL_TRANSPARENT
passed by hardcoding it in the GimpItem::resize() implemetations of
channel, mask, selection etc.
2016-10-10 00:02:16 +02:00
Michael Natterer a06f7e78f1 app: use BG fill in gimp_drawable_fill() if the drawable has no alpha 2016-10-09 21:30:43 +02:00
Michael Natterer f027bf53ab app: clean up the palette-import-dialog in the spirit of recent dialog cleanup 2016-10-09 21:08:21 +02:00
Michael Natterer ce639f031b app: fall back to BG fill if gimp_get_fill_params() doesn't find a pattern 2016-10-09 21:07:08 +02:00
Michael Natterer be6a47e750 app: some more cleanup in IScissors
Move quite some code to new functions of ICurve, preparation for
getting rid of a bunch of outstanding IScissors inconsistencies with
other tools.
2016-10-09 17:19:42 +02:00
Michael Natterer e9e1bc1e22 Bug 766988 - Colors applied to images are not color managed
We didn't convert patterns to the target drawable's profile when using
gimp_drawable_fill().

Introduce gimp_drawable_fill_buffer() as single filling utility
function that does things right and use it from gimp_drawable_fill()
and gimp_fill_options_create_buffer().
2016-10-09 15:53:43 +02:00
Michael Natterer 46b73bb1fa Bug 772541 - change Quick Mask Attributes mask opacity slider
Use a GimpSpinScale in channel-options-dialog.c and clean up the
dialog layout. Affects the "Quick Mask Attributes", "New Channel" and
"Channel Attributes" dialogs.
2016-10-08 17:00:38 +02:00
Michael Natterer 6ca9ebdb95 app: remove the dynamic programming buffer from the GimpIscissorsTool struct
It's only used in one function and recreated each time, so create and
destroy it locally.
2016-10-07 01:58:37 +02:00
Michael Natterer 152c5a2c44 app: change most of Iscissors to use a GimpPickable not a GimpImage
This is just cleanup and enables adding a mode that doesn't behave like
"sample merged".
2016-10-07 01:18:16 +02:00
Michael Natterer fbb6b5d425 app: cleanup in GimpFreeSelectTool
Mainly reduction of excessive micro utility functions by folding them
into their single (or two) caller(s). A bit more readable now.
2016-10-06 22:44:07 +02:00
Michael Natterer 439a3ff7bd Bug 667862 - Allow mouse to optionally configure tablet devices
Add new setting GimpGuiConfig:devices-share-tool. When TRUE, we never
copy any properties between the user context and the GimpDeviceInfo's
context, so no tool or anything changes.

We do however still keep track of the active device so the setting can
be enabled/disabled at any time. Also hide GimpDeviceStatus' tool,
brush etc. indicators in "shared" mode.
2016-10-04 22:32:08 +02:00
Michael Natterer 5cf3cf27fd app: make sure a floating selection always has its drawable's format + alpha
we were missing a conversion when pasting whole images to channels
and masks.
2016-10-04 19:49:57 +02:00
Jehan 8aa0a04854 app: keep focus on the quit dialog when saving.
Otherwise the quit dialog is still in front yet it has no focus and
one doesn't see this immediately.
Hitting ctrl-d to exit and ignore any subsequent files for instance
duplicates the current active image instead.
2016-10-04 12:15:41 +02:00
Jehan f67bc227dc app: set active shell on image cell selection in quit dialog...
... not on activation (i.e. raise on single click rather than double
click).
2016-10-04 11:42:38 +02:00
Michael Natterer ecf4af88b8 app: add "gboolean new_has_alpha" to gimp_drawable_convert_type()
making its external API "complete". Remove the redundant
"new_base_type" and "new_precision" from the internal (vfunc) API (the
Babl format has the same information).
2016-10-04 01:39:15 +02:00
Michael Natterer 3f8d55fe79 app: don't set "follow-state" on GimpCellRendererButton
The button's function doesn't change so it shouldn't look differently.
2016-10-04 01:21:52 +02:00
Michael Natterer de87b0ac68 app: disconnect the "add" and "remove" handlers on dialog destruction
Broke this in the last commit.
2016-10-02 20:36:14 +02:00
Simon Budig e1b31bd37e vectortool: one more explaining message. 2016-10-02 20:04:46 +02:00
Michael Natterer f8d816cb96 app: some cleanup in quit-dialog.c
Rename "dialog" variables to "private" like in the other recently
cleaned up dialogs. Use less complicated code when connecting to the
container of dirty images.
2016-10-02 18:10:50 +02:00
Jehan 3943d9fe63 app: give focus back to quit dialog after changing active shell.
Otherwise keyboard interaction (like hitting Escape or ctrl-d) ends up
broken and you may not realize immediately the dialog lost focus since
it is still the top window.
2016-10-02 04:10:26 +02:00
Jehan 9e9955480b app: add an extracted comment for translators on the quit dialog's text.
"There is one image" should not necessarily be translated to '1' in
other languages. It depends if their singular applies only to 1, like
in English. For instance in French, it can also apply to 0, so I fixed
the French translation.
2016-10-02 00:26:37 +02:00
Jehan f4abe9a8c0 app: s/seperator/separator/ in an extracted comment for the translators. 2016-10-02 00:07:24 +02:00
Michael Natterer 713e4071b2 Bug 770911 - Move tool should display relative coordinates in statusbar...
...when moving guides

Show relative coordinates when moving guides and sample points, the
cursor display in the statusbar already shows absolute coordinates.
2016-10-01 22:45:51 +02:00
Michael Natterer 0089a017f0 Bug 706309 - Add a “Save As” button to the “Quit GIMP” dialog
Add GimpCellRendererButton and use it to add a "Save" icon to each row
of dirty images. Click invokes the "edit-save" action, shift-click
invokes "edit-save-as". Also add a tooltip for the icon button.

Involves minor changes to GimpContainerTreeView to allow
GimpCellRendererButton to be added, and to allow external
"query-tooltip" handlers to run.
2016-10-01 21:00:39 +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 41754669e6 pdb: fix PDB compat wrappers which i just broke
and simplify them using gimp_color_config_get_rgb_color_profile().
2016-10-01 00:43:17 +02:00
Michael Natterer 0524b60228 app: consistently treat GimpColorConfig profile paths as config paths
and use gimp_file_new_for_config_path() and _get_config_path() when
dealing with them. We used a weird mix of config paths and plain
(filesystem encoded) paths, waiting to to break on umlauts or
whatever. The code in gimpcolorconfig.c was particularly bad.
2016-10-01 00:29:44 +02:00
Michael Natterer 3e84c551de app: remember the size of the prefs dialog 2016-10-01 00:20:00 +02:00
Michael Natterer eeb9364445 app: fix capitalization in prefs frame title 2016-10-01 00:19:37 +02:00
Michael Natterer e8309826b7 app, libgimpwidgets: use the new config path <-> GFile functions
Gets rid of temporary variables to hold both expanded and unexpanded
paths.
2016-09-30 22:07:00 +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 2019756747 app: add the chosen GFile to GimpColorProfileCallback 2016-09-29 23:06:46 +02:00
Michael Natterer 6464b47b9d app: reorder callbacks in view-commands.c, same order as in the header 2016-09-29 22:48:02 +02:00
Michael Natterer edc903ca32 app: add a callback to the color profile dialog
and move the image modifying calls to image-commands.c
2016-09-29 22:43:37 +02:00
Michael Natterer 062df6bd09 Bug 772025 - Incomplete toolrc file causes GIMP to hang
gimp_tools_restore(): print the error message when parsing toolrc fails.
2016-09-28 14:53:42 +02:00
Øyvind Kolås e1db36360b gegl-apply-operation: s/dither-strategy/dither-method/ 2016-09-28 12:05:41 +02:00
Michael Natterer b27f3ff460 app: don't leak the passed file in file_open_dialog_show()
That ref should have been removed in commit ff6ea69.
2016-09-28 01:14:05 +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 a6b6259b22 Bug 599573 - Remember dialog defaults between Gimp sessions
Remember the 'Indexed Color Conversion' dialog settings in
GimpDialogConfig.
2016-09-28 00:31:59 +02:00
Michael Natterer 009417e450 app: reorder and rename indexed conversion parameters to make more sense 2016-09-27 23:51:33 +02:00
Michael Natterer d5f34e7ce5 app: rename indexed conversion dither option variables and parameters 2016-09-27 22:49:05 +02:00
Michael Natterer f43760aea6 app: add a callback to the convert indexed dialog
and call gimp_image_convert_indexed() in image-commands.c where it
belongs. Also remember the default values there, they will to to
GimpDialogConfig next.
2016-09-27 15:43:25 +02:00
Michael Natterer 0932386d1b app: add a callback to the stroke dialog
and move the actual stroking code to select-commands.c,
vectors-commands.c and gimpvectorstool.c. Remember the active drawable
so the stroke always happens on the drawable the dialog was invoked
with.
2016-09-27 11:15:52 +02:00
Michael Natterer 81603eaa58 Bug 767178 - Segment fault on deleting an automatic folder tag
The GimpTaggedContainer->tag_ref_counts keeps pointers to GimpTags but
didn't ref them. Ref the tags while they are in the hash table.
2016-09-27 10:14:45 +02:00
Simon Budig 75853eec01 fix typo 2016-09-27 02:27:09 +02:00
Simon Budig c333a04f18 gimpwarptool: use the linear sampler for the warp tool to ensure crisp lines after an erase. 2016-09-27 00:37:42 +02:00
Michael Natterer 905bb370bd app: add a callback to the fill dialog
and move the actual filling code to select-commands.c and
vectors-commands.c. Remember the active drawable so the fill always
happens on the drawable the dialog was invoked with.
2016-09-27 00:01:11 +02:00
Michael Natterer bbbfe5cafc app: add a callback to the offset dialog
and move the actual offset call to drawable-commands.c.
2016-09-26 23:08:29 +02:00
Michael Natterer 2a04cc91a2 app: add a callback to the convert precision dialog
and move the image manipulation code out of convert-precision-dialog.c
into image-commands.c where it belongs.
2016-09-26 22:44:34 +02:00
Michael Natterer 98232c25a5 Bug 735895 - Precision Conversion "Dithering" dialog
Remember the convert precision dialog's dithering options in
GimpDialogConfig. Also addresses bug 599573.
2016-09-26 17:38:26 +02:00
Michael Natterer ec64dbb3b7 app: also reset the profile import policy when resetting color management 2016-09-26 00:56:40 +02:00
Michael Natterer 28c0e752b2 app: use prefs_file_chooser_button_add() for the temp and swap paths 2016-09-26 00:23:08 +02:00
Michael Natterer f07b9e17cc Bug 599573 - Remember dialog defaults between Gimp sessions
Remember the "Export Paths" and "Import Paths" dialog settings in
GimpDialogConfig, including their last used folders.
2016-09-26 00:16:47 +02:00
Michael Natterer ea98f9967e app: change gimp_pickable_auto_shrink()'s parameters
from x1, y1, x2, y2 to x, y, width, height.
2016-09-25 22:40:28 +02:00
Michael Natterer 9a9899e542 app: general review and cleanup in actions/*-commands.c 2016-09-25 22:18:37 +02:00
Michael Natterer 99319182b7 app: attach the "Reset all filters" dialog to Gimp
so it's not shown multiple times.
2016-09-25 20:32:50 +02:00
Michael Natterer 1886f556e1 app: use dialogs_attach_dialog() for the canvas padding color dialog 2016-09-25 01:24:42 +02:00
Michael Natterer 12428ea7d7 app: add dialogs_destroy_dialog(), destroys an attached dialog by its key 2016-09-25 01:23:55 +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 8ab530ffc0 Bug 599573 - Remember dialog defaults between Gimp sessions
Forgot to add the "merge visible layers" and "convert to color
profile" settings to prefs' "Dialog Defaults" page.
2016-09-25 00:33:58 +02:00
Michael Natterer da23240478 app: use gimp_enum_radio_frame_new_with_range() in the merge layers dialog
instead of "manually" building the widgets using
gimp_int_radio_group_new().
2016-09-25 00:31:41 +02:00
Michael Natterer 3c7fcf4c58 Bug 599573 - Remember dialog defaults between Gimp sessions
Remember the "Convert to Color Profile" dialog's "intent" and "black
point compensation" in GimpDialogConfig.
2016-09-24 22:54:42 +02:00
Michael Natterer e703f8482e app: make the ChannelOptionsDialog private
and provide a custom callback instead. Also attach the "New Layer",
"Edit Layer Attributes" and "Configure Quick Mask" dialogs to their
image/channel.
2016-09-24 22:10:32 +02:00
Michael Natterer c2f264f5ca app: make the LayerOptionsDialog private
and provide a custom callback instead. Also attach the "New Layer"
and "Edit Layer Attributes" to their image/layer.
2016-09-24 21:10:54 +02:00
Michael Natterer 2522c7ed02 app: make the VectorsOptionsDialog private
and provide a custom callback instead. Also attach the "New Path"
and "Edit Path Attributes" to their image/path.
2016-09-24 20:32:44 +02:00
Michael Natterer aba0b03b92 app: reorder arguments of layer,channel,vectors_dialog_new()
So common ones are before dialog-specific ones.
2016-09-24 16:05:39 +02:00
Michael Natterer 0a0f8044aa app: don't connect the print size and scale dialogs to GimpImage::disconnect
GimpViewableDialog already does that.
2016-09-24 15:13:34 +02:00
Michael Natterer d90ce3b97c app: attach the "Set Canvas Size" dialog to the image 2016-09-24 15:10:19 +02:00
Michael Natterer 8a59640b1b app: remove helper struct ImageResizeOptions
Instead, pass a GimpContext in GimpResizeCallback, it's needed
in all callbacks anyway.
2016-09-24 15:07:04 +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
Michael Natterer 1c82fc5f3c app: attach the layer scale dialog to the layer 2016-09-24 14:14:43 +02:00
Michael Natterer 905dec866e Bug 599573 - Remember dialog defaults between Gimp sessions
Remember the "Merge Visible Layers" dialog settings in GimpDialogConfig.
2016-09-24 12:33:42 +02:00
Michael Natterer 14fc49a001 app: make ImageMergeLayersDialog private and provide a cutom callback instead
and attach the dialog to the image so we can't have multiple dialogs.
2016-09-23 19:44:11 +02:00
Michael Natterer 88b60e9947 app: make gimp_edit_paste() do what its told to do
Don't change the paste_type to NEW_LAYER just because there is a
complex thing in the clipboard. Instead, honor the request to paste
FLOATING or FLOATING_INTO and reduce the pasted thing to a simple flat
layer. Also remove the message and paste_type change from edit_paste()
in edit-commands.c, it had the same purpose, just with a user
notification.

In order to paste the full layer one needs to explicitly invoke
"Paste as new layer" now.

It still changes the paste_type to NEW_LAYER if it's impossible to
attach a floating selection to the target, the menu item was simply
insensitive before.
2016-09-23 16:49:11 +02:00
Michael Natterer 41a64b7a63 app: make the LayerAddMaskDialog struct private
Instead, provide a custom GimpAddMaskCallback, connect to "response"
internally and call the callback. Takes clutter out of layers-commands.c.
Also attach the dialog to the layer so we don't show multiple add
mask dialogs. Should do the same to all dialogs with public structs,
the custom callback approach keep things more encapsulated.
2016-09-23 14:35:14 +02:00