macos: update AFS prefs pane
[openafs.git] / src / platform / DARWIN / AFSPreference / IpConfiguratorCommander.m
index 8ff3985..70a50ab 100644 (file)
@@ -16,9 +16,8 @@
 // -------------------------------------------------------------------------------
 - (void)awakeFromNib
 {
-       NSLog(@"awakeFromNib");
-       [((NSTableView*)tableViewCellIP) setDelegate:self];
-       [((NSTableView*)tableViewCellIP) setDataSource:self];
+       [tableViewCellIP setDelegate:self];
+       [tableViewCellIP setDataSource:self];
 }
 
 // -------------------------------------------------------------------------------
 - (void) commitModify
 {
        //store the cell name
-       [cellElement setCellName:[((NSControl*) textFieldCellName) stringValue]];
-       [cellElement setCellComment:[((NSControl*) textFieldComment) stringValue]];
-       
-       NSLog(@"Deleting:\n%@",[bkIPArray description]);
+       [cellElement setCellName:[textFieldCellName stringValue]];
+       [cellElement setCellComment:[textFieldComment stringValue]];
        [bkIPArray removeAllObjects];
-       NSLog(@"deleted:\n");
-       NSLog(@"Coping:\n%@",[workIPArray description]);
        [bkIPArray setArray:workIPArray];
-       NSLog(@"Copied:\n%@",[workIPArray description]);
-       NSLog(@"Releasing:\n%@",[workIPArray description]);
        [workIPArray release];
-       NSLog(@"Released:\n%@",[workIPArray description]);
 }
 
 // -------------------------------------------------------------------------------
@@ -89,8 +81,8 @@
        [workIPArray addObject:ip];
        [ip release];
        currentSelectedIP = ip;
-       [((NSTableView*)tableViewCellIP) reloadData];
-       [((NSTableView *) tableViewCellIP)  scrollRowToVisible:[[cellElement getIp] count]-1];
+       [tableViewCellIP reloadData];
+       [tableViewCellIP scrollRowToVisible:[[cellElement getIp] count]-1];
 }
 
 // -------------------------------------------------------------------------------
 // -------------------------------------------------------------------------------
 - (IBAction) cancelIP:(id) sender
 {
-       [workIPArray removeObjectAtIndex:[((NSTableView*)tableViewCellIP) selectedRow]];
-       [((NSTableView*)tableViewCellIP) deselectAll:nil];
+       [workIPArray removeObjectAtIndex:[tableViewCellIP selectedRow]];
+       [tableViewCellIP deselectAll:nil];
        [self manageTableSelection:-1];
-       [((NSTableView*)tableViewCellIP) reloadData];
+       [tableViewCellIP reloadData];
 
 }
 
 // -------------------------------------------------------------------------------
 - (void) loadValueFromCellIPClass
 {
-       [((NSTextField*)textFieldCellName) setStringValue:[cellElement getCellName]]; 
-       [((NSTextField*)textFieldComment) setStringValue:[cellElement getCellComment]]; 
-       [((NSTableView*)tableViewCellIP) reloadData];
+       [textFieldCellName setStringValue:[cellElement getCellName]];
+       [textFieldComment setStringValue:[cellElement getCellComment]];
+       [tableViewCellIP reloadData];
 }
 
 // -------------------------------------------------------------------------------
 - (void) manageTableSelection:(int)row
 {
        //[((NSControl*) modifyButton) setEnabled:row>=0];
-       [((NSControl*) deleteButton) setEnabled:row>=0];
+       [deleteButton setEnabled:row>=0];
 }
 
 - (id) getPanel
 - (void)tableView:(NSTableView *)aTable setObjectValue:(id)aData 
    forTableColumn:(NSTableColumn *)aCol row:(int)aRow
 {
-       NSLog([aData description]);
        CellIp *ipElement =  (CellIp*)[workIPArray objectAtIndex:aRow];
-       switch([((NSNumber*)[aCol identifier]) intValue])
+       switch([[aCol identifier] intValue])
        {
                case 1:
                        [ipElement setCellIp:[aData description]];