Commit Graph

1964 Commits

Author SHA1 Message Date
Jehan ae7dfba2c4 libgimpwidgets: fix some typos.
s/logharithmic/logarithmic/
2019-08-09 23:40:07 +02:00
Michael Natterer 31b8ea4a90 libgimpbase: add lots of const to GimpEnumDesc and GimpFlagsDesc APIs 2019-08-09 13:29:34 +02:00
Michael Natterer 55940b733b libgimpwidgets: add a GDestroyNotify for gimp_help_connect()'s user_data 2019-08-09 13:11:30 +02:00
Michael Natterer ebddecd696 libgimpwidgets: more docs and annotations 2019-08-09 12:59:41 +02:00
Michael Natterer d3d621b502 libgimpconfig: add a GimpScanner typedef and make it a boxed type
Replace _destroy() by _ref() and _unref().
2019-08-09 12:42:52 +02:00
Michael Natterer 8cfef5e60d libgimpwidgets: more docs and annotations 2019-08-09 12:32:09 +02:00
Jehan 2dde79b3e7 libgimp*: move GObject Introspection into libgimp/.
libgimp is anyway processed at the very end after all other libgimp*
were built. This way, it also fixes #3746, by removing the $(top_srcdir)
everywhere from introspected files, hence making the build work again
with older automake.
2019-08-08 15:59:44 +02:00
Michael Natterer 00bf76752c libgimpwidgets: more docs and annotations for GimpUnitComboBox 2019-08-08 00:40:03 +02:00
Michael Natterer 169f98f915 libgimpwidgets: add GDestroyNotify to gimp_int_combo_box_connect() 2019-08-08 00:22:15 +02:00
Michael Natterer 67455a4ea7 libgimpwidgets: add GDestroyNotify to all enum widgets callback_data 2019-08-08 00:01:10 +02:00
Michael Natterer 1afb7a8b32 libgimpwidgets: add GDestroyNotify to gimp_widget_track_monitor() 2019-08-07 23:44:18 +02:00
Michael Natterer cbefd8e5bb libgimpwidgets: add GDestroyNotify for gimp_query_foo_box() user_data
This is ugly shit that should go down the canal but let's just fix
these GI warnings.
2019-08-07 22:48:06 +02:00
Michael Natterer c08186e6fe libgimp*: fix some parameter inconsistencies to silence GI warnings 2019-08-07 22:05:12 +02:00
Jehan ddd726e253 libgimpwidgets: add some annotations.
Fix some (transfer) warnings.
2019-08-05 17:13:59 +02:00
Jehan 4a6b58507b libgimp, libgimpmath, libgimpwidgets: update def files.
So many things moved in the last few days, and we just didn't think of
updating these.
2019-08-05 16:55:35 +02:00
Michael Natterer cc8fc0f90f libgimp*: add GI's .dirstamp to .gitigore 2019-08-03 19:50:17 +02:00
Niels De Graef 5f92ced1f3 Add (nullable) if applicable
Basically this commit makes sure that all return values that are marked
as "Returns:" also have a `(nullable)` annotation if it is mentioned on
the same line that NULL can also be returned.

This will prevent a few problems in GObject-introspection.
2019-08-03 07:53:47 +00:00
Niels De Graef 1dda60154c Use "Returns:" to annotate return values
To be able to annotate return values through GObject-introspection, you
need to make sure it is tagged with `Returns:` and not something else.
2019-08-03 07:53:47 +00:00
Niels De Graef 746a72b956 Make sure to use % for constants
Documentation-wise in C, this doesn't matter a lot, but it allows
GObject-Introspection based bindings to use their built-in versions when
they want to render any kind of documentation (for example, docs for
Python plugins can render `%NULL` as `None`).
2019-08-03 07:53:47 +00:00
Jehan 6a1df5be31 libgimpwidgets: fix a copy-paste bug in function docs. 2019-08-03 09:38:46 +02:00
Jehan 19fbb1d9a8 libgimpwidgets: add documentation for many functions and fix...
... an annotation.
s/(transfer-none)/(transfer none)/
For the "Since:" value, I did some git log archeology. Hopefully I got
these right.
2019-08-02 11:46:39 +02:00
Michael Natterer c12c031f2d pdb, libgimp*: add (out caller-allocates) to all GimpRGB* return values 2019-08-01 15:39:13 +02:00
Michael Natterer bdac38a854 libgimpwidgets: add and fix some annotations 2019-08-01 14:10:50 +02:00
Jehan ea53089545 libgimpwidgets: add a bunch of missing (transfer) annotations. 2019-08-01 13:10:39 +02:00
Michael Natterer e7f041492a libgimpwidgets: fix a doc glitch in GimpStringComboBox 2019-08-01 12:23:05 +02:00
Michael Natterer 83ecbc8e39 libgimpwidgets: fix GimpScaleEntry annotations 2019-08-01 10:22:20 +02:00
Jehan 3016dfb347 libgimpwidgets: add many missing (transfer) annotations. 2019-08-01 02:04:28 +02:00
Jehan f7fbdc89b1 libgimpwidgets: add a bunch of (transfer) values. 2019-07-31 23:48:32 +02:00
Michael Natterer 63695b4b21 libgimbase: merge gimpparam.h into gimpparamspecs.h
which means that it's now included normally via gimpbase.h
and not any longer via gimpbasetypes.h which we only did out
of lazyness. A *lot* of files in libgimp* and app/ now need to
2019-07-31 10:16:21 +02:00
Jehan a198b5a948 libgimpwidgets: fix annotation.
Fixes:
> Warning: Gimp: missing ":" at column 36:
2019-07-31 01:53:55 +02:00
Jehan 82cfa9c25f libgimpwidgets: fix annotations in GimpDialog.
(skip) various variable length functions (va_list functions are not
introspectable anyway, but adding manual annotations shows we've have
been through them).

