From a933ccf28dc6f4be8996b43b90b1a6ae4d64bfa3 Mon Sep 17 00:00:00 2001 From: stippi Date: Sun, 23 May 2010 12:56:24 +0000 Subject: [PATCH] When a download starts, do not start node monitoring the path while it is still pointing to the containing folder. Fixes ticket #62. git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@518 94f232f2-1747-11df-bad5-a5bfde151594 --- src/apps/webpositive/DownloadProgressView.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/apps/webpositive/DownloadProgressView.cpp b/src/apps/webpositive/DownloadProgressView.cpp index f0c4e5bb3b..ad02111a05 100644 --- a/src/apps/webpositive/DownloadProgressView.cpp +++ b/src/apps/webpositive/DownloadProgressView.cpp @@ -308,14 +308,18 @@ DownloadProgressView::SaveSettings(BMessage* archive) void DownloadProgressView::AttachedToWindow() { - if (fDownload) + if (fDownload) { fDownload->SetProgressListener(BMessenger(this)); + // Will start node monitor upon receiving the B_DOWNLOAD_STARTED + // message. + } else { + BEntry entry(fPath.Path()); + if (entry.Exists()) + _StartNodeMonitor(entry); + } + fTopButton->SetTarget(this); fBottomButton->SetTarget(this); - - BEntry entry(fPath.Path()); - if (entry.Exists()) - _StartNodeMonitor(entry); }