app: some GimpProgress cleanup

- change start() and set_text() to use "format" and "..." instead of
  "message", allowing to format progress messages in place
- s/cancelable/cancellable/
- move "cancellable" to be the second argument of start()
This commit is contained in:
Michael Natterer 2014-07-12 23:45:20 +02:00
parent 335381579c
commit a6601d563b
46 changed files with 212 additions and 205 deletions

View File

@ -342,8 +342,8 @@ image_resize_to_layers_cmd_callback (GtkAction *action,
image = gimp_display_get_image (display);
progress = gimp_progress_start (GIMP_PROGRESS (display),
_("Resizing"), FALSE);
progress = gimp_progress_start (GIMP_PROGRESS (display), FALSE,
_("Resizing"));
gimp_image_resize_to_layers (image,
action_data_get_context (data),
@ -366,8 +366,8 @@ image_resize_to_selection_cmd_callback (GtkAction *action,
image = gimp_display_get_image (display);
progress = gimp_progress_start (GIMP_PROGRESS (display),
_("Resizing"), FALSE);
progress = gimp_progress_start (GIMP_PROGRESS (display), FALSE,
_("Resizing"));
gimp_image_resize_to_selection (image,
action_data_get_context (data),
@ -455,8 +455,8 @@ image_flip_cmd_callback (GtkAction *action,
image = gimp_display_get_image (display);
progress = gimp_progress_start (GIMP_PROGRESS (display),
_("Flipping"), FALSE);
progress = gimp_progress_start (GIMP_PROGRESS (display), FALSE,
_("Flipping"));
gimp_image_flip (image, action_data_get_context (data),
(GimpOrientationType) value, progress);
@ -479,8 +479,8 @@ image_rotate_cmd_callback (GtkAction *action,
image = gimp_display_get_image (display);
progress = gimp_progress_start (GIMP_PROGRESS (display),
_("Rotating"), FALSE);
progress = gimp_progress_start (GIMP_PROGRESS (display), FALSE,
_("Rotating"));
gimp_image_rotate (image, action_data_get_context (data),
(GimpRotationType) value, progress);
@ -698,8 +698,8 @@ image_resize_callback (GtkWidget *dialog,
height == gimp_image_get_height (image))
return;
progress = gimp_progress_start (GIMP_PROGRESS (display),
_("Resizing"), FALSE);
progress = gimp_progress_start (GIMP_PROGRESS (display), FALSE,
_("Resizing"));
gimp_image_resize_with_layers (image,
context,
@ -798,8 +798,8 @@ image_scale_callback (GtkWidget *dialog,
{
GimpProgress *progress;
progress = gimp_progress_start (GIMP_PROGRESS (user_data),
_("Scaling"), FALSE);
progress = gimp_progress_start (GIMP_PROGRESS (user_data), FALSE,
_("Scaling"));
gimp_image_scale (image, width, height, interpolation, progress);

View File

@ -1178,7 +1178,7 @@ layers_scale_layer_callback (GtkWidget *dialog,
progress = GIMP_PROGRESS (progress_dialog);
}
progress = gimp_progress_start (progress, _("Scaling"), FALSE);
progress = gimp_progress_start (progress, FALSE, _("Scaling"));
gimp_item_scale_by_origin (item,
width, height, interpolation,

View File

@ -88,7 +88,7 @@ gimp_drawable_merge_filter (GimpDrawable *drawable,
GimpFilter *filter,
GimpProgress *progress,
const gchar *undo_desc,
gboolean cancelable)
gboolean cancellable)
{
GeglRectangle rect;
gboolean success = TRUE;
@ -167,7 +167,7 @@ gimp_drawable_merge_filter (GimpDrawable *drawable,
gimp_drawable_get_buffer (drawable),
&rect,
cache, rects, n_rects,
cancelable))
cancellable))
{
/* finished successfully */

View File

@ -35,7 +35,7 @@ gboolean gimp_drawable_merge_filter (GimpDrawable *drawable,
GimpFilter *filter,
GimpProgress *progress,
const gchar *undo_desc,
gboolean cancelable);
gboolean cancellable);
#endif /* __GIMP_DRAWABLE_FILTER_H__ */

View File

@ -61,9 +61,8 @@ gimp_drawable_foreground_extract (GimpDrawable *drawable,
g_return_val_if_fail (GEGL_IS_BUFFER (trimap), NULL);
g_return_val_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress), NULL);
progress = gimp_progress_start (progress,
_("Computing alpha of unknown pixels"),
FALSE);
progress = gimp_progress_start (progress, FALSE,
_("Computing alpha of unknown pixels"));
drawable_buffer = gimp_drawable_get_buffer (drawable);

View File

@ -104,7 +104,7 @@ gimp_image_convert_precision (GimpImage *image,
}
if (progress)
gimp_progress_start (progress, undo_desc, FALSE);
gimp_progress_start (progress, FALSE, "%s", undo_desc);
g_object_freeze_notify (G_OBJECT (image));

View File

@ -400,7 +400,7 @@ gimp_image_map_apply (GimpImageMap *image_map,
gboolean
gimp_image_map_commit (GimpImageMap *image_map,
GimpProgress *progress,
gboolean cancelable)
gboolean cancellable)
{
gboolean success = TRUE;
@ -413,7 +413,7 @@ gimp_image_map_commit (GimpImageMap *image_map,
image_map->filter,
progress,
image_map->undo_desc,
cancelable);
cancellable);
gimp_image_map_remove_filter (image_map);

View File

@ -68,7 +68,7 @@ void gimp_image_map_apply (GimpImageMap *image_map,
gboolean gimp_image_map_commit (GimpImageMap *image_map,
GimpProgress *progress,
gboolean cancelable);
gboolean cancellable);
void gimp_image_map_abort (GimpImageMap *image_map);

View File

@ -64,8 +64,8 @@ static void gimp_pdb_progress_set_property (GObject *object,
GParamSpec *pspec);
static GimpProgress * gimp_pdb_progress_progress_start (GimpProgress *progress,
const gchar *message,
gboolean cancelable);
gboolean cancellable,
const gchar *message);
static void gimp_pdb_progress_progress_end (GimpProgress *progress);
static gboolean gimp_pdb_progress_progress_is_active (GimpProgress *progress);
static void gimp_pdb_progress_progress_set_text (GimpProgress *progress,
@ -299,8 +299,8 @@ gimp_pdb_progress_run_callback (GimpPdbProgress *progress,
static GimpProgress *
gimp_pdb_progress_progress_start (GimpProgress *progress,
const gchar *message,
gboolean cancelable)
gboolean cancellable,
const gchar *message)
{
GimpPdbProgress *pdb_progress = GIMP_PDB_PROGRESS (progress);

View File

@ -96,20 +96,33 @@ gimp_progress_iface_base_init (GimpProgressInterface *progress_iface)
GimpProgress *
gimp_progress_start (GimpProgress *progress,
const gchar *message,
gboolean cancelable)
gboolean cancellable,
const gchar *format,
...)
{
GimpProgressInterface *progress_iface;
g_return_val_if_fail (GIMP_IS_PROGRESS (progress), NULL);
if (! message)
message = _("Please wait");
g_return_val_if_fail (format != NULL, NULL);
progress_iface = GIMP_PROGRESS_GET_INTERFACE (progress);
if (progress_iface->start)
return progress_iface->start (progress, message, cancelable);
{
GimpProgress *ret;
va_list args;
gchar *text;
va_start (args, format);
text = g_strdup_vprintf (format, args);
va_end (args);
ret = progress_iface->start (progress, cancellable, text);
g_free (text);
return ret;
}
return NULL;
}
@ -144,19 +157,29 @@ gimp_progress_is_active (GimpProgress *progress)
void
gimp_progress_set_text (GimpProgress *progress,
const gchar *message)
const gchar *format,
...)
{
GimpProgressInterface *progress_iface;
g_return_if_fail (GIMP_IS_PROGRESS (progress));
if (! message || ! strlen (message))
message = _("Please wait");
g_return_if_fail (format != NULL);
progress_iface = GIMP_PROGRESS_GET_INTERFACE (progress);
if (progress_iface->set_text)
progress_iface->set_text (progress, message);
{
va_list args;
gchar *text;
va_start (args, format);
text = g_strdup_vprintf (format, args);
va_end (args);
progress_iface->set_text (progress, text);
g_free (text);
}
}
void

View File

@ -36,8 +36,8 @@ struct _GimpProgressInterface
/* virtual functions */
GimpProgress * (* start) (GimpProgress *progress,
const gchar *message,
gboolean cancelable);
gboolean cancellable,
const gchar *message);
void (* end) (GimpProgress *progress);
gboolean (* is_active) (GimpProgress *progress);
@ -64,13 +64,15 @@ struct _GimpProgressInterface
GType gimp_progress_interface_get_type (void) G_GNUC_CONST;
GimpProgress * gimp_progress_start (GimpProgress *progress,
const gchar *message,
gboolean cancelable);
gboolean cancellable,
const gchar *format,
...) G_GNUC_PRINTF (3, 4);
void gimp_progress_end (GimpProgress *progress);
gboolean gimp_progress_is_active (GimpProgress *progress);
void gimp_progress_set_text (GimpProgress *progress,
const gchar *message);
const gchar *message,
...) G_GNUC_PRINTF (2, 3);
void gimp_progress_set_value (GimpProgress *progress,
gdouble percentage);
gdouble gimp_progress_get_value (GimpProgress *progress);

View File

@ -30,8 +30,8 @@ static void gimp_sub_progress_iface_init (GimpProgressInterface *if
static void gimp_sub_progress_finalize (GObject *object);
static GimpProgress * gimp_sub_progress_start (GimpProgress *progress,
const gchar *message,
gboolean cancelable);
gboolean cancellable,
const gchar *message);
static void gimp_sub_progress_end (GimpProgress *progress);
static gboolean gimp_sub_progress_is_active (GimpProgress *progress);
static void gimp_sub_progress_set_text (GimpProgress *progress,
@ -101,8 +101,8 @@ gimp_sub_progress_iface_init (GimpProgressInterface *iface)
static GimpProgress *
gimp_sub_progress_start (GimpProgress *progress,
const gchar *message,
gboolean cancelable)
gboolean cancellable,
const gchar *message)
{
/* does nothing */
return NULL;

View File

@ -258,8 +258,8 @@ convert_precision_dialog_response (GtkWidget *widget,
{
GimpProgress *progress;
progress = gimp_progress_start (dialog->progress,
_("Converting to lower bit depth"), FALSE);
progress = gimp_progress_start (dialog->progress, FALSE,
_("Converting to lower bit depth"));
gimp_image_convert_precision (dialog->image,
dialog->precision,

View File

@ -305,8 +305,8 @@ convert_dialog_response (GtkWidget *widget,
GimpProgress *progress;
GError *error = NULL;
progress = gimp_progress_start (dialog->progress,
_("Converting to indexed colors"), FALSE);
progress = gimp_progress_start (dialog->progress, FALSE,
_("Converting to indexed colors"));
/* Convert the image to indexed color */
if (! gimp_image_convert_type (dialog->image,

View File

@ -88,8 +88,8 @@ static cairo_region_t * gimp_canvas_progress_get_extents (GimpCanvasItem *ite
gdouble y);
static GimpProgress * gimp_canvas_progress_start (GimpProgress *progress,
const gchar *message,
gboolean cancelable);
gboolean cancellable,
const gchar *message);
static void gimp_canvas_progress_end (GimpProgress *progress);
static gboolean gimp_canvas_progress_is_active (GimpProgress *progress);
static void gimp_canvas_progress_set_text (GimpProgress *progress,
@ -346,8 +346,8 @@ gimp_canvas_progress_hit (GimpCanvasItem *item,
static GimpProgress *
gimp_canvas_progress_start (GimpProgress *progress,
const gchar *message,
gboolean cancelable)
gboolean cancellable,
const gchar *message)
{
gimp_canvas_progress_set_text (progress, message);

View File

@ -99,8 +99,8 @@ static void gimp_display_get_property (GObject *object
GParamSpec *pspec);
static GimpProgress * gimp_display_progress_start (GimpProgress *progress,
const gchar *message,
gboolean cancelable);
gboolean cancellable,
const gchar *message);
static void gimp_display_progress_end (GimpProgress *progress);
static gboolean gimp_display_progress_is_active (GimpProgress *progress);
static void gimp_display_progress_set_text (GimpProgress *progress,
@ -267,15 +267,15 @@ gimp_display_get_property (GObject *object,
static GimpProgress *
gimp_display_progress_start (GimpProgress *progress,
const gchar *message,
gboolean cancelable)
gboolean cancellable,
const gchar *message)
{
GimpDisplay *display = GIMP_DISPLAY (progress);
GimpDisplayPrivate *private = GIMP_DISPLAY_GET_PRIVATE (display);
if (private->shell)
return gimp_progress_start (GIMP_PROGRESS (private->shell),
message, cancelable);
return gimp_progress_start (GIMP_PROGRESS (private->shell), cancellable,
"%s", message);
return NULL;
}
@ -310,7 +310,7 @@ gimp_display_progress_set_text (GimpProgress *progress,
GimpDisplayPrivate *private = GIMP_DISPLAY_GET_PRIVATE (display);
if (private->shell)
gimp_progress_set_text (GIMP_PROGRESS (private->shell), message);
gimp_progress_set_text (GIMP_PROGRESS (private->shell), "%s", message);
}
static void

View File

@ -33,13 +33,14 @@
static GimpProgress *
gimp_display_shell_progress_start (GimpProgress *progress,
const gchar *message,
gboolean cancelable)
gboolean cancellable,
const gchar *message)
{
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (progress);
GimpStatusbar *statusbar = gimp_display_shell_get_statusbar (shell);
return gimp_progress_start (GIMP_PROGRESS (statusbar), message, cancelable);
return gimp_progress_start (GIMP_PROGRESS (statusbar), cancellable,
"%s", message);
}
static void
@ -67,7 +68,7 @@ gimp_display_shell_progress_set_text (GimpProgress *progress,
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (progress);
GimpStatusbar *statusbar = gimp_display_shell_get_statusbar (shell);
gimp_progress_set_text (GIMP_PROGRESS (statusbar), message);
gimp_progress_set_text (GIMP_PROGRESS (statusbar), "%s", message);
}
static void

View File

@ -84,8 +84,8 @@ static void gimp_statusbar_hbox_size_request (GtkWidget *widget,
static GimpProgress *
gimp_statusbar_progress_start (GimpProgress *progress,
const gchar *message,
gboolean cancelable);
gboolean cancellable,
const gchar *message);
static void gimp_statusbar_progress_end (GimpProgress *progress);
static gboolean gimp_statusbar_progress_is_active (GimpProgress *progress);
static void gimp_statusbar_progress_set_text (GimpProgress *progress,
@ -400,8 +400,8 @@ gimp_statusbar_hbox_size_request (GtkWidget *widget,
static GimpProgress *
gimp_statusbar_progress_start (GimpProgress *progress,
const gchar *message,
gboolean cancelable)
gboolean cancellable,
const gchar *message)
{
GimpStatusbar *statusbar = GIMP_STATUSBAR (progress);
@ -414,9 +414,9 @@ gimp_statusbar_progress_start (GimpProgress *progress,
gimp_statusbar_push (statusbar, "progress", NULL, "%s", message);
gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (bar), 0.0);
gtk_widget_set_sensitive (statusbar->cancel_button, cancelable);
gtk_widget_set_sensitive (statusbar->cancel_button, cancellable);
if (cancelable)
if (cancellable)
{
if (message)
{

View File

@ -246,7 +246,7 @@ file_remote_copy_file (Gimp *gimp,
{
remote_progress.cancellable = g_cancellable_new ();
gimp_progress_start (progress, _("Connecting to server"), TRUE);
gimp_progress_start (progress, TRUE, _("Connecting to server"));
g_signal_connect (progress, "cancel",
G_CALLBACK (file_remote_copy_file_cancel),
@ -342,7 +342,6 @@ file_remote_progress_callback (goffset current_num_bytes,
const gchar *format;
gchar *done = g_format_size (current_num_bytes);
gchar *total = g_format_size (total_num_bytes);
gchar *text;
switch (progress->mode)
{
@ -358,13 +357,10 @@ file_remote_progress_callback (goffset current_num_bytes,
g_assert_not_reached ();
}
text = g_strdup_printf (format, done, total);
gimp_progress_set_text (progress->progress, format, done, total);
g_free (total);
g_free (done);
gimp_progress_set_text (progress->progress, text);
g_free (text);
gimp_progress_set_value (progress->progress,
(gdouble) current_num_bytes /
(gdouble) total_num_bytes);
@ -373,7 +369,6 @@ file_remote_progress_callback (goffset current_num_bytes,
{
const gchar *format;
gchar *done = g_format_size (current_num_bytes);
gchar *text;
switch (progress->mode)
{
@ -389,16 +384,12 @@ file_remote_progress_callback (goffset current_num_bytes,
g_assert_not_reached ();
}
text = g_strdup_printf (format, done);
gimp_progress_set_text (progress->progress, format, done);
g_free (done);
gimp_progress_set_text (progress->progress, text);
g_free (text);
gimp_progress_pulse (progress->progress);
}
while (! progress->cancel && g_main_context_pending (NULL))
g_main_context_iteration (NULL, FALSE);
}

View File

@ -69,7 +69,7 @@ gimp_gegl_apply_cached_operation (GeglBuffer *src_buffer,
GeglBuffer *cache,
const GeglRectangle *valid_rects,
gint n_valid_rects,
gboolean cancelable)
gboolean cancellable)
{
GeglNode *gegl;
GeglNode *dest_node;
@ -140,16 +140,16 @@ gimp_gegl_apply_cached_operation (GeglBuffer *src_buffer,
if (gimp_progress_is_active (progress))
{
if (undo_desc)
gimp_progress_set_text (progress, undo_desc);
gimp_progress_set_text (progress, "%s", undo_desc);
progress_started = FALSE;
cancelable = FALSE;
cancellable = FALSE;
}
else
{
gimp_progress_start (progress, undo_desc, cancelable);
gimp_progress_start (progress, cancellable, "%s", undo_desc);
if (cancelable)
if (cancellable)
g_signal_connect (progress, "cancel",
G_CALLBACK (gimp_gegl_apply_operation_cancel),
&cancel);
@ -215,7 +215,7 @@ gimp_gegl_apply_cached_operation (GeglBuffer *src_buffer,
value * rect_pixels) /
(gdouble) all_pixels);
if (cancelable)
if (cancellable)
while (! cancel && g_main_context_pending (NULL))
g_main_context_iteration (NULL, FALSE);
}
@ -239,7 +239,7 @@ gimp_gegl_apply_cached_operation (GeglBuffer *src_buffer,
{
gimp_progress_set_value (progress, value);
if (cancelable)
if (cancellable)
while (! cancel && g_main_context_pending (NULL))
g_main_context_iteration (NULL, FALSE);
}
@ -260,7 +260,7 @@ gimp_gegl_apply_cached_operation (GeglBuffer *src_buffer,
{
gimp_progress_end (progress);
if (cancelable)
if (cancellable)
g_signal_handlers_disconnect_by_func (progress,
gimp_gegl_apply_operation_cancel,
&cancel);

View File

@ -42,7 +42,7 @@ gboolean gimp_gegl_apply_cached_operation (GeglBuffer *src_buffer,
GeglBuffer *cache,
const GeglRectangle *valid_rects,
gint n_valid_rects,
gboolean cancelable);
gboolean cancellable);
/* apply specific operations */

View File

@ -88,7 +88,7 @@ gimp_gegl_progress_notify (GObject *object,
{
if (value == 0.0)
{
gimp_progress_start (progress, text, FALSE);
gimp_progress_start (progress, FALSE, "%s", text);
return;
}
else if (value == 1.0)

View File

@ -163,7 +163,7 @@ drawable_transform_flip_invoker (GimpProcedure *procedure,
x0, y0, x1, y1);
if (progress)
gimp_progress_start (progress, _("Flipping"), FALSE);
gimp_progress_start (progress, FALSE, _("Flipping"));
if (! gimp_viewable_get_children (GIMP_VIEWABLE (drawable)) &&
! gimp_channel_is_empty (gimp_image_get_mask (gimp_item_get_image (GIMP_ITEM (drawable)))))
@ -253,7 +253,7 @@ drawable_transform_flip_default_invoker (GimpProcedure *procedure,
interpolation_type = gimp->config->interpolation_type;
if (progress)
gimp_progress_start (progress, _("Flipping"), FALSE);
gimp_progress_start (progress, FALSE, _("Flipping"));
if (! gimp_viewable_get_children (GIMP_VIEWABLE (drawable)) &&
! gimp_channel_is_empty (gimp_image_get_mask (gimp_item_get_image (GIMP_ITEM (drawable)))))
@ -352,7 +352,7 @@ drawable_transform_perspective_invoker (GimpProcedure *procedure,
x2, y2, x3, y3);
if (progress)
gimp_progress_start (progress, _("Perspective"), FALSE);
gimp_progress_start (progress, FALSE, _("Perspective"));
if (! gimp_viewable_get_children (GIMP_VIEWABLE (drawable)) &&
! gimp_channel_is_empty (gimp_image_get_mask (gimp_item_get_image (GIMP_ITEM (drawable)))))
@ -452,7 +452,7 @@ drawable_transform_perspective_default_invoker (GimpProcedure *procedure
interpolation_type = gimp->config->interpolation_type;
if (progress)
gimp_progress_start (progress, _("Perspective"), FALSE);
gimp_progress_start (progress, FALSE, _("Perspective"));
if (! gimp_viewable_get_children (GIMP_VIEWABLE (drawable)) &&
! gimp_channel_is_empty (gimp_image_get_mask (gimp_item_get_image (GIMP_ITEM (drawable)))))
@ -614,7 +614,7 @@ drawable_transform_rotate_invoker (GimpProcedure *procedure,
center_x, center_y, angle);
if (progress)
gimp_progress_start (progress, _("Rotating"), FALSE);
gimp_progress_start (progress, FALSE, _("Rotating"));
if (! gimp_viewable_get_children (GIMP_VIEWABLE (drawable)) &&
! gimp_channel_is_empty (gimp_image_get_mask (gimp_item_get_image (GIMP_ITEM (drawable)))))
@ -708,7 +708,7 @@ drawable_transform_rotate_default_invoker (GimpProcedure *procedure,
interpolation_type = gimp->config->interpolation_type;
if (progress)
gimp_progress_start (progress, _("Rotating"), FALSE);
gimp_progress_start (progress, FALSE, _("Rotating"));
if (! gimp_viewable_get_children (GIMP_VIEWABLE (drawable)) &&
! gimp_channel_is_empty (gimp_image_get_mask (gimp_item_get_image (GIMP_ITEM (drawable)))))
@ -797,7 +797,7 @@ drawable_transform_scale_invoker (GimpProcedure *procedure,
x0, y0, x1 - x0, y1 - y0);
if (progress)
gimp_progress_start (progress, _("Scaling"), FALSE);
gimp_progress_start (progress, FALSE, _("Scaling"));
if (! gimp_viewable_get_children (GIMP_VIEWABLE (drawable)) &&
! gimp_channel_is_empty (gimp_image_get_mask (gimp_item_get_image (GIMP_ITEM (drawable)))))
@ -888,7 +888,7 @@ drawable_transform_scale_default_invoker (GimpProcedure *procedure,
interpolation_type = gimp->config->interpolation_type;
if (progress)
gimp_progress_start (progress, _("Scaling"), FALSE);
gimp_progress_start (progress, FALSE, _("Scaling"));
if (! gimp_viewable_get_children (GIMP_VIEWABLE (drawable)) &&
! gimp_channel_is_empty (gimp_image_get_mask (gimp_item_get_image (GIMP_ITEM (drawable)))))
@ -974,7 +974,7 @@ drawable_transform_shear_invoker (GimpProcedure *procedure,
shear_type, magnitude);
if (progress)
gimp_progress_start (progress, _("Shearing"), FALSE);
gimp_progress_start (progress, FALSE, _("Shearing"));
if (! gimp_viewable_get_children (GIMP_VIEWABLE (drawable)) &&
! gimp_channel_is_empty (gimp_image_get_mask (gimp_item_get_image (GIMP_ITEM (drawable)))))
@ -1061,7 +1061,7 @@ drawable_transform_shear_default_invoker (GimpProcedure *procedure,
interpolation_type = gimp->config->interpolation_type;
if (progress)
gimp_progress_start (progress, _("Shearing"), FALSE);
gimp_progress_start (progress, FALSE, _("Shearing"));
if (! gimp_viewable_get_children (GIMP_VIEWABLE (drawable)) &&
! gimp_channel_is_empty (gimp_image_get_mask (gimp_item_get_image (GIMP_ITEM (drawable)))))
@ -1158,7 +1158,7 @@ drawable_transform_2d_invoker (GimpProcedure *procedure,
gimp_matrix3_translate (&matrix, dest_x, dest_y);
if (progress)
gimp_progress_start (progress, _("2D Transform"), FALSE);
gimp_progress_start (progress, FALSE, _("2D Transform"));
if (! gimp_viewable_get_children (GIMP_VIEWABLE (drawable)) &&
! gimp_channel_is_empty (gimp_image_get_mask (gimp_item_get_image (GIMP_ITEM (drawable)))))
@ -1256,7 +1256,7 @@ drawable_transform_2d_default_invoker (GimpProcedure *procedure,
interpolation_type = gimp->config->interpolation_type;
if (progress)
gimp_progress_start (progress, _("2D Transforming"), FALSE);
gimp_progress_start (progress, FALSE, _("2D Transforming"));
if (! gimp_viewable_get_children (GIMP_VIEWABLE (drawable)) &&
! gimp_channel_is_empty (gimp_image_get_mask (gimp_item_get_image (GIMP_ITEM (drawable)))))
@ -1361,7 +1361,7 @@ drawable_transform_matrix_invoker (GimpProcedure *procedure,
matrix.coeff[2][2] = coeff_2_2;
if (progress)
gimp_progress_start (progress, _("2D Transforming"), FALSE);
gimp_progress_start (progress, FALSE, _("2D Transforming"));
if (! gimp_viewable_get_children (GIMP_VIEWABLE (drawable)) &&
! gimp_channel_is_empty (gimp_image_get_mask (gimp_item_get_image (GIMP_ITEM (drawable)))))
@ -1467,7 +1467,7 @@ drawable_transform_matrix_default_invoker (GimpProcedure *procedure,
interpolation_type = gimp->config->interpolation_type;
if (progress)
gimp_progress_start (progress, _("2D Transforming"), FALSE);
gimp_progress_start (progress, FALSE, _("2D Transforming"));
if (! gimp_viewable_get_children (GIMP_VIEWABLE (drawable)) &&
! gimp_channel_is_empty (gimp_image_get_mask (gimp_item_get_image (GIMP_ITEM (drawable)))))

View File

@ -789,7 +789,7 @@ edit_blend_invoker (GimpProcedure *procedure,
GimpGradient *gradient;
if (progress)
gimp_progress_start (progress, _("Blending"), FALSE);
gimp_progress_start (progress, FALSE, _("Blending"));
switch (blend_mode)
{

View File

@ -488,7 +488,7 @@ image_scale_invoker (GimpProcedure *procedure,
GimpPDBContext *pdb_context = GIMP_PDB_CONTEXT (context);
if (progress)
gimp_progress_start (progress, _("Scaling"), FALSE);
gimp_progress_start (progress, FALSE, _("Scaling"));
gimp_image_scale (image, new_width, new_height,
pdb_context->interpolation,
@ -524,7 +524,7 @@ image_scale_full_invoker (GimpProcedure *procedure,
if (success)
{
if (progress)
gimp_progress_start (progress, _("Scaling"), FALSE);
gimp_progress_start (progress, FALSE, _("Scaling"));
gimp_image_scale (image, new_width, new_height, interpolation, progress);
@ -616,7 +616,7 @@ image_rotate_invoker (GimpProcedure *procedure,
if (success)
{
if (progress)
gimp_progress_start (progress, _("Rotating"), FALSE);
gimp_progress_start (progress, FALSE, _("Rotating"));
gimp_image_rotate (image, context, rotate_type, progress);

View File

@ -167,7 +167,7 @@ item_transform_flip_invoker (GimpProcedure *procedure,
gimp_transform_matrix_flip_free (&matrix, x0, y0, x1, y1);
if (progress)
gimp_progress_start (progress, _("Flipping"), FALSE);
gimp_progress_start (progress, FALSE, _("Flipping"));
if (GIMP_IS_DRAWABLE (item) &&
! gimp_viewable_get_children (GIMP_VIEWABLE (item)) &&
@ -267,7 +267,7 @@ item_transform_perspective_invoker (GimpProcedure *procedure,
x2, y2, x3, y3);
if (progress)
gimp_progress_start (progress, _("Perspective"), FALSE);
gimp_progress_start (progress, FALSE, _("Perspective"));
if (GIMP_IS_DRAWABLE (item) &&
! gimp_viewable_get_children (GIMP_VIEWABLE (item)) &&
@ -440,7 +440,7 @@ item_transform_rotate_invoker (GimpProcedure *procedure,
center_x, center_y, angle);
if (progress)
gimp_progress_start (progress, _("Rotating"), FALSE);
gimp_progress_start (progress, FALSE, _("Rotating"));
if (GIMP_IS_DRAWABLE (item) &&
! gimp_viewable_get_children (GIMP_VIEWABLE (item)) &&
@ -531,7 +531,7 @@ item_transform_scale_invoker (GimpProcedure *procedure,
x0, y0, x1 - x0, y1 - y0);
if (progress)
gimp_progress_start (progress, _("Scaling"), FALSE);
gimp_progress_start (progress, FALSE, _("Scaling"));
if (GIMP_IS_DRAWABLE (item) &&
! gimp_viewable_get_children (GIMP_VIEWABLE (item)) &&
@ -618,7 +618,7 @@ item_transform_shear_invoker (GimpProcedure *procedure,
shear_type, magnitude);
if (progress)
gimp_progress_start (progress, _("Shearing"), FALSE);
gimp_progress_start (progress, FALSE, _("Shearing"));
if (GIMP_IS_DRAWABLE (item) &&
! gimp_viewable_get_children (GIMP_VIEWABLE (item)) &&
@ -716,7 +716,7 @@ item_transform_2d_invoker (GimpProcedure *procedure,
gimp_matrix3_translate (&matrix, dest_x, dest_y);
if (progress)
gimp_progress_start (progress, _("2D Transform"), FALSE);
gimp_progress_start (progress, FALSE, _("2D Transform"));
if (GIMP_IS_DRAWABLE (item) &&
! gimp_viewable_get_children (GIMP_VIEWABLE (item)) &&
@ -822,7 +822,7 @@ item_transform_matrix_invoker (GimpProcedure *procedure,
matrix.coeff[2][2] = coeff_2_2;
if (progress)
gimp_progress_start (progress, _("2D Transforming"), FALSE);
gimp_progress_start (progress, FALSE, _("2D Transforming"));
if (GIMP_IS_DRAWABLE (item) &&
! gimp_viewable_get_children (GIMP_VIEWABLE (item)) &&

View File

@ -380,7 +380,7 @@ layer_scale_invoker (GimpProcedure *procedure,
GimpPDBContext *pdb_context = GIMP_PDB_CONTEXT (context);
if (progress)
gimp_progress_start (progress, _("Scaling"), FALSE);
gimp_progress_start (progress, FALSE, _("Scaling"));
gimp_item_scale_by_origin (GIMP_ITEM (layer), new_width, new_height,
pdb_context->interpolation, progress,
@ -427,7 +427,7 @@ layer_scale_full_invoker (GimpProcedure *procedure,
error))
{
if (progress)
gimp_progress_start (progress, _("Scaling"), FALSE);
gimp_progress_start (progress, FALSE, _("Scaling"));
gimp_item_scale_by_origin (GIMP_ITEM (layer), new_width, new_height,
interpolation, progress,

View File

@ -168,7 +168,7 @@ perspective_invoker (GimpProcedure *procedure,
interpolation_type = gimp->config->interpolation_type;
if (progress)
gimp_progress_start (progress, _("Perspective"), FALSE);
gimp_progress_start (progress, FALSE, _("Perspective"));
if (! gimp_viewable_get_children (GIMP_VIEWABLE (drawable)) &&
! gimp_channel_is_empty (gimp_image_get_mask (gimp_item_get_image (GIMP_ITEM (drawable)))))
@ -252,7 +252,7 @@ rotate_invoker (GimpProcedure *procedure,
interpolation_type = gimp->config->interpolation_type;
if (progress)
gimp_progress_start (progress, _("Rotating"), FALSE);
gimp_progress_start (progress, FALSE, _("Rotating"));
if (! gimp_viewable_get_children (GIMP_VIEWABLE (drawable)) &&
! gimp_channel_is_empty (gimp_image_get_mask (gimp_item_get_image (GIMP_ITEM (drawable)))))
@ -343,7 +343,7 @@ scale_invoker (GimpProcedure *procedure,
interpolation_type = gimp->config->interpolation_type;
if (progress)
gimp_progress_start (progress, _("Scaling"), FALSE);
gimp_progress_start (progress, FALSE, _("Scaling"));
if (! gimp_viewable_get_children (GIMP_VIEWABLE (drawable)) &&
! gimp_channel_is_empty (gimp_image_get_mask (gimp_item_get_image (GIMP_ITEM (drawable)))))
@ -429,7 +429,7 @@ shear_invoker (GimpProcedure *procedure,
interpolation_type = gimp->config->interpolation_type;
if (progress)
gimp_progress_start (progress, _("Shearing"), FALSE);
gimp_progress_start (progress, FALSE, _("Shearing"));
if (! gimp_viewable_get_children (GIMP_VIEWABLE (drawable)) &&
! gimp_channel_is_empty (gimp_image_get_mask (gimp_item_get_image (GIMP_ITEM (drawable)))))
@ -520,7 +520,7 @@ transform_2d_invoker (GimpProcedure *procedure,
interpolation_type = gimp->config->interpolation_type;
if (progress)
gimp_progress_start (progress, _("2D Transform"), FALSE);
gimp_progress_start (progress, FALSE, _("2D Transform"));
if (! gimp_viewable_get_children (GIMP_VIEWABLE (drawable)) &&
! gimp_channel_is_empty (gimp_image_get_mask (gimp_item_get_image (GIMP_ITEM (drawable)))))

View File

@ -123,16 +123,15 @@ gimp_plug_in_progress_start (GimpPlugIn *plug_in,
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, "%s", 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 ? message : "",
TRUE);
gimp_progress_start (proc_frame->progress, TRUE,
"%s", message ? message : "");
}
}
}
@ -179,7 +178,7 @@ gimp_plug_in_progress_set_text (GimpPlugIn *plug_in,
proc_frame = gimp_plug_in_get_proc_frame (plug_in);
if (proc_frame->progress)
gimp_progress_set_text (proc_frame->progress, message);
gimp_progress_set_text (proc_frame->progress, "%s", message);
}
void

View File

@ -245,8 +245,8 @@ gimp_blend_tool_button_release (GimpTool *tool,
gint off_x;
gint off_y;
progress = gimp_progress_start (GIMP_PROGRESS (tool),
_("Blending"), FALSE);
progress = gimp_progress_start (GIMP_PROGRESS (tool), FALSE,
_("Blending"));
gimp_item_get_offset (GIMP_ITEM (drawable), &off_x, &off_y);

View File

@ -1080,8 +1080,8 @@ gimp_cage_tool_compute_coef (GimpCageTool *ct)
GeglBuffer *buffer;
gdouble value;
progress = gimp_progress_start (GIMP_PROGRESS (ct),
_("Computing Cage Coefficients"), FALSE);
progress = gimp_progress_start (GIMP_PROGRESS (ct), FALSE,
_("Computing Cage Coefficients"));
if (ct->coef)
{

View File

@ -791,9 +791,8 @@ gimp_seamless_clone_tool_image_map_update (GimpSeamlessCloneTool *sc)
GeglProcessor *processor;
gdouble value;
progress = gimp_progress_start (GIMP_PROGRESS (sc),
_("Cloning the foreground object..."),
FALSE);
progress = gimp_progress_start (GIMP_PROGRESS (sc), FALSE,
_("Cloning the foreground object"));
/* Find out at which x,y is the top left corner of the currently
* displayed part */

View File

@ -44,8 +44,8 @@
/* local function prototypes */
static GimpProgress * gimp_tool_progress_start (GimpProgress *progress,
const gchar *message,
gboolean cancelable);
gboolean cancellable,
const gchar *message);
static void gimp_tool_progress_end (GimpProgress *progress);
static gboolean gimp_tool_progress_is_active (GimpProgress *progress);
static void gimp_tool_progress_set_text (GimpProgress *progress,
@ -125,8 +125,8 @@ gimp_tool_progress_key_press (GtkWidget *widget,
static GimpProgress *
gimp_tool_progress_start (GimpProgress *progress,
const gchar *message,
gboolean cancelable)
gboolean cancellable,
const gchar *message)
{
GimpTool *tool = GIMP_TOOL (progress);
GimpDisplayShell *shell;
@ -148,13 +148,13 @@ gimp_tool_progress_start (GimpProgress *progress,
gimp_display_shell_add_unrotated_item (shell, tool->progress);
g_object_unref (tool->progress);
gimp_progress_start (GIMP_PROGRESS (tool->progress),
message, FALSE);
gimp_progress_start (GIMP_PROGRESS (tool->progress), FALSE,
"%s", message);
gimp_widget_flush_expose (shell->canvas);
tool->progress_display = tool->display;
if (cancelable)
if (cancellable)
{
tool->progress_grab_widget = gtk_invisible_new ();
gtk_widget_show (tool->progress_grab_widget);
@ -213,7 +213,7 @@ gimp_tool_progress_set_text (GimpProgress *progress,
{
GimpDisplayShell *shell = gimp_display_get_shell (tool->progress_display);
gimp_progress_set_text (GIMP_PROGRESS (tool->progress), message);
gimp_progress_set_text (GIMP_PROGRESS (tool->progress), "%s", message);
gimp_widget_flush_expose (shell->canvas);
}
}

View File

@ -1270,8 +1270,8 @@ gimp_transform_tool_real_transform (GimpTransformTool *tr_tool,
GimpTransformResize clip = options->clip;
GimpProgress *progress;
progress = gimp_progress_start (GIMP_PROGRESS (tool),
tr_tool->progress_text, FALSE);
progress = gimp_progress_start (GIMP_PROGRESS (tool), FALSE,
"%s", tr_tool->progress_text);
if (gimp_item_get_linked (active_item))
gimp_item_linked_transform (active_item, context,

View File

@ -76,8 +76,8 @@ static void gimp_file_dialog_response (GtkDialog *dialo
gint response_id);
static GimpProgress *
gimp_file_dialog_progress_start (GimpProgress *progress,
const gchar *message,
gboolean cancelable);
gboolean cancellable,
const gchar *message);
static void gimp_file_dialog_progress_end (GimpProgress *progress);
static gboolean gimp_file_dialog_progress_is_active (GimpProgress *progress);
static void gimp_file_dialog_progress_set_text (GimpProgress *progress,
@ -195,7 +195,7 @@ gimp_file_dialog_response (GtkDialog *dialog,
if (file_dialog->progress &&
GIMP_PROGRESS_BOX (file_dialog->progress)->active &&
GIMP_PROGRESS_BOX (file_dialog->progress)->cancelable)
GIMP_PROGRESS_BOX (file_dialog->progress)->cancellable)
{
gimp_progress_cancel (GIMP_PROGRESS (dialog));
}
@ -204,8 +204,8 @@ gimp_file_dialog_response (GtkDialog *dialog,
static GimpProgress *
gimp_file_dialog_progress_start (GimpProgress *progress,
const gchar *message,
gboolean cancelable)
gboolean cancellable,
const gchar *message)
{
GimpFileDialog *dialog = GIMP_FILE_DIALOG (progress);
GimpProgress *retval = NULL;
@ -213,11 +213,11 @@ gimp_file_dialog_progress_start (GimpProgress *progress,
if (dialog->progress)
{
retval = gimp_progress_start (GIMP_PROGRESS (dialog->progress),
message, cancelable);
cancellable, "%s", message);
gtk_widget_show (dialog->progress);
gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog),
GTK_RESPONSE_CANCEL, cancelable);
GTK_RESPONSE_CANCEL, cancellable);
}
return retval;
@ -253,7 +253,7 @@ gimp_file_dialog_progress_set_text (GimpProgress *progress,
GimpFileDialog *dialog = GIMP_FILE_DIALOG (progress);
if (dialog->progress)
gimp_progress_set_text (GIMP_PROGRESS (dialog->progress), message);
gimp_progress_set_text (GIMP_PROGRESS (dialog->progress), "%s", message);
}
static void

View File

@ -42,8 +42,8 @@ static void gimp_progress_box_dispose (GObject *object);
static GimpProgress *
gimp_progress_box_progress_start (GimpProgress *progress,
const gchar *message,
gboolean cancelable);
gboolean cancellable,
const gchar *message);
static void gimp_progress_box_progress_end (GimpProgress *progress);
static gboolean gimp_progress_box_progress_is_active (GimpProgress *progress);
static void gimp_progress_box_progress_set_text (GimpProgress *progress,
@ -116,8 +116,8 @@ gimp_progress_box_dispose (GObject *object)
static GimpProgress *
gimp_progress_box_progress_start (GimpProgress *progress,
const gchar *message,
gboolean cancelable)
gboolean cancellable,
const gchar *message)
{
GimpProgressBox *box = GIMP_PROGRESS_BOX (progress);
@ -131,9 +131,9 @@ gimp_progress_box_progress_start (GimpProgress *progress,
gtk_label_set_text (GTK_LABEL (box->label), message);
gtk_progress_bar_set_fraction (bar, 0.0);
box->active = TRUE;
box->cancelable = cancelable;
box->value = 0.0;
box->active = TRUE;
box->cancellable = cancellable;
box->value = 0.0;
if (gtk_widget_is_drawable (box->progress))
gdk_window_process_updates (gtk_widget_get_window (box->progress),
@ -156,9 +156,9 @@ gimp_progress_box_progress_end (GimpProgress *progress)
gtk_label_set_text (GTK_LABEL (box->label), "");
gtk_progress_bar_set_fraction (bar, 0.0);
box->active = FALSE;
box->cancelable = FALSE;
box->value = 0.0;
box->active = FALSE;
box->cancellable = FALSE;
box->value = 0.0;
}
}

View File

@ -39,7 +39,7 @@ struct _GimpProgressBox
GtkBox parent_instance;
gboolean active;
gboolean cancelable;
gboolean cancellable;
gdouble value;
GtkWidget *label;

View File

@ -45,8 +45,8 @@ static void gimp_progress_dialog_response (GtkDialog *dialog,
static GimpProgress *
gimp_progress_dialog_progress_start (GimpProgress *progress,
const gchar *message,
gboolean cancelable);
gboolean cancellable,
const gchar *message);
static void gimp_progress_dialog_progress_end (GimpProgress *progress);
static gboolean gimp_progress_dialog_progress_is_active (GimpProgress *progress);
static void gimp_progress_dialog_progress_set_text (GimpProgress *progress,
@ -112,24 +112,25 @@ gimp_progress_dialog_response (GtkDialog *dialog,
{
GimpProgressDialog *progress_dialog = GIMP_PROGRESS_DIALOG (dialog);
if (GIMP_PROGRESS_BOX (progress_dialog->box)->cancelable)
if (GIMP_PROGRESS_BOX (progress_dialog->box)->cancellable)
gimp_progress_cancel (GIMP_PROGRESS (dialog));
}
static GimpProgress *
gimp_progress_dialog_progress_start (GimpProgress *progress,
const gchar *message,
gboolean cancelable)
gboolean cancellable,
const gchar *message)
{
GimpProgressDialog *dialog = GIMP_PROGRESS_DIALOG (progress);
if (! dialog->box)
return NULL;
if (gimp_progress_start (GIMP_PROGRESS (dialog->box), message, cancelable))
if (gimp_progress_start (GIMP_PROGRESS (dialog->box), cancellable,
"%s", message))
{
gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog),
GTK_RESPONSE_CANCEL, cancelable);
GTK_RESPONSE_CANCEL, cancellable);
gtk_window_present (GTK_WINDOW (dialog));
@ -178,7 +179,7 @@ gimp_progress_dialog_progress_set_text (GimpProgress *progress,
if (! dialog->box)
return;
gimp_progress_set_text (GIMP_PROGRESS (dialog->box), message);
gimp_progress_set_text (GIMP_PROGRESS (dialog->box), "%s", message);
}
static void

View File

@ -61,8 +61,8 @@ static void gimp_thumb_box_style_set (GtkWidget *widget,
static GimpProgress *
gimp_thumb_box_progress_start (GimpProgress *progress,
const gchar *message,
gboolean cancelable);
gboolean cancellable,
const gchar *message);
static void gimp_thumb_box_progress_end (GimpProgress *progress);
static gboolean gimp_thumb_box_progress_is_active (GimpProgress *progress);
static void gimp_thumb_box_progress_set_value (GimpProgress *progress,
@ -193,8 +193,8 @@ gimp_thumb_box_style_set (GtkWidget *widget,
static GimpProgress *
gimp_thumb_box_progress_start (GimpProgress *progress,
const gchar *message,
gboolean cancelable)
gboolean cancellable,
const gchar *message)
{
GimpThumbBox *box = GIMP_THUMB_BOX (progress);
@ -214,7 +214,7 @@ gimp_thumb_box_progress_start (GimpProgress *progress,
if (GIMP_IS_FILE_DIALOG (toplevel))
gtk_dialog_set_response_sensitive (GTK_DIALOG (toplevel),
GTK_RESPONSE_CANCEL, cancelable);
GTK_RESPONSE_CANCEL, cancellable);
return progress;
}
@ -583,7 +583,7 @@ gimp_thumb_box_create_thumbnails (GimpThumbBox *box,
{
gchar *str;
gimp_progress_start (GIMP_PROGRESS (box), "", TRUE);
gimp_progress_start (GIMP_PROGRESS (box), TRUE, "%s", "");
progress = gimp_sub_progress_new (GIMP_PROGRESS (box));

View File

@ -287,11 +287,7 @@ xcf_load_invoker (GimpProcedure *procedure,
if (progress)
{
gchar *name = g_filename_display_name (filename);
gchar *msg = g_strdup_printf (_("Opening '%s'"), name);
gimp_progress_start (progress, msg, FALSE);
g_free (msg);
gimp_progress_start (progress, FALSE, _("Opening '%s'"), name);
g_free (name);
}
@ -403,11 +399,7 @@ xcf_save_invoker (GimpProcedure *procedure,
if (progress)
{
gchar *name = g_filename_display_name (filename);
gchar *msg = g_strdup_printf (_("Saving '%s'"), name);
gimp_progress_start (progress, msg, FALSE);
g_free (msg);
gimp_progress_start (progress, FALSE, _("Saving '%s'"), name);
g_free (name);
}

View File

@ -57,7 +57,7 @@ sub transform_invoke {
$assemble_matrix
if (progress)
gimp_progress_start (progress, _(\"$progress_text\"), FALSE);
gimp_progress_start (progress, FALSE, _(\"$progress_text\"));
if (! gimp_viewable_get_children (GIMP_VIEWABLE (drawable)) &&
! gimp_channel_is_empty (gimp_image_get_mask (gimp_item_get_image (GIMP_ITEM (drawable)))))
@ -124,7 +124,7 @@ $assemble_matrix
interpolation_type = gimp->config->interpolation_type;
if (progress)
gimp_progress_start (progress, _(\"$progress_text\"), FALSE);
gimp_progress_start (progress, FALSE, _(\"$progress_text\"));
if (! gimp_viewable_get_children (GIMP_VIEWABLE (drawable)) &&
! gimp_channel_is_empty (gimp_image_get_mask (gimp_item_get_image (GIMP_ITEM (drawable)))))

View File

@ -862,7 +862,7 @@ HELP
GimpGradient *gradient;
if (progress)
gimp_progress_start (progress, _("Blending"), FALSE);
gimp_progress_start (progress, FALSE, _("Blending"));
switch (blend_mode)
{

View File

@ -336,7 +336,7 @@ HELP
GimpPDBContext *pdb_context = GIMP_PDB_CONTEXT (context);
if (progress)
gimp_progress_start (progress, _("Scaling"), FALSE);
gimp_progress_start (progress, FALSE, _("Scaling"));
gimp_image_scale (image, new_width, new_height,
pdb_context->interpolation,
@ -369,7 +369,7 @@ sub image_scale_full {
code => <<'CODE'
{
if (progress)
gimp_progress_start (progress, _("Scaling"), FALSE);
gimp_progress_start (progress, FALSE, _("Scaling"));
gimp_image_scale (image, new_width, new_height, interpolation, progress);
@ -470,7 +470,7 @@ sub image_rotate {
code => <<'CODE'
{
if (progress)
gimp_progress_start (progress, _("Rotating"), FALSE);
gimp_progress_start (progress, FALSE, _("Rotating"));
gimp_image_rotate (image, context, rotate_type, progress);

View File

@ -54,7 +54,7 @@ sub transform_invoke {
$assemble_matrix
if (progress)
gimp_progress_start (progress, _(\"$progress_text\"), FALSE);
gimp_progress_start (progress, FALSE, _(\"$progress_text\"));
if (GIMP_IS_DRAWABLE (item) &&
! gimp_viewable_get_children (GIMP_VIEWABLE (item)) &&

View File

@ -458,7 +458,7 @@ HELP
GimpPDBContext *pdb_context = GIMP_PDB_CONTEXT (context);
if (progress)
gimp_progress_start (progress, _("Scaling"), FALSE);
gimp_progress_start (progress, FALSE, _("Scaling"));
gimp_item_scale_by_origin (GIMP_ITEM (layer), new_width, new_height,
pdb_context->interpolation, progress,
@ -501,7 +501,7 @@ sub layer_scale_full {
error))
{
if (progress)
gimp_progress_start (progress, _("Scaling"), FALSE);
gimp_progress_start (progress, FALSE, _("Scaling"));
gimp_item_scale_by_origin (GIMP_ITEM (layer), new_width, new_height,
interpolation, progress,

View File

@ -140,7 +140,7 @@ sub perspective {
interpolation_type = gimp->config->interpolation_type;
if (progress)
gimp_progress_start (progress, _("Perspective"), FALSE);
gimp_progress_start (progress, FALSE, _("Perspective"));
if (! gimp_viewable_get_children (GIMP_VIEWABLE (drawable)) &&
! gimp_channel_is_empty (gimp_image_get_mask (gimp_item_get_image (GIMP_ITEM (drawable)))))
@ -218,7 +218,7 @@ sub rotate {
interpolation_type = gimp->config->interpolation_type;
if (progress)
gimp_progress_start (progress, _("Rotating"), FALSE);
gimp_progress_start (progress, FALSE, _("Rotating"));
if (! gimp_viewable_get_children (GIMP_VIEWABLE (drawable)) &&
! gimp_channel_is_empty (gimp_image_get_mask (gimp_item_get_image (GIMP_ITEM (drawable)))))
@ -307,7 +307,7 @@ sub scale {
interpolation_type = gimp->config->interpolation_type;
if (progress)
gimp_progress_start (progress, _("Scaling"), FALSE);
gimp_progress_start (progress, FALSE, _("Scaling"));
if (! gimp_viewable_get_children (GIMP_VIEWABLE (drawable)) &&
! gimp_channel_is_empty (gimp_image_get_mask (gimp_item_get_image (GIMP_ITEM (drawable)))))
@ -388,7 +388,7 @@ sub shear {
interpolation_type = gimp->config->interpolation_type;
if (progress)
gimp_progress_start (progress, _("Shearing"), FALSE);
gimp_progress_start (progress, FALSE, _("Shearing"));
if (! gimp_viewable_get_children (GIMP_VIEWABLE (drawable)) &&
! gimp_channel_is_empty (gimp_image_get_mask (gimp_item_get_image (GIMP_ITEM (drawable)))))
@ -473,7 +473,7 @@ sub transform_2d {
interpolation_type = gimp->config->interpolation_type;
if (progress)
gimp_progress_start (progress, _("2D Transform"), FALSE);
gimp_progress_start (progress, FALSE, _("2D Transform"));
if (! gimp_viewable_get_children (GIMP_VIEWABLE (drawable)) &&
! gimp_channel_is_empty (gimp_image_get_mask (gimp_item_get_image (GIMP_ITEM (drawable)))))