aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
Diffstat (limited to 'embed')
-rw-r--r--embed/downloader-view.c25
1 files changed, 21 insertions, 4 deletions
diff --git a/embed/downloader-view.c b/embed/downloader-view.c
index 0ec321059..27f1c595e 100644
--- a/embed/downloader-view.c
+++ b/embed/downloader-view.c
@@ -124,6 +124,18 @@ static void
show_notification_window (DownloaderView *dv);
#endif
+static void
+download_progress_cb (WebKitDownload *download,
+ GParamSpec *pspec,
+ DownloaderView *dv);
+static void
+download_status_changed_cb (WebKitDownload *download,
+ GParamSpec *pspec,
+ DownloaderView *dv);
+static gboolean
+download_error_cb (WebKitDownload *download, gint error_code, gint error_detail,
+ const gchar *reason, DownloaderView *dv);
+
G_DEFINE_TYPE (DownloaderView, downloader_view, EPHY_TYPE_DIALOG)
static void
@@ -195,13 +207,18 @@ show_status_icon (DownloaderView *dv)
static gboolean
remove_download (WebKitDownload *download,
gpointer rowref,
- DownloaderView *view)
+ DownloaderView *dv)
{
WebKitDownloadStatus status;
- g_signal_handlers_disconnect_matched
- (download, G_SIGNAL_MATCH_DATA,
- 0, 0, NULL, NULL, view);
+ g_signal_handlers_disconnect_by_func
+ (download, G_CALLBACK (download_progress_cb), dv);
+
+ g_signal_handlers_disconnect_by_func
+ (download, G_CALLBACK (download_status_changed_cb), dv);
+
+ g_signal_handlers_disconnect_by_func
+ (download, G_CALLBACK (download_error_cb), dv);
status = webkit_download_get_status (download);
if (status == WEBKIT_DOWNLOAD_STATUS_STARTED)