mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-04 01:43:24 +00:00
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:
parent
eb4545886f
commit
e3da6be9b5
45 changed files with 201 additions and 219 deletions
19
ChangeLog
19
ChangeLog
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,7 +265,7 @@ 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;
|
||||
|
@ -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);
|
||||
|
||||
|
|
|
@ -57,7 +57,9 @@ 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,
|
||||
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);
|
||||
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -154,8 +154,7 @@ ReadBMP (const gchar *name)
|
|||
return -1;
|
||||
}
|
||||
|
||||
gimp_progress_init (NULL);
|
||||
gimp_progress_set_text (_("Opening '%s'..."),
|
||||
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 */
|
||||
|
|
|
@ -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_progress_init_printf (_("Saving '%s'..."),
|
||||
gimp_filename_to_utf8 (filename));
|
||||
gimp_progress_init (temp_buf);
|
||||
g_free (temp_buf);
|
||||
|
||||
cur_progress = 0;
|
||||
max_progress = drawable->height;
|
||||
|
|
|
@ -350,8 +350,7 @@ load_image (const gchar *filename)
|
|||
return -1;
|
||||
}
|
||||
|
||||
gimp_progress_init (NULL);
|
||||
gimp_progress_set_text (_("Opening '%s'..."),
|
||||
gimp_progress_init_printf (_("Opening '%s'..."),
|
||||
gimp_filename_to_utf8 (filename));
|
||||
|
||||
if (read (fd, &bh, sizeof (BrushHeader)) != sizeof (BrushHeader))
|
||||
|
@ -607,8 +606,7 @@ save_image (const gchar *filename,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
gimp_progress_init (NULL);
|
||||
gimp_progress_set_text (_("Saving '%s'..."),
|
||||
gimp_progress_init_printf (_("Saving '%s'..."),
|
||||
gimp_filename_to_utf8 (filename));
|
||||
|
||||
drawable = gimp_drawable_get (drawable_ID);
|
||||
|
|
|
@ -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_progress_init_printf (_("Saving '%s'..."),
|
||||
gimp_filename_to_utf8 (filename));
|
||||
gimp_progress_init (temp_buf);
|
||||
g_free (temp_buf);
|
||||
|
||||
|
||||
/* write the GIFheader */
|
||||
|
|
|
@ -281,15 +281,14 @@ static gint32
|
|||
load_image (const gchar *filename)
|
||||
{
|
||||
FILE *fd;
|
||||
char * name_buf;
|
||||
unsigned char buf[16];
|
||||
unsigned char c;
|
||||
guchar buf[16];
|
||||
guchar c;
|
||||
CMap localColorMap;
|
||||
int grayScale;
|
||||
int useGlobalColormap;
|
||||
int bitPixel;
|
||||
int imageCount = 0;
|
||||
char version[4];
|
||||
gint grayScale;
|
||||
gint useGlobalColormap;
|
||||
gint bitPixel;
|
||||
gint imageCount = 0;
|
||||
gchar version[4];
|
||||
gint32 image_ID = -1;
|
||||
|
||||
fd = g_fopen (filename, "rb");
|
||||
|
@ -300,10 +299,8 @@ load_image (const gchar *filename)
|
|||
return -1;
|
||||
}
|
||||
|
||||
name_buf = g_strdup_printf (_("Opening '%s'..."),
|
||||
gimp_progress_init_printf (_("Opening '%s'..."),
|
||||
gimp_filename_to_utf8 (filename));
|
||||
gimp_progress_init (name_buf);
|
||||
g_free (name_buf);
|
||||
|
||||
if (!ReadOK (fd, buf, 6))
|
||||
{
|
||||
|
|
|
@ -651,8 +651,7 @@ gih_load_image (const gchar *filename)
|
|||
return -1;
|
||||
}
|
||||
|
||||
gimp_progress_init (NULL);
|
||||
gimp_progress_set_text (_("Opening '%s'..."),
|
||||
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_progress_init_printf (_("Saving '%s'..."),
|
||||
gimp_filename_to_utf8 (filename));
|
||||
gimp_progress_init (msg);
|
||||
g_free (msg);
|
||||
|
||||
parstring = gimp_pixpipe_params_build (&gihparams);
|
||||
|
||||
|
|
|
@ -242,8 +242,7 @@ save_image (const gchar *filename,
|
|||
fprintf (fp, "<CAPTION>%s</CAPTION>\n",
|
||||
gtmvals.captiontxt);
|
||||
|
||||
gimp_progress_init (NULL);
|
||||
gimp_progress_set_text (_("Saving '%s'..."),
|
||||
gimp_progress_init_printf (_("Saving '%s'..."),
|
||||
gimp_filename_to_utf8 (filename));
|
||||
|
||||
gimp_pixel_rgn_init (&pixel_rgn, drawable,
|
||||
|
|
|
@ -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 ();
|
||||
|
|
|
@ -323,8 +323,7 @@ load_image (const gchar *filename)
|
|||
return -1;
|
||||
}
|
||||
|
||||
gimp_progress_init (NULL);
|
||||
gimp_progress_set_text (_("Opening '%s'..."),
|
||||
gimp_progress_init_printf (_("Opening '%s'..."),
|
||||
gimp_filename_to_utf8 (filename));
|
||||
|
||||
if (read (fd, &ph, sizeof (PatternHeader)) != sizeof (PatternHeader))
|
||||
|
@ -454,8 +453,7 @@ save_image (const gchar *filename,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
gimp_progress_init (NULL);
|
||||
gimp_progress_set_text (_("Saving '%s'..."),
|
||||
gimp_progress_init_printf (_("Saving '%s'..."),
|
||||
gimp_filename_to_utf8 (filename));
|
||||
|
||||
drawable = gimp_drawable_get (drawable_ID);
|
||||
|
|
|
@ -311,8 +311,7 @@ load_image (const gchar *filename)
|
|||
return -1;
|
||||
}
|
||||
|
||||
gimp_progress_init (NULL);
|
||||
gimp_progress_set_text (_("Opening '%s'..."),
|
||||
gimp_progress_init_printf (_("Opening '%s'..."),
|
||||
gimp_filename_to_utf8 (filename));
|
||||
|
||||
if (fread (&pcx_header, 128, 1, fd) == 0)
|
||||
|
@ -548,8 +547,7 @@ 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_progress_init_printf (_("Saving '%s'..."),
|
||||
gimp_filename_to_utf8 (filename));
|
||||
|
||||
pcx_header.manufacturer = 0x0a;
|
||||
|
|
|
@ -331,8 +331,7 @@ load_image (const gchar *filename)
|
|||
return -1;
|
||||
}
|
||||
|
||||
gimp_progress_init (NULL);
|
||||
gimp_progress_set_text (_("Opening '%s'..."),
|
||||
gimp_progress_init_printf (_("Opening '%s'..."),
|
||||
gimp_filename_to_utf8 (filename));
|
||||
|
||||
/* Read header information */
|
||||
|
@ -511,8 +510,7 @@ save_image (const gchar *filename,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
gimp_progress_init (NULL);
|
||||
gimp_progress_set_text (_("Saving '%s'..."),
|
||||
gimp_progress_init_printf (_("Saving '%s'..."),
|
||||
gimp_filename_to_utf8 (filename));
|
||||
|
||||
/* Write the image header */
|
||||
|
|
|
@ -724,8 +724,7 @@ load_image (const gchar *filename,
|
|||
|
||||
png_init_io (pp, fp);
|
||||
|
||||
gimp_progress_init (NULL);
|
||||
gimp_progress_set_text (_("Opening '%s'..."),
|
||||
gimp_progress_init_printf (_("Opening '%s'..."),
|
||||
gimp_filename_to_utf8 (filename));
|
||||
|
||||
/*
|
||||
|
@ -1226,8 +1225,7 @@ save_image (const gchar *filename,
|
|||
|
||||
png_init_io (pp, fp);
|
||||
|
||||
gimp_progress_init (NULL);
|
||||
gimp_progress_set_text (_("Saving '%s'..."),
|
||||
gimp_progress_init_printf (_("Saving '%s'..."),
|
||||
gimp_filename_to_utf8 (filename));
|
||||
|
||||
/*
|
||||
|
|
|
@ -444,8 +444,7 @@ load_image (const gchar *filename)
|
|||
return -1;
|
||||
}
|
||||
|
||||
gimp_progress_init (NULL);
|
||||
gimp_progress_set_text (_("Opening '%s'..."),
|
||||
gimp_progress_init_printf (_("Opening '%s'..."),
|
||||
gimp_filename_to_utf8 (filename));
|
||||
|
||||
/* allocate the necessary structures */
|
||||
|
@ -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_progress_init_printf (_("Saving '%s'..."),
|
||||
gimp_filename_to_utf8 (filename));
|
||||
gimp_progress_init (temp);
|
||||
g_free (temp);
|
||||
|
||||
xres = drawable->width;
|
||||
yres = drawable->height;
|
||||
|
|
|
@ -460,8 +460,7 @@ 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_progress_init_printf (_("Opening '%s'..."),
|
||||
gimp_filename_to_utf8 (filename));
|
||||
|
||||
scale = resolution / gimp_unit_get_factor (GIMP_UNIT_POINT);
|
||||
|
|
|
@ -1014,8 +1014,7 @@ load_image (const gchar *filename)
|
|||
}
|
||||
fclose (ifp);
|
||||
|
||||
gimp_progress_init (NULL);
|
||||
gimp_progress_set_text (_("Opening '%s'..."),
|
||||
gimp_progress_init_printf (_("Opening '%s'..."),
|
||||
gimp_filename_to_utf8 (filename));
|
||||
|
||||
ifp = ps_open (filename, &plvals, &llx, &lly, &urx, &ury, &is_epsf,
|
||||
|
@ -1187,8 +1186,7 @@ save_image (const gchar *filename,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
gimp_progress_init (NULL);
|
||||
gimp_progress_set_text (_("Saving '%s'..."),
|
||||
gimp_progress_init_printf (_("Saving '%s'..."),
|
||||
gimp_filename_to_utf8 (filename));
|
||||
|
||||
save_ps_header (ofp, filename);
|
||||
|
|
|
@ -1882,8 +1882,7 @@ load_image (const gchar *name)
|
|||
return -1;
|
||||
}
|
||||
|
||||
gimp_progress_init (NULL);
|
||||
gimp_progress_set_text (_("Opening '%s'..."),
|
||||
gimp_progress_init_printf (_("Opening '%s'..."),
|
||||
gimp_filename_to_utf8 (name));
|
||||
|
||||
read_whole_file (fd);
|
||||
|
|
|
@ -1351,8 +1351,7 @@ save_image (const gchar *filename,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
gimp_progress_init (NULL);
|
||||
gimp_progress_set_text (_("Saving '%s'..."),
|
||||
gimp_progress_init_printf (_("Saving '%s'..."),
|
||||
gimp_filename_to_utf8 (filename));
|
||||
|
||||
IFDBG g_print (" File \"%s\" has been opened\n",
|
||||
|
|
|
@ -386,8 +386,7 @@ run (const gchar *name,
|
|||
case RNDM_SLUR: rndm_type_str = "slur"; break;
|
||||
}
|
||||
|
||||
gimp_progress_init (NULL);
|
||||
gimp_progress_set_text ("%s (%s)...",
|
||||
gimp_progress_init_printf ("%s (%s)...",
|
||||
gettext (RNDM_VERSION[rndm_type - 1]),
|
||||
gettext (rndm_type_str));
|
||||
gimp_tile_cache_ntiles (2 *
|
||||
|
|
|
@ -649,8 +649,7 @@ load_image (gchar *filename)
|
|||
return -1;
|
||||
}
|
||||
|
||||
gimp_progress_init (NULL);
|
||||
gimp_progress_set_text (_("Opening '%s'..."),
|
||||
gimp_progress_init_printf (_("Opening '%s'..."),
|
||||
gimp_filename_to_utf8 (filename));
|
||||
|
||||
size = get_file_info (filename);
|
||||
|
|
|
@ -430,8 +430,7 @@ load_image (const gchar *filename)
|
|||
*4 + sunhdr.l_ras_maplength, SEEK_SET);
|
||||
}
|
||||
|
||||
gimp_progress_init (NULL);
|
||||
gimp_progress_set_text (_("Opening '%s'..."),
|
||||
gimp_progress_init_printf (_("Opening '%s'..."),
|
||||
gimp_filename_to_utf8 (filename));
|
||||
|
||||
switch (sunhdr.l_ras_depth)
|
||||
|
@ -510,8 +509,7 @@ save_image (const gchar *filename,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
gimp_progress_init (NULL);
|
||||
gimp_progress_set_text (_("Saving '%s'..."),
|
||||
gimp_progress_init_printf (_("Saving '%s'..."),
|
||||
gimp_filename_to_utf8 (filename));
|
||||
|
||||
if (drawable_type == GIMP_INDEXED_IMAGE)
|
||||
|
|
|
@ -416,8 +416,7 @@ load_image (const gchar *filename)
|
|||
return -1;
|
||||
}
|
||||
|
||||
gimp_progress_init (NULL);
|
||||
gimp_progress_set_text (_("Opening '%s'..."),
|
||||
gimp_progress_init_printf (_("Opening '%s'..."),
|
||||
gimp_filename_to_utf8 (filename));
|
||||
|
||||
if (!fseek (fp, -26L, SEEK_END)) { /* Is file big enough for a footer? */
|
||||
|
@ -1029,8 +1028,7 @@ save_image (const gchar *filename,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
gimp_progress_init (NULL);
|
||||
gimp_progress_set_text (_("Saving '%s'..."),
|
||||
gimp_progress_init_printf (_("Saving '%s'..."),
|
||||
gimp_filename_to_utf8 (filename));
|
||||
|
||||
header[0] = 0; /* No image identifier / description */
|
||||
|
|
|
@ -532,8 +532,7 @@ load_image (const gchar *filename)
|
|||
gimp_quit ();
|
||||
}
|
||||
|
||||
gimp_progress_init (NULL);
|
||||
gimp_progress_set_text (_("Opening '%s'..."),
|
||||
gimp_progress_init_printf (_("Opening '%s'..."),
|
||||
gimp_filename_to_utf8 (filename));
|
||||
|
||||
/* We will loop through the all pages in case of multipage TIFF
|
||||
|
@ -1923,8 +1922,7 @@ save_image (const gchar *filename,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
gimp_progress_init (NULL);
|
||||
gimp_progress_set_text (_("Saving '%s'..."),
|
||||
gimp_progress_init_printf (_("Saving '%s'..."),
|
||||
gimp_filename_to_utf8 (filename));
|
||||
|
||||
drawable = gimp_drawable_get (layer);
|
||||
|
|
|
@ -949,8 +949,7 @@ load_image (const gchar *filename)
|
|||
gimp_quit ();
|
||||
}
|
||||
|
||||
gimp_progress_init (NULL);
|
||||
gimp_progress_set_text (_("Opening '%s'..."),
|
||||
gimp_progress_init_printf (_("Opening '%s'..."),
|
||||
gimp_filename_to_utf8 (filename));
|
||||
|
||||
image = gimp_image_new (width, height, GIMP_RGB);
|
||||
|
|
|
@ -722,8 +722,7 @@ load_image (const gchar *filename)
|
|||
return -1;
|
||||
}
|
||||
|
||||
gimp_progress_init (NULL);
|
||||
gimp_progress_set_text (_("Opening '%s'..."),
|
||||
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_progress_init_printf (_("Saving '%s'..."),
|
||||
gimp_filename_to_utf8 (filename));
|
||||
gimp_progress_init (name_buf);
|
||||
g_free (name_buf);
|
||||
|
||||
/* Maybe write the image comment. */
|
||||
#if 0
|
||||
|
|
|
@ -340,8 +340,7 @@ load_image (const gchar *filename)
|
|||
guchar *cmap;
|
||||
gint32 image_ID;
|
||||
|
||||
gimp_progress_init (NULL);
|
||||
gimp_progress_set_text (_("Opening '%s'..."),
|
||||
gimp_progress_init_printf (_("Opening '%s'..."),
|
||||
gimp_filename_to_utf8 (filename));
|
||||
|
||||
/* read the raw file */
|
||||
|
@ -621,8 +620,7 @@ 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_progress_init_printf (_("Saving '%s'..."),
|
||||
gimp_filename_to_utf8 (filename));
|
||||
|
||||
ncolors = alpha ? 1 : 0;
|
||||
|
|
|
@ -470,8 +470,7 @@ load_image (const gchar *filename)
|
|||
}
|
||||
}
|
||||
|
||||
gimp_progress_init (NULL);
|
||||
gimp_progress_set_text (_("Opening '%s'..."),
|
||||
gimp_progress_init_printf (_("Opening '%s'..."),
|
||||
gimp_filename_to_utf8 (filename));
|
||||
|
||||
depth = xwdhdr.l_pixmap_depth;
|
||||
|
@ -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_progress_init_printf (_("Saving '%s'..."),
|
||||
gimp_filename_to_utf8 (filename));
|
||||
gimp_progress_init (temp);
|
||||
g_free (temp);
|
||||
|
||||
if (drawable_type == GIMP_INDEXED_IMAGE)
|
||||
retval = save_index (ofp, image_ID, drawable_ID, 0);
|
||||
|
|
|
@ -201,8 +201,7 @@ 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_progress_init_printf (_("Opening '%s'..."),
|
||||
gimp_filename_to_utf8 (filename));
|
||||
|
||||
/* initialize lookup trees */
|
||||
|
|
|
@ -456,8 +456,7 @@ save_image (const gchar *filename,
|
|||
return (FALSE);
|
||||
}
|
||||
|
||||
gimp_progress_init (NULL);
|
||||
gimp_progress_set_text (_("Saving '%s'..."),
|
||||
gimp_progress_init_printf (_("Saving '%s'..."),
|
||||
gimp_filename_to_utf8 (filename));
|
||||
|
||||
if ((drawable_type == GIMP_INDEXED_IMAGE) ||
|
||||
|
|
|
@ -465,8 +465,7 @@ load_image (const gchar *filename,
|
|||
return -1;
|
||||
}
|
||||
|
||||
gimp_progress_init (NULL);
|
||||
gimp_progress_set_text (_("Opening '%s'..."),
|
||||
gimp_progress_init_printf (_("Opening '%s'..."),
|
||||
gimp_filename_to_utf8 (filename));
|
||||
|
||||
fli_read_header (file, &fli_header);
|
||||
|
@ -681,8 +680,7 @@ save_image (const gchar *filename,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
gimp_progress_init (NULL);
|
||||
gimp_progress_set_text (_("Saving '%s'..."),
|
||||
gimp_progress_init_printf (_("Saving '%s'..."),
|
||||
gimp_filename_to_utf8 (filename));
|
||||
|
||||
/*
|
||||
|
|
|
@ -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,8 +1303,7 @@ ifs_compose (GimpDrawable *drawable)
|
|||
gint progress;
|
||||
gint max_progress;
|
||||
|
||||
gimp_progress_update (0.0);
|
||||
gimp_progress_set_text (_("Rendering IFS (%d/%d)..."),
|
||||
gimp_progress_init_printf (_("Rendering IFS (%d/%d)..."),
|
||||
band_no + 1, num_bands);
|
||||
|
||||
/* render the band to a buffer */
|
||||
|
@ -1323,8 +1320,7 @@ 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)..."),
|
||||
gimp_progress_init_printf (_("Copying IFS to image (%d/%d)..."),
|
||||
band_no + 1, num_bands);
|
||||
|
||||
progress = 0;
|
||||
|
|
|
@ -88,11 +88,8 @@ load_image (const gchar *filename,
|
|||
}
|
||||
|
||||
if (!preview)
|
||||
{
|
||||
gimp_progress_init (NULL);
|
||||
gimp_progress_set_text (_("Opening '%s'..."),
|
||||
gimp_progress_init_printf (_("Opening '%s'..."),
|
||||
gimp_filename_to_utf8 (filename));
|
||||
}
|
||||
|
||||
image_ID = -1;
|
||||
|
||||
|
@ -606,8 +603,7 @@ 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_progress_init_printf (_("Opening thumbnail for '%s'..."),
|
||||
gimp_filename_to_utf8 (filename));
|
||||
|
||||
/* Establish the setjmp return context for my_error_exit to use. */
|
||||
|
|
|
@ -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_progress_init_printf (_("Saving '%s'..."),
|
||||
gimp_filename_to_utf8 (filename));
|
||||
}
|
||||
|
||||
/* Step 1: allocate and initialize JPEG compression object */
|
||||
|
||||
|
|
|
@ -315,8 +315,7 @@ load_image (const gchar *filename) /* I - File to load */
|
|||
return -1;
|
||||
};
|
||||
|
||||
gimp_progress_init (NULL);
|
||||
gimp_progress_set_text (_("Opening '%s'..."),
|
||||
gimp_progress_init_printf (_("Opening '%s'..."),
|
||||
gimp_filename_to_utf8 (filename));
|
||||
|
||||
/*
|
||||
|
@ -535,8 +534,7 @@ save_image (const gchar *filename,
|
|||
return FALSE;
|
||||
};
|
||||
|
||||
gimp_progress_init (NULL);
|
||||
gimp_progress_set_text (_("Saving '%s'..."),
|
||||
gimp_progress_init_printf (_("Saving '%s'..."),
|
||||
gimp_filename_to_utf8 (filename));
|
||||
|
||||
/*
|
||||
|
|
|
@ -228,8 +228,7 @@ copy_uri (const gchar *src_uri,
|
|||
|
||||
memsize = gimp_memsize_to_string (file_size);
|
||||
|
||||
gimp_progress_init (NULL);
|
||||
gimp_progress_set_text (file_size > 0 ?
|
||||
gimp_progress_init_printf (file_size > 0 ?
|
||||
copying_format_str : copied_format_str,
|
||||
memsize);
|
||||
|
||||
|
|
|
@ -166,8 +166,7 @@ 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",
|
||||
gimp_progress_init_printf ("%s %s",
|
||||
_("Connecting to server..."), timeout_msg);
|
||||
|
||||
read_connect:
|
||||
|
|
|
@ -457,8 +457,7 @@ ico_load_image (const gchar *filename)
|
|||
gint height = 0;
|
||||
gint i;
|
||||
|
||||
gimp_progress_init (NULL);
|
||||
gimp_progress_set_text (_("Opening '%s'..."),
|
||||
gimp_progress_init_printf (_("Opening '%s'..."),
|
||||
gimp_filename_to_utf8 (filename));
|
||||
|
||||
if (! ico_init (filename, &ico))
|
||||
|
@ -522,8 +521,7 @@ 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_progress_init_printf (_("Opening thumbnail for '%s'..."),
|
||||
gimp_filename_to_utf8 (filename));
|
||||
|
||||
if (! ico_init (filename, &ico))
|
||||
|
|
|
@ -974,8 +974,7 @@ 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_progress_init_printf (_("Saving '%s'..."),
|
||||
gimp_filename_to_utf8 (filename));
|
||||
|
||||
/* Okay, let's actually save the thing with the depths the
|
||||
|
|
|
@ -1686,8 +1686,7 @@ save_xjt_image (const gchar *filename,
|
|||
break;
|
||||
}
|
||||
|
||||
gimp_progress_init (NULL);
|
||||
gimp_progress_set_text (_("Saving '%s'..."),
|
||||
gimp_progress_init_printf (_("Saving '%s'..."),
|
||||
gimp_filename_to_utf8 (filename));
|
||||
|
||||
/* create temporary directory */
|
||||
|
@ -3312,8 +3311,7 @@ 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_progress_init_printf (_("Opening '%s'..."),
|
||||
gimp_filename_to_utf8 (filename));
|
||||
|
||||
/* create temporary directory */
|
||||
|
|
|
@ -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'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue