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
+13 -1
View File
@@ -64,7 +64,9 @@ LogoView::Draw(BRect update)
InstallerWindow::InstallerWindow(BRect frame_rect) InstallerWindow::InstallerWindow(BRect frame_rect)
: BWindow(frame_rect, "Installer", B_TITLED_WINDOW, B_NOT_ZOOMABLE | B_NOT_RESIZABLE), : 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); fCopyEngine = new CopyEngine(this);
@@ -179,10 +181,16 @@ InstallerWindow::MessageReceived(BMessage *msg)
ShowBottom(); ShowBottom();
break; break;
case SRC_PARTITION: case SRC_PARTITION:
if (fLastSrcItem == fSrcMenu->FindMarked())
break;
fLastSrcItem = fSrcMenu->FindMarked();
PublishPackages(); PublishPackages();
AdjustMenus(); AdjustMenus();
break; break;
case TARGET_PARTITION: case TARGET_PARTITION:
if (fLastTargetItem == fDestMenu->FindMarked())
break;
fLastTargetItem = fDestMenu->FindMarked();
AdjustMenus(); AdjustMenus();
break; break;
case SETUP_MESSAGE: case SETUP_MESSAGE:
@@ -341,6 +349,7 @@ InstallerWindow::PublishPackages()
if (!item) if (!item)
return; return;
#ifdef __HAIKU__
BPath directory; BPath directory;
BDiskDeviceRoster roster; BDiskDeviceRoster roster;
BDiskDevice device; BDiskDevice device;
@@ -353,6 +362,9 @@ InstallerWindow::PublishPackages()
return; return;
} else } else
return; // shouldn't happen return; // shouldn't happen
#else
BPath directory = "/BeOS 5 PE Max Edition V3.1 beta";
#endif
directory.Append(PACKAGES_DIRECTORY); directory.Append(PACKAGES_DIRECTORY);
BDirectory dir(directory.Path()); BDirectory dir(directory.Path());
+2
View File
@@ -11,6 +11,7 @@
#include <Menu.h> #include <Menu.h>
#include <MenuField.h> #include <MenuField.h>
#include <ScrollView.h> #include <ScrollView.h>
#include <String.h>
#include <TextView.h> #include <TextView.h>
#include <Window.h> #include <Window.h>
#include "CopyEngine.h" #include "CopyEngine.h"
@@ -56,6 +57,7 @@ private:
BPoint fDrawPoint; BPoint fDrawPoint;
CopyEngine *fCopyEngine; CopyEngine *fCopyEngine;
BString fLastStatus; BString fLastStatus;
BMenuItem *fLastSrcItem, *fLastTargetItem;
}; };
#endif /* _InstallerWindow_h */ #endif /* _InstallerWindow_h */
+1 -3
View File
@@ -1,7 +1,5 @@
SubDir HAIKU_TOP src apps installer ; SubDir HAIKU_TOP src apps installer ;
SetSubDirSupportedPlatformsBeOSCompatible ;
UsePrivateHeaders shared ; UsePrivateHeaders shared ;
UsePrivateHeaders storage ; UsePrivateHeaders storage ;
UsePrivateHeaders tracker ; UsePrivateHeaders tracker ;
@@ -16,5 +14,5 @@ Application Installer :
InstallerWindow.cpp InstallerWindow.cpp
PackageViews.cpp PackageViews.cpp
PartitionMenuItem.cpp PartitionMenuItem.cpp
: libbe.so libtracker.so libtranslation.so : be tracker translation
: Installer.rdef ; : Installer.rdef ;
+1 -1
View File
@@ -155,7 +155,7 @@ PackageCheckBox::Draw(BRect update)
void void
PackageCheckBox::MouseMoved(BPoint point, uint32 transit, const BMessage *message) PackageCheckBox::MouseMoved(BPoint point, uint32 transit, const BMessage *message)
{ {
printf("coucouc\n"); printf("%s called\n", __PRETTY_FUNCTION__);
if (transit == B_ENTERED_VIEW) { if (transit == B_ENTERED_VIEW) {
BMessage msg(STATUS_MESSAGE); BMessage msg(STATUS_MESSAGE);
msg.AddString("status", fPackage->Description()); msg.AddString("status", fPackage->Description());