aboutsummaryrefslogtreecommitdiffstats
path: root/src/gpgme.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2017-01-31 08:44:29 +0000
committerWerner Koch <[email protected]>2017-01-31 08:44:29 +0000
commit752d3597ef02a95efd693373132bf1e246f0edb0 (patch)
tree61fca51953b8bc3a68d3610e26b98f4f8458cc3a /src/gpgme.c
parenttests: Reduce iterations / threads (diff)
downloadgpgme-752d3597ef02a95efd693373132bf1e246f0edb0.tar.gz
gpgme-752d3597ef02a95efd693373132bf1e246f0edb0.zip
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 <[email protected]>
Diffstat (limited to 'src/gpgme.c')
-rw-r--r--src/gpgme.c8
1 files changed, 8 insertions, 0 deletions
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":"";