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

gimprc.in replaced "color-cube" by "min-colors".

2000-04-30  Michael Natterer  <mitch@gimp.org>

	* gimprc.in
	* app/gimprc.[ch]: replaced "color-cube" by "min-colors".

	* app/app_procs.c: read unitrc/gimprc before displaying the splash.

	* app/colormaps.c: set min_colors and install_cmap before
	initializing GdkRGB.

	* app/gimprc.[ch]
	* app/gimpunit.c: don't call the splash's progress_update function.

	* app/plug_in.c: pass min_colors instead of color_cube to plugins.

	* app/preferences_dialog.c: widget for min_colors.

	* libgimp/gimp.[ch]: s/color_cube/min_colors/ but left
	gimp_color_cube() there for source level compatibility.

	* libgimp/gimpprotocol.[ch]: changed the GPConfig message
	accordinly and increased the gimp protocol version number because
	the change breaks binary compatibility. Also actually pass the
	use_xshm variable over the wire (was only in the GPConfig struct
	before).

	Was it the right thing to do to increase the version number??

	* libgimp/gimpui.c (gimp_ui_init): use the same code as the app
	for initializing GdkRGB. Never explicitly activate Gdk's SHM
	usage (only switch it off).

	* app/main.c
	* libgimp/gimp.c: reverted the handling of all signals except
	SIGCHLD back to plain old signal() because those signals are
	fatal anyway and sigaction() as used by gimp_signal_*() made
	debugging (stacktrace) impossible.

	* plug-ins/AlienMap/AlienMap.c
	* plug-ins/AlienMap2/AlienMap2.c
	* plug-ins/FractalExplorer/Dialogs.c
	* plug-ins/bmp/bmp.c
	* plug-ins/borderaverage/borderaverage.c
	* plug-ins/dbbrowser/dbbrowser.c
	* plug-ins/faxg3/faxg3.c
	* plug-ins/fits/fits.c
	* plug-ins/flame/flame.c
	* plug-ins/fp/fp.c
	* plug-ins/fp/fp_gtk.c
	* plug-ins/gdyntext/Makefile.am
	* plug-ins/gdyntext/gdyntext_ui.c
	* plug-ins/gfig/gfig.c
	* plug-ins/gflare/gflare.c
	* plug-ins/gfli/gfli.c
	* plug-ins/gimpressionist/gimpressionist.c
	* plug-ins/helpbrowser/helpbrowser.c
	* plug-ins/ifscompose/ifscompose.c
	* plug-ins/imagemap/Makefile.am
	* plug-ins/imagemap/imap_main.c
	* plug-ins/maze/maze_face.c
	* plug-ins/mosaic/mosaic.c
	* plug-ins/pagecurl/pagecurl.c
	* plug-ins/print/print.c
	* plug-ins/rcm/rcm_dialog.c
	* plug-ins/script-fu/script-fu-console.c
	* plug-ins/script-fu/script-fu-scripts.c
	* plug-ins/script-fu/script-fu-server.c
	* plug-ins/sel2path/Makefile.am
	* plug-ins/sel2path/sel2path.c
	* plug-ins/sgi/sgi.c
	* plug-ins/sinus/sinus.c
	* plug-ins/struc/struc.c
	* plug-ins/webbrowser/webbrowser.c
	* plug-ins/winsnap/winsnap.c
	* plug-ins/xjt/xjt.c: use gimp_ui_init().

	* plug-ins/Lighting/lighting_ui.c
	* plug-ins/MapObject/mapobject_ui.c: only switch Gdk SHM usage off,
	never on. Don't use gimp_ui_init() here because of libgck.
