removed the "wrap" from gimp_progress_set_text() so it shows up as libgimp

2005-09-29  Michael Natterer  <mitch@gimp.org>

	* tools/pdbgen/pdb/progress.pdb: removed the "wrap" from
	gimp_progress_set_text() so it shows up as libgimp function again.

	* libgimp/gimpprogress_pdb.[ch]: regenerated.

	* libgimp/gimpprogress.[ch]: changed the old
	gimp_progress_set_text() to gimp_progress_set_text_printf() and
	added gimp_progress_init_printf(). (did this because the method of
	calling init(NULL) followed by set_text("foo") caused popup
	progress windows to be resized after they were shown).

	* libgimp/gimp.def: changed accordingly.

	* plug-ins/*/*.c: use gimp_progress_init_printf() instead of
	init(NULL) plus set_text(foo) and changed users of set_text() to
	use set_text_printf().
This commit is contained in:
Michael Natterer 2005-09-29 18:34:08 +00:00 committed by Michael Natterer
parent eb4545886f
commit e3da6be9b5
45 changed files with 201 additions and 219 deletions

View File

@ -1,3 +1,22 @@
2005-09-29 Michael Natterer <mitch@gimp.org>
* tools/pdbgen/pdb/progress.pdb: removed the "wrap" from
gimp_progress_set_text() so it shows up as libgimp function again.
* libgimp/gimpprogress_pdb.[ch]: regenerated.
* libgimp/gimpprogress.[ch]: changed the old
gimp_progress_set_text() to gimp_progress_set_text_printf() and
added gimp_progress_init_printf(). (did this because the method of
calling init(NULL) followed by set_text("foo") caused popup
progress windows to be resized after they were shown).
* libgimp/gimp.def: changed accordingly.
* plug-ins/*/*.c: use gimp_progress_init_printf() instead of
init(NULL) plus set_text(foo) and changed users of set_text() to
use set_text_printf().
2005-09-29 Sven Neumann <sven@gimp.org>
* plug-ins/script-fu/script-fu-interface.c: removed the frame

View File

@ -504,10 +504,12 @@ EXPORTS
gimp_procedural_db_temp_name
gimp_progress_cancel
gimp_progress_init
gimp_progress_init_printf
gimp_progress_install
gimp_progress_install_vtable
gimp_progress_pulse
gimp_progress_set_text
gimp_progress_set_text_printf
gimp_progress_get_window_handle
gimp_progress_uninstall
gimp_progress_update

View File

@ -215,7 +215,42 @@ gimp_progress_uninstall (const gchar *progress_callback)
}
/**
* gimp_progress_set_text:
* gimp_progress_init_printf:
* @format: a standard printf() format string
* @Varargs: arguments for @format
*
* Initializes the progress bar for the current plug-in.
*
* Initializes the progress bar for the current plug-in. It is only
* valid to call this procedure from a plug-in.
*
* Returns: %TRUE on success.
*
* Since: GIMP 2.4
**/
gboolean
gimp_progress_init_printf (const gchar *format,
...)
{
gchar *text;
gboolean retval;
va_list args;
g_return_val_if_fail (format != NULL, FALSE);
va_start (args, format);
text = g_strdup_vprintf (format, args);
va_end (args);
retval = gimp_progress_init (text);
g_free (text);
return retval;
}
/**
* gimp_progress_set_text_printf:
* @format: a standard printf() format string
* @Varargs: arguments for @format
*
@ -230,8 +265,8 @@ gimp_progress_uninstall (const gchar *progress_callback)
* Since: GIMP 2.4
**/
gboolean
gimp_progress_set_text (const gchar *format,
...)
gimp_progress_set_text_printf (const gchar *format,
...)
{
gchar *text;
gboolean retval;
@ -243,7 +278,7 @@ gimp_progress_set_text (const gchar *format,
text = g_strdup_vprintf (format, args);
va_end (args);
retval = _gimp_progress_set_text (text);
retval = gimp_progress_set_text (text);
g_free (text);

View File

@ -53,12 +53,14 @@ struct _GimpProgressVtable
};
const gchar * gimp_progress_install_vtable (const GimpProgressVtable *vtable,
gpointer user_data);
gpointer gimp_progress_uninstall (const gchar *progress_callback);
const gchar * gimp_progress_install_vtable (const GimpProgressVtable *vtable,
gpointer user_data);
gpointer gimp_progress_uninstall (const gchar *progress_callback);
gboolean gimp_progress_set_text (const gchar *format,
...) G_GNUC_PRINTF (1, 2);
gboolean gimp_progress_init_printf (const gchar *format,
...) G_GNUC_PRINTF (1, 2);
gboolean gimp_progress_set_text_printf (const gchar *format,
...) G_GNUC_PRINTF (1, 2);
#ifndef GIMP_DISABLE_DEPRECATED

View File

@ -121,7 +121,7 @@ gimp_progress_pulse (void)
}
/**
* _gimp_progress_set_text:
* gimp_progress_set_text:
* @message: Message to use in the progress dialog.
*
* Changes the text in the progress bar for the current plug-in.
@ -135,7 +135,7 @@ gimp_progress_pulse (void)
* Since: GIMP 2.4
*/
gboolean
_gimp_progress_set_text (const gchar *message)
gimp_progress_set_text (const gchar *message)
{
GimpParam *return_vals;
gint nreturn_vals;

View File

@ -32,7 +32,7 @@ G_BEGIN_DECLS
gboolean gimp_progress_init (const gchar *message);
gboolean gimp_progress_update (gdouble percentage);
gboolean gimp_progress_pulse (void);
gboolean _gimp_progress_set_text (const gchar *message);
gboolean gimp_progress_set_text (const gchar *message);
gint gimp_progress_get_window_handle (void);
gboolean _gimp_progress_install (const gchar *progress_callback);
gboolean _gimp_progress_uninstall (const gchar *progress_callback);

View File

@ -154,9 +154,8 @@ ReadBMP (const gchar *name)
return -1;
}
gimp_progress_init (NULL);
gimp_progress_set_text (_("Opening '%s'..."),
gimp_filename_to_utf8 (name));
gimp_progress_init_printf (_("Opening '%s'..."),
gimp_filename_to_utf8 (name));
/* It is a File. Now is it a Bitmap? Read the shortest possible header */

