New upstream version 2.10.24

This commit is contained in:
Jeremy Bicha
2021-07-18 14:31:43 -04:00
639 changed files with 135814 additions and 378935 deletions

View File

@ -1,4 +1,4 @@
# Makefile.in generated by automake 1.16.2 from Makefile.am.
# Makefile.in generated by automake 1.16.3 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2020 Free Software Foundation, Inc.
@ -90,14 +90,8 @@ build_triplet = @build@
host_triplet = @host@
subdir = app/gui
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4macros/gtk-doc.m4 \
$(top_srcdir)/m4macros/intltool.m4 \
$(top_srcdir)/m4macros/libtool.m4 \
$(top_srcdir)/m4macros/ltoptions.m4 \
$(top_srcdir)/m4macros/ltsugar.m4 \
$(top_srcdir)/m4macros/ltversion.m4 \
$(top_srcdir)/m4macros/lt~obsolete.m4 \
$(top_srcdir)/acinclude.m4 $(top_srcdir)/m4macros/alsa.m4 \
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/m4macros/alsa.m4 \
$(top_srcdir)/m4macros/ax_compare_version.m4 \
$(top_srcdir)/m4macros/ax_cxx_compile_stdcxx.m4 \
$(top_srcdir)/m4macros/ax_gcc_func_attribute.m4 \
@ -862,7 +856,8 @@ all-am: Makefile $(LIBRARIES)
installdirs:
install: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) install-am
install-exec: install-exec-am
install-exec: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) install-exec-am
install-data: install-data-am
uninstall: uninstall-am
@ -984,7 +979,7 @@ ps-am:
uninstall-am:
.MAKE: all check install install-am install-strip
.MAKE: all check install install-am install-exec install-strip
.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
clean-generic clean-libtool clean-noinstLIBRARIES \

View File