Also (skip) gimp_dialogs_show_help_button even though it could be
introspected without any problem. Yet it's written that's an
internal-only function, so let's forbid bindings from using it.

Finally fix gimp_dialog_add_button() introspection by properly including
Gtk-3.0 introspected library so that g-ir-* knows the GtkWidget type.
2019-07-30 15:37:42 +02:00
Jehan 9691d73058 libgimpwidgets: make a proper function out of the macro...
... gimp_dialog_set_alternative_button_order_from_array()
Macros are not introspectable, which means this call would not be
available for non-C plug-ins. Also adding a "Since: 3.0" since these
macros were added in commit 3be0d13be3.

Note that I don't do the same for the macro
gimp_dialog_set_alternative_button_order() because varargs functions
won't be introspected anyway. So this one can just stay a macro for C
plug-ins only.
2019-07-30 14:05:08 +02:00
Jehan afe0bcbc58 libgimpwidgets: introspect libgimpwidgets.
Only leave behind gimpcolorscale, gimpcolorscales and gimpcolorselect
for now. There are some GI compilation errors and I don't have the time
right now to look into it. Most of libgimpwidgets is available to GI
bindings now anyway.
2019-07-30 12:53:15 +02:00
Michael Natterer c144cf69de libgimp*: use more g_clear_pointer() 2019-07-25 12:37:52 +02:00
Michael Natterer fe75ef28ad libgimpwidgets: fix docs for GimpBusyBox:message 2019-07-25 10:24:30 +02:00
Michael Natterer 9e88105ee6 libgimpwidgets: add more docs 2019-07-24 19:11:58 +02:00
Michael Natterer f67e607395 libgimpwidgets: declare GimpHintBox with public instance and class
like all other objects, so gtk-doc doesn't cripple its docs.
2019-07-24 15:11:51 +02:00
Michael Natterer aca5f806c4 libgimp*: lots of doc fixes and new docs for structs and enums 2019-07-24 01:18:30 +02:00
Michael Natterer 8b22b3ab35 libgimpwidgets: fix some glitches noticed when updating docs 2019-07-23 19:33:48 +02:00
Michael Natterer 88188cba0c libgimpwidgets: don't use g_type_class_add_private() in GimpColorButton
and switch to using G_DEFINE_TYPE_WITH_CODE().
2019-06-29 16:14:53 +02:00
Jehan e512f0f1b7 libgimpwidgets: fix "warning: excess elements in array initializer".
Just fixing stupid bugs in my previous commit. These are fixed array
sizes.
2019-06-23 19:07:32 +02:00
Jehan 2b22dffc49 Issue #230: ruler subdivision is wrong for inches.
Make better subvision, as well as ruler steps, based on what seems to be
the common trends for rulers of these 3 units (inch, foot and yard), but
also based on common conversion needs.

Main changes are:
- Always subdivide inches by 2, down to 1/256, and get rid of the gap
  where inches division jumped from 1/16 to 1/192 (which is not even a
  multiple of 2).
- Add the 72 steps to inch ruler (1 fathom).
- Replace the 2 feet by a 3 feet (1 yard) step.
- Use base-10 steps for yard (there don't seem to be bigger units in the
  imperial/US measurement system which needs specific steps).
- Add the 1/36 yard (= 1 inch) division.
- Below 1/12 feet and 1/36 yard, divide by multiples of 2 (inch-style).
2019-06-23 16:40:34 +02:00
Jehan 57b2ba9c48 libgimpwidgets: enable inch/feet/yard binary subdivisions.
It looks like it's not perfect yet. Nevertheless if we leave it disabled
forever, it won't ever get better! For now at least enabled on master
only.
2019-06-23 15:11:34 +02:00
Ell 3a4a00c71e Issue #40 - Layer offset tool
Add a new Offset filter tool, as a front-end to gimp:offset.  The
tool replaces, and provides the same interface as, the drawable-
offset dialog, while also providing live preview and on-canvas
interaction.

Note that we don't simply use a custom propgui constructor for
gimp:offset, since we need a little more control.
2019-06-05 19:06:56 -04:00
Michael Natterer 2f925e7277 libgimpwidgets: keep gimpwidgetsenums.h in alphabetical order 2019-06-01 16:41:59 +02:00
Jehan b29d1ea6ff Issue 1878: Eyedrop tool doesn't work when screen composing (KWin)...
... is enabled.
2019-05-07 18:49:35 +09:00
Ell 846d242f30 app: revert combo-box drop-down changes
Revert the use of gtk_combo_box_set_wrap_width() to change the
combo-box drop-down style, except for the status-bar unit combo.
See https://gitlab.gnome.org/GNOME/gimp/issues/2828#note_421312 for
the rationale.

