diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-07-23 10:34:21 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-07-23 10:34:21 +0300 |
commit | 0e0441b8293d4ec865ca6f7a7c69cb8cbfa463af (patch) | |
tree | d9cee693ecf7dc866780809846044cb2801016f3 /src/app.c | |
parent | e5fb4e8854d5926ca21e4eba62d36a714ddb1bc1 (diff) |
Visualize links; open URL when clicked
Diffstat (limited to 'src/app.c')
-rw-r--r-- | src/app.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -3,6 +3,7 @@ | |||
3 | #include "ui/window.h" | 3 | #include "ui/window.h" |
4 | #include "ui/inputwidget.h" | 4 | #include "ui/inputwidget.h" |
5 | #include "ui/labelwidget.h" | 5 | #include "ui/labelwidget.h" |
6 | #include "ui/documentwidget.h" | ||
6 | #include "ui/util.h" | 7 | #include "ui/util.h" |
7 | #include "ui/text.h" | 8 | #include "ui/text.h" |
8 | #include "ui/color.h" | 9 | #include "ui/color.h" |
@@ -290,6 +291,8 @@ iBool handleCommand_App(const char *cmd) { | |||
290 | iApp *d = &app_; | 291 | iApp *d = &app_; |
291 | iWidget *root = d->window->root; | 292 | iWidget *root = d->window->root; |
292 | if (equal_Command(cmd, "open")) { | 293 | if (equal_Command(cmd, "open")) { |
294 | setUrl_DocumentWidget(findChild_Widget(root, "document"), | ||
295 | collect_String(newCStr_String(valuePtr_Command(cmd, "url")))); | ||
293 | } | 296 | } |
294 | else if (equal_Command(cmd, "quit")) { | 297 | else if (equal_Command(cmd, "quit")) { |
295 | SDL_Event ev; | 298 | SDL_Event ev; |