Commit Graph

2662 Commits

Author SHA1 Message Date
b49c062fa4 New upstream version 2.10.34 2023-03-01 18:41:57 -05:00
30c23df646 New upstream version 2.10.32 2022-08-01 09:14:18 -04:00
8229194abf Issue #4107: Removing titlebar/borders from Windows Splash Screen (Backport) 2022-02-01 16:22:49 +00:00
52519f1290 New upstream version 2.10.30 2021-12-27 21:32:02 -05:00
1ff0cc1f5c New upstream version 2.10.28 2021-09-19 12:12:14 -04:00
970059b644 New upstream version 2.10.26 2021-09-09 19:33:41 -04:00
75871f0418 Issue #5989 - performance improvement patches for gtk and gimp
Reviewer comment (Jehan): we have used this patch successfully on our
installers since start of 2021 (see commit b4d665d of our gtk-osx fork)
and it really improved the situation. I only fixed minor coding style
stuff in the patch.
Looking at what it does, I guess it is not ideal long-term if related to
10-bit display (as I understand from the comment), which a graphics app
would want to support properly. But for now, this is better than
extra-slow display until we get macOS developers able to look at this
more in depth in the future (I don't think that our dependencies are
really ready yet for 10-bit display support anyway, though I may be
wrong).
Some other forums seem to say it comes from macOS invalidating now more
than it should (i.e. the whole area instead of only the changed area)
and this NSViewUsesAutomaticLayerBackingStores flag would disable this
behavior. It might be one of these reasons, the other or both. This is
anyway a good first start for future contributors.

(cherry picked from commit 4f9b7373e6)
2021-08-04 21:52:50 +02:00
6c74aa8490 New upstream version 2.10.24 2021-07-18 14:31:43 -04:00
2fd4fc7c7a app: improve opening images through the DBus service.
- Set the software as `initialized` later, and in particular after all
  recovered images (from crash) then all command line images were
  opened. The reason is that the DBus calls have necessarily been made
  after GIMP was started (typically could be images double-clicked
  through GUI). We don't want them to appear before the images given in
  command line (or worse, some before and some after).
- Process DBus service's data queue as a FIFO. The image requested first
  will be loaded first.
- When a DBus call happens while GIMP is not initialized or restored,
  switch to a timeout handler. The problem with idle handlers is that
  they would be attempted too often (probably even more during startup
  when no user event happens). This is good for actions we want to
  happen reasonably quickly (like would be normally DBus calls), but not
  when we are unsure of program availability schedule (i.e. at startup).
  Here not only the handler would run a lot uselessly but it would
  likely even slow the startup down by doing so. So while GIMP is not
  initialized, switch to half-a-second timeout handler, then only switch
  back to idle handler when we are properly initialized and GIMP is
  ready to answer calls in a timely manner.

(cherry picked from commit b2649daf11)
2020-11-11 13:19:43 +01:00
f2f0b6aae8 app: wait for the software to be fully initialized before processing…
… DBus calls.
In particular, Aryeom would start GIMP and directly double click some
image to be loaded in GIMP in the very short while when splash is
visible. Previous code would wait for the `restored` flag to be TRUE.
This was nearly it as we can actually start loading images as soon as
the 'restore' signal has passed. Yet the flag is set in the main
handler, but we actually also need the <Image> UI manager to exist,
which is created in gui_restore_after_callback() (so also a 'restore'
handler, yet after the main signal handler, i.e. after `restored` is set
to TRUE). Without this, gui_display_create() would fail with a CRITICAL,
hence file_open_with_proc_and_display() as well.

I could have tried to set the `restored` flag later, maybe with some
clever signal handling trick (and handle both the GUI and non-GUI cases,
i.e. I cannot set the flag inside gui_restore_after_callback() as it
would break the non-GUI cases). Instead I go for a simpler logics with a
new `initialized` flag which is only meant to be set once, once
everything has been loaded, i.e. once you can consider GIMP to be fully
running hence ready to process any common runtime command.

(cherry picked from commit a86ed68870)
2020-11-11 13:19:35 +01:00
951e7d8e03 app: fix some glitches in the splash status text.
These small glitches have bothered me for a while now, so I finally
fixed these before the dev release!
Basically there were 2 fixes:
1. use the ink extents to compute any drawn area as this is what will be
   actually drawn.
2. Not only expose the drawn area of the new text, but also the one of
   the previous text in order to be sure all text pixels are correctly
   reset (in case the new text is smaller than previous one). I.e. we
   must expose the smallest rectangle containing both previous and new
   area of text.

(cherry picked from commit 3a50e52ac7)
2020-10-26 20:18:24 +01:00
627ba9c288 New upstream version 2.10.22 2020-10-06 19:17:19 -04:00
c6b46b63b5 New upstream version 2.10.20 2020-08-26 11:05:56 +01:00
Ell
464f259473 app: during splash-screen lookup, don't leak GFileEnumerator
(cherry picked from commit e09bb089a8b04372ac66aea8dc15c97301245683)
2020-08-11 21:52:08 +03:00
3c50032a7b app: do not free non-allocated DBus manager.
While this issue was unseen so far on common desktop machines, the CI
build encountered it, hence failing 6 of the unit tests.
A connection to the bus could not be established hence the dbus_manager
was never allocated, and finally it would crash at exit if we tried to
unref it unconditionnally. Use g_clear_object() instead.

