mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-04 09:53:25 +00:00
accept an empty string.
2005-02-13 Sven Neumann <sven@gimp.org> * app/core/gimpprogress.c (gimp_progress_start): accept an empty string. * app/plug-in/plug-in-progress.c: if NULL is passed as message to plug_in_progress_start(), set an empty string on the progress. * tools/pdbgen/pdb/progress.pdb: * libgimp/gimpprogress.[ch]: wrap the new gimp_progress_set_text() PDP function with a function that accepts printf-like arguments. * libgimp/gimpprogress_pdb.[ch]: regenerated. * lots of plug-ins, most of them file plug-ins: use gimp_progress_init(NULL) followed by gimp_progress_set_text() to initialize the progress using the new API instead of constructing a temporary string.
This commit is contained in:
parent
08bd204c0e
commit
4cf9d0e429
43 changed files with 229 additions and 278 deletions
19
ChangeLog
19
ChangeLog
|
@ -1,3 +1,22 @@
|
||||||
|
2005-02-13 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
|
* app/core/gimpprogress.c (gimp_progress_start): accept an empty
|
||||||
|
string.
|
||||||
|
|
||||||
|
* app/plug-in/plug-in-progress.c: if NULL is passed as message to
|
||||||
|
plug_in_progress_start(), set an empty string on the progress.
|
||||||
|
|
||||||
|
* tools/pdbgen/pdb/progress.pdb:
|
||||||
|
* libgimp/gimpprogress.[ch]: wrap the new gimp_progress_set_text()
|
||||||
|
PDP function with a function that accepts printf-like arguments.
|
||||||
|
|
||||||
|
* libgimp/gimpprogress_pdb.[ch]: regenerated.
|
||||||
|
|
||||||
|
* lots of plug-ins, most of them file plug-ins:
|
||||||
|
use gimp_progress_init(NULL) followed by gimp_progress_set_text()
|
||||||
|
to initialize the progress using the new API instead of constructing
|
||||||
|
a temporary string.
|
||||||
|
|
||||||
2005-02-12 Michael Natterer <mitch@gimp.org>
|
2005-02-12 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
* app/dialogs/file-save-dialog.c (file_save_dialog_response): use
|
* app/dialogs/file-save-dialog.c (file_save_dialog_response): use
|
||||||
|
|
|
@ -103,7 +103,7 @@ gimp_progress_start (GimpProgress *progress,
|
||||||
|
|
||||||
g_return_val_if_fail (GIMP_IS_PROGRESS (progress), NULL);
|
g_return_val_if_fail (GIMP_IS_PROGRESS (progress), NULL);
|
||||||
|
|
||||||
if (! message || ! strlen (message))
|
if (! message)
|
||||||
message = _("Please wait...");
|
message = _("Please wait...");
|
||||||
|
|
||||||
progress_iface = GIMP_PROGRESS_GET_INTERFACE (progress);
|
progress_iface = GIMP_PROGRESS_GET_INTERFACE (progress);
|
||||||
|
|
|
@ -53,9 +53,6 @@ plug_in_progress_start (PlugIn *plug_in,
|
||||||
|
|
||||||
proc_frame = plug_in_get_proc_frame (plug_in);
|
proc_frame = plug_in_get_proc_frame (plug_in);
|
||||||
|
|
||||||
if (! message)
|
|
||||||
message = plug_in->prog;
|
|
||||||
|
|
||||||
if (! proc_frame->progress)
|
if (! proc_frame->progress)
|
||||||
{
|
{
|
||||||
proc_frame->progress = gimp_new_progress (plug_in->gimp, display_ID);
|
proc_frame->progress = gimp_new_progress (plug_in->gimp, display_ID);
|
||||||
|
@ -78,6 +75,7 @@ plug_in_progress_start (PlugIn *plug_in,
|
||||||
|
|
||||||
if (gimp_progress_is_active (proc_frame->progress))
|
if (gimp_progress_is_active (proc_frame->progress))
|
||||||
{
|
{
|
||||||
|
if (message)
|
||||||
gimp_progress_set_text (proc_frame->progress, message);
|
gimp_progress_set_text (proc_frame->progress, message);
|
||||||
|
|
||||||
if (gimp_progress_get_value (proc_frame->progress) > 0.0)
|
if (gimp_progress_get_value (proc_frame->progress) > 0.0)
|
||||||
|
@ -85,7 +83,9 @@ plug_in_progress_start (PlugIn *plug_in,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gimp_progress_start (proc_frame->progress, message, TRUE);
|
gimp_progress_start (proc_frame->progress,
|
||||||
|
message ? message : "",
|
||||||
|
TRUE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,9 +53,6 @@ plug_in_progress_start (PlugIn *plug_in,
|
||||||
|
|
||||||
proc_frame = plug_in_get_proc_frame (plug_in);
|
proc_frame = plug_in_get_proc_frame (plug_in);
|
||||||
|
|
||||||
if (! message)
|
|
||||||
message = plug_in->prog;
|
|
||||||
|
|
||||||
if (! proc_frame->progress)
|
if (! proc_frame->progress)
|
||||||
{
|
{
|
||||||
proc_frame->progress = gimp_new_progress (plug_in->gimp, display_ID);
|
proc_frame->progress = gimp_new_progress (plug_in->gimp, display_ID);
|
||||||
|
@ -78,6 +75,7 @@ plug_in_progress_start (PlugIn *plug_in,
|
||||||
|
|
||||||
if (gimp_progress_is_active (proc_frame->progress))
|
if (gimp_progress_is_active (proc_frame->progress))
|
||||||
{
|
{
|
||||||
|
if (message)
|
||||||
gimp_progress_set_text (proc_frame->progress, message);
|
gimp_progress_set_text (proc_frame->progress, message);
|
||||||
|
|
||||||
if (gimp_progress_get_value (proc_frame->progress) > 0.0)
|
if (gimp_progress_get_value (proc_frame->progress) > 0.0)
|
||||||
|
@ -85,7 +83,9 @@ plug_in_progress_start (PlugIn *plug_in,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gimp_progress_start (proc_frame->progress, message, TRUE);
|
gimp_progress_start (proc_frame->progress,
|
||||||
|
message ? message : "",
|
||||||
|
TRUE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,7 +81,8 @@ Functions for embedding the progress bar into a plug-in's GUI.
|
||||||
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@message:
|
@format:
|
||||||
|
@Varargs:
|
||||||
@Returns:
|
@Returns:
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -178,6 +178,42 @@ gimp_progress_uninstall (const gchar *progress_callback)
|
||||||
return user_data;
|
return user_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gimp_progress_set_text:
|
||||||
|
* @format: a standard printf() format string
|
||||||
|
* @Varargs: arguments for @format
|
||||||
|
*
|
||||||
|
* Changes the text in the progress bar for the current plug-in.
|
||||||
|
*
|
||||||
|
* This function allows to change the text in the progress bar for the
|
||||||
|
* current plug-in. Unlike gimp_progress_init() it does not change the
|
||||||
|
* displayed value.
|
||||||
|
*
|
||||||
|
* Returns: %TRUE on success.
|
||||||
|
*
|
||||||
|
* Since: GIMP 2.4
|
||||||
|
**/
|
||||||
|
void
|
||||||
|
gimp_progress_set_text (const gchar *format,
|
||||||
|
...)
|
||||||
|
{
|
||||||
|
gchar *text;
|
||||||
|
gboolean retval;
|
||||||
|
va_list args;
|
||||||
|
|
||||||
|
g_return_if_fail (format != NULL);
|
||||||
|
|
||||||
|
va_start (args, format);
|
||||||
|
text = g_strdup_vprintf (format, args);
|
||||||
|
va_end (args);
|
||||||
|
|
||||||
|
retval = _gimp_progress_set_text (text);
|
||||||
|
|
||||||
|
g_free (text);
|
||||||
|
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* private functions */
|
/* private functions */
|
||||||
|
|
||||||
|
|
|
@ -42,6 +42,9 @@ const gchar * gimp_progress_install (GimpProgressStartCallback start_callback,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
gpointer gimp_progress_uninstall (const gchar *progress_callback);
|
gpointer gimp_progress_uninstall (const gchar *progress_callback);
|
||||||
|
|
||||||
|
void gimp_progress_set_text (const gchar *format,
|
||||||
|
...) G_GNUC_PRINTF (1, 2);
|
||||||
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
|
|
@ -121,7 +121,7 @@ gimp_progress_pulse (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gimp_progress_set_text:
|
* _gimp_progress_set_text:
|
||||||
* @message: Message to use in the progress dialog.
|
* @message: Message to use in the progress dialog.
|
||||||
*
|
*
|
||||||
* Changes the text in the progress bar for the current plug-in.
|
* Changes the text in the progress bar for the current plug-in.
|
||||||
|
@ -135,7 +135,7 @@ gimp_progress_pulse (void)
|
||||||
* Since: GIMP 2.4
|
* Since: GIMP 2.4
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
gimp_progress_set_text (const gchar *message)
|
_gimp_progress_set_text (const gchar *message)
|
||||||
{
|
{
|
||||||
GimpParam *return_vals;
|
GimpParam *return_vals;
|
||||||
gint nreturn_vals;
|
gint nreturn_vals;
|
||||||
|
|
|
@ -32,7 +32,7 @@ G_BEGIN_DECLS
|
||||||
gboolean gimp_progress_init (const gchar *message);
|
gboolean gimp_progress_init (const gchar *message);
|
||||||
gboolean gimp_progress_update (gdouble percentage);
|
gboolean gimp_progress_update (gdouble percentage);
|
||||||
gboolean gimp_progress_pulse (void);
|
gboolean gimp_progress_pulse (void);
|
||||||
gboolean gimp_progress_set_text (const gchar *message);
|
gboolean _gimp_progress_set_text (const gchar *message);
|
||||||
gboolean _gimp_progress_install (const gchar *progress_callback);
|
gboolean _gimp_progress_install (const gchar *progress_callback);
|
||||||
gboolean _gimp_progress_uninstall (const gchar *progress_callback);
|
gboolean _gimp_progress_uninstall (const gchar *progress_callback);
|
||||||
gboolean gimp_progress_cancel (const gchar *progress_callback);
|
gboolean gimp_progress_cancel (const gchar *progress_callback);
|
||||||
|
|
|
@ -136,7 +136,6 @@ gint32
|
||||||
ReadBMP (const gchar *name)
|
ReadBMP (const gchar *name)
|
||||||
{
|
{
|
||||||
FILE *fd;
|
FILE *fd;
|
||||||
gchar *temp_buf;
|
|
||||||
guchar buffer[64];
|
guchar buffer[64];
|
||||||
gint ColormapSize, rowbytes, Maps;
|
gint ColormapSize, rowbytes, Maps;
|
||||||
gboolean Grey;
|
gboolean Grey;
|
||||||
|
@ -155,10 +154,9 @@ ReadBMP (const gchar *name)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
temp_buf = g_strdup_printf (_("Opening '%s'..."),
|
gimp_progress_init (NULL);
|
||||||
|
gimp_progress_set_text (_("Opening '%s'..."),
|
||||||
gimp_filename_to_utf8 (name));
|
gimp_filename_to_utf8 (name));
|
||||||
gimp_progress_init (temp_buf);
|
|
||||||
g_free (temp_buf);
|
|
||||||
|
|
||||||
/* It is a File. Now is it a Bitmap? Read the shortest possible header */
|
/* It is a File. Now is it a Bitmap? Read the shortest possible header */
|
||||||
|
|
||||||
|
|
|
@ -306,7 +306,6 @@ run (const gchar *name,
|
||||||
static gint32
|
static gint32
|
||||||
load_image (const gchar *filename)
|
load_image (const gchar *filename)
|
||||||
{
|
{
|
||||||
gchar *temp;
|
|
||||||
gchar *name;
|
gchar *name;
|
||||||
gint fd;
|
gint fd;
|
||||||
BrushHeader bh;
|
BrushHeader bh;
|
||||||
|
@ -329,10 +328,9 @@ load_image (const gchar *filename)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
temp = g_strdup_printf (_("Opening '%s'..."),
|
gimp_progress_init (NULL);
|
||||||
|
gimp_progress_set_text (_("Opening '%s'..."),
|
||||||
gimp_filename_to_utf8 (filename));
|
gimp_filename_to_utf8 (filename));
|
||||||
gimp_progress_init (temp);
|
|
||||||
g_free (temp);
|
|
||||||
|
|
||||||
if (read (fd, &bh, sizeof (BrushHeader)) != sizeof (BrushHeader))
|
if (read (fd, &bh, sizeof (BrushHeader)) != sizeof (BrushHeader))
|
||||||
{
|
{
|
||||||
|
@ -385,7 +383,7 @@ load_image (const gchar *filename)
|
||||||
|
|
||||||
if ((bn_size = (bh.header_size - sizeof (BrushHeader))) > 0)
|
if ((bn_size = (bh.header_size - sizeof (BrushHeader))) > 0)
|
||||||
{
|
{
|
||||||
temp = g_new (gchar, bn_size);
|
gchar *temp = g_new (gchar, bn_size);
|
||||||
|
|
||||||
if ((read (fd, temp, bn_size)) < bn_size)
|
if ((read (fd, temp, bn_size)) < bn_size)
|
||||||
{
|
{
|
||||||
|
@ -570,7 +568,6 @@ save_image (const gchar *filename,
|
||||||
gint line;
|
gint line;
|
||||||
gint x;
|
gint x;
|
||||||
GimpPixelRgn pixel_rgn;
|
GimpPixelRgn pixel_rgn;
|
||||||
gchar *temp;
|
|
||||||
|
|
||||||
if (gimp_drawable_type (drawable_ID) != GIMP_GRAY_IMAGE &&
|
if (gimp_drawable_type (drawable_ID) != GIMP_GRAY_IMAGE &&
|
||||||
gimp_drawable_type (drawable_ID) != GIMP_RGBA_IMAGE)
|
gimp_drawable_type (drawable_ID) != GIMP_RGBA_IMAGE)
|
||||||
|
@ -588,10 +585,9 @@ save_image (const gchar *filename,
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
temp = g_strdup_printf (_("Saving '%s'..."),
|
gimp_progress_init (NULL);
|
||||||
|
gimp_progress_set_text (_("Saving '%s'..."),
|
||||||
gimp_filename_to_utf8 (filename));
|
gimp_filename_to_utf8 (filename));
|
||||||
gimp_progress_init (temp);
|
|
||||||
g_free (temp);
|
|
||||||
|
|
||||||
drawable = gimp_drawable_get (drawable_ID);
|
drawable = gimp_drawable_get (drawable_ID);
|
||||||
|
|
||||||
|
|
|
@ -630,7 +630,6 @@ gih_load_one_brush (gint fd,
|
||||||
static gint32
|
static gint32
|
||||||
gih_load_image (const gchar *filename)
|
gih_load_image (const gchar *filename)
|
||||||
{
|
{
|
||||||
gchar *temp;
|
|
||||||
gint fd;
|
gint fd;
|
||||||
gint i;
|
gint i;
|
||||||
gint32 image_ID;
|
gint32 image_ID;
|
||||||
|
@ -650,10 +649,9 @@ gih_load_image (const gchar *filename)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
temp = g_strdup_printf (_("Opening '%s'..."),
|
gimp_progress_init (NULL);
|
||||||
|
gimp_progress_set_text (_("Opening '%s'..."),
|
||||||
gimp_filename_to_utf8 (filename));
|
gimp_filename_to_utf8 (filename));
|
||||||
gimp_progress_init (temp);
|
|
||||||
g_free (temp);
|
|
||||||
|
|
||||||
/* The file format starts with a painfully simple text header */
|
/* The file format starts with a painfully simple text header */
|
||||||
|
|
||||||
|
|
|
@ -213,7 +213,6 @@ save_image (const gchar *filename,
|
||||||
guchar *buffer, *buf2;
|
guchar *buffer, *buf2;
|
||||||
gchar *width, *height;
|
gchar *width, *height;
|
||||||
GimpPixelRgn pixel_rgn;
|
GimpPixelRgn pixel_rgn;
|
||||||
gchar *name;
|
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
|
|
||||||
palloc = g_new (int, drawable->width * drawable->height);
|
palloc = g_new (int, drawable->width * drawable->height);
|
||||||
|
@ -242,10 +241,9 @@ save_image (const gchar *filename,
|
||||||
fprintf (fp, "<CAPTION>%s</CAPTION>\n",
|
fprintf (fp, "<CAPTION>%s</CAPTION>\n",
|
||||||
gtmvals.captiontxt);
|
gtmvals.captiontxt);
|
||||||
|
|
||||||
name = g_strdup_printf (_("Saving '%s'..."),
|
gimp_progress_init (NULL);
|
||||||
|
gimp_progress_set_text (_("Saving '%s'..."),
|
||||||
gimp_filename_to_utf8 (filename));
|
gimp_filename_to_utf8 (filename));
|
||||||
gimp_progress_init (name);
|
|
||||||
g_free (name);
|
|
||||||
|
|
||||||
gimp_pixel_rgn_init (&pixel_rgn, drawable,
|
gimp_pixel_rgn_init (&pixel_rgn, drawable,
|
||||||
0, 0, drawable->width, drawable->height,
|
0, 0, drawable->width, drawable->height,
|
||||||
|
|
|
@ -753,7 +753,6 @@ iwarp (void)
|
||||||
gint i;
|
gint i;
|
||||||
gint32 layerID;
|
gint32 layerID;
|
||||||
gint32 *animlayers;
|
gint32 *animlayers;
|
||||||
gchar *st;
|
|
||||||
gdouble delta;
|
gdouble delta;
|
||||||
|
|
||||||
if (image_bpp == 1 || image_bpp == 3)
|
if (image_bpp == 1 || image_bpp == 3)
|
||||||
|
@ -780,7 +779,8 @@ iwarp (void)
|
||||||
frame_number = 0;
|
frame_number = 0;
|
||||||
for (i = 0; i < animate_num_frames; i++)
|
for (i = 0; i < animate_num_frames; i++)
|
||||||
{
|
{
|
||||||
st = g_strdup_printf (_("Frame %d"), i);
|
gchar *st = g_strdup_printf (_("Frame %d"), i);
|
||||||
|
|
||||||
animlayers[i] = gimp_layer_copy (layerID);
|
animlayers[i] = gimp_layer_copy (layerID);
|
||||||
gimp_layer_add_alpha (animlayers[i]);
|
gimp_layer_add_alpha (animlayers[i]);
|
||||||
gimp_drawable_set_name (animlayers[i], st);
|
gimp_drawable_set_name (animlayers[i], st);
|
||||||
|
@ -790,9 +790,8 @@ iwarp (void)
|
||||||
|
|
||||||
destdrawable = gimp_drawable_get (animlayers[i]);
|
destdrawable = gimp_drawable_get (animlayers[i]);
|
||||||
|
|
||||||
st = g_strdup_printf (_("Warping Frame No. %d..."), frame_number);
|
gimp_progress_init (NULL);
|
||||||
gimp_progress_init (st);
|
gimp_progress_set_text (_("Warping Frame No. %d..."), frame_number);
|
||||||
g_free (st);
|
|
||||||
|
|
||||||
if (animate_deform_value > 0.0)
|
if (animate_deform_value > 0.0)
|
||||||
iwarp_frame ();
|
iwarp_frame ();
|
||||||
|
@ -800,14 +799,15 @@ iwarp (void)
|
||||||
animate_deform_value = animate_deform_value + delta;
|
animate_deform_value = animate_deform_value + delta;
|
||||||
frame_number++;
|
frame_number++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (do_animate_ping_pong)
|
if (do_animate_ping_pong)
|
||||||
{
|
{
|
||||||
st = g_strdup_printf (_("Warping Frame No. %d..."), frame_number);
|
|
||||||
gimp_progress_init (_("Ping pong"));
|
gimp_progress_init (_("Ping pong"));
|
||||||
g_free (st);
|
|
||||||
|
|
||||||
for (i = 0; i < animate_num_frames; i++)
|
for (i = 0; i < animate_num_frames; i++)
|
||||||
{
|
{
|
||||||
|
gchar *st;
|
||||||
|
|
||||||
gimp_progress_update ((gdouble) i / (animate_num_frames - 1));
|
gimp_progress_update ((gdouble) i / (animate_num_frames - 1));
|
||||||
layerID = gimp_layer_copy (animlayers[animate_num_frames-i-1]);
|
layerID = gimp_layer_copy (animlayers[animate_num_frames-i-1]);
|
||||||
|
|
||||||
|
|
|
@ -280,10 +280,10 @@ run (const gchar *name,
|
||||||
static gint32
|
static gint32
|
||||||
load_image (const gchar *filename)
|
load_image (const gchar *filename)
|
||||||
{
|
{
|
||||||
gchar *temp;
|
|
||||||
gint fd;
|
gint fd;
|
||||||
PatternHeader ph;
|
PatternHeader ph;
|
||||||
gchar *name;
|
gchar *name;
|
||||||
|
gchar *temp;
|
||||||
guchar *buffer;
|
guchar *buffer;
|
||||||
gint32 image_ID;
|
gint32 image_ID;
|
||||||
gint32 layer_ID;
|
gint32 layer_ID;
|
||||||
|
@ -302,10 +302,9 @@ load_image (const gchar *filename)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
temp = g_strdup_printf (_("Opening '%s'..."),
|
gimp_progress_init (NULL);
|
||||||
|
gimp_progress_set_text (_("Opening '%s'..."),
|
||||||
gimp_filename_to_utf8 (filename));
|
gimp_filename_to_utf8 (filename));
|
||||||
gimp_progress_init (temp);
|
|
||||||
g_free (temp);
|
|
||||||
|
|
||||||
if (read (fd, &ph, sizeof (PatternHeader)) != sizeof (PatternHeader))
|
if (read (fd, &ph, sizeof (PatternHeader)) != sizeof (PatternHeader))
|
||||||
{
|
{
|
||||||
|
@ -424,7 +423,6 @@ save_image (const gchar *filename,
|
||||||
GimpDrawable *drawable;
|
GimpDrawable *drawable;
|
||||||
gint line;
|
gint line;
|
||||||
GimpPixelRgn pixel_rgn;
|
GimpPixelRgn pixel_rgn;
|
||||||
gchar *temp;
|
|
||||||
|
|
||||||
fd = open (filename, O_CREAT | O_TRUNC | O_WRONLY | _O_BINARY, 0644);
|
fd = open (filename, O_CREAT | O_TRUNC | O_WRONLY | _O_BINARY, 0644);
|
||||||
|
|
||||||
|
@ -435,10 +433,9 @@ save_image (const gchar *filename,
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
temp = g_strdup_printf (_("Saving '%s'..."),
|
gimp_progress_init (NULL);
|
||||||
|
gimp_progress_set_text (_("Saving '%s'..."),
|
||||||
gimp_filename_to_utf8 (filename));
|
gimp_filename_to_utf8 (filename));
|
||||||
gimp_progress_init (temp);
|
|
||||||
g_free (temp);
|
|
||||||
|
|
||||||
drawable = gimp_drawable_get (drawable_ID);
|
drawable = gimp_drawable_get (drawable_ID);
|
||||||
gimp_pixel_rgn_init (&pixel_rgn, drawable, 0, 0, drawable->width,
|
gimp_pixel_rgn_init (&pixel_rgn, drawable, 0, 0, drawable->width,
|
||||||
|
|
|
@ -291,7 +291,6 @@ load_image (const gchar *filename)
|
||||||
FILE *fd;
|
FILE *fd;
|
||||||
GimpDrawable *drawable;
|
GimpDrawable *drawable;
|
||||||
GimpPixelRgn pixel_rgn;
|
GimpPixelRgn pixel_rgn;
|
||||||
gchar *message;
|
|
||||||
gint offset_x, offset_y, height, width;
|
gint offset_x, offset_y, height, width;
|
||||||
gint32 image, layer;
|
gint32 image, layer;
|
||||||
guchar *dest, cmap[768];
|
guchar *dest, cmap[768];
|
||||||
|
@ -304,10 +303,9 @@ load_image (const gchar *filename)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
message = g_strdup_printf (_("Opening '%s'..."),
|
gimp_progress_init (NULL);
|
||||||
|
gimp_progress_set_text (_("Opening '%s'..."),
|
||||||
gimp_filename_to_utf8 (filename));
|
gimp_filename_to_utf8 (filename));
|
||||||
gimp_progress_init (message);
|
|
||||||
g_free (message);
|
|
||||||
|
|
||||||
if (fread (&pcx_header, 128, 1, fd) == 0)
|
if (fread (&pcx_header, 128, 1, fd) == 0)
|
||||||
{
|
{
|
||||||
|
@ -532,7 +530,6 @@ save_image (const gchar *filename,
|
||||||
GimpImageType drawable_type;
|
GimpImageType drawable_type;
|
||||||
guchar *cmap= NULL, *pixels;
|
guchar *cmap= NULL, *pixels;
|
||||||
gint offset_x, offset_y, width, height;
|
gint offset_x, offset_y, width, height;
|
||||||
gchar *message;
|
|
||||||
int colors, i;
|
int colors, i;
|
||||||
|
|
||||||
drawable = gimp_drawable_get (layer);
|
drawable = gimp_drawable_get (layer);
|
||||||
|
@ -542,10 +539,9 @@ save_image (const gchar *filename,
|
||||||
height = drawable->height;
|
height = drawable->height;
|
||||||
gimp_pixel_rgn_init (&pixel_rgn, drawable, 0, 0, width, height, FALSE, FALSE);
|
gimp_pixel_rgn_init (&pixel_rgn, drawable, 0, 0, width, height, FALSE, FALSE);
|
||||||
|
|
||||||
message = g_strdup_printf (_("Saving '%s'..."),
|
gimp_progress_init (NULL);
|
||||||
|
gimp_progress_set_text (_("Saving '%s'..."),
|
||||||
gimp_filename_to_utf8 (filename));
|
gimp_filename_to_utf8 (filename));
|
||||||
gimp_progress_init (message);
|
|
||||||
g_free (message);
|
|
||||||
|
|
||||||
pcx_header.manufacturer = 0x0a;
|
pcx_header.manufacturer = 0x0a;
|
||||||
pcx_header.version = 5;
|
pcx_header.version = 5;
|
||||||
|
|
|
@ -311,7 +311,6 @@ load_image (const gchar *filename)
|
||||||
{
|
{
|
||||||
gint i, j, tile_height, row;
|
gint i, j, tile_height, row;
|
||||||
FILE *file = NULL;
|
FILE *file = NULL;
|
||||||
gchar *progMessage = ident; /* only to suppress compiler warnings */
|
|
||||||
guchar *dest;
|
guchar *dest;
|
||||||
guchar *dest_base;
|
guchar *dest_base;
|
||||||
GimpDrawable *drawable;
|
GimpDrawable *drawable;
|
||||||
|
@ -334,11 +333,9 @@ load_image (const gchar *filename)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set up progress display */
|
gimp_progress_init (NULL);
|
||||||
progMessage = g_strdup_printf (_("Opening '%s'..."),
|
gimp_progress_set_text (_("Opening '%s'..."),
|
||||||
gimp_filename_to_utf8 (filename));
|
gimp_filename_to_utf8 (filename));
|
||||||
gimp_progress_init (progMessage);
|
|
||||||
g_free (progMessage);
|
|
||||||
|
|
||||||
/* Read header information */
|
/* Read header information */
|
||||||
width = get_short (file);
|
width = get_short (file);
|
||||||
|
@ -494,7 +491,6 @@ save_image (const gchar *filename,
|
||||||
gboolean savingColor = TRUE;
|
gboolean savingColor = TRUE;
|
||||||
guchar *src;
|
guchar *src;
|
||||||
guchar *src_base;
|
guchar *src_base;
|
||||||
gchar *progMessage;
|
|
||||||
GimpDrawable *drawable;
|
GimpDrawable *drawable;
|
||||||
GimpPixelRgn pixel_rgn;
|
GimpPixelRgn pixel_rgn;
|
||||||
FILE *file;
|
FILE *file;
|
||||||
|
@ -517,11 +513,9 @@ save_image (const gchar *filename,
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set up progress display */
|
gimp_progress_init (NULL);
|
||||||
progMessage = g_strdup_printf (_("Saving '%s'..."),
|
gimp_progress_set_text (_("Saving '%s'..."),
|
||||||
gimp_filename_to_utf8 (filename));
|
gimp_filename_to_utf8 (filename));
|
||||||
gimp_progress_init (progMessage);
|
|
||||||
g_free (progMessage);
|
|
||||||
|
|
||||||
/* Write the image header */
|
/* Write the image header */
|
||||||
PIX_DEBUG_PRINT ("Width %hu\n", drawable->width);
|
PIX_DEBUG_PRINT ("Width %hu\n", drawable->width);
|
||||||
|
|
|
@ -630,7 +630,6 @@ load_image (const gchar *filename,
|
||||||
png_infop info; /* PNG info pointers */
|
png_infop info; /* PNG info pointers */
|
||||||
guchar **pixels, /* Pixel rows */
|
guchar **pixels, /* Pixel rows */
|
||||||
*pixel; /* Pixel data */
|
*pixel; /* Pixel data */
|
||||||
gchar *progress; /* Title for progress display... */
|
|
||||||
guchar alpha[256], /* Index -> Alpha */
|
guchar alpha[256], /* Index -> Alpha */
|
||||||
*alpha_ptr; /* Temporary pointer */
|
*alpha_ptr; /* Temporary pointer */
|
||||||
|
|
||||||
|
@ -678,10 +677,9 @@ load_image (const gchar *filename,
|
||||||
|
|
||||||
png_init_io (pp, fp);
|
png_init_io (pp, fp);
|
||||||
|
|
||||||
progress = g_strdup_printf (_("Opening '%s'..."),
|
gimp_progress_init (NULL);
|
||||||
|
gimp_progress_set_text (_("Opening '%s'..."),
|
||||||
gimp_filename_to_utf8 (filename));
|
gimp_filename_to_utf8 (filename));
|
||||||
gimp_progress_init (progress);
|
|
||||||
g_free (progress);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Get the image dimensions and create the image...
|
* Get the image dimensions and create the image...
|
||||||
|
@ -1092,7 +1090,6 @@ save_image (const gchar *filename,
|
||||||
guchar **pixels, /* Pixel rows */
|
guchar **pixels, /* Pixel rows */
|
||||||
*fixed, /* Fixed-up pixel data */
|
*fixed, /* Fixed-up pixel data */
|
||||||
*pixel; /* Pixel data */
|
*pixel; /* Pixel data */
|
||||||
gchar *progress; /* Title for progress display... */
|
|
||||||
gdouble xres, yres; /* GIMP resolution (dpi) */
|
gdouble xres, yres; /* GIMP resolution (dpi) */
|
||||||
png_color_16 background; /* Background color */
|
png_color_16 background; /* Background color */
|
||||||
png_time mod_time; /* Modification time (ie NOW) */
|
png_time mod_time; /* Modification time (ie NOW) */
|
||||||
|
@ -1182,10 +1179,9 @@ save_image (const gchar *filename,
|
||||||
|
|
||||||
png_init_io (pp, fp);
|
png_init_io (pp, fp);
|
||||||
|
|
||||||
progress = g_strdup_printf (_("Saving '%s'..."),
|
gimp_progress_init (NULL);
|
||||||
|
gimp_progress_set_text (_("Saving '%s'..."),
|
||||||
gimp_filename_to_utf8 (filename));
|
gimp_filename_to_utf8 (filename));
|
||||||
gimp_progress_init (progress);
|
|
||||||
g_free (progress);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Get the drawable for the current image...
|
* Get the drawable for the current image...
|
||||||
|
|
|
@ -418,7 +418,6 @@ load_image (const gchar *filename)
|
||||||
gint32 layer_ID;
|
gint32 layer_ID;
|
||||||
GimpDrawable *drawable;
|
GimpDrawable *drawable;
|
||||||
int fd; /* File descriptor */
|
int fd; /* File descriptor */
|
||||||
char *temp;
|
|
||||||
char buf[BUFLEN]; /* buffer for random things like scanning */
|
char buf[BUFLEN]; /* buffer for random things like scanning */
|
||||||
PNMInfo *pnminfo;
|
PNMInfo *pnminfo;
|
||||||
PNMScanner * volatile scan;
|
PNMScanner * volatile scan;
|
||||||
|
@ -434,10 +433,9 @@ load_image (const gchar *filename)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
temp = g_strdup_printf (_("Opening '%s'..."),
|
gimp_progress_init (NULL);
|
||||||
|
gimp_progress_set_text (_("Opening '%s'..."),
|
||||||
gimp_filename_to_utf8 (filename));
|
gimp_filename_to_utf8 (filename));
|
||||||
gimp_progress_init (temp);
|
|
||||||
g_free (temp);
|
|
||||||
|
|
||||||
/* allocate the necessary structures */
|
/* allocate the necessary structures */
|
||||||
pnminfo = g_new (PNMInfo, 1);
|
pnminfo = g_new (PNMInfo, 1);
|
||||||
|
|
|
@ -993,10 +993,9 @@ load_image (const gchar *filename)
|
||||||
}
|
}
|
||||||
fclose (ifp);
|
fclose (ifp);
|
||||||
|
|
||||||
temp = g_strdup_printf (_("Opening '%s'..."),
|
gimp_progress_init (NULL);
|
||||||
|
gimp_progress_set_text (_("Opening '%s'..."),
|
||||||
gimp_filename_to_utf8 (filename));
|
gimp_filename_to_utf8 (filename));
|
||||||
gimp_progress_init (temp);
|
|
||||||
g_free (temp);
|
|
||||||
|
|
||||||
ifp = ps_open (filename, &plvals, &llx, &lly, &urx, &ury, &is_epsf,
|
ifp = ps_open (filename, &plvals, &llx, &lly, &urx, &ury, &is_epsf,
|
||||||
&ChildPid);
|
&ChildPid);
|
||||||
|
@ -1089,7 +1088,6 @@ save_image (const gchar *filename,
|
||||||
FILE* ofp;
|
FILE* ofp;
|
||||||
GimpImageType drawable_type;
|
GimpImageType drawable_type;
|
||||||
gint retval;
|
gint retval;
|
||||||
char *temp = ident; /* Just to satisfy lint/gcc */
|
|
||||||
|
|
||||||
/* initialize */
|
/* initialize */
|
||||||
|
|
||||||
|
@ -1125,10 +1123,9 @@ save_image (const gchar *filename,
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
temp = g_strdup_printf (_("Saving '%s'..."),
|
gimp_progress_init (NULL);
|
||||||
|
gimp_progress_set_text (_("Saving '%s'..."),
|
||||||
gimp_filename_to_utf8 (filename));
|
gimp_filename_to_utf8 (filename));
|
||||||
gimp_progress_init (temp);
|
|
||||||
g_free (temp);
|
|
||||||
|
|
||||||
save_ps_header (ofp, filename);
|
save_ps_header (ofp, filename);
|
||||||
|
|
||||||
|
|
|
@ -1736,7 +1736,6 @@ load_image (const gchar *name)
|
||||||
{
|
{
|
||||||
FILE *fd;
|
FILE *fd;
|
||||||
gboolean want_aux;
|
gboolean want_aux;
|
||||||
char *name_buf;
|
|
||||||
guchar *cmykbuf;
|
guchar *cmykbuf;
|
||||||
guchar *dest = NULL, *temp;
|
guchar *dest = NULL, *temp;
|
||||||
long channels, nguchars;
|
long channels, nguchars;
|
||||||
|
@ -1761,10 +1760,9 @@ load_image (const gchar *name)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
name_buf = g_strdup_printf (_("Opening '%s'..."),
|
gimp_progress_init (NULL);
|
||||||
|
gimp_progress_set_text (_("Opening '%s'..."),
|
||||||
gimp_filename_to_utf8 (name));
|
gimp_filename_to_utf8 (name));
|
||||||
gimp_progress_init (name_buf);
|
|
||||||
g_free (name_buf);
|
|
||||||
|
|
||||||
read_whole_file (fd);
|
read_whole_file (fd);
|
||||||
|
|
||||||
|
|
|
@ -1574,10 +1574,9 @@ save_image (const gchar *filename,
|
||||||
gint32 image_id)
|
gint32 image_id)
|
||||||
{
|
{
|
||||||
FILE *fd;
|
FILE *fd;
|
||||||
gchar *name_buf;
|
|
||||||
gint32 *layers;
|
gint32 *layers;
|
||||||
int nlayers;
|
gint nlayers;
|
||||||
int i;
|
gint i;
|
||||||
GimpDrawable *drawable;
|
GimpDrawable *drawable;
|
||||||
|
|
||||||
IFDBG printf (" Function: save_image\n");
|
IFDBG printf (" Function: save_image\n");
|
||||||
|
@ -1614,10 +1613,9 @@ save_image (const gchar *filename,
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
name_buf = g_strdup_printf (_("Saving '%s'..."),
|
gimp_progress_init (NULL);
|
||||||
|
gimp_progress_set_text (_("Saving '%s'..."),
|
||||||
gimp_filename_to_utf8 (filename));
|
gimp_filename_to_utf8 (filename));
|
||||||
gimp_progress_init (name_buf);
|
|
||||||
g_free (name_buf);
|
|
||||||
|
|
||||||
IFDBG g_print (" File \"%s\" has been opened\n",
|
IFDBG g_print (" File \"%s\" has been opened\n",
|
||||||
gimp_filename_to_utf8 (filename));
|
gimp_filename_to_utf8 (filename));
|
||||||
|
|
|
@ -296,7 +296,6 @@ run (const gchar *name,
|
||||||
GimpRunMode run_mode;
|
GimpRunMode run_mode;
|
||||||
GimpPDBStatusType status = GIMP_PDB_SUCCESS; /* assume the best! */
|
GimpPDBStatusType status = GIMP_PDB_SUCCESS; /* assume the best! */
|
||||||
gchar *rndm_type_str = "";
|
gchar *rndm_type_str = "";
|
||||||
gchar prog_label[32];
|
|
||||||
static GimpParam values[1];
|
static GimpParam values[1];
|
||||||
GRand *gr; /* The GRand object which generates the
|
GRand *gr; /* The GRand object which generates the
|
||||||
* random numbers */
|
* random numbers */
|
||||||
|
@ -400,11 +399,12 @@ run (const gchar *name,
|
||||||
case RNDM_SLUR: rndm_type_str = "slur"; break;
|
case RNDM_SLUR: rndm_type_str = "slur"; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
sprintf (prog_label, "%s (%s)...",
|
gimp_progress_init (NULL);
|
||||||
|
gimp_progress_set_text ("%s (%s)...",
|
||||||
gettext (RNDM_VERSION[rndm_type - 1]),
|
gettext (RNDM_VERSION[rndm_type - 1]),
|
||||||
gettext (rndm_type_str));
|
gettext (rndm_type_str));
|
||||||
gimp_progress_init (prog_label);
|
gimp_tile_cache_ntiles (2 *
|
||||||
gimp_tile_cache_ntiles (2 * (drawable->width / gimp_tile_width () + 1));
|
(drawable->width / gimp_tile_width () + 1));
|
||||||
/*
|
/*
|
||||||
* Initialize the g_rand() function seed
|
* Initialize the g_rand() function seed
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -625,7 +625,6 @@ load_image (gchar *filename)
|
||||||
GimpImageBaseType itype = GIMP_RGB_IMAGE;
|
GimpImageBaseType itype = GIMP_RGB_IMAGE;
|
||||||
gint32 size;
|
gint32 size;
|
||||||
gint bpp = 0;
|
gint bpp = 0;
|
||||||
gchar *name_buf;
|
|
||||||
|
|
||||||
data = g_new0 (RawGimpData, 1);
|
data = g_new0 (RawGimpData, 1);
|
||||||
|
|
||||||
|
@ -637,10 +636,9 @@ load_image (gchar *filename)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
name_buf = g_strdup_printf (_("Opening '%s'..."),
|
gimp_progress_init (NULL);
|
||||||
|
gimp_progress_set_text (_("Opening '%s'..."),
|
||||||
gimp_filename_to_utf8 (filename));
|
gimp_filename_to_utf8 (filename));
|
||||||
gimp_progress_init (name_buf);
|
|
||||||
g_free (name_buf);
|
|
||||||
|
|
||||||
size = get_file_info (filename);
|
size = get_file_info (filename);
|
||||||
|
|
||||||
|
|
|
@ -372,7 +372,6 @@ load_image (const gchar *filename)
|
||||||
{
|
{
|
||||||
gint32 image_ID;
|
gint32 image_ID;
|
||||||
FILE *ifp;
|
FILE *ifp;
|
||||||
char *temp = ident; /* Just to satisfy gcc/lint */
|
|
||||||
L_SUNFILEHEADER sunhdr;
|
L_SUNFILEHEADER sunhdr;
|
||||||
guchar *suncolmap = NULL;
|
guchar *suncolmap = NULL;
|
||||||
|
|
||||||
|
@ -433,10 +432,9 @@ load_image (const gchar *filename)
|
||||||
*4 + sunhdr.l_ras_maplength, SEEK_SET);
|
*4 + sunhdr.l_ras_maplength, SEEK_SET);
|
||||||
}
|
}
|
||||||
|
|
||||||
temp = g_strdup_printf (_("Opening '%s'..."),
|
gimp_progress_init (NULL);
|
||||||
|
gimp_progress_set_text (_("Opening '%s'..."),
|
||||||
gimp_filename_to_utf8 (filename));
|
gimp_filename_to_utf8 (filename));
|
||||||
gimp_progress_init (temp);
|
|
||||||
g_free (temp);
|
|
||||||
|
|
||||||
switch (sunhdr.l_ras_depth)
|
switch (sunhdr.l_ras_depth)
|
||||||
{
|
{
|
||||||
|
@ -483,7 +481,6 @@ save_image (const gchar *filename,
|
||||||
FILE* ofp;
|
FILE* ofp;
|
||||||
GimpImageType drawable_type;
|
GimpImageType drawable_type;
|
||||||
gint retval;
|
gint retval;
|
||||||
char *temp;
|
|
||||||
|
|
||||||
drawable_type = gimp_drawable_type (drawable_ID);
|
drawable_type = gimp_drawable_type (drawable_ID);
|
||||||
|
|
||||||
|
@ -515,10 +512,9 @@ save_image (const gchar *filename,
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
temp = g_strdup_printf (_("Saving '%s'..."),
|
gimp_progress_init (NULL);
|
||||||
|
gimp_progress_set_text (_("Saving '%s'..."),
|
||||||
gimp_filename_to_utf8 (filename));
|
gimp_filename_to_utf8 (filename));
|
||||||
gimp_progress_init (temp);
|
|
||||||
g_free (temp);
|
|
||||||
|
|
||||||
if (drawable_type == GIMP_INDEXED_IMAGE)
|
if (drawable_type == GIMP_INDEXED_IMAGE)
|
||||||
retval = save_index (ofp,image_ID, drawable_ID, 0, (int)psvals.rle);
|
retval = save_index (ofp,image_ID, drawable_ID, 0, (int)psvals.rle);
|
||||||
|
|
|
@ -400,7 +400,6 @@ static gint32
|
||||||
load_image (const gchar *filename)
|
load_image (const gchar *filename)
|
||||||
{
|
{
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
gchar *name_buf;
|
|
||||||
tga_info info;
|
tga_info info;
|
||||||
guchar header[18];
|
guchar header[18];
|
||||||
guchar footer[26];
|
guchar footer[26];
|
||||||
|
@ -417,10 +416,9 @@ load_image (const gchar *filename)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
name_buf = g_strdup_printf (_("Opening '%s'..."),
|
gimp_progress_init (NULL);
|
||||||
|
gimp_progress_set_text (_("Opening '%s'..."),
|
||||||
gimp_filename_to_utf8 (filename));
|
gimp_filename_to_utf8 (filename));
|
||||||
gimp_progress_init (name_buf);
|
|
||||||
g_free (name_buf);
|
|
||||||
|
|
||||||
if (!fseek (fp, -26L, SEEK_END)) { /* Is file big enough for a footer? */
|
if (!fseek (fp, -26L, SEEK_END)) { /* Is file big enough for a footer? */
|
||||||
if (fread (footer, sizeof (footer), 1, fp) != 1)
|
if (fread (footer, sizeof (footer), 1, fp) != 1)
|
||||||
|
@ -1005,7 +1003,6 @@ save_image (const gchar *filename,
|
||||||
gint height;
|
gint height;
|
||||||
|
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
gchar *name_buf;
|
|
||||||
gint tileheight;
|
gint tileheight;
|
||||||
gint out_bpp = 0;
|
gint out_bpp = 0;
|
||||||
gboolean status = TRUE;
|
gboolean status = TRUE;
|
||||||
|
@ -1032,10 +1029,9 @@ save_image (const gchar *filename,
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
name_buf = g_strdup_printf (_("Saving '%s'..."),
|
gimp_progress_init (NULL);
|
||||||
|
gimp_progress_set_text (_("Saving '%s'..."),
|
||||||
gimp_filename_to_utf8 (filename));
|
gimp_filename_to_utf8 (filename));
|
||||||
gimp_progress_init (name_buf);
|
|
||||||
g_free (name_buf);
|
|
||||||
|
|
||||||
header[0] = 0; /* No image identifier / description */
|
header[0] = 0; /* No image identifier / description */
|
||||||
|
|
||||||
|
|
|
@ -500,7 +500,6 @@ load_image (const gchar *filename)
|
||||||
gint i, j;
|
gint i, j;
|
||||||
gint ilayer;
|
gint ilayer;
|
||||||
gboolean worst_case = FALSE;
|
gboolean worst_case = FALSE;
|
||||||
gchar *name;
|
|
||||||
|
|
||||||
TiffSaveVals save_vals;
|
TiffSaveVals save_vals;
|
||||||
GimpParasite *parasite;
|
GimpParasite *parasite;
|
||||||
|
@ -516,6 +515,7 @@ load_image (const gchar *filename)
|
||||||
|
|
||||||
gboolean uselayername = FALSE;
|
gboolean uselayername = FALSE;
|
||||||
guchar *tmp_name;
|
guchar *tmp_name;
|
||||||
|
gchar *name;
|
||||||
|
|
||||||
|
|
||||||
gimp_rgb_set (&color, 0.0, 0.0, 0.0);
|
gimp_rgb_set (&color, 0.0, 0.0, 0.0);
|
||||||
|
@ -531,10 +531,9 @@ load_image (const gchar *filename)
|
||||||
gimp_quit ();
|
gimp_quit ();
|
||||||
}
|
}
|
||||||
|
|
||||||
name = g_strdup_printf (_("Opening '%s'..."),
|
gimp_progress_init (NULL);
|
||||||
|
gimp_progress_set_text (_("Opening '%s'..."),
|
||||||
gimp_filename_to_utf8 (filename));
|
gimp_filename_to_utf8 (filename));
|
||||||
gimp_progress_init (name);
|
|
||||||
g_free (name);
|
|
||||||
|
|
||||||
/* We will loop through the all pages in case of multipage TIFF
|
/* We will loop through the all pages in case of multipage TIFF
|
||||||
and load every page as a separate layer. */
|
and load every page as a separate layer. */
|
||||||
|
@ -1892,7 +1891,6 @@ save_image (const gchar *filename,
|
||||||
GimpPixelRgn pixel_rgn;
|
GimpPixelRgn pixel_rgn;
|
||||||
gint tile_height;
|
gint tile_height;
|
||||||
gint y, yend;
|
gint y, yend;
|
||||||
gchar *name;
|
|
||||||
gboolean is_bw = FALSE, invert = TRUE;
|
gboolean is_bw = FALSE, invert = TRUE;
|
||||||
guchar bw_map[] = { 0, 0, 0, 255, 255, 255 };
|
guchar bw_map[] = { 0, 0, 0, 255, 255, 255 };
|
||||||
guchar wb_map[] = { 255, 255, 255, 0, 0, 0 };
|
guchar wb_map[] = { 255, 255, 255, 0, 0, 0 };
|
||||||
|
@ -1921,10 +1919,9 @@ save_image (const gchar *filename,
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
name = g_strdup_printf (_("Saving '%s'..."),
|
gimp_progress_init (NULL);
|
||||||
|
gimp_progress_set_text (_("Saving '%s'..."),
|
||||||
gimp_filename_to_utf8 (filename));
|
gimp_filename_to_utf8 (filename));
|
||||||
gimp_progress_init (name);
|
|
||||||
g_free (name);
|
|
||||||
|
|
||||||
drawable = gimp_drawable_get (layer);
|
drawable = gimp_drawable_get (layer);
|
||||||
drawable_type = gimp_drawable_type (layer);
|
drawable_type = gimp_drawable_type (layer);
|
||||||
|
|
|
@ -938,7 +938,6 @@ load_image (const gchar *filename)
|
||||||
gint32 layer;
|
gint32 layer;
|
||||||
GimpDrawable *drawable;
|
GimpDrawable *drawable;
|
||||||
GimpPixelRgn pixel_rgn;
|
GimpPixelRgn pixel_rgn;
|
||||||
gchar *status;
|
|
||||||
gint i, rowstride;
|
gint i, rowstride;
|
||||||
|
|
||||||
guchar *pixels, *buf;
|
guchar *pixels, *buf;
|
||||||
|
@ -954,10 +953,9 @@ load_image (const gchar *filename)
|
||||||
gimp_quit ();
|
gimp_quit ();
|
||||||
}
|
}
|
||||||
|
|
||||||
status = g_strdup_printf (_("Opening '%s'..."),
|
gimp_progress_init (NULL);
|
||||||
|
gimp_progress_set_text (_("Opening '%s'..."),
|
||||||
gimp_filename_to_utf8 (filename));
|
gimp_filename_to_utf8 (filename));
|
||||||
gimp_progress_init (status);
|
|
||||||
g_free (status);
|
|
||||||
|
|
||||||
image = gimp_image_new (width, height, GIMP_RGB);
|
image = gimp_image_new (width, height, GIMP_RGB);
|
||||||
gimp_image_set_filename (image, filename);
|
gimp_image_set_filename (image, filename);
|
||||||
|
|
|
@ -703,11 +703,9 @@ load_image (const gchar *filename)
|
||||||
gint y_hot = 0;
|
gint y_hot = 0;
|
||||||
gint c, i, j, k;
|
gint c, i, j, k;
|
||||||
gint tileheight, rowoffset;
|
gint tileheight, rowoffset;
|
||||||
|
|
||||||
gchar *name_buf;
|
|
||||||
gchar *comment;
|
gchar *comment;
|
||||||
|
|
||||||
guchar cmap[] =
|
const guchar cmap[] =
|
||||||
{
|
{
|
||||||
0x00, 0x00, 0x00, /* black */
|
0x00, 0x00, 0x00, /* black */
|
||||||
0xff, 0xff, 0xff /* white */
|
0xff, 0xff, 0xff /* white */
|
||||||
|
@ -721,10 +719,9 @@ load_image (const gchar *filename)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
name_buf = g_strdup_printf (_("Opening '%s'..."),
|
gimp_progress_init (NULL);
|
||||||
|
gimp_progress_set_text (_("Opening '%s'..."),
|
||||||
gimp_filename_to_utf8 (filename));
|
gimp_filename_to_utf8 (filename));
|
||||||
gimp_progress_init (name_buf);
|
|
||||||
g_free (name_buf);
|
|
||||||
|
|
||||||
comment = fgetcomment (fp);
|
comment = fgetcomment (fp);
|
||||||
|
|
||||||
|
|
|
@ -336,13 +336,10 @@ load_image (const gchar *filename)
|
||||||
XpmImage xpm_image;
|
XpmImage xpm_image;
|
||||||
guchar *cmap;
|
guchar *cmap;
|
||||||
gint32 image_ID;
|
gint32 image_ID;
|
||||||
gchar *name;
|
|
||||||
|
|
||||||
/* put up a progress bar */
|
gimp_progress_init (NULL);
|
||||||
name = g_strdup_printf (_("Opening '%s'..."),
|
gimp_progress_set_text (_("Opening '%s'..."),
|
||||||
gimp_filename_to_utf8 (filename));
|
gimp_filename_to_utf8 (filename));
|
||||||
gimp_progress_init (name);
|
|
||||||
g_free (name);
|
|
||||||
|
|
||||||
/* read the raw file */
|
/* read the raw file */
|
||||||
switch (XpmReadFileToXpmImage ((char *) filename, &xpm_image, NULL))
|
switch (XpmReadFileToXpmImage ((char *) filename, &xpm_image, NULL))
|
||||||
|
@ -621,15 +618,9 @@ save_image (const gchar *filename,
|
||||||
|
|
||||||
hash = g_hash_table_new ((GHashFunc) rgbhash, (GCompareFunc) compare);
|
hash = g_hash_table_new ((GHashFunc) rgbhash, (GCompareFunc) compare);
|
||||||
|
|
||||||
/* put up a progress bar */
|
gimp_progress_init (NULL);
|
||||||
{
|
gimp_progress_set_text (_("Saving '%s'..."),
|
||||||
gchar *name;
|
|
||||||
|
|
||||||
name = g_strdup_printf (_("Saving '%s'..."),
|
|
||||||
gimp_filename_to_utf8 (filename));
|
gimp_filename_to_utf8 (filename));
|
||||||
gimp_progress_init (name);
|
|
||||||
g_free (name);
|
|
||||||
}
|
|
||||||
|
|
||||||
ncolors = alpha ? 1 : 0;
|
ncolors = alpha ? 1 : 0;
|
||||||
|
|
||||||
|
|
|
@ -411,7 +411,6 @@ load_image (const gchar *filename)
|
||||||
{
|
{
|
||||||
FILE *ifp;
|
FILE *ifp;
|
||||||
gint depth, bpp;
|
gint depth, bpp;
|
||||||
gchar *temp;
|
|
||||||
gint32 image_ID;
|
gint32 image_ID;
|
||||||
L_XWDFILEHEADER xwdhdr;
|
L_XWDFILEHEADER xwdhdr;
|
||||||
L_XWDCOLOR *xwdcolmap = NULL;
|
L_XWDCOLOR *xwdcolmap = NULL;
|
||||||
|
@ -472,10 +471,9 @@ load_image (const gchar *filename)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
temp = g_strdup_printf (_("Opening '%s'..."),
|
gimp_progress_init (NULL);
|
||||||
|
gimp_progress_set_text (_("Opening '%s'..."),
|
||||||
gimp_filename_to_utf8 (filename));
|
gimp_filename_to_utf8 (filename));
|
||||||
gimp_progress_init (temp);
|
|
||||||
g_free (temp);
|
|
||||||
|
|
||||||
depth = xwdhdr.l_pixmap_depth;
|
depth = xwdhdr.l_pixmap_depth;
|
||||||
bpp = xwdhdr.l_bits_per_pixel;
|
bpp = xwdhdr.l_bits_per_pixel;
|
||||||
|
@ -523,17 +521,10 @@ load_image (const gchar *filename)
|
||||||
g_free (xwdcolmap);
|
g_free (xwdcolmap);
|
||||||
|
|
||||||
if (image_ID == -1)
|
if (image_ID == -1)
|
||||||
{
|
g_message (_("XWD-file %s has format %d, depth %d and bits per pixel %d. "
|
||||||
temp = g_strdup_printf (_("XWD-file %s has format %d, depth %d\n"
|
|
||||||
"and bits per pixel %d.\n"
|
|
||||||
"Currently this is not supported."),
|
"Currently this is not supported."),
|
||||||
gimp_filename_to_utf8 (filename),
|
gimp_filename_to_utf8 (filename),
|
||||||
(gint) xwdhdr.l_pixmap_format, depth, bpp);
|
(gint) xwdhdr.l_pixmap_format, depth, bpp);
|
||||||
g_message (temp);
|
|
||||||
g_free (temp);
|
|
||||||
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return image_ID;
|
return image_ID;
|
||||||
}
|
}
|
||||||
|
|
|
@ -195,15 +195,13 @@ load_image (const gchar *filename)
|
||||||
gint bperrow = MAX_COLS/8; /* bytes per bit row */
|
gint bperrow = MAX_COLS/8; /* bytes per bit row */
|
||||||
gchar *bitmap; /* MAX_ROWS by (bperrow) bytes */
|
gchar *bitmap; /* MAX_ROWS by (bperrow) bytes */
|
||||||
gchar *bp; /* bitmap pointer */
|
gchar *bp; /* bitmap pointer */
|
||||||
gchar *name;
|
|
||||||
gint row;
|
gint row;
|
||||||
gint max_rows; /* max. rows allocated */
|
gint max_rows; /* max. rows allocated */
|
||||||
gint col, hcol; /* column, highest column ever used */
|
gint col, hcol; /* column, highest column ever used */
|
||||||
|
|
||||||
name = g_strdup_printf (_("Opening '%s'..."),
|
gimp_progress_init (NULL);
|
||||||
|
gimp_progress_set_text (_("Opening '%s'..."),
|
||||||
gimp_filename_to_utf8 (filename));
|
gimp_filename_to_utf8 (filename));
|
||||||
gimp_progress_init (name);
|
|
||||||
g_free (name);
|
|
||||||
|
|
||||||
/* initialize lookup trees */
|
/* initialize lookup trees */
|
||||||
build_tree( &white, t_white );
|
build_tree( &white, t_white );
|
||||||
|
|
|
@ -443,7 +443,6 @@ load_image (const gchar *filename,
|
||||||
gint32 to_frame)
|
gint32 to_frame)
|
||||||
{
|
{
|
||||||
FILE *file;
|
FILE *file;
|
||||||
gchar *name_buf;
|
|
||||||
GimpDrawable *drawable;
|
GimpDrawable *drawable;
|
||||||
gint32 image_id, layer_ID;
|
gint32 image_id, layer_ID;
|
||||||
|
|
||||||
|
@ -462,10 +461,9 @@ load_image (const gchar *filename,
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
name_buf = g_strdup_printf (_("Opening '%s'..."),
|
gimp_progress_init (NULL);
|
||||||
|
gimp_progress_set_text (_("Opening '%s'..."),
|
||||||
gimp_filename_to_utf8 (filename));
|
gimp_filename_to_utf8 (filename));
|
||||||
gimp_progress_init (name_buf);
|
|
||||||
g_free (name_buf);
|
|
||||||
|
|
||||||
fli_read_header (file, &fli_header);
|
fli_read_header (file, &fli_header);
|
||||||
if (fli_header.magic == NO_HEADER)
|
if (fli_header.magic == NO_HEADER)
|
||||||
|
@ -524,7 +522,8 @@ load_image (const gchar *filename,
|
||||||
*/
|
*/
|
||||||
for (cnt = from_frame; cnt <= to_frame; cnt++)
|
for (cnt = from_frame; cnt <= to_frame; cnt++)
|
||||||
{
|
{
|
||||||
name_buf = g_strdup_printf (_("Frame (%i)"), cnt);
|
gchar *name_buf = g_strdup_printf (_("Frame (%i)"), cnt);
|
||||||
|
|
||||||
layer_ID = gimp_layer_new (image_id, name_buf,
|
layer_ID = gimp_layer_new (image_id, name_buf,
|
||||||
fli_header.width, fli_header.height,
|
fli_header.width, fli_header.height,
|
||||||
GIMP_INDEXED_IMAGE, 100, GIMP_NORMAL_MODE);
|
GIMP_INDEXED_IMAGE, 100, GIMP_NORMAL_MODE);
|
||||||
|
@ -581,7 +580,6 @@ save_image (const gchar *filename,
|
||||||
gint32 to_frame)
|
gint32 to_frame)
|
||||||
{
|
{
|
||||||
FILE *file;
|
FILE *file;
|
||||||
gchar *name_buf;
|
|
||||||
GimpDrawable *drawable;
|
GimpDrawable *drawable;
|
||||||
gint32 *framelist;
|
gint32 *framelist;
|
||||||
gint nframes;
|
gint nframes;
|
||||||
|
@ -679,10 +677,9 @@ save_image (const gchar *filename,
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
name_buf = g_strdup_printf (_("Saving '%s'..."),
|
gimp_progress_init (NULL);
|
||||||
|
gimp_progress_set_text (_("Saving '%s'..."),
|
||||||
gimp_filename_to_utf8 (filename));
|
gimp_filename_to_utf8 (filename));
|
||||||
gimp_progress_init (name_buf);
|
|
||||||
g_free (name_buf);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* First build the fli header.
|
* First build the fli header.
|
||||||
|
|
|
@ -1282,7 +1282,6 @@ ifs_compose (GimpDrawable *drawable)
|
||||||
gint height = drawable->height;
|
gint height = drawable->height;
|
||||||
gint num_bands, band_height, band_y, band_no;
|
gint num_bands, band_height, band_y, band_no;
|
||||||
gint i, j;
|
gint i, j;
|
||||||
gchar *buffer;
|
|
||||||
guchar *data;
|
guchar *data;
|
||||||
guchar *mask = NULL;
|
guchar *mask = NULL;
|
||||||
guchar *nhits;
|
guchar *nhits;
|
||||||
|
@ -1317,10 +1316,9 @@ ifs_compose (GimpDrawable *drawable)
|
||||||
|
|
||||||
gpointer pr;
|
gpointer pr;
|
||||||
|
|
||||||
buffer = g_strdup_printf (_("Rendering IFS (%d/%d)..."),
|
gimp_progress_init (NULL);
|
||||||
|
gimp_progress_set_text (_("Rendering IFS (%d/%d)..."),
|
||||||
band_no+1, num_bands);
|
band_no+1, num_bands);
|
||||||
gimp_progress_init (buffer);
|
|
||||||
g_free (buffer);
|
|
||||||
|
|
||||||
/* render the band to a buffer */
|
/* render the band to a buffer */
|
||||||
if (band_y + band_height > height)
|
if (band_y + band_height > height)
|
||||||
|
@ -1336,11 +1334,9 @@ ifs_compose (GimpDrawable *drawable)
|
||||||
|
|
||||||
/* transfer the image to the drawable */
|
/* transfer the image to the drawable */
|
||||||
|
|
||||||
|
gimp_progress_init (NULL);
|
||||||
buffer = g_strdup_printf (_("Copying IFS to image (%d/%d)..."),
|
gimp_progress_set_text (_("Copying IFS to image (%d/%d)..."),
|
||||||
band_no+1, num_bands);
|
band_no+1, num_bands);
|
||||||
gimp_progress_init (buffer);
|
|
||||||
g_free (buffer);
|
|
||||||
|
|
||||||
progress = 0;
|
progress = 0;
|
||||||
max_progress = band_height * width;
|
max_progress = band_height * width;
|
||||||
|
|
|
@ -137,11 +137,9 @@ load_image (const gchar *filename,
|
||||||
|
|
||||||
if (!preview)
|
if (!preview)
|
||||||
{
|
{
|
||||||
gchar *name = g_strdup_printf (_("Opening '%s'..."),
|
gimp_progress_init (NULL);
|
||||||
|
gimp_progress_set_text (_("Opening '%s'..."),
|
||||||
gimp_filename_to_utf8 (filename));
|
gimp_filename_to_utf8 (filename));
|
||||||
|
|
||||||
gimp_progress_init (name);
|
|
||||||
g_free (name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
image_ID = -1;
|
image_ID = -1;
|
||||||
|
@ -568,12 +566,9 @@ load_thumbnail_image (const gchar *filename,
|
||||||
jerr.pub.emit_message = my_emit_message;
|
jerr.pub.emit_message = my_emit_message;
|
||||||
jerr.pub.output_message = my_output_message;
|
jerr.pub.output_message = my_output_message;
|
||||||
|
|
||||||
{
|
gimp_progress_init (NULL);
|
||||||
gchar *name = g_strdup_printf (_("Opening thumbnail for '%s'..."),
|
gimp_progress_set_text (_("Opening thumbnail for '%s'..."),
|
||||||
gimp_filename_to_utf8 (filename));
|
gimp_filename_to_utf8 (filename));
|
||||||
gimp_progress_init (name);
|
|
||||||
g_free (name);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Establish the setjmp return context for my_error_exit to use. */
|
/* Establish the setjmp return context for my_error_exit to use. */
|
||||||
if (setjmp (jerr.setjmp_buffer))
|
if (setjmp (jerr.setjmp_buffer))
|
||||||
|
|
|
@ -196,7 +196,6 @@ save_image (const gchar *filename,
|
||||||
guchar *temp, *t;
|
guchar *temp, *t;
|
||||||
guchar *data;
|
guchar *data;
|
||||||
guchar *src, *s;
|
guchar *src, *s;
|
||||||
gchar *name;
|
|
||||||
gboolean has_alpha;
|
gboolean has_alpha;
|
||||||
gint rowstride, yend;
|
gint rowstride, yend;
|
||||||
gint i, j;
|
gint i, j;
|
||||||
|
@ -212,10 +211,9 @@ save_image (const gchar *filename,
|
||||||
|
|
||||||
if (!preview)
|
if (!preview)
|
||||||
{
|
{
|
||||||
name = g_strdup_printf (_("Saving '%s'..."),
|
gimp_progress_init (NULL);
|
||||||
|
gimp_progress_set_text (_("Saving '%s'..."),
|
||||||
gimp_filename_to_utf8 (filename));
|
gimp_filename_to_utf8 (filename));
|
||||||
gimp_progress_init (name);
|
|
||||||
g_free (name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Step 1: allocate and initialize JPEG compression object */
|
/* Step 1: allocate and initialize JPEG compression object */
|
||||||
|
|
|
@ -306,7 +306,6 @@ load_image (const gchar *filename) /* I - File to load */
|
||||||
*pixel, /* Pixel data */
|
*pixel, /* Pixel data */
|
||||||
*pptr; /* Current pixel */
|
*pptr; /* Current pixel */
|
||||||
gushort **rows; /* SGI image data */
|
gushort **rows; /* SGI image data */
|
||||||
gchar *progress; /* Title for progress display... */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Open the file for reading...
|
* Open the file for reading...
|
||||||
|
@ -320,10 +319,9 @@ load_image (const gchar *filename) /* I - File to load */
|
||||||
return -1;
|
return -1;
|
||||||
};
|
};
|
||||||
|
|
||||||
progress = g_strdup_printf (_("Opening '%s'..."),
|
gimp_progress_init (NULL);
|
||||||
|
gimp_progress_set_text (_("Opening '%s'..."),
|
||||||
gimp_filename_to_utf8 (filename));
|
gimp_filename_to_utf8 (filename));
|
||||||
gimp_progress_init (progress);
|
|
||||||
g_free (progress);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Get the image dimensions and create the image...
|
* Get the image dimensions and create the image...
|
||||||
|
@ -498,7 +496,6 @@ save_image (const gchar *filename,
|
||||||
*pixel, /* Pixel data */
|
*pixel, /* Pixel data */
|
||||||
*pptr; /* Current pixel */
|
*pptr; /* Current pixel */
|
||||||
gushort **rows; /* SGI image data */
|
gushort **rows; /* SGI image data */
|
||||||
gchar *progress; /* Title for progress display... */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Get the drawable for the current image...
|
* Get the drawable for the current image...
|
||||||
|
@ -542,10 +539,9 @@ save_image (const gchar *filename,
|
||||||
return FALSE;
|
return FALSE;
|
||||||
};
|
};
|
||||||
|
|
||||||
progress = g_strdup_printf (_("Saving '%s'..."),
|
gimp_progress_init (NULL);
|
||||||
|
gimp_progress_set_text (_("Saving '%s'..."),
|
||||||
gimp_filename_to_utf8 (filename));
|
gimp_filename_to_utf8 (filename));
|
||||||
gimp_progress_init (progress);
|
|
||||||
g_free (progress);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Allocate memory for "tile_height" rows...
|
* Allocate memory for "tile_height" rows...
|
||||||
|
|
|
@ -220,16 +220,13 @@ copy_uri (const gchar *src_uri,
|
||||||
|
|
||||||
memsize = gimp_memsize_to_string (file_size);
|
memsize = gimp_memsize_to_string (file_size);
|
||||||
|
|
||||||
if (file_size > 0)
|
gimp_progress_init (NULL);
|
||||||
message = g_strdup_printf (copying_format_str, memsize);
|
gimp_progress_set_text (file_size > 0 ?
|
||||||
else
|
copying_format_str : copied_format_str,
|
||||||
message = g_strdup_printf (copied_format_str, memsize);
|
memsize);
|
||||||
|
|
||||||
g_free (memsize);
|
g_free (memsize);
|
||||||
|
|
||||||
gimp_progress_init (message);
|
|
||||||
g_free (message);
|
|
||||||
|
|
||||||
while (TRUE)
|
while (TRUE)
|
||||||
{
|
{
|
||||||
GnomeVFSFileSize chunk_read;
|
GnomeVFSFileSize chunk_read;
|
||||||
|
|
|
@ -119,7 +119,6 @@ uri_backend_load_image (const gchar *uri,
|
||||||
gchar *memsize;
|
gchar *memsize;
|
||||||
gchar *message;
|
gchar *message;
|
||||||
gchar *timeout_msg;
|
gchar *timeout_msg;
|
||||||
gchar *progress;
|
|
||||||
|
|
||||||
#define DEBUG(x) if (debug) g_printerr (x)
|
#define DEBUG(x) if (debug) g_printerr (x)
|
||||||
|
|
||||||
|
@ -153,10 +152,9 @@ uri_backend_load_image (const gchar *uri,
|
||||||
|
|
||||||
timeout_msg = g_strdup_printf (_("(timeout is %s seconds)"), TIMEOUT);
|
timeout_msg = g_strdup_printf (_("(timeout is %s seconds)"), TIMEOUT);
|
||||||
|
|
||||||
progress = g_strdup_printf ("%s %s",
|
gimp_progress_init (NULL);
|
||||||
|
gimp_progress_set_text ("%s %s",
|
||||||
_("Connecting to server..."), timeout_msg);
|
_("Connecting to server..."), timeout_msg);
|
||||||
gimp_progress_init (progress);
|
|
||||||
g_free (progress);
|
|
||||||
|
|
||||||
read_connect:
|
read_connect:
|
||||||
if (fgets (buf, sizeof (buf), input) == NULL)
|
if (fgets (buf, sizeof (buf), input) == NULL)
|
||||||
|
@ -179,10 +177,8 @@ uri_backend_load_image (const gchar *uri,
|
||||||
DEBUG (buf);
|
DEBUG (buf);
|
||||||
|
|
||||||
/* The fourth line is either the network request or an error */
|
/* The fourth line is either the network request or an error */
|
||||||
progress = g_strdup_printf ("%s %s",
|
|
||||||
_("Opening URI..."), timeout_msg);
|
gimp_progress_set_text ("%s %s", _("Opening URI..."), timeout_msg);
|
||||||
gimp_progress_init (progress);
|
|
||||||
g_free (progress);
|
|
||||||
|
|
||||||
if (fgets (buf, sizeof (buf), input) == NULL)
|
if (fgets (buf, sizeof (buf), input) == NULL)
|
||||||
{
|
{
|
||||||
|
@ -251,9 +247,7 @@ uri_backend_load_image (const gchar *uri,
|
||||||
message = g_strdup_printf (_("Downloading %s of image data..."),
|
message = g_strdup_printf (_("Downloading %s of image data..."),
|
||||||
memsize);
|
memsize);
|
||||||
|
|
||||||
progress = g_strdup_printf ("%s %s", message, timeout_msg);
|
gimp_progress_set_text ("%s %s", message, timeout_msg);
|
||||||
gimp_progress_init (progress);
|
|
||||||
g_free (progress);
|
|
||||||
|
|
||||||
g_free (message);
|
g_free (message);
|
||||||
g_free (memsize);
|
g_free (memsize);
|
||||||
|
|
|
@ -498,14 +498,12 @@ ico_to_gimp (MsIcon *ico)
|
||||||
gint32
|
gint32
|
||||||
LoadICO (const gchar *filename)
|
LoadICO (const gchar *filename)
|
||||||
{
|
{
|
||||||
gchar *temp;
|
|
||||||
gint32 image_ID;
|
gint32 image_ID;
|
||||||
MsIcon ico;
|
MsIcon ico;
|
||||||
|
|
||||||
temp = g_strdup_printf (_("Opening '%s'..."),
|
gimp_progress_init (NULL);
|
||||||
|
gimp_progress_set_text (_("Opening '%s'..."),
|
||||||
gimp_filename_to_utf8 (filename));
|
gimp_filename_to_utf8 (filename));
|
||||||
gimp_progress_init (temp);
|
|
||||||
g_free (temp);
|
|
||||||
|
|
||||||
if (! ico_init (filename, &ico))
|
if (! ico_init (filename, &ico))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -931,7 +931,6 @@ SaveICO (const gchar *filename,
|
||||||
gint32 image)
|
gint32 image)
|
||||||
{
|
{
|
||||||
MsIcon ico;
|
MsIcon ico;
|
||||||
gchar *temp_buf;
|
|
||||||
gint *icon_depths = NULL;
|
gint *icon_depths = NULL;
|
||||||
gint num_icons;
|
gint num_icons;
|
||||||
GimpPDBStatusType exit_state;
|
GimpPDBStatusType exit_state;
|
||||||
|
@ -954,10 +953,9 @@ SaveICO (const gchar *filename,
|
||||||
if ((icon_depths = ico_show_icon_dialog (image, &num_icons)) == NULL)
|
if ((icon_depths = ico_show_icon_dialog (image, &num_icons)) == NULL)
|
||||||
return GIMP_PDB_CANCEL;
|
return GIMP_PDB_CANCEL;
|
||||||
|
|
||||||
temp_buf = g_strdup_printf (_("Saving '%s'..."),
|
gimp_progress_init (NULL);
|
||||||
|
gimp_progress_set_text (_("Saving '%s'..."),
|
||||||
gimp_filename_to_utf8 (filename));
|
gimp_filename_to_utf8 (filename));
|
||||||
gimp_progress_init (temp_buf);
|
|
||||||
g_free (temp_buf);
|
|
||||||
|
|
||||||
/* Okay, let's actually save the thing with the depths the
|
/* Okay, let's actually save the thing with the depths the
|
||||||
user specified. */
|
user specified. */
|
||||||
|
|
|
@ -1633,7 +1633,6 @@ save_xjt_image (const gchar *filename,
|
||||||
gchar *l_prop_file;
|
gchar *l_prop_file;
|
||||||
gchar *l_jpg_file;
|
gchar *l_jpg_file;
|
||||||
gchar *l_cmd;
|
gchar *l_cmd;
|
||||||
gchar *l_name;
|
|
||||||
FILE *l_fp_prp;
|
FILE *l_fp_prp;
|
||||||
mode_t l_mode_dir;
|
mode_t l_mode_dir;
|
||||||
|
|
||||||
|
@ -1684,10 +1683,9 @@ save_xjt_image (const gchar *filename,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
l_name = g_strdup_printf (_("Saving '%s'..."),
|
gimp_progress_init (NULL);
|
||||||
|
gimp_progress_set_text (_("Saving '%s'..."),
|
||||||
gimp_filename_to_utf8 (filename));
|
gimp_filename_to_utf8 (filename));
|
||||||
gimp_progress_init (l_name);
|
|
||||||
g_free (l_name);
|
|
||||||
|
|
||||||
/* create temporary directory */
|
/* create temporary directory */
|
||||||
l_dirname = gimp_temp_name (".tmpdir");
|
l_dirname = gimp_temp_name (".tmpdir");
|
||||||
|
@ -3284,7 +3282,6 @@ load_xjt_image (const gchar *filename)
|
||||||
gchar *l_prop_file;
|
gchar *l_prop_file;
|
||||||
gchar *l_jpg_file;
|
gchar *l_jpg_file;
|
||||||
gchar *l_cmd;
|
gchar *l_cmd;
|
||||||
gchar *l_name;
|
|
||||||
mode_t l_mode_dir;
|
mode_t l_mode_dir;
|
||||||
|
|
||||||
gint32 *l_layers_list;
|
gint32 *l_layers_list;
|
||||||
|
@ -3314,10 +3311,9 @@ load_xjt_image (const gchar *filename)
|
||||||
l_fsel_attached_to_id = -1; /* -1 assume fsel is not available (and not attached to any drawable) */
|
l_fsel_attached_to_id = -1; /* -1 assume fsel is not available (and not attached to any drawable) */
|
||||||
l_fsel_id = -1; /* -1 assume there is no floating selection */
|
l_fsel_id = -1; /* -1 assume there is no floating selection */
|
||||||
|
|
||||||
l_name = g_strdup_printf (_("Opening '%s'..."),
|
gimp_progress_init (NULL);
|
||||||
|
gimp_progress_set_text (_("Opening '%s'..."),
|
||||||
gimp_filename_to_utf8 (filename));
|
gimp_filename_to_utf8 (filename));
|
||||||
gimp_progress_init (l_name);
|
|
||||||
g_free (l_name);
|
|
||||||
|
|
||||||
/* create temporary directory */
|
/* create temporary directory */
|
||||||
l_dirname = gimp_temp_name (".tmpdir");
|
l_dirname = gimp_temp_name (".tmpdir");
|
||||||
|
|
|
@ -136,7 +136,8 @@ HELP
|
||||||
|
|
||||||
@inargs = (
|
@inargs = (
|
||||||
{ name => 'message', type => 'string', null_ok => 1,
|
{ name => 'message', type => 'string', null_ok => 1,
|
||||||
desc => 'Message to use in the progress dialog' }
|
desc => 'Message to use in the progress dialog',
|
||||||
|
wrap => 1 }
|
||||||
);
|
);
|
||||||
%invoke = (
|
%invoke = (
|
||||||
code => <<'CODE'
|
code => <<'CODE'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue