Commit 4f6f5316 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

Restore binary compatibility of the wire protocol that was broken by the

2004-09-13  Michael Natterer  <mitch@gimp.org>

	Restore binary compatibility of the wire protocol that was
	broken by the recent GPConfig changes:

	* libgimpbase/gimpprotocol.[ch] (struct _GPConfig)
	(_gp_config_read)
	(_gp_config_write): argh, we can't use the two bytes padding
	because that's just a binary compatible struct change, but inserts
	two bytes into the byte stream that goes over the wire. Use the
	first two bytes of the former "gdouble gamma" instead.

	* app/plug-in/plug-in-run.c (plug_in_run)
	* libgimp/gimp.c (gimp_config): changed accordingly.
parent 952cd37e
2004-09-13 Michael Natterer <mitch@gimp.org>
Restore binary compatibility of the wire protocol that was
broken by the recent GPConfig changes:
* libgimpbase/gimpprotocol.[ch] (struct _GPConfig)
(_gp_config_read)
(_gp_config_write): argh, we can't use the two bytes padding
because that's just a binary compatible struct change, but inserts
two bytes into the byte stream that goes over the wire. Use the
first two bytes of the former "gdouble gamma" instead.
* app/plug-in/plug-in-run.c (plug_in_run)
* libgimp/gimp.c (gimp_config): changed accordingly.
2004-09-13 Sven Neumann <sven@gimp.org>
* app/widgets/gimphelp.c: simulate the behaviour of GNU gettext and
......
......@@ -107,8 +107,8 @@ plug_in_run (Gimp *gimp,
config.tile_width = TILE_WIDTH;
config.tile_height = TILE_HEIGHT;
config.shm_ID = plug_in_shm_get_ID (gimp);
config.gimp_reserved_1 = 0;
config.gimp_reserved_2 = 0;
config.check_size = GIMP_DISPLAY_CONFIG (gimp->config)->transparency_size;
config.check_type = GIMP_DISPLAY_CONFIG (gimp->config)->transparency_type;
config.gimp_reserved_3 = 0;
config.gimp_reserved_4 = 0;
config.gimp_reserved_5 = 0;
......@@ -117,8 +117,6 @@ plug_in_run (Gimp *gimp,
config.gimp_reserved_8 = 0;
config.install_cmap = gimp->config->install_cmap;
config.show_tool_tips = GIMP_GUI_CONFIG (gimp->config)->show_tool_tips;
config.check_size = GIMP_DISPLAY_CONFIG (gimp->config)->transparency_size;
config.check_type = GIMP_DISPLAY_CONFIG (gimp->config)->transparency_type;
config.min_colors = CLAMP (gimp->config->min_colors, 27, 256);
config.gdisp_ID = gdisp_ID;
config.app_name = (gchar *) g_get_application_name ();
......
......@@ -107,8 +107,8 @@ plug_in_run (Gimp *gimp,
config.tile_width = TILE_WIDTH;
config.tile_height = TILE_HEIGHT;
config.shm_ID = plug_in_shm_get_ID (gimp);
config.gimp_reserved_1 = 0;
config.gimp_reserved_2 = 0;
config.check_size = GIMP_DISPLAY_CONFIG (gimp->config)->transparency_size;
config.check_type = GIMP_DISPLAY_CONFIG (gimp->config)->transparency_type;
config.gimp_reserved_3 = 0;
config.gimp_reserved_4 = 0;
config.gimp_reserved_5 = 0;
......@@ -117,8 +117,6 @@ plug_in_run (Gimp *gimp,
config.gimp_reserved_8 = 0;
config.install_cmap = gimp->config->install_cmap;
config.show_tool_tips = GIMP_GUI_CONFIG (gimp->config)->show_tool_tips;
config.check_size = GIMP_DISPLAY_CONFIG (gimp->config)->transparency_size;
config.check_type = GIMP_DISPLAY_CONFIG (gimp->config)->transparency_type;
config.min_colors = CLAMP (gimp->config->min_colors, 27, 256);
config.gdisp_ID = gdisp_ID;
config.app_name = (gchar *) g_get_application_name ();
......
......@@ -107,8 +107,8 @@ plug_in_run (Gimp *gimp,
config.tile_width = TILE_WIDTH;
config.tile_height = TILE_HEIGHT;
config.shm_ID = plug_in_shm_get_ID (gimp);
config.gimp_reserved_1 = 0;
config.gimp_reserved_2 = 0;
config.check_size = GIMP_DISPLAY_CONFIG (gimp->config)->transparency_size;
config.check_type = GIMP_DISPLAY_CONFIG (gimp->config)->transparency_type;
config.gimp_reserved_3 = 0;
config.gimp_reserved_4 = 0;
config.gimp_reserved_5 = 0;
......@@ -117,8 +117,6 @@ plug_in_run (Gimp *gimp,
config.gimp_reserved_8 = 0;
config.install_cmap = gimp->config->install_cmap;
config.show_tool_tips = GIMP_GUI_CONFIG (gimp->config)->show_tool_tips;
config.check_size = GIMP_DISPLAY_CONFIG (gimp->config)->transparency_size;
config.check_type = GIMP_DISPLAY_CONFIG (gimp->config)->transparency_type;
config.min_colors = CLAMP (gimp->config->min_colors, 27, 256);
config.gdisp_ID = gdisp_ID;
config.app_name = (gchar *) g_get_application_name ();
......
......@@ -1637,10 +1637,10 @@ gimp_config (GPConfig *config)
_tile_width = config->tile_width;
_tile_height = config->tile_height;
_shm_ID = config->shm_ID;
_install_cmap = config->install_cmap;
_show_tool_tips = config->show_tool_tips;
_check_size = config->check_size;
_check_type = config->check_type;
_install_cmap = config->install_cmap;
_show_tool_tips = config->show_tool_tips;
_min_colors = config->min_colors;
_gdisp_ID = config->gdisp_ID;
_wm_class = g_strdup (config->wm_class);
......
......@@ -466,10 +466,10 @@ _gp_config_read (GIOChannel *channel,
(guint32 *) &config->shm_ID, 1, user_data))
goto cleanup;
if (! wire_read_int8 (channel,
(guint8 *) &config->gimp_reserved_1, 1, user_data))
(guint8 *) &config->check_size, 1, user_data))
goto cleanup;
if (! wire_read_int8 (channel,
(guint8 *) &config->gimp_reserved_2, 1, user_data))
(guint8 *) &config->check_type, 1, user_data))
goto cleanup;
if (! wire_read_int8 (channel,
(guint8 *) &config->gimp_reserved_3, 1, user_data))
......@@ -495,12 +495,6 @@ _gp_config_read (GIOChannel *channel,
if (! wire_read_int8 (channel,
(guint8 *) &config->show_tool_tips, 1, user_data))
goto cleanup;
if (! wire_read_int8 (channel,
(guint8 *) &config->check_size, 1, user_data))
goto cleanup;
if (! wire_read_int8 (channel,
(guint8 *) &config->check_type, 1, user_data))
goto cleanup;
if (! wire_read_int32 (channel,
(guint32 *) &config->min_colors, 1, user_data))
goto cleanup;
......@@ -547,9 +541,9 @@ _gp_config_write (GIOChannel *channel,
return;
if (! wire_write_int32 (channel, (guint32*) &config->shm_ID, 1, user_data))
return;
if (! wire_write_int8 (channel, (guint8*) &config->gimp_reserved_1, 1, user_data))
if (! wire_write_int8 (channel, (guint8*) &config->check_size, 1, user_data))
return;
if (! wire_write_int8 (channel, (guint8*) &config->gimp_reserved_2, 1, user_data))
if (! wire_write_int8 (channel, (guint8*) &config->check_type, 1, user_data))
return;
if (! wire_write_int8 (channel, (guint8*) &config->gimp_reserved_3, 1, user_data))
return;
......@@ -567,10 +561,6 @@ _gp_config_write (GIOChannel *channel,
return;
if (! wire_write_int8 (channel, (guint8*) &config->show_tool_tips, 1, user_data))
return;
if (! wire_write_int8 (channel, (guint8*) &config->check_size, 1, user_data))
return;
if (! wire_write_int8 (channel, (guint8*) &config->check_type, 1, user_data))
return;
if (! wire_write_int32 (channel, (guint32*) &config->min_colors, 1, user_data))
return;
if (! wire_write_int32 (channel, (guint32*) &config->gdisp_ID, 1, user_data))
......
......@@ -66,8 +66,8 @@ struct _GPConfig
guint32 tile_width;
guint32 tile_height;
gint32 shm_ID;
gint8 gimp_reserved_1;
gint8 gimp_reserved_2;
gint8 check_size;
gint8 check_type;
gint8 gimp_reserved_3;
gint8 gimp_reserved_4;
gint8 gimp_reserved_5;
......@@ -76,8 +76,6 @@ struct _GPConfig
gint8 gimp_reserved_8;
gint8 install_cmap;
gint8 show_tool_tips;
gint8 check_size;
gint8 check_type;
gint32 min_colors;
gint32 gdisp_ID;
gchar *app_name;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment