Commit f5afb754 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

Added message severities and make sure all messages are routed through a

2006-10-09  Michael Natterer  <mitch@gimp.org>

	Added message severities and make sure all messages are routed
	through a central function, so redirecting to the error console or
	stderr work again:

	* app/core/core-enums.[ch]: added enum GimpMessageSeverity { INFO,
	WARNING, ERROR }.

	* app/core/gimp.[ch] (gimp_message)
	(gimp_message_valist): added severity parameter. Changed
	"GimpProgress *progress" parameter to "GObject *handler", where
	"handler" can be either a GimpProgress, a GtkWidget or NULL.

	* app/core/gimp-gui.[ch] (gimp_show_message): ditto. Honor
	--console-messages again. Always dispatch to the GUI message
	handler first if it exists.

	* app/gui/gui-message.[ch]: pass severity parameters around.

	(gui_message_error_dialog): if "handler" is a progress, dispatch
	the message to it first. If it is a widget (and *not* a progress),
	use a GtkMessageDialog on top of that widget's toplevel. Fall
	back to the usual GimpErrorDialog otherwise.

	* app/core/gimpprogress.[ch] (gimp_progress_message): added
	severity parameter. Also added boolean return value to the virtual
	function so it can decide to fail if it can't handle the message.

	* app/display/gimpdisplay.c: implement GimpProgress::message() and
	redirect the message to GimpDisplayShell.

	* app/display/gimpdisplayshell-progress.c: implement
	GimpProgress::message() and redirect the message to GimpStatusbar
	if it is not an error and if the status bar is visible.

	* app/display/gimpstatusbar.[ch]: implement GimpProgress::message(),
	but fail on messages that contain a newline. Show the right icons
	for the message severities (work in progress).

	* app/display/gimpdisplayshell.[ch]: removed
	gimp_display_shell_message() and its _valist() variant.

	* app/widgets/gimperrorconsole.[ch]: show the right icons for the
	message severities.

	* app/widgets/gimpthumbbox.c (gimp_thumb_box_progress_message):
	return TRUE to swallow all messages.

	* app/widgets/gimpwidgets-utils.[ch]: removed
	gimp_show_message_dialog(). Added gimp_get_message_stock_id().

	* app/errors.c
	* app/actions/edit-commands.c
	* app/actions/error-console-commands.c
	* app/actions/file-commands.c
	* app/actions/select-commands.c
	* app/actions/text-editor-commands.c
	* app/actions/vectors-commands.c
	* app/core/gimpimage-convert.c
	* app/core/gimpimagefile.c
	* app/dialogs/convert-dialog.c
	* app/dialogs/file-open-dialog.c
	* app/dialogs/file-open-location-dialog.c
	* app/dialogs/file-save-dialog.c
	* app/dialogs/palette-import-dialog.c
	* app/dialogs/stroke-dialog.c
	* app/display/gimpdisplayshell-dnd.c
	* app/pdb/gimppdb.c
	* app/plug-in/gimpplugin.c
	* app/tools/gimpimagemaptool.c
	* app/tools/gimptool.c
	* app/tools/gimpvectortool.c
	* app/widgets/gimpactionview.c
	* app/widgets/gimpcontrollerlist.c
	* app/widgets/gimppdbdialog.c
	* app/widgets/gimpvectorstreeview.c
	* app/xcf/xcf-load.c
	* app/xcf/xcf-save.c
	* app/xcf/xcf.c
	* tools/pdbgen/pdb/brush.pdb
	* tools/pdbgen/pdb/gradient.pdb
	* tools/pdbgen/pdb/image.pdb
	* tools/pdbgen/pdb/message.pdb
	* tools/pdbgen/pdb/palette.pdb: added severity parameter to
	gimp_message() calls. Convert all calls to
	gimp_show_message_dialog() and gimp_display_shell_message() to
	gimp_message(). Also converted some more g_message() calls.

	* app/pdb/brush_cmds.c
	* app/pdb/gradient_cmds.c
	* app/pdb/image_cmds.c
	* app/pdb/message_cmds.c
	* app/pdb/palette_cmds.c: regenerated.
