Misc changes for .18

* app/indexed_palette.c: fix for wrong color selected in indexed
        palette dialog

        * app/xcf.c: don't crash on bad input (0 byte files)

        * app/plug_in.h
        * app/plug_in.c: fixes Gimp's most obscure bug. Failed plugin
        queries are handle correctly now

        * app/commands.c: added marching ants speed to preferences

        * plug-ins/tiff/tiff.c: correction for inversion for MINISWHITE
        images without alpha

        * plug-ins/pcx/pcx.c: updated to new version

        * app/paint_funcs.h: changed OPAQUE and TRANSPARENT to
        OPAQUE_OPACITY and TRANSPARENT_OPACITY to avoid possible
        conflicts. All affects .c files changed.

-Yosh
This commit is contained in:
Manish Singh
1998-01-25 01:24:46 +00:00
parent 3014db05f3
commit 2ce0e15023
109 changed files with 1011 additions and 1370 deletions

View File

@ -111,6 +111,7 @@ static GtkWidget *prefs_dlg = NULL;
static int old_transparency_type;
static int old_transparency_size;
static int old_levels_of_undo;
static int old_marching_speed;
static int old_allow_resize_windows;
static int old_auto_save;
static int old_preview_size;
@ -206,7 +207,7 @@ file_new_ok_callback (GtkWidget *widget,
/* Make the background (or first) layer */
layer = layer_new (gimage->ID, gimage->width, gimage->height,
type, "Background", OPAQUE, NORMAL);
type, "Background", OPAQUE_OPACITY, NORMAL);
if (layer) {
/* add the new layer to the gimage */
@ -512,8 +513,8 @@ file_save_as_cmd_callback (GtkWidget *widget,
Still no settings for default-brush, default-gradient,
default-palette, default-pattern, gamma-correction, color-cube,
marching-ants-speed, show-rulers, ruler-units. No widget for
confirm-on-close although a lot of stuff is there.
show-rulers, ruler-units. No widget for confirm-on-close although
a lot of stuff is there.
No UI feedback for the fact that some settings won't take effect
until the next Gimp restart.
@ -567,6 +568,13 @@ file_prefs_ok_callback (GtkWidget *widget,
levels_of_undo = old_levels_of_undo;
return;
}
if (marching_speed <= 50)
{
message_box("Error: Marching speed must be 50 or greater.",
NULL, NULL);
marching_speed = old_marching_speed;
return;
}
if (default_width < 1)
{
message_box("Error: Default width must be one or greater.",
@ -626,6 +634,8 @@ file_prefs_save_callback (GtkWidget *widget,
if (levels_of_undo != old_levels_of_undo)
update = g_list_append (update, "undo-levels");
if (marching_speed != old_marching_speed)
update = g_list_append (update, "marching-ants-speed");
if (allow_resize_windows != old_allow_resize_windows)
update = g_list_append (update, "allow-resize-windows");
if (auto_save != old_auto_save)
@ -751,6 +761,7 @@ file_prefs_cancel_callback (GtkWidget *widget,
prefs_dlg = NULL;
levels_of_undo = old_levels_of_undo;
marching_speed = old_marching_speed;
allow_resize_windows = old_allow_resize_windows;
auto_save = old_auto_save;
no_cursor_updating = old_no_cursor_updating;
@ -960,6 +971,7 @@ file_pref_cmd_callback (GtkWidget *widget,
old_transparency_type = transparency_type;
old_transparency_size = transparency_size;
old_levels_of_undo = levels_of_undo;
old_marching_speed = marching_speed;
old_allow_resize_windows = allow_resize_windows;
old_auto_save = auto_save;
old_preview_size = preview_size;
@ -1287,6 +1299,9 @@ file_pref_cmd_callback (GtkWidget *widget,
sprintf (buffer, "%d", marching_speed);
gtk_entry_set_text (GTK_ENTRY (entry), buffer);
gtk_box_pack_start (GTK_BOX (hbox), entry, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (entry), "changed",
(GtkSignalFunc) file_prefs_text_callback,
&marching_speed);
gtk_widget_show (entry);
label = gtk_label_new ("Interface");