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:
@@ -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
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user