parent a8855ae6
2006-10-09 Michael Natterer <mitch@gimp.org>
Added message severities and make sure all messages are routed
through a central function, so redirecting to the error console or
stderr work again:
* app/core/core-enums.[ch]: added enum GimpMessageSeverity { INFO,
WARNING, ERROR }.
* app/core/gimp.[ch] (gimp_message)
(gimp_message_valist): added severity parameter. Changed
"GimpProgress *progress" parameter to "GObject *handler", where
"handler" can be either a GimpProgress, a GtkWidget or NULL.
* app/core/gimp-gui.[ch] (gimp_show_message): ditto. Honor
--console-messages again. Always dispatch to the GUI message
handler first if it exists.
* app/gui/gui-message.[ch]: pass severity parameters around.
(gui_message_error_dialog): if "handler" is a progress, dispatch
the message to it first. If it is a widget (and *not* a progress),
use a GtkMessageDialog on top of that widget's toplevel. Fall
back to the usual GimpErrorDialog otherwise.
* app/core/gimpprogress.[ch] (gimp_progress_message): added
severity parameter. Also added boolean return value to the virtual
function so it can decide to fail if it can't handle the message.
* app/display/gimpdisplay.c: implement GimpProgress::message() and
redirect the message to GimpDisplayShell.
* app/display/gimpdisplayshell-progress.c: implement
GimpProgress::message() and redirect the message to GimpStatusbar
if it is not an error and if the status bar is visible.
* app/display/gimpstatusbar.[ch]: implement GimpProgress::message(),
but fail on messages that contain a newline. Show the right icons
for the message severities (work in progress).
* app/display/gimpdisplayshell.[ch]: removed
gimp_display_shell_message() and its _valist() variant.
* app/widgets/gimperrorconsole.[ch]: show the right icons for the
message severities.
* app/widgets/gimpthumbbox.c (gimp_thumb_box_progress_message):
return TRUE to swallow all messages.
* app/widgets/gimpwidgets-utils.[ch]: removed
gimp_show_message_dialog(). Added gimp_get_message_stock_id().
* app/errors.c
* app/actions/edit-commands.c
* app/actions/error-console-commands.c
* app/actions/file-commands.c
* app/actions/select-commands.c
* app/actions/text-editor-commands.c
* app/actions/vectors-commands.c
* app/core/gimpimage-convert.c
* app/core/gimpimagefile.c
* app/dialogs/convert-dialog.c
* app/dialogs/file-open-dialog.c
* app/dialogs/file-open-location-dialog.c
* app/dialogs/file-save-dialog.c
* app/dialogs/palette-import-dialog.c
* app/dialogs/stroke-dialog.c
* app/display/gimpdisplayshell-dnd.c
* app/pdb/gimppdb.c
* app/plug-in/gimpplugin.c
* app/tools/gimpimagemaptool.c
* app/tools/gimptool.c
* app/tools/gimpvectortool.c
* app/widgets/gimpactionview.c
* app/widgets/gimpcontrollerlist.c
* app/widgets/gimppdbdialog.c
* app/widgets/gimpvectorstreeview.c
* app/xcf/xcf-load.c
* app/xcf/xcf-save.c
* app/xcf/xcf.c
* tools/pdbgen/pdb/brush.pdb
* tools/pdbgen/pdb/gradient.pdb
* tools/pdbgen/pdb/image.pdb
* tools/pdbgen/pdb/message.pdb
* tools/pdbgen/pdb/palette.pdb: added severity parameter to
gimp_message() calls. Convert all calls to
gimp_show_message_dialog() and gimp_display_shell_message() to
gimp_message(). Also converted some more g_message() calls.
* app/pdb/brush_cmds.c
* app/pdb/gradient_cmds.c
* app/pdb/image_cmds.c
* app/pdb/message_cmds.c
* app/pdb/palette_cmds.c: regenerated.
2006-10-07 Manish Singh <yosh@gimp.org>
* plug-ins/pygimp/gimpfu.py: Don't use Python 2.4 specific functions,
......
......@@ -265,7 +265,8 @@ edit_paste_as_new_cmd_callback (GtkAction *action,
}
else
{
g_message (_("There is no image data in the clipboard to paste."));
gimp_message (gimp, NULL, GIMP_MESSAGE_WARNING,
_("There is no image data in the clipboard to paste."));
}
}
......@@ -418,9 +419,9 @@ edit_paste (GimpDisplay *display,
}
else
{
gimp_display_shell_message (GIMP_DISPLAY_SHELL (display->shell),
_("There is no image data in "
"the clipboard to paste."));
gimp_message (display->image->gimp, G_OBJECT (display),
GIMP_MESSAGE_WARNING,
_("There is no image data in the clipboard to paste."));
}
}
}
......@@ -437,7 +438,8 @@ cut_named_buffer_callback (GtkWidget *widget,
if (! drawable)
{
g_message (_("There is no active layer or channel to cut from."));
gimp_message (image->gimp, NULL, GIMP_MESSAGE_WARNING,
_("There is no active layer or channel to cut from."));
return;
}
......@@ -463,7 +465,8 @@ copy_named_buffer_callback (GtkWidget *widget,
if (! drawable)
{
g_message (_("There is no active layer or channel to copy from."));
gimp_message (image->gimp, NULL, GIMP_MESSAGE_WARNING,
_("There is no active layer or channel to copy from."));
return;
}
......
......@@ -25,6 +25,8 @@
#include "actions-types.h"
#include "core/gimp.h"
#include "widgets/gimperrorconsole.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimpwidgets-utils.h"
......@@ -78,8 +80,8 @@ error_console_save_cmd_callback (GtkAction *action,
if (value && ! gtk_text_buffer_get_selection_bounds (console->text_buffer,
NULL, NULL))
{
gimp_show_message_dialog (GTK_WIDGET (console), GTK_MESSAGE_WARNING,
_("Cannot save. Nothing is selected."));
gimp_message (console->gimp, G_OBJECT (console), GIMP_MESSAGE_WARNING,
_("Cannot save. Nothing is selected."));
return;
}
......@@ -147,10 +149,10 @@ error_console_save_response (GtkWidget *dialog,
if (! gimp_text_buffer_save (console->text_buffer, filename,
console->save_selection, &error))
{
gimp_show_message_dialog (dialog, GTK_MESSAGE_ERROR,
_("Error writing file '%s':\n%s"),
gimp_filename_to_utf8 (filename),
error->message);
gimp_message (console->gimp, G_OBJECT (dialog), GIMP_MESSAGE_ERROR,
_("Error writing file '%s':\n%s"),
gimp_filename_to_utf8 (filename),
error->message);
g_clear_error (&error);
g_free (filename);
return;
......
......@@ -173,8 +173,9 @@ file_last_opened_cmd_callback (GtkAction *action,
gchar *filename =
file_utils_uri_display_name (GIMP_OBJECT (imagefile)->name);
g_message (_("Opening '%s' failed:\n\n%s"),
filename, error->message);
gimp_message (gimp, NULL, GIMP_MESSAGE_ERROR,
_("Opening '%s' failed:\n\n%s"),
filename, error->message);
g_clear_error (&error);
g_free (filename);
......@@ -219,6 +220,7 @@ file_save_cmd_callback (GtkAction *action,
GimpPDBStatusType status;
GError *error = NULL;
GList *list;
gchar *filename;
for (list = gimp_action_groups_from_name ("file");
list;
......@@ -233,19 +235,31 @@ file_save_cmd_callback (GtkAction *action,
uri, save_proc,
GIMP_RUN_WITH_LAST_VALS, FALSE, &error);
if (status != GIMP_PDB_SUCCESS &&
status != GIMP_PDB_CANCEL)
{
gchar *filename = file_utils_uri_display_name (uri);
filename = file_utils_uri_display_name (uri);
gimp_message (image->gimp, GIMP_PROGRESS (display),
switch (status)
{
case GIMP_PDB_SUCCESS:
gimp_message (image->gimp, G_OBJECT (display), GIMP_MESSAGE_INFO,
_("Image saved to '%s'"),
filename);
break;
case GIMP_PDB_CANCEL:
gimp_message (image->gimp, G_OBJECT (display), GIMP_MESSAGE_INFO,
_("Saving canceled"));
break;
default:
gimp_message (image->gimp, G_OBJECT (display), GIMP_MESSAGE_ERROR,
_("Saving '%s' failed:\n\n%s"),
filename, error->message);
g_clear_error (&error);
g_free (filename);
break;
}
g_free (filename);
for (list = gimp_action_groups_from_name ("file");
list;
list = g_list_next (list))
......@@ -326,7 +340,7 @@ file_revert_cmd_callback (GtkAction *action,
if (! uri)
{
gimp_message (image->gimp, GIMP_PROGRESS (display),
gimp_message (image->gimp, G_OBJECT (display), GIMP_MESSAGE_ERROR,
_("Revert failed. "
"No file name associated with this image."));
}
......@@ -567,7 +581,7 @@ file_revert_confirm_response (GtkWidget *dialog,
{
gchar *filename = file_utils_uri_display_name (uri);
gimp_message (gimp, GIMP_PROGRESS (display),
gimp_message (gimp, G_OBJECT (display), GIMP_MESSAGE_ERROR,
_("Reverting to '%s' failed:\n\n%s"),
filename, error->message);
g_clear_error (&error);
......
......@@ -286,7 +286,8 @@ select_stroke_cmd_callback (GtkAction *action,
if (! drawable)
{
g_message (_("There is no active layer or channel to stroke to."));
gimp_message (image->gimp, NULL, GIMP_MESSAGE_WARNING,
_("There is no active layer or channel to stroke to."));
return;
}
......@@ -314,7 +315,8 @@ select_stroke_last_vals_cmd_callback (GtkAction *action,
if (! drawable)
{
g_message (_("There is no active layer or channel to stroke to."));
gimp_message (image->gimp, NULL, GIMP_MESSAGE_WARNING,
_("There is no active layer or channel to stroke to."));
return;
}
......
......@@ -25,8 +25,11 @@
#include "actions-types.h"
#include "core/gimp.h"
#include "widgets/gimptexteditor.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimpuimanager.h"
#include "widgets/gimpwidgets-utils.h"
#include "text-editor-commands.h"
......@@ -134,10 +137,11 @@ text_editor_load_response (GtkWidget *dialog,
if (! gimp_text_buffer_load (buffer, filename, &error))
{
gimp_show_message_dialog (dialog, GTK_MESSAGE_ERROR,
_("Could not open '%s' for reading: %s"),
gimp_filename_to_utf8 (filename),
error->message);
gimp_message (editor->ui_manager->gimp, G_OBJECT (dialog),
GIMP_MESSAGE_ERROR,
_("Could not open '%s' for reading: %s"),
gimp_filename_to_utf8 (filename),
error->message);
g_clear_error (&error);
g_free (filename);
return;
......
......@@ -356,7 +356,8 @@ vectors_stroke_cmd_callback (GtkAction *action,
if (! drawable)
{
g_message (_("There is no active layer or channel to stroke to."));
gimp_message (image->gimp, NULL, GIMP_MESSAGE_WARNING,
_("There is no active layer or channel to stroke to."));
return;
}
......@@ -385,7 +386,8 @@ vectors_stroke_last_vals_cmd_callback (GtkAction *action,
if (! drawable)
{
g_message (_("There is no active layer or channel to stroke to."));
gimp_message (image->gimp, NULL, GIMP_MESSAGE_WARNING,
_("There is no active layer or channel to stroke to."));
return;
}
......@@ -440,7 +442,8 @@ vectors_paste_cmd_callback (GtkAction *action,
if (! gimp_vectors_import_buffer (image, svg, svg_size,
TRUE, TRUE, -1, &error))
{
g_message (error->message);
gimp_message (image->gimp, NULL, GIMP_MESSAGE_ERROR,
error->message);
g_clear_error (&error);
}
else
......@@ -621,7 +624,8 @@ vectors_import_response (GtkWidget *widget,
}
else
{
g_message (error->message);
gimp_message (dialog->image->gimp, NULL, GIMP_MESSAGE_ERROR,
error->message);
g_error_free (error);
}
......@@ -651,7 +655,8 @@ vectors_export_response (GtkWidget *widget,
if (! gimp_vectors_export_file (dialog->image, vectors, filename, &error))
{
g_message (error->message);
gimp_message (dialog->image->gimp, NULL, GIMP_MESSAGE_ERROR,
error->message);
g_error_free (error);
}
......
......@@ -1210,6 +1210,36 @@ gimp_select_criterion_get_type (void)
return type;
}
GType
gimp_message_severity_get_type (void)
{
static const GEnumValue values[] =
{
{ GIMP_MESSAGE_INFO, "GIMP_MESSAGE_INFO", "info" },
{ GIMP_MESSAGE_WARNING, "GIMP_MESSAGE_WARNING", "warning" },
{ GIMP_MESSAGE_ERROR, "GIMP_MESSAGE_ERROR", "error" },
{ 0, NULL, NULL }
};
static const GimpEnumDesc descs[] =
{
{ GIMP_MESSAGE_INFO, N_("Message"), NULL },
{ GIMP_MESSAGE_WARNING, N_("Warning"), NULL },
{ GIMP_MESSAGE_ERROR, N_("Error"), NULL },
{ 0, NULL, NULL }
};
static GType type = 0;
if (! type)
{
type = g_enum_register_static ("GimpMessageSeverity", values);
gimp_enum_set_value_descriptions (type, descs);
}
return type;
}
/* Generated data ends here */
......@@ -549,7 +549,7 @@ typedef enum
GType gimp_select_criterion_get_type (void) G_GNUC_CONST;
typedef enum
typedef enum
{
GIMP_SELECT_CRITERION_COMPOSITE, /*< desc="Composite" >*/
GIMP_SELECT_CRITERION_R, /*< desc="Red" >*/
......@@ -561,6 +561,18 @@ typedef enum
} GimpSelectCriterion;
#define GIMP_TYPE_MESSAGE_SEVERITY (gimp_message_severity_get_type ())
GType gimp_message_severity_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_MESSAGE_INFO, /*< desc="Message" >*/
GIMP_MESSAGE_WARNING, /*< desc="Warning" >*/
GIMP_MESSAGE_ERROR /*< desc="Error" >*/
} GimpMessageSeverity;
/*
* non-registered enums; register them if needed
*/
......
......@@ -149,31 +149,41 @@ gimp_unset_busy (Gimp *gimp)
}
void
gimp_show_message (Gimp *gimp,
GimpProgress *progress,
const gchar *domain,
const gchar *message)
gimp_show_message (Gimp *gimp,
GObject *handler,
GimpMessageSeverity severity,
const gchar *domain,
const gchar *message)
{
const gchar *desc = "Message";
g_return_if_fail (GIMP_IS_GIMP (gimp));
g_return_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress));
g_return_if_fail (handler == NULL || G_IS_OBJECT (handler));
g_return_if_fail (message != NULL);
if (! domain)
domain = GIMP_ACRONYM;
if (progress &&
gimp_progress_message (progress, gimp, domain, message))
{
/* message has already been handled by GimpProgress */
}
else if (gimp->gui.show_message && ! gimp->console_messages)
if (! gimp->console_messages)
{
gimp->gui.show_message (gimp, progress, domain, message);
}
else
{
g_printerr ("%s: %s\n\n", domain, message);
if (gimp->gui.show_message)
{
gimp->gui.show_message (gimp, handler,
severity, domain, message);
return;
}
else if (GIMP_IS_PROGRESS (handler) &&
gimp_progress_message (GIMP_PROGRESS (handler), gimp,
severity, domain, message))
{
/* message has been handled by GimpProgress */
return;
}
}
gimp_enum_get_value (GIMP_TYPE_MESSAGE_SEVERITY, severity,
NULL, NULL, &desc, NULL);
g_printerr ("%s-%s: %s\n\n", domain, desc, message);
}
void
......
......@@ -33,7 +33,8 @@ struct _GimpGui
void (* unset_busy) (Gimp *gimp);
void (* show_message) (Gimp *gimp,
GimpProgress *progress,
GObject *handler,
GimpMessageSeverity severity,
const gchar *domain,
const gchar *message);
void (* help) (Gimp *gimp,
......@@ -110,7 +111,8 @@ void gimp_set_busy_until_idle (Gimp *gimp);
void gimp_unset_busy (Gimp *gimp);
void gimp_show_message (Gimp *gimp,
GimpProgress *progress,
GObject *handler,
GimpMessageSeverity severity,
const gchar *domain,
const gchar *message);
void gimp_help (Gimp *gimp,
......
......@@ -994,34 +994,37 @@ gimp_get_tool_info (Gimp *gimp,
}
void
gimp_message (Gimp *gimp,
GimpProgress *progress,
const gchar *format,
gimp_message (Gimp *gimp,
GObject *handler,
GimpMessageSeverity severity,
const gchar *format,
...)
{
va_list args;
va_start (args, format);
gimp_message_valist (gimp, progress, format, args);
gimp_message_valist (gimp, handler, severity, format, args);
va_end (args);
}
void
gimp_message_valist (Gimp *gimp,
GimpProgress *progress,
const gchar *format,
va_list args)
gimp_message_valist (Gimp *gimp,
GObject *handler,
GimpMessageSeverity severity,
const gchar *format,
va_list args)
{
gchar *message;
g_return_if_fail (GIMP_IS_GIMP (gimp));
g_return_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress));
g_return_if_fail (handler == NULL || G_IS_OBJECT (handler));
g_return_if_fail (format != NULL);
message = g_strdup_vprintf (format, args);
gimp_show_message (gimp, progress, NULL, message);
gimp_show_message (gimp, handler, severity, NULL, message);
g_free (message);
}
......@@ -175,11 +175,13 @@ GimpToolInfo * gimp_get_tool_info (Gimp *gimp,
const gchar *tool_name);
void gimp_message (Gimp *gimp,
GimpProgress *progress,
GObject *handler,
GimpMessageSeverity severity,
const gchar *format,
...) G_GNUC_PRINTF(3,4);
...) G_GNUC_PRINTF(4,5);
void gimp_message_valist (Gimp *gimp,
GimpProgress *progress,
GObject *handler,
GimpMessageSeverity severity,
const gchar *format,
va_list args);
......
......@@ -789,7 +789,7 @@ gimp_image_convert (GimpImage *image,
if (custom_palette->n_colors < 1)
{
gimp_message (image->gimp, progress,
gimp_message (image->gimp, G_OBJECT (progress), GIMP_MESSAGE_ERROR,
_("Cannot convert image: palette is empty."));
return;
}
......
......@@ -290,7 +290,8 @@ gimp_imagefile_create_thumbnail (GimpImagefile *imagefile,
if (! success)
{
gimp_message (imagefile->gimp, progress, error->message);
gimp_message (imagefile->gimp, G_OBJECT (progress),
GIMP_MESSAGE_ERROR, error->message);
g_error_free (error);
}
}
......
......@@ -219,23 +219,23 @@ gimp_progress_get_window (GimpProgress *progress)
}
gboolean
gimp_progress_message (GimpProgress *progress,
Gimp *gimp,
const gchar *domain,
const gchar *message)
gimp_progress_message (GimpProgress *progress,
Gimp *gimp,
GimpMessageSeverity severity,
const gchar *domain,
const gchar *message)
{
GimpProgressInterface *progress_iface;
g_return_val_if_fail (GIMP_IS_PROGRESS (progress), FALSE);
g_return_val_if_fail (GIMP_IS_GIMP (gimp), FALSE);
g_return_val_if_fail (domain != NULL, FALSE);
g_return_val_if_fail (message != NULL, FALSE);
progress_iface = GIMP_PROGRESS_GET_INTERFACE (progress);
if (progress_iface->message)
{
progress_iface->message (progress, gimp, domain, message);
return TRUE;
}
return progress_iface->message (progress, gimp, severity, domain, message);
return FALSE;
}
......
......@@ -36,59 +36,61 @@ struct _GimpProgressInterface
GTypeInterface base_iface;
/* virtual functions */
GimpProgress * (* start) (GimpProgress *progress,
const gchar *message,
gboolean cancelable);
void (* end) (GimpProgress *progress);
gboolean (* is_active) (GimpProgress *progress);
void (* set_text) (GimpProgress *progress,
const gchar *message);
void (* set_value) (GimpProgress *progress,
gdouble percentage);
gdouble (* get_value) (GimpProgress *progress);
void (* pulse) (GimpProgress *progress);
guint32 (* get_window) (GimpProgress *progress);
void (* message) (GimpProgress *progress,
Gimp *gimp,
const gchar *domain,
const gchar *message);
GimpProgress * (* start) (GimpProgress *progress,
const gchar *message,
gboolean cancelable);
void (* end) (GimpProgress *progress);
gboolean (* is_active) (GimpProgress *progress);
void (* set_text) (GimpProgress *progress,
const gchar *message);
void (* set_value) (GimpProgress *progress,
gdouble percentage);
gdouble (* get_value) (GimpProgress *progress);
void (* pulse) (GimpProgress *progress);
guint32 (* get_window) (GimpProgress *progress);
gboolean (* message) (GimpProgress *progress,
Gimp *gimp,
GimpMessageSeverity severity,
const gchar *domain,
const gchar *message);
/* signals */
void (* cancel) (GimpProgress *progress);
void (* cancel) (GimpProgress *progress);
};
GType gimp_progress_interface_get_type (void) G_GNUC_CONST;
GimpProgress * gimp_progress_start (GimpProgress *progress,
const gchar *message,
gboolean cancelable);
void gimp_progress_end (GimpProgress *progress);
gboolean gimp_progress_is_active (GimpProgress *progress);
void gimp_progress_set_text (GimpProgress *progress,
const gchar *message);
void gimp_progress_set_value (GimpProgress *progress,
gdouble percentage);
gdouble gimp_progress_get_value (GimpProgress *progress);
void gimp_progress_pulse (GimpProgress *progress);
guint32 gimp_progress_get_window (GimpProgress *progress);
gboolean gimp_progress_message (GimpProgress *progress,
Gimp *gimp,
const gchar *domain,
const gchar *message);
void gimp_progress_cancel (GimpProgress *progress);
void gimp_progress_update_and_flush (gint min,
gint max,
gint current,
gpointer data);
GimpProgress * gimp_progress_start (GimpProgress *progress,
const gchar *message,
gboolean cancelable);
void gimp_progress_end (GimpProgress *progress);
gboolean gimp_progress_is_active (GimpProgress *progress);
void gimp_progress_set_text (GimpProgress *progress,
const gchar *message);
void gimp_progress_set_value (GimpProgress *progress,
gdouble percentage);
gdouble gimp_progress_get_value (GimpProgress *progress);
void gimp_progress_pulse (GimpProgress *progress);