mirror of https://github.com/GNOME/gimp.git
app/Makefile.am removed...
2002-02-22 Michael Natterer <mitch@gimp.org> * app/Makefile.am * app/gimpprogress.[ch]: removed... * app/display/Makefile.am * app/display/gimpprogress.[ch]: ...and added here. Prefixed everything with "gimp_". * app/gui/image-commands.c * app/plug-in/plug-in.c * app/tools/gimpblendtool.c * app/tools/gimptransformtool.c: changed accordingly.
This commit is contained in:
parent
a4550e9c7d
commit
ac0c4af07a
14
ChangeLog
14
ChangeLog
|
@ -1,3 +1,17 @@
|
|||
2002-02-22 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/Makefile.am
|
||||
* app/gimpprogress.[ch]: removed...
|
||||
|
||||
* app/display/Makefile.am
|
||||
* app/display/gimpprogress.[ch]: ...and added here. Prefixed
|
||||
everything with "gimp_".
|
||||
|
||||
* app/gui/image-commands.c
|
||||
* app/plug-in/plug-in.c
|
||||
* app/tools/gimpblendtool.c
|
||||
* app/tools/gimptransformtool.c: changed accordingly.
|
||||
|
||||
2002-02-22 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/vectors/Makefile
|
||||
|
|
|
@ -33,24 +33,17 @@ gui_sources = \
|
|||
## stuff that needs to be split up in core / ui files
|
||||
##
|
||||
core_ui_sources = \
|
||||
gimpprogress.c \
|
||||
gimpprogress.h \
|
||||
image_map.c \
|
||||
image_map.h
|
||||
|
||||
##
|
||||
## config stuff
|
||||
##
|
||||
config_sources = \
|
||||
general.c \
|
||||
general.h \
|
||||
gimprc.c \
|
||||
gimprc.h
|
||||
|
||||
##
|
||||
## stuff which is about to be replaced by new subsystems
|
||||
##
|
||||
bye_sources = \
|
||||
general.c \
|
||||
general.h \
|
||||
gimprc.c \
|
||||
gimprc.h \
|
||||
ops_buttons.c \
|
||||
ops_buttons.h \
|
||||
path.c \
|
||||
|
@ -85,7 +78,6 @@ stuff_sources = \
|
|||
gimp_1_3_SOURCES = @STRIP_BEGIN@ \
|
||||
$(gui_sources) \
|
||||
$(core_ui_sources) \
|
||||
$(config_sources) \
|
||||
$(bye_sources) \
|
||||
$(stuff_sources) \
|
||||
@STRIP_END@
|
||||
|
|
|
@ -34,12 +34,12 @@
|
|||
|
||||
#include "display/gimpdisplay.h"
|
||||
#include "display/gimpdisplay-foreach.h"
|
||||
#include "display/gimpprogress.h"
|
||||
|
||||
#include "convert-dialog.h"
|
||||
#include "image-commands.h"
|
||||
#include "resize-dialog.h"
|
||||
|
||||
#include "gimpprogress.h"
|
||||
#include "undo.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
@ -462,17 +462,17 @@ image_scale_implement (ImageResize *image_scale)
|
|||
if (! display_flush)
|
||||
undo_push_group_start (gimage, IMAGE_SCALE_UNDO);
|
||||
|
||||
progress = progress_start (image_scale->gdisp,
|
||||
_("Scaling..."),
|
||||
TRUE, NULL, NULL);
|
||||
progress = gimp_progress_start (image_scale->gdisp,
|
||||
_("Scaling..."),
|
||||
TRUE, NULL, NULL);
|
||||
|
||||
gimp_image_scale (gimage,
|
||||
image_scale->resize->width,
|
||||
image_scale->resize->height,
|
||||
image_scale->resize->interpolation,
|
||||
progress_update_and_flush, progress);
|
||||
gimp_progress_update_and_flush, progress);
|
||||
|
||||
progress_end (progress);
|
||||
gimp_progress_end (progress);
|
||||
|
||||
display_flush = TRUE;
|
||||
}
|
||||
|
|
|
@ -98,6 +98,7 @@
|
|||
#include "widgets/gimpitemfactory.h"
|
||||
|
||||
#include "display/gimpdisplay.h"
|
||||
#include "display/gimpprogress.h"
|
||||
|
||||
#include "gui/brush-select.h"
|
||||
#include "gui/gradient-select.h"
|
||||
|
@ -108,7 +109,6 @@
|
|||
#include "plug-in-rc.h"
|
||||
|
||||
#include "app_procs.h"
|
||||
#include "gimpprogress.h"
|
||||
#include "gimprc.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
@ -908,7 +908,7 @@ plug_in_destroy (PlugIn *plug_in)
|
|||
g_free (plug_in->args[5]);
|
||||
|
||||
if (plug_in->progress)
|
||||
progress_end (plug_in->progress);
|
||||
gimp_progress_end (plug_in->progress);
|
||||
plug_in->progress = NULL;
|
||||
|
||||
if (plug_in == current_plug_in)
|
||||
|
@ -1207,7 +1207,7 @@ plug_in_close (PlugIn *plug_in,
|
|||
/* Destroy the progress dialog if it exists. */
|
||||
if (plug_in->progress)
|
||||
{
|
||||
progress_end (plug_in->progress);
|
||||
gimp_progress_end (plug_in->progress);
|
||||
plug_in->progress = NULL;
|
||||
}
|
||||
|
||||
|
@ -3493,13 +3493,13 @@ plug_in_progress_init (PlugIn *plug_in,
|
|||
gdisp = gimp_display_get_by_ID (the_gimp, gdisp_ID);
|
||||
|
||||
if (plug_in->progress)
|
||||
plug_in->progress = progress_restart (plug_in->progress, message,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
plug_in->progress = gimp_progress_restart (plug_in->progress, message,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
else
|
||||
plug_in->progress = progress_start (gdisp, message, TRUE,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
plug_in->progress = gimp_progress_start (gdisp, message, TRUE,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -3508,8 +3508,8 @@ plug_in_progress_update (PlugIn *plug_in,
|
|||
{
|
||||
if (!plug_in->progress)
|
||||
plug_in_progress_init (plug_in, NULL, -1);
|
||||
|
||||
progress_update (plug_in->progress, percentage);
|
||||
|
||||
gimp_progress_update (plug_in->progress, percentage);
|
||||
}
|
||||
|
||||
static gchar *
|
||||
|
|
|
@ -45,6 +45,8 @@ libappdisplay_a_sources = @STRIP_BEGIN@ \
|
|||
gimpdisplayshell-scroll.h \
|
||||
gimpdisplayshell-selection.c \
|
||||
gimpdisplayshell-selection.h \
|
||||
gimpprogress.c \
|
||||
gimpprogress.h \
|
||||
gimpstatusbar.c \
|
||||
gimpstatusbar.h \
|
||||
@STRIP_END@
|
||||
|
|
|
@ -22,12 +22,11 @@
|
|||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "display/display-types.h"
|
||||
|
||||
#include "display/gimpdisplay.h"
|
||||
#include "display/gimpdisplayshell.h"
|
||||
#include "display/gimpstatusbar.h"
|
||||
#include "display-types.h"
|
||||
|
||||
#include "gimpdisplay.h"
|
||||
#include "gimpdisplayshell.h"
|
||||
#include "gimpstatusbar.h"
|
||||
#include "gimpprogress.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
@ -47,56 +46,64 @@ struct _GimpProgress
|
|||
gpointer cancel_data;
|
||||
};
|
||||
|
||||
/* prototypes */
|
||||
static void progress_signal_setup (GimpProgress *progress,
|
||||
GCallback cancel_callback,
|
||||
gpointer cancel_data);
|
||||
|
||||
/* local function prototypes */
|
||||
|
||||
static void gimp_progress_signal_setup (GimpProgress *progress,
|
||||
GCallback cancel_callback,
|
||||
gpointer cancel_data);
|
||||
|
||||
|
||||
/* These progress bar routines are re-entrant, and so should be
|
||||
* thread-safe.
|
||||
*/
|
||||
|
||||
|
||||
/* Start a progress bar on "gdisp" with reason "message". If "gdisp"
|
||||
* is NULL, the progress bar is presented in a new dialog box. If
|
||||
* "message" is NULL, then no message is used.
|
||||
/**
|
||||
* gimp_progress_start:
|
||||
* @gdisp: The #GimpDisplay to show the progress in.
|
||||
* @message: The message.
|
||||
* @important: Setting this to #FALSE will cause the progress
|
||||
* to silently fail if the display's statusbar
|
||||
* is hidden.
|
||||
* @cancel_callback: The callback to call if the "Cancel" button is clicked.
|
||||
* @cancel_data: The %cancel_callback's "user_data".
|
||||
*
|
||||
* Start a progress bar on %gdisp with reason %message. If %gdisp
|
||||
* is #NULL, the progress bar is presented in a new dialog box. If
|
||||
* %message is #NULL, then no message is used.
|
||||
*
|
||||
* If "cancel_callback" is not NULL, it is attached to the progress
|
||||
* bar cancel button's "clicked" signal, with data "cancel_data". The
|
||||
* If %cancel_callback is not %NULL, it is attached to the progress
|
||||
* bar cancel button's "clicked" signal, with data %cancel_data. The
|
||||
* cancel button is only made sensitive if the callback is set.
|
||||
*
|
||||
* It is an error to progress_start() a bar on a "gdisp" for which
|
||||
* It is an error to gimp_progress_start() a bar on a %gdisp for which
|
||||
* there is already a progress bar active.
|
||||
*
|
||||
* Progress bars with "important" set to TRUE will be shown to the
|
||||
* Progress bars with %important set to #TRUE will be shown to the
|
||||
* user in any possible way. Unimportant progress bars will not be
|
||||
* shown to the user if it would mean creating a new window.
|
||||
*/
|
||||
*
|
||||
* Return value: The new #GimpProgress.
|
||||
**/
|
||||
GimpProgress *
|
||||
progress_start (GimpDisplay *gdisp,
|
||||
const gchar *message,
|
||||
gboolean important,
|
||||
GCallback cancel_callback,
|
||||
gpointer cancel_data)
|
||||
gimp_progress_start (GimpDisplay *gdisp,
|
||||
const gchar *message,
|
||||
gboolean important,
|
||||
GCallback cancel_callback,
|
||||
gpointer cancel_data)
|
||||
{
|
||||
GimpDisplayShell *shell = NULL;
|
||||
GimpProgress *progress;
|
||||
GtkWidget *vbox;
|
||||
|
||||
g_return_val_if_fail (gdisp == NULL || GIMP_IS_DISPLAY (gdisp), NULL);
|
||||
|
||||
if (gdisp)
|
||||
shell = GIMP_DISPLAY_SHELL (gdisp->shell);
|
||||
|
||||
progress = g_new0 (GimpProgress, 1);
|
||||
|
||||
progress->gdisp = gdisp;
|
||||
progress->dialog = NULL;
|
||||
progress->cancel_callback = NULL;
|
||||
progress->cancel_data = NULL;
|
||||
|
||||
/* do we have a useful gdisplay and statusarea? */
|
||||
/* do we have a useful gdisplay and statusarea? */
|
||||
if (gdisp && GTK_WIDGET_VISIBLE (shell->statusbar))
|
||||
{
|
||||
progress->gdisp = gdisp;
|
||||
|
||||
if (message)
|
||||
{
|
||||
gimp_statusbar_push (GIMP_STATUSBAR (shell->statusbar),
|
||||
|
@ -109,7 +116,8 @@ progress_start (GimpDisplay *gdisp,
|
|||
*/
|
||||
if (GIMP_STATUSBAR (shell->statusbar)->progressid)
|
||||
{
|
||||
g_warning ("%d progress bars already active for display %p",
|
||||
g_warning ("gimp_progress_start(): "
|
||||
"%d progress bars already active for display %p",
|
||||
GIMP_STATUSBAR (shell->statusbar)->progressid,
|
||||
gdisp);
|
||||
}
|
||||
|
@ -118,14 +126,13 @@ progress_start (GimpDisplay *gdisp,
|
|||
}
|
||||
else
|
||||
{
|
||||
/* unimporant progress indications are occasionally failed */
|
||||
/* unimporant progress indications are occasionally failed */
|
||||
if (! important)
|
||||
{
|
||||
g_free (progress);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
progress->gdisp = NULL;
|
||||
progress->dialog = gimp_dialog_new (_("Progress"), "progress",
|
||||
NULL, NULL,
|
||||
GTK_WIN_POS_NONE,
|
||||
|
@ -158,26 +165,35 @@ progress_start (GimpDisplay *gdisp,
|
|||
gtk_widget_show (progress->dialog);
|
||||
}
|
||||
|
||||
progress_signal_setup (progress, cancel_callback, cancel_data);
|
||||
gimp_progress_signal_setup (progress, cancel_callback, cancel_data);
|
||||
|
||||
return progress;
|
||||
}
|
||||
|
||||
|
||||
/* Update the message and/or the callbacks for a progress and reset
|
||||
/**
|
||||
* gimp_progress_restart:
|
||||
* @progress: The #GimpProgress to restart.
|
||||
* @message: The new message.
|
||||
* @cancel_callback: The new cancel_callback
|
||||
* @cancel_data: The new cancel_data
|
||||
*
|
||||
* Update the message and/or the callbacks for a progress and reset
|
||||
* the bar to zero, with the minimum of disturbance to the user.
|
||||
*/
|
||||
*
|
||||
* Return value: The same #GimpProgress as passed in as %progress.
|
||||
**/
|
||||
GimpProgress *
|
||||
progress_restart (GimpProgress *progress,
|
||||
const char *message,
|
||||
GCallback cancel_callback,
|
||||
gpointer cancel_data)
|
||||
gimp_progress_restart (GimpProgress *progress,
|
||||
const char *message,
|
||||
GCallback cancel_callback,
|
||||
gpointer cancel_data)
|
||||
{
|
||||
GtkWidget *bar;
|
||||
|
||||
g_return_val_if_fail (progress != NULL, progress);
|
||||
g_return_val_if_fail (progress != NULL, NULL);
|
||||
|
||||
/* change the message */
|
||||
/* change the message */
|
||||
if (progress->gdisp)
|
||||
{
|
||||
GimpDisplayShell *shell;
|
||||
|
@ -201,19 +217,19 @@ progress_restart (GimpProgress *progress,
|
|||
bar = progress->progressbar;
|
||||
}
|
||||
|
||||
/* reset the progress bar */
|
||||
/* reset the progress bar */
|
||||
gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (bar), 0.0);
|
||||
|
||||
/* do we need to change the callbacks? */
|
||||
progress_signal_setup (progress, cancel_callback, cancel_data);
|
||||
/* do we need to change the callbacks? */
|
||||
gimp_progress_signal_setup (progress, cancel_callback, cancel_data);
|
||||
|
||||
return progress;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
progress_update (GimpProgress *progress,
|
||||
gdouble percentage)
|
||||
gimp_progress_update (GimpProgress *progress,
|
||||
gdouble percentage)
|
||||
{
|
||||
GtkWidget *bar;
|
||||
|
||||
|
@ -222,7 +238,7 @@ progress_update (GimpProgress *progress,
|
|||
if (percentage < 0.0 || percentage > 1.0)
|
||||
return;
|
||||
|
||||
/* do we have a dialog box, or are we using the statusbar? */
|
||||
/* do we have a dialog box, or are we using the statusbar? */
|
||||
if (progress->gdisp)
|
||||
{
|
||||
GimpDisplayShell *shell;
|
||||
|
@ -240,9 +256,14 @@ progress_update (GimpProgress *progress,
|
|||
}
|
||||
|
||||
|
||||
/* Step the progress bar by one percent, wrapping at 100% */
|
||||
/**
|
||||
* gimp_progress_step:
|
||||
* @progress: The #GimpProgress.
|
||||
*
|
||||
* Step the progress bar by one percent, wrapping at 100%
|
||||
**/
|
||||
void
|
||||
progress_step (GimpProgress *progress)
|
||||
gimp_progress_step (GimpProgress *progress)
|
||||
{
|
||||
GtkWidget *bar;
|
||||
gdouble val;
|
||||
|
@ -254,6 +275,7 @@ progress_step (GimpProgress *progress)
|
|||
GimpDisplayShell *shell;
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (progress->gdisp->shell);
|
||||
|
||||
bar = GIMP_STATUSBAR (shell->statusbar)->progressbar;
|
||||
}
|
||||
else
|
||||
|
@ -265,20 +287,25 @@ progress_step (GimpProgress *progress)
|
|||
if (val > 1.0)
|
||||
val = 0.0;
|
||||
|
||||
progress_update (progress, val);
|
||||
gimp_progress_update (progress, val);
|
||||
}
|
||||
|
||||
|
||||
/* Finish using the progress bar "p" */
|
||||
/**
|
||||
* gimp_progress_end:
|
||||
* @progress: The #GimpProgress.
|
||||
*
|
||||
* Finish using the progress bar.
|
||||
**/
|
||||
void
|
||||
progress_end (GimpProgress *progress)
|
||||
gimp_progress_end (GimpProgress *progress)
|
||||
{
|
||||
g_return_if_fail (progress != NULL);
|
||||
|
||||
/* remove all callbacks so they don't get called while we're
|
||||
* destroying widgets
|
||||
*/
|
||||
progress_signal_setup (progress, NULL, NULL);
|
||||
gimp_progress_signal_setup (progress, NULL, NULL);
|
||||
|
||||
if (progress->gdisp)
|
||||
{
|
||||
|
@ -305,27 +332,41 @@ progress_end (GimpProgress *progress)
|
|||
}
|
||||
|
||||
|
||||
/* This function's prototype is conveniently the same as progress_func_t */
|
||||
void
|
||||
progress_update_and_flush (gint ymin,
|
||||
gint ymax,
|
||||
gint curr_y,
|
||||
gpointer data)
|
||||
{
|
||||
progress_update ((GimpProgress *) data,
|
||||
(float)(curr_y - ymin) / (float)(ymax - ymin));
|
||||
/* This function's prototype is conveniently
|
||||
* the same as progress_func_t
|
||||
*/
|
||||
|
||||
/* HACK until we do long-running operations in the gtk idle thread */
|
||||
while (gtk_events_pending())
|
||||
gtk_main_iteration();
|
||||
/**
|
||||
* gimp_progress_update_and_flush:
|
||||
* @min: The minimum, ...
|
||||
* @max: ... the maximum, ...
|
||||
* @curr: ... and the current progress of your operation.
|
||||
* @data: The #GimpProgress you want to update.
|
||||
*
|
||||
* This function's prototype is conveniently
|
||||
* the same as #GimpProgressFunc from libgimpcolor.
|
||||
**/
|
||||
void
|
||||
gimp_progress_update_and_flush (gint min,
|
||||
gint max,
|
||||
gint curr,
|
||||
gpointer data)
|
||||
{
|
||||
gimp_progress_update ((GimpProgress *) data,
|
||||
(gfloat) (curr - min) / (gfloat) (max - min));
|
||||
|
||||
while (gtk_events_pending ())
|
||||
gtk_main_iteration ();
|
||||
}
|
||||
|
||||
|
||||
/* Helper function to add or remove signals */
|
||||
/* private functions */
|
||||
|
||||
/* Helper function to add or remove signals */
|
||||
static void
|
||||
progress_signal_setup (GimpProgress *progress,
|
||||
GCallback cancel_callback,
|
||||
gpointer cancel_data)
|
||||
gimp_progress_signal_setup (GimpProgress *progress,
|
||||
GCallback cancel_callback,
|
||||
gpointer cancel_data)
|
||||
{
|
||||
GtkWidget *button;
|
||||
GtkWidget *dialog;
|
||||
|
|
|
@ -19,28 +19,25 @@
|
|||
#ifndef __GIMP_PROGRESS_H__
|
||||
#define __GIMP_PROGRESS_H__
|
||||
|
||||
/* Progress bars for use internally by the main GIMP application. */
|
||||
|
||||
GimpProgress * gimp_progress_start (GimpDisplay *gdisp,
|
||||
const gchar *message,
|
||||
gboolean important,
|
||||
GCallback cancel_callback,
|
||||
gpointer cancel_data);
|
||||
GimpProgress * gimp_progress_restart (GimpProgress *progress,
|
||||
const gchar *message,
|
||||
GCallback cancel_callback,
|
||||
gpointer cancel_data);
|
||||
void gimp_progress_update (GimpProgress *progress,
|
||||
gdouble percentage);
|
||||
void gimp_progress_step (GimpProgress *progress);
|
||||
void gimp_progress_end (GimpProgress *progress);
|
||||
|
||||
/* functions */
|
||||
GimpProgress * progress_start (GimpDisplay *gdisp,
|
||||
const gchar *message,
|
||||
gboolean important,
|
||||
GCallback cancel_callback,
|
||||
gpointer cancel_data);
|
||||
GimpProgress * progress_restart (GimpProgress *progress,
|
||||
const gchar *message,
|
||||
GCallback cancel_callback,
|
||||
gpointer cancel_data);
|
||||
void progress_update (GimpProgress *progress,
|
||||
gdouble percentage);
|
||||
void progress_step (GimpProgress *progress);
|
||||
void progress_end (GimpProgress *progress);
|
||||
|
||||
void progress_update_and_flush (gint ymin,
|
||||
gint ymax,
|
||||
gint curr_x,
|
||||
gpointer data);
|
||||
void gimp_progress_update_and_flush (gint ymin,
|
||||
gint ymax,
|
||||
gint curr_x,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __GIMP_PROGRESS_H__ */
|
||||
|
|
|
@ -1,383 +0,0 @@
|
|||
/* The GIMP -- an image manipulation program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "display/display-types.h"
|
||||
|
||||
#include "display/gimpdisplay.h"
|
||||
#include "display/gimpdisplayshell.h"
|
||||
#include "display/gimpstatusbar.h"
|
||||
|
||||
#include "gimpprogress.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
||||
|
||||
struct _GimpProgress
|
||||
{
|
||||
GimpDisplay *gdisp; /* gdisp in use, or NULL*/
|
||||
|
||||
/* next four fields are only valid if gdisp is NULL */
|
||||
GtkWidget *dialog; /* progress dialog, NULL if using gdisp */
|
||||
GtkWidget *dialog_label;
|
||||
GtkWidget *progressbar;
|
||||
GtkWidget *cancelbutton;
|
||||
|
||||
GCallback cancel_callback; /* callback to remove, or NULL */
|
||||
gpointer cancel_data;
|
||||
};
|
||||
|
||||
/* prototypes */
|
||||
static void progress_signal_setup (GimpProgress *progress,
|
||||
GCallback cancel_callback,
|
||||
gpointer cancel_data);
|
||||
|
||||
|
||||
/* These progress bar routines are re-entrant, and so should be
|
||||
* thread-safe.
|
||||
*/
|
||||
|
||||
|
||||
/* Start a progress bar on "gdisp" with reason "message". If "gdisp"
|
||||
* is NULL, the progress bar is presented in a new dialog box. If
|
||||
* "message" is NULL, then no message is used.
|
||||
*
|
||||
* If "cancel_callback" is not NULL, it is attached to the progress
|
||||
* bar cancel button's "clicked" signal, with data "cancel_data". The
|
||||
* cancel button is only made sensitive if the callback is set.
|
||||
*
|
||||
* It is an error to progress_start() a bar on a "gdisp" for which
|
||||
* there is already a progress bar active.
|
||||
*
|
||||
* Progress bars with "important" set to TRUE will be shown to the
|
||||
* user in any possible way. Unimportant progress bars will not be
|
||||
* shown to the user if it would mean creating a new window.
|
||||
*/
|
||||
GimpProgress *
|
||||
progress_start (GimpDisplay *gdisp,
|
||||
const gchar *message,
|
||||
gboolean important,
|
||||
GCallback cancel_callback,
|
||||
gpointer cancel_data)
|
||||
{
|
||||
GimpDisplayShell *shell = NULL;
|
||||
GimpProgress *progress;
|
||||
GtkWidget *vbox;
|
||||
|
||||
if (gdisp)
|
||||
shell = GIMP_DISPLAY_SHELL (gdisp->shell);
|
||||
|
||||
progress = g_new0 (GimpProgress, 1);
|
||||
|
||||
progress->gdisp = gdisp;
|
||||
progress->dialog = NULL;
|
||||
progress->cancel_callback = NULL;
|
||||
progress->cancel_data = NULL;
|
||||
|
||||
/* do we have a useful gdisplay and statusarea? */
|
||||
if (gdisp && GTK_WIDGET_VISIBLE (shell->statusbar))
|
||||
{
|
||||
if (message)
|
||||
{
|
||||
gimp_statusbar_push (GIMP_STATUSBAR (shell->statusbar),
|
||||
"progress",
|
||||
message);
|
||||
}
|
||||
|
||||
/* really need image locking to stop multiple people going at
|
||||
* the image
|
||||
*/
|
||||
if (GIMP_STATUSBAR (shell->statusbar)->progressid)
|
||||
{
|
||||
g_warning ("%d progress bars already active for display %p",
|
||||
GIMP_STATUSBAR (shell->statusbar)->progressid,
|
||||
gdisp);
|
||||
}
|
||||
|
||||
GIMP_STATUSBAR (shell->statusbar)->progressid++;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* unimporant progress indications are occasionally failed */
|
||||
if (! important)
|
||||
{
|
||||
g_free (progress);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
progress->gdisp = NULL;
|
||||
progress->dialog = gimp_dialog_new (_("Progress"), "progress",
|
||||
NULL, NULL,
|
||||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
GTK_STOCK_CANCEL, NULL,
|
||||
NULL, NULL, &progress->cancelbutton,
|
||||
TRUE, TRUE,
|
||||
|
||||
NULL);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 2);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 2);
|
||||
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (progress->dialog)->vbox),
|
||||
vbox);
|
||||
gtk_widget_show (vbox);
|
||||
|
||||
progress->dialog_label = gtk_label_new (message ? message :
|
||||
_("Please wait..."));
|
||||
gtk_misc_set_alignment (GTK_MISC (progress->dialog_label), 0.0, 0.5);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), progress->dialog_label,
|
||||
FALSE, TRUE, 0);
|
||||
gtk_widget_show (progress->dialog_label);
|
||||
|
||||
progress->progressbar = gtk_progress_bar_new ();
|
||||
gtk_widget_set_size_request (progress->progressbar, 150, 20);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), progress->progressbar, TRUE, TRUE, 0);
|
||||
gtk_widget_show (progress->progressbar);
|
||||
|
||||
gtk_widget_show (progress->dialog);
|
||||
}
|
||||
|
||||
progress_signal_setup (progress, cancel_callback, cancel_data);
|
||||
|
||||
return progress;
|
||||
}
|
||||
|
||||
|
||||
/* Update the message and/or the callbacks for a progress and reset
|
||||
* the bar to zero, with the minimum of disturbance to the user.
|
||||
*/
|
||||
GimpProgress *
|
||||
progress_restart (GimpProgress *progress,
|
||||
const char *message,
|
||||
GCallback cancel_callback,
|
||||
gpointer cancel_data)
|
||||
{
|
||||
GtkWidget *bar;
|
||||
|
||||
g_return_val_if_fail (progress != NULL, progress);
|
||||
|
||||
/* change the message */
|
||||
if (progress->gdisp)
|
||||
{
|
||||
GimpDisplayShell *shell;
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (progress->gdisp->shell);
|
||||
|
||||
gimp_statusbar_pop (GIMP_STATUSBAR (shell->statusbar), "progress");
|
||||
|
||||
if (message)
|
||||
gimp_statusbar_push (GIMP_STATUSBAR (shell->statusbar),
|
||||
"progress",
|
||||
message);
|
||||
|
||||
bar = GIMP_STATUSBAR (shell->statusbar)->progressbar;
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_label_set_text (GTK_LABEL (progress->dialog_label),
|
||||
message ? message : _("Please wait..."));
|
||||
|
||||
bar = progress->progressbar;
|
||||
}
|
||||
|
||||
/* reset the progress bar */
|
||||
gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (bar), 0.0);
|
||||
|
||||
/* do we need to change the callbacks? */
|
||||
progress_signal_setup (progress, cancel_callback, cancel_data);
|
||||
|
||||
return progress;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
progress_update (GimpProgress *progress,
|
||||
gdouble percentage)
|
||||
{
|
||||
GtkWidget *bar;
|
||||
|
||||
g_return_if_fail (progress != NULL);
|
||||
|
||||
if (percentage < 0.0 || percentage > 1.0)
|
||||
return;
|
||||
|
||||
/* do we have a dialog box, or are we using the statusbar? */
|
||||
if (progress->gdisp)
|
||||
{
|
||||
GimpDisplayShell *shell;
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (progress->gdisp->shell);
|
||||
|
||||
bar = GIMP_STATUSBAR (shell->statusbar)->progressbar;
|
||||
}
|
||||
else
|
||||
{
|
||||
bar = progress->progressbar;
|
||||
}
|
||||
|
||||
gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (bar), percentage);
|
||||
}
|
||||
|
||||
|
||||
/* Step the progress bar by one percent, wrapping at 100% */
|
||||
void
|
||||
progress_step (GimpProgress *progress)
|
||||
{
|
||||
GtkWidget *bar;
|
||||
gdouble val;
|
||||
|
||||
g_return_if_fail (progress != NULL);
|
||||
|
||||
if (progress->gdisp)
|
||||
{
|
||||
GimpDisplayShell *shell;
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (progress->gdisp->shell);
|
||||
bar = GIMP_STATUSBAR (shell->statusbar)->progressbar;
|
||||
}
|
||||
else
|
||||
{
|
||||
bar = progress->progressbar;
|
||||
}
|
||||
|
||||
val = gtk_progress_bar_get_fraction (GTK_PROGRESS_BAR (bar)) + 0.01;
|
||||
if (val > 1.0)
|
||||
val = 0.0;
|
||||
|
||||
progress_update (progress, val);
|
||||
}
|
||||
|
||||
|
||||
/* Finish using the progress bar "p" */
|
||||
void
|
||||
progress_end (GimpProgress *progress)
|
||||
{
|
||||
g_return_if_fail (progress != NULL);
|
||||
|
||||
/* remove all callbacks so they don't get called while we're
|
||||
* destroying widgets
|
||||
*/
|
||||
progress_signal_setup (progress, NULL, NULL);
|
||||
|
||||
if (progress->gdisp)
|
||||
{
|
||||
GimpDisplayShell *shell;
|
||||
GtkProgressBar *bar;
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (progress->gdisp->shell);
|
||||
|
||||
gimp_statusbar_pop (GIMP_STATUSBAR (shell->statusbar), "progress");
|
||||
|
||||
bar = GTK_PROGRESS_BAR (GIMP_STATUSBAR (shell->statusbar)->progressbar);
|
||||
|
||||
gtk_progress_bar_set_fraction (bar, 0.0);
|
||||
|
||||
if (GIMP_STATUSBAR (shell->statusbar)->progressid > 0)
|
||||
GIMP_STATUSBAR (shell->statusbar)->progressid--;
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_widget_destroy (progress->dialog);
|
||||
}
|
||||
|
||||
g_free (progress);
|
||||
}
|
||||
|
||||
|
||||
/* This function's prototype is conveniently the same as progress_func_t */
|
||||
void
|
||||
progress_update_and_flush (gint ymin,
|
||||
gint ymax,
|
||||
gint curr_y,
|
||||
gpointer data)
|
||||
{
|
||||
progress_update ((GimpProgress *) data,
|
||||
(float)(curr_y - ymin) / (float)(ymax - ymin));
|
||||
|
||||
/* HACK until we do long-running operations in the gtk idle thread */
|
||||
while (gtk_events_pending())
|
||||
gtk_main_iteration();
|
||||
}
|
||||
|
||||
|
||||
/* Helper function to add or remove signals */
|
||||
static void
|
||||
progress_signal_setup (GimpProgress *progress,
|
||||
GCallback cancel_callback,
|
||||
gpointer cancel_data)
|
||||
{
|
||||
GtkWidget *button;
|
||||
GtkWidget *dialog;
|
||||
|
||||
if (progress->cancel_callback == cancel_callback &&
|
||||
progress->cancel_data == cancel_data)
|
||||
return;
|
||||
|
||||
/* are we using the statusbar or a freestanding dialog? */
|
||||
if (progress->gdisp)
|
||||
{
|
||||
GimpDisplayShell *shell;
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (progress->gdisp->shell);
|
||||
|
||||
dialog = NULL;
|
||||
button = GIMP_STATUSBAR (shell->statusbar)->cancelbutton;
|
||||
}
|
||||
else
|
||||
{
|
||||
dialog = progress->dialog;
|
||||
button = progress->cancelbutton;
|
||||
}
|
||||
|
||||
/* remove any existing signal handlers */
|
||||
if (progress->cancel_callback)
|
||||
{
|
||||
g_signal_handlers_disconnect_by_func (G_OBJECT (button),
|
||||
progress->cancel_callback,
|
||||
progress->cancel_data);
|
||||
if (dialog)
|
||||
g_signal_handlers_disconnect_by_func (G_OBJECT (dialog),
|
||||
progress->cancel_callback,
|
||||
progress->cancel_data);
|
||||
}
|
||||
|
||||
/* add the new handlers */
|
||||
if (cancel_callback)
|
||||
{
|
||||
g_signal_connect (G_OBJECT (button), "clicked",
|
||||
G_CALLBACK (cancel_callback),
|
||||
cancel_data);
|
||||
|
||||
if (dialog)
|
||||
g_signal_connect (G_OBJECT (dialog), "destroy",
|
||||
G_CALLBACK (cancel_callback),
|
||||
cancel_data);
|
||||
}
|
||||
|
||||
gtk_widget_set_sensitive (GTK_WIDGET (button),
|
||||
cancel_callback ? TRUE : FALSE);
|
||||
|
||||
progress->cancel_callback = cancel_callback;
|
||||
progress->cancel_data = cancel_data;
|
||||
}
|
|
@ -1,46 +0,0 @@
|
|||
/* The GIMP -- an image manipulation program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __GIMP_PROGRESS_H__
|
||||
#define __GIMP_PROGRESS_H__
|
||||
|
||||
/* Progress bars for use internally by the main GIMP application. */
|
||||
|
||||
|
||||
/* functions */
|
||||
GimpProgress * progress_start (GimpDisplay *gdisp,
|
||||
const gchar *message,
|
||||
gboolean important,
|
||||
GCallback cancel_callback,
|
||||
gpointer cancel_data);
|
||||
GimpProgress * progress_restart (GimpProgress *progress,
|
||||
const gchar *message,
|
||||
GCallback cancel_callback,
|
||||
gpointer cancel_data);
|
||||
void progress_update (GimpProgress *progress,
|
||||
gdouble percentage);
|
||||
void progress_step (GimpProgress *progress);
|
||||
void progress_end (GimpProgress *progress);
|
||||
|
||||
void progress_update_and_flush (gint ymin,
|
||||
gint ymax,
|
||||
gint curr_x,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __GIMP_PROGRESS_H__ */
|
|
@ -34,12 +34,12 @@
|
|||
|
||||
#include "display/gimpdisplay.h"
|
||||
#include "display/gimpdisplay-foreach.h"
|
||||
#include "display/gimpprogress.h"
|
||||
|
||||
#include "convert-dialog.h"
|
||||
#include "image-commands.h"
|
||||
#include "resize-dialog.h"
|
||||
|
||||
#include "gimpprogress.h"
|
||||
#include "undo.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
@ -462,17 +462,17 @@ image_scale_implement (ImageResize *image_scale)
|
|||
if (! display_flush)
|
||||
undo_push_group_start (gimage, IMAGE_SCALE_UNDO);
|
||||
|
||||
progress = progress_start (image_scale->gdisp,
|
||||
_("Scaling..."),
|
||||
TRUE, NULL, NULL);
|
||||
progress = gimp_progress_start (image_scale->gdisp,
|
||||
_("Scaling..."),
|
||||
TRUE, NULL, NULL);
|
||||
|
||||
gimp_image_scale (gimage,
|
||||
image_scale->resize->width,
|
||||
image_scale->resize->height,
|
||||
image_scale->resize->interpolation,
|
||||
progress_update_and_flush, progress);
|
||||
gimp_progress_update_and_flush, progress);
|
||||
|
||||
progress_end (progress);
|
||||
gimp_progress_end (progress);
|
||||
|
||||
display_flush = TRUE;
|
||||
}
|
||||
|
|
|
@ -98,6 +98,7 @@
|
|||
#include "widgets/gimpitemfactory.h"
|
||||
|
||||
#include "display/gimpdisplay.h"
|
||||
#include "display/gimpprogress.h"
|
||||
|
||||
#include "gui/brush-select.h"
|
||||
#include "gui/gradient-select.h"
|
||||
|
@ -108,7 +109,6 @@
|
|||
#include "plug-in-rc.h"
|
||||
|
||||
#include "app_procs.h"
|
||||
#include "gimpprogress.h"
|
||||
#include "gimprc.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
@ -908,7 +908,7 @@ plug_in_destroy (PlugIn *plug_in)
|
|||
g_free (plug_in->args[5]);
|
||||
|
||||
if (plug_in->progress)
|
||||
progress_end (plug_in->progress);
|
||||
gimp_progress_end (plug_in->progress);
|
||||
plug_in->progress = NULL;
|
||||
|
||||
if (plug_in == current_plug_in)
|
||||
|
@ -1207,7 +1207,7 @@ plug_in_close (PlugIn *plug_in,
|
|||
/* Destroy the progress dialog if it exists. */
|
||||
if (plug_in->progress)
|
||||
{
|
||||
progress_end (plug_in->progress);
|
||||
gimp_progress_end (plug_in->progress);
|
||||
plug_in->progress = NULL;
|
||||
}
|
||||
|
||||
|
@ -3493,13 +3493,13 @@ plug_in_progress_init (PlugIn *plug_in,
|
|||
gdisp = gimp_display_get_by_ID (the_gimp, gdisp_ID);
|
||||
|
||||
if (plug_in->progress)
|
||||
plug_in->progress = progress_restart (plug_in->progress, message,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
plug_in->progress = gimp_progress_restart (plug_in->progress, message,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
else
|
||||
plug_in->progress = progress_start (gdisp, message, TRUE,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
plug_in->progress = gimp_progress_start (gdisp, message, TRUE,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -3508,8 +3508,8 @@ plug_in_progress_update (PlugIn *plug_in,
|
|||
{
|
||||
if (!plug_in->progress)
|
||||
plug_in_progress_init (plug_in, NULL, -1);
|
||||
|
||||
progress_update (plug_in->progress, percentage);
|
||||
|
||||
gimp_progress_update (plug_in->progress, percentage);
|
||||
}
|
||||
|
||||
static gchar *
|
||||
|
|
|
@ -98,6 +98,7 @@
|
|||
#include "widgets/gimpitemfactory.h"
|
||||
|
||||
#include "display/gimpdisplay.h"
|
||||
#include "display/gimpprogress.h"
|
||||
|
||||
#include "gui/brush-select.h"
|
||||
#include "gui/gradient-select.h"
|
||||
|
@ -108,7 +109,6 @@
|
|||
#include "plug-in-rc.h"
|
||||
|
||||
#include "app_procs.h"
|
||||
#include "gimpprogress.h"
|
||||
#include "gimprc.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
@ -908,7 +908,7 @@ plug_in_destroy (PlugIn *plug_in)
|
|||
g_free (plug_in->args[5]);
|
||||
|
||||
if (plug_in->progress)
|
||||
progress_end (plug_in->progress);
|
||||
gimp_progress_end (plug_in->progress);
|
||||
plug_in->progress = NULL;
|
||||
|
||||
if (plug_in == current_plug_in)
|
||||
|
@ -1207,7 +1207,7 @@ plug_in_close (PlugIn *plug_in,
|
|||
/* Destroy the progress dialog if it exists. */
|
||||
if (plug_in->progress)
|
||||
{
|
||||
progress_end (plug_in->progress);
|
||||
gimp_progress_end (plug_in->progress);
|
||||
plug_in->progress = NULL;
|
||||
}
|
||||
|
||||
|
@ -3493,13 +3493,13 @@ plug_in_progress_init (PlugIn *plug_in,
|
|||
gdisp = gimp_display_get_by_ID (the_gimp, gdisp_ID);
|
||||
|
||||
if (plug_in->progress)
|
||||
plug_in->progress = progress_restart (plug_in->progress, message,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
plug_in->progress = gimp_progress_restart (plug_in->progress, message,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
else
|
||||
plug_in->progress = progress_start (gdisp, message, TRUE,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
plug_in->progress = gimp_progress_start (gdisp, message, TRUE,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -3508,8 +3508,8 @@ plug_in_progress_update (PlugIn *plug_in,
|
|||
{
|
||||
if (!plug_in->progress)
|
||||
plug_in_progress_init (plug_in, NULL, -1);
|
||||
|
||||
progress_update (plug_in->progress, percentage);
|
||||
|
||||
gimp_progress_update (plug_in->progress, percentage);
|
||||
}
|
||||
|
||||
static gchar *
|
||||
|
|
|
@ -98,6 +98,7 @@
|
|||
#include "widgets/gimpitemfactory.h"
|
||||
|
||||
#include "display/gimpdisplay.h"
|
||||
#include "display/gimpprogress.h"
|
||||
|
||||
#include "gui/brush-select.h"
|
||||
#include "gui/gradient-select.h"
|
||||
|
@ -108,7 +109,6 @@
|
|||
#include "plug-in-rc.h"
|
||||
|
||||
#include "app_procs.h"
|
||||
#include "gimpprogress.h"
|
||||
#include "gimprc.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
@ -908,7 +908,7 @@ plug_in_destroy (PlugIn *plug_in)
|
|||
g_free (plug_in->args[5]);
|
||||
|
||||
if (plug_in->progress)
|
||||
progress_end (plug_in->progress);
|
||||
gimp_progress_end (plug_in->progress);
|
||||
plug_in->progress = NULL;
|
||||
|
||||
if (plug_in == current_plug_in)
|
||||
|
@ -1207,7 +1207,7 @@ plug_in_close (PlugIn *plug_in,
|
|||
/* Destroy the progress dialog if it exists. */
|
||||
if (plug_in->progress)
|
||||
{
|
||||
progress_end (plug_in->progress);
|
||||
gimp_progress_end (plug_in->progress);
|
||||
plug_in->progress = NULL;
|
||||
}
|
||||
|
||||
|
@ -3493,13 +3493,13 @@ plug_in_progress_init (PlugIn *plug_in,
|
|||
gdisp = gimp_display_get_by_ID (the_gimp, gdisp_ID);
|
||||
|
||||
if (plug_in->progress)
|
||||
plug_in->progress = progress_restart (plug_in->progress, message,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
plug_in->progress = gimp_progress_restart (plug_in->progress, message,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
else
|
||||
plug_in->progress = progress_start (gdisp, message, TRUE,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
plug_in->progress = gimp_progress_start (gdisp, message, TRUE,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -3508,8 +3508,8 @@ plug_in_progress_update (PlugIn *plug_in,
|
|||
{
|
||||
if (!plug_in->progress)
|
||||
plug_in_progress_init (plug_in, NULL, -1);
|
||||
|
||||
progress_update (plug_in->progress, percentage);
|
||||
|
||||
gimp_progress_update (plug_in->progress, percentage);
|
||||
}
|
||||
|
||||
static gchar *
|
||||
|
|
|
@ -98,6 +98,7 @@
|
|||
#include "widgets/gimpitemfactory.h"
|
||||
|
||||
#include "display/gimpdisplay.h"
|
||||
#include "display/gimpprogress.h"
|
||||
|
||||
#include "gui/brush-select.h"
|
||||
#include "gui/gradient-select.h"
|
||||
|
@ -108,7 +109,6 @@
|
|||
#include "plug-in-rc.h"
|
||||
|
||||
#include "app_procs.h"
|
||||
#include "gimpprogress.h"
|
||||
#include "gimprc.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
@ -908,7 +908,7 @@ plug_in_destroy (PlugIn *plug_in)
|
|||
g_free (plug_in->args[5]);
|
||||
|
||||
if (plug_in->progress)
|
||||
progress_end (plug_in->progress);
|
||||
gimp_progress_end (plug_in->progress);
|
||||
plug_in->progress = NULL;
|
||||
|
||||
if (plug_in == current_plug_in)
|
||||
|
@ -1207,7 +1207,7 @@ plug_in_close (PlugIn *plug_in,
|
|||
/* Destroy the progress dialog if it exists. */
|
||||
if (plug_in->progress)
|
||||
{
|
||||
progress_end (plug_in->progress);
|
||||
gimp_progress_end (plug_in->progress);
|
||||
plug_in->progress = NULL;
|
||||
}
|
||||
|
||||
|
@ -3493,13 +3493,13 @@ plug_in_progress_init (PlugIn *plug_in,
|
|||
gdisp = gimp_display_get_by_ID (the_gimp, gdisp_ID);
|
||||
|
||||
if (plug_in->progress)
|
||||
plug_in->progress = progress_restart (plug_in->progress, message,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
plug_in->progress = gimp_progress_restart (plug_in->progress, message,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
else
|
||||
plug_in->progress = progress_start (gdisp, message, TRUE,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
plug_in->progress = gimp_progress_start (gdisp, message, TRUE,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -3508,8 +3508,8 @@ plug_in_progress_update (PlugIn *plug_in,
|
|||
{
|
||||
if (!plug_in->progress)
|
||||
plug_in_progress_init (plug_in, NULL, -1);
|
||||
|
||||
progress_update (plug_in->progress, percentage);
|
||||
|
||||
gimp_progress_update (plug_in->progress, percentage);
|
||||
}
|
||||
|
||||
static gchar *
|
||||
|
|
|
@ -98,6 +98,7 @@
|
|||
#include "widgets/gimpitemfactory.h"
|
||||
|
||||
#include "display/gimpdisplay.h"
|
||||
#include "display/gimpprogress.h"
|
||||
|
||||
#include "gui/brush-select.h"
|
||||
#include "gui/gradient-select.h"
|
||||
|
@ -108,7 +109,6 @@
|
|||
#include "plug-in-rc.h"
|
||||
|
||||
#include "app_procs.h"
|
||||
#include "gimpprogress.h"
|
||||
#include "gimprc.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
@ -908,7 +908,7 @@ plug_in_destroy (PlugIn *plug_in)
|
|||
g_free (plug_in->args[5]);
|
||||
|
||||
if (plug_in->progress)
|
||||
progress_end (plug_in->progress);
|
||||
gimp_progress_end (plug_in->progress);
|
||||
plug_in->progress = NULL;
|
||||
|
||||
if (plug_in == current_plug_in)
|
||||
|
@ -1207,7 +1207,7 @@ plug_in_close (PlugIn *plug_in,
|
|||
/* Destroy the progress dialog if it exists. */
|
||||
if (plug_in->progress)
|
||||
{
|
||||
progress_end (plug_in->progress);
|
||||
gimp_progress_end (plug_in->progress);
|
||||
plug_in->progress = NULL;
|
||||
}
|
||||
|
||||
|
@ -3493,13 +3493,13 @@ plug_in_progress_init (PlugIn *plug_in,
|
|||
gdisp = gimp_display_get_by_ID (the_gimp, gdisp_ID);
|
||||
|
||||
if (plug_in->progress)
|
||||
plug_in->progress = progress_restart (plug_in->progress, message,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
plug_in->progress = gimp_progress_restart (plug_in->progress, message,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
else
|
||||
plug_in->progress = progress_start (gdisp, message, TRUE,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
plug_in->progress = gimp_progress_start (gdisp, message, TRUE,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -3508,8 +3508,8 @@ plug_in_progress_update (PlugIn *plug_in,
|
|||
{
|
||||
if (!plug_in->progress)
|
||||
plug_in_progress_init (plug_in, NULL, -1);
|
||||
|
||||
progress_update (plug_in->progress, percentage);
|
||||
|
||||
gimp_progress_update (plug_in->progress, percentage);
|
||||
}
|
||||
|
||||
static gchar *
|
||||
|
|
|
@ -98,6 +98,7 @@
|
|||
#include "widgets/gimpitemfactory.h"
|
||||
|
||||
#include "display/gimpdisplay.h"
|
||||
#include "display/gimpprogress.h"
|
||||
|
||||
#include "gui/brush-select.h"
|
||||
#include "gui/gradient-select.h"
|
||||
|
@ -108,7 +109,6 @@
|
|||
#include "plug-in-rc.h"
|
||||
|
||||
#include "app_procs.h"
|
||||
#include "gimpprogress.h"
|
||||
#include "gimprc.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
@ -908,7 +908,7 @@ plug_in_destroy (PlugIn *plug_in)
|
|||
g_free (plug_in->args[5]);
|
||||
|
||||
if (plug_in->progress)
|
||||
progress_end (plug_in->progress);
|
||||
gimp_progress_end (plug_in->progress);
|
||||
plug_in->progress = NULL;
|
||||
|
||||
if (plug_in == current_plug_in)
|
||||
|
@ -1207,7 +1207,7 @@ plug_in_close (PlugIn *plug_in,
|
|||
/* Destroy the progress dialog if it exists. */
|
||||
if (plug_in->progress)
|
||||
{
|
||||
progress_end (plug_in->progress);
|
||||
gimp_progress_end (plug_in->progress);
|
||||
plug_in->progress = NULL;
|
||||
}
|
||||
|
||||
|
@ -3493,13 +3493,13 @@ plug_in_progress_init (PlugIn *plug_in,
|
|||
gdisp = gimp_display_get_by_ID (the_gimp, gdisp_ID);
|
||||
|
||||
if (plug_in->progress)
|
||||
plug_in->progress = progress_restart (plug_in->progress, message,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
plug_in->progress = gimp_progress_restart (plug_in->progress, message,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
else
|
||||
plug_in->progress = progress_start (gdisp, message, TRUE,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
plug_in->progress = gimp_progress_start (gdisp, message, TRUE,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -3508,8 +3508,8 @@ plug_in_progress_update (PlugIn *plug_in,
|
|||
{
|
||||
if (!plug_in->progress)
|
||||
plug_in_progress_init (plug_in, NULL, -1);
|
||||
|
||||
progress_update (plug_in->progress, percentage);
|
||||
|
||||
gimp_progress_update (plug_in->progress, percentage);
|
||||
}
|
||||
|
||||
static gchar *
|
||||
|
|
|
@ -98,6 +98,7 @@
|
|||
#include "widgets/gimpitemfactory.h"
|
||||
|
||||
#include "display/gimpdisplay.h"
|
||||
#include "display/gimpprogress.h"
|
||||
|
||||
#include "gui/brush-select.h"
|
||||
#include "gui/gradient-select.h"
|
||||
|
@ -108,7 +109,6 @@
|
|||
#include "plug-in-rc.h"
|
||||
|
||||
#include "app_procs.h"
|
||||
#include "gimpprogress.h"
|
||||
#include "gimprc.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
@ -908,7 +908,7 @@ plug_in_destroy (PlugIn *plug_in)
|
|||
g_free (plug_in->args[5]);
|
||||
|
||||
if (plug_in->progress)
|
||||
progress_end (plug_in->progress);
|
||||
gimp_progress_end (plug_in->progress);
|
||||
plug_in->progress = NULL;
|
||||
|
||||
if (plug_in == current_plug_in)
|
||||
|
@ -1207,7 +1207,7 @@ plug_in_close (PlugIn *plug_in,
|
|||
/* Destroy the progress dialog if it exists. */
|
||||
if (plug_in->progress)
|
||||
{
|
||||
progress_end (plug_in->progress);
|
||||
gimp_progress_end (plug_in->progress);
|
||||
plug_in->progress = NULL;
|
||||
}
|
||||
|
||||
|
@ -3493,13 +3493,13 @@ plug_in_progress_init (PlugIn *plug_in,
|
|||
gdisp = gimp_display_get_by_ID (the_gimp, gdisp_ID);
|
||||
|
||||
if (plug_in->progress)
|
||||
plug_in->progress = progress_restart (plug_in->progress, message,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
plug_in->progress = gimp_progress_restart (plug_in->progress, message,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
else
|
||||
plug_in->progress = progress_start (gdisp, message, TRUE,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
plug_in->progress = gimp_progress_start (gdisp, message, TRUE,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -3508,8 +3508,8 @@ plug_in_progress_update (PlugIn *plug_in,
|
|||
{
|
||||
if (!plug_in->progress)
|
||||
plug_in_progress_init (plug_in, NULL, -1);
|
||||
|
||||
progress_update (plug_in->progress, percentage);
|
||||
|
||||
gimp_progress_update (plug_in->progress, percentage);
|
||||
}
|
||||
|
||||
static gchar *
|
||||
|
|
|
@ -98,6 +98,7 @@
|
|||
#include "widgets/gimpitemfactory.h"
|
||||
|
||||
#include "display/gimpdisplay.h"
|
||||
#include "display/gimpprogress.h"
|
||||
|
||||
#include "gui/brush-select.h"
|
||||
#include "gui/gradient-select.h"
|
||||
|
@ -108,7 +109,6 @@
|
|||
#include "plug-in-rc.h"
|
||||
|
||||
#include "app_procs.h"
|
||||
#include "gimpprogress.h"
|
||||
#include "gimprc.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
@ -908,7 +908,7 @@ plug_in_destroy (PlugIn *plug_in)
|
|||
g_free (plug_in->args[5]);
|
||||
|
||||
if (plug_in->progress)
|
||||
progress_end (plug_in->progress);
|
||||
gimp_progress_end (plug_in->progress);
|
||||
plug_in->progress = NULL;
|
||||
|
||||
if (plug_in == current_plug_in)
|
||||
|
@ -1207,7 +1207,7 @@ plug_in_close (PlugIn *plug_in,
|
|||
/* Destroy the progress dialog if it exists. */
|
||||
if (plug_in->progress)
|
||||
{
|
||||
progress_end (plug_in->progress);
|
||||
gimp_progress_end (plug_in->progress);
|
||||
plug_in->progress = NULL;
|
||||
}
|
||||
|
||||
|
@ -3493,13 +3493,13 @@ plug_in_progress_init (PlugIn *plug_in,
|
|||
gdisp = gimp_display_get_by_ID (the_gimp, gdisp_ID);
|
||||
|
||||
if (plug_in->progress)
|
||||
plug_in->progress = progress_restart (plug_in->progress, message,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
plug_in->progress = gimp_progress_restart (plug_in->progress, message,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
else
|
||||
plug_in->progress = progress_start (gdisp, message, TRUE,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
plug_in->progress = gimp_progress_start (gdisp, message, TRUE,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -3508,8 +3508,8 @@ plug_in_progress_update (PlugIn *plug_in,
|
|||
{
|
||||
if (!plug_in->progress)
|
||||
plug_in_progress_init (plug_in, NULL, -1);
|
||||
|
||||
progress_update (plug_in->progress, percentage);
|
||||
|
||||
gimp_progress_update (plug_in->progress, percentage);
|
||||
}
|
||||
|
||||
static gchar *
|
||||
|
|
|
@ -98,6 +98,7 @@
|
|||
#include "widgets/gimpitemfactory.h"
|
||||
|
||||
#include "display/gimpdisplay.h"
|
||||
#include "display/gimpprogress.h"
|
||||
|
||||
#include "gui/brush-select.h"
|
||||
#include "gui/gradient-select.h"
|
||||
|
@ -108,7 +109,6 @@
|
|||
#include "plug-in-rc.h"
|
||||
|
||||
#include "app_procs.h"
|
||||
#include "gimpprogress.h"
|
||||
#include "gimprc.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
@ -908,7 +908,7 @@ plug_in_destroy (PlugIn *plug_in)
|
|||
g_free (plug_in->args[5]);
|
||||
|
||||
if (plug_in->progress)
|
||||
progress_end (plug_in->progress);
|
||||
gimp_progress_end (plug_in->progress);
|
||||
plug_in->progress = NULL;
|
||||
|
||||
if (plug_in == current_plug_in)
|
||||
|
@ -1207,7 +1207,7 @@ plug_in_close (PlugIn *plug_in,
|
|||
/* Destroy the progress dialog if it exists. */
|
||||
if (plug_in->progress)
|
||||
{
|
||||
progress_end (plug_in->progress);
|
||||
gimp_progress_end (plug_in->progress);
|
||||
plug_in->progress = NULL;
|
||||
}
|
||||
|
||||
|
@ -3493,13 +3493,13 @@ plug_in_progress_init (PlugIn *plug_in,
|
|||
gdisp = gimp_display_get_by_ID (the_gimp, gdisp_ID);
|
||||
|
||||
if (plug_in->progress)
|
||||
plug_in->progress = progress_restart (plug_in->progress, message,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
plug_in->progress = gimp_progress_restart (plug_in->progress, message,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
else
|
||||
plug_in->progress = progress_start (gdisp, message, TRUE,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
plug_in->progress = gimp_progress_start (gdisp, message, TRUE,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -3508,8 +3508,8 @@ plug_in_progress_update (PlugIn *plug_in,
|
|||
{
|
||||
if (!plug_in->progress)
|
||||
plug_in_progress_init (plug_in, NULL, -1);
|
||||
|
||||
progress_update (plug_in->progress, percentage);
|
||||
|
||||
gimp_progress_update (plug_in->progress, percentage);
|
||||
}
|
||||
|
||||
static gchar *
|
||||
|
|
|
@ -98,6 +98,7 @@
|
|||
#include "widgets/gimpitemfactory.h"
|
||||
|
||||
#include "display/gimpdisplay.h"
|
||||
#include "display/gimpprogress.h"
|
||||
|
||||
#include "gui/brush-select.h"
|
||||
#include "gui/gradient-select.h"
|
||||
|
@ -108,7 +109,6 @@
|
|||
#include "plug-in-rc.h"
|
||||
|
||||
#include "app_procs.h"
|
||||
#include "gimpprogress.h"
|
||||
#include "gimprc.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
@ -908,7 +908,7 @@ plug_in_destroy (PlugIn *plug_in)
|
|||
g_free (plug_in->args[5]);
|
||||
|
||||
if (plug_in->progress)
|
||||
progress_end (plug_in->progress);
|
||||
gimp_progress_end (plug_in->progress);
|
||||
plug_in->progress = NULL;
|
||||
|
||||
if (plug_in == current_plug_in)
|
||||
|
@ -1207,7 +1207,7 @@ plug_in_close (PlugIn *plug_in,
|
|||
/* Destroy the progress dialog if it exists. */
|
||||
if (plug_in->progress)
|
||||
{
|
||||
progress_end (plug_in->progress);
|
||||
gimp_progress_end (plug_in->progress);
|
||||
plug_in->progress = NULL;
|
||||
}
|
||||
|
||||
|
@ -3493,13 +3493,13 @@ plug_in_progress_init (PlugIn *plug_in,
|
|||
gdisp = gimp_display_get_by_ID (the_gimp, gdisp_ID);
|
||||
|
||||
if (plug_in->progress)
|
||||
plug_in->progress = progress_restart (plug_in->progress, message,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
plug_in->progress = gimp_progress_restart (plug_in->progress, message,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
else
|
||||
plug_in->progress = progress_start (gdisp, message, TRUE,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
plug_in->progress = gimp_progress_start (gdisp, message, TRUE,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -3508,8 +3508,8 @@ plug_in_progress_update (PlugIn *plug_in,
|
|||
{
|
||||
if (!plug_in->progress)
|
||||
plug_in_progress_init (plug_in, NULL, -1);
|
||||
|
||||
progress_update (plug_in->progress, percentage);
|
||||
|
||||
gimp_progress_update (plug_in->progress, percentage);
|
||||
}
|
||||
|
||||
static gchar *
|
||||
|
|
|
@ -98,6 +98,7 @@
|
|||
#include "widgets/gimpitemfactory.h"
|
||||
|
||||
#include "display/gimpdisplay.h"
|
||||
#include "display/gimpprogress.h"
|
||||
|
||||
#include "gui/brush-select.h"
|
||||
#include "gui/gradient-select.h"
|
||||
|
@ -108,7 +109,6 @@
|
|||
#include "plug-in-rc.h"
|
||||
|
||||
#include "app_procs.h"
|
||||
#include "gimpprogress.h"
|
||||
#include "gimprc.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
@ -908,7 +908,7 @@ plug_in_destroy (PlugIn *plug_in)
|
|||
g_free (plug_in->args[5]);
|
||||
|
||||
if (plug_in->progress)
|
||||
progress_end (plug_in->progress);
|
||||
gimp_progress_end (plug_in->progress);
|
||||
plug_in->progress = NULL;
|
||||
|
||||
if (plug_in == current_plug_in)
|
||||
|
@ -1207,7 +1207,7 @@ plug_in_close (PlugIn *plug_in,
|
|||
/* Destroy the progress dialog if it exists. */
|
||||
if (plug_in->progress)
|
||||
{
|
||||
progress_end (plug_in->progress);
|
||||
gimp_progress_end (plug_in->progress);
|
||||
plug_in->progress = NULL;
|
||||
}
|
||||
|
||||
|
@ -3493,13 +3493,13 @@ plug_in_progress_init (PlugIn *plug_in,
|
|||
gdisp = gimp_display_get_by_ID (the_gimp, gdisp_ID);
|
||||
|
||||
if (plug_in->progress)
|
||||
plug_in->progress = progress_restart (plug_in->progress, message,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
plug_in->progress = gimp_progress_restart (plug_in->progress, message,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
else
|
||||
plug_in->progress = progress_start (gdisp, message, TRUE,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
plug_in->progress = gimp_progress_start (gdisp, message, TRUE,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -3508,8 +3508,8 @@ plug_in_progress_update (PlugIn *plug_in,
|
|||
{
|
||||
if (!plug_in->progress)
|
||||
plug_in_progress_init (plug_in, NULL, -1);
|
||||
|
||||
progress_update (plug_in->progress, percentage);
|
||||
|
||||
gimp_progress_update (plug_in->progress, percentage);
|
||||
}
|
||||
|
||||
static gchar *
|
||||
|
|
|
@ -98,6 +98,7 @@
|
|||
#include "widgets/gimpitemfactory.h"
|
||||
|
||||
#include "display/gimpdisplay.h"
|
||||
#include "display/gimpprogress.h"
|
||||
|
||||
#include "gui/brush-select.h"
|
||||
#include "gui/gradient-select.h"
|
||||
|
@ -108,7 +109,6 @@
|
|||
#include "plug-in-rc.h"
|
||||
|
||||
#include "app_procs.h"
|
||||
#include "gimpprogress.h"
|
||||
#include "gimprc.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
@ -908,7 +908,7 @@ plug_in_destroy (PlugIn *plug_in)
|
|||
g_free (plug_in->args[5]);
|
||||
|
||||
if (plug_in->progress)
|
||||
progress_end (plug_in->progress);
|
||||
gimp_progress_end (plug_in->progress);
|
||||
plug_in->progress = NULL;
|
||||
|
||||
if (plug_in == current_plug_in)
|
||||
|
@ -1207,7 +1207,7 @@ plug_in_close (PlugIn *plug_in,
|
|||
/* Destroy the progress dialog if it exists. */
|
||||
if (plug_in->progress)
|
||||
{
|
||||
progress_end (plug_in->progress);
|
||||
gimp_progress_end (plug_in->progress);
|
||||
plug_in->progress = NULL;
|
||||
}
|
||||
|
||||
|
@ -3493,13 +3493,13 @@ plug_in_progress_init (PlugIn *plug_in,
|
|||
gdisp = gimp_display_get_by_ID (the_gimp, gdisp_ID);
|
||||
|
||||
if (plug_in->progress)
|
||||
plug_in->progress = progress_restart (plug_in->progress, message,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
plug_in->progress = gimp_progress_restart (plug_in->progress, message,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
else
|
||||
plug_in->progress = progress_start (gdisp, message, TRUE,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
plug_in->progress = gimp_progress_start (gdisp, message, TRUE,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -3508,8 +3508,8 @@ plug_in_progress_update (PlugIn *plug_in,
|
|||
{
|
||||
if (!plug_in->progress)
|
||||
plug_in_progress_init (plug_in, NULL, -1);
|
||||
|
||||
progress_update (plug_in->progress, percentage);
|
||||
|
||||
gimp_progress_update (plug_in->progress, percentage);
|
||||
}
|
||||
|
||||
static gchar *
|
||||
|
|
|
@ -98,6 +98,7 @@
|
|||
#include "widgets/gimpitemfactory.h"
|
||||
|
||||
#include "display/gimpdisplay.h"
|
||||
#include "display/gimpprogress.h"
|
||||
|
||||
#include "gui/brush-select.h"
|
||||
#include "gui/gradient-select.h"
|
||||
|
@ -108,7 +109,6 @@
|
|||
#include "plug-in-rc.h"
|
||||
|
||||
#include "app_procs.h"
|
||||
#include "gimpprogress.h"
|
||||
#include "gimprc.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
@ -908,7 +908,7 @@ plug_in_destroy (PlugIn *plug_in)
|
|||
g_free (plug_in->args[5]);
|
||||
|
||||
if (plug_in->progress)
|
||||
progress_end (plug_in->progress);
|
||||
gimp_progress_end (plug_in->progress);
|
||||
plug_in->progress = NULL;
|
||||
|
||||
if (plug_in == current_plug_in)
|
||||
|
@ -1207,7 +1207,7 @@ plug_in_close (PlugIn *plug_in,
|
|||
/* Destroy the progress dialog if it exists. */
|
||||
if (plug_in->progress)
|
||||
{
|
||||
progress_end (plug_in->progress);
|
||||
gimp_progress_end (plug_in->progress);
|
||||
plug_in->progress = NULL;
|
||||
}
|
||||
|
||||
|
@ -3493,13 +3493,13 @@ plug_in_progress_init (PlugIn *plug_in,
|
|||
gdisp = gimp_display_get_by_ID (the_gimp, gdisp_ID);
|
||||
|
||||
if (plug_in->progress)
|
||||
plug_in->progress = progress_restart (plug_in->progress, message,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
plug_in->progress = gimp_progress_restart (plug_in->progress, message,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
else
|
||||
plug_in->progress = progress_start (gdisp, message, TRUE,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
plug_in->progress = gimp_progress_start (gdisp, message, TRUE,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -3508,8 +3508,8 @@ plug_in_progress_update (PlugIn *plug_in,
|
|||
{
|
||||
if (!plug_in->progress)
|
||||
plug_in_progress_init (plug_in, NULL, -1);
|
||||
|
||||
progress_update (plug_in->progress, percentage);
|
||||
|
||||
gimp_progress_update (plug_in->progress, percentage);
|
||||
}
|
||||
|
||||
static gchar *
|
||||
|
|
|
@ -98,6 +98,7 @@
|
|||
#include "widgets/gimpitemfactory.h"
|
||||
|
||||
#include "display/gimpdisplay.h"
|
||||
#include "display/gimpprogress.h"
|
||||
|
||||
#include "gui/brush-select.h"
|
||||
#include "gui/gradient-select.h"
|
||||
|
@ -108,7 +109,6 @@
|
|||
#include "plug-in-rc.h"
|
||||
|
||||
#include "app_procs.h"
|
||||
#include "gimpprogress.h"
|
||||
#include "gimprc.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
@ -908,7 +908,7 @@ plug_in_destroy (PlugIn *plug_in)
|
|||
g_free (plug_in->args[5]);
|
||||
|
||||
if (plug_in->progress)
|
||||
progress_end (plug_in->progress);
|
||||
gimp_progress_end (plug_in->progress);
|
||||
plug_in->progress = NULL;
|
||||
|
||||
if (plug_in == current_plug_in)
|
||||
|
@ -1207,7 +1207,7 @@ plug_in_close (PlugIn *plug_in,
|
|||
/* Destroy the progress dialog if it exists. */
|
||||
if (plug_in->progress)
|
||||
{
|
||||
progress_end (plug_in->progress);
|
||||
gimp_progress_end (plug_in->progress);
|
||||
plug_in->progress = NULL;
|
||||
}
|
||||
|
||||
|
@ -3493,13 +3493,13 @@ plug_in_progress_init (PlugIn *plug_in,
|
|||
gdisp = gimp_display_get_by_ID (the_gimp, gdisp_ID);
|
||||
|
||||
if (plug_in->progress)
|
||||
plug_in->progress = progress_restart (plug_in->progress, message,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
plug_in->progress = gimp_progress_restart (plug_in->progress, message,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
else
|
||||
plug_in->progress = progress_start (gdisp, message, TRUE,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
plug_in->progress = gimp_progress_start (gdisp, message, TRUE,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -3508,8 +3508,8 @@ plug_in_progress_update (PlugIn *plug_in,
|
|||
{
|
||||
if (!plug_in->progress)
|
||||
plug_in_progress_init (plug_in, NULL, -1);
|
||||
|
||||
progress_update (plug_in->progress, percentage);
|
||||
|
||||
gimp_progress_update (plug_in->progress, percentage);
|
||||
}
|
||||
|
||||
static gchar *
|
||||
|
|
|
@ -98,6 +98,7 @@
|
|||
#include "widgets/gimpitemfactory.h"
|
||||
|
||||
#include "display/gimpdisplay.h"
|
||||
#include "display/gimpprogress.h"
|
||||
|
||||
#include "gui/brush-select.h"
|
||||
#include "gui/gradient-select.h"
|
||||
|
@ -108,7 +109,6 @@
|
|||
#include "plug-in-rc.h"
|
||||
|
||||
#include "app_procs.h"
|
||||
#include "gimpprogress.h"
|
||||
#include "gimprc.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
@ -908,7 +908,7 @@ plug_in_destroy (PlugIn *plug_in)
|
|||
g_free (plug_in->args[5]);
|
||||
|
||||
if (plug_in->progress)
|
||||
progress_end (plug_in->progress);
|
||||
gimp_progress_end (plug_in->progress);
|
||||
plug_in->progress = NULL;
|
||||
|
||||
if (plug_in == current_plug_in)
|
||||
|
@ -1207,7 +1207,7 @@ plug_in_close (PlugIn *plug_in,
|
|||
/* Destroy the progress dialog if it exists. */
|
||||
if (plug_in->progress)
|
||||
{
|
||||
progress_end (plug_in->progress);
|
||||
gimp_progress_end (plug_in->progress);
|
||||
plug_in->progress = NULL;
|
||||
}
|
||||
|
||||
|
@ -3493,13 +3493,13 @@ plug_in_progress_init (PlugIn *plug_in,
|
|||
gdisp = gimp_display_get_by_ID (the_gimp, gdisp_ID);
|
||||
|
||||
if (plug_in->progress)
|
||||
plug_in->progress = progress_restart (plug_in->progress, message,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
plug_in->progress = gimp_progress_restart (plug_in->progress, message,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
else
|
||||
plug_in->progress = progress_start (gdisp, message, TRUE,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
plug_in->progress = gimp_progress_start (gdisp, message, TRUE,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -3508,8 +3508,8 @@ plug_in_progress_update (PlugIn *plug_in,
|
|||
{
|
||||
if (!plug_in->progress)
|
||||
plug_in_progress_init (plug_in, NULL, -1);
|
||||
|
||||
progress_update (plug_in->progress, percentage);
|
||||
|
||||
gimp_progress_update (plug_in->progress, percentage);
|
||||
}
|
||||
|
||||
static gchar *
|
||||
|
|
|
@ -98,6 +98,7 @@
|
|||
#include "widgets/gimpitemfactory.h"
|
||||
|
||||
#include "display/gimpdisplay.h"
|
||||
#include "display/gimpprogress.h"
|
||||
|
||||
#include "gui/brush-select.h"
|
||||
#include "gui/gradient-select.h"
|
||||
|
@ -108,7 +109,6 @@
|
|||
#include "plug-in-rc.h"
|
||||
|
||||
#include "app_procs.h"
|
||||
#include "gimpprogress.h"
|
||||
#include "gimprc.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
@ -908,7 +908,7 @@ plug_in_destroy (PlugIn *plug_in)
|
|||
g_free (plug_in->args[5]);
|
||||
|
||||
if (plug_in->progress)
|
||||
progress_end (plug_in->progress);
|
||||
gimp_progress_end (plug_in->progress);
|
||||
plug_in->progress = NULL;
|
||||
|
||||
if (plug_in == current_plug_in)
|
||||
|
@ -1207,7 +1207,7 @@ plug_in_close (PlugIn *plug_in,
|
|||
/* Destroy the progress dialog if it exists. */
|
||||
if (plug_in->progress)
|
||||
{
|
||||
progress_end (plug_in->progress);
|
||||
gimp_progress_end (plug_in->progress);
|
||||
plug_in->progress = NULL;
|
||||
}
|
||||
|
||||
|
@ -3493,13 +3493,13 @@ plug_in_progress_init (PlugIn *plug_in,
|
|||
gdisp = gimp_display_get_by_ID (the_gimp, gdisp_ID);
|
||||
|
||||
if (plug_in->progress)
|
||||
plug_in->progress = progress_restart (plug_in->progress, message,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
plug_in->progress = gimp_progress_restart (plug_in->progress, message,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
else
|
||||
plug_in->progress = progress_start (gdisp, message, TRUE,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
plug_in->progress = gimp_progress_start (gdisp, message, TRUE,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -3508,8 +3508,8 @@ plug_in_progress_update (PlugIn *plug_in,
|
|||
{
|
||||
if (!plug_in->progress)
|
||||
plug_in_progress_init (plug_in, NULL, -1);
|
||||
|
||||
progress_update (plug_in->progress, percentage);
|
||||
|
||||
gimp_progress_update (plug_in->progress, percentage);
|
||||
}
|
||||
|
||||
static gchar *
|
||||
|
|
|
@ -98,6 +98,7 @@
|
|||
#include "widgets/gimpitemfactory.h"
|
||||
|
||||
#include "display/gimpdisplay.h"
|
||||
#include "display/gimpprogress.h"
|
||||
|
||||
#include "gui/brush-select.h"
|
||||
#include "gui/gradient-select.h"
|
||||
|
@ -108,7 +109,6 @@
|
|||
#include "plug-in-rc.h"
|
||||
|
||||
#include "app_procs.h"
|
||||
#include "gimpprogress.h"
|
||||
#include "gimprc.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
@ -908,7 +908,7 @@ plug_in_destroy (PlugIn *plug_in)
|
|||
g_free (plug_in->args[5]);
|
||||
|
||||
if (plug_in->progress)
|
||||
progress_end (plug_in->progress);
|
||||
gimp_progress_end (plug_in->progress);
|
||||
plug_in->progress = NULL;
|
||||
|
||||
if (plug_in == current_plug_in)
|
||||
|
@ -1207,7 +1207,7 @@ plug_in_close (PlugIn *plug_in,
|
|||
/* Destroy the progress dialog if it exists. */
|
||||
if (plug_in->progress)
|
||||
{
|
||||
progress_end (plug_in->progress);
|
||||
gimp_progress_end (plug_in->progress);
|
||||
plug_in->progress = NULL;
|
||||
}
|
||||
|
||||
|
@ -3493,13 +3493,13 @@ plug_in_progress_init (PlugIn *plug_in,
|
|||
gdisp = gimp_display_get_by_ID (the_gimp, gdisp_ID);
|
||||
|
||||
if (plug_in->progress)
|
||||
plug_in->progress = progress_restart (plug_in->progress, message,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
plug_in->progress = gimp_progress_restart (plug_in->progress, message,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
else
|
||||
plug_in->progress = progress_start (gdisp, message, TRUE,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
plug_in->progress = gimp_progress_start (gdisp, message, TRUE,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -3508,8 +3508,8 @@ plug_in_progress_update (PlugIn *plug_in,
|
|||
{
|
||||
if (!plug_in->progress)
|
||||
plug_in_progress_init (plug_in, NULL, -1);
|
||||
|
||||
progress_update (plug_in->progress, percentage);
|
||||
|
||||
gimp_progress_update (plug_in->progress, percentage);
|
||||
}
|
||||
|
||||
static gchar *
|
||||
|
|
|
@ -98,6 +98,7 @@
|
|||
#include "widgets/gimpitemfactory.h"
|
||||
|
||||
#include "display/gimpdisplay.h"
|
||||
#include "display/gimpprogress.h"
|
||||
|
||||
#include "gui/brush-select.h"
|
||||
#include "gui/gradient-select.h"
|
||||
|
@ -108,7 +109,6 @@
|
|||
#include "plug-in-rc.h"
|
||||
|
||||
#include "app_procs.h"
|
||||
#include "gimpprogress.h"
|
||||
#include "gimprc.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
@ -908,7 +908,7 @@ plug_in_destroy (PlugIn *plug_in)
|
|||
g_free (plug_in->args[5]);
|
||||
|
||||
if (plug_in->progress)
|
||||
progress_end (plug_in->progress);
|
||||
gimp_progress_end (plug_in->progress);
|
||||
plug_in->progress = NULL;
|
||||
|
||||
if (plug_in == current_plug_in)
|
||||
|
@ -1207,7 +1207,7 @@ plug_in_close (PlugIn *plug_in,
|
|||
/* Destroy the progress dialog if it exists. */
|
||||
if (plug_in->progress)
|
||||
{
|
||||
progress_end (plug_in->progress);
|
||||
gimp_progress_end (plug_in->progress);
|
||||
plug_in->progress = NULL;
|
||||
}
|
||||
|
||||
|
@ -3493,13 +3493,13 @@ plug_in_progress_init (PlugIn *plug_in,
|
|||
gdisp = gimp_display_get_by_ID (the_gimp, gdisp_ID);
|
||||
|
||||
if (plug_in->progress)
|
||||
plug_in->progress = progress_restart (plug_in->progress, message,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
plug_in->progress = gimp_progress_restart (plug_in->progress, message,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
else
|
||||
plug_in->progress = progress_start (gdisp, message, TRUE,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
plug_in->progress = gimp_progress_start (gdisp, message, TRUE,
|
||||
G_CALLBACK (plug_in_progress_cancel),
|
||||
plug_in);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -3508,8 +3508,8 @@ plug_in_progress_update (PlugIn *plug_in,
|
|||
{
|
||||
if (!plug_in->progress)
|
||||
plug_in_progress_init (plug_in, NULL, -1);
|
||||
|
||||
progress_update (plug_in->progress, percentage);
|
||||
|
||||
gimp_progress_update (plug_in->progress, percentage);
|
||||
}
|
||||
|
||||
static gchar *
|
||||
|
|
|
@ -39,14 +39,13 @@
|
|||
|
||||
#include "display/gimpdisplay.h"
|
||||
#include "display/gimpdisplay-foreach.h"
|
||||
#include "display/gimpprogress.h"
|
||||
|
||||
#include "widgets/gimpdnd.h"
|
||||
|
||||
#include "gimpblendtool.h"
|
||||
#include "paint_options.h"
|
||||
|
||||
#include "gimpprogress.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
||||
|
||||
|
@ -326,7 +325,8 @@ gimp_blend_tool_button_release (GimpTool *tool,
|
|||
|
||||
#else /* ! BLEND_UI_CALLS_VIA_PDB */
|
||||
|
||||
progress = progress_start (gdisp, _("Blending..."), FALSE, NULL, NULL);
|
||||
progress = gimp_progress_start (gdisp, _("Blending..."), FALSE,
|
||||
NULL, NULL);
|
||||
|
||||
gimp_drawable_blend (gimp_image_active_drawable (gimage),
|
||||
options->blend_mode,
|
||||
|
@ -342,11 +342,11 @@ gimp_blend_tool_button_release (GimpTool *tool,
|
|||
blend_tool->starty,
|
||||
blend_tool->endx,
|
||||
blend_tool->endy,
|
||||
progress ? progress_update_and_flush : NULL,
|
||||
progress ? gimp_progress_update_and_flush : NULL,
|
||||
progress);
|
||||
|
||||
if (progress)
|
||||
progress_end (progress);
|
||||
gimp_progress_end (progress);
|
||||
|
||||
gdisplays_flush ();
|
||||
#endif /* ! BLEND_UI_CALLS_VIA_PDB */
|
||||
|
|
|
@ -45,12 +45,12 @@
|
|||
|
||||
#include "display/gimpdisplay.h"
|
||||
#include "display/gimpdisplay-foreach.h"
|
||||
#include "display/gimpprogress.h"
|
||||
|
||||
#include "gimptransformtool.h"
|
||||
#include "tool_manager.h"
|
||||
#include "transform_options.h"
|
||||
|
||||
#include "gimpprogress.h"
|
||||
#include "undo.h"
|
||||
#include "path_transform.h"
|
||||
|
||||
|
@ -818,7 +818,8 @@ gimp_transform_tool_transform_tiles (GimpTransformTool *transform_tool,
|
|||
|
||||
options = (TransformOptions *) tool->tool_info->tool_options;
|
||||
|
||||
progress = progress_start (tool->gdisp, progress_text, FALSE, NULL, NULL);
|
||||
progress = gimp_progress_start (tool->gdisp, progress_text, FALSE,
|
||||
NULL, NULL);
|
||||
|
||||
ret = gimp_drawable_transform_tiles_affine (gimp_image_active_drawable (tool->gdisp->gimage),
|
||||
transform_tool->original,
|
||||
|
@ -826,12 +827,13 @@ gimp_transform_tool_transform_tiles (GimpTransformTool *transform_tool,
|
|||
options->clip,
|
||||
transform_tool->transform,
|
||||
options->direction,
|
||||
progress ? progress_update_and_flush :
|
||||
(GimpProgressFunc) NULL,
|
||||
progress ?
|
||||
gimp_progress_update_and_flush :
|
||||
NULL,
|
||||
progress);
|
||||
|
||||
if (progress)
|
||||
progress_end (progress);
|
||||
gimp_progress_end (progress);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2002-02-22 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* POTFILES.in: gimpprogress.c -> display/gimpprogress.c
|
||||
|
||||
2002-02-21 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* POTFILES.in: floating_sel.c -> core/gimplayer-floating-sel.c
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
app/app_procs.c
|
||||
app/gimphelp.c
|
||||
app/gimpprogress.c
|
||||
app/gimprc.c
|
||||
app/main.c
|
||||
app/nav_window.c
|
||||
|
@ -38,6 +37,7 @@ app/display/gimpdisplay.c
|
|||
app/display/gimpdisplayshell.c
|
||||
app/display/gimpdisplayshell-callbacks.c
|
||||
app/display/gimpdisplayshell-layer-select.c
|
||||
app/display/gimpprogress.c
|
||||
|
||||
app/file/file-open.c
|
||||
app/file/file-save.c
|
||||
|
|
Loading…
Reference in New Issue