parent ab4e4200
2000-04-30 Michael Natterer <mitch@gimp.org>
* gimprc.in
* app/gimprc.[ch]: replaced "color-cube" by "min-colors".
* app/app_procs.c: read unitrc/gimprc before displaying the splash.
* app/colormaps.c: set min_colors and install_cmap before
initializing GdkRGB.
* app/gimprc.[ch]
* app/gimpunit.c: don't call the splash's progress_update function.
* app/plug_in.c: pass min_colors instead of color_cube to plugins.
* app/preferences_dialog.c: widget for min_colors.
* libgimp/gimp.[ch]: s/color_cube/min_colors/ but left
gimp_color_cube() there for source level compatibility.
* libgimp/gimpprotocol.[ch]: changed the GPConfig message
accordinly and increased the gimp protocol version number because
the change breaks binary compatibility. Also actually pass the
use_xshm variable over the wire (was only in the GPConfig struct
before).
Was it the right thing to do to increase the version number??
* libgimp/gimpui.c (gimp_ui_init): use the same code as the app
for initializing GdkRGB. Never explicitly activate Gdk's SHM
usage (only switch it off).
* app/main.c
* libgimp/gimp.c: reverted the handling of all signals except
SIGCHLD back to plain old signal() because those signals are
fatal anyway and sigaction() as used by gimp_signal_*() made
debugging (stacktrace) impossible.
* plug-ins/AlienMap/AlienMap.c
* plug-ins/AlienMap2/AlienMap2.c
* plug-ins/FractalExplorer/Dialogs.c
* plug-ins/bmp/bmp.c
* plug-ins/borderaverage/borderaverage.c
* plug-ins/dbbrowser/dbbrowser.c
* plug-ins/faxg3/faxg3.c
* plug-ins/fits/fits.c
* plug-ins/flame/flame.c
* plug-ins/fp/fp.c
* plug-ins/fp/fp_gtk.c
* plug-ins/gdyntext/Makefile.am
* plug-ins/gdyntext/gdyntext_ui.c
* plug-ins/gfig/gfig.c
* plug-ins/gflare/gflare.c
* plug-ins/gfli/gfli.c
* plug-ins/gimpressionist/gimpressionist.c
* plug-ins/helpbrowser/helpbrowser.c
* plug-ins/ifscompose/ifscompose.c
* plug-ins/imagemap/Makefile.am
* plug-ins/imagemap/imap_main.c
* plug-ins/maze/maze_face.c
* plug-ins/mosaic/mosaic.c
* plug-ins/pagecurl/pagecurl.c
* plug-ins/print/print.c
* plug-ins/rcm/rcm_dialog.c
* plug-ins/script-fu/script-fu-console.c
* plug-ins/script-fu/script-fu-scripts.c
* plug-ins/script-fu/script-fu-server.c
* plug-ins/sel2path/Makefile.am
* plug-ins/sel2path/sel2path.c
* plug-ins/sgi/sgi.c
* plug-ins/sinus/sinus.c
* plug-ins/struc/struc.c
* plug-ins/webbrowser/webbrowser.c
* plug-ins/winsnap/winsnap.c
* plug-ins/xjt/xjt.c: use gimp_ui_init().
* plug-ins/Lighting/lighting_ui.c
* plug-ins/MapObject/mapobject_ui.c: only switch Gdk SHM usage off,
never on. Don't use gimp_ui_init() here because of libgck.
2000-04-30 Garry R. Osgood <gosgood@idt.net>
* app/main.c
* libgimp/gimpsignal.c [Documentation only]
 