Also add some stderr output for easier debugging, for when one of the 2
possible error cases might happen (as documented by g_bus_own_name()).

(cherry picked from commit 2c1efdedf0)
2020-04-01 15:08:35 +02:00
8e7900cbf2 New upstream version 2.10.18 2020-03-29 00:23:03 -04:00
Ell
a787d61fbc app: rename GimpParallelRunAsyncFunc to GimpRunAsyncFunc
... and move it to core-type.h, in preparation for next commit.

(cherry picked from commit f25a8934fa)
2020-03-14 00:45:41 +02:00
65b6f7cc6f app: s/getenv/g_getenv/ in gui_restore_after_callback() 2020-02-18 20:39:15 +01:00
2ffa09fab5 app: fix indentation in gui_restore_after_callback() 2020-02-18 20:38:18 +01:00
e59d8ca75c Move the comment to match the function it explains 2020-01-10 14:56:33 +00:00
eb4b8fbd05 Move macos menu init to the gui related code and reparent it with a main window.
Closes #1258
2020-01-10 11:03:01 +01:00
Ell
8591b5b33f app: add compact style for spin scales
Add a boolean "compact" style property for GimpSpinScale.  When
TRUE, the widget uses a narrower layout, and the different upper/
lower-half behavior is gone.  Instead, the behavior depends on the
mouse button used: left-click is used for absolute adjustment
(similar to the upper-half behavior), middle-click is used for
relative adjustment (similar to the lower-half behavior), and right
click is used for manual value entry (similar for clicking on the
text area).

Add a new "Compact sliders" toggle to the Interface prefernces, to
control the spin-scale style.  Apply the style globally through the
themerc file, and update it when the option changes.

Use the compact style by default, because otherwise no one would
find it.  Theming in GTK3 works differently, and spin scales in
master need more work regardless, so this stays in 2.10 for now.
2020-01-06 23:10:05 +02:00
b67fe859a7 app, devel-docs: remove dangling DBUS_GLIB_* variables.
dbus-glib is no more a dependency since commit c4460e84, i.e. already
since 2013!

(cherry picked from commit 5f2a6940e3)
2019-11-16 19:32:35 +01:00
a3fead4bbd New upstream version 2.10.14 2019-11-09 19:05:21 -05:00
e729d0b6bb Issue #4119: GIMP main window not restored from Taskbar under MS Windows
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.

(cherry picked from commit 2f01751907)
2019-10-20 19:48:20 +02:00
b4569d3b18 New upstream version 2.10.12 2019-10-13 20:52:44 -04:00
417d0dccd7 app: start porting away from GtkAction and friends
Step one: get rid of all those deprecation warnings that make
it hard to see any other warnings:

- add a lot of dummy API to GimpAction, GimpActionGroup, GimpUIManager
  etc. which simply forwards to the deprecated GTK functions, they
  will all go away again later
- rename GimpAction to GimpActionImpl
- add interface GimpAction that is implemented by all action classes,
  creates a common interface and allows to remove some duplicated
  logic from GimpToggleAction and GimpRadioAction, and at the same
  time adds more features

(cherry picked from commit 86e07c16b5)

Merged to gimp-2-10 to keep the diff to master as small as possible
2019-07-02 14:57:45 +02:00
Ell
7edbad3144 app: include system gtkrc file in themerc
Include the system-wide gtkrc file, in addition to the user-
specific gtkrc file, in the generated themerc file, instead of
copying the former into the latter when creating the user's
gimpdir.  This allows us to modify the system-wide gtkrc file, and
having the changes take effect in existing installations.
2019-03-27 20:15:50 -04:00
706fe079c2 app: make sure we reset tool modifier state before saving options.
I had this funny behavior when I was quitting GIMP with the active tool
using modifiers (for instance bucket fill). Each time I'd quit with
ctrl-q (and if the image is not dirty), the options would use the value
from the modifier state and be saved as-is. Hence at next restart, the
default value was always different!

(cherry picked from commit dd3d9ab3dd)
2018-12-19 15:48:26 +01:00
48e14ef3b9 app, libgimpconfig: make various usage of g_file_replace() safer.
When an error occurs, we want to prevent overwriting any previous
version of the file by incomplete contents. So run
g_output_stream_close() with a cancelled GCancellable to do so.
See also discussion in #2565.

(cherry picked from commit 613bf7c5ab)
2018-12-07 00:51:05 +01:00
62c52742cd do not activate OSX menu if tests are running to prevent crash 2018-11-23 11:39:21 +01:00
a831531d88 New upstream version 2.10.8 2018-11-08 20:11:56 -05:00
360aee10d8 app: Add option in the windows menu to hide the image tab bar. 2018-10-22 20:41:29 +02:00
Ell
397bbb29a9 app: fix gimp_wait() deadlock
In the GUI implementation of gimp_wait(), explicitly finish the
input-pipe async operation after the busy-dialog plug-in
terminates, to avoid the async callback function from being
repeatedly called, stalling the main thread.  Previously, this code
relied on gimp-parallel implicitly aborting the async operation,
but this is no longer the case since commit
4969d75785.

(cherry picked from commit 85b16b9eaa)
2018-10-11 02:26:08 -04:00
Ell
31b369d09f 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:41:35 -04:00
Ell
8a2126fc98 app: s/char/gchar/ in last commit 2018-09-02 13:48:19 -04:00
Ell
499a8962b3 app: don't use g_file_peek_path() in splash.c
... use g_file_get_path() instead.

g_file_peek_path() was added in GLib 2.56, but gimp-2-10 only
requires 2.54.
2018-09-02 13:42:58 -04:00
9bb61b2a3c New upstream version 2.10.6 2018-08-20 09:59:39 -04:00
d49606ee83 app: work with GIO in splash code.
This will go with the next commit, but I broke it so I can backport the
code without extension handling in gimp-2-10 first.

(cherry picked from commit c7b5977637)
2018-08-12 23:14:02 +02:00
c05bd7b6c9 app: small code cleaning.
Removing unused declaration of icons_set_icon_theme().
And reorder a bit the declarations to match the definition order.

(cherry picked from commit ae19441ddc)
2018-08-11 00:34:43 +02:00
a88c0ffb93 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:47:19 +02:00
Ell
fac91ddad4 app: add gimp_parallel_run_async_{full,independent}()
Remove the "independent" parameter of gimp_parallel_run_async(),
and have the function always execute the passed callback in the
shared async thread-pool.

Add a new gimp_parallel_run_async_full() function, taking, in
addition to a callback and a data pointer:

  - A priority value, controlling the priority of the callback in
    the async thread-pool queue.  0 is the default priority (used
    by gimp_parallel_run_async()), negative values have higher
    priority, and positive values have lower priority.

  - A destructor function for the data pointer.  This function is
    called to free the user data in case the async operation is
    canceled before execution of the callback function begins, and
    the operation is dropped from the queue and aborted without
    executing the callback.  Note that if the callback *is*
    executed, the destructor is *not* used -- it's the callback's
    responsibility to free/recycle the user data.

Add a separate gimp_parallel_run_async_independent() function,
taking the same parameters, and executing the passed callback in
an independent thread, rather than the thread pool.  This function
doesn't take a priority value or a destructor (and there's no
corresponding "_full()" variant that does), since they're pointless
for independent threads.

Adapt the rest of the code to the changes.

(cherry picked from commit b74e600c12)
2018-07-04 16:12:21 -04:00
Ell
081867de1e app: fix gui_wait() cleanup
(cherry picked from commit 5a66d6cc74)
2018-05-29 16:35:43 -04:00
Ell
4527390cd6 app: add gimp_wait()
Add a GimpGui::wait() virtual function, and a corresponding
gimp_wait() function.  The function takes an object implementing
the GimpWaitable interface, and a printf-style message, and waits
for the object to become ready, displaying the message as
indication in the meantime.  The default implementation simply
prints the message to STDERR.

Implement the function in gui-vtable, using the busy-dialog plug-
in added in the previous commit, to display the message in a
dialog.  Additionally, if the object implements the GimpCancelable
interface, provide a "cancel" button in the dialog, which, when
pressed, causes gimp_cancelable_cancel() to be called on the
object.  Note that the function keeps waiting on the object even
after requesting cancelation; GimpTriviallyCancelableWaitable can
be used to stop the wait once cancelation has been requested.
2018-05-29 16:07:48 -04:00
efdf9e63ac New upstream version 2.10.2 2018-05-20 22:48:19 -04:00
fa0a02125c app: make the splash texts dynamic, so they are larger on larger splashes
and position the lower text roughly in the middle between the upper
text and the progress bar. This gives better spacing that the previous
logic.
2018-05-08 22:54:53 +02:00
8265b2425b app: s/GtkObject/GObject/ in gui-message.c, and minor reordering 2018-04-28 02:18:44 +02:00
07c3f6bee3 New upstream version 2.10.0 2018-04-27 11:44:24 -04:00
566351d422 New upstream version 2.10.0~RC2 2018-04-19 11:58:35 -04:00
309d118f65 app, devel-docs: improve position of loading text on splash image.
The upper text will be centered on the top quarter of the bottom quarter
of the splash image, whereas the bottom text will be centered on the
bottom quarter of the bottom quarter of the splash (unless the splash is
too small, in which case the double of the layout pixel extents will be
used). Basically don't use absolute pixel values anymore for
positionning. This should all be done relatively since there are
nowadays all kind of display size (and positionning the text 6 pixels to
the bottom, as it was done, may be ok on low density displays, yet will
look ugly on high density screens).

Also write this down in the splash requirements in the release howto so
that splash designers are aware that the bottom quarter of their image
will have to be adapted for printing text.
2018-04-15 02:32:30 +02:00