Commit 2e18c80c authored by Jehan's avatar Jehan

libgimp: add gimp_get_pdb_status() to return the status of last...

... procedure call.
This is needed for plug-ins which depends on other plug-in's procedures.
If for instance, the second-level plug-in is interrupted interactively,
we don't want to process this as an error but as a cancellation.
Therefore we need to know the returned value of the plug-in. Currently
only way was to use gimp_get_pdb_error() but that was returning a
human-readable error, not a computer-processable error.
parent 911e46ee
......@@ -1225,6 +1225,21 @@ gimp_get_pdb_error (void)
}
}
/**
* gimp_get_pdb_status:
*
* Retrieves the status from the last procedure call.
*
* Return value: the #GimpPDBStatusType.
*
* Since: 2.10
**/
GimpPDBStatusType
gimp_get_pdb_status (void)
{
return pdb_error_status;
}
/**
* gimp_tile_width:
*
......
......@@ -343,6 +343,7 @@ EXPORTS
gimp_get_parasite_list
gimp_get_path_by_tattoo
gimp_get_pdb_error
gimp_get_pdb_status
gimp_get_progname
gimp_get_theme_dir
gimp_getpid
......
......@@ -317,6 +317,10 @@ void gimp_destroy_paramdefs (GimpParamDef *paramdefs,
*/
const gchar * gimp_get_pdb_error (void);
/* Retrieve the return status for the last procedure call.
*/
GimpPDBStatusType gimp_get_pdb_status (void);
/* Return various constants given by the GIMP core at plug-in config time.
*/
guint gimp_tile_width (void) G_GNUC_CONST;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment