Commit Graph

504 Commits

Author SHA1 Message Date
Michael Natterer 58802a7109 modules: port to GtkWidget::draw() 2018-05-20 21:06:27 +02:00
Michael Natterer 898ce055f6 modules: s/GtkObject/GtkAdjustment/ 2018-05-20 21:06:26 +02:00
Ell fa25b476be icons, modules, libgimpwidgets: add clip-warning display filter icon
... and use it instead of gimp-warning.
2017-11-23 13:34:49 -05:00
Ell 1e6f82d9f0 modules: in colorblind, change "deficiency" prop to "type"
With the new propgui UI, the property nick is used as the combo's
label; since the descriptions of the corresponding enum values are
quite long, using "deficiency" as a label for the prop is
problematics, especially for some translations.

Change the property name and nick to "type", and align the code
with the change.

Also, change the property's blurb from "color deficiency type" to
"color vision deficiency type".
2017-11-12 18:27:13 -05:00
Ell e2fb7a41c6 modules: various changes in clip-warning
Replace "Show NaN" option with "Show bogus".  Bogus values include
infinities, in addition to NaN.

Don't blend the bogus warning color with other warning colors, when
a pixel has both a bogus component, and a shadow/highlight
component.  The bogus warning always takes precedence.

Rename "Include alpha" option to "Include alpha component".

Remove "Opaque" option.  Warnings are now always opaue, even for
non-opaque pixels.

Add "Include transparent pixels" option, which controls whether
fully-transparent pixels are included in the warning.  A fully
transparent pixel is a pixel whose alpha component is less-than or
equal-to zero (note that this doesn't include a NaN alpha
component.)
2017-11-07 09:28:33 -05:00
Ell bf659a9979 modules: stylistic code and ui text cleanup in display filters
The labels used in the old display filters ui were more descriptive
than the corresponding property nicks; modify the nicks/blurbs with
similar text.

... Plus random cleanup in clip-warning.
2017-11-05 08:45:35 -05:00
Ell 2520e0455c modules: remove custom display filter gui
Remove the configure() function from all our display filters, so
that they use a propgui.
2017-11-02 16:48:52 -04:00
Ell 7ec271bd0c modules: small cleanup in display-filter-clip-warning.c
Remove debug g_printerr(), and rearrange class_init() to match the
other display filters.
2017-11-02 16:48:52 -04:00
Ell 5b118a260b modules: add clip-warning display filter
The clip-warning display filter highlights pixels with at least one
componet whose value is outside the [0,1] range, or is NaN.
2017-11-02 16:12:33 -04:00
Michael Natterer 5b624e00ed Bug 782840 - CMYK color selector broken when a CMYK profile is configured
When converting from CMYK to RGB, it's perhaps better to use the
CMYK->RGB transform, rather than the RGB->CMYK transform...
2017-05-19 23:37:13 +02:00
Michael Natterer 3e2429fe6f modules: remove the "lcms" and "proof" display filters 2017-05-10 12:53:51 +02: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
Michael Natterer 91e861adcc libgimpwidgets, *: deprecating stock IDs for good, part one...
Remove all stock items added since 2.8, restore accidentially removed
ones, and rename the newly added GIMP_STOCK_* defines to GIMP_ICON_*.

