mirror of https://github.com/GNOME/gimp.git
libgimpbase, libgimp, app: inherit swap-compression in plug-ins
Pass the swap-compression option set in the preferences down to plug-ins, so that they use the same swap-compression algorithm as the main app.
This commit is contained in:
parent
1664ecbf1d
commit
5cc289b642
|
@ -227,6 +227,7 @@ gimp_plug_in_manager_call_run (GimpPlugInManager *manager,
|
|||
NULL;
|
||||
config.tile_cache_size = gegl_config->tile_cache_size;
|
||||
config.swap_path = gegl_config->swap_path;
|
||||
config.swap_compression = gegl_config->swap_compression;
|
||||
config.num_processors = gegl_config->num_processors;
|
||||
|
||||
proc_run.name = (gchar *) gimp_object_get_name (procedure);
|
||||
|
|
|
@ -1131,6 +1131,7 @@ _gimp_config (GPConfig *config)
|
|||
g_object_set (gegl_config (),
|
||||
"tile-cache-size", config->tile_cache_size,
|
||||
"swap", path,
|
||||
"swap-compression", config->swap_compression,
|
||||
"threads", (gint) config->num_processors,
|
||||
"use-opencl", config->use_opencl,
|
||||
"application-license", "GPL3",
|
||||
|
|
|
@ -550,6 +550,9 @@ _gp_config_read (GIOChannel *channel,
|
|||
if (! _gimp_wire_read_string (channel,
|
||||
&config->swap_path, 1, user_data))
|
||||
goto cleanup;
|
||||
if (! _gimp_wire_read_string (channel,
|
||||
&config->swap_compression, 1, user_data))
|
||||
goto cleanup;
|
||||
if (! _gimp_wire_read_int32 (channel,
|
||||
(guint32 *) &config->num_processors, 1,
|
||||
user_data))
|
||||
|
@ -564,6 +567,7 @@ _gp_config_read (GIOChannel *channel,
|
|||
g_free (config->display_name);
|
||||
g_free (config->icon_theme_dir);
|
||||
g_free (config->swap_path);
|
||||
g_free (config->swap_compression);
|
||||
g_slice_free (GPConfig, config);
|
||||
}
|
||||
|
||||
|
@ -650,6 +654,9 @@ _gp_config_write (GIOChannel *channel,
|
|||
if (! _gimp_wire_write_string (channel,
|
||||
&config->swap_path, 1, user_data))
|
||||
return;
|
||||
if (! _gimp_wire_write_string (channel,
|
||||
&config->swap_compression, 1, user_data))
|
||||
return;
|
||||
if (! _gimp_wire_write_int32 (channel,
|
||||
(const guint32 *) &config->num_processors, 1,
|
||||
user_data))
|
||||
|
@ -668,6 +675,7 @@ _gp_config_destroy (GimpWireMessage *msg)
|
|||
g_free (config->display_name);
|
||||
g_free (config->icon_theme_dir);
|
||||
g_free (config->swap_path);
|
||||
g_free (config->swap_compression);
|
||||
g_slice_free (GPConfig, config);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ G_BEGIN_DECLS
|
|||
|
||||
/* Increment every time the protocol changes
|
||||
*/
|
||||
#define GIMP_PROTOCOL_VERSION 0x010C
|
||||
#define GIMP_PROTOCOL_VERSION 0x010D
|
||||
|
||||
|
||||
enum
|
||||
|
@ -122,6 +122,7 @@ struct _GPConfig
|
|||
gchar *icon_theme_dir;
|
||||
guint64 tile_cache_size;
|
||||
gchar *swap_path;
|
||||
gchar *swap_compression;
|
||||
gint32 num_processors;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue