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
This commit is contained in:
Jérôme Duval
2006-01-21 17:48:12 +00:00
parent 6e6488d678
commit b5a5837bb9
3 changed files with 10 additions and 34 deletions
@@ -4,41 +4,11 @@
* *
*/ */
#include "InstallerCopyLoopControl.h" #include "InstallerCopyLoopControl.h"
#include "InstallerWindow.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;
}*/
InstallerCopyLoopControl::InstallerCopyLoopControl(InstallerWindow *window) 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, InstallerCopyLoopControl::UpdateStatus(const char *name, entry_ref ref, int32 count,
bool optional) bool optional)
{ {
if (name) {
BMessage msg(STATUS_MESSAGE);
msg.AddString("status", name);
fMessenger.SendMessage(&msg);
}
} }
@@ -38,6 +38,7 @@ public:
private: private:
InstallerWindow *fWindow; InstallerWindow *fWindow;
BMessenger fMessenger;
}; };
#endif #endif
+1 -1
View File
@@ -164,7 +164,6 @@ InstallerWindow::MessageReceived(BMessage *msg)
StartScan(); StartScan();
break; break;
case BEGIN_MESSAGE: case BEGIN_MESSAGE:
printf("BEGIN_MESSAGE\n");
BMessenger(&fCopyEngine).SendMessage(ENGINE_START); BMessenger(&fCopyEngine).SendMessage(ENGINE_START);
break; break;
case SHOW_BOTTOM_MESSAGE: case SHOW_BOTTOM_MESSAGE:
@@ -218,6 +217,7 @@ InstallerWindow::QuitRequested()
return false; return false;
} }
be_app->PostMessage(B_QUIT_REQUESTED); be_app->PostMessage(B_QUIT_REQUESTED);
fCopyEngine.PostMessage(B_QUIT_REQUESTED);
return true; return true;
} }