diff options
author | Paul Gardiner <paul@glidos.net> | 2012-05-08 14:35:54 +0100 |
---|---|---|
committer | Paul Gardiner <paul@glidos.net> | 2012-05-08 14:35:54 +0100 |
commit | 786f0a940645a8aa161ad169945c984700a0b8ed (patch) | |
tree | 9bea6d4bd5dfa6ba84ca324eae7ef74aaa7aa99d /apps/pdfapp.c | |
parent | 91b4f1249cd6545a791e02e1632d69164702b4a0 (diff) | |
download | mupdf-786f0a940645a8aa161ad169945c984700a0b8ed.tar.xz |
Forms: handle some cases of setting text-field text
Diffstat (limited to 'apps/pdfapp.c')
-rw-r--r-- | apps/pdfapp.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/apps/pdfapp.c b/apps/pdfapp.c index 2f213bc4..7d356ef4 100644 --- a/apps/pdfapp.c +++ b/apps/pdfapp.c @@ -980,16 +980,19 @@ void pdfapp_onmouse(pdfapp_t *app, int x, int y, int btn, int modifiers, int sta { fz_widget *widget; - app->nowaitcursor = 1; - pdfapp_showpage(app, 1, 1, 1); - app->nowaitcursor = 0; widget = fz_get_focussed_widget(app->doc); if (widget && fz_widget_get_type(widget) == FZ_WIDGET_TYPE_TEXT) { char *text = fz_widget_text_get_text((fz_widget_text *)widget); - /* Invoke dialog for text entry */ + /* Should invoke dialog for text entry, but for now, + * just change any text field clicked to "Hello" */ + fz_widget_text_set_text((fz_widget_text *)widget, "Hello"); } + + app->nowaitcursor = 1; + pdfapp_showpage(app, 1, 1, 1); + app->nowaitcursor = 0; } } |