mirror of https://github.com/GNOME/gimp.git
added links to Carey Bunks's "Gimp-Savvy" and "Grokking the GIMP"
2000-05-20 Sven Neumann <sven@gimp.org> * plug-ins/webbrowser/web-browser.scm: added links to Carey Bunks's "Gimp-Savvy" and "Grokking the GIMP" resources. * libgimp/gimpwidgets.[ch]: use unsigned integers for the memsize_entry. Added gimp_uint_adjustment_update(). * gimprc.[ch] * preferences_dialog.c: use unsigned integers for memsizes (tile_cache_size and max_new_image_size). Allows to set those values up to 4GB. Fixes bug #11053.
This commit is contained in:
parent
bbe52c3d4c
commit
e882c30e44
13
ChangeLog
13
ChangeLog
|
@ -1,3 +1,16 @@
|
||||||
|
2000-05-20 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
|
* plug-ins/webbrowser/web-browser.scm: added links to
|
||||||
|
Carey Bunks's "Gimp-Savvy" and "Grokking the GIMP" resources.
|
||||||
|
|
||||||
|
* libgimp/gimpwidgets.[ch]: use unsigned integers for the
|
||||||
|
memsize_entry. Added gimp_uint_adjustment_update().
|
||||||
|
|
||||||
|
* gimprc.[ch]
|
||||||
|
* preferences_dialog.c: use unsigned integers for memsizes
|
||||||
|
(tile_cache_size and max_new_image_size). Allows to set those
|
||||||
|
values up to 4GB. Fixes bug #11053.
|
||||||
|
|
||||||
2000-05-20 Nick Lamb <njl195@zepler.org.uk>
|
2000-05-20 Nick Lamb <njl195@zepler.org.uk>
|
||||||
|
|
||||||
* plug-ins/bmp/bmpwrite.c: Gimp writes valid RGB BMPs again now
|
* plug-ins/bmp/bmpwrite.c: Gimp writes valid RGB BMPs again now
|
||||||
|
|
|
@ -99,7 +99,7 @@ static gint old_default_type;
|
||||||
static gchar * old_default_comment;
|
static gchar * old_default_comment;
|
||||||
static gint old_default_dot_for_dot;
|
static gint old_default_dot_for_dot;
|
||||||
static gint old_stingy_memory_use;
|
static gint old_stingy_memory_use;
|
||||||
static gint old_tile_cache_size;
|
static guint old_tile_cache_size;
|
||||||
static gint old_min_colors;
|
static gint old_min_colors;
|
||||||
static gint old_install_cmap;
|
static gint old_install_cmap;
|
||||||
static gint old_cycled_marching_ants;
|
static gint old_cycled_marching_ants;
|
||||||
|
@ -119,7 +119,7 @@ static gint old_using_xserver_resolution;
|
||||||
static gint old_num_processors;
|
static gint old_num_processors;
|
||||||
static gchar * old_image_title_format;
|
static gchar * old_image_title_format;
|
||||||
static gint old_global_paint_options;
|
static gint old_global_paint_options;
|
||||||
static gint old_max_new_image_size;
|
static guint old_max_new_image_size;
|
||||||
static gint old_thumbnail_mode;
|
static gint old_thumbnail_mode;
|
||||||
static gint old_show_indicators;
|
static gint old_show_indicators;
|
||||||
static gint old_trust_dirty_flag;
|
static gint old_trust_dirty_flag;
|
||||||
|
@ -150,7 +150,7 @@ static gchar * edit_plug_in_path = NULL;
|
||||||
static gchar * edit_module_path = NULL;
|
static gchar * edit_module_path = NULL;
|
||||||
|
|
||||||
/* variables which will be changed _after_ closing the dialog */
|
/* variables which will be changed _after_ closing the dialog */
|
||||||
static gint edit_tile_cache_size;
|
static guint edit_tile_cache_size;
|
||||||
|
|
||||||
static GtkWidget * prefs_dlg = NULL;
|
static GtkWidget * prefs_dlg = NULL;
|
||||||
|
|
||||||
|
@ -1630,10 +1630,11 @@ file_pref_cmd_callback (GtkWidget *widget,
|
||||||
|
|
||||||
/* The maximum size of a new image */
|
/* The maximum size of a new image */
|
||||||
adjustment = gtk_adjustment_new (max_new_image_size,
|
adjustment = gtk_adjustment_new (max_new_image_size,
|
||||||
0, (4069.0 * 1024 * 1024), 1.0, 1.0, 0.0);
|
0, (4069.0 * 1024 * 1024 - 1),
|
||||||
|
1.0, 1.0, 0.0);
|
||||||
hbox = gimp_mem_size_entry_new (GTK_ADJUSTMENT (adjustment));
|
hbox = gimp_mem_size_entry_new (GTK_ADJUSTMENT (adjustment));
|
||||||
gtk_signal_connect (GTK_OBJECT (adjustment), "value_changed",
|
gtk_signal_connect (GTK_OBJECT (adjustment), "value_changed",
|
||||||
GTK_SIGNAL_FUNC (gimp_int_adjustment_update),
|
GTK_SIGNAL_FUNC (gimp_uint_adjustment_update),
|
||||||
&max_new_image_size);
|
&max_new_image_size);
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
|
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
|
||||||
_("Maximum Image Size:"), 1.0, 0.5,
|
_("Maximum Image Size:"), 1.0, 0.5,
|
||||||
|
@ -2155,10 +2156,11 @@ file_pref_cmd_callback (GtkWidget *widget,
|
||||||
|
|
||||||
/* The tile cache size */
|
/* The tile cache size */
|
||||||
adjustment = gtk_adjustment_new (edit_tile_cache_size,
|
adjustment = gtk_adjustment_new (edit_tile_cache_size,
|
||||||
0, (4069.0 * 1024 * 1024), 1.0, 1.0, 0.0);
|
0, (4069.0 * 1024 * 1024 - 1),
|
||||||
|
1.0, 1.0, 0.0);
|
||||||
hbox = gimp_mem_size_entry_new (GTK_ADJUSTMENT (adjustment));
|
hbox = gimp_mem_size_entry_new (GTK_ADJUSTMENT (adjustment));
|
||||||
gtk_signal_connect (GTK_OBJECT (adjustment), "value_changed",
|
gtk_signal_connect (GTK_OBJECT (adjustment), "value_changed",
|
||||||
GTK_SIGNAL_FUNC (gimp_int_adjustment_update),
|
GTK_SIGNAL_FUNC (gimp_uint_adjustment_update),
|
||||||
&edit_tile_cache_size);
|
&edit_tile_cache_size);
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
|
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
|
||||||
_("Tile Cache Size:"), 1.0, 0.5,
|
_("Tile Cache Size:"), 1.0, 0.5,
|
||||||
|
|
289
app/gimprc.c
289
app/gimprc.c
|
@ -118,7 +118,7 @@ gchar *gradient_path = NULL;
|
||||||
gchar *default_gradient = NULL;
|
gchar *default_gradient = NULL;
|
||||||
gchar *pluginrc_path = NULL;
|
gchar *pluginrc_path = NULL;
|
||||||
gchar *module_path = NULL;
|
gchar *module_path = NULL;
|
||||||
gint tile_cache_size = 33554432; /* 32 MB */
|
guint tile_cache_size = 33554432; /* 32 MB */
|
||||||
gint marching_speed = 300; /* 300 ms */
|
gint marching_speed = 300; /* 300 ms */
|
||||||
gdouble gamma_val = 1.0;
|
gdouble gamma_val = 1.0;
|
||||||
gint transparency_type = 1; /* Mid-Tone Checks */
|
gint transparency_type = 1; /* Mid-Tone Checks */
|
||||||
|
@ -162,7 +162,7 @@ gint num_processors = 1;
|
||||||
gchar *image_title_format = NULL;
|
gchar *image_title_format = NULL;
|
||||||
gboolean global_paint_options = FALSE;
|
gboolean global_paint_options = FALSE;
|
||||||
gboolean show_indicators = TRUE;
|
gboolean show_indicators = TRUE;
|
||||||
gint max_new_image_size = 33554432; /* 32 MB */
|
guint max_new_image_size = 33554432; /* 32 MB */
|
||||||
gint thumbnail_mode = 1;
|
gint thumbnail_mode = 1;
|
||||||
gboolean trust_dirty_flag = FALSE;
|
gboolean trust_dirty_flag = FALSE;
|
||||||
gboolean use_help = TRUE;
|
gboolean use_help = TRUE;
|
||||||
|
@ -234,13 +234,13 @@ static gchar *open_backup_file (gchar *filename,
|
||||||
FILE **fp_new,
|
FILE **fp_new,
|
||||||
FILE **fp_old);
|
FILE **fp_old);
|
||||||
|
|
||||||
static ParseInfo parse_info = { NULL };
|
static ParseInfo parse_info = { NULL };
|
||||||
|
|
||||||
static GList *unknown_tokens = NULL;
|
static GList *unknown_tokens = NULL;
|
||||||
|
|
||||||
static int cur_token;
|
static gint cur_token;
|
||||||
static int next_token;
|
static gint next_token;
|
||||||
static int done;
|
static gboolean done;
|
||||||
|
|
||||||
static ParseFunc funcs[] =
|
static ParseFunc funcs[] =
|
||||||
{
|
{
|
||||||
|
@ -348,18 +348,19 @@ static SessionInfo *session_infos[] =
|
||||||
&error_console_session_info,
|
&error_console_session_info,
|
||||||
&document_index_session_info
|
&document_index_session_info
|
||||||
};
|
};
|
||||||
static int nsession_infos = sizeof (session_infos) / sizeof (session_infos[0]);
|
static gint nsession_infos = sizeof (session_infos) / sizeof (session_infos[0]);
|
||||||
|
|
||||||
extern char* alternate_gimprc;
|
extern gchar *alternate_gimprc;
|
||||||
extern char* alternate_system_gimprc;
|
extern gchar *alternate_system_gimprc;
|
||||||
|
|
||||||
#define DEFAULT_IMAGE_TITLE_FORMAT "%f-%p.%i (%t)"
|
#define DEFAULT_IMAGE_TITLE_FORMAT "%f-%p.%i (%t)"
|
||||||
#define DEFAULT_COMMENT "Created with The GIMP"
|
#define DEFAULT_COMMENT "Created with The GIMP"
|
||||||
|
|
||||||
static char *
|
static gchar *
|
||||||
gimp_system_rc_file (void)
|
gimp_system_rc_file (void)
|
||||||
{
|
{
|
||||||
static char *value = NULL;
|
static gchar *value = NULL;
|
||||||
|
|
||||||
if (value != NULL)
|
if (value != NULL)
|
||||||
return value;
|
return value;
|
||||||
|
|
||||||
|
@ -384,9 +385,10 @@ parse_buffers_init (void)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static GList *parse_add_directory_tokens (void)
|
static GList *
|
||||||
|
parse_add_directory_tokens (void)
|
||||||
{
|
{
|
||||||
char *gimp_dir;
|
gchar *gimp_dir;
|
||||||
|
|
||||||
gimp_dir = gimp_directory ();
|
gimp_dir = gimp_directory ();
|
||||||
add_gimp_directory_token (gimp_dir);
|
add_gimp_directory_token (gimp_dir);
|
||||||
|
@ -432,7 +434,7 @@ parse_gimprc (void)
|
||||||
gboolean
|
gboolean
|
||||||
parse_absolute_gimprc_file (char *filename)
|
parse_absolute_gimprc_file (char *filename)
|
||||||
{
|
{
|
||||||
int status;
|
gint status;
|
||||||
|
|
||||||
parse_info.fp = fopen (filename, "rt");
|
parse_info.fp = fopen (filename, "rt");
|
||||||
if (!parse_info.fp)
|
if (!parse_info.fp)
|
||||||
|
@ -492,7 +494,7 @@ parse_gimprc_file (gchar *filename)
|
||||||
|
|
||||||
static GList *
|
static GList *
|
||||||
g_list_findstr (GList *list,
|
g_list_findstr (GList *list,
|
||||||
char *str)
|
gchar *str)
|
||||||
{
|
{
|
||||||
for (; list; list = g_list_next (list))
|
for (; list; list = g_list_next (list))
|
||||||
{
|
{
|
||||||
|
@ -653,20 +655,20 @@ void
|
||||||
save_gimprc (GList **updated_options,
|
save_gimprc (GList **updated_options,
|
||||||
GList **conflicting_options)
|
GList **conflicting_options)
|
||||||
{
|
{
|
||||||
char timestamp[40];
|
gchar timestamp[40];
|
||||||
char *name;
|
gchar *name;
|
||||||
char tokname[51];
|
gchar tokname[51];
|
||||||
FILE *fp_new;
|
FILE *fp_new;
|
||||||
FILE *fp_old;
|
FILE *fp_old;
|
||||||
GList *option;
|
GList *option;
|
||||||
char *cur_line;
|
gchar *cur_line;
|
||||||
char *prev_line;
|
gchar *prev_line;
|
||||||
char *str;
|
gchar *str;
|
||||||
gchar *error_msg;
|
gchar *error_msg;
|
||||||
gchar *personal_gimprc;
|
gchar *personal_gimprc;
|
||||||
|
|
||||||
g_assert(updated_options != NULL);
|
g_assert (updated_options != NULL);
|
||||||
g_assert(conflicting_options != NULL);
|
g_assert (conflicting_options != NULL);
|
||||||
|
|
||||||
personal_gimprc = gimp_personal_rc_file ("gimprc");
|
personal_gimprc = gimp_personal_rc_file ("gimprc");
|
||||||
error_msg = open_backup_file (personal_gimprc,
|
error_msg = open_backup_file (personal_gimprc,
|
||||||
|
@ -783,7 +785,7 @@ save_gimprc (GList **updated_options,
|
||||||
fclose (fp_new);
|
fclose (fp_new);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static gint
|
||||||
get_next_token (void)
|
get_next_token (void)
|
||||||
{
|
{
|
||||||
if (next_token != -1)
|
if (next_token != -1)
|
||||||
|
@ -799,7 +801,7 @@ get_next_token (void)
|
||||||
return cur_token;
|
return cur_token;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static gint
|
||||||
peek_next_token (void)
|
peek_next_token (void)
|
||||||
{
|
{
|
||||||
if (next_token == -1)
|
if (next_token == -1)
|
||||||
|
@ -808,11 +810,11 @@ peek_next_token (void)
|
||||||
return next_token;
|
return next_token;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static gint
|
||||||
parse_statement (void)
|
parse_statement (void)
|
||||||
{
|
{
|
||||||
int token;
|
gint token;
|
||||||
int i;
|
gint i;
|
||||||
|
|
||||||
token = peek_next_token ();
|
token = peek_next_token ();
|
||||||
if (!token)
|
if (!token)
|
||||||
|
@ -879,12 +881,12 @@ parse_statement (void)
|
||||||
return parse_unknown (token_sym);
|
return parse_unknown (token_sym);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static gint
|
||||||
parse_path (gpointer val1p,
|
parse_path (gpointer val1p,
|
||||||
gpointer val2p)
|
gpointer val2p)
|
||||||
{
|
{
|
||||||
int token;
|
gint token;
|
||||||
char **pathp;
|
gchar **pathp;
|
||||||
|
|
||||||
g_assert (val1p != NULL);
|
g_assert (val1p != NULL);
|
||||||
pathp = (char **)val1p;
|
pathp = (char **)val1p;
|
||||||
|
@ -912,15 +914,15 @@ parse_path (gpointer val1p,
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static gint
|
||||||
parse_string (gpointer val1p,
|
parse_string (gpointer val1p,
|
||||||
gpointer val2p)
|
gpointer val2p)
|
||||||
{
|
{
|
||||||
int token;
|
gint token;
|
||||||
char **strp;
|
gchar **strp;
|
||||||
|
|
||||||
g_assert (val1p != NULL);
|
g_assert (val1p != NULL);
|
||||||
strp = (char **)val1p;
|
strp = (gchar **)val1p;
|
||||||
|
|
||||||
token = peek_next_token ();
|
token = peek_next_token ();
|
||||||
if (!token || (token != TOKEN_STRING))
|
if (!token || (token != TOKEN_STRING))
|
||||||
|
@ -943,15 +945,15 @@ parse_string (gpointer val1p,
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static gint
|
||||||
parse_double (gpointer val1p,
|
parse_double (gpointer val1p,
|
||||||
gpointer val2p)
|
gpointer val2p)
|
||||||
{
|
{
|
||||||
int token;
|
gint token;
|
||||||
double *nump;
|
gdouble *nump;
|
||||||
|
|
||||||
g_assert (val1p != NULL);
|
g_assert (val1p != NULL);
|
||||||
nump = (double *)val1p;
|
nump = (gdouble *)val1p;
|
||||||
|
|
||||||
token = peek_next_token ();
|
token = peek_next_token ();
|
||||||
if (!token || (token != TOKEN_NUMBER))
|
if (!token || (token != TOKEN_NUMBER))
|
||||||
|
@ -968,15 +970,15 @@ parse_double (gpointer val1p,
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static gint
|
||||||
parse_float (gpointer val1p,
|
parse_float (gpointer val1p,
|
||||||
gpointer val2p)
|
gpointer val2p)
|
||||||
{
|
{
|
||||||
int token;
|
gint token;
|
||||||
float *nump;
|
gfloat *nump;
|
||||||
|
|
||||||
g_assert (val1p != NULL);
|
g_assert (val1p != NULL);
|
||||||
nump = (float *)val1p;
|
nump = (gfloat *)val1p;
|
||||||
|
|
||||||
token = peek_next_token ();
|
token = peek_next_token ();
|
||||||
if (!token || (token != TOKEN_NUMBER))
|
if (!token || (token != TOKEN_NUMBER))
|
||||||
|
@ -997,11 +999,11 @@ static int
|
||||||
parse_int (gpointer val1p,
|
parse_int (gpointer val1p,
|
||||||
gpointer val2p)
|
gpointer val2p)
|
||||||
{
|
{
|
||||||
int token;
|
gint token;
|
||||||
int *nump;
|
gint *nump;
|
||||||
|
|
||||||
g_assert (val1p != NULL);
|
g_assert (val1p != NULL);
|
||||||
nump = (int *)val1p;
|
nump = (gint *)val1p;
|
||||||
|
|
||||||
token = peek_next_token ();
|
token = peek_next_token ();
|
||||||
if (!token || (token != TOKEN_NUMBER))
|
if (!token || (token != TOKEN_NUMBER))
|
||||||
|
@ -1022,8 +1024,8 @@ static int
|
||||||
parse_boolean (gpointer val1p,
|
parse_boolean (gpointer val1p,
|
||||||
gpointer val2p)
|
gpointer val2p)
|
||||||
{
|
{
|
||||||
int token;
|
gint token;
|
||||||
int *boolp;
|
gint *boolp;
|
||||||
|
|
||||||
/* The variable to be set should be passed in the first or second
|
/* The variable to be set should be passed in the first or second
|
||||||
* pointer. If the pointer is in val2p, then the opposite value is
|
* pointer. If the pointer is in val2p, then the opposite value is
|
||||||
|
@ -1080,13 +1082,13 @@ parse_boolean (gpointer val1p,
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static gint
|
||||||
parse_position (gpointer val1p,
|
parse_position (gpointer val1p,
|
||||||
gpointer val2p)
|
gpointer val2p)
|
||||||
{
|
{
|
||||||
int token;
|
gint token;
|
||||||
int *xp;
|
gint *xp;
|
||||||
int *yp;
|
gint *yp;
|
||||||
|
|
||||||
g_assert (val1p != NULL && val2p != NULL);
|
g_assert (val1p != NULL && val2p != NULL);
|
||||||
xp = (int *)val1p;
|
xp = (int *)val1p;
|
||||||
|
@ -1114,17 +1116,17 @@ parse_position (gpointer val1p,
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static gint
|
||||||
parse_mem_size (gpointer val1p,
|
parse_mem_size (gpointer val1p,
|
||||||
gpointer val2p)
|
gpointer val2p)
|
||||||
{
|
{
|
||||||
int mult;
|
gint suffix;
|
||||||
int suffix;
|
gint token;
|
||||||
int token;
|
guint mult;
|
||||||
int *sizep;
|
guint *sizep;
|
||||||
|
|
||||||
g_assert (val1p != NULL);
|
g_assert (val1p != NULL);
|
||||||
sizep = (int *)val1p;
|
sizep = (guint *)val1p;
|
||||||
|
|
||||||
token = peek_next_token ();
|
token = peek_next_token ();
|
||||||
if (!token || ((token != TOKEN_NUMBER) &&
|
if (!token || ((token != TOKEN_NUMBER) &&
|
||||||
|
@ -1161,12 +1163,12 @@ parse_mem_size (gpointer val1p,
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static gint
|
||||||
parse_image_type (gpointer val1p,
|
parse_image_type (gpointer val1p,
|
||||||
gpointer val2p)
|
gpointer val2p)
|
||||||
{
|
{
|
||||||
int token;
|
gint token;
|
||||||
int *typep;
|
gint *typep;
|
||||||
|
|
||||||
g_assert (val1p != NULL);
|
g_assert (val1p != NULL);
|
||||||
typep = (int *)val1p;
|
typep = (int *)val1p;
|
||||||
|
@ -1191,11 +1193,11 @@ parse_image_type (gpointer val1p,
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static gint
|
||||||
parse_interpolation_type (gpointer val1p,
|
parse_interpolation_type (gpointer val1p,
|
||||||
gpointer val2p)
|
gpointer val2p)
|
||||||
{
|
{
|
||||||
int token;
|
gint token;
|
||||||
InterpolationType *typep;
|
InterpolationType *typep;
|
||||||
|
|
||||||
g_assert (val1p != NULL);
|
g_assert (val1p != NULL);
|
||||||
|
@ -1223,11 +1225,11 @@ parse_interpolation_type (gpointer val1p,
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static gint
|
||||||
parse_preview_size (gpointer val1p,
|
parse_preview_size (gpointer val1p,
|
||||||
gpointer val2p)
|
gpointer val2p)
|
||||||
{
|
{
|
||||||
int token;
|
gint token;
|
||||||
|
|
||||||
token = peek_next_token ();
|
token = peek_next_token ();
|
||||||
if (!token || (token != TOKEN_SYMBOL && token != TOKEN_NUMBER))
|
if (!token || (token != TOKEN_SYMBOL && token != TOKEN_NUMBER))
|
||||||
|
@ -1262,11 +1264,11 @@ parse_preview_size (gpointer val1p,
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static gint
|
||||||
parse_nav_preview_size (gpointer val1p,
|
parse_nav_preview_size (gpointer val1p,
|
||||||
gpointer val2p)
|
gpointer val2p)
|
||||||
{
|
{
|
||||||
int token;
|
gint token;
|
||||||
|
|
||||||
token = peek_next_token ();
|
token = peek_next_token ();
|
||||||
if (!token || (token != TOKEN_SYMBOL && token != TOKEN_NUMBER))
|
if (!token || (token != TOKEN_SYMBOL && token != TOKEN_NUMBER))
|
||||||
|
@ -1298,12 +1300,12 @@ parse_nav_preview_size (gpointer val1p,
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static gint
|
||||||
parse_units (gpointer val1p,
|
parse_units (gpointer val1p,
|
||||||
gpointer val2p)
|
gpointer val2p)
|
||||||
{
|
{
|
||||||
int token;
|
gint token;
|
||||||
int i;
|
gint i;
|
||||||
|
|
||||||
g_assert (val1p != NULL);
|
g_assert (val1p != NULL);
|
||||||
|
|
||||||
|
@ -1328,14 +1330,14 @@ parse_units (gpointer val1p,
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static gint
|
||||||
parse_plug_in (gpointer val1p,
|
parse_plug_in (gpointer val1p,
|
||||||
gpointer val2p)
|
gpointer val2p)
|
||||||
{
|
{
|
||||||
char *name;
|
gchar *name;
|
||||||
char *menu_path;
|
gchar *menu_path;
|
||||||
char *accelerator;
|
gchar *accelerator;
|
||||||
int token;
|
gint token;
|
||||||
|
|
||||||
name = NULL;
|
name = NULL;
|
||||||
menu_path = NULL;
|
menu_path = NULL;
|
||||||
|
@ -1378,7 +1380,7 @@ parse_plug_in (gpointer val1p,
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static gint
|
||||||
parse_plug_in_def (gpointer val1p,
|
parse_plug_in_def (gpointer val1p,
|
||||||
gpointer val2p)
|
gpointer val2p)
|
||||||
{
|
{
|
||||||
|
@ -1431,10 +1433,10 @@ parse_plug_in_def (gpointer val1p,
|
||||||
return ERROR;
|
return ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static gint
|
||||||
parse_locale_def (PlugInDef *plug_in_def)
|
parse_locale_def (PlugInDef *plug_in_def)
|
||||||
{
|
{
|
||||||
int token;
|
gint token;
|
||||||
|
|
||||||
token = peek_next_token ();
|
token = peek_next_token ();
|
||||||
if (!token || (token != TOKEN_STRING))
|
if (!token || (token != TOKEN_STRING))
|
||||||
|
@ -1472,12 +1474,12 @@ parse_locale_def (PlugInDef *plug_in_def)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int
|
static gint
|
||||||
parse_proc_def (PlugInProcDef **proc_def)
|
parse_proc_def (PlugInProcDef **proc_def)
|
||||||
{
|
{
|
||||||
PlugInProcDef *pd;
|
PlugInProcDef *pd;
|
||||||
int token;
|
gint token;
|
||||||
int i;
|
gint i;
|
||||||
|
|
||||||
token = peek_next_token ();
|
token = peek_next_token ();
|
||||||
if (!token || (token != TOKEN_LEFT_PAREN))
|
if (!token || (token != TOKEN_LEFT_PAREN))
|
||||||
|
@ -1653,10 +1655,10 @@ parse_proc_def (PlugInProcDef **proc_def)
|
||||||
return ERROR;
|
return ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static gint
|
||||||
parse_proc_arg (ProcArg *arg)
|
parse_proc_arg (ProcArg *arg)
|
||||||
{
|
{
|
||||||
int token;
|
gint token;
|
||||||
|
|
||||||
arg->arg_type = -1;
|
arg->arg_type = -1;
|
||||||
arg->name = NULL;
|
arg->name = NULL;
|
||||||
|
@ -1708,13 +1710,13 @@ parse_proc_arg (ProcArg *arg)
|
||||||
return ERROR;
|
return ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static gint
|
||||||
parse_menu_path (gpointer val1p,
|
parse_menu_path (gpointer val1p,
|
||||||
gpointer val2p)
|
gpointer val2p)
|
||||||
{
|
{
|
||||||
char *menu_path;
|
gchar *menu_path;
|
||||||
char *accelerator;
|
gchar *accelerator;
|
||||||
int token;
|
gint token;
|
||||||
|
|
||||||
menu_path = NULL;
|
menu_path = NULL;
|
||||||
accelerator = NULL;
|
accelerator = NULL;
|
||||||
|
@ -1919,7 +1921,7 @@ static void
|
||||||
parse_device_accelerator (const char *accelerator,
|
parse_device_accelerator (const char *accelerator,
|
||||||
GdkDeviceKey *key)
|
GdkDeviceKey *key)
|
||||||
{
|
{
|
||||||
int done;
|
gboolean done;
|
||||||
|
|
||||||
g_return_if_fail (accelerator != NULL);
|
g_return_if_fail (accelerator != NULL);
|
||||||
g_return_if_fail (key != NULL);
|
g_return_if_fail (key != NULL);
|
||||||
|
@ -2193,12 +2195,12 @@ parse_device (gpointer val1p,
|
||||||
return ERROR;
|
return ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static gint
|
||||||
parse_session_info (gpointer val1p,
|
parse_session_info (gpointer val1p,
|
||||||
gpointer val2p)
|
gpointer val2p)
|
||||||
{
|
{
|
||||||
int i;
|
gint i;
|
||||||
int token;
|
gint token;
|
||||||
SessionInfo *info = NULL;
|
SessionInfo *info = NULL;
|
||||||
|
|
||||||
token = peek_next_token ();
|
token = peek_next_token ();
|
||||||
|
@ -2274,7 +2276,7 @@ parse_session_info (gpointer val1p,
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static gint
|
||||||
parse_unit_info (gpointer val1p,
|
parse_unit_info (gpointer val1p,
|
||||||
gpointer val2p)
|
gpointer val2p)
|
||||||
{
|
{
|
||||||
|
@ -2391,12 +2393,12 @@ parse_unit_info (gpointer val1p,
|
||||||
return ERROR;
|
return ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static gint
|
||||||
parse_parasite (gpointer val1p,
|
parse_parasite (gpointer val1p,
|
||||||
gpointer val2p)
|
gpointer val2p)
|
||||||
{
|
{
|
||||||
int token;
|
gint token;
|
||||||
int res = ERROR;
|
gint res = ERROR;
|
||||||
gchar *identifier = NULL;
|
gchar *identifier = NULL;
|
||||||
gulong flags = 0;
|
gulong flags = 0;
|
||||||
Parasite *parasite;
|
Parasite *parasite;
|
||||||
|
@ -2432,11 +2434,11 @@ error:
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static gint
|
||||||
parse_help_browser (gpointer val1p,
|
parse_help_browser (gpointer val1p,
|
||||||
gpointer val2p)
|
gpointer val2p)
|
||||||
{
|
{
|
||||||
int token;
|
gint token;
|
||||||
|
|
||||||
token = peek_next_token ();
|
token = peek_next_token ();
|
||||||
if (!token || token != TOKEN_SYMBOL)
|
if (!token || token != TOKEN_SYMBOL)
|
||||||
|
@ -2456,10 +2458,10 @@ parse_help_browser (gpointer val1p,
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static gint
|
||||||
parse_unknown (char *token_sym)
|
parse_unknown (gchar *token_sym)
|
||||||
{
|
{
|
||||||
int token;
|
gint token;
|
||||||
UnknownToken *ut, *tmp;
|
UnknownToken *ut, *tmp;
|
||||||
GList *list;
|
GList *list;
|
||||||
|
|
||||||
|
@ -2510,16 +2512,17 @@ parse_unknown (char *token_sym)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
char*
|
gchar*
|
||||||
gimprc_value_to_str (char *name)
|
gimprc_value_to_str (gchar *name)
|
||||||
{
|
{
|
||||||
return value_to_str (name); /* had a namespace collision */
|
return value_to_str (name); /* had a namespace collision */
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static gchar *
|
||||||
value_to_str (char *name)
|
value_to_str (gchar *name)
|
||||||
{
|
{
|
||||||
int i;
|
gint i;
|
||||||
|
|
||||||
for (i = 0; i < nfuncs; i++)
|
for (i = 0; i < nfuncs; i++)
|
||||||
if (! strcmp (funcs[i].name, name))
|
if (! strcmp (funcs[i].name, name))
|
||||||
switch (funcs[i].type)
|
switch (funcs[i].type)
|
||||||
|
@ -2566,7 +2569,7 @@ value_to_str (char *name)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline char *
|
static inline gchar *
|
||||||
string_to_str (gpointer val1p,
|
string_to_str (gpointer val1p,
|
||||||
gpointer val2p)
|
gpointer val2p)
|
||||||
{
|
{
|
||||||
|
@ -2579,35 +2582,35 @@ string_to_str (gpointer val1p,
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline char *
|
static inline gchar *
|
||||||
path_to_str (gpointer val1p,
|
path_to_str (gpointer val1p,
|
||||||
gpointer val2p)
|
gpointer val2p)
|
||||||
{
|
{
|
||||||
return string_to_str (val1p, val2p);
|
return string_to_str (val1p, val2p);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline char *
|
static inline gchar *
|
||||||
double_to_str (gpointer val1p,
|
double_to_str (gpointer val1p,
|
||||||
gpointer val2p)
|
gpointer val2p)
|
||||||
{
|
{
|
||||||
return g_strdup_printf ("%f", *((double *)val1p));
|
return g_strdup_printf ("%f", *((gdouble *)val1p));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline char *
|
static inline gchar *
|
||||||
float_to_str (gpointer val1p,
|
float_to_str (gpointer val1p,
|
||||||
gpointer val2p)
|
gpointer val2p)
|
||||||
{
|
{
|
||||||
return g_strdup_printf ("%f", (double)(*((float *)val1p)));
|
return g_strdup_printf ("%f", (gdouble)(*((float *)val1p)));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline char *
|
static inline gchar *
|
||||||
int_to_str (gpointer val1p,
|
int_to_str (gpointer val1p,
|
||||||
gpointer val2p)
|
gpointer val2p)
|
||||||
{
|
{
|
||||||
return g_strdup_printf ("%d", *((int *)val1p));
|
return g_strdup_printf ("%d", *((gint *)val1p));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline char *
|
static inline gchar *
|
||||||
boolean_to_str (gpointer val1p,
|
boolean_to_str (gpointer val1p,
|
||||||
gpointer val2p)
|
gpointer val2p)
|
||||||
{
|
{
|
||||||
|
@ -2623,20 +2626,20 @@ boolean_to_str (gpointer val1p,
|
||||||
return g_strdup ("no");
|
return g_strdup ("no");
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline char *
|
static inline gchar *
|
||||||
position_to_str (gpointer val1p,
|
position_to_str (gpointer val1p,
|
||||||
gpointer val2p)
|
gpointer val2p)
|
||||||
{
|
{
|
||||||
return g_strdup_printf ("%d %d", *((int *)val1p), *((int *)val2p));
|
return g_strdup_printf ("%d %d", *((int *)val1p), *((int *)val2p));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline char *
|
static inline gchar *
|
||||||
mem_size_to_str (gpointer val1p,
|
mem_size_to_str (gpointer val1p,
|
||||||
gpointer val2p)
|
gpointer val2p)
|
||||||
{
|
{
|
||||||
int size;
|
guint size;
|
||||||
|
|
||||||
size = *((int *)val1p);
|
size = *((guint *)val1p);
|
||||||
if (size % 1048576 == 0)
|
if (size % 1048576 == 0)
|
||||||
return g_strdup_printf ("%dM", size / 1048576);
|
return g_strdup_printf ("%dM", size / 1048576);
|
||||||
else if (size % 1024 == 0)
|
else if (size % 1024 == 0)
|
||||||
|
@ -2645,20 +2648,20 @@ mem_size_to_str (gpointer val1p,
|
||||||
return g_strdup_printf ("%dB", size);
|
return g_strdup_printf ("%dB", size);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline char *
|
static inline gchar *
|
||||||
image_type_to_str (gpointer val1p,
|
image_type_to_str (gpointer val1p,
|
||||||
gpointer val2p)
|
gpointer val2p)
|
||||||
{
|
{
|
||||||
int type;
|
gint type;
|
||||||
|
|
||||||
type = *((int *)val1p);
|
type = *((gint *)val1p);
|
||||||
if (type == GRAY)
|
if (type == GRAY)
|
||||||
return g_strdup ("gray");
|
return g_strdup ("gray");
|
||||||
else
|
else
|
||||||
return g_strdup ("rgb");
|
return g_strdup ("rgb");
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline char *
|
static inline gchar *
|
||||||
interpolation_type_to_str (gpointer val1p,
|
interpolation_type_to_str (gpointer val1p,
|
||||||
gpointer val2p)
|
gpointer val2p)
|
||||||
{
|
{
|
||||||
|
@ -2678,7 +2681,7 @@ interpolation_type_to_str (gpointer val1p,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline char *
|
static inline gchar *
|
||||||
preview_size_to_str (gpointer val1p,
|
preview_size_to_str (gpointer val1p,
|
||||||
gpointer val2p)
|
gpointer val2p)
|
||||||
{
|
{
|
||||||
|
@ -2696,7 +2699,7 @@ preview_size_to_str (gpointer val1p,
|
||||||
return g_strdup ("none");
|
return g_strdup ("none");
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline char *
|
static inline gchar *
|
||||||
nav_preview_size_to_str (gpointer val1p,
|
nav_preview_size_to_str (gpointer val1p,
|
||||||
gpointer val2p)
|
gpointer val2p)
|
||||||
{
|
{
|
||||||
|
@ -2711,14 +2714,14 @@ nav_preview_size_to_str (gpointer val1p,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static inline char *
|
static inline gchar *
|
||||||
units_to_str (gpointer val1p,
|
units_to_str (gpointer val1p,
|
||||||
gpointer val2p)
|
gpointer val2p)
|
||||||
{
|
{
|
||||||
return g_strdup (gimp_unit_get_identifier (*((GimpUnit*)val1p)));
|
return g_strdup (gimp_unit_get_identifier (*((GimpUnit*)val1p)));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline char *
|
static inline gchar *
|
||||||
help_browser_to_str (gpointer val1p,
|
help_browser_to_str (gpointer val1p,
|
||||||
gpointer val2p)
|
gpointer val2p)
|
||||||
{
|
{
|
||||||
|
@ -2728,7 +2731,7 @@ help_browser_to_str (gpointer val1p,
|
||||||
return g_strdup ("gimp");
|
return g_strdup ("gimp");
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline char *
|
static inline gchar *
|
||||||
comment_to_str (gpointer val1p,
|
comment_to_str (gpointer val1p,
|
||||||
gpointer val2p)
|
gpointer val2p)
|
||||||
{
|
{
|
||||||
|
@ -2747,7 +2750,7 @@ comment_to_str (gpointer val1p,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
add_gimp_directory_token (char *gimp_dir)
|
add_gimp_directory_token (gchar *gimp_dir)
|
||||||
{
|
{
|
||||||
UnknownToken *ut;
|
UnknownToken *ut;
|
||||||
|
|
||||||
|
@ -2776,7 +2779,7 @@ add_gimp_directory_token (char *gimp_dir)
|
||||||
|
|
||||||
#ifdef __EMX__
|
#ifdef __EMX__
|
||||||
static void
|
static void
|
||||||
add_x11root_token (char *x11root)
|
add_x11root_token (gchar *x11root)
|
||||||
{
|
{
|
||||||
UnknownToken *ut;
|
UnknownToken *ut;
|
||||||
|
|
||||||
|
@ -2812,14 +2815,14 @@ add_x11root_token (char *x11root)
|
||||||
explaining the problem.
|
explaining the problem.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
static char *
|
static gchar *
|
||||||
open_backup_file (char *filename,
|
open_backup_file (gchar *filename,
|
||||||
char *secondary_filename,
|
gchar *secondary_filename,
|
||||||
char **name_used,
|
gchar **name_used,
|
||||||
FILE **fp_new,
|
FILE **fp_new,
|
||||||
FILE **fp_old)
|
FILE **fp_old)
|
||||||
{
|
{
|
||||||
char *oldfilename = NULL;
|
gchar *oldfilename = NULL;
|
||||||
|
|
||||||
/* Rename the file to *.old, open it for reading and create the new file. */
|
/* Rename the file to *.old, open it for reading and create the new file. */
|
||||||
if ((*fp_old = fopen (filename, "rt")) == NULL)
|
if ((*fp_old = fopen (filename, "rt")) == NULL)
|
||||||
|
@ -2872,8 +2875,8 @@ open_backup_file (char *filename,
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
char*
|
gchar*
|
||||||
gimprc_find_token (char *token)
|
gimprc_find_token (gchar *token)
|
||||||
{
|
{
|
||||||
GList *list;
|
GList *list;
|
||||||
UnknownToken *ut;
|
UnknownToken *ut;
|
||||||
|
@ -2890,8 +2893,8 @@ gimprc_find_token (char *token)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gimprc_set_token (char *token,
|
gimprc_set_token (gchar *token,
|
||||||
char *value)
|
gchar *value)
|
||||||
{
|
{
|
||||||
GList *list;
|
GList *list;
|
||||||
UnknownToken *ut;
|
UnknownToken *ut;
|
||||||
|
|
|
@ -40,7 +40,7 @@ extern gchar *gradient_path;
|
||||||
extern gchar *default_gradient;
|
extern gchar *default_gradient;
|
||||||
extern gchar *pluginrc_path;
|
extern gchar *pluginrc_path;
|
||||||
extern gchar *module_path;
|
extern gchar *module_path;
|
||||||
extern gint tile_cache_size;
|
extern guint tile_cache_size;
|
||||||
extern gint marching_speed;
|
extern gint marching_speed;
|
||||||
extern gint last_opened_size;
|
extern gint last_opened_size;
|
||||||
extern gdouble gamma_val;
|
extern gdouble gamma_val;
|
||||||
|
@ -83,7 +83,7 @@ extern gint num_processors;
|
||||||
extern gchar *image_title_format;
|
extern gchar *image_title_format;
|
||||||
extern gboolean global_paint_options;
|
extern gboolean global_paint_options;
|
||||||
extern gboolean show_indicators;
|
extern gboolean show_indicators;
|
||||||
extern gint max_new_image_size;
|
extern guint max_new_image_size;
|
||||||
extern gint thumbnail_mode;
|
extern gint thumbnail_mode;
|
||||||
extern gboolean trust_dirty_flag;
|
extern gboolean trust_dirty_flag;
|
||||||
extern gboolean use_help;
|
extern gboolean use_help;
|
||||||
|
|
|
@ -99,7 +99,7 @@ static gint old_default_type;
|
||||||
static gchar * old_default_comment;
|
static gchar * old_default_comment;
|
||||||
static gint old_default_dot_for_dot;
|
static gint old_default_dot_for_dot;
|
||||||
static gint old_stingy_memory_use;
|
static gint old_stingy_memory_use;
|
||||||
static gint old_tile_cache_size;
|
static guint old_tile_cache_size;
|
||||||
static gint old_min_colors;
|
static gint old_min_colors;
|
||||||
static gint old_install_cmap;
|
static gint old_install_cmap;
|
||||||
static gint old_cycled_marching_ants;
|
static gint old_cycled_marching_ants;
|
||||||
|
@ -119,7 +119,7 @@ static gint old_using_xserver_resolution;
|
||||||
static gint old_num_processors;
|
static gint old_num_processors;
|
||||||
static gchar * old_image_title_format;
|
static gchar * old_image_title_format;
|
||||||
static gint old_global_paint_options;
|
static gint old_global_paint_options;
|
||||||
static gint old_max_new_image_size;
|
static guint old_max_new_image_size;
|
||||||
static gint old_thumbnail_mode;
|
static gint old_thumbnail_mode;
|
||||||
static gint old_show_indicators;
|
static gint old_show_indicators;
|
||||||
static gint old_trust_dirty_flag;
|
static gint old_trust_dirty_flag;
|
||||||
|
@ -150,7 +150,7 @@ static gchar * edit_plug_in_path = NULL;
|
||||||
static gchar * edit_module_path = NULL;
|
static gchar * edit_module_path = NULL;
|
||||||
|
|
||||||
/* variables which will be changed _after_ closing the dialog */
|
/* variables which will be changed _after_ closing the dialog */
|
||||||
static gint edit_tile_cache_size;
|
static guint edit_tile_cache_size;
|
||||||
|
|
||||||
static GtkWidget * prefs_dlg = NULL;
|
static GtkWidget * prefs_dlg = NULL;
|
||||||
|
|
||||||
|
@ -1630,10 +1630,11 @@ file_pref_cmd_callback (GtkWidget *widget,
|
||||||
|
|
||||||
/* The maximum size of a new image */
|
/* The maximum size of a new image */
|
||||||
adjustment = gtk_adjustment_new (max_new_image_size,
|
adjustment = gtk_adjustment_new (max_new_image_size,
|
||||||
0, (4069.0 * 1024 * 1024), 1.0, 1.0, 0.0);
|
0, (4069.0 * 1024 * 1024 - 1),
|
||||||
|
1.0, 1.0, 0.0);
|
||||||
hbox = gimp_mem_size_entry_new (GTK_ADJUSTMENT (adjustment));
|
hbox = gimp_mem_size_entry_new (GTK_ADJUSTMENT (adjustment));
|
||||||
gtk_signal_connect (GTK_OBJECT (adjustment), "value_changed",
|
gtk_signal_connect (GTK_OBJECT (adjustment), "value_changed",
|
||||||
GTK_SIGNAL_FUNC (gimp_int_adjustment_update),
|
GTK_SIGNAL_FUNC (gimp_uint_adjustment_update),
|
||||||
&max_new_image_size);
|
&max_new_image_size);
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
|
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
|
||||||
_("Maximum Image Size:"), 1.0, 0.5,
|
_("Maximum Image Size:"), 1.0, 0.5,
|
||||||
|
@ -2155,10 +2156,11 @@ file_pref_cmd_callback (GtkWidget *widget,
|
||||||
|
|
||||||
/* The tile cache size */
|
/* The tile cache size */
|
||||||
adjustment = gtk_adjustment_new (edit_tile_cache_size,
|
adjustment = gtk_adjustment_new (edit_tile_cache_size,
|
||||||
0, (4069.0 * 1024 * 1024), 1.0, 1.0, 0.0);
|
0, (4069.0 * 1024 * 1024 - 1),
|
||||||
|
1.0, 1.0, 0.0);
|
||||||
hbox = gimp_mem_size_entry_new (GTK_ADJUSTMENT (adjustment));
|
hbox = gimp_mem_size_entry_new (GTK_ADJUSTMENT (adjustment));
|
||||||
gtk_signal_connect (GTK_OBJECT (adjustment), "value_changed",
|
gtk_signal_connect (GTK_OBJECT (adjustment), "value_changed",
|
||||||
GTK_SIGNAL_FUNC (gimp_int_adjustment_update),
|
GTK_SIGNAL_FUNC (gimp_uint_adjustment_update),
|
||||||
&edit_tile_cache_size);
|
&edit_tile_cache_size);
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
|
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
|
||||||
_("Tile Cache Size:"), 1.0, 0.5,
|
_("Tile Cache Size:"), 1.0, 0.5,
|
||||||
|
|
|
@ -99,7 +99,7 @@ static gint old_default_type;
|
||||||
static gchar * old_default_comment;
|
static gchar * old_default_comment;
|
||||||
static gint old_default_dot_for_dot;
|
static gint old_default_dot_for_dot;
|
||||||
static gint old_stingy_memory_use;
|
static gint old_stingy_memory_use;
|
||||||
static gint old_tile_cache_size;
|
static guint old_tile_cache_size;
|
||||||
static gint old_min_colors;
|
static gint old_min_colors;
|
||||||
static gint old_install_cmap;
|
static gint old_install_cmap;
|
||||||
static gint old_cycled_marching_ants;
|
static gint old_cycled_marching_ants;
|
||||||
|
@ -119,7 +119,7 @@ static gint old_using_xserver_resolution;
|
||||||
static gint old_num_processors;
|
static gint old_num_processors;
|
||||||
static gchar * old_image_title_format;
|
static gchar * old_image_title_format;
|
||||||
static gint old_global_paint_options;
|
static gint old_global_paint_options;
|
||||||
static gint old_max_new_image_size;
|
static guint old_max_new_image_size;
|
||||||
static gint old_thumbnail_mode;
|
static gint old_thumbnail_mode;
|
||||||
static gint old_show_indicators;
|
static gint old_show_indicators;
|
||||||
static gint old_trust_dirty_flag;
|
static gint old_trust_dirty_flag;
|
||||||
|
@ -150,7 +150,7 @@ static gchar * edit_plug_in_path = NULL;
|
||||||
static gchar * edit_module_path = NULL;
|
static gchar * edit_module_path = NULL;
|
||||||
|
|
||||||
/* variables which will be changed _after_ closing the dialog */
|
/* variables which will be changed _after_ closing the dialog */
|
||||||
static gint edit_tile_cache_size;
|
static guint edit_tile_cache_size;
|
||||||
|
|
||||||
static GtkWidget * prefs_dlg = NULL;
|
static GtkWidget * prefs_dlg = NULL;
|
||||||
|
|
||||||
|
@ -1630,10 +1630,11 @@ file_pref_cmd_callback (GtkWidget *widget,
|
||||||
|
|
||||||
/* The maximum size of a new image */
|
/* The maximum size of a new image */
|
||||||
adjustment = gtk_adjustment_new (max_new_image_size,
|
adjustment = gtk_adjustment_new (max_new_image_size,
|
||||||
0, (4069.0 * 1024 * 1024), 1.0, 1.0, 0.0);
|
0, (4069.0 * 1024 * 1024 - 1),
|
||||||
|
1.0, 1.0, 0.0);
|
||||||
hbox = gimp_mem_size_entry_new (GTK_ADJUSTMENT (adjustment));
|
hbox = gimp_mem_size_entry_new (GTK_ADJUSTMENT (adjustment));
|
||||||
gtk_signal_connect (GTK_OBJECT (adjustment), "value_changed",
|
gtk_signal_connect (GTK_OBJECT (adjustment), "value_changed",
|
||||||
GTK_SIGNAL_FUNC (gimp_int_adjustment_update),
|
GTK_SIGNAL_FUNC (gimp_uint_adjustment_update),
|
||||||
&max_new_image_size);
|
&max_new_image_size);
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
|
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
|
||||||
_("Maximum Image Size:"), 1.0, 0.5,
|
_("Maximum Image Size:"), 1.0, 0.5,
|
||||||
|
@ -2155,10 +2156,11 @@ file_pref_cmd_callback (GtkWidget *widget,
|
||||||
|
|
||||||
/* The tile cache size */
|
/* The tile cache size */
|
||||||
adjustment = gtk_adjustment_new (edit_tile_cache_size,
|
adjustment = gtk_adjustment_new (edit_tile_cache_size,
|
||||||
0, (4069.0 * 1024 * 1024), 1.0, 1.0, 0.0);
|
0, (4069.0 * 1024 * 1024 - 1),
|
||||||
|
1.0, 1.0, 0.0);
|
||||||
hbox = gimp_mem_size_entry_new (GTK_ADJUSTMENT (adjustment));
|
hbox = gimp_mem_size_entry_new (GTK_ADJUSTMENT (adjustment));
|
||||||
gtk_signal_connect (GTK_OBJECT (adjustment), "value_changed",
|
gtk_signal_connect (GTK_OBJECT (adjustment), "value_changed",
|
||||||
GTK_SIGNAL_FUNC (gimp_int_adjustment_update),
|
GTK_SIGNAL_FUNC (gimp_uint_adjustment_update),
|
||||||
&edit_tile_cache_size);
|
&edit_tile_cache_size);
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
|
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
|
||||||
_("Tile Cache Size:"), 1.0, 0.5,
|
_("Tile Cache Size:"), 1.0, 0.5,
|
||||||
|
|
|
@ -948,7 +948,7 @@ typedef struct
|
||||||
{
|
{
|
||||||
GtkAdjustment *adjustment;
|
GtkAdjustment *adjustment;
|
||||||
GtkAdjustment *divided_adj;
|
GtkAdjustment *divided_adj;
|
||||||
gint mem_size_unit;
|
guint mem_size_unit;
|
||||||
} GimpMemSizeEntryData;
|
} GimpMemSizeEntryData;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -956,7 +956,7 @@ gimp_mem_size_entry_callback (GtkAdjustment *adj,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
GimpMemSizeEntryData *gmsed;
|
GimpMemSizeEntryData *gmsed;
|
||||||
gint new_value;
|
guint new_value;
|
||||||
|
|
||||||
gmsed = (GimpMemSizeEntryData *)data;
|
gmsed = (GimpMemSizeEntryData *)data;
|
||||||
new_value = adj->value * gmsed->mem_size_unit;
|
new_value = adj->value * gmsed->mem_size_unit;
|
||||||
|
@ -969,12 +969,12 @@ gimp_mem_size_unit_callback (GtkWidget *widget,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
GimpMemSizeEntryData *gmsed;
|
GimpMemSizeEntryData *gmsed;
|
||||||
gint divided_mem_size;
|
guint divided_mem_size;
|
||||||
gint new_unit;
|
guint new_unit;
|
||||||
|
|
||||||
gmsed = (GimpMemSizeEntryData *)data;
|
gmsed = (GimpMemSizeEntryData *)data;
|
||||||
|
|
||||||
new_unit = (gint) gtk_object_get_user_data (GTK_OBJECT (widget));
|
new_unit = (guint) gtk_object_get_user_data (GTK_OBJECT (widget));
|
||||||
|
|
||||||
if (new_unit && new_unit != gmsed->mem_size_unit)
|
if (new_unit && new_unit != gmsed->mem_size_unit)
|
||||||
{
|
{
|
||||||
|
@ -1000,8 +1000,8 @@ gimp_mem_size_entry_new (GtkAdjustment *adjustment)
|
||||||
GtkWidget *optionmenu;
|
GtkWidget *optionmenu;
|
||||||
|
|
||||||
GimpMemSizeEntryData *gmsed;
|
GimpMemSizeEntryData *gmsed;
|
||||||
gint mem_size_unit = 1;
|
guint mem_size_unit = 1;
|
||||||
gint divided_mem_size;
|
guint divided_mem_size;
|
||||||
gint i;
|
gint i;
|
||||||
|
|
||||||
gmsed = g_new (GimpMemSizeEntryData, 1);
|
gmsed = g_new (GimpMemSizeEntryData, 1);
|
||||||
|
@ -1017,7 +1017,7 @@ gimp_mem_size_entry_new (GtkAdjustment *adjustment)
|
||||||
hbox = gtk_hbox_new (FALSE, 2);
|
hbox = gtk_hbox_new (FALSE, 2);
|
||||||
spinbutton =
|
spinbutton =
|
||||||
gimp_spin_button_new (÷d_adj, divided_mem_size,
|
gimp_spin_button_new (÷d_adj, divided_mem_size,
|
||||||
0.0, (4069.0 * 1024 * 1024), 1.0, 16.0, 0.0,
|
0.0, (4069.0 * 1024 * 1024 - 1), 1.0, 16.0, 0.0,
|
||||||
1.0, 0.0);
|
1.0, 0.0);
|
||||||
gtk_signal_connect (GTK_OBJECT (divided_adj), "value_changed",
|
gtk_signal_connect (GTK_OBJECT (divided_adj), "value_changed",
|
||||||
GTK_SIGNAL_FUNC (gimp_mem_size_entry_callback),
|
GTK_SIGNAL_FUNC (gimp_mem_size_entry_callback),
|
||||||
|
@ -1240,6 +1240,26 @@ gimp_int_adjustment_update (GtkAdjustment *adjustment,
|
||||||
*val = (gint) (adjustment->value + 0.5);
|
*val = (gint) (adjustment->value + 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gimp_uint_adjustment_update:
|
||||||
|
* @adjustment: A #GtkAdjustment.
|
||||||
|
* @data: A pointer to a #guint variable which will store the adjustment's
|
||||||
|
* value.
|
||||||
|
*
|
||||||
|
* Note that the #GtkAdjustment's value (which is a #gfloat) will be rounded
|
||||||
|
* with (#guint) (value + 0.5).
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
gimp_uint_adjustment_update (GtkAdjustment *adjustment,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
guint *val;
|
||||||
|
|
||||||
|
val = (guint *) data;
|
||||||
|
*val = (guint) (adjustment->value + 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gimp_float_adjustment_update:
|
* gimp_float_adjustment_update:
|
||||||
* @adjustment: A #GtkAdjustment.
|
* @adjustment: A #GtkAdjustment.
|
||||||
|
|
|
@ -218,6 +218,9 @@ void gimp_menu_item_update (GtkWidget *widget,
|
||||||
void gimp_int_adjustment_update (GtkAdjustment *adjustment,
|
void gimp_int_adjustment_update (GtkAdjustment *adjustment,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
|
|
||||||
|
void gimp_uint_adjustment_update (GtkAdjustment *adjustment,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
void gimp_float_adjustment_update (GtkAdjustment *adjustment,
|
void gimp_float_adjustment_update (GtkAdjustment *adjustment,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
|
|
||||||
|
|
|
@ -948,7 +948,7 @@ typedef struct
|
||||||
{
|
{
|
||||||
GtkAdjustment *adjustment;
|
GtkAdjustment *adjustment;
|
||||||
GtkAdjustment *divided_adj;
|
GtkAdjustment *divided_adj;
|
||||||
gint mem_size_unit;
|
guint mem_size_unit;
|
||||||
} GimpMemSizeEntryData;
|
} GimpMemSizeEntryData;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -956,7 +956,7 @@ gimp_mem_size_entry_callback (GtkAdjustment *adj,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
GimpMemSizeEntryData *gmsed;
|
GimpMemSizeEntryData *gmsed;
|
||||||
gint new_value;
|
guint new_value;
|
||||||
|
|
||||||
gmsed = (GimpMemSizeEntryData *)data;
|
gmsed = (GimpMemSizeEntryData *)data;
|
||||||
new_value = adj->value * gmsed->mem_size_unit;
|
new_value = adj->value * gmsed->mem_size_unit;
|
||||||
|
@ -969,12 +969,12 @@ gimp_mem_size_unit_callback (GtkWidget *widget,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
GimpMemSizeEntryData *gmsed;
|
GimpMemSizeEntryData *gmsed;
|
||||||
gint divided_mem_size;
|
guint divided_mem_size;
|
||||||
gint new_unit;
|
guint new_unit;
|
||||||
|
|
||||||
gmsed = (GimpMemSizeEntryData *)data;
|
gmsed = (GimpMemSizeEntryData *)data;
|
||||||
|
|
||||||
new_unit = (gint) gtk_object_get_user_data (GTK_OBJECT (widget));
|
new_unit = (guint) gtk_object_get_user_data (GTK_OBJECT (widget));
|
||||||
|
|
||||||
if (new_unit && new_unit != gmsed->mem_size_unit)
|
if (new_unit && new_unit != gmsed->mem_size_unit)
|
||||||
{
|
{
|
||||||
|
@ -1000,8 +1000,8 @@ gimp_mem_size_entry_new (GtkAdjustment *adjustment)
|
||||||
GtkWidget *optionmenu;
|
GtkWidget *optionmenu;
|
||||||
|
|
||||||
GimpMemSizeEntryData *gmsed;
|
GimpMemSizeEntryData *gmsed;
|
||||||
gint mem_size_unit = 1;
|
guint mem_size_unit = 1;
|
||||||
gint divided_mem_size;
|
guint divided_mem_size;
|
||||||
gint i;
|
gint i;
|
||||||
|
|
||||||
gmsed = g_new (GimpMemSizeEntryData, 1);
|
gmsed = g_new (GimpMemSizeEntryData, 1);
|
||||||
|
@ -1017,7 +1017,7 @@ gimp_mem_size_entry_new (GtkAdjustment *adjustment)
|
||||||
hbox = gtk_hbox_new (FALSE, 2);
|
hbox = gtk_hbox_new (FALSE, 2);
|
||||||
spinbutton =
|
spinbutton =
|
||||||
gimp_spin_button_new (÷d_adj, divided_mem_size,
|
gimp_spin_button_new (÷d_adj, divided_mem_size,
|
||||||
0.0, (4069.0 * 1024 * 1024), 1.0, 16.0, 0.0,
|
0.0, (4069.0 * 1024 * 1024 - 1), 1.0, 16.0, 0.0,
|
||||||
1.0, 0.0);
|
1.0, 0.0);
|
||||||
gtk_signal_connect (GTK_OBJECT (divided_adj), "value_changed",
|
gtk_signal_connect (GTK_OBJECT (divided_adj), "value_changed",
|
||||||
GTK_SIGNAL_FUNC (gimp_mem_size_entry_callback),
|
GTK_SIGNAL_FUNC (gimp_mem_size_entry_callback),
|
||||||
|
@ -1240,6 +1240,26 @@ gimp_int_adjustment_update (GtkAdjustment *adjustment,
|
||||||
*val = (gint) (adjustment->value + 0.5);
|
*val = (gint) (adjustment->value + 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gimp_uint_adjustment_update:
|
||||||
|
* @adjustment: A #GtkAdjustment.
|
||||||
|
* @data: A pointer to a #guint variable which will store the adjustment's
|
||||||
|
* value.
|
||||||
|
*
|
||||||
|
* Note that the #GtkAdjustment's value (which is a #gfloat) will be rounded
|
||||||
|
* with (#guint) (value + 0.5).
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
gimp_uint_adjustment_update (GtkAdjustment *adjustment,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
guint *val;
|
||||||
|
|
||||||
|
val = (guint *) data;
|
||||||
|
*val = (guint) (adjustment->value + 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gimp_float_adjustment_update:
|
* gimp_float_adjustment_update:
|
||||||
* @adjustment: A #GtkAdjustment.
|
* @adjustment: A #GtkAdjustment.
|
||||||
|
|
|
@ -218,6 +218,9 @@ void gimp_menu_item_update (GtkWidget *widget,
|
||||||
void gimp_int_adjustment_update (GtkAdjustment *adjustment,
|
void gimp_int_adjustment_update (GtkAdjustment *adjustment,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
|
|
||||||
|
void gimp_uint_adjustment_update (GtkAdjustment *adjustment,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
void gimp_float_adjustment_update (GtkAdjustment *adjustment,
|
void gimp_float_adjustment_update (GtkAdjustment *adjustment,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
|
|
||||||
|
|
|
@ -136,3 +136,19 @@
|
||||||
(bookmark-register "script-fu-bookmark-16"
|
(bookmark-register "script-fu-bookmark-16"
|
||||||
_"<Toolbox>/Xtns/Web Browser/GIMP Bugs"
|
_"<Toolbox>/Xtns/Web Browser/GIMP Bugs"
|
||||||
"Link to http://www.xach.com/gimp/news/bugreport.html")
|
"Link to http://www.xach.com/gimp/news/bugreport.html")
|
||||||
|
|
||||||
|
(define (script-fu-bookmark-17)
|
||||||
|
(script-fu-bookmark "http://gimp-savvy.com/"))
|
||||||
|
|
||||||
|
(bookmark-register "script-fu-bookmark-17"
|
||||||
|
_"<Toolbox>/Xtns/Web Browser/Gimp-Savvy.com"
|
||||||
|
"Link to http://gimp-savvy.com/")
|
||||||
|
|
||||||
|
(define (script-fu-bookmark-18)
|
||||||
|
(script-fu-bookmark "http://gimp-savvy.com/BOOK/"))
|
||||||
|
|
||||||
|
(bookmark-register "script-fu-bookmark-18"
|
||||||
|
_"<Toolbox>/Xtns/Web Browser/Grokking the GIMP"
|
||||||
|
"Link to http://gimp-savvy.com/BOOK/")
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue