abort editing virtual machine name if any action is chosen

This commit is contained in:
asvitkine 2010-12-28 02:57:46 +00:00
parent f1a2620576
commit 39a3b75024

View File

@ -217,6 +217,7 @@ Copy path!
- (IBAction) newVirtualMachine: (id) sender - (IBAction) newVirtualMachine: (id) sender
{ {
[vmList abortEditing];
NSSavePanel *save = [NSSavePanel savePanel]; NSSavePanel *save = [NSSavePanel savePanel];
[save setMessage: @"New SheepShaver Virtual Machine:"]; [save setMessage: @"New SheepShaver Virtual Machine:"];
[save setRequiredFileType: @"sheepvm"]; [save setRequiredFileType: @"sheepvm"];
@ -250,6 +251,7 @@ Copy path!
- (IBAction) importVirtualMachine: (id) sender - (IBAction) importVirtualMachine: (id) sender
{ {
[vmList abortEditing];
NSOpenPanel *open = [NSOpenPanel openPanel]; NSOpenPanel *open = [NSOpenPanel openPanel];
[open setMessage:@"Import SheepShaver Virtual Machine:"]; [open setMessage:@"Import SheepShaver Virtual Machine:"];
[open setResolvesAliases:YES]; [open setResolvesAliases:YES];
@ -276,6 +278,7 @@ Copy path!
- (IBAction) editVirtualMachineSettings: (id) sender - (IBAction) editVirtualMachineSettings: (id) sender
{ {
[vmList abortEditing];
int selectedRow = [vmList selectedRow]; int selectedRow = [vmList selectedRow];
if (selectedRow >= 0) { if (selectedRow >= 0) {
NSString *path = [vmArray objectAtIndex:selectedRow]; NSString *path = [vmArray objectAtIndex:selectedRow];
@ -297,6 +300,7 @@ Copy path!
- (IBAction) launchVirtualMachine: (id) sender - (IBAction) launchVirtualMachine: (id) sender
{ {
[vmList abortEditing];
int selectedRow = [vmList selectedRow]; int selectedRow = [vmList selectedRow];
if (selectedRow >= 0) { if (selectedRow >= 0) {
NSString *path = [vmArray objectAtIndex:selectedRow]; NSString *path = [vmArray objectAtIndex:selectedRow];
@ -336,6 +340,7 @@ Copy path!
- (IBAction) deleteVirtualMachine: (id) sender - (IBAction) deleteVirtualMachine: (id) sender
{ {
[vmList abortEditing];
int selectedRow = [vmList selectedRow]; int selectedRow = [vmList selectedRow];
if (selectedRow >= 0) { if (selectedRow >= 0) {
NSAlert *alert = [[[NSAlert alloc] init] autorelease]; NSAlert *alert = [[[NSAlert alloc] init] autorelease];
@ -361,6 +366,7 @@ Copy path!
- (IBAction) revealVirtualMachineInFinder: (id) sender - (IBAction) revealVirtualMachineInFinder: (id) sender
{ {
[vmList abortEditing];
int selectedRow = [vmList selectedRow]; int selectedRow = [vmList selectedRow];
if (selectedRow >= 0) { if (selectedRow >= 0) {
NSString *path = [vmArray objectAtIndex:selectedRow]; NSString *path = [vmArray objectAtIndex:selectedRow];