diff options
author | Patrick McDermott <pj@pehjota.net> | 2017-10-29 14:51:45 (EDT) |
---|---|---|
committer | Patrick McDermott <pj@pehjota.net> | 2017-10-29 14:52:15 (EDT) |
commit | 772b990f45f05d2a77351870b5be90cf8336d722 (patch) | |
tree | 80114480bbf63285125aa3536c65cb008ecf5d52 /src | |
parent | 4c3e1927b48a981e7481c27514393fc1e32f408d (diff) | |
download | marquee-772b990f45f05d2a77351870b5be90cf8336d722.zip marquee-772b990f45f05d2a77351870b5be90cf8336d722.tar.gz marquee-772b990f45f05d2a77351870b5be90cf8336d722.tar.bz2 |
MqApplication: Handle started downloads
Diffstat (limited to 'src')
-rw-r--r-- | src/application.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/application.c b/src/application.c index 1961545..476ad31 100644 --- a/src/application.c +++ b/src/application.c @@ -32,6 +32,7 @@ #include "about.h" #include "config.h" +#include "download.h" #include "web-settings.h" #include "window.h" @@ -65,6 +66,13 @@ set_webkit_settings(MqApplication *application) web_context); } +static void +download_started_cb(WebKitWebContext G_GNUC_UNUSED *context, + WebKitDownload *download, MqApplication *application) +{ + mq_download_new(application->config, download); +} + MqApplication * mq_application_new(gchar G_GNUC_UNUSED *profile, gboolean G_GNUC_UNUSED private) { @@ -86,6 +94,9 @@ mq_application_new(gchar G_GNUC_UNUSED *profile, gboolean G_GNUC_UNUSED private) set_webkit_settings(application); + g_signal_connect(webkit_web_context_get_default(), "download-started", + G_CALLBACK(download_started_cb), application); + return application; } |