(will move to having GIMP_ICON_* defines instead of magic hardcoded
strings for all icons).
2017-02-28 19:31:27 +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 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
Timm Bäder 53f34ebc0b Chain up in some size-allocate implementations
The default implementation does just the right thing for most widgets.
2016-09-09 21:31:09 +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
Richard Kreckel dd9b0fc55b Bug 768044 - Fix many typos
This fixes many typos in comments and one in a user-visible string (msgid
"center abscisse" changed to "center abscissa" in affected po files. too).
2016-06-26 00:35:24 +02:00
Michael Natterer 8abf1aab5e libgimpconfig: add getters for all GimpColorConfig members
and use them instead of peeking the public object struct.
2016-06-05 23:58:02 +02:00
Michael Natterer 2e9733859c modules: hardcode the CMYK selector's conversion parameters
Always use intent=PERCEPTUAL and bpc=TRUE, taking the settings from
the global GimpColorConfig is wrong.
2016-06-05 21:32:42 +02:00
Michael Natterer fcf5b708e5 libgimpwidgets: rename gimp_color_config_get_printer_color_profile()
to gimp_color_config_get_simulation_color_profile(), along with
various internal "printer" strings. Also reduce the number of
user-visible "print" stuff from the preferences color management page.
2016-06-05 18:00:24 +02:00
Michael Natterer b4f34375b7 Bug 767062 - Lags when zooming or dragging zoomed image (cmsFLAGS_NOOPTIMIZE)
Use cmsFLAGS_NOOPTIMIZE only for actual image buffer or single color
transforms, but not for previews or the image display. Makes things a
lot more responsive again.
2016-06-05 16:50:02 +02:00
Michael Henning 296dc590c6 modules: Add missing libraries to color_selector_libadd. 2016-06-04 19:23:35 -04:00
Michael Natterer 3ed305f6f5 libgimpwidgets, app: have all previews track the monitor they are on
and update their color transforms with the new monitor's color
profile. A widget is considered changing monitors when its toplevel
window's center crosses, in order to let widgets within one window
have consistent colors.
2016-06-01 22:42:00 +02:00
klausstaedtler a91adeb5fb icons:
symbolic-scalable
add 'pixel-perfect' 24px vectorial twins (as replacement for 22px)
gimp-prefs-folders-dynamics
gimp-prefs-folders-environ
gimp-prefs-folders-fonts
gimp-prefs-folders-gradients
gimp-prefs-folders-icon-themes
gimp-prefs-folders-interp
gimp-prefs-folders-modules

symbolic-scalable & color-scalable
add new icons
gimp-color-cmyk
gimp-color-water

patch
color-selector-cmyk.c
color-selector-water.c
gimpicons.c

This is the first patch to solve Bug 759904
many more have to follow

Thanks to Jehan for the assistance
2016-06-01 19:41:47 +02:00
Michael Natterer 4ad2493283 libgimpwidgets, modules: improve set_color_config() functions a bit
Don't do anything if the config doesn't change.
2016-05-31 12:27:15 +02:00
Michael Natterer ee0c51a43e Bug 467930 - color selectors are not color managed
Color manage the water color selector.
2016-05-28 00:38:57 +02:00
Michael Natterer 0d8b8c2f99 Bug 467930 - color selectors are not color managed
Color manage the wheel/triangle color selector.
2016-05-27 01:12:35 +02:00
Michael Natterer 0bfa402c1a Argh, this was meant to be squashed into the previous commit... 2016-05-26 22:18:50 +02:00
Michael Natterer cc92887908 libgimpcolor: add new object GimpColorTransform
which encapsulates a cmsHTRANSFORM and does all the pixel format
conversion magic. It has API to create transforms and proofing
transforms, and to convert pixels arrays and GeglBuffers.

Before, each place which has a transform had to keep around the
transform and its input and output Babl formats, and had to implement
lots of stuff itself. Now all that lives in GimpColorTransform,
removing lots of logic from many places, and pretty much removing lcms
from the public API entirely.

This removes including <lcms2.h>, LCMS_LIBS and LCMS_CFLAGS from
almost all directories and potentially allows to replace lcms by
something else.
2016-05-26 22:15:54 +02:00
Michael Natterer 83df7f410d libgimpwidgets: more parameters for gimp_color_profile_chooser_dialog_new()
Add "parent" and "action", contraidicting myself from two commits
earlier.
2016-05-07 01:19:26 +02:00
Michael Natterer f7f9174a9c Revert "libgimpwidgets: remove gimp_color_profile_chooser_dialog_new()"
This reverts commit 2bfd0711e8.

