added GIMP_PROGRESS_COMMAND_PULSE.
2005-02-12 Michael Natterer <mitch@gimp.org> * libgimpbase/gimpbaseenums.h (enum GimpProgressCommand): added GIMP_PROGRESS_COMMAND_PULSE. * libgimpbase/gimpbaseenums.c * plug-ins/pygimp/gimpenums.py * tools/pdbgen/enums.pl: regenerated. * app/core/gimppdbprogress.c: implement GimpProgress::pulse() and send a PULSE command to the callback. * libgimp/gimpprogress.c: handle PULSE by calling the set_value() callback with a value of -1 and document that hack in the API docs. * libgimp/gimpprogressbar.c: interpret -1 as request to pulse.
This commit is contained in:

committed by
Michael Natterer

parent
7c19953c39
commit
fc677ae7b4
@ -67,6 +67,11 @@ static GHashTable *gimp_progress_ht = NULL;
|
||||
* Return value: the name of the temporary procedure that's been installed
|
||||
*
|
||||
* Since: GIMP 2.2
|
||||
*
|
||||
* Note that since GIMP 2.4, the @value_callback can be called with
|
||||
* nagative values. This is triggered by calls to gimp_progress_pulse().
|
||||
* The callback should then implement a progress indicating busyness,
|
||||
* e.g. by calling gtk_progress_bar_pulse().
|
||||
**/
|
||||
const gchar *
|
||||
gimp_progress_install (GimpProgressStartCallback start_callback,
|
||||
@ -218,6 +223,11 @@ gimp_temp_progress_run (const gchar *name,
|
||||
progress_data->data);
|
||||
break;
|
||||
|
||||
case GIMP_PROGRESS_COMMAND_PULSE:
|
||||
progress_data->value_callback (-1.0,
|
||||
progress_data->data);
|
||||
break;
|
||||
|
||||
default:
|
||||
g_warning ("Unknown command passed to progress callback");
|
||||
break;
|
||||
|
Reference in New Issue
Block a user