From 2fb4c3456691f240aeb5807296a3b51cbaeb50d1 Mon Sep 17 00:00:00 2001 From: Paul Gardiner Date: Thu, 1 Nov 2012 16:04:53 +0000 Subject: Forms: extend setFillColor implementation to include text widgets Also update pdf_dict_puts so that passing NULL to val deletes the terminal key. Update pdfapp.c to update the screen between passing a mouse event and invoking a dialog box for value entry Extend javascript wrapper to handle all color spaces --- apps/pdfapp.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'apps') diff --git a/apps/pdfapp.c b/apps/pdfapp.c index 0b684744..598b40b5 100644 --- a/apps/pdfapp.c +++ b/apps/pdfapp.c @@ -1297,6 +1297,9 @@ void pdfapp_onmouse(pdfapp_t *app, int x, int y, int btn, int modifiers, int sta widget = fz_focused_widget(idoc); + app->nowaitcursor = 1; + pdfapp_updatepage(app); + if (widget) { switch (fz_widget_get_type(widget)) @@ -1315,6 +1318,7 @@ void pdfapp_onmouse(pdfapp_t *app, int x, int y, int btn, int modifiers, int sta while (current_text && !fz_text_widget_set_text(idoc, widget, current_text)); fz_free(app->ctx, text); + pdfapp_updatepage(app); } break; @@ -1340,7 +1344,10 @@ void pdfapp_onmouse(pdfapp_t *app, int x, int y, int btn, int modifiers, int sta (void)fz_choice_widget_value(idoc, widget, vals); if (winchoiceinput(app, nopts, opts, &nvals, vals)) + { fz_choice_widget_set_value(idoc, widget, nvals, vals); + pdfapp_updatepage(app); + } } fz_always(ctx) { @@ -1356,8 +1363,6 @@ void pdfapp_onmouse(pdfapp_t *app, int x, int y, int btn, int modifiers, int sta } } - app->nowaitcursor = 1; - pdfapp_updatepage(app); app->nowaitcursor = 0; processed = 1; } -- cgit v1.2.3