Ticket #4425: Installer.diff
File Installer.diff, 3.2 KB (added by , 14 years ago) |
---|
-
InstallerWindow.cpp
213 213 TR("Write boot sector"), new BMessage(MSG_WRITE_BOOT_SECTOR)); 214 214 fMakeBootableButton->SetEnabled(false); 215 215 216 fBootmanButton = new BButton("bootman_button", 217 TR("Setup Boot Menu"), new BMessage(MSG_WRITE_BOOTMAN)); 218 fBootmanButton->SetEnabled(false); 219 216 220 SetLayout(new BGroupLayout(B_HORIZONTAL)); 217 221 AddChild(BGroupLayoutBuilder(B_VERTICAL) 218 222 .Add(BGroupLayoutBuilder(B_HORIZONTAL) … … 238 242 .Add(BGroupLayoutBuilder(B_HORIZONTAL, 10) 239 243 .Add(fSetupButton) 240 244 .Add(fMakeBootableButton) 245 .Add(fBootmanButton) 241 246 .AddGlue() 242 247 .Add(fBeginButton) 243 248 ) … … 268 273 "the installation, but you can manually make a\n" 269 274 "partition bootable in case you do not need to\n" 270 275 "perform an installation.")); 271 276 fBootmanButton->SetToolTip( 277 TR("Install/Uninstall our Boot Menu, which allow you to choose\n" 278 "operating system to boot when computer starts up\n" 279 "If you have another Boot manager such as LILO or GRUB\n" 280 "You do not need to perform this one\n")); 272 281 // finish creating window 273 282 if (!be_roster->IsRunning(kDeskbarSignature)) 274 283 SetFlags(Flags() | B_NOT_MINIMIZABLE); … … 485 494 fWorkerThread->WriteBootSector(fDestMenu); 486 495 break; 487 496 497 case MSG_WRITE_BOOTMAN: 498 { 499 BPath bootPath; 500 find_directory(B_BEOS_BOOT_DIRECTORY, &bootPath); 501 BString command("/bin/bootman "); 502 command += bootPath.Path(); 503 system(command.String()); 504 } 505 break; 488 506 default: 489 507 BWindow::MessageReceived(msg); 490 508 break; … … 562 580 { 563 581 fSetupButton->SetEnabled(!disable); 564 582 fMakeBootableButton->SetEnabled(!disable); 583 fBootmanButton->SetEnabled(!disable); 565 584 fSrcMenuField->SetEnabled(!disable); 566 585 fDestMenuField->SetEnabled(!disable); 567 586 } … … 651 670 fBeginButton->SetLabel(TR("Begin")); 652 671 fBeginButton->SetEnabled(srcItem && dstItem); 653 672 654 // adjust "Write Boot Sector " button673 // adjust "Write Boot Sector and Setup Boot Menu" button 655 674 if (dstItem) { 656 675 char buffer[256]; 657 676 snprintf(buffer, sizeof(buffer), TR("Write boot sector to '%s'"), … … 661 680 label = TR("Write boot sector"); 662 681 fMakeBootableButton->SetEnabled(dstItem); 663 682 fMakeBootableButton->SetLabel(label.String()); 664 683 fBootmanButton->SetEnabled(dstItem); 684 665 685 if (!fEncouragedToSetupPartitions && !foundOneSuitableTarget) { 666 686 // Focus the users attention on the DriveSetup button 667 687 fEncouragedToSetupPartitions = true; -
InstallerWindow.h
35 35 const uint32 MSG_INSTALL_FINISHED = 'iIFN'; 36 36 const uint32 MSG_RESET = 'iRSI'; 37 37 const uint32 MSG_WRITE_BOOT_SECTOR = 'iWBS'; 38 const uint32 MSG_WRITE_BOOTMAN = 'iWBM'; 38 39 39 40 const char PACKAGES_DIRECTORY[] = "_packages_"; 40 41 const char VAR_DIRECTORY[] = "var"; … … 86 87 BButton* fBeginButton; 87 88 BButton* fSetupButton; 88 89 BButton* fMakeBootableButton; 89 90 BButton* fBootmanButton; 90 91 bool fEncouragedToSetupPartitions; 91 92 92 93 bool fDriveSetupLaunched;