......
......@@ -1253,22 +1253,23 @@ plug_in_run (ProcRecord *proc_rec,
plug_in_push (plug_in);
config.version = GP_VERSION;
config.tile_width = TILE_WIDTH;
config.tile_height = TILE_HEIGHT;
config.shm_ID = shm_ID;
config.gamma = gamma_val;
config.version = GP_VERSION;
config.tile_width = TILE_WIDTH;
config.tile_height = TILE_HEIGHT;
config.shm_ID = shm_ID;
config.gamma = gamma_val;
config.install_cmap = install_cmap;
config.use_xshm = gdk_get_use_xshm ();
config.color_cube[0] = color_cube_shades[0];
config.color_cube[1] = color_cube_shades[1];
config.color_cube[2] = color_cube_shades[2];
config.color_cube[3] = color_cube_shades[3];
config.gdisp_ID = gdisp_ID;
proc_run.name = proc_rec->name;
config.use_xshm = gdk_get_use_xshm ();
config.gdisp_ID = gdisp_ID;
if (gtk_check_version (1, 2, 8))
config.min_colors = CLAMP (min_colors, 27, 216);
else
config.min_colors = CLAMP (min_colors, 27, 256);
proc_run.name = proc_rec->name;
proc_run.nparams = argc;
proc_run.params = plug_in_args_to_params (args, argc, FALSE);
proc_run.params = plug_in_args_to_params (args, argc, FALSE);
if (!gp_config_write (current_writechannel, &config) ||
!gp_proc_run_write (current_writechannel, &proc_run) ||
......
......@@ -493,6 +493,12 @@ app_init (void)
gtk_rc_parse (filename);
if (parse_buffers_init ())
{
parse_unitrc (); /* this needs to be done before gimprc loading */
parse_gimprc (); /* parse the local GIMP configuration file */
}
if (!no_interface)
get_standard_colormaps ();
......@@ -518,12 +524,6 @@ app_init (void)
color_display_init ();
RESET_BAR();
if (parse_buffers_init ())
{
parse_unitrc (); /* this needs to be done before gimprc loading */
parse_gimprc (); /* parse the local GIMP configuration file */
}
if (always_restore_session)
restore_session = TRUE;
......
......@@ -58,6 +58,14 @@ get_color (int red,
void
get_standard_colormaps (void)
{
if (gtk_check_version (1, 2, 8))
min_colors = CLAMP (min_colors, 27, 216);
else
min_colors = CLAMP (min_colors, 27, 256);
gdk_rgb_set_min_colors (min_colors);
gdk_rgb_set_install (install_cmap);
g_visual = gdk_rgb_get_visual ();
g_cmap = gdk_rgb_get_cmap ();
......
......@@ -279,7 +279,6 @@ parse_unitrc (void)
gchar *filename;
filename = gimp_personal_rc_file ("unitrc");
app_init_update_status (NULL, filename, -1);
parse_gimprc_file (filename);
g_free (filename);
}
......
......@@ -100,6 +100,7 @@ static gchar * old_default_comment;
static gint old_default_dot_for_dot;
static gint old_stingy_memory_use;
static gint old_tile_cache_size;
static gint old_min_colors;
static gint old_install_cmap;
static gint old_cycled_marching_ants;
static gint old_last_opened_size;
......@@ -130,6 +131,7 @@ static gint old_default_threshold;
/* variables which can't be changed on the fly */
static gint edit_stingy_memory_use;
static gint edit_min_colors;
static gint edit_install_cmap;
static gint edit_cycled_marching_ants;
static gint edit_last_opened_size;
......@@ -161,6 +163,7 @@ static GtkWidget * prefs_dlg = NULL;
so they're set on the fly is not hard).
stingy-memory-use
min-colors
install-cmap
cycled-marching-ants
last-opened-size
......@@ -306,6 +309,7 @@ file_prefs_check_settings (void)
/* ...then check if we need a restart notification */
if (edit_stingy_memory_use != old_stingy_memory_use ||
edit_min_colors != old_min_colors ||
edit_install_cmap != old_install_cmap ||
edit_cycled_marching_ants != old_cycled_marching_ants ||
edit_last_opened_size != old_last_opened_size ||
......@@ -437,6 +441,7 @@ file_prefs_save_callback (GtkWidget *widget,
PrefsState state;
gint save_stingy_memory_use;
gint save_min_colors;
gint save_install_cmap;
gint save_cycled_marching_ants;
gint save_last_opened_size;
......@@ -486,6 +491,7 @@ file_prefs_save_callback (GtkWidget *widget,
/* Save variables so that we can restore them later */
save_stingy_memory_use = stingy_memory_use;
save_min_colors = min_colors;
save_install_cmap = install_cmap;
save_cycled_marching_ants = cycled_marching_ants;
save_last_opened_size = last_opened_size;
......@@ -678,6 +684,11 @@ file_prefs_save_callback (GtkWidget *widget,
stingy_memory_use = edit_stingy_memory_use;
update = g_list_append (update, "stingy-memory-use");
}
if (edit_min_colors != old_min_colors)
{
min_colors = edit_min_colors;
update = g_list_append (update, "min-colors");
}
if (edit_install_cmap != old_install_cmap)
{
install_cmap = edit_install_cmap;
......@@ -779,6 +790,7 @@ file_prefs_save_callback (GtkWidget *widget,
/* restore variables which must not change */
stingy_memory_use = save_stingy_memory_use;
min_colors = save_min_colors;
install_cmap = save_install_cmap;
cycled_marching_ants = save_cycled_marching_ants;
last_opened_size = save_last_opened_size;
......@@ -873,6 +885,7 @@ file_prefs_cancel_callback (GtkWidget *widget,
/* restore values which need a restart */
edit_stingy_memory_use = old_stingy_memory_use;
edit_min_colors = old_min_colors;
edit_install_cmap = old_install_cmap;
edit_cycled_marching_ants = old_cycled_marching_ants;
edit_last_opened_size = old_last_opened_size;
......@@ -1337,6 +1350,7 @@ file_pref_cmd_callback (GtkWidget *widget,
* copy config vals to edit variables.
*/
edit_stingy_memory_use = stingy_memory_use;
edit_min_colors = min_colors;
edit_install_cmap = install_cmap;
edit_cycled_marching_ants = cycled_marching_ants;
edit_last_opened_size = last_opened_size;
......@@ -1404,6 +1418,7 @@ file_pref_cmd_callback (GtkWidget *widget,
/* values which will need a restart */
old_stingy_memory_use = edit_stingy_memory_use;
old_min_colors = edit_min_colors;
old_install_cmap = edit_install_cmap;
old_cycled_marching_ants = edit_cycled_marching_ants;
old_last_opened_size = edit_last_opened_size;
......@@ -1715,6 +1730,25 @@ file_pref_cmd_callback (GtkWidget *widget,
if (g_visual->depth != 8)
gtk_widget_set_sensitive (GTK_WIDGET (vbox2->parent), FALSE);
table = gtk_table_new (1, 2, FALSE);
gtk_container_set_border_width (GTK_CONTAINER (table), 2);
gtk_table_set_row_spacings (GTK_TABLE (table), 2);
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
gtk_box_pack_start (GTK_BOX (vbox2), table, FALSE, FALSE, 0);
gtk_widget_show (table);
spinbutton =
gimp_spin_button_new (&adjustment, edit_min_colors,
27.0,
gtk_check_version (1, 2, 8) ? 216.0 : 256.0,
1.0, 8.0, 0.0, 1.0, 0.0);
gtk_signal_connect (GTK_OBJECT (adjustment), "value_changed",
GTK_SIGNAL_FUNC (gimp_int_adjustment_update),
&edit_min_colors);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("Minimum Number of Colors:"), 1.0, 0.5,
spinbutton, 1, TRUE);
button = gtk_check_button_new_with_label(_("Install Colormap"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
edit_install_cmap);
......
......@@ -70,7 +70,6 @@ typedef enum
TT_MEMSIZE,
TT_IMAGETYPE,
TT_INTERP,
TT_XCOLORCUBE,
TT_XPREVSIZE,
TT_XUNIT,
TT_XPLUGIN,
......@@ -127,7 +126,7 @@ gboolean perfectmouse = FALSE; /* off (fast and sloppy) */
gint transparency_size = 1; /* Medium sized */
gint levels_of_undo = 2; /* 2 levels of undo default */
gint last_opened_size = 4; /* 4 documents in the MRU list */
gint color_cube_shades[4] = { 6, 7, 4, 24 };
gint min_colors = 144; /* 6*6*4 */
gboolean install_cmap = FALSE;
gint cycled_marching_ants = 0;
gint default_threshold = 15;
......@@ -188,7 +187,6 @@ static gint parse_position (gpointer val1p, gpointer val2p);
static gint parse_mem_size (gpointer val1p, gpointer val2p);
static gint parse_image_type (gpointer val1p, gpointer val2p);
static gint parse_interpolation_type (gpointer val1p, gpointer val2p);
static gint parse_color_cube (gpointer val1p, gpointer val2p);
static gint parse_preview_size (gpointer val1p, gpointer val2p);
static gint parse_nav_preview_size (gpointer val1p, gpointer val2p);
static gint parse_units (gpointer val1p, gpointer val2p);
......@@ -219,7 +217,6 @@ static inline gchar * position_to_str (gpointer val1p, gpointer val2p)
static inline gchar * mem_size_to_str (gpointer val1p, gpointer val2p);
static inline gchar * image_type_to_str (gpointer val1p, gpointer val2p);
static inline gchar * interpolation_type_to_str (gpointer val1p, gpointer val2p);
static inline gchar * color_cube_to_str (gpointer val1p, gpointer val2p);
static inline gchar * preview_size_to_str (gpointer val1p, gpointer val2p);
static inline gchar * nav_preview_size_to_str (gpointer val1p, gpointer val2p);
static inline gchar * units_to_str (gpointer val1p, gpointer val2p);
......@@ -263,7 +260,6 @@ static ParseFunc funcs[] =
{ "default-palette", TT_STRING, &default_palette, NULL },
{ "default-gradient", TT_STRING, &default_gradient, NULL },
{ "gamma-correction", TT_DOUBLE, &gamma_val, NULL },
{ "color-cube", TT_XCOLORCUBE, NULL, NULL },
{ "tile-cache-size", TT_MEMSIZE, &tile_cache_size, NULL },
{ "marching-ants-speed", TT_INT, &marching_speed, NULL },
{ "last-opened-size", TT_INT, &last_opened_size, NULL },
......@@ -271,6 +267,7 @@ static ParseFunc funcs[] =
{ "transparency-type", TT_INT, &transparency_type, NULL },
{ "perfect-mouse", TT_BOOLEAN, &perfectmouse, NULL },
{ "transparency-size", TT_INT, &transparency_size, NULL },
{ "min-colors", TT_INT, &min_colors, NULL },
{ "install-colormap", TT_BOOLEAN, &install_cmap, NULL },
{ "colormap-cycling", TT_BOOLEAN, &cycled_marching_ants, NULL },
{ "default-threshold", TT_INT, &default_threshold, NULL },
......@@ -413,7 +410,6 @@ parse_gimprc (void)
else
libfilename = g_strdup (gimp_system_rc_file ());
app_init_update_status(_("Resource configuration"), libfilename, -1);
parse_gimprc_file (libfilename);
if (alternate_gimprc != NULL)
......@@ -422,10 +418,7 @@ parse_gimprc (void)
filename = gimp_personal_rc_file ("gimprc");
if (g_strcasecmp (filename, libfilename) != 0)
{
app_init_update_status(NULL, filename, -1);
parse_gimprc_file (filename);
}
parse_gimprc_file (filename);
g_free (filename);
g_free (libfilename);
......@@ -852,8 +845,6 @@ parse_statement (void)
return parse_image_type (funcs[i].val1p, funcs[i].val2p);
case TT_INTERP:
return parse_interpolation_type (funcs[i].val1p, funcs[i].val2p);
case TT_XCOLORCUBE:
return parse_color_cube (funcs[i].val1p, funcs[i].val2p);
case TT_XPREVSIZE:
return parse_preview_size (funcs[i].val1p, funcs[i].val2p);
case TT_XNAVPREVSIZE:
......@@ -1227,48 +1218,6 @@ parse_interpolation_type (gpointer val1p,
return OK;
}
static int
parse_color_cube (gpointer val1p,
gpointer val2p)
{
int token;
token = peek_next_token ();
if (!token || (token != TOKEN_NUMBER))
return ERROR;
token = get_next_token ();
color_cube_shades[0] = token_num;
token = peek_next_token ();
if (!token || (token != TOKEN_NUMBER))
return ERROR;
token = get_next_token ();
color_cube_shades[1] = token_num;
token = peek_next_token ();
if (!token || (token != TOKEN_NUMBER))
return ERROR;
token = get_next_token ();
color_cube_shades[2] = token_num;
token = peek_next_token ();
if (!token || (token != TOKEN_NUMBER))
return ERROR;
token = get_next_token ();
color_cube_shades[3] = token_num;
token = peek_next_token ();
if (!token || (token != TOKEN_RIGHT_PAREN))
return ERROR;
token = get_next_token ();
return OK;
}
static int
parse_preview_size (gpointer val1p,
gpointer val2p)
......@@ -2571,8 +2520,6 @@ value_to_str (char *name)
return image_type_to_str (funcs[i].val1p, funcs[i].val2p);
case TT_INTERP:
return interpolation_type_to_str (funcs[i].val1p, funcs[i].val2p);
case TT_XCOLORCUBE:
return color_cube_to_str (funcs[i].val1p, funcs[i].val2p);
case TT_XPREVSIZE:
return preview_size_to_str (funcs[i].val1p, funcs[i].val2p);
case TT_XNAVPREVSIZE:
......@@ -2707,15 +2654,6 @@ interpolation_type_to_str (gpointer val1p,
}
}
static inline char *
color_cube_to_str (gpointer val1p,
gpointer val2p)
{
return g_strdup_printf ("%d %d %d %d",
color_cube_shades[0], color_cube_shades[1],
color_cube_shades[2], color_cube_shades[3]);
}
static inline char *
preview_size_to_str (gpointer val1p,
gpointer val2p)
......
......@@ -19,9 +19,12 @@
#define __GIMPRC_H__
#include <glib.h>
#include "libgimp/gimpunit.h"
#include "apptypes.h"
#include "libgimp/gimpunit.h"
/* global gimprc variables */
extern gchar *plug_in_path;
extern gchar *temp_path;
......@@ -45,7 +48,7 @@ extern gint transparency_type;
extern gboolean perfectmouse;
extern gint transparency_size;
extern gint levels_of_undo;
extern gint color_cube_shades[];
extern gint min_colors;
extern gboolean install_cmap;
extern gboolean cycled_marching_ants;
extern gint default_threshold;
......
......@@ -279,7 +279,6 @@ parse_unitrc (void)
gchar *filename;
filename = gimp_personal_rc_file ("unitrc");
app_init_update_status (NULL, filename, -1);
parse_gimprc_file (filename);
g_free (filename);
}
......
......@@ -1253,22 +1253,23 @@ plug_in_run (ProcRecord *proc_rec,
plug_in_push (plug_in);
config.version = GP_VERSION;
config.tile_width = TILE_WIDTH;
config.tile_height = TILE_HEIGHT;
config.shm_ID = shm_ID;
config.gamma = gamma_val;
config.version = GP_VERSION;
config.tile_width = TILE_WIDTH;
config.tile_height = TILE_HEIGHT;
config.shm_ID = shm_ID;
config.gamma = gamma_val;
config.install_cmap = install_cmap;
config.use_xshm = gdk_get_use_xshm ();
config.color_cube[0] = color_cube_shades[0];
config.color_cube[1] = color_cube_shades[1];
config.color_cube[2] = color_cube_shades[2];
config.color_cube[3] = color_cube_shades[3];
config.gdisp_ID = gdisp_ID;
proc_run.name = proc_rec->name;
config.use_xshm = gdk_get_use_xshm ();
config.gdisp_ID = gdisp_ID;
if (gtk_check_version (1, 2, 8))
config.min_colors = CLAMP (min_colors, 27, 216);
else
config.min_colors = CLAMP (min_colors, 27, 256);
proc_run.name = proc_rec->name;
proc_run.nparams = argc;
proc_run.params = plug_in_args_to_params (args, argc, FALSE);
proc_run.params = plug_in_args_to_params (args, argc, FALSE);
if (!gp_config_write (current_writechannel, &config) ||
!gp_proc_run_write (current_writechannel, &proc_run) ||
......
......@@ -1253,22 +1253,23 @@ plug_in_run (ProcRecord *proc_rec,
plug_in_push (plug_in);
config.version = GP_VERSION;
config.tile_width = TILE_WIDTH;
config.tile_height = TILE_HEIGHT;
config.shm_ID = shm_ID;
config.gamma = gamma_val;
config.version = GP_VERSION;
config.tile_width = TILE_WIDTH;
config.tile_height = TILE_HEIGHT;
config.shm_ID = shm_ID;
config.gamma = gamma_val;
config.install_cmap = install_cmap;
config.use_xshm = gdk_get_use_xshm ();
config.color_cube[0] = color_cube_shades[0];
config.color_cube[1] = color_cube_shades[1];
config.color_cube[2] = color_cube_shades[2];
config.color_cube[3] = color_cube_shades[3];
config.gdisp_ID = gdisp_ID;
proc_run.name = proc_rec->name;
config.use_xshm = gdk_get_use_xshm ();
config.gdisp_ID = gdisp_ID;
if (gtk_check_version (1, 2, 8))
config.min_colors = CLAMP (min_colors, 27, 216);
else
config.min_colors = CLAMP (min_colors, 27, 256);
proc_run.name = proc_rec->name;
proc_run.nparams = argc;
proc_run.params = plug_in_args_to_params (args, argc, FALSE);
proc_run.params = plug_in_args_to_params (args, argc, FALSE);
if (!gp_config_write (current_writechannel, &config) ||
!gp_proc_run_write (current_writechannel, &proc_run) ||
......
......@@ -100,6 +100,7 @@ static gchar * old_default_comment;
static gint old_default_dot_for_dot;
static gint old_stingy_memory_use;
static gint old_tile_cache_size;
static gint old_min_colors;
static gint old_install_cmap;
static gint old_cycled_marching_ants;
static gint old_last_opened_size;
......@@ -130,6 +131,7 @@ static gint old_default_threshold;
/* variables which can't be changed on the fly */
static gint edit_stingy_memory_use;
static gint edit_min_colors;
static gint edit_install_cmap;
static gint edit_cycled_marching_ants;
static gint edit_last_opened_size;
......@@ -161,6 +163,7 @@ static GtkWidget * prefs_dlg = NULL;
so they're set on the fly is not hard).
stingy-memory-use
min-colors
install-cmap
cycled-marching-ants
last-opened-size
......@@ -306,6 +309,7 @@ file_prefs_check_settings (void)
/* ...then check if we need a restart notification */
if (edit_stingy_memory_use != old_stingy_memory_use ||
edit_min_colors != old_min_colors ||
edit_install_cmap != old_install_cmap ||
edit_cycled_marching_ants != old_cycled_marching_ants ||
edit_last_opened_size != old_last_opened_size ||
......@@ -437,6 +441,7 @@ file_prefs_save_callback (GtkWidget *widget,
PrefsState state;
gint save_stingy_memory_use;
gint save_min_colors;
gint save_install_cmap;
gint save_cycled_marching_ants;
gint save_last_opened_size;
......@@ -486,6 +491,7 @@ file_prefs_save_callback (GtkWidget *widget,
/* Save variables so that we can restore them later */
save_stingy_memory_use = stingy_memory_use;
save_min_colors = min_colors;
save_install_cmap = install_cmap;
save_cycled_marching_ants = cycled_marching_ants;
save_last_opened_size = last_opened_size;
......@@ -678,6 +684,11 @@ file_prefs_save_callback (GtkWidget *widget,
stingy_memory_use = edit_stingy_memory_use;
update = g_list_append (update, "stingy-memory-use");
}
if (edit_min_colors != old_min_colors)
{
min_colors = edit_min_colors;
update = g_list_append (update, "min-colors");
}
if (edit_install_cmap != old_install_cmap)
{
install_cmap = edit_install_cmap;
......@@ -779,6 +790,7 @@ file_prefs_save_callback (GtkWidget *widget,
/* restore variables which must not change */
stingy_memory_use = save_stingy_memory_use;
min_colors = save_min_colors;
install_cmap = save_install_cmap;
cycled_marching_ants = save_cycled_marching_ants;
last_opened_size = save_last_opened_size;
......@@ -873,6 +885,7 @@ file_prefs_cancel_callback (GtkWidget *widget,
/* restore values which need a restart */
edit_stingy_memory_use = old_stingy_memory_use;
edit_min_colors = old_min_colors;
edit_install_cmap = old_install_cmap;
edit_cycled_marching_ants = old_cycled_marching_ants;
edit_last_opened_size = old_last_opened_size;
......@@ -1337,6 +1350,7 @@ file_pref_cmd_callback (GtkWidget *widget,
* copy config vals to edit variables.
*/
edit_stingy_memory_use = stingy_memory_use;
edit_min_colors = min_colors;
edit_install_cmap = install_cmap;
edit_cycled_marching_ants = cycled_marching_ants;
edit_last_opened_size = last_opened_size;
......@@ -1404,6 +1418,7 @@ file_pref_cmd_callback (GtkWidget *widget,