This reverts commits 1d984542e9,
68a33ab5bd, and
6dfca83c2a.
2019-03-27 20:14:10 -04:00
Ell 81a361be73 libgimpwidgets: fix arithmetic-expression supprot in GimpSizeEntry
... after commit 8b3c7ae193.
2019-03-11 13:53:40 -04:00
Ell 8b3c7ae193 Issue #2557 - Gimp Can't Rotate By More Than 180 Degree
When the "wrap" property of a GimpSpinButton is TRUE, wrap-around
out-of-range values entered through the spin-button's text entry,
instead of clamping them.  Since we're using GimpSpinButton
everywhere since last commit, this applies to all our angle-entry
spin buttons (including spin scales).
2019-03-09 07:28:56 -05:00
Ell 8954d1f386 libgimpwidgets, app, plug-ins: use GimpSpinButton everywhere
Replace all direct uses of GtkSpinButton with GimpSpinButton, so
that its modified behavior extends to all our spin buttons.
2019-03-09 07:28:52 -05:00
Jehan 0beebf4d64 libgimpwidgets: add gimp_color_area_set_out_of_gamut() in def file. 2019-03-06 18:20:14 +01:00
Jehan 4be9b7a401 app, libgimpwidgets: new gimp_color_area_set_out_of_gamut().
This allows to force a GimpColorArea to display as out-of-gamut color.
Current code was only considering the generic RGB case (outside of [0-1]
range), and in particular not grayscale or indexed images.

Ideally the GimpColorArea widget could be (optionally) made to follow a
context, so that for instance it could update its representation when
the context image changes, or when this image's type changes. Yet since
it is a libgimpwidgets widget, it cannot get such update. Instead I add
a new API function to display the color box with the out-of-gamut
triangle. The decision code for this will have to be done elsewhere.

Use this new API for GimpColorHistory to display non-gray colors in the
history as out-of-gamut on grayscale images, or colors absent of the
palette on indexed images.
2019-03-06 16:30:35 +01:00
Ell 19eb9fb1bf libgimpwidgets: fix gimp_spin_button_new_with_range() 2019-03-03 04:22:24 -05:00
Ell c0c055b4e9 libgimpwidgets: in GimpChainButton, emit "toggled" signal when "active" changes
In GimpChainButton, emit the "toggled" signal whenever the chain
button's "active" property changes, either due to user interaction,
or programatically.  Previously, it would only get emitted when the
button was actually clicked.

In particular, this fixes an issue where the aspect ratio of a
coordinates size-entry won't get updated when its chain button got
toggled programatically, as can happen with the scale tool.
2019-02-08 08:19:18 -05:00
Ell 0714510802 libgimpwidgets: add gimp_chain_button_{get,size}_icon_size() to gimpwidgets.def 2019-02-05 03:49:26 -05:00
Ell 9c3f150e25 libgimpwidgets: add GimpChainButton::active property
... which corresponds to the button's toggle state.
2019-02-04 16:05:26 -05:00
Ell 8d6c7e42bf libgimpwidgets: add GimpChainButton::icon-size property
... and corresponding gimp_chain_button_{get,size}_icon_size()
functions, which control the chain-button's icon size.
2019-02-04 16:04:02 -05:00
Jehan 1d984542e9 Issue #2828: Scrolling up with a mouse within a drop-down list.
We were doing it all the wrong way, fixing one combo box object at a
time. So this commit basically reverses commits 68a33ab5bd, 6dfca83c2a
and a9a979b2d0 and instead runs the same code in the class code. This
way, all objects based on these base classes will have the fix from
scratch.
These improved various other drop-down lists (I found some of them, and
probably not all) as I fixed all GIMP custom widgets based on
GtkComboBox.

Note that it has to be run after filling the list apparently (I had the
problem especially with GimpIntComboBox if running in the _init() code,
then the list widget showed wrong).
2019-01-20 13:08:36 +01:00
Michael Natterer abd7cbfc8d Issue #1788 - Inconsistency between FG color and selected color in...
...palette views despite selected color being in the currently
selected pallette

As suggested by Massimo, changing the color comparison EPSILON in
gimppalette.c from 1e-10 to 1e-6 fixes this, and is really small
enough.

Also, generally clean up color comparison epsilons:

- use a #define, not hardcoded values for all uses of
  gimp_rgb[a]_distance()
- call the #defines RGB_EPSILON and RGBA_EPSILON
- make them all 1e-6 or larger
2019-01-02 01:49:43 +01:00
Jehan cd924f453a app: do not make line art bucket fill a GimpSelectCriterion anymore.
This was my initial choice, but the more I think about it, the less I am
sure this was the right choice. There was some common code (as I was
making a common composite bucket fill once the line art was generated),
but there is also a lot of different code and the functions were filled
of exception when we were doing a line art fill. Also though there is a
bit of color works (the way we decide whether a pixel is part of a
stroke or not, though currently this is basic grayscale threshold), this
is really not the same as other criterions. In particular this was made
obvious on the Select by Color tool where the line art criterion was
completely meaningless and would have had to be opted-out!

