Commit 4cf9d0e4 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

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.
parent 08bd204c
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>
* 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);
if (! message || ! strlen (message))
if (! message)
message = _("Please wait...");
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);
if (! message)
message = plug_in->prog;
if (! proc_frame->progress)
{
proc_frame->progress = gimp_new_progress (plug_in->gimp, display_ID);
......@@ -78,14 +75,17 @@ plug_in_progress_start (PlugIn *plug_in,
if (gimp_progress_is_active (proc_frame->progress))
{
gimp_progress_set_text (proc_frame->progress, message);
if (message)
gimp_progress_set_text (proc_frame->progress, message);
if (gimp_progress_get_value (proc_frame->progress) > 0.0)
gimp_progress_set_value (proc_frame->progress, 0.0);
}
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);
if (! message)
message = plug_in->prog;
if (! proc_frame->progress)
{
proc_frame->progress = gimp_new_progress (plug_in->gimp, display_ID);
......@@ -78,14 +75,17 @@ plug_in_progress_start (PlugIn *plug_in,
if (gimp_progress_is_active (proc_frame->progress))
{
gimp_progress_set_text (proc_frame->progress, message);
if (message)
gimp_progress_set_text (proc_frame->progress, message);
if (gimp_progress_get_value (proc_frame->progress) > 0.0)
gimp_progress_set_value (proc_frame->progress, 0.0);
}
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>
@message:
@format:
@Varargs:
@Returns:
......
......@@ -178,6 +178,42 @@ gimp_progress_uninstall (const gchar *progress_callback)
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 */
......
......@@ -42,6 +42,9 @@ const gchar * gimp_progress_install (GimpProgressStartCallback start_callback,
gpointer user_data);
gpointer gimp_progress_uninstall (const gchar *progress_callback);
void gimp_progress_set_text (const gchar *format,
...) G_GNUC_PRINTF (1, 2);
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.
*
* 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);
gboolean _gimp_progress_install (const gchar *progress_callback);
gboolean _gimp_progress_uninstall (const gchar *progress_callback);
gboolean gimp_progress_cancel (const gchar *progress_callback);
......
......@@ -136,7 +136,6 @@ gint32
ReadBMP (const gchar *name)
{
FILE *fd;
gchar *temp_buf;
guchar buffer[64];
gint ColormapSize, rowbytes, Maps;
gboolean Grey;
......@@ -155,10 +154,9 @@ ReadBMP (const gchar *name)
return -1;
}
temp_buf = g_strdup_printf (_("Opening '%s'..."),
gimp_filename_to_utf8 (name));
gimp_progress_init (temp_buf);
g_free (temp_buf);
gimp_progress_init (NULL);
gimp_progress_set_text (_("Opening '%s'..."),
gimp_filename_to_utf8 (name));
/* It is a File. Now is it a Bitmap? Read the shortest possible header */
......
......@@ -306,7 +306,6 @@ run (const gchar *name,
static gint32
load_image (const gchar *filename)
{
gchar *temp;
gchar *name;
gint fd;
BrushHeader bh;
......@@ -329,10 +328,9 @@ load_image (const gchar *filename)
return -1;
}
temp = g_strdup_printf (_("Opening '%s'..."),
gimp_progress_init (NULL);
gimp_progress_set_text (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init (temp);
g_free (temp);
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)
{
temp = g_new (gchar, bn_size);
gchar *temp = g_new (gchar, bn_size);
if ((read (fd, temp, bn_size)) < bn_size)
{
......@@ -570,7 +568,6 @@ save_image (const gchar *filename,
gint line;
gint x;
GimpPixelRgn pixel_rgn;
gchar *temp;
if (gimp_drawable_type (drawable_ID) != GIMP_GRAY_IMAGE &&
gimp_drawable_type (drawable_ID) != GIMP_RGBA_IMAGE)
......@@ -588,10 +585,9 @@ save_image (const gchar *filename,
return FALSE;
}
temp = g_strdup_printf (_("Saving '%s'..."),
gimp_progress_init (NULL);
gimp_progress_set_text (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init (temp);
g_free (temp);
drawable = gimp_drawable_get (drawable_ID);
......
......@@ -630,7 +630,6 @@ gih_load_one_brush (gint fd,
static gint32
gih_load_image (const gchar *filename)
{
gchar *temp;
gint fd;
gint i;
gint32 image_ID;
......@@ -650,10 +649,9 @@ gih_load_image (const gchar *filename)
return -1;
}
temp = g_strdup_printf (_("Opening '%s'..."),
gimp_progress_init (NULL);
gimp_progress_set_text (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init (temp);
g_free (temp);
/* The file format starts with a painfully simple text header */
......
......@@ -213,7 +213,6 @@ save_image (const gchar *filename,
guchar *buffer, *buf2;
gchar *width, *height;
GimpPixelRgn pixel_rgn;
gchar *name;
FILE *fp;
palloc = g_new (int, drawable->width * drawable->height);
......@@ -242,10 +241,9 @@ save_image (const gchar *filename,
fprintf (fp, "<CAPTION>%s</CAPTION>\n",
gtmvals.captiontxt);
name = g_strdup_printf (_("Saving '%s'..."),
gimp_progress_init (NULL);
gimp_progress_set_text (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init (name);
g_free (name);
gimp_pixel_rgn_init (&pixel_rgn, drawable,
0, 0, drawable->width, drawable->height,
......
......@@ -753,7 +753,6 @@ iwarp (void)
gint i;
gint32 layerID;
gint32 *animlayers;
gchar *st;
gdouble delta;
if (image_bpp == 1 || image_bpp == 3)
......@@ -780,7 +779,8 @@ iwarp (void)
frame_number = 0;
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);
gimp_layer_add_alpha (animlayers[i]);
gimp_drawable_set_name (animlayers[i], st);
......@@ -790,9 +790,8 @@ iwarp (void)
destdrawable = gimp_drawable_get (animlayers[i]);
st = g_strdup_printf (_("Warping Frame No. %d..."), frame_number);
gimp_progress_init (st);
g_free (st);
gimp_progress_init (NULL);
gimp_progress_set_text (_("Warping Frame No. %d..."), frame_number);
if (animate_deform_value > 0.0)
iwarp_frame ();
......@@ -800,14 +799,15 @@ iwarp (void)
animate_deform_value = animate_deform_value + delta;
frame_number++;
}
if (do_animate_ping_pong)
{
st = g_strdup_printf (_("Warping Frame No. %d..."), frame_number);
gimp_progress_init (_("Ping pong"));
g_free (st);
for (i = 0; i < animate_num_frames; i++)
{
gchar *st;
gimp_progress_update ((gdouble) i / (animate_num_frames - 1));
layerID = gimp_layer_copy (animlayers[animate_num_frames-i-1]);
......
......@@ -280,10 +280,10 @@ run (const gchar *name,
static gint32
load_image (const gchar *filename)
{
gchar *temp;
gint fd;
PatternHeader ph;
gchar *name;
gchar *temp;
guchar *buffer;
gint32 image_ID;
gint32 layer_ID;
......@@ -302,10 +302,9 @@ load_image (const gchar *filename)
return -1;
}
temp = g_strdup_printf (_("Opening '%s'..."),
gimp_progress_init (NULL);
gimp_progress_set_text (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init (temp);
g_free (temp);
if (read (fd, &ph, sizeof (PatternHeader)) != sizeof (PatternHeader))
{
......@@ -424,7 +423,6 @@ save_image (const gchar *filename,
GimpDrawable *drawable;
gint line;
GimpPixelRgn pixel_rgn;
gchar *temp;
fd = open (filename, O_CREAT | O_TRUNC | O_WRONLY | _O_BINARY, 0644);
......@@ -435,10 +433,9 @@ save_image (const gchar *filename,
return FALSE;
}
temp = g_strdup_printf (_("Saving '%s'..."),
gimp_progress_init (NULL);
gimp_progress_set_text (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init (temp);
g_free (temp);
drawable = gimp_drawable_get (drawable_ID);
gimp_pixel_rgn_init (&pixel_rgn, drawable, 0, 0, drawable->width,
......
......@@ -291,7 +291,6 @@ load_image (const gchar *filename)
FILE *fd;
GimpDrawable *drawable;
GimpPixelRgn pixel_rgn;
gchar *message;
gint offset_x, offset_y, height, width;
gint32 image, layer;
guchar *dest, cmap[768];
......@@ -304,10 +303,9 @@ load_image (const gchar *filename)
return -1;
}
message = g_strdup_printf (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init (message);
g_free (message);
gimp_progress_init (NULL);
gimp_progress_set_text (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
if (fread (&pcx_header, 128, 1, fd) == 0)
{
......@@ -532,7 +530,6 @@ save_image (const gchar *filename,
GimpImageType drawable_type;
guchar *cmap= NULL, *pixels;
gint offset_x, offset_y, width, height;
gchar *message;
int colors, i;
drawable = gimp_drawable_get (layer);
......@@ -542,10 +539,9 @@ save_image (const gchar *filename,
height = drawable->height;
gimp_pixel_rgn_init (&pixel_rgn, drawable, 0, 0, width, height, FALSE, FALSE);
message = g_strdup_printf (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init (message);
g_free (message);
gimp_progress_init (NULL);
gimp_progress_set_text (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
pcx_header.manufacturer = 0x0a;
pcx_header.version = 5;
......
......@@ -311,7 +311,6 @@ load_image (const gchar *filename)
{
gint i, j, tile_height, row;
FILE *file = NULL;
gchar *progMessage = ident; /* only to suppress compiler warnings */
guchar *dest;
guchar *dest_base;
GimpDrawable *drawable;
......@@ -334,11 +333,9 @@ load_image (const gchar *filename)
return -1;
}
/* Set up progress display */
progMessage = g_strdup_printf (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init (progMessage);
g_free (progMessage);
gimp_progress_init (NULL);
gimp_progress_set_text (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
/* Read header information */
width = get_short (file);
......@@ -494,7 +491,6 @@ save_image (const gchar *filename,
gboolean savingColor = TRUE;
guchar *src;
guchar *src_base;
gchar *progMessage;
GimpDrawable *drawable;
GimpPixelRgn pixel_rgn;
FILE *file;
......@@ -517,11 +513,9 @@ save_image (const gchar *filename,
return FALSE;
}
/* Set up progress display */
progMessage = g_strdup_printf (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init (progMessage);
g_free (progMessage);
gimp_progress_init (NULL);
gimp_progress_set_text (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
/* Write the image header */
PIX_DEBUG_PRINT ("Width %hu\n", drawable->width);
......
......@@ -630,7 +630,6 @@ load_image (const gchar *filename,
png_infop info; /* PNG info pointers */
guchar **pixels, /* Pixel rows */
*pixel; /* Pixel data */
gchar *progress; /* Title for progress display... */
guchar alpha[256], /* Index -> Alpha */
*alpha_ptr; /* Temporary pointer */
......@@ -678,10 +677,9 @@ load_image (const gchar *filename,
png_init_io (pp, fp);
progress = g_strdup_printf (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init (progress);
g_free (progress);
gimp_progress_init (NULL);
gimp_progress_set_text (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
/*
* Get the image dimensions and create the image...
......@@ -1092,7 +1090,6 @@ save_image (const gchar *filename,
guchar **pixels, /* Pixel rows */
*fixed, /* Fixed-up pixel data */
*pixel; /* Pixel data */
gchar *progress; /* Title for progress display... */
gdouble xres, yres; /* GIMP resolution (dpi) */
png_color_16 background; /* Background color */
png_time mod_time; /* Modification time (ie NOW) */
......@@ -1182,10 +1179,9 @@ save_image (const gchar *filename,
png_init_io (pp, fp);
progress = g_strdup_printf (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init (progress);
g_free (progress);
gimp_progress_init (NULL);
gimp_progress_set_text (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
/*
* Get the drawable for the current image...
......
......@@ -418,7 +418,6 @@ load_image (const gchar *filename)
gint32 layer_ID;
GimpDrawable *drawable;
int fd; /* File descriptor */
char *temp;
char buf[BUFLEN]; /* buffer for random things like scanning */
PNMInfo *pnminfo;
PNMScanner * volatile scan;
......@@ -434,10 +433,9 @@ load_image (const gchar *filename)
return -1;
}
temp = g_strdup_printf (_("Opening '%s'..."),
gimp_progress_init (NULL);
gimp_progress_set_text (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init (temp);
g_free (temp);
/* allocate the necessary structures */
pnminfo = g_new (PNMInfo, 1);
......
......@@ -993,10 +993,9 @@ load_image (const gchar *filename)
}
fclose (ifp);
temp = g_strdup_printf (_("Opening '%s'..."),
gimp_progress_init (NULL);
gimp_progress_set_text (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init (temp);
g_free (temp);
ifp = ps_open (filename, &plvals, &llx, &lly, &urx, &ury, &is_epsf,
&ChildPid);
......@@ -1089,7 +1088,6 @@ save_image (const gchar *filename,
FILE* ofp;
GimpImageType drawable_type;
gint retval;
char *temp = ident; /* Just to satisfy lint/gcc */
/* initialize */
......@@ -1125,10 +1123,9 @@ save_image (const gchar *filename,
return FALSE;
}
temp = g_strdup_printf (_("Saving '%s'..."),
gimp_progress_init (NULL);
gimp_progress_set_text (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
gimp_progress_init (temp);
g_free (temp);
save_ps_header (ofp, filename);
......
......@@ -1736,7 +1736,6 @@ load_image (const gchar *name)
{
FILE *fd;
gboolean want_aux;
char *name_buf;
guchar *cmykbuf;
guchar *dest = NULL, *temp;
long channels, nguchars;
......@@ -1761,10 +1760,9 @@ load_image (const gchar *name)
return -1;
}
name_buf = g_strdup_printf (_("Opening '%s'..."),
gimp_filename_to_utf8 (name));
gimp_progress_init (name_buf);
g_free (name_buf);
gimp_progress_init (NULL);
gimp_progress_set_text (_("Opening '%s'..."),
gimp_filename_to_utf8 (name));
read_whole_file (fd);
......
......@@ -1573,11 +1573,10 @@ gint
save_image (const gchar *filename,
gint32 image_id)
{
FILE *fd;
gchar *name_buf;
FILE *fd;
gint32 *layers;
int nlayers;
int i;
gint nlayers;
gint i;
GimpDrawable *drawable;
IFDBG printf (" Function: save_image\n");
......@@ -1614,10 +1613,9 @@ 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 (NULL);
gimp_progress_set_text (_("Saving '%s'..."),
gimp_filename_to_utf8 (filename));
IFDBG g_print (" File \"%s\" has been opened\n",
gimp_filename_to_utf8 (filename));
......
......@@ -296,7 +296,6 @@ run (const gchar *name,
GimpRunMode run_mode;
GimpPDBStatusType status = GIMP_PDB_SUCCESS; /* assume the best! */
gchar *rndm_type_str = "";
gchar prog_label[32];
static GimpParam values[1];
GRand *gr; /* The GRand object which generates the
* random numbers */
......@@ -400,11 +399,12 @@ run (const gchar *name,
case RNDM_SLUR: rndm_type_str = "slur"; break;
}
sprintf (prog_label, "%s (%s)...",
gettext (RNDM_VERSION[rndm_type - 1]),
gettext (rndm_type_str));
gimp_progress_init (prog_label);
gimp_tile_cache_ntiles (2 * (drawable->width / gimp_tile_width () + 1));
gimp_progress_init (NULL);
gimp_progress_set_text ("%s (%s)...",
gettext (RNDM_VERSION[rndm_type - 1]),
gettext (rndm_type_str));
gimp_tile_cache_ntiles (2 *
(drawable->width / gimp_tile_width () + 1));
/*
* Initialize the g_rand() function seed
*/
......
......@@ -625,7 +625,6 @@ load_image (gchar *filename)
GimpImageBaseType itype = GIMP_RGB_IMAGE;
gint32 size;
gint bpp = 0;
gchar *name_buf;
data = g_new0 (RawGimpData, 1);
......@@ -637,10 +636,9 @@ load_image (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 (NULL);
gimp_progress_set_text (_("Opening '%s'..."),
gimp_filename_to_utf8 (filename));
size = get_file_info (filename);
......
......@@ -372,7 +372,6 @@ load_image (const gchar *filename)
{
gint32 image_ID;
FILE *ifp;
char *temp = ident; /* Just to satisfy gcc/lint */
L_SUNFILEHEADER sunhdr;
guchar *suncolmap = NULL;
......@@ -433,10 +432,9 @@ load_image (const gchar *filename)
*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_progress_init (temp);
g_free (temp);
switch (sunhdr.l_ras_depth)
{
......@@ -483,7 +481,6 @@ save_image (const gchar *filename,
FILE* ofp;
GimpImageType drawable_type;
gint retval;
char *temp;
drawable_type = gimp_drawable_type (drawable_ID);
......@@ -515,10 +512,9 @@ save_image (const gchar *filename,
return FALSE;
}
temp = g_strdup_printf (_("Saving '%s'..."),
gimp_progress_init (NULL);
gimp_progress_set_text (_("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, (int)psvals.rle);
......
......@@ -400,7 +400,6 @@ static gint32
load_image (const gchar *filename)
{
FILE *fp;
gchar *name_buf;
tga_info info;
guchar header[18];
guchar footer[26];
......@@ -417,10 +416,9 @@ 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 (NULL);
gimp_progress_set_text (_("Opening '%s'..."),