From b5a5837bb914a55988d1f533f6a3e41501305d7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Sat, 21 Jan 2006 17:48:12 +0000 Subject: [PATCH] updates status with current copied item tested ok with a beos folder, 36Mo git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16028 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../installer/InstallerCopyLoopControl.cpp | 41 ++++--------------- src/apps/installer/InstallerCopyLoopControl.h | 1 + src/apps/installer/InstallerWindow.cpp | 2 +- 3 files changed, 10 insertions(+), 34 deletions(-) diff --git a/src/apps/installer/InstallerCopyLoopControl.cpp b/src/apps/installer/InstallerCopyLoopControl.cpp index fc52016f38..326b8a67ce 100644 --- a/src/apps/installer/InstallerCopyLoopControl.cpp +++ b/src/apps/installer/InstallerCopyLoopControl.cpp @@ -4,41 +4,11 @@ * */ #include "InstallerCopyLoopControl.h" - -/* copied from libtracker, because beos loader doesn't seem to find them correctly in libtracker.so */ - -/*BPrivate::CopyLoopControl::~CopyLoopControl() -{ -} - -void -BPrivate::CopyLoopControl::ChecksumChunk(const char *, size_t) -{ -} - - -bool -BPrivate::CopyLoopControl::ChecksumFile(const entry_ref *) -{ - return true; -} - - -bool -BPrivate::CopyLoopControl::SkipAttribute(const char*) -{ - return false; -} - - -bool -BPrivate::CopyLoopControl::PreserveAttribute(const char*) -{ - return false; -}*/ +#include "InstallerWindow.h" InstallerCopyLoopControl::InstallerCopyLoopControl(InstallerWindow *window) - : fWindow(window) + : fWindow(window), + fMessenger(window) { } @@ -55,6 +25,11 @@ void InstallerCopyLoopControl::UpdateStatus(const char *name, entry_ref ref, int32 count, bool optional) { + if (name) { + BMessage msg(STATUS_MESSAGE); + msg.AddString("status", name); + fMessenger.SendMessage(&msg); + } } diff --git a/src/apps/installer/InstallerCopyLoopControl.h b/src/apps/installer/InstallerCopyLoopControl.h index b3ec64364e..24dff86b73 100644 --- a/src/apps/installer/InstallerCopyLoopControl.h +++ b/src/apps/installer/InstallerCopyLoopControl.h @@ -38,6 +38,7 @@ public: private: InstallerWindow *fWindow; + BMessenger fMessenger; }; #endif diff --git a/src/apps/installer/InstallerWindow.cpp b/src/apps/installer/InstallerWindow.cpp index cb9916542e..7fc93481ee 100644 --- a/src/apps/installer/InstallerWindow.cpp +++ b/src/apps/installer/InstallerWindow.cpp @@ -164,7 +164,6 @@ InstallerWindow::MessageReceived(BMessage *msg) StartScan(); break; case BEGIN_MESSAGE: - printf("BEGIN_MESSAGE\n"); BMessenger(&fCopyEngine).SendMessage(ENGINE_START); break; case SHOW_BOTTOM_MESSAGE: @@ -218,6 +217,7 @@ InstallerWindow::QuitRequested() return false; } be_app->PostMessage(B_QUIT_REQUESTED); + fCopyEngine.PostMessage(B_QUIT_REQUESTED); return true; }