From 0e0441b8293d4ec865ca6f7a7c69cb8cbfa463af Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Thu, 23 Jul 2020 10:34:21 +0300 Subject: Visualize links; open URL when clicked --- src/app.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/app.c') diff --git a/src/app.c b/src/app.c index 2192e9ae..1164484e 100644 --- a/src/app.c +++ b/src/app.c @@ -3,6 +3,7 @@ #include "ui/window.h" #include "ui/inputwidget.h" #include "ui/labelwidget.h" +#include "ui/documentwidget.h" #include "ui/util.h" #include "ui/text.h" #include "ui/color.h" @@ -290,6 +291,8 @@ iBool handleCommand_App(const char *cmd) { iApp *d = &app_; iWidget *root = d->window->root; if (equal_Command(cmd, "open")) { + setUrl_DocumentWidget(findChild_Widget(root, "document"), + collect_String(newCStr_String(valuePtr_Command(cmd, "url")))); } else if (equal_Command(cmd, "quit")) { SDL_Event ev; -- cgit v1.2.3