• Ell's avatar
    app: add gimp_wait() · cec17de3
    Ell authored
    Add a GimpGui::wait() virtual function, and a corresponding
    gimp_wait() function.  The function takes an object implementing
    the GimpWaitable interface, and a printf-style message, and waits
    for the object to become ready, displaying the message as
    indication in the meantime.  The default implementation simply
    prints the message to STDERR.
    Implement the function in gui-vtable, using the busy-dialog plug-
    in added in the previous commit, to display the message in a
    dialog.  Additionally, if the object implements the GimpCancelable
    interface, provide a "cancel" button in the dialog, which, when
    pressed, causes gimp_cancelable_cancel() to be called on the
    object.  Note that the function keeps waiting on the object even
    after requesting cancelation; GimpTriviallyCancelableWaitable can
    be used to stop the wait once cancelation has been requested.
gimp-gui.h 12 KB