@ -616,7 +616,7 @@ gimp_dbus_service_ui_call_open (
*
* Finishes an operation started with gimp_dbus_service_ui_call_open().
*
* Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
* Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
*/
gboolean
gimp_dbus_service_ui_call_open_finish (
@ -649,7 +649,7 @@ _out:
*
* See gimp_dbus_service_ui_call_open() for the asynchronous version of this method.
*
* Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
* Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
*/
gboolean
gimp_dbus_service_ui_call_open_sync (
@ -720,7 +720,7 @@ gimp_dbus_service_ui_call_open_as_new (
*
* Finishes an operation started with gimp_dbus_service_ui_call_open_as_new().
*
* Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
* Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
*/
gboolean
gimp_dbus_service_ui_call_open_as_new_finish (
@ -753,7 +753,7 @@ _out:
*
* See gimp_dbus_service_ui_call_open_as_new() for the asynchronous version of this method.
*
* Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
* Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
*/
gboolean
gimp_dbus_service_ui_call_open_as_new_sync (
@ -827,7 +827,7 @@ gimp_dbus_service_ui_call_batch_run (
*
* Finishes an operation started with gimp_dbus_service_ui_call_batch_run().
*
* Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
* Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
*/
gboolean
gimp_dbus_service_ui_call_batch_run_finish (
@ -861,7 +861,7 @@ _out:
*
* See gimp_dbus_service_ui_call_batch_run() for the asynchronous version of this method.
*
* Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
* Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
*/
gboolean
gimp_dbus_service_ui_call_batch_run_sync (
@ -930,7 +930,7 @@ gimp_dbus_service_ui_call_activate (
*
* Finishes an operation started with gimp_dbus_service_ui_call_activate().
*
* Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
* Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
*/
gboolean
gimp_dbus_service_ui_call_activate_finish (
@ -959,7 +959,7 @@ _out:
*
* See gimp_dbus_service_ui_call_activate() for the asynchronous version of this method.
*
* Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
* Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
*/
gboolean
gimp_dbus_service_ui_call_activate_sync (

View File

@ -147,6 +147,7 @@ gimp_dbus_service_dispose (GObject *object)
{
g_source_remove (g_source_get_id (service->source));
service->source = NULL;
service->timeout_source = FALSE;
}
while (! g_queue_is_empty (service->queue))
@ -269,6 +270,7 @@ gimp_dbus_service_queue_open (GimpDBusService *service,
if (! service->source)
{
service->source = g_idle_source_new ();
service->timeout_source = FALSE;
g_source_set_priority (service->source, G_PRIORITY_LOW);
g_source_set_callback (service->source,
@ -302,6 +304,7 @@ gimp_dbus_service_queue_batch (GimpDBusService *service,
if (! service->source)
{
service->source = g_idle_source_new ();
service->timeout_source = FALSE;
g_source_set_priority (service->source, G_PRIORITY_LOW);
g_source_set_callback (service->source,
@ -328,14 +331,39 @@ gimp_dbus_service_process_idle (GimpDBusService *service)
{
IdleData *data;
if (! service->gimp->restored)
return TRUE;
if (! service->gimp->initialized || ! service->gimp->restored)
{
if (! service->timeout_source)
{
/* We are probably starting the program. No need to spam GIMP with
* an idle handler (which might make GIMP slower to start even
* with low priority).
* Instead let's add a timeout of half a second.
*/
service->source = g_timeout_source_new (500);
service->timeout_source = TRUE;
data = g_queue_pop_tail (service->queue);
g_source_set_priority (service->source, G_PRIORITY_LOW);
g_source_set_callback (service->source,
(GSourceFunc) gimp_dbus_service_process_idle,
service,
NULL);
g_source_attach (service->source, NULL);
g_source_unref (service->source);
return G_SOURCE_REMOVE;
}
else
{
return G_SOURCE_CONTINUE;
}
}
/* Process data as a FIFO. */
data = g_queue_pop_head (service->queue);
if (data)
{
if (data->file)
file_open_from_command_line (service->gimp, data->file, data->as_new,
NULL, /* FIXME monitor */
@ -350,12 +378,33 @@ gimp_dbus_service_process_idle (GimpDBusService *service)
gimp_dbus_service_idle_data_free (data);
return TRUE;
if (service->timeout_source)
{
/* Now GIMP is fully functional and can respond quickly to
* DBus calls. Switch to a usual idle source.
*/
service->source = g_idle_source_new ();
service->timeout_source = FALSE;
g_source_set_priority (service->source, G_PRIORITY_LOW);
g_source_set_callback (service->source,
(GSourceFunc) gimp_dbus_service_process_idle,
service,
NULL);
g_source_attach (service->source, NULL);
g_source_unref (service->source);
return G_SOURCE_REMOVE;
}
else
{
return G_SOURCE_CONTINUE;
}
}
service->source = NULL;
return FALSE;
return G_SOURCE_REMOVE;
}
static IdleData *

View File

@ -49,9 +49,10 @@ struct _GimpDBusService
{
GimpDBusServiceUISkeleton parent_instance;
Gimp *gimp;
GQueue *queue;
GSource *source;
Gimp *gimp;
GQueue *queue;
GSource *source;
gboolean timeout_source;
};
struct _GimpDBusServiceClass

View File

@ -243,7 +243,8 @@ splash_update (const gchar *text1,
const gchar *text2,
gdouble percentage)
{
GdkRectangle expose = { 0, 0, 0, 0 };
static GdkRectangle prev_expose = { 0, 0, 0, 0 };
GdkRectangle expose = { 0, 0, 0, 0 };
g_return_if_fail (percentage >= 0.0 && percentage <= 1.0);
@ -251,12 +252,15 @@ splash_update (const gchar *text1,
return;
splash_position_layouts (splash, text1, text2, &expose);
gdk_rectangle_union (&expose, &prev_expose, &expose);
if (expose.width > 0 && expose.height > 0)
gtk_widget_queue_draw_area (splash->area,
expose.x, expose.y,
expose.width, expose.height);
prev_expose = expose;
if ((text1 == NULL || ! g_strcmp0 (text1, splash->text1)) &&
(text2 == NULL || ! g_strcmp0 (text2, splash->text2)) &&
percentage == splash->percentage)
@ -324,9 +328,7 @@ splash_position_layouts (GimpSplash *splash,
GdkRectangle *area)
{
PangoRectangle upper_ink;
PangoRectangle upper_logical;
PangoRectangle lower_ink;
PangoRectangle lower_logical;
gint text_height = 0;
if (text1)
@ -339,10 +341,10 @@ splash_position_layouts (GimpSplash *splash,
pango_layout_set_text (splash->upper, text1, -1);
pango_layout_get_pixel_extents (splash->upper,
&upper_ink, &upper_logical);
&upper_ink, NULL);
splash->upper_x = (splash->width - upper_logical.width) / 2;
text_height += upper_logical.height;
splash->upper_x = (splash->width - upper_ink.width) / 2;
text_height += upper_ink.height;
}
if (text2)
@ -355,10 +357,10 @@ splash_position_layouts (GimpSplash *splash,
pango_layout_set_text (splash->lower, text2, -1);
pango_layout_get_pixel_extents (splash->lower,
&lower_ink, &lower_logical);
&lower_ink, NULL);
splash->lower_x = (splash->width - lower_logical.width) / 2;
text_height += lower_logical.height;
splash->lower_x = (splash->width - lower_ink.width) / 2;
text_height += lower_ink.height;
}
/* For pretty printing, let's say we want at least double space. */
@ -378,7 +380,7 @@ splash_position_layouts (GimpSplash *splash,
{
splash->upper_y = MIN (splash->height - text_height,
splash->height * 13 / 16 -
upper_logical.height / 2);
upper_ink.height / 2);
if (area)
splash_rectangle_union (area, &upper_ink,
@ -388,7 +390,7 @@ splash_position_layouts (GimpSplash *splash,
if (text2)
{
splash->lower_y = ((splash->height + splash->upper_y) / 2 -
lower_logical.height / 2);
lower_ink.height / 2);
if (area)
splash_rectangle_union (area, &lower_ink,