When we set the GUI language through Preferences, also set LC_TIME, so
that locale-aware date functions also produce the right formats.
For instance, I use this in the About dialog to format the release date
of the last version of GIMP.
The GimpDial widget can now be snapped to the nearest fifteen degree
interval by holding the shift key while adjusting. When adjusting both
an alpha and beta value, both will be snapped according to the alpha,
preserving the angle between them
When an update is available, a big frame is visible, proposing to go to
the download page. Now a button is also available to explicitly request
for an update check in other cases (bypassing the wait delay for a
future startup).
I was wondering which shape should take the new version notification
(again some ugly pop-up?!) and realized using the About dialog was a
good idea.
This is preparatory work for this to happen.
First, let's make the check happen at each startup on unstable (still
once a week on stable).
Second, make it parse gimp.org's gimp_versions.json on stable, but
testing's one on unstable and also check environment variable
GIMP_DEV_VERSIONS_JSON (unstable only) to allow setting a local path
(allowing to tweak the file and test various cases).
Unrelated to testing, some improvements:
- save a timestamp in seconds (really no need to keep microseconds
precision here).
- just in case, check that the saved timestamp is not in the future.
This fixes the following warning when compiling with Mingw:
> warning: integer overflow in expression of type 'long int' results in '-694967296' [-Woverflow]
GIMP will now process the remote gimp_versions json file to look if one
is using the last version of GIMP. This initial code doesn't act up yet
on this information. This will come in further commits.
Here are the characteristics:
- Since this requires internet access, a new checkbox is available in
the Preferences dialog, allowing to disable version checks. Note that
it is enabled by default as it is an important security feature, but
it has to be deactivatable.
- The remote access is done as an async operation because we don't want
it to block the startup in any way (for whatever reason). Also it
doesn't output errors if it fails to not be a bother (you don't
technically need internet access for an image program).
- We don't check at every startup. At each successful check, we save a
timestamp to prevent too frequent useless checks (I set it the timer
to a week or more for now).
The point will be for a packager to create a unique build ID to identify
the build or provenance. I also add a revision number so that we can
identify 2 builds from the same version/commit, same maker and platform.
It will also be used later to check for new versions (see "phone home"
feature #2584).
Separating autotools and meson commits for easy backport.
... or copied RGB channel
In gimp_drawable_merge_filter(), make sure the drawable's source
node is constructed before applying the operation. The
construction of the source node connects the drawable's filter
stack to the udnerlying source node (usually, the buffer-source
node), which we rely on when calling
gimp_gegl_apply_cached_operation(), since we pass
connect_src_buffer == FALSE. Otherwise, the operation is applied
to an empty input, instead of the drawable content.
In gimp_histogram_view_update_bins(), don't update the view's
range if there's no histogram or the histogram is empty, to avoid
discarding the existing range. Additionally, improve the range
readjustment when the number of bins changes.
We are running gimp_image_set_imported_file() when saving, with NULL to
drop the tie with the imported file. Let's only change the default
resolutions when we actually set an imported file.
Also set the `resolution_set` flag even when it doesn't change the
current values (hence no undo or signals), for instance setting from 300
to 300 PPI. In such case, even though nothing changes, the resolution
has to still be considered as explicitly set.
In the reporter case, any one of these 2 fixes is enough.
See also commit fef9b1d2a3 (set to 72 PPI as default for imported files
only) and commit a8f552da2f (set imported file to NULL).
Just fixing previous commit like this instead of wasting time in gitlab
with useless reviews for oneliners. When will gitlab allow us to amend
patches directly before merge?!
In the Bucket Fill tool, when using line-art mode, use a
GimpImageProxy as input for the GimpLineArt object, instead of
using the image direclty, when the line-art source is "all visible
layers". Set the proxy's show-all mode according to the active
shell, so that the line-art uses the full image projection,
including out-of-canvas regions, when in show-all mode.
In GimpLineArt, add support for arbitrary input-buffer extents,
by shifting/unshifting the input/output buffers before/after
passing them to the main algorithm, so that the algorithm keeps
working with buffers whose top-left corner is at (0, 0).
In GimpImageProxy, implement the GimpPickable interface, so that
the proxy can be used as both a viewable and a pickable for the
image projection, with direct control over the show-all mode. This
will allow us to use a GimpImageProxy as input for a GimpLineArt.
Add an internal gimp_image_get_preview_format(), which returns the
format to use for preview buffers, and use it in both
gimpimage-preview and GimpImageViewable, to reduce duplication.
Add an n_components parameter to gimp_histogram_clear_values(),
which allows to set the new component count when clearing the
histogram. This is useful to seed the histogram with the correct
number of channels, for display purposes, before starting an async
histogram calculation. We use this in GimpHistogramEditor, to
avoid resetting the view's channel back to "Value" each time the
active drawable changes.
In GimpHistogram, get rid of the "n-channels" property and
corresponding gimp_histogram_n_channels() function. The former
returned the actual number of channels, but this wasn't too useful,
as channel values may not be sequential; the latter returned the
number of components. Instead, add an "n-components" property and
a corresponding gimp_histogram_n_components() function, both of
which return the number of components. Furthermore, add a
gimp_histogram_has_channel() function, which determines if the
histogram has a given channel; this allows for simple testing for
channel availability, which was done wrong in various places.
Adjust the GimpHistogram code for the changes, and clean it up,
fixing a few bugs.
Adjust users of GimpHisotgram for the changes. In particular,
in GimpHisotgramView, fix the channel-availability test when
setting the view's histogram (which happens whenever the active
drawable's preview is frozen), to avoid erroneously swithcing the
view's channel back to "Value" when a non-RGB channel is selected.
Tested in a VM. Minimized window is properly deiconified and showed to
the front. Though a window in the back (not minimized) is not moved to
the front.
Swapped arguments: height is passed to width. width is passed to height.
Please check the function in /app/core/gimpbrush.c at line: 606
void
gimp_brush_transform_size (GimpBrush *brush,
gdouble scale,
gdouble aspect_ratio,
gdouble angle,
gboolean reflect,
gint *width,
gint *height)
(cherry picked from commit aeadaaeb6c)