diff options
author | Daniel Carl <danielcarl@gmx.de> | 2017-04-20 22:45:31 +0200 |
---|---|---|
committer | Daniel Carl <danielcarl@gmx.de> | 2017-04-20 22:45:31 +0200 |
commit | 597a0acfd9e35f6516a6c5069fdf651416e9f11c (patch) | |
tree | 76454c378835df19e20446b2f9959df0f299599a /src/command.c | |
parent | 5c7059196850118f4e9435797cedd155661748af (diff) |
Added :save command.
Diffstat (limited to 'src/command.c')
-rw-r--r-- | src/command.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/command.c b/src/command.c index 7fbc878..4913ddc 100644 --- a/src/command.c +++ b/src/command.c @@ -143,8 +143,8 @@ gboolean command_yank(Client *c, const Arg *arg, char buf) gboolean command_save(Client *c, const Arg *arg) { -#if 0 const char *uri, *path = NULL; + WebKitDownload *download; if (arg->i == COMMAND_SAVE_CURRENT) { uri = c->state.uri; @@ -159,10 +159,11 @@ gboolean command_save(Client *c, const Arg *arg) if (!uri || !*uri) { return FALSE; } -#endif - /* TODO start the download to given path here */ - return TRUE; + /* Start the download to given path. */ + download = webkit_web_view_download_uri(c->webview, uri); + + return vb_download_set_destination(c, download, NULL, path); } #ifdef FEATURE_QUEUE |