This commit split a bit the code. Instead of finding the line art in the
criterion list, I add a third choice to the "Fill whole selection"/"Fill
similar colors" radio. In turn I create a new GimpBucketFillArea type
with the 3 choices, and remove line art value from GimpSelectCriterion.

I am not fully happy yet of this code, as it creates a bit of duplicate
code, and I would appreciate to move some code away from gimpdrawable-*
and gimppickable-* files. This may happen later. I break the work in
pieces to not get too messy.
Also this removes access to the smart colorization from the API, but
that's probably ok as I prefer to not freeze options too early in the
process since API needs to be stable. Probably we should get a concept
of experimental API.
2018-12-12 15:27:48 +01:00
Oleksii Samorukov 4e3441137e tests: fix clang compilation error on test-eevl.c
(cherry picked from commit 40a08dcf48)
2018-11-23 22:33:12 +01:00
Ell 03a928409a libgimpwidgets: install gimpspinbutton.h
Added in commit 7ab9ee2686.
2018-11-19 09:28:52 -05:00
Jehan 8ed12b1b98 app, libgimpbase: add GIMP_SELECT_CRITERION_LINE_ART selection type.
This commit implements part of the research paper "A Fast and Efficient
Semi-guided Algorithm for Flat Coloring Line-arts" from the GREYC (the
people from G'Mic). It is meant to select regions from drawn sketchs in
a "smart" way, in particular it tries to close non-perfectly closed
regions, which is a common headache for digital painters and colorists.

The implementation is not finished as it needs some watersheding as well
so that the selected area does not leave "holes" near stroke borders.
The research paper proposes a new watersheding algorithm, but I may not
have to implement it, as it is more focused on automatic colorization
with prepared spots (instead of bucket fill-type interaction).

This will be used in particular with the fuzzy select and bucket fill
tools.

Note that this first version is a bit slow once we get to big images,
but I hope to be able to optimize this.
Also no options from the algorithm are made available in the GUI yet.
2018-11-14 13:37:42 +01:00
Ell 658d9f3a82 Issue #2470 - Spacing between grid lines does not stay at 1px ...
... as I would like it to.

