Moved the RunModeType enum into the header so we can use it elsewhere
Tue Feb 23 00:05:39 GMT 1999 Adam D. Moss <adam@gimp.org> * app/plug_in.c app/plug_in.h: Moved the RunModeType enum into the header so we can use it elsewhere (e.g. fileops) * plug-ins/gif/gif.c plug-ins/jpeg/jpeg.c: Don't show progress-bars if we're running noninteractively. This makes thumbnail updating look more pleasant. Try to do the same for all file plugins (and others)! * app/fileops.c: Reworked the thumbnail display again, fixed some buglets, file_open_image() is RunMode aware, added some tweaks, rhubarb rhubarb, merged in some 'cosmetic' tweaks from Marco.
This commit is contained in:
parent
09f86317a2
commit
e51f6f666c
41 changed files with 369 additions and 283 deletions
17
ChangeLog
17
ChangeLog
|
|
@ -1,3 +1,20 @@
|
|||
Tue Feb 23 00:05:39 GMT 1999 Adam D. Moss <adam@gimp.org>
|
||||
|
||||
* app/plug_in.c
|
||||
app/plug_in.h: Moved the RunModeType enum
|
||||
into the header so we can use it elsewhere (e.g. fileops)
|
||||
|
||||
* plug-ins/gif/gif.c
|
||||
plug-ins/jpeg/jpeg.c: Don't show progress-bars if we're
|
||||
running noninteractively. This makes thumbnail updating
|
||||
look more pleasant. Try to do the same for all file plugins
|
||||
(and others)!
|
||||
|
||||
* app/fileops.c: Reworked the thumbnail display again, fixed
|
||||
some buglets, file_open_image() is RunMode aware, added some
|
||||
tweaks, rhubarb rhubarb, merged in some 'cosmetic' tweaks
|
||||
from Marco.
|
||||
|
||||
1999-02-22 adam, blah blah
|
||||
|
||||
* app/appenv.h: fixed a macro bug waiting to happen
|
||||
|
|
|
|||
|
|
@ -115,9 +115,9 @@ commit access: yes
|
|||
Name: Adam D. Moss
|
||||
Email: adam@gimp.org
|
||||
url: http://www.foxbox.org
|
||||
ircnick: aspirin
|
||||
expertise: convert.c, idlerender, general core and UI, gif.c
|
||||
animationplay.c and various other subversive plugins.
|
||||
ircnick: Aspirin
|
||||
expertise: convert.c, idlerender, general core and UI, thumbnails,
|
||||
gif.c, animationplay.c and various other subversive plugins.
|
||||
current work: making derisive comments about everyone else's cvs
|
||||
commits
|
||||
commit access: yes
|
||||
|
|
|
|||
|
|
@ -68,13 +68,6 @@
|
|||
|
||||
typedef struct _PlugInBlocked PlugInBlocked;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
RUN_INTERACTIVE = 0x0,
|
||||
RUN_NONINTERACTIVE = 0x1,
|
||||
RUN_WITH_LAST_VALS = 0x2
|
||||
} RunModeType;
|
||||
|
||||
struct _PlugInBlocked
|
||||
{
|
||||
PlugIn *plug_in;
|
||||
|
|
|
|||
142
app/fileops.c
142
app/fileops.c
|
|
@ -83,7 +83,8 @@ static gint file_overwrite_delete_callback (GtkWidget *w,
|
|||
gpointer client_data);
|
||||
|
||||
static GimpImage* file_open_image (char *filename,
|
||||
char *raw_filename);
|
||||
char *raw_filename,
|
||||
RunModeType runmode);
|
||||
|
||||
static void genbutton_callback (GtkWidget *w,
|
||||
gpointer client_data);
|
||||
|
|
@ -136,7 +137,7 @@ static GtkPreview *open_options_preview = NULL;
|
|||
static GtkWidget *open_options_fixed = NULL;
|
||||
static GtkWidget *open_options_label = NULL;
|
||||
static GtkWidget *open_options_frame = NULL;
|
||||
static GtkWidget *open_options_genbutton = NULL;
|
||||
static GtkWidget *open_options_genbuttonlabel = NULL;
|
||||
/* Some state for the thumbnailer */
|
||||
static gchar *preview_fullname = NULL;
|
||||
|
||||
|
|
@ -186,7 +187,7 @@ static ProcRecord file_save_proc =
|
|||
{
|
||||
"gimp_file_save",
|
||||
"Saves a file by extension",
|
||||
"This procedure invokes the correct file save handler according to the file's extension and/or prefix. The name of the file to save is typically a full pathname, and the name entered is what the user actually typed before prepending a directory path. The reason for this is that if the user types http://www.xcf/~gimp he wants to fetch a URL, and the full pathname will not look like a URL.",
|
||||
"This procedure invokes the correct file save handler according to the file's extension and/or prefix. The name of the file to save is typically a full pathname, and the name entered is what the user actually typed before prepending a directory path. The reason for this is that if the user types http://www.xcf/~gimp she wants to fetch a URL, and the full pathname will not look like a URL.",
|
||||
"Josh MacDonald",
|
||||
"Josh MacDonald",
|
||||
"1997",
|
||||
|
|
@ -516,6 +517,7 @@ file_open_callback (GtkWidget *w,
|
|||
GtkWidget *label;
|
||||
GtkWidget *option_menu;
|
||||
GtkWidget *load_menu;
|
||||
GtkWidget *open_options_genbutton;
|
||||
GDisplay *gdisplay;
|
||||
|
||||
if (!fileload)
|
||||
|
|
@ -568,25 +570,25 @@ file_open_callback (GtkWidget *w,
|
|||
|
||||
vbox = gtk_vbox_new (FALSE, 0);
|
||||
{
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 2);
|
||||
gtk_container_add (GTK_CONTAINER (frame), vbox);
|
||||
|
||||
hbox = gtk_hbox_new (TRUE, 1);
|
||||
hbox = gtk_hbox_new (FALSE, 1);
|
||||
{
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 5);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 2);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, TRUE, 0);
|
||||
|
||||
label = gtk_label_new (_("Determine file type:"));
|
||||
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 5);
|
||||
gtk_widget_show (label);
|
||||
|
||||
option_menu = gtk_option_menu_new ();
|
||||
gtk_box_pack_start (GTK_BOX (hbox), option_menu, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), option_menu, FALSE, TRUE, 0);
|
||||
gtk_widget_show (option_menu);
|
||||
|
||||
menus_get_load_menu (&load_menu, NULL);
|
||||
gtk_option_menu_set_menu (GTK_OPTION_MENU (option_menu), load_menu);
|
||||
gtk_box_pack_start (GTK_BOX (open_options), frame, FALSE, TRUE, 5);
|
||||
gtk_box_pack_start (GTK_BOX (open_options), frame, TRUE, TRUE, 5);
|
||||
}
|
||||
gtk_widget_show (hbox);
|
||||
}
|
||||
|
|
@ -612,31 +614,66 @@ file_open_callback (GtkWidget *w,
|
|||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
|
||||
open_options_genbutton = gtk_button_new_with_label
|
||||
("generate\npreview");
|
||||
open_options_genbutton = gtk_button_new();
|
||||
{
|
||||
gtk_signal_connect (GTK_OBJECT (open_options_genbutton),
|
||||
"clicked",
|
||||
(GtkSignalFunc) genbutton_callback,
|
||||
open_options_genbutton);
|
||||
gtk_box_pack_end (GTK_BOX (hbox), open_options_genbutton,
|
||||
FALSE, FALSE, 0);
|
||||
TRUE, FALSE, 0);
|
||||
}
|
||||
gtk_widget_show (open_options_genbutton);
|
||||
|
||||
open_options_fixed = gtk_fixed_new ();
|
||||
{
|
||||
gtk_widget_set_usize (open_options_fixed, 80, 60);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), open_options_fixed,
|
||||
FALSE, FALSE, 0);
|
||||
GtkWidget* abox;
|
||||
GtkWidget* sbox;
|
||||
|
||||
open_options_preview = GTK_PREVIEW (gtk_preview_new
|
||||
(GTK_PREVIEW_COLOR));
|
||||
gtk_widget_set_usize (open_options_fixed, 80, 60);
|
||||
gtk_container_add (GTK_CONTAINER (GTK_BIN (open_options_genbutton)), open_options_fixed);
|
||||
|
||||
sbox = gtk_vbox_new(TRUE, 0);
|
||||
{
|
||||
GtkWidget* align;
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (open_options_fixed),
|
||||
GTK_WIDGET (open_options_preview));
|
||||
GTK_WIDGET (sbox));
|
||||
|
||||
align = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
|
||||
{
|
||||
gtk_widget_set_usize (align, 80, 60);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (sbox),
|
||||
GTK_WIDGET (align),
|
||||
FALSE, TRUE, 0);
|
||||
|
||||
abox = gtk_hbox_new (FALSE, 0);
|
||||
{
|
||||
gtk_container_add (GTK_CONTAINER (align), abox);
|
||||
|
||||
open_options_preview = GTK_PREVIEW (gtk_preview_new
|
||||
(GTK_PREVIEW_COLOR));
|
||||
{
|
||||
gtk_box_pack_start (GTK_BOX (abox),
|
||||
GTK_WIDGET (open_options_preview),
|
||||
FALSE, TRUE, 0);
|
||||
}
|
||||
gtk_widget_show(GTK_WIDGET (open_options_preview));
|
||||
|
||||
open_options_genbuttonlabel = gtk_label_new("generate\npreview");
|
||||
{
|
||||
gtk_box_pack_start (GTK_BOX (abox),
|
||||
GTK_WIDGET (open_options_genbuttonlabel),
|
||||
FALSE, TRUE, 0);
|
||||
}
|
||||
gtk_widget_show(GTK_WIDGET (open_options_genbuttonlabel));
|
||||
}
|
||||
gtk_widget_show(abox);
|
||||
}
|
||||
gtk_widget_show(align);
|
||||
}
|
||||
gtk_widget_show(GTK_WIDGET (open_options_preview));
|
||||
gtk_widget_show(sbox);
|
||||
}
|
||||
gtk_widget_show (open_options_fixed);
|
||||
}
|
||||
|
|
@ -655,13 +692,16 @@ file_open_callback (GtkWidget *w,
|
|||
|
||||
/* pack the containing open_options hbox into the load-dialog */
|
||||
gtk_box_pack_end (GTK_BOX (GTK_FILE_SELECTION (fileload)->main_vbox),
|
||||
open_options, FALSE, FALSE, 5);
|
||||
open_options, FALSE, FALSE, 1);
|
||||
}
|
||||
|
||||
gtk_frame_set_label (GTK_FRAME(open_options_frame), _("Preview"));
|
||||
gtk_label_set_text (GTK_LABEL(open_options_label), "No selection.");
|
||||
gtk_widget_set_sensitive (GTK_WIDGET(open_options_genbutton), FALSE);
|
||||
|
||||
gtk_widget_show (GTK_WIDGET(open_options_genbuttonlabel));
|
||||
gtk_widget_hide (GTK_WIDGET(open_options_preview));
|
||||
gtk_widget_set_sensitive (GTK_WIDGET(open_options_frame), FALSE);
|
||||
|
||||
gtk_widget_show (open_options);
|
||||
|
||||
file_dialog_show (fileload);
|
||||
|
|
@ -788,7 +828,7 @@ file_revert_callback (GtkWidget *w,
|
|||
filename = gimage_filename (gdisplay->gimage);
|
||||
raw_filename = g_basename (filename);
|
||||
|
||||
if ((gimage = file_open_image (filename, raw_filename)) != NULL)
|
||||
if ((gimage = file_open_image (filename, raw_filename, RUN_INTERACTIVE)) != NULL)
|
||||
gdisplay_reconnect (gdisplay, gimage);
|
||||
else
|
||||
g_message (_("Revert failed."));
|
||||
|
|
@ -858,7 +898,7 @@ file_save_type_callback (GtkWidget *w,
|
|||
}
|
||||
|
||||
static GimpImage*
|
||||
file_open_image (char *filename, char *raw_filename)
|
||||
file_open_image (char *filename, char *raw_filename, RunModeType runmode)
|
||||
{
|
||||
PlugInProcDef *file_proc;
|
||||
ProcRecord *proc;
|
||||
|
|
@ -886,7 +926,7 @@ file_open_image (char *filename, char *raw_filename)
|
|||
for (i = 0; i < proc->num_args; i++)
|
||||
args[i].arg_type = proc->args[i].arg_type;
|
||||
|
||||
args[0].value.pdb_int = 0;
|
||||
args[0].value.pdb_int = runmode;
|
||||
args[1].value.pdb_pointer = filename;
|
||||
args[2].value.pdb_pointer = raw_filename;
|
||||
|
||||
|
|
@ -908,7 +948,7 @@ file_open (char *filename, char *raw_filename)
|
|||
{
|
||||
GimpImage *gimage;
|
||||
|
||||
if ((gimage = file_open_image (filename, raw_filename)) != NULL)
|
||||
if ((gimage = file_open_image (filename, raw_filename, RUN_INTERACTIVE)) != NULL)
|
||||
{
|
||||
/* enable & clear all undo steps */
|
||||
gimage_enable_undo (gimage);
|
||||
|
|
@ -986,14 +1026,14 @@ file_save_thumbnail (GimpImage* gimage,
|
|||
}
|
||||
}
|
||||
|
||||
printf("tn: %d x %d -> ", w, h);fflush(stdout);
|
||||
/*printf("tn: %d x %d -> ", w, h);fflush(stdout);*/
|
||||
|
||||
tempbuf = gimp_image_composite_preview (gimage, Gray, w, h);
|
||||
tbd = temp_buf_data(tempbuf);
|
||||
|
||||
w = tempbuf->width;
|
||||
h = tempbuf->height;
|
||||
printf("tn: %d x %d\n", w, h);fflush(stdout);
|
||||
/*printf("tn: %d x %d\n", w, h);fflush(stdout);*/
|
||||
|
||||
mkdir (xvpathname, 0755);
|
||||
|
||||
|
|
@ -1242,6 +1282,7 @@ readXVThumb(const gchar *fnam,
|
|||
}
|
||||
|
||||
|
||||
/* don't call with preview_fullname as parameter! will be clobbered! */
|
||||
static void
|
||||
set_preview (const gchar* fullfname)
|
||||
{
|
||||
|
|
@ -1255,8 +1296,8 @@ set_preview (const gchar* fullfname)
|
|||
struct stat file_stat;
|
||||
struct stat thumb_stat;
|
||||
gboolean thumb_may_be_outdated = FALSE;
|
||||
gboolean show_generate_button = FALSE;
|
||||
|
||||
gboolean show_generate_label = TRUE;
|
||||
|
||||
|
||||
pname = g_dirname (fullfname);
|
||||
fname = g_basename (fullfname); /* Don't free this! */
|
||||
|
|
@ -1274,7 +1315,6 @@ set_preview (const gchar* fullfname)
|
|||
if ((thumb_stat.st_mtime) < (file_stat.st_mtime))
|
||||
{
|
||||
thumb_may_be_outdated = TRUE;
|
||||
show_generate_button = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1284,8 +1324,11 @@ set_preview (const gchar* fullfname)
|
|||
|
||||
gtk_frame_set_label (GTK_FRAME(open_options_frame),
|
||||
fname);
|
||||
|
||||
if (preview_fullname)
|
||||
g_free (preview_fullname);
|
||||
{
|
||||
g_free (preview_fullname);
|
||||
}
|
||||
preview_fullname = g_strdup (fullfname);
|
||||
|
||||
if (raw_thumb)
|
||||
|
|
@ -1315,6 +1358,8 @@ set_preview (const gchar* fullfname)
|
|||
(imginfo ? imginfo : "(no information)"));
|
||||
gtk_widget_show (GTK_WIDGET(open_options_preview));
|
||||
gtk_widget_queue_draw (GTK_WIDGET(open_options_preview));
|
||||
|
||||
show_generate_label = FALSE;
|
||||
|
||||
g_free (thumb_rgb);
|
||||
g_free (raw_thumb);
|
||||
|
|
@ -1324,17 +1369,21 @@ set_preview (const gchar* fullfname)
|
|||
if (imginfo)
|
||||
g_free(imginfo);
|
||||
|
||||
show_generate_button = TRUE;
|
||||
|
||||
gtk_widget_hide (GTK_WIDGET(open_options_preview));
|
||||
gtk_label_set_text (GTK_LABEL(open_options_label),
|
||||
"no preview available");
|
||||
}
|
||||
|
||||
if (show_generate_button)
|
||||
gtk_widget_set_sensitive (GTK_WIDGET(open_options_genbutton), TRUE);
|
||||
if (show_generate_label)
|
||||
{
|
||||
gtk_widget_hide (GTK_WIDGET(open_options_preview));
|
||||
gtk_widget_show (GTK_WIDGET(open_options_genbuttonlabel));
|
||||
}
|
||||
else
|
||||
gtk_widget_set_sensitive (GTK_WIDGET(open_options_genbutton), FALSE);
|
||||
{
|
||||
gtk_widget_hide (GTK_WIDGET(open_options_genbuttonlabel));
|
||||
gtk_widget_show (GTK_WIDGET(open_options_preview));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1346,6 +1395,7 @@ file_open_clistrow_callback (GtkWidget *w,
|
|||
|
||||
fullfname = gtk_file_selection_get_filename(GTK_FILE_SELECTION(fileload));
|
||||
|
||||
gtk_widget_set_sensitive (GTK_WIDGET(open_options_frame), TRUE);
|
||||
set_preview (fullfname);
|
||||
}
|
||||
|
||||
|
|
@ -1355,24 +1405,36 @@ genbutton_callback (GtkWidget *w,
|
|||
gpointer client_data)
|
||||
{
|
||||
GimpImage* gimage_to_be_thumbed;
|
||||
gchar* filename;
|
||||
|
||||
if (!preview_fullname)
|
||||
{
|
||||
g_warning ("Tried to generate thumbnail for NULL filename.");
|
||||
return;
|
||||
}
|
||||
|
||||
filename = g_strdup(preview_fullname);
|
||||
|
||||
gimp_add_busy_cursors();
|
||||
gtk_widget_set_sensitive (GTK_WIDGET (fileload), FALSE);
|
||||
if ((gimage_to_be_thumbed = file_open_image (preview_fullname,
|
||||
g_basename(preview_fullname))))
|
||||
if ((gimage_to_be_thumbed = file_open_image (filename,
|
||||
g_basename(filename),
|
||||
RUN_NONINTERACTIVE)))
|
||||
{
|
||||
file_save_thumbnail (gimage_to_be_thumbed, preview_fullname);
|
||||
file_save_thumbnail (gimage_to_be_thumbed, filename);
|
||||
set_preview(filename);
|
||||
gimage_delete (gimage_to_be_thumbed);
|
||||
}
|
||||
set_preview(preview_fullname);
|
||||
else
|
||||
{
|
||||
gtk_label_set_text (GTK_LABEL(open_options_label),
|
||||
"(could not make preview)");
|
||||
}
|
||||
|
||||
gtk_widget_set_sensitive (GTK_WIDGET (fileload), TRUE);
|
||||
gimp_remove_busy_cursors(NULL);
|
||||
|
||||
g_free (filename);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -68,13 +68,6 @@
|
|||
|
||||
typedef struct _PlugInBlocked PlugInBlocked;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
RUN_INTERACTIVE = 0x0,
|
||||
RUN_NONINTERACTIVE = 0x1,
|
||||
RUN_WITH_LAST_VALS = 0x2
|
||||
} RunModeType;
|
||||
|
||||
struct _PlugInBlocked
|
||||
{
|
||||
PlugIn *plug_in;
|
||||
|
|
|
|||
|
|
@ -68,13 +68,6 @@
|
|||
|
||||
typedef struct _PlugInBlocked PlugInBlocked;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
RUN_INTERACTIVE = 0x0,
|
||||
RUN_NONINTERACTIVE = 0x1,
|
||||
RUN_WITH_LAST_VALS = 0x2
|
||||
} RunModeType;
|
||||
|
||||
struct _PlugInBlocked
|
||||
{
|
||||
PlugIn *plug_in;
|
||||
|
|
|
|||
|
|
@ -68,13 +68,6 @@
|
|||
|
||||
typedef struct _PlugInBlocked PlugInBlocked;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
RUN_INTERACTIVE = 0x0,
|
||||
RUN_NONINTERACTIVE = 0x1,
|
||||
RUN_WITH_LAST_VALS = 0x2
|
||||
} RunModeType;
|
||||
|
||||
struct _PlugInBlocked
|
||||
{
|
||||
PlugIn *plug_in;
|
||||
|
|
|
|||
|
|
@ -68,13 +68,6 @@
|
|||
|
||||
typedef struct _PlugInBlocked PlugInBlocked;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
RUN_INTERACTIVE = 0x0,
|
||||
RUN_NONINTERACTIVE = 0x1,
|
||||
RUN_WITH_LAST_VALS = 0x2
|
||||
} RunModeType;
|
||||
|
||||
struct _PlugInBlocked
|
||||
{
|
||||
PlugIn *plug_in;
|
||||
|
|
|
|||
|
|
@ -68,13 +68,6 @@
|
|||
|
||||
typedef struct _PlugInBlocked PlugInBlocked;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
RUN_INTERACTIVE = 0x0,
|
||||
RUN_NONINTERACTIVE = 0x1,
|
||||
RUN_WITH_LAST_VALS = 0x2
|
||||
} RunModeType;
|
||||
|
||||
struct _PlugInBlocked
|
||||
{
|
||||
PlugIn *plug_in;
|
||||
|
|
|
|||
|
|
@ -34,6 +34,15 @@
|
|||
#define INDEXEDA_IMAGE 0x20
|
||||
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
RUN_INTERACTIVE = 0x0,
|
||||
RUN_NONINTERACTIVE = 0x1,
|
||||
RUN_WITH_LAST_VALS = 0x2
|
||||
} RunModeType;
|
||||
|
||||
|
||||
typedef struct _PlugIn PlugIn;
|
||||
typedef struct _PlugInDef PlugInDef;
|
||||
typedef struct _PlugInProcDef PlugInProcDef;
|
||||
|
|
|
|||
|
|
@ -68,13 +68,6 @@
|
|||
|
||||
typedef struct _PlugInBlocked PlugInBlocked;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
RUN_INTERACTIVE = 0x0,
|
||||
RUN_NONINTERACTIVE = 0x1,
|
||||
RUN_WITH_LAST_VALS = 0x2
|
||||
} RunModeType;
|
||||
|
||||
struct _PlugInBlocked
|
||||
{
|
||||
PlugIn *plug_in;
|
||||
|
|
|
|||
|
|
@ -34,6 +34,15 @@
|
|||
#define INDEXEDA_IMAGE 0x20
|
||||
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
RUN_INTERACTIVE = 0x0,
|
||||
RUN_NONINTERACTIVE = 0x1,
|
||||
RUN_WITH_LAST_VALS = 0x2
|
||||
} RunModeType;
|
||||
|
||||
|
||||
typedef struct _PlugIn PlugIn;
|
||||
typedef struct _PlugInDef PlugInDef;
|
||||
typedef struct _PlugInProcDef PlugInProcDef;
|
||||
|
|
|
|||
|
|
@ -68,13 +68,6 @@
|
|||
|
||||
typedef struct _PlugInBlocked PlugInBlocked;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
RUN_INTERACTIVE = 0x0,
|
||||
RUN_NONINTERACTIVE = 0x1,
|
||||
RUN_WITH_LAST_VALS = 0x2
|
||||
} RunModeType;
|
||||
|
||||
struct _PlugInBlocked
|
||||
{
|
||||
PlugIn *plug_in;
|
||||
|
|
|
|||
|
|
@ -68,13 +68,6 @@
|
|||
|
||||
typedef struct _PlugInBlocked PlugInBlocked;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
RUN_INTERACTIVE = 0x0,
|
||||
RUN_NONINTERACTIVE = 0x1,
|
||||
RUN_WITH_LAST_VALS = 0x2
|
||||
} RunModeType;
|
||||
|
||||
struct _PlugInBlocked
|
||||
{
|
||||
PlugIn *plug_in;
|
||||
|
|
|
|||
|
|
@ -68,13 +68,6 @@
|
|||
|
||||
typedef struct _PlugInBlocked PlugInBlocked;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
RUN_INTERACTIVE = 0x0,
|
||||
RUN_NONINTERACTIVE = 0x1,
|
||||
RUN_WITH_LAST_VALS = 0x2
|
||||
} RunModeType;
|
||||
|
||||
struct _PlugInBlocked
|
||||
{
|
||||
PlugIn *plug_in;
|
||||
|
|
|
|||
|
|
@ -34,6 +34,15 @@
|
|||
#define INDEXEDA_IMAGE 0x20
|
||||
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
RUN_INTERACTIVE = 0x0,
|
||||
RUN_NONINTERACTIVE = 0x1,
|
||||
RUN_WITH_LAST_VALS = 0x2
|
||||
} RunModeType;
|
||||
|
||||
|
||||
typedef struct _PlugIn PlugIn;
|
||||
typedef struct _PlugInDef PlugInDef;
|
||||
typedef struct _PlugInProcDef PlugInProcDef;
|
||||
|
|
|
|||
|
|
@ -68,13 +68,6 @@
|
|||
|
||||
typedef struct _PlugInBlocked PlugInBlocked;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
RUN_INTERACTIVE = 0x0,
|
||||
RUN_NONINTERACTIVE = 0x1,
|
||||
RUN_WITH_LAST_VALS = 0x2
|
||||
} RunModeType;
|
||||
|
||||
struct _PlugInBlocked
|
||||
{
|
||||
PlugIn *plug_in;
|
||||
|
|
|
|||
|
|
@ -68,13 +68,6 @@
|
|||
|
||||
typedef struct _PlugInBlocked PlugInBlocked;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
RUN_INTERACTIVE = 0x0,
|
||||
RUN_NONINTERACTIVE = 0x1,
|
||||
RUN_WITH_LAST_VALS = 0x2
|
||||
} RunModeType;
|
||||
|
||||
struct _PlugInBlocked
|
||||
{
|
||||
PlugIn *plug_in;
|
||||
|
|
|
|||
|
|
@ -34,6 +34,15 @@
|
|||
#define INDEXEDA_IMAGE 0x20
|
||||
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
RUN_INTERACTIVE = 0x0,
|
||||
RUN_NONINTERACTIVE = 0x1,
|
||||
RUN_WITH_LAST_VALS = 0x2
|
||||
} RunModeType;
|
||||
|
||||
|
||||
typedef struct _PlugIn PlugIn;
|
||||
typedef struct _PlugInDef PlugInDef;
|
||||
typedef struct _PlugInProcDef PlugInProcDef;
|
||||
|
|
|
|||
|
|
@ -68,13 +68,6 @@
|
|||
|
||||
typedef struct _PlugInBlocked PlugInBlocked;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
RUN_INTERACTIVE = 0x0,
|
||||
RUN_NONINTERACTIVE = 0x1,
|
||||
RUN_WITH_LAST_VALS = 0x2
|
||||
} RunModeType;
|
||||
|
||||
struct _PlugInBlocked
|
||||
{
|
||||
PlugIn *plug_in;
|
||||
|
|
|
|||
|
|
@ -68,13 +68,6 @@
|
|||
|
||||
typedef struct _PlugInBlocked PlugInBlocked;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
RUN_INTERACTIVE = 0x0,
|
||||
RUN_NONINTERACTIVE = 0x1,
|
||||
RUN_WITH_LAST_VALS = 0x2
|
||||
} RunModeType;
|
||||
|
||||
struct _PlugInBlocked
|
||||
{
|
||||
PlugIn *plug_in;
|
||||
|
|
|
|||
|
|
@ -34,6 +34,15 @@
|
|||
#define INDEXEDA_IMAGE 0x20
|
||||
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
RUN_INTERACTIVE = 0x0,
|
||||
RUN_NONINTERACTIVE = 0x1,
|
||||
RUN_WITH_LAST_VALS = 0x2
|
||||
} RunModeType;
|
||||
|
||||
|
||||
typedef struct _PlugIn PlugIn;
|
||||
typedef struct _PlugInDef PlugInDef;
|
||||
typedef struct _PlugInProcDef PlugInProcDef;
|
||||
|
|
|
|||
|
|
@ -68,13 +68,6 @@
|
|||
|
||||
typedef struct _PlugInBlocked PlugInBlocked;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
RUN_INTERACTIVE = 0x0,
|
||||
RUN_NONINTERACTIVE = 0x1,
|
||||
RUN_WITH_LAST_VALS = 0x2
|
||||
} RunModeType;
|
||||
|
||||
struct _PlugInBlocked
|
||||
{
|
||||
PlugIn *plug_in;
|
||||
|
|
|
|||
|
|
@ -34,6 +34,15 @@
|
|||
#define INDEXEDA_IMAGE 0x20
|
||||
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
RUN_INTERACTIVE = 0x0,
|
||||
RUN_NONINTERACTIVE = 0x1,
|
||||
RUN_WITH_LAST_VALS = 0x2
|
||||
} RunModeType;
|
||||
|
||||
|
||||
typedef struct _PlugIn PlugIn;
|
||||
typedef struct _PlugInDef PlugInDef;
|
||||
typedef struct _PlugInProcDef PlugInProcDef;
|
||||
|
|
|
|||
|
|
@ -68,13 +68,6 @@
|
|||
|
||||
typedef struct _PlugInBlocked PlugInBlocked;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
RUN_INTERACTIVE = 0x0,
|
||||
RUN_NONINTERACTIVE = 0x1,
|
||||
RUN_WITH_LAST_VALS = 0x2
|
||||
} RunModeType;
|
||||
|
||||
struct _PlugInBlocked
|
||||
{
|
||||
PlugIn *plug_in;
|
||||
|
|
|
|||
|
|
@ -68,13 +68,6 @@
|
|||
|
||||
typedef struct _PlugInBlocked PlugInBlocked;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
RUN_INTERACTIVE = 0x0,
|
||||
RUN_NONINTERACTIVE = 0x1,
|
||||
RUN_WITH_LAST_VALS = 0x2
|
||||
} RunModeType;
|
||||
|
||||
struct _PlugInBlocked
|
||||
{
|
||||
PlugIn *plug_in;
|
||||
|
|
|
|||
|
|
@ -68,13 +68,6 @@
|
|||
|
||||
typedef struct _PlugInBlocked PlugInBlocked;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
RUN_INTERACTIVE = 0x0,
|
||||
RUN_NONINTERACTIVE = 0x1,
|
||||
RUN_WITH_LAST_VALS = 0x2
|
||||
} RunModeType;
|
||||
|
||||
struct _PlugInBlocked
|
||||
{
|
||||
PlugIn *plug_in;
|
||||
|
|
|
|||
|
|
@ -34,6 +34,15 @@
|
|||
#define INDEXEDA_IMAGE 0x20
|
||||
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
RUN_INTERACTIVE = 0x0,
|
||||
RUN_NONINTERACTIVE = 0x1,
|
||||
RUN_WITH_LAST_VALS = 0x2
|
||||
} RunModeType;
|
||||
|
||||
|
||||
typedef struct _PlugIn PlugIn;
|
||||
typedef struct _PlugInDef PlugInDef;
|
||||
typedef struct _PlugInProcDef PlugInProcDef;
|
||||
|
|
|
|||
|
|
@ -68,13 +68,6 @@
|
|||
|
||||
typedef struct _PlugInBlocked PlugInBlocked;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
RUN_INTERACTIVE = 0x0,
|
||||
RUN_NONINTERACTIVE = 0x1,
|
||||
RUN_WITH_LAST_VALS = 0x2
|
||||
} RunModeType;
|
||||
|
||||
struct _PlugInBlocked
|
||||
{
|
||||
PlugIn *plug_in;
|
||||
|
|
|
|||
|
|
@ -34,6 +34,15 @@
|
|||
#define INDEXEDA_IMAGE 0x20
|
||||
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
RUN_INTERACTIVE = 0x0,
|
||||
RUN_NONINTERACTIVE = 0x1,
|
||||
RUN_WITH_LAST_VALS = 0x2
|
||||
} RunModeType;
|
||||
|
||||
|
||||
typedef struct _PlugIn PlugIn;
|
||||
typedef struct _PlugInDef PlugInDef;
|
||||
typedef struct _PlugInProcDef PlugInProcDef;
|
||||
|
|
|
|||
|
|
@ -68,13 +68,6 @@
|
|||
|
||||
typedef struct _PlugInBlocked PlugInBlocked;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
RUN_INTERACTIVE = 0x0,
|
||||
RUN_NONINTERACTIVE = 0x1,
|
||||
RUN_WITH_LAST_VALS = 0x2
|
||||
} RunModeType;
|
||||
|
||||
struct _PlugInBlocked
|
||||
{
|
||||
PlugIn *plug_in;
|
||||
|
|
|
|||
|
|
@ -34,6 +34,15 @@
|
|||
#define INDEXEDA_IMAGE 0x20
|
||||
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
RUN_INTERACTIVE = 0x0,
|
||||
RUN_NONINTERACTIVE = 0x1,
|
||||
RUN_WITH_LAST_VALS = 0x2
|
||||
} RunModeType;
|
||||
|
||||
|
||||
typedef struct _PlugIn PlugIn;
|
||||
typedef struct _PlugInDef PlugInDef;
|
||||
typedef struct _PlugInProcDef PlugInProcDef;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
* Based around original GIF code by David Koblas.
|
||||
*
|
||||
*
|
||||
* Version 2.1.1 - 99/01/23
|
||||
* Version 2.1.2 - 99/02/22
|
||||
* Adam D. Moss - <adam@gimp.org> <adam@foxbox.org>
|
||||
*/
|
||||
/*
|
||||
|
|
@ -23,6 +23,9 @@
|
|||
/*
|
||||
* REVISION HISTORY
|
||||
*
|
||||
* 99/02/22
|
||||
* 2.01.02 - Don't show a progress bar when loading non-interactively
|
||||
*
|
||||
* 99/01/23
|
||||
* 2.01.01 - Use a text-box to permit multi-line comments. Don't
|
||||
* try to write comment blocks which are longer than
|
||||
|
|
@ -270,7 +273,7 @@
|
|||
#define FACEHUGGERS aieee
|
||||
#endif
|
||||
/* PS: I know that technically facehuggers aren't parasites,
|
||||
the pupal-forms are. But facehuggers are cute. */
|
||||
the pupal-forms are. But facehuggers are ky00te. */
|
||||
|
||||
|
||||
typedef struct
|
||||
|
|
@ -301,10 +304,8 @@ static gint save_image (char *filename,
|
|||
gint32 image_ID,
|
||||
gint32 drawable_ID);
|
||||
|
||||
static gboolean
|
||||
boundscheck (gint32 image_ID);
|
||||
static gboolean
|
||||
badbounds_dialog ( void );
|
||||
static gboolean boundscheck (gint32 image_ID);
|
||||
static gboolean badbounds_dialog ( void );
|
||||
|
||||
static void
|
||||
cropok_callback (GtkWidget *widget,
|
||||
|
|
@ -341,6 +342,7 @@ static gint radio_pressed[3];
|
|||
|
||||
static guchar used_cmap[3][256];
|
||||
static gboolean can_crop;
|
||||
static GRunModeType run_mode;
|
||||
static guchar highest_used_index;
|
||||
static gboolean promote_to_rgb = FALSE;
|
||||
static guchar gimp_cmap[768];
|
||||
|
|
@ -446,7 +448,6 @@ run (char *name,
|
|||
{
|
||||
static GParam values[2];
|
||||
GStatusType status = STATUS_SUCCESS;
|
||||
GRunModeType run_mode;
|
||||
gint32 image_ID;
|
||||
gchar **argv;
|
||||
gint argc;
|
||||
|
|
@ -661,9 +662,12 @@ load_image (char *filename)
|
|||
|
||||
name_buf = g_malloc (strlen (filename) + 11);
|
||||
|
||||
sprintf (name_buf, "Loading %s:", filename);
|
||||
gimp_progress_init (name_buf);
|
||||
g_free (name_buf);
|
||||
if (run_mode != RUN_NONINTERACTIVE)
|
||||
{
|
||||
sprintf (name_buf, "Loading %s:", filename);
|
||||
gimp_progress_init (name_buf);
|
||||
g_free (name_buf);
|
||||
}
|
||||
|
||||
if (!ReadOK (fd, buf, 6))
|
||||
{
|
||||
|
|
@ -1382,9 +1386,12 @@ ReadImage (FILE *fd,
|
|||
ypos++;
|
||||
}
|
||||
|
||||
cur_progress++;
|
||||
if ((cur_progress % 16) == 0)
|
||||
gimp_progress_update ((double) cur_progress / (double) max_progress);
|
||||
if (run_mode != RUN_NONINTERACTIVE)
|
||||
{
|
||||
cur_progress++;
|
||||
if ((cur_progress % 16) == 0)
|
||||
gimp_progress_update ((double) cur_progress / (double) max_progress);
|
||||
}
|
||||
}
|
||||
if (ypos >= height)
|
||||
break;
|
||||
|
|
@ -1786,12 +1793,14 @@ save_image (char *filename,
|
|||
break;
|
||||
}
|
||||
|
||||
|
||||
/* init the progress meter */
|
||||
temp_buf = g_malloc (strlen (filename) + 11);
|
||||
sprintf (temp_buf, "Saving %s:", filename);
|
||||
gimp_progress_init (temp_buf);
|
||||
g_free (temp_buf);
|
||||
if (run_mode != RUN_NONINTERACTIVE)
|
||||
{
|
||||
/* init the progress meter */
|
||||
temp_buf = g_malloc (strlen (filename) + 11);
|
||||
sprintf (temp_buf, "Saving %s:", filename);
|
||||
gimp_progress_init (temp_buf);
|
||||
g_free (temp_buf);
|
||||
}
|
||||
|
||||
|
||||
/* open the destination file for writing */
|
||||
|
|
@ -2383,9 +2392,12 @@ BumpPixel ()
|
|||
*/
|
||||
if (curx == Width)
|
||||
{
|
||||
cur_progress++;
|
||||
if ((cur_progress % 16) == 0)
|
||||
gimp_progress_update ((double) cur_progress / (double) max_progress);
|
||||
if (run_mode != RUN_NONINTERACTIVE)
|
||||
{
|
||||
cur_progress++;
|
||||
if ((cur_progress % 16) == 0)
|
||||
gimp_progress_update ((double) cur_progress / (double) max_progress);
|
||||
}
|
||||
|
||||
curx = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ static void run (char *name,
|
|||
GParam *param,
|
||||
int *nreturn_vals,
|
||||
GParam **return_vals);
|
||||
static gint32 load_image (char *filename);
|
||||
static gint32 load_image (char *filename, GRunModeType runmode);
|
||||
static gint save_image (char *filename,
|
||||
gint32 image_ID,
|
||||
gint32 drawable_ID);
|
||||
|
|
@ -220,7 +220,7 @@ run (char *name,
|
|||
|
||||
if (strcmp (name, "file_jpeg_load") == 0)
|
||||
{
|
||||
image_ID = load_image (param[1].data.d_string);
|
||||
image_ID = load_image (param[1].data.d_string, run_mode);
|
||||
|
||||
if (image_ID != -1)
|
||||
{
|
||||
|
|
@ -445,7 +445,7 @@ my_error_exit (j_common_ptr cinfo)
|
|||
}
|
||||
|
||||
static gint32
|
||||
load_image (char *filename)
|
||||
load_image (char *filename, GRunModeType runmode)
|
||||
{
|
||||
GPixelRgn pixel_rgn;
|
||||
GDrawable *drawable;
|
||||
|
|
@ -480,10 +480,13 @@ load_image (char *filename)
|
|||
gimp_quit ();
|
||||
}
|
||||
|
||||
name = malloc (strlen (filename) + 12);
|
||||
sprintf (name, "Loading %s:", filename);
|
||||
gimp_progress_init (name);
|
||||
free (name);
|
||||
if (runmode != RUN_NONINTERACTIVE)
|
||||
{
|
||||
name = malloc (strlen (filename) + 12);
|
||||
sprintf (name, "Loading %s:", filename);
|
||||
gimp_progress_init (name);
|
||||
free (name);
|
||||
}
|
||||
|
||||
image_ID = -1;
|
||||
/* Establish the setjmp return context for my_error_exit to use. */
|
||||
|
|
@ -668,7 +671,10 @@ load_image (char *filename)
|
|||
|
||||
gimp_pixel_rgn_set_rect (&pixel_rgn, buf, 0, start, drawable->width, scanlines);
|
||||
|
||||
gimp_progress_update ((double) cinfo.output_scanline / (double) cinfo.output_height);
|
||||
if (runmode != RUN_NONINTERACTIVE)
|
||||
{
|
||||
gimp_progress_update ((double) cinfo.output_scanline / (double) cinfo.output_height);
|
||||
}
|
||||
}
|
||||
|
||||
/* Step 7: Finish decompression */
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
* Based around original GIF code by David Koblas.
|
||||
*
|
||||
*
|
||||
* Version 2.1.1 - 99/01/23
|
||||
* Version 2.1.2 - 99/02/22
|
||||
* Adam D. Moss - <adam@gimp.org> <adam@foxbox.org>
|
||||
*/
|
||||
/*
|
||||
|
|
@ -23,6 +23,9 @@
|
|||
/*
|
||||
* REVISION HISTORY
|
||||
*
|
||||
* 99/02/22
|
||||
* 2.01.02 - Don't show a progress bar when loading non-interactively
|
||||
*
|
||||
* 99/01/23
|
||||
* 2.01.01 - Use a text-box to permit multi-line comments. Don't
|
||||
* try to write comment blocks which are longer than
|
||||
|
|
@ -270,7 +273,7 @@
|
|||
#define FACEHUGGERS aieee
|
||||
#endif
|
||||
/* PS: I know that technically facehuggers aren't parasites,
|
||||
the pupal-forms are. But facehuggers are cute. */
|
||||
the pupal-forms are. But facehuggers are ky00te. */
|
||||
|
||||
|
||||
typedef struct
|
||||
|
|
@ -301,10 +304,8 @@ static gint save_image (char *filename,
|
|||
gint32 image_ID,
|
||||
gint32 drawable_ID);
|
||||
|
||||
static gboolean
|
||||
boundscheck (gint32 image_ID);
|
||||
static gboolean
|
||||
badbounds_dialog ( void );
|
||||
static gboolean boundscheck (gint32 image_ID);
|
||||
static gboolean badbounds_dialog ( void );
|
||||
|
||||
static void
|
||||
cropok_callback (GtkWidget *widget,
|
||||
|
|
@ -341,6 +342,7 @@ static gint radio_pressed[3];
|
|||
|
||||
static guchar used_cmap[3][256];
|
||||
static gboolean can_crop;
|
||||
static GRunModeType run_mode;
|
||||
static guchar highest_used_index;
|
||||
static gboolean promote_to_rgb = FALSE;
|
||||
static guchar gimp_cmap[768];
|
||||
|
|
@ -446,7 +448,6 @@ run (char *name,
|
|||
{
|
||||
static GParam values[2];
|
||||
GStatusType status = STATUS_SUCCESS;
|
||||
GRunModeType run_mode;
|
||||
gint32 image_ID;
|
||||
gchar **argv;
|
||||
gint argc;
|
||||
|
|
@ -661,9 +662,12 @@ load_image (char *filename)
|
|||
|
||||
name_buf = g_malloc (strlen (filename) + 11);
|
||||
|
||||
sprintf (name_buf, "Loading %s:", filename);
|
||||
gimp_progress_init (name_buf);
|
||||
g_free (name_buf);
|
||||
if (run_mode != RUN_NONINTERACTIVE)
|
||||
{
|
||||
sprintf (name_buf, "Loading %s:", filename);
|
||||
gimp_progress_init (name_buf);
|
||||
g_free (name_buf);
|
||||
}
|
||||
|
||||
if (!ReadOK (fd, buf, 6))
|
||||
{
|
||||
|
|
@ -1382,9 +1386,12 @@ ReadImage (FILE *fd,
|
|||
ypos++;
|
||||
}
|
||||
|
||||
cur_progress++;
|
||||
if ((cur_progress % 16) == 0)
|
||||
gimp_progress_update ((double) cur_progress / (double) max_progress);
|
||||
if (run_mode != RUN_NONINTERACTIVE)
|
||||
{
|
||||
cur_progress++;
|
||||
if ((cur_progress % 16) == 0)
|
||||
gimp_progress_update ((double) cur_progress / (double) max_progress);
|
||||
}
|
||||
}
|
||||
if (ypos >= height)
|
||||
break;
|
||||
|
|
@ -1786,12 +1793,14 @@ save_image (char *filename,
|
|||
break;
|
||||
}
|
||||
|
||||
|
||||
/* init the progress meter */
|
||||
temp_buf = g_malloc (strlen (filename) + 11);
|
||||
sprintf (temp_buf, "Saving %s:", filename);
|
||||
gimp_progress_init (temp_buf);
|
||||
g_free (temp_buf);
|
||||
if (run_mode != RUN_NONINTERACTIVE)
|
||||
{
|
||||
/* init the progress meter */
|
||||
temp_buf = g_malloc (strlen (filename) + 11);
|
||||
sprintf (temp_buf, "Saving %s:", filename);
|
||||
gimp_progress_init (temp_buf);
|
||||
g_free (temp_buf);
|
||||
}
|
||||
|
||||
|
||||
/* open the destination file for writing */
|
||||
|
|
@ -2383,9 +2392,12 @@ BumpPixel ()
|
|||
*/
|
||||
if (curx == Width)
|
||||
{
|
||||
cur_progress++;
|
||||
if ((cur_progress % 16) == 0)
|
||||
gimp_progress_update ((double) cur_progress / (double) max_progress);
|
||||
if (run_mode != RUN_NONINTERACTIVE)
|
||||
{
|
||||
cur_progress++;
|
||||
if ((cur_progress % 16) == 0)
|
||||
gimp_progress_update ((double) cur_progress / (double) max_progress);
|
||||
}
|
||||
|
||||
curx = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ static void run (char *name,
|
|||
GParam *param,
|
||||
int *nreturn_vals,
|
||||
GParam **return_vals);
|
||||
static gint32 load_image (char *filename);
|
||||
static gint32 load_image (char *filename, GRunModeType runmode);
|
||||
static gint save_image (char *filename,
|
||||
gint32 image_ID,
|
||||
gint32 drawable_ID);
|
||||
|
|
@ -220,7 +220,7 @@ run (char *name,
|
|||
|
||||
if (strcmp (name, "file_jpeg_load") == 0)
|
||||
{
|
||||
image_ID = load_image (param[1].data.d_string);
|
||||
image_ID = load_image (param[1].data.d_string, run_mode);
|
||||
|
||||
if (image_ID != -1)
|
||||
{
|
||||
|
|
@ -445,7 +445,7 @@ my_error_exit (j_common_ptr cinfo)
|
|||
}
|
||||
|
||||
static gint32
|
||||
load_image (char *filename)
|
||||
load_image (char *filename, GRunModeType runmode)
|
||||
{
|
||||
GPixelRgn pixel_rgn;
|
||||
GDrawable *drawable;
|
||||
|
|
@ -480,10 +480,13 @@ load_image (char *filename)
|
|||
gimp_quit ();
|
||||
}
|
||||
|
||||
name = malloc (strlen (filename) + 12);
|
||||
sprintf (name, "Loading %s:", filename);
|
||||
gimp_progress_init (name);
|
||||
free (name);
|
||||
if (runmode != RUN_NONINTERACTIVE)
|
||||
{
|
||||
name = malloc (strlen (filename) + 12);
|
||||
sprintf (name, "Loading %s:", filename);
|
||||
gimp_progress_init (name);
|
||||
free (name);
|
||||
}
|
||||
|
||||
image_ID = -1;
|
||||
/* Establish the setjmp return context for my_error_exit to use. */
|
||||
|
|
@ -668,7 +671,10 @@ load_image (char *filename)
|
|||
|
||||
gimp_pixel_rgn_set_rect (&pixel_rgn, buf, 0, start, drawable->width, scanlines);
|
||||
|
||||
gimp_progress_update ((double) cinfo.output_scanline / (double) cinfo.output_height);
|
||||
if (runmode != RUN_NONINTERACTIVE)
|
||||
{
|
||||
gimp_progress_update ((double) cinfo.output_scanline / (double) cinfo.output_height);
|
||||
}
|
||||
}
|
||||
|
||||
/* Step 7: Finish decompression */
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ static void run (char *name,
|
|||
GParam *param,
|
||||
int *nreturn_vals,
|
||||
GParam **return_vals);
|
||||
static gint32 load_image (char *filename);
|
||||
static gint32 load_image (char *filename, GRunModeType runmode);
|
||||
static gint save_image (char *filename,
|
||||
gint32 image_ID,
|
||||
gint32 drawable_ID);
|
||||
|
|
@ -220,7 +220,7 @@ run (char *name,
|
|||
|
||||
if (strcmp (name, "file_jpeg_load") == 0)
|
||||
{
|
||||
image_ID = load_image (param[1].data.d_string);
|
||||
image_ID = load_image (param[1].data.d_string, run_mode);
|
||||
|
||||
if (image_ID != -1)
|
||||
{
|
||||
|
|
@ -445,7 +445,7 @@ my_error_exit (j_common_ptr cinfo)
|
|||
}
|
||||
|
||||
static gint32
|
||||
load_image (char *filename)
|
||||
load_image (char *filename, GRunModeType runmode)
|
||||
{
|
||||
GPixelRgn pixel_rgn;
|
||||
GDrawable *drawable;
|
||||
|
|
@ -480,10 +480,13 @@ load_image (char *filename)
|
|||
gimp_quit ();
|
||||
}
|
||||
|
||||
name = malloc (strlen (filename) + 12);
|
||||
sprintf (name, "Loading %s:", filename);
|
||||
gimp_progress_init (name);
|
||||
free (name);
|
||||
if (runmode != RUN_NONINTERACTIVE)
|
||||
{
|
||||
name = malloc (strlen (filename) + 12);
|
||||
sprintf (name, "Loading %s:", filename);
|
||||
gimp_progress_init (name);
|
||||
free (name);
|
||||
}
|
||||
|
||||
image_ID = -1;
|
||||
/* Establish the setjmp return context for my_error_exit to use. */
|
||||
|
|
@ -668,7 +671,10 @@ load_image (char *filename)
|
|||
|
||||
gimp_pixel_rgn_set_rect (&pixel_rgn, buf, 0, start, drawable->width, scanlines);
|
||||
|
||||
gimp_progress_update ((double) cinfo.output_scanline / (double) cinfo.output_height);
|
||||
if (runmode != RUN_NONINTERACTIVE)
|
||||
{
|
||||
gimp_progress_update ((double) cinfo.output_scanline / (double) cinfo.output_height);
|
||||
}
|
||||
}
|
||||
|
||||
/* Step 7: Finish decompression */
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ static void run (char *name,
|
|||
GParam *param,
|
||||
int *nreturn_vals,
|
||||
GParam **return_vals);
|
||||
static gint32 load_image (char *filename);
|
||||
static gint32 load_image (char *filename, GRunModeType runmode);
|
||||
static gint save_image (char *filename,
|
||||
gint32 image_ID,
|
||||
gint32 drawable_ID);
|
||||
|
|
@ -220,7 +220,7 @@ run (char *name,
|
|||
|
||||
if (strcmp (name, "file_jpeg_load") == 0)
|
||||
{
|
||||
image_ID = load_image (param[1].data.d_string);
|
||||
image_ID = load_image (param[1].data.d_string, run_mode);
|
||||
|
||||
if (image_ID != -1)
|
||||
{
|
||||
|
|
@ -445,7 +445,7 @@ my_error_exit (j_common_ptr cinfo)
|
|||
}
|
||||
|
||||
static gint32
|
||||
load_image (char *filename)
|
||||
load_image (char *filename, GRunModeType runmode)
|
||||
{
|
||||
GPixelRgn pixel_rgn;
|
||||
GDrawable *drawable;
|
||||
|
|
@ -480,10 +480,13 @@ load_image (char *filename)
|
|||
gimp_quit ();
|
||||
}
|
||||
|
||||
name = malloc (strlen (filename) + 12);
|
||||
sprintf (name, "Loading %s:", filename);
|
||||
gimp_progress_init (name);
|
||||
free (name);
|
||||
if (runmode != RUN_NONINTERACTIVE)
|
||||
{
|
||||
name = malloc (strlen (filename) + 12);
|
||||
sprintf (name, "Loading %s:", filename);
|
||||
gimp_progress_init (name);
|
||||
free (name);
|
||||
}
|
||||
|
||||
image_ID = -1;
|
||||
/* Establish the setjmp return context for my_error_exit to use. */
|
||||
|
|
@ -668,7 +671,10 @@ load_image (char *filename)
|
|||
|
||||
gimp_pixel_rgn_set_rect (&pixel_rgn, buf, 0, start, drawable->width, scanlines);
|
||||
|
||||
gimp_progress_update ((double) cinfo.output_scanline / (double) cinfo.output_height);
|
||||
if (runmode != RUN_NONINTERACTIVE)
|
||||
{
|
||||
gimp_progress_update ((double) cinfo.output_scanline / (double) cinfo.output_height);
|
||||
}
|
||||
}
|
||||
|
||||
/* Step 7: Finish decompression */
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ static void run (char *name,
|
|||
GParam *param,
|
||||
int *nreturn_vals,
|
||||
GParam **return_vals);
|
||||
static gint32 load_image (char *filename);
|
||||
static gint32 load_image (char *filename, GRunModeType runmode);
|
||||
static gint save_image (char *filename,
|
||||
gint32 image_ID,
|
||||
gint32 drawable_ID);
|
||||
|
|
@ -220,7 +220,7 @@ run (char *name,
|
|||
|
||||
if (strcmp (name, "file_jpeg_load") == 0)
|
||||
{
|
||||
image_ID = load_image (param[1].data.d_string);
|
||||
image_ID = load_image (param[1].data.d_string, run_mode);
|
||||
|
||||
if (image_ID != -1)
|
||||
{
|
||||
|
|
@ -445,7 +445,7 @@ my_error_exit (j_common_ptr cinfo)
|
|||
}
|
||||
|
||||
static gint32
|
||||
load_image (char *filename)
|
||||
load_image (char *filename, GRunModeType runmode)
|
||||
{
|
||||
GPixelRgn pixel_rgn;
|
||||
GDrawable *drawable;
|
||||
|
|
@ -480,10 +480,13 @@ load_image (char *filename)
|
|||
gimp_quit ();
|
||||
}
|
||||
|
||||
name = malloc (strlen (filename) + 12);
|
||||
sprintf (name, "Loading %s:", filename);
|
||||
gimp_progress_init (name);
|
||||
free (name);
|
||||
if (runmode != RUN_NONINTERACTIVE)
|
||||
{
|
||||
name = malloc (strlen (filename) + 12);
|
||||
sprintf (name, "Loading %s:", filename);
|
||||
gimp_progress_init (name);
|
||||
free (name);
|
||||
}
|
||||
|
||||
image_ID = -1;
|
||||
/* Establish the setjmp return context for my_error_exit to use. */
|
||||
|
|
@ -668,7 +671,10 @@ load_image (char *filename)
|
|||
|
||||
gimp_pixel_rgn_set_rect (&pixel_rgn, buf, 0, start, drawable->width, scanlines);
|
||||
|
||||
gimp_progress_update ((double) cinfo.output_scanline / (double) cinfo.output_height);
|
||||
if (runmode != RUN_NONINTERACTIVE)
|
||||
{
|
||||
gimp_progress_update ((double) cinfo.output_scanline / (double) cinfo.output_height);
|
||||
}
|
||||
}
|
||||
|
||||
/* Step 7: Finish decompression */
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ static void run (char *name,
|
|||
GParam *param,
|
||||
int *nreturn_vals,
|
||||
GParam **return_vals);
|
||||
static gint32 load_image (char *filename);
|
||||
static gint32 load_image (char *filename, GRunModeType runmode);
|
||||
static gint save_image (char *filename,
|
||||
gint32 image_ID,
|
||||
gint32 drawable_ID);
|
||||
|
|
@ -220,7 +220,7 @@ run (char *name,
|
|||
|
||||
if (strcmp (name, "file_jpeg_load") == 0)
|
||||
{
|
||||
image_ID = load_image (param[1].data.d_string);
|
||||
image_ID = load_image (param[1].data.d_string, run_mode);
|
||||
|
||||
if (image_ID != -1)
|
||||
{
|
||||
|
|
@ -445,7 +445,7 @@ my_error_exit (j_common_ptr cinfo)
|
|||
}
|
||||
|
||||
static gint32
|
||||
load_image (char *filename)
|
||||
load_image (char *filename, GRunModeType runmode)
|
||||
{
|
||||
GPixelRgn pixel_rgn;
|
||||
GDrawable *drawable;
|
||||
|
|
@ -480,10 +480,13 @@ load_image (char *filename)
|
|||
gimp_quit ();
|
||||
}
|
||||
|
||||
name = malloc (strlen (filename) + 12);
|
||||
sprintf (name, "Loading %s:", filename);
|
||||
gimp_progress_init (name);
|
||||
free (name);
|
||||
if (runmode != RUN_NONINTERACTIVE)
|
||||
{
|
||||
name = malloc (strlen (filename) + 12);
|
||||
sprintf (name, "Loading %s:", filename);
|
||||
gimp_progress_init (name);
|
||||
free (name);
|
||||
}
|
||||
|
||||
image_ID = -1;
|
||||
/* Establish the setjmp return context for my_error_exit to use. */
|
||||
|
|
@ -668,7 +671,10 @@ load_image (char *filename)
|
|||
|
||||
gimp_pixel_rgn_set_rect (&pixel_rgn, buf, 0, start, drawable->width, scanlines);
|
||||
|
||||
gimp_progress_update ((double) cinfo.output_scanline / (double) cinfo.output_height);
|
||||
if (runmode != RUN_NONINTERACTIVE)
|
||||
{
|
||||
gimp_progress_update ((double) cinfo.output_scanline / (double) cinfo.output_height);
|
||||
}
|
||||
}
|
||||
|
||||
/* Step 7: Finish decompression */
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ static void run (char *name,
|
|||
GParam *param,
|
||||
int *nreturn_vals,
|
||||
GParam **return_vals);
|
||||
static gint32 load_image (char *filename);
|
||||
static gint32 load_image (char *filename, GRunModeType runmode);
|
||||
static gint save_image (char *filename,
|
||||
gint32 image_ID,
|
||||
gint32 drawable_ID);
|
||||
|
|
@ -220,7 +220,7 @@ run (char *name,
|
|||
|
||||
if (strcmp (name, "file_jpeg_load") == 0)
|
||||
{
|
||||
image_ID = load_image (param[1].data.d_string);
|
||||
image_ID = load_image (param[1].data.d_string, run_mode);
|
||||
|
||||
if (image_ID != -1)
|
||||
{
|
||||
|
|
@ -445,7 +445,7 @@ my_error_exit (j_common_ptr cinfo)
|
|||
}
|
||||
|
||||
static gint32
|
||||
load_image (char *filename)
|
||||
load_image (char *filename, GRunModeType runmode)
|
||||
{
|
||||
GPixelRgn pixel_rgn;
|
||||
GDrawable *drawable;
|
||||
|
|
@ -480,10 +480,13 @@ load_image (char *filename)
|
|||
gimp_quit ();
|
||||
}
|
||||
|
||||
name = malloc (strlen (filename) + 12);
|
||||
sprintf (name, "Loading %s:", filename);
|
||||
gimp_progress_init (name);
|
||||
free (name);
|
||||
if (runmode != RUN_NONINTERACTIVE)
|
||||
{
|
||||
name = malloc (strlen (filename) + 12);
|
||||
sprintf (name, "Loading %s:", filename);
|
||||
gimp_progress_init (name);
|
||||
free (name);
|
||||
}
|
||||
|
||||
image_ID = -1;
|
||||
/* Establish the setjmp return context for my_error_exit to use. */
|
||||
|
|
@ -668,7 +671,10 @@ load_image (char *filename)
|
|||
|
||||
gimp_pixel_rgn_set_rect (&pixel_rgn, buf, 0, start, drawable->width, scanlines);
|
||||
|
||||
gimp_progress_update ((double) cinfo.output_scanline / (double) cinfo.output_height);
|
||||
if (runmode != RUN_NONINTERACTIVE)
|
||||
{
|
||||
gimp_progress_update ((double) cinfo.output_scanline / (double) cinfo.output_height);
|
||||
}
|
||||
}
|
||||
|
||||
/* Step 7: Finish decompression */
|
||||
|
|
|
|||
Loading…
Reference in a new issue