From 752d3597ef02a95efd693373132bf1e246f0edb0 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 31 Jan 2017 09:44:29 +0100 Subject: core: Add new context flag "redraw". * src/context.h (struct gpgme_context): New field 'redraw_suggested'. * src/op-support.c (_gpgme_op_reset): Clear REDRAW_SUGGESTED. * src/progress.c (_gpgme_progress_status_handler): Set REDRAW_SUGGESTED. * src/gpgme.c (gpgme_set_ctx_flag, gpgme_get_ctx_flag): Add "redraw". * tests/run-sign.c (main): Use it. Signed-off-by: Werner Koch --- src/gpgme.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/gpgme.c') diff --git a/src/gpgme.c b/src/gpgme.c index cf767c72..2b196a25 100644 --- a/src/gpgme.c +++ b/src/gpgme.c @@ -508,6 +508,10 @@ gpgme_set_ctx_flag (gpgme_ctx_t ctx, const char *name, const char *value) if (!ctx || !name || !value) err = gpg_error (GPG_ERR_INV_VALUE); + else if (!strcmp (name, "redraw")) + { + ctx->redraw_suggested = abool; + } else if (!strcmp (name, "full-status")) { ctx->full_status = abool; @@ -544,6 +548,10 @@ gpgme_get_ctx_flag (gpgme_ctx_t ctx, const char *name) { if (!ctx || !name) return NULL; + else if (!strcmp (name, "redraw")) + { + return ctx->redraw_suggested? "1":""; + } else if (!strcmp (name, "full-status")) { return ctx->full_status? "1":""; -- cgit v1.2.3