gimp r26661 - in trunk: . app/plug-in
- From: mitch svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r26661 - in trunk: . app/plug-in
- Date: Tue, 19 Aug 2008 08:24:49 +0000 (UTC)
Author: mitch
Date: Tue Aug 19 08:24:48 2008
New Revision: 26661
URL: http://svn.gnome.org/viewvc/gimp?rev=26661&view=rev
Log:
2008-08-19 Michael Natterer <mitch gimp org>
* app/plug-in/gimpplugin.[ch] (struct GimpPlugIn)
* app/plug-in/gimppluginprocframe.[ch] (struct GimpPlugInProcFrame):
move the error_handler from the plug-in to the proc-frame.
* app/plug-in/gimppluginprocframe.c
* app/plug-in/gimpplugin-message.c: changed accordingly.
Modified:
trunk/ChangeLog
trunk/app/plug-in/gimpplugin-message.c
trunk/app/plug-in/gimpplugin.c
trunk/app/plug-in/gimpplugin.h
trunk/app/plug-in/gimppluginprocframe.c
trunk/app/plug-in/gimppluginprocframe.h
Modified: trunk/app/plug-in/gimpplugin-message.c
==============================================================================
--- trunk/app/plug-in/gimpplugin-message.c (original)
+++ trunk/app/plug-in/gimpplugin-message.c Tue Aug 19 08:24:48 2008
@@ -407,17 +407,18 @@
}
static void
-gimp_plug_in_handle_proc_error (GimpPlugIn *plug_in,
- GimpProgress *progress,
- const gchar *name,
- const GError *error)
+gimp_plug_in_handle_proc_error (GimpPlugIn *plug_in,
+ GimpPlugInProcFrame *proc_frame,
+ const gchar *name,
+ const GError *error)
{
- switch (gimp_plug_in_get_error_handler (plug_in))
+ switch (proc_frame->error_handler)
{
case GIMP_PDB_ERROR_HANDLER_INTERNAL:
if (error->domain == GIMP_PDB_ERROR)
{
- gimp_message (plug_in->manager->gimp, G_OBJECT (progress),
+ gimp_message (plug_in->manager->gimp,
+ G_OBJECT (proc_frame->progress),
GIMP_MESSAGE_ERROR,
_("Calling error for procedure '%s':\n"
"%s"),
@@ -425,7 +426,8 @@
}
else
{
- gimp_message (plug_in->manager->gimp, G_OBJECT (progress),
+ gimp_message (plug_in->manager->gimp,
+ G_OBJECT (proc_frame->progress),
GIMP_MESSAGE_ERROR,
_("Execution error for procedure '%s':\n"
"%s"),
@@ -536,7 +538,7 @@
if (error)
{
- gimp_plug_in_handle_proc_error (plug_in, proc_frame->progress,
+ gimp_plug_in_handle_proc_error (plug_in, proc_frame,
canonical, error);
g_error_free (error);
}
Modified: trunk/app/plug-in/gimpplugin.c
==============================================================================
--- trunk/app/plug-in/gimpplugin.c (original)
+++ trunk/app/plug-in/gimpplugin.c Tue Aug 19 08:24:48 2008
@@ -162,8 +162,6 @@
plug_in->temp_proc_frames = NULL;
- plug_in->error_handler = GIMP_PDB_ERROR_HANDLER_INTERNAL;
-
plug_in->plug_in_def = NULL;
}
@@ -944,18 +942,30 @@
gimp_plug_in_set_error_handler (GimpPlugIn *plug_in,
GimpPDBErrorHandler handler)
{
+ GimpPlugInProcFrame *proc_frame;
+
g_return_if_fail (GIMP_IS_PLUG_IN (plug_in));
- plug_in->error_handler = handler;
+ proc_frame = gimp_plug_in_get_proc_frame (plug_in);
+
+ if (proc_frame)
+ proc_frame->error_handler = handler;
}
GimpPDBErrorHandler
gimp_plug_in_get_error_handler (GimpPlugIn *plug_in)
{
+ GimpPlugInProcFrame *proc_frame;
+
g_return_val_if_fail (GIMP_IS_PLUG_IN (plug_in),
GIMP_PDB_ERROR_HANDLER_INTERNAL);
- return plug_in->error_handler;
+ proc_frame = gimp_plug_in_get_proc_frame (plug_in);
+
+ if (proc_frame)
+ return proc_frame->error_handler;
+
+ return GIMP_PDB_ERROR_HANDLER_INTERNAL;
}
void
Modified: trunk/app/plug-in/gimpplugin.h
==============================================================================
--- trunk/app/plug-in/gimpplugin.h (original)
+++ trunk/app/plug-in/gimpplugin.h Tue Aug 19 08:24:48 2008
@@ -68,8 +68,6 @@
GList *temp_proc_frames;
- GimpPDBErrorHandler error_handler;
-
GimpPlugInDef *plug_in_def; /* Valid during query() and init() */
};
Modified: trunk/app/plug-in/gimppluginprocframe.c
==============================================================================
--- trunk/app/plug-in/gimppluginprocframe.c (original)
+++ trunk/app/plug-in/gimppluginprocframe.c Tue Aug 19 08:24:48 2008
@@ -81,6 +81,7 @@
proc_frame->progress = progress ? g_object_ref (progress) : NULL;
proc_frame->progress_created = FALSE;
proc_frame->progress_cancel_id = 0;
+ proc_frame->error_handler = GIMP_PDB_ERROR_HANDLER_INTERNAL;
if (progress)
gimp_plug_in_progress_attach (progress);
Modified: trunk/app/plug-in/gimppluginprocframe.h
==============================================================================
--- trunk/app/plug-in/gimppluginprocframe.h (original)
+++ trunk/app/plug-in/gimppluginprocframe.h Tue Aug 19 08:24:48 2008
@@ -24,23 +24,25 @@
struct _GimpPlugInProcFrame
{
- gint ref_count;
+ gint ref_count;
- GimpContext *main_context;
- GList *context_stack;
+ GimpContext *main_context;
+ GList *context_stack;
- GimpProcedure *procedure;
- GMainLoop *main_loop;
+ GimpProcedure *procedure;
+ GMainLoop *main_loop;
- GValueArray *return_vals;
+ GValueArray *return_vals;
- GimpProgress *progress;
- gboolean progress_created;
- gulong progress_cancel_id;
+ GimpProgress *progress;
+ gboolean progress_created;
+ gulong progress_cancel_id;
+
+ GimpPDBErrorHandler error_handler;
/* lists of things to clean up on dispose */
- GList *image_cleanups;
- GList *item_cleanups;
+ GList *image_cleanups;
+ GList *item_cleanups;
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]