if a already selected item is selected, don't do anything

Installer isn't beos compatible is this directory, will add a test directory for it
fixed link libs and debug message


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16196 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval 2006-02-02 10:40:05 +00:00
parent d81069bfad
commit 8b357f8a21
4 changed files with 17 additions and 5 deletions

View File

@ -64,7 +64,9 @@ LogoView::Draw(BRect update)
InstallerWindow::InstallerWindow(BRect frame_rect)
: BWindow(frame_rect, "Installer", B_TITLED_WINDOW, B_NOT_ZOOMABLE | B_NOT_RESIZABLE),
fDriveSetupLaunched(false)
fDriveSetupLaunched(false),
fLastSrcItem(NULL),
fLastTargetItem(NULL)
{
fCopyEngine = new CopyEngine(this);
@ -179,10 +181,16 @@ InstallerWindow::MessageReceived(BMessage *msg)
ShowBottom();
break;
case SRC_PARTITION:
if (fLastSrcItem == fSrcMenu->FindMarked())
break;
fLastSrcItem = fSrcMenu->FindMarked();
PublishPackages();
AdjustMenus();
break;
case TARGET_PARTITION:
if (fLastTargetItem == fDestMenu->FindMarked())
break;
fLastTargetItem = fDestMenu->FindMarked();
AdjustMenus();
break;
case SETUP_MESSAGE:
@ -341,6 +349,7 @@ InstallerWindow::PublishPackages()
if (!item)
return;
#ifdef __HAIKU__
BPath directory;
BDiskDeviceRoster roster;
BDiskDevice device;
@ -353,6 +362,9 @@ InstallerWindow::PublishPackages()
return;
} else
return; // shouldn't happen
#else
BPath directory = "/BeOS 5 PE Max Edition V3.1 beta";
#endif
directory.Append(PACKAGES_DIRECTORY);
BDirectory dir(directory.Path());

View File

@ -11,6 +11,7 @@
#include <Menu.h>
#include <MenuField.h>
#include <ScrollView.h>
#include <String.h>
#include <TextView.h>
#include <Window.h>
#include "CopyEngine.h"
@ -56,6 +57,7 @@ private:
BPoint fDrawPoint;
CopyEngine *fCopyEngine;
BString fLastStatus;
BMenuItem *fLastSrcItem, *fLastTargetItem;
};
#endif /* _InstallerWindow_h */

View File

@ -1,7 +1,5 @@
SubDir HAIKU_TOP src apps installer ;
SetSubDirSupportedPlatformsBeOSCompatible ;
UsePrivateHeaders shared ;
UsePrivateHeaders storage ;
UsePrivateHeaders tracker ;
@ -16,5 +14,5 @@ Application Installer :
InstallerWindow.cpp
PackageViews.cpp
PartitionMenuItem.cpp
: libbe.so libtracker.so libtranslation.so
: be tracker translation
: Installer.rdef ;

View File

@ -155,7 +155,7 @@ PackageCheckBox::Draw(BRect update)
void
PackageCheckBox::MouseMoved(BPoint point, uint32 transit, const BMessage *message)
{
printf("coucouc\n");
printf("%s called\n", __PRETTY_FUNCTION__);
if (transit == B_ENTERED_VIEW) {
BMessage msg(STATUS_MESSAGE);
msg.AddString("status", fPackage->Description());