Commit Graph

28 Commits

Author SHA1 Message Date
Michael Natterer 9e88105ee6 libgimpwidgets: add more docs 2019-07-24 19:11:58 +02:00
Ell 3b0040c043 app, libgimp*, modules: don't use g_type_class_add_private() ...
... and G_TYPE_INSTANCE_GET_PRIVATE()

g_type_class_add_private() and G_TYPE_INSTANCE_GET_PRIVATE() were
deprecated in GLib 2.58.  Instead, use
G_DEFINE_[ABSTRACT_]TYPE_WITH_PRIVATE(), and
G_ADD_PRIVATE[_DYNAMIC](), and the implictly-defined
foo_get_instance_private() functions, all of which are available in
the GLib versions we depend on.

This commit only covers types registered using one of the
G_DEFINE_FOO() macros (i.e., most types), but not types with a
custom registration function, of which we still have a few -- GLib
currently only provides a (non-deprecated) public API for adding a
private struct using the G_DEFINE_FOO() macros.

Note that this commit was 99% auto-generated (because I'm not
*that* crazy :), so if there are any style mismatches... we'll have
to live with them for now.
2018-09-18 14:39:56 -04:00
Michael Natterer 5f700549e7 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
Michael Natterer bdbec7941c Use the new macros from the last commit in all files
...and gone are the annoying warnings.
2018-05-20 21:06:34 +02:00
Jehan 6c9ba16e11 configure, libgimpwidgets: customizable default color profile directory
We have this problem with flatpak that the common directory
("/usr/share/color/icc") is not visible from inside the sandbox. With
proper permissions, it is actually accessible, yet the host's /usr is
mounted at /run/host/usr/.
Since sandbox systems are getting more common, we need to make this path
customizable. I am therefore adding a --with-icc-directory configure
option to change the default color profile folder at build time.
See: https://github.com/flathub/org.gimp.GIMP/issues/15
2018-05-18 09:08:51 +02:00
Michael Natterer 467a663f16 libgimpwidgets: return TRUE in GimpColorProfileChooserDialog's "delete-event"
Otherwise the dialog is automatically destroyed when e.g. pressing
Escape, which the code doesn't expect, leaving dangling (crashing)
ponters around.
2018-01-02 22:10:10 +01:00
Michael Natterer 40981f43cf libgimp*: get rid of icons in dialog buttons (use labels not stock IDs) 2017-02-12 16:18:54 +01:00
Jehan 93d9265f0a libgimpwidgets: $XDG_DATA_HOME/icc/ is a common profile storage.
Even though many documentations will tell of $XDG_DATA_HOME/color/icc/,
some programs actually store color profiles in $XDG_DATA_HOME/icc/.
This is at least the case for GNOME color management.
Test it after $XDG_DATA_HOME/color/icc/ but before $HOME/.color/icc/.
2016-06-13 03:16:59 +02:00
Kristian Rietveld a31fe9521f libgimpwidgets: Mac OS X: fix build 2016-05-07 09:09:06 +02:00
Michael Natterer 6c64cb0f16 libgimpwidgets: support saving profile in GimpColorProfileChooserDialog
Add the right action buttons, enable overwrite confirmation, and add
user-writable folders to the shortcuts pane. Also use the right API on
OS X instead of hardcoding /Library and ~/Library.
2016-05-07 01:36:23 +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 1bfd57b99c libgimpwidgets: add a shortcut to the profile chooser dialog on OS X too
Apparently it's "/Library/ColorSync/Profiles".
2016-05-05 19:40:52 +02:00
Michael Natterer 10e4a261a7 libgimpwidgets: simplify GimpColorProfileChooserDialog's preview widget
There is no need for a frame around a scrolled window, the scrolled
window has the same shadow type API.
2015-08-22 11:20:00 +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 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 4c55f45552 libgimpwidgets: don't try to open non-regular files as ICC profiles
Instead, show proper messages in the profile chooser's preview pane.
2015-05-19 13:12:34 +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 b7863269f0 libgimpcolor: change gimp_lcms_profile_open_from_file() from filename to GFile
and change most of the lcms plug-in to using GFile too.
2014-07-04 23:57:27 +02:00
A Kelday c808789e1d Bug 728911 - Fixes to libgimpwidgets for c++ plugins using gimpui
Add missing G_END_DECLS to libgimpwidgets headers.
Avoid use of c++ "private" keyword.
2014-04-25 00:33:29 +02:00
Michael Natterer 614c61a3dd Don't #include <glib.h> before <lcms.h>
The include claimed to be because of "inline" in the lcms header, but
that was probably lcms1, since there is no trace of inline in the
lcms2 header.
2014-04-10 20:48:22 +02:00
Michael Natterer 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 dc8a3e8de5 libgimpwidgets: remove gimp_color_profile_chooser_dialog_get_desc()
and port its only user (the prefs dialog) to the code all other users
of GimpColorProfileChooserDialog use.
2014-03-23 23:50:54 +01:00
Michael Natterer c6ac6913af libgimpwidgets: use a GimpColorProfileView in GimpColorProfileChooserDialog 2014-03-16 18:36:12 +01:00
Michael Natterer abb3f27cdb libgimpwidgets: use gimp_lcms_profile_open_from_file() in the profile chooser 2014-03-16 15:57:14 +01:00
Michael Natterer 3ac04f9fe1 libgimpwidgets: more spacing around the profile chooser's preview textview 2014-03-15 00:09:35 +01:00
Michael Natterer 9c7cd2508f app, libgimpwidgets: move GimpProfileChooserDialog to libgimpwidgets
and call it GimpColorProfileChooserDialog. Make libgimpwidgets
depend on lcms and make it query the profile directly.
2014-03-14 22:03:08 +01:00