Don't ask...
2016-05-07 00:57:40 +02:00
Michael Natterer 2bfd0711e8 libgimpwidgets: remove gimp_color_profile_chooser_dialog_new()
Its API was too limited, and adding parameters for what we need next
would be equally random. It's a rarely used and mostly internal
widget, so simply use g_object_new().
2016-05-06 22:57:32 +02:00
Michael Natterer f7fc87884e Bug 765180 - Hard-coded NTSC parameters in babl/GEGL/GIMP
Port GimpColorWheel to GIMP_RGB_LUMINANCE().
2016-04-17 17:52:28 +01:00
Michael Natterer 9fd0c74ebe modules: port to GIMP_CONFIG_PROP_FOO() 2016-04-17 00:11:39 +01:00
Michael Natterer 47ef3be145 Initialize GValues with G_VALUE_INIT instead of { 0, } 2016-03-26 15:59:26 +01:00
Michael Natterer f2d581a536 Bug 761170 - Warnings building with clang
Fix a bunch of clang warnings.
2016-02-12 22:49:47 +01:00
Michael Natterer 3e5eba0774 modules: patch from Elle that fixes some forgotten profile_new name changes 2015-12-16 00:23:48 +01:00
Michael Natterer b45d31072b app, libgimpcolor: refactor GimpColorManaged::get_color_profile()
to not return a reference that has to be dropped. Also allow NULL to
be returned if the managed cannot have a profile. If it can have one,
get_color_profile() still always returns a profile (either the
assigned one, or a generated built-in one).
2015-09-03 01:36:02 +02:00
Michael Natterer fd0203ce80 libgimpwidgets: change parameters of gimp_widget_get_color_transform()
Change GimpColorManaged to GimpColorProfile.
2015-09-01 23:40:57 +02:00
Michael Natterer e4d5f05373 modules: don't use the configured RGB profile in the CMCK color selector
it gets its color as GimpRGB which is always sRGB. Instead always use
the built-in sRGB profile.
2015-08-19 17:57:48 +02:00
Michael Natterer 5672e80ea1 libgimpwidgets: port GimpColorProfileStore and -ComboBox to GFile
and deprecate the old filename-based API. Port everything to use the
new GFile functions.
2015-08-01 16:20:14 +02:00
Michael Natterer 0693298d63 libgimpcolor, *: change all GimpColorConfig getters to return const gchar*
instead of a gchar* which has to be freed. Cache all the strings in
the GimpColorConfig instance.
2015-07-12 14:10:18 +02:00
Michael Natterer c102dde92b libgimpcolor, *: change GimpColorProfile to be a GObject
it used to be a typedef to gpointer and actually was a cmsHPROFILE.

Change its API to be more "standard", remove the public close()
function. The object caches both the cmsHPROFILE and the data/length
ICC blob, so conversions between the two become obsolete (simply call
get_lcms_profile() or get_icc_profile()).

Adapt everything to the new API, but port it in a naive way for now,
the code doesn't take advantage of the new possibilities yet (like
refcounting).
2015-07-10 22:53:59 +02:00
Michael Natterer 3565b33019 libgimpconfig: rename the new GimpColorConfig profile accessor functions
gimp_color_config_get_foo_profile() -> get_foo_color_profile()