View File

@ -111,7 +111,6 @@ WriteBMP (const gchar *filename,
gint rows, cols, Spcols, channels, MapSize, SpZeile;
glong BitsPerPixel;
gint colors;
gchar *temp_buf;
guchar *pixels;
GimpPixelRgn pixel_rgn;
GimpDrawable *drawable;
@ -209,10 +208,8 @@ WriteBMP (const gchar *filename,
0, 0, drawable->width, drawable->height);
/* And let's begin the progress */
temp_buf = g_strdup_printf (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init (temp_buf);
g_free (temp_buf);
gimp_progress_init_printf (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
cur_progress = 0;
max_progress = drawable->height;

View File

@ -350,9 +350,8 @@ load_image (const gchar *filename)
return -1;
}
gimp_progress_init (NULL);
gimp_progress_set_text (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init_printf (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
if (read (fd, &bh, sizeof (BrushHeader)) != sizeof (BrushHeader))
{
@ -607,9 +606,8 @@ save_image (const gchar *filename,
return FALSE;
}
gimp_progress_init (NULL);
gimp_progress_set_text (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init_printf (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
drawable = gimp_drawable_get (drawable_ID);

View File

@ -869,7 +869,6 @@ save_image (const gchar *filename,
guint rows, cols;
gint BitsPerPixel, liberalBPP=0, useBPP=0;
gint colors;
gchar *temp_buf;
gint i;
gint transparent;
gint offset_x, offset_y;
@ -1005,10 +1004,8 @@ save_image (const gchar *filename,
/* init the progress meter */
temp_buf = g_strdup_printf (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init (temp_buf);
g_free (temp_buf);
gimp_progress_init_printf (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
/* write the GIFheader */

View File

@ -280,17 +280,16 @@ static gint32 ReadImage (FILE *, const gchar *,
static gint32
load_image (const gchar *filename)
{
FILE *fd;
char * name_buf;
unsigned char buf[16];
unsigned char c;
CMap localColorMap;
int grayScale;
int useGlobalColormap;
int bitPixel;
int imageCount = 0;
char version[4];
gint32 image_ID = -1;
FILE *fd;
guchar buf[16];
guchar c;
CMap localColorMap;
gint grayScale;
gint useGlobalColormap;
gint bitPixel;
gint imageCount = 0;
gchar version[4];
gint32 image_ID = -1;
fd = g_fopen (filename, "rb");
if (!fd)
@ -300,10 +299,8 @@ load_image (const gchar *filename)
return -1;
}
name_buf = g_strdup_printf (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init (name_buf);
g_free (name_buf);
gimp_progress_init_printf (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
if (!ReadOK (fd, buf, 6))
{

View File

@ -651,9 +651,8 @@ gih_load_image (const gchar *filename)
return -1;
}
gimp_progress_init (NULL);
gimp_progress_set_text (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init_printf (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
/* The file format starts with a painfully simple text header */
@ -1238,7 +1237,7 @@ gih_save_image (const gchar *filename,
GimpPixelRgn pixel_rgn;
GimpParasite *pipe_parasite;
gchar *header;
gchar *msg, *parstring;
gchar *parstring;
gint32 *layer_ID;
gint fd;
gint nlayers, layer, row, col;
@ -1261,10 +1260,8 @@ gih_save_image (const gchar *filename,
return FALSE;
}
msg = g_strdup_printf (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init (msg);
g_free (msg);
gimp_progress_init_printf (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
parstring = gimp_pixpipe_params_build (&gihparams);

View File

@ -242,9 +242,8 @@ save_image (const gchar *filename,
fprintf (fp, "<CAPTION>%s</CAPTION>\n",
gtmvals.captiontxt);
gimp_progress_init (NULL);
gimp_progress_set_text (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init_printf (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_pixel_rgn_init (&pixel_rgn, drawable,
0, 0, drawable->width, drawable->height,

View File

@ -788,8 +788,8 @@ iwarp (void)
destdrawable = gimp_drawable_get (animlayers[i]);
gimp_progress_init (NULL);
gimp_progress_set_text (_("Warping Frame No. %d..."), frame_number);
gimp_progress_init_printf (_("Warping Frame No. %d..."),
frame_number);
if (animate_deform_value > 0.0)
iwarp_frame ();

View File

@ -323,9 +323,8 @@ load_image (const gchar *filename)
return -1;
}
gimp_progress_init (NULL);
gimp_progress_set_text (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init_printf (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
if (read (fd, &ph, sizeof (PatternHeader)) != sizeof (PatternHeader))
{
@ -454,9 +453,8 @@ save_image (const gchar *filename,
return FALSE;
}
gimp_progress_init (NULL);
gimp_progress_set_text (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init_printf (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
drawable = gimp_drawable_get (drawable_ID);
gimp_pixel_rgn_init (&pixel_rgn, drawable, 0, 0, drawable->width,

View File

@ -311,9 +311,8 @@ load_image (const gchar *filename)
return -1;
}
gimp_progress_init (NULL);
gimp_progress_set_text (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init_printf (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
if (fread (&pcx_header, 128, 1, fd) == 0)
{
@ -548,9 +547,8 @@ save_image (const gchar *filename,
height = drawable->height;
gimp_pixel_rgn_init (&pixel_rgn, drawable, 0, 0, width, height, FALSE, FALSE);
gimp_progress_init (NULL);
gimp_progress_set_text (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init_printf (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
pcx_header.manufacturer = 0x0a;
pcx_header.version = 5;

View File

@ -331,9 +331,8 @@ load_image (const gchar *filename)
return -1;
}
gimp_progress_init (NULL);
gimp_progress_set_text (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init_printf (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
/* Read header information */
width = get_short (file);
@ -511,9 +510,8 @@ save_image (const gchar *filename,
return FALSE;
}
gimp_progress_init (NULL);
gimp_progress_set_text (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init_printf (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
/* Write the image header */
PIX_DEBUG_PRINT ("Width %hu\n", drawable->width);

View File

@ -724,9 +724,8 @@ load_image (const gchar *filename,
png_init_io (pp, fp);
gimp_progress_init (NULL);
gimp_progress_set_text (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init_printf (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
/*
* Get the image dimensions and create the image...
@ -1226,9 +1225,8 @@ save_image (const gchar *filename,
png_init_io (pp, fp);
gimp_progress_init (NULL);
gimp_progress_set_text (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init_printf (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
/*
* Get the drawable for the current image...

View File

@ -444,9 +444,8 @@ load_image (const gchar *filename)
return -1;
}
gimp_progress_init (NULL);
gimp_progress_set_text (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init_printf (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
/* allocate the necessary structures */
pnminfo = g_new (PNMInfo, 1);
@ -792,7 +791,6 @@ save_image (const gchar *filename,
unsigned char *data, *d;
char *rowbuf;
char buf[BUFLEN];
char *temp;
int np = 0;
int xres, yres;
int ypos, yend;
@ -821,10 +819,8 @@ save_image (const gchar *filename,
return FALSE;
}
temp = g_strdup_printf (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init (temp);
g_free (temp);
gimp_progress_init_printf (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
xres = drawable->width;
yres = drawable->height;

View File

@ -460,9 +460,8 @@ load_image (PopplerDocument *doc,
if (target == GIMP_PAGE_SELECTOR_TARGET_IMAGES)
images = g_new0 (gint32, pages->n_pages);
gimp_progress_init (NULL);
gimp_progress_set_text (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init_printf (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
scale = resolution / gimp_unit_get_factor (GIMP_UNIT_POINT);

View File

@ -1014,9 +1014,8 @@ load_image (const gchar *filename)
}
fclose (ifp);
gimp_progress_init (NULL);
gimp_progress_set_text (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init_printf (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
ifp = ps_open (filename, &plvals, &llx, &lly, &urx, &ury, &is_epsf,
&ChildPid);
@ -1187,9 +1186,8 @@ save_image (const gchar *filename,
return FALSE;
}
gimp_progress_init (NULL);
gimp_progress_set_text (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init_printf (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
save_ps_header (ofp, filename);

View File

@ -1882,9 +1882,8 @@ load_image (const gchar *name)
return -1;
}
gimp_progress_init (NULL);
gimp_progress_set_text (_("Opening '%s'..."),
gimp_filename_to_utf8 (name));
gimp_progress_init_printf (_("Opening '%s'..."),
gimp_filename_to_utf8 (name));
read_whole_file (fd);

View File

@ -1351,9 +1351,8 @@ save_image (const gchar *filename,
return FALSE;
}
gimp_progress_init (NULL);
gimp_progress_set_text (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init_printf (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
IFDBG g_print (" File \"%s\" has been opened\n",
gimp_filename_to_utf8 (filename));

View File

@ -386,10 +386,9 @@ run (const gchar *name,
case RNDM_SLUR: rndm_type_str = "slur"; break;
}
gimp_progress_init (NULL);
gimp_progress_set_text ("%s (%s)...",
gettext (RNDM_VERSION[rndm_type - 1]),
gettext (rndm_type_str));
gimp_progress_init_printf ("%s (%s)...",
gettext (RNDM_VERSION[rndm_type - 1]),
gettext (rndm_type_str));
gimp_tile_cache_ntiles (2 *
(drawable->width / gimp_tile_width () + 1));
/*

View File

@ -649,9 +649,8 @@ load_image (gchar *filename)
return -1;
}
gimp_progress_init (NULL);
gimp_progress_set_text (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init_printf (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
size = get_file_info (filename);

View File

@ -430,9 +430,8 @@ load_image (const gchar *filename)
*4 + sunhdr.l_ras_maplength, SEEK_SET);
}
gimp_progress_init (NULL);
gimp_progress_set_text (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init_printf (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
switch (sunhdr.l_ras_depth)
{
@ -510,9 +509,8 @@ save_image (const gchar *filename,
return FALSE;
}
gimp_progress_init (NULL);
gimp_progress_set_text (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init_printf (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
if (drawable_type == GIMP_INDEXED_IMAGE)
retval = save_index (ofp,image_ID, drawable_ID, 0, (int)psvals.rle);

View File

@ -416,9 +416,8 @@ load_image (const gchar *filename)
return -1;
}
gimp_progress_init (NULL);
gimp_progress_set_text (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init_printf (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
if (!fseek (fp, -26L, SEEK_END)) { /* Is file big enough for a footer? */
if (fread (footer, sizeof (footer), 1, fp) != 1)
@ -1029,9 +1028,8 @@ save_image (const gchar *filename,
return FALSE;
}
gimp_progress_init (NULL);
gimp_progress_set_text (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init_printf (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
header[0] = 0; /* No image identifier / description */

View File

@ -532,9 +532,8 @@ load_image (const gchar *filename)
gimp_quit ();
}
gimp_progress_init (NULL);
gimp_progress_set_text (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init_printf (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
/* We will loop through the all pages in case of multipage TIFF
and load every page as a separate layer. */
@ -1923,9 +1922,8 @@ save_image (const gchar *filename,
return FALSE;
}
gimp_progress_init (NULL);
gimp_progress_set_text (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init_printf (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
drawable = gimp_drawable_get (layer);
drawable_type = gimp_drawable_type (layer);

View File

@ -949,9 +949,8 @@ load_image (const gchar *filename)
gimp_quit ();
}
gimp_progress_init (NULL);
gimp_progress_set_text (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init_printf (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
image = gimp_image_new (width, height, GIMP_RGB);
gimp_image_set_filename (image, filename);

View File

@ -722,9 +722,8 @@ load_image (const gchar *filename)
return -1;
}
gimp_progress_init (NULL);
gimp_progress_set_text (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init_printf (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
comment = fgetcomment (fp);
@ -947,7 +946,7 @@ save_image (const gchar *filename,
gint bpp;
guchar *data, *cmap;
gchar *name_buf, *intfmt;
gchar *intfmt;
#if 0
if (save_mask)
@ -1005,10 +1004,8 @@ save_image (const gchar *filename,
return FALSE;
}
name_buf = g_strdup_printf (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init (name_buf);
g_free (name_buf);
gimp_progress_init_printf (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
/* Maybe write the image comment. */
#if 0

View File

@ -340,9 +340,8 @@ load_image (const gchar *filename)
guchar *cmap;
gint32 image_ID;
gimp_progress_init (NULL);
gimp_progress_set_text (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init_printf (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
/* read the raw file */
switch (XpmReadFileToXpmImage ((char *) filename, &xpm_image, NULL))
@ -621,9 +620,8 @@ save_image (const gchar *filename,
hash = g_hash_table_new ((GHashFunc) rgbhash, (GCompareFunc) compare);
gimp_progress_init (NULL);
gimp_progress_set_text (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init_printf (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
ncolors = alpha ? 1 : 0;

View File

@ -470,9 +470,8 @@ load_image (const gchar *filename)
}
}
gimp_progress_init (NULL);
gimp_progress_set_text (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init_printf (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
depth = xwdhdr.l_pixmap_depth;
bpp = xwdhdr.l_bits_per_pixel;
@ -537,7 +536,6 @@ save_image (const gchar *filename,
FILE *ofp;
GimpImageType drawable_type;
gint retval;
gchar *temp;
drawable_type = gimp_drawable_type (drawable_ID);
@ -569,10 +567,8 @@ save_image (const gchar *filename,
return FALSE;
}
temp = g_strdup_printf (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init (temp);
g_free (temp);
gimp_progress_init_printf (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
if (drawable_type == GIMP_INDEXED_IMAGE)
retval = save_index (ofp, image_ID, drawable_ID, 0);

View File

@ -201,9 +201,8 @@ load_image (const gchar *filename)
gint max_rows; /* max. rows allocated */
gint col, hcol; /* column, highest column ever used */
gimp_progress_init (NULL);
gimp_progress_set_text (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init_printf (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
/* initialize lookup trees */
build_tree( &white, t_white );

View File

@ -456,9 +456,8 @@ save_image (const gchar *filename,
return (FALSE);
}
gimp_progress_init (NULL);
gimp_progress_set_text (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init_printf (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
if ((drawable_type == GIMP_INDEXED_IMAGE) ||
(drawable_type == GIMP_INDEXEDA_IMAGE))

View File

@ -465,9 +465,8 @@ load_image (const gchar *filename,
return -1;
}
gimp_progress_init (NULL);
gimp_progress_set_text (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init_printf (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
fli_read_header (file, &fli_header);
if (fli_header.magic == NO_HEADER)
@ -681,9 +680,8 @@ save_image (const gchar *filename,
return FALSE;
}
gimp_progress_init (NULL);
gimp_progress_set_text (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init_printf (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
/*
* First build the fli header.

View File

@ -1296,8 +1296,6 @@ ifs_compose (GimpDrawable *drawable)
gimp_context_get_background (&color);
gimp_rgb_get_uchar (&color, &rc, &gc, &bc);
gimp_progress_init (NULL);
for (band_no = 0, band_y = 0; band_no < num_bands; band_no++)
{
GimpPixelRgn dest_rgn;
@ -1305,9 +1303,8 @@ ifs_compose (GimpDrawable *drawable)
gint progress;
gint max_progress;
gimp_progress_update (0.0);
gimp_progress_set_text (_("Rendering IFS (%d/%d)..."),
band_no + 1, num_bands);
gimp_progress_init_printf (_("Rendering IFS (%d/%d)..."),
band_no + 1, num_bands);
/* render the band to a buffer */
if (band_y + band_height > height)
@ -1323,9 +1320,8 @@ ifs_compose (GimpDrawable *drawable)
/* transfer the image to the drawable */
gimp_progress_update (0.0);
gimp_progress_set_text (_("Copying IFS to image (%d/%d)..."),
band_no + 1, num_bands);
gimp_progress_init_printf (_("Copying IFS to image (%d/%d)..."),
band_no + 1, num_bands);
progress = 0;
max_progress = band_height * width;

View File

@ -88,11 +88,8 @@ load_image (const gchar *filename,
}
if (!preview)
{
gimp_progress_init (NULL);
gimp_progress_set_text (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
}
gimp_progress_init_printf (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
image_ID = -1;
@ -606,9 +603,8 @@ load_thumbnail_image (const gchar *filename,
jerr.pub.emit_message = my_emit_message;
jerr.pub.output_message = my_output_message;
gimp_progress_init (NULL);
gimp_progress_set_text (_("Opening thumbnail for '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init_printf (_("Opening thumbnail for '%s'..."),
gimp_filename_to_utf8 (filename));
/* Establish the setjmp return context for my_error_exit to use. */
if (setjmp (jerr.setjmp_buffer))

View File

@ -220,11 +220,8 @@ save_image (const gchar *filename,
0, 0, drawable->width, drawable->height, FALSE, FALSE);
if (!preview)
{
gimp_progress_init (NULL);
gimp_progress_set_text (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
}
gimp_progress_init_printf (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
/* Step 1: allocate and initialize JPEG compression object */

View File

@ -315,9 +315,8 @@ load_image (const gchar *filename) /* I - File to load */
return -1;
};
gimp_progress_init (NULL);
gimp_progress_set_text (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init_printf (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
/*
* Get the image dimensions and create the image...
@ -535,9 +534,8 @@ save_image (const gchar *filename,
return FALSE;
};
gimp_progress_init (NULL);
gimp_progress_set_text (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init_printf (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
/*
* Allocate memory for "tile_height" rows...

View File

@ -228,10 +228,9 @@ copy_uri (const gchar *src_uri,
memsize = gimp_memsize_to_string (file_size);
gimp_progress_init (NULL);
gimp_progress_set_text (file_size > 0 ?
copying_format_str : copied_format_str,
memsize);
gimp_progress_init_printf (file_size > 0 ?
copying_format_str : copied_format_str,
memsize);
g_free (memsize);

View File

@ -166,9 +166,8 @@ uri_backend_load_image (const gchar *uri,
timeout_msg = g_strdup_printf (_("(timeout is %s seconds)"), TIMEOUT);
gimp_progress_init (NULL);
gimp_progress_set_text ("%s %s",
_("Connecting to server..."), timeout_msg);
gimp_progress_init_printf ("%s %s",
_("Connecting to server..."), timeout_msg);
read_connect:
if (fgets (buf, sizeof (buf), input) == NULL)

View File

@ -457,9 +457,8 @@ ico_load_image (const gchar *filename)
gint height = 0;
gint i;
gimp_progress_init (NULL);
gimp_progress_set_text (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init_printf (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
if (! ico_init (filename, &ico))
return -1;
@ -522,9 +521,8 @@ ico_load_thumbnail_image (const gchar *filename,
gint match = 0;
gint i;
gimp_progress_init (NULL);
gimp_progress_set_text (_("Opening thumbnail for '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init_printf (_("Opening thumbnail for '%s'..."),
gimp_filename_to_utf8 (filename));
if (! ico_init (filename, &ico))
return -1;

View File

@ -974,9 +974,8 @@ SaveICO (const gchar *filename,
if ((icon_depths = ico_show_icon_dialog (image, &num_icons)) == NULL)
return GIMP_PDB_CANCEL;
gimp_progress_init (NULL);
gimp_progress_set_text (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init_printf (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
/* Okay, let's actually save the thing with the depths the
user specified. */

View File

@ -1686,9 +1686,8 @@ save_xjt_image (const gchar *filename,
break;
}
gimp_progress_init (NULL);
gimp_progress_set_text (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init_printf (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
/* create temporary directory */
l_dirname = gimp_temp_name (".tmpdir");
@ -3312,9 +3311,8 @@ 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_id = -1; /* -1 assume there is no floating selection */
gimp_progress_init (NULL);
gimp_progress_set_text (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init_printf (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
/* create temporary directory */
l_dirname = gimp_temp_name (".tmpdir");

View File

@ -136,8 +136,7 @@ HELP
@inargs = (
{ name => 'message', type => 'string', null_ok => 1,
desc => 'Message to use in the progress dialog',
wrap => 1 }
desc => 'Message to use in the progress dialog' }
);
%invoke = (
code => <<'CODE'