aboutsummaryrefslogtreecommitdiffstats
path: root/embed/downloader-view.c
diff options
context:
space:
mode:
authorDiego Escalante Urrelo <descalante@igalia.com>2010-03-03 09:05:23 +0800
committerDiego Escalante Urrelo <descalante@igalia.com>2010-03-16 07:29:58 +0800
commit3d46002e19d94a38d53754d303a27bc8630e1a4e (patch)
treea07d3b76342a5161e9fbac76cfbda69e9874330e /embed/downloader-view.c
parentbf651210c6201168d4aee664f13f3581fcdab0e2 (diff)
downloadgsoc2013-epiphany-3d46002e19d94a38d53754d303a27bc8630e1a4e.tar
gsoc2013-epiphany-3d46002e19d94a38d53754d303a27bc8630e1a4e.tar.gz
gsoc2013-epiphany-3d46002e19d94a38d53754d303a27bc8630e1a4e.tar.bz2
gsoc2013-epiphany-3d46002e19d94a38d53754d303a27bc8630e1a4e.tar.lz
gsoc2013-epiphany-3d46002e19d94a38d53754d303a27bc8630e1a4e.tar.xz
gsoc2013-epiphany-3d46002e19d94a38d53754d303a27bc8630e1a4e.tar.zst
gsoc2013-epiphany-3d46002e19d94a38d53754d303a27bc8630e1a4e.zip
downloader-view: properly disconnect signals
The previous code wasn't disconnecting signals at all. Bug #611779
Diffstat (limited to 'embed/downloader-view.c')
-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)