because the old names clash with possible future accessors for the raw
filename properties.
2015-06-03 09:57:34 +02:00
Michael Natterer 4910c28957 libgimpcolor: rename the gimp_lcms_*() functions to gimp_color_profile_*()
because it doesn't make sense to call the typedef GimpColorProfile
but the function namespace gimp_lcms_*().
2015-06-03 09:41:23 +02:00
Michael Natterer 8005eea835 Remove the "GIMP" from all "Since: GIMP 2.x" API doc comments
because it confuses gtk-doc and breaks some links. Also change the
"Index of new symbols in GIMP 2.x" sections to be what seems to be the
modern standard (looked at the GLib and GTK+ docs), and update some
other stuff.
2015-05-31 21:18:09 +02:00
Michael Natterer 9096ceffde modules: honor GimpColorConfig.display_profile_from_gdk again
I broke this during some recent refactoring.
2015-05-30 01:06:25 +02:00
Michael Natterer d3e11c5b2c modules, libgimpwidgets: use gimp_color_managed_get_color_profile()
which always returns a profile, instead of code that uses the ICC
blob and falls back to GimpColorConfig's profile, then falls back
to the built-in profiles.
2015-05-27 12:53:46 +02:00
Michael Natterer 394bc25be1 libgimpwidgets: return the formats from gimp_widget_get_color_transform()
Turn the src_format and dest_formats into "const Babl **" and make
them return the actually used formats. Change the lcms display module
accordingly.
2015-05-11 00:45:18 +02:00
Michael Natterer 064cdaa923 modules: use the new function in the lcms display filter 2015-05-09 01:24:22 +02:00
Michael Natterer cbb82ae5da modules: get the profile of the widget's toplevel
so we are in sync with GimpWindow::monitor-changed().
2015-05-08 00:50:07 +02:00
Michael Natterer ed3f2daac2 modules: use the new API in the lcms display filter, and some cleanup 2015-05-06 22:21:13 +02:00
Michael Natterer 6c800db1cc Use the newly added profile utility functions all over the place 2015-05-06 16:38:57 +02:00
Michael Natterer fa070d4cf9 modules: plug leak in color-selector-cmyk
Don't leak the RGB profile if the CMYK profile can't be loaded
2014-10-06 20:29:58 +02:00
Michael Natterer b5530e9e3d Use the new GeglAccessMode enum instead of the old values 2014-07-02 02:00:35 +02:00
Michael Natterer 65a65947d9 app, libgimp: replace GTK_STOCK_FOO by icon names
unless it's a stock ID used for an action button, will address that
later.
2014-05-11 22:49:22 +02:00
Michael Natterer 4b629e984b libgimpwidgets: add GimpColorDisplayClass::icon_name
and deprecate its stock_id.
2014-05-10 11:53:07 +02:00
Michael Natterer 1ec64abb8b libgimpwidgets: add GimpColorSelectorClass::icon_name
and deprecate its stock_id.
2014-05-10 08:34:42 +02:00
Michael Natterer 9331ef2456 libgimpwidgets: change GimpController's stock_id to icon_name
This API change is OK since the entire controller API is marked as
unstable and needs a special #define to be visible at all.
2014-05-09 09:19:06 +02:00
Rickard 5ec413a5e8 Bug 729326 - Errors found using a static code analysis program cppcheck
Fixed some memory and file leaks. And removed some code and variables
that are not used.
2014-05-05 10:34:08 +02:00
Michael Henning b34fbb21fc modules: Add missing include.
614c61a3dd removed the #include <glib.h>,
which is needed for the #ifdef G_OS_WIN32 to work.
2014-04-15 19:17:57 -04: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 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 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 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 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 191b2aa2e8 modules: verify that GimpColorConfig.rgb_profile is actually for RGB 2014-03-23 21:16:39 +01:00
Michael Natterer 251dd91395 modules: fix memory leaks in color-selector-cmyk.c
Also clean up a bit and make the profile label's tooltip show
the profile's summary.
2014-03-16 15:57:14 +01:00
Michael Natterer ebc53672cb libgimpcolor: add gimp_lcms_profile_is_rgb() and _is_cmyk()
And change all lcms code to use it.
2014-03-15 21:47:13 +01:00
Michael Natterer a277a5b66f modules: don't use CamelCase variable names in display-filter-proof.c 2014-03-15 21:47:13 +01:00
Michael Natterer 89b489b9bb modules, plug-ins: use GimpColorProfileChooserDialog
instead of selfmade file choosers for picking color profiles from
disk.
2014-03-14 23:02:14 +01:00
Michael Natterer ceb31cc02e modules: use gimp_lcms_profile_get_summary() in the lcms display filter 2014-03-14 20:26:15 +01:00
Michael Natterer eee6fa1e4b libgimpcolor: start adding profile utility functions to gimplcms.[ch]
Add functions to get a profile's description, manufacturer, model and
copyright, and use them instead of implementing the same 10 times.

Also add a GimpColorProfile typedef which avoids both having to
include lcms globally or using a gpointer instead (which looks bad and
non-descriptive in an API).
2014-03-14 01:48:39 +01:00
Michael Natterer f078cc5992 modules: make display-filter-lcms.c find the right monitor...
...when its GimpColorManaged's GdkWindow exists but is hidden, which
happens for all but the active tab of a single window with multiple
images open.
2014-03-13 22:39:03 +01:00
Elle Stone 05c5ca3216 Bug 723787 - Neutral sRGB profile matching Argyllcms sRGB.icm
Add gimp_lcms_create_srgb_profile() to libgimpcolor and use it where
we used to call cmsCreate_sRGBProfile().
2014-02-09 23:10:56 +01:00
Michael Natterer 84c132addc Bug 721553 - License text contains obsolete FSF postal address
These files were forgotten when changing license from GPL2 to GPL3.
2014-01-05 14:25:46 +01:00
Elle Stone a4821914d3 Bug 720045 - Add black point compensation to Preferences/Color Management
Make black point compensation configurable separately for both proof
and display.
2013-12-09 02:23:31 +01:00
Nils Philippsen 1bb379c3f5 gimpcolorwheel: comment out ineffectual code 2013-11-07 12:20:34 +01:00
Nils Philippsen c028580ae0 color-selector-cmyk: avoid freeing uninitialized pointer 2013-11-07 12:20:33 +01:00
Michael Natterer 48582d4d6a modules: silence defined but not used warning in color-selector-water.c
by uselessly calling colorsel_water_get_type().
2013-11-04 22:09:57 +01:00
Hartmut Kuhse 7027d3cb13 modules: include <gegl.h> in controller-dx-dinput.c
when we include "libgimpwidgets/gimpwidgets.h"
2013-11-04 21:25:22 +01:00
Michael Natterer 71b189e4da modules: rename color-selector-cmyk-lcms.c to color-selector-cmyk.c
overwriting the old color-selector-cmyk.c
2013-11-03 22:06:51 +01:00
Michael Natterer 7bd4d2678a configure, plug-ins, modules: make lcms a hard dependency 2013-11-03 21:19:51 +01:00
Michael Natterer ae9d8c72bc modules: add GEGL_LIBS to display_filter_libadd 2013-11-03 15:33:40 +01:00
Michael Natterer 337c1fe4bf modules: port the proof display filter to convert_buffer() 2013-11-02 14:53:48 +01:00
Michael Natterer 73f5e2c21a modules: remove the old convert_surface() from gamma and high contrast 2013-11-02 14:47:54 +01:00
Michael Natterer e96b1db023 modules: implement convert_buffer() in the color blind display filter 2013-11-02 14:43:47 +01:00
Michael Natterer 78706f7796 modules: implement convert_buffer() in the lcms display filter 2013-11-02 03:02:09 +01:00
Michael Natterer fcd457e67b modules: implement convert_buffer() in the gamma display filter 2013-11-02 01:51:05 +01:00
Michael Natterer a04c442e69 modules: implement convert_buffer() in the high contrast display filter 2013-11-02 01:38:50 +01:00
Michael Natterer a5d4f3ae04 modules: also include <gegl.h> when we include "libgimpwidgets/gimpwidgets.h 2013-11-01 22:30:36 +01:00
Jehan 3838a8cebb modules: small tabs replacement into spaces. 2013-09-21 18:17:34 +12:00
Michael Natterer 2cd25ec863 modules: turn GimpColorWheel into a proper dynamically loaded type
So it works with all GObject versions, until we determine how useful
it is generally, and what API it should get for possible
libgimpwidgets inclusion.
2013-07-14 13:41:29 +02:00
Michael Natterer ec786816bb */Makefile.am: merge INCLUDES into AM_CPPFLAGS
automake-1.13 finally warns about this anachronism.
2013-06-05 20:48:37 +02:00
Michael Natterer 3c006d0a4f modules: make all get_type() functions static 2013-01-17 20:57:50 +01:00
Michael Natterer 9f610ef3cf modules: use G_DEFINE_DYNAMIC_TYPE() in color-selector-cmyk-lcms 2013-01-17 20:56:58 +01:00
Michael Natterer 632c577f18 Bug 689371 - GIMP uses deprecated GtkHSV widget
Swallow GtkHSV back into GIMP and call it GimpColorWheel. Keep it in
modules/ for the time being. Clean up and undeprecate it. Replace
set_metrics() API by set_ring_fraction() and make it follow the size
of its parent container, making its use straightforward. Kept it clean
of GIMP color types so it can be easily adapted by e.g. Inkscape.
2013-01-06 02:56:59 +01:00
Michael Natterer 2d6a880b12 Bug 662739 - Port to lcms2 for icc V4 profile support
Apply patch from Laurent Martelli which multiplies the out-of-gammut
color components by 256 to match the new 16 bit lcms data type.
2012-10-24 18:19:33 +02:00