Use GimpSpinButton, added in the previous commit, in GimpSizeEntry,
instead of GtkSpinButton.  This avoids updating the spin-buttons'
adjustment values when they lose focus, truncating the value if it
can't be accurately displayed using the corresponding spin-button's
digit count.  Since size-entries can have multiple spin-buttons
using different units, this prevents the value from changing when
entring a value using one unit, and then shifting the focus to, but
not changing, another unit.
2018-11-10 06:52:06 -05:00
Ell 7ab9ee2686 libgimpwidgets: add GimpSpinButton
GimpSpinButton is a drop-in replacement for (and a subclass of)
GtkSpinButton.  Unlike GtkSpinButton, it avoids updating the
adjustment value when losing focus, unless the entry text has
changed.  This prevents accidental loss of precision, when the
adjustment value can't be accurately displayed in the entry.
2018-11-10 06:48:56 -05:00
Oleksii Samorukov bd48996933 Fix compilation on Mac 10.6 and 10.7 (#2112) 2018-10-24 10:45:07 +02:00
Alex Samorukov 450843baa7 Replace deprecated CGColorSpaceCopyICCProfile with CGColorSpaceCopyICCData
WARNING: this commit should not be backported to the gimp-2-10 branch because of macOS minimum supported version.
2018-10-19 15:22:08 +00:00
Simon Budig f7ac033777 libgimpwidgets: fix accidential double G_ADD_PRIVATE 2018-09-18 23:13:24 +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
Jehan 7448c7f811 libgimpwidgets: do not assume a GimpFrame has a child.
This fixes 2 CRITICALs when creating a GimpFrame without a child. There
are reasons to create empty frames (for instance to conditionnally add
contents later, and use it as a label only otherwise).
2018-09-11 11:26:51 +02:00
Ell 36477bb287 app, icons, menus: add performance-log recording to the dashboard
Add an option to record a performance log through the dashboard.
The log contains a series of samples of the dashboard variables, as
well as the full program backtrace, when available.  As such, it
essentially acts as a built-in profiler, which allows us to
correlate program execution with the information available through
the dashboard.  It is meant to be used for creating logs to
accompany perofrmance-related bug reports, as well as for profiling
GIMP during development.

The sample frequency defaults to 10 samples per second, but can be
overridden using the GIMP_PERFORMANCE_LOG_SAMPLE_FREQUENCY
environment variable.  Backtraces are included by default when
available, but can be suppressed using the
GIMP_PERFORMANCE_LOG_NO_BACKTRACE environment variable.

Logs are created through the new "record" button at the bottom of
the dashboard dialog.  When pressed, a file dialog is opened to
select the log file, and, once confirmed, data is being recorded to
the selected file.  Recording is stopped by pressing the "record"
button again (we use a highlight to indicate that recording is
active.)

While recording, the "reset" button is replaced with an "add marker"
button, which can be used to add event markers to the log.  These
can be used to mark events of interest, such as "started painting"
and "stopped painting", which then appear in the log as part of the
sample stream.  Markers are numbered sequentually, and the number
of the next (to-be-added) marker appears on the button.  Shift-
clicking the button adds an empty (description-less) marker, which
is only identified by its number; this can be used when markers
need to be added quickly.

The log is an XML file, containing some extra information (such as
the output of "$ gimp -v", and symbol information) in addition to
the samples.  The data in the file is delta-encoded to reduce the
file size, meaning that samples (as well as some other elements)
only specify the changes since the previous sample.  This adds a
necessary decoding step before data can be processed; the next
commit adds a tool that does that.

There are currently no tools to actually analyze the data -- that's
still TBD -- but at least we can start gathering it.
2018-09-02 03:11:02 -04:00
Jehan 8e453330c9 configure: GLIB_COMPILE_RESOURCES is wrong when cross-compiling.
AM_PATH_GLIB_2_0 m4 macro actually computes this value using
$PKG_CONFIG. Yet $PKG_CONFIG variable is the pkg-config tool looking for
target libraries (not host), hence it would return the executable
`glib-compile-resources` built for the target.

Also using the same variable name invalidates our test: our own
AC_PATH_PROG was never run as the variable was already set. And no
environment variable could override this test anymore either. This is
why I rename the test variable to HOST_GLIB_COMPILE_RESOURCES.

(cherry picked from commit d1d9eb17e5)
2018-08-12 22:52:45 +02:00
Jehan d1372c6c24 libgimpwidgets, app: change "stock-size" property of...
... GimpCellRendererToggle into "icon-size".

In particular making it a pixel size instead of a GtkIconSize. This enum
is limited to a few presets (registering new values is deprecated since
GTK+ 3.10), with names completely semantically wrong. It is better to
specify icon sizes (before scaling) in pixels directly, which goes also
with named icons instead of stock ones.
2018-08-06 15:38:37 +02:00
ONO Yoshio 587d9bbb03 MR !19: Add support for vertical text writing.
Squashed commit of the following:

commit ee1ff7d502658cfa1248a13a3f0348495db07eda
Author: ONO Yoshio <ohtsuka.yoshio@gmail.com>
Date:   Sun Jul 29 00:31:47 2018 +0900

    Fixed that gimp-text-dir-ttb-* icons are lacked in Symbolic.

commit d87d012d697628da28fe90199cc04b95b72ba8ef
Author: ONO Yoshio <ohtsuka.yoshio@gmail.com>
Date:   Sat Jul 28 16:23:10 2018 +0900

    Fix a typo.

commit cf0238bf7df56c384cdf3b7ec69557d14740f853
Author: ONO Yoshio <ohtsuka.yoshio@gmail.com>
Date:   Sat Jul 28 15:50:57 2018 +0900

    Fixed seg fault error.

commit b07f60d06f
Author: ONO Yoshio <ohtsuka.yoshio@gmail.com>
Date:   Fri Jul 27 17:15:34 2018 +0900

    Add support for vertical text writing.

    https://gitlab.gnome.org/GNOME/gimp/issues/641
2018-07-30 19:14:49 +02:00
Jehan 1e5cf10585 icons, app, libgimpwidgets: use Freedesktop standard icons.
Some icons were still using old gimp-namespaced names.
2018-07-28 12:27:10 +02:00
Michael Natterer 2ca55c8e36 libgimpwidgets: fix gimp_monitor_get_color_profile()
to actually return a profile on X11 and (hopefully) quartz again.
Got broken when porting from monitor_number to GdkMonitor.
2018-07-27 20:58:57 +02:00
Ell a5102a7dba */Makefile.am: add *marshal.h files to BUILT_SOURCES
In subdirs containing a generated foomarshal.h header, add the
generated sources to BUILT_SOURCES, so that they're generated
before the rest of the source files are built.  Otherwise, since
there is no rule specifying the dependency between the rest of the
source files and foomarshal.h, and since foomarshal.h is not
checked into git (and hence doesn't exist when doing a clean
build), compilation of the said source files may fail if they're
built before foomarshal.h is generated.
2018-07-24 14:05:08 -04:00
Michael Natterer 5c94ebaed3 libgimpwidgets, icons: add gimp-color-space-non-linear icon
For now just a copy of the "perceptual" icon.
2018-07-20 17:21:53 +02:00
luz.paz 732bcb463e Misc. comment typos
Found via `codespell`
2018-07-14 19:07:43 +00:00
Michael Natterer bab75b7365 Change a bazillion URLs to https://
Including all user-visible link and links called from code, like
the help pages.
2018-07-14 14:19:27 +02:00
Michael Natterer af44a5161d libgimpwidgets: fix GimpIntComboBox popup-shown appearance
The old hack doesn't work any longer, there is only one cell layout in
GTK+ 3.x, not separate ones for the button and the popup. Switch back
to recreating the cells in notify::popup-shown.

Also simplify the code, we only need to remember one cell renderer in
our struct, and remove manual resizing code that was only needed in
older GTK+ 2.x vrsions.
2018-07-13 14:50:06 +02: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 a1f2464ed6 libgimpwidgets: forgot one s/H/h/ in LCh 2018-07-08 17:29:55 +02:00
Michael Natterer 926dc070ef app, libgimp*: make user visible color model labels consistent
- "LCh" intead of "LCH"
- "CIE LCh" instead of "CIELCh"
- "HSV Hue" instead of "Hue (HSV)" for all models/components
2018-07-08 16:15:13 +02:00
Michael Natterer 5e02d02707 libgimpwidgets: remove calls to gdk_window_process_[all]_updates() 2018-07-01 15:17:43 +02:00
Jehan 792b27afe1 libgimpwidgets: do not free the GtkAdjustment when finalizing...
... GimpMemsizeEntry.
A GtkAdjustment is a GInitiallyUnowned, which means it is created as a
floating reference. GtkSpinButton assumes its ownership by calling
g_object_ref_sink() in gtk_spin_button_new() implementation. Thus it
will take care of freeing it and when we try to unref it in finalize(),
the object already doesn't exist.

Alternatively we could keep another ref (by calling g_object_ref_sink()
ourselves) but since the spin button is a child of the entry, it will
live all the way until the entry is freed. There is no need to increment
the references. So instead, simplify the code, and don't try to free an
object we don't own anymore.

This fixes CRITICAL assertions:
> g_object_unref: assertion 'G_IS_OBJECT (object)' failed
2018-06-24 23:28:50 +02:00
Michael Natterer 80997a8646 Remove most GTK_ADJUSTMENT() and (GtkAdjutment *) casts
they are obsolete in GTK+ 3.x because GtkAdjustment cannot be passed
around as GtkObject any longer, GtkObject is gone.
2018-06-24 18:15:16 +02:00
Michael Natterer acd3a6f169 Clean up color selector styling
- remove redundant frames, 3d-frames are gone anyway, so no need to
  keep double out/in frames around
- give all color selector classes CSS names
- add/fix some theme CSS styles
2018-06-24 15:41:04 +02:00
Michael Natterer 2b8b780b6a app, libgimpwidgets: all GimpColorHexEntries should have the same tooltip
Set the tooltip in GimpColorHexEntry itself and remove all other
tooltip setting. This just moves the translatable string sround in
libgimpwidgets/, and even removes it from app/.
2018-06-24 14:19:25 +02:00
Michael Natterer a04f2f3b3a libgimpwidgets: remove unused variable in GimpColorButton 2018-06-20 12:41:38 +02:00
Michael Natterer 60dfc45700 libgimpwidgets: finish GimpColorScale undeprecation, and lots of cleanup
- derive it from GtkScale not GtkRange so we get the keybindings again
- remove scroll_event() implementation, the parent class does the right
  thing now
- remove lots of magic size calculation code about focus and borders
  and whatnot
- instead, style its CSS nodes using a hardcoded CSS provider and simply
  "know" the size of the slider in draw(), did this in code instead of
  the theme CSS because we do pretty evil things here and we don't want
  theme authors to think they can change much about it
2018-06-20 12:41:38 +02:00
Michael Natterer 5674e31850 Generate icon resources where they are needed, and don't include .c files
Treat the gimp-core-pixbufs and gimp-icon-pixbufs resources like we
changed the cursor resources before, and clean out a lot of cruft from
icons/ (there is no need to generate stuff in all icon themes when we
include only one fallback icon from one theme).
2018-06-13 20:02:05 +02:00
Michael Natterer 8d66e7eaa1 libgimpwidgets: improve gimp_scroll_adjustment_values()
so it works for very small adjustment page sizes. Same as GTK+ commit
c0ba041c73214f82d2c32b2ca1fa8f3c388c6170
2018-06-13 15:22:51 +02:00
Michael Natterer 007bc5d8ae libgimpwidgets: pack the cells in GimpPageSelector's icon view manually
See previous commit.
2018-06-12 18:32:21 +02:00
Michael Natterer 8d6f023b41 Issue #1435 - Add tooltips to GimpColorNotebook's tabs 2018-06-08 19:44:29 +02:00
Michael Natterer b75cbcb417 libgimpwidgets: install gimpbusybox.h as public header 2018-06-08 18:58:04 +02:00
Michael Natterer b36205176e app, libgimp*: remove the config option to disable tooltips
Also remove all traces of it from the plug-in protocol and raise the
protocol version to 0x0100 (we now allow features and therefore
version bumps in stable, and the master protocol version should always
be higher). Fix the code that aborts plug-in startup on protocol
version mismatch, we can't use gimp_message() because we have no
protocol.
2018-06-06 19:23:30 +02:00
Ell 8d35299410 libgimpwidgets: add exponentiation support to eevl
Add support for exponentiation (using the ^ operator) to eevl.
This is occasionally useful, e.g., in geometrically-derived
quantities involving square roots.
2018-06-01 10:53:06 -04:00
Michael Natterer 1b7d63cce9 Use g_set_object() in a lot of places, and splrinkle some g_clear_object() 2018-06-01 12:59:52 +02:00
Ell f847796943 app, libgimpwidgets: add generated cursor files to CLEANFILES
Needed after commit a9592a59c8.
2018-05-31 02:56:07 -04:00
Jehan 0ac3cd01f0 libgimpwidgets: fix default icon.
gtk_window_set_default_icon_name() apparently isn't able to properly
fallback to symbolic or non-symbolic variant. So let's test both.
There is also gtk_window_set_icon_list() but it takes a list of pixbuf,
so I really doubt it is the best solution either. The proposed solution
is working ok for now, even though I feel it is again a bit hackish.
2018-05-30 23:52:24 +02:00
Jehan f3347d6961 libgimpwidgets: making GimpCellRenderer symbolic and DPI aware.
This commit makes 2 improvements to this renderer. First it will allow
it to find symbolic variants of icons. Second it properly renders icons
when the display is scaled, by producing pixbuf size double to logical
drawing size and making cairo rendering it at the expected logical size.
2018-05-30 16:16:32 +02:00
Michael Natterer 0f484ed3d5 libgimpwidgets: remove all size negotiation/allocation code from GimpFrame
Let GtkFrame handle things and simply set "spacing" and "indent" as
left and top margins on the frame's child.

This fixes all tests \o/
2018-05-30 00:37:15 +02:00
Ell 000fd8e69b libgimpwidgets: add GimpBusyBox
GimpBusyBox is used to show a message indicating an operation is in
progress.  It's basically just a spinner and a label, with some
styling.

We're going to use it both in app/ and in a plug-in.
2018-05-29 16:04:28 -04:00
Michael Natterer 2f425f0e2a libgimpwidgets: allow NULL adjustments in gimp_scroll_adjustment_values() 2018-05-29 00:04:31 +02:00
Michael Natterer a9592a59c8 Merge request 4 - Generated .c sources are used as headers...
...Generate .h files instead.

Generate proper .c and .h files for color-picker and tool cursors in
the directories where they are built, and stop including them in other
.c files.
2018-05-28 17:25:18 +02:00
Michael Natterer 7fab74f431 libgimpwidgets: use G_DEFINE_ABSTRACT_CLASS for preview classes 2018-05-28 17:24:58 +02:00
Michael Natterer 7990b1d57c libgimp: update all .def files 2018-05-25 22:13:33 +02:00
Michael Natterer d57ab7faf2 libgimpwidgets: move all GimpSizeEntry members to private 2018-05-25 19:15:00 +02:00
Michael Natterer 080f7ae909 libgimpwidgets: undeprecate GimpNumberPairEntry and style the font with CSS 2018-05-21 19:31:15 +02:00
Michael Natterer ee62c7e92c libgimpwidgets: undeprecate GimpScrolledPreview 2018-05-21 14:07:40 +02:00
Michael Natterer ed023bf05e libgimpwidgets: undeprecate insensitive drawing of GimpColorSacle
the same way as in GimpColorArea.
2018-05-20 21:06:35 +02:00
Michael Natterer 9b3366309c libgimpwidgets: undeprecate insensitive drawing of GimpColorArea
by simply drawing the buffer with cairo_mask() and a stipple pattern
so we get the same effect as before, but without rendering the
widget's background color into the buffer ourselves.
2018-05-20 21:06:35 +02:00
Michael Natterer 0b7aad66ed libgimpwidgets: left-align gimp_prop_enum_label_new()
just like gimp_prop_label_new().
2018-05-20 21:06:35 +02:00
Michael Natterer 4133a032de Undeprecate/improve GimpScaleComboBox and GimpUnitComboBox
Remove label-scale style properties and gtk_widget_modify_font()
hacks and theme them using CSS.
2018-05-20 21:06:35 +02:00
Simon Budig 7d64cf62c6 libgimpwidgets: rename the _grid()-Variants of gimp_scale_entry_*
Adjust all plugins to follow accordingly.

This concludes the GtkTable'ocide.
2018-05-20 21:06:35 +02:00
Simon Budig f01a978627 libgimpwidgets: kill the last remaining occurencces of GtkTable 2018-05-20 21:06:35 +02:00
Simon Budig 25c033b263 some odds and ends regarding GtkTable removal... 2018-05-20 21:06:35 +02:00
Michael Natterer 2dd2f1509b Enable and fix smooth scrolling and zooming
- Fix gimp_scroll_adjustment_values() for smooth scroll events
- Set GDK_SMOOTH_SCROLL_MASK on all widgets where we set GDK_SCROLL_MASK
- Add GIMP_ZOOM_SMOOTH to enum GimpZoomType
- Add "gdouble delta" to gimp_zoom_model_step()
- Change the meaning of the "scale" parameter to "scale or delta" in
  all functions that take GimpZoomType and a scale factor.
2018-05-20 21:06:34 +02:00
Michael Natterer 4a979995a3 libgimpwidgets: add gimp_scroll_adjustment_values()
and use it in GimpScrolledPreview. It supports smooth scrolling and
does roughly the same as a whole lot of magic code in GtkScrolledWindow
and GtkRange, resulting in the same scrolling behavior as in stock
GTK+ widgets.
2018-05-20 21:06:34 +02:00
Michael Natterer 97e19eb385 libgimpwidgets: set GDK_EVENT_SCROLL on GimpPreview's preview area 2018-05-20 21:06:34 +02:00
Michael Natterer b55e481459 libgimpwidgets: remove gimp_spin_button_new() 2018-05-20 21:06:34 +02:00
Michael Natterer c2752a685c libgimpwidgets: also move GTK_RESPONSE_CLOSE buttons to the left
in GimpDialog's header bar.
2018-05-20 21:06:34 +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
Michael Natterer 3be0d13be3 libgimpwidgets: add macros to hide alternative_button_order warnings
Since we don't know yet what to do about this, let's not spam the
build with distracting warnings in the meantime.

gimp_dialog_set_alternative_button_order
gimp_dialog_set_alternative_button_order_from_array

are macros which just call the deprecated GtkDialog functions, but
wrap them in G_GNUC_BEGIN,END_IGNORE_DEPRECATIONS.
2018-05-20 21:06:34 +02:00
Michael Natterer 08458dcdf6 libgimpwidgets: port GimpPreview to GtkGrid 2018-05-20 21:06:34 +02:00
Michael Natterer 1d8696cd80 Get rid of gdk_flush() globally, use gdk_display_flush() 2018-05-20 21:06:34 +02:00
Michael Natterer b857311bbf libgimpwidgets: undeprecate gimppickbutton-default.c 2018-05-20 21:06:33 +02:00
Michael Natterer bb2a9d119f libgimpconfig: move all GimpColorConfig members to private 2018-05-20 21:06:33 +02:00
Michael Natterer 369b273157 libgimpwidgets: move GimpEnumStore.enum_class to private 2018-05-20 21:06:33 +02:00
Michael Natterer d87eddb1c4 libgimpwidgets: move all GimpPreview members to private
and add tons of API so subclasses can still do their thing, probably
subject to change/fix.
2018-05-20 21:06:33 +02:00
Simon Budig 9cb67fa992 app: kill the last GtkTables. 2018-05-20 21:06:33 +02:00
Simon Budig 9954030487 app/widgets: port the gimpstrokeeditor to GtkGrid 2018-05-20 21:06:33 +02:00
Michael Natterer 3e680b9f32 libgimpwidgets: move all GimpScrolledPreview members to private 2018-05-20 21:06:33 +02:00
Michael Natterer a535e425ee libgimpwidgets: move all GimpPreviewArea members to private 2018-05-20 21:06:33 +02:00
Michael Natterer 677c2bb8d0 libgimpwidgets: move public GimpIntStore member to private 2018-05-20 21:06:33 +02:00
Michael Natterer f4f106ad26 libimp*: add private pointers to all instance structs
even if we don't have private members (yet). Also make class padding 8
pointers in all headers. This commit moves nothing to private, it just
makes all headers consistent and adjusts .c files accordigly.
2018-05-20 21:06:33 +02:00
Michael Natterer 4afb7ca4c7 libgimpwidgets: set the widgets's hexpand in gimp_grid_attach_aligned() 2018-05-20 21:06:33 +02:00
Simon Budig 72e63887ba libgimpwidgets: convert GimpSizeEntry to a GtkGrid. 2018-05-20 21:06:32 +02:00
Michael Natterer 6c8cf7876a Replace lots of deprecated gtk_menu_popup(), only GimpUIManager left 2018-05-20 21:06:30 +02:00
Michael Natterer 4f0a87ffa6 app, libgimpwidgets, themes: fix some themeing
Add CSS names using gtk_widget_class_set_css_name(), remove styling in
code and instead do it properly in CSS, so far in the System theme.
All horribly incomplete but a start.
2018-05-20 21:06:30 +02:00
Michael Natterer 56b28773da libgimpwidgets: honor the gtk-dialogs-use-header setting in GimpDialog
and undeprecate the widget.
2018-05-20 21:06:30 +02:00
Michael Natterer 1f29d499f8 libgimpwidgets: GimpBrowser undeprecated: threads and focus-on-click 2018-05-20 21:06:30 +02:00
Michael Natterer 5ece7a8d1f Port a lot of stuff from GdkScreen/monitor_number to GdkMonitor
including some fixes for getting pointer coords, and needed
API changes in libgimpwidgets.
2018-05-20 21:06:30 +02:00
Michael Natterer 7efaf024f3 libgimpwidgets: create GimpIntComboBox' cells in constructed() not init()
Apparently this now has to happen later due to some GTK+ change.
2018-05-20 21:06:30 +02:00
Michael Natterer 901c3ddcf8 Get rid of the deprecated gtk_icon_size_lookup_for_settings()
and use gtk_icon_size_lookup() instead.
2018-05-20 21:06:30 +02:00
Michael Natterer 7b6d42a443 libgimpwidgets: add gimp_grid_attach_aligned() 2018-05-20 21:06:30 +02:00
Michael Natterer 1b3135ca95 Get rid of using GtkMisc API globally 2018-05-20 21:06:30 +02:00
Michael Natterer 80985692a4 libgimpwidets: port GimpColorScales to GtkGrid 2018-05-20 21:06:30 +02:00
Michael Natterer 1ce246f2da libgimpwidgets: add GtkGrid variants of gimp_[color_]scale_entry_new()
as temporary porting hack, they will eventually be renamed to the old
names once GtkGrid porting is done.
2018-05-20 21:06:30 +02:00