[kismac] [binaervarianz] r200 - trunk/Sources/Controller

  • From: svn@xxxxxxxxxxxxxxxx
  • To: kismac@xxxxxxxxxxxxx
  • Date: Thu, 05 Oct 2006 07:56:31 +0200

Author: gkruse
Date: 2006-10-05 07:56:27 +0200 (Thu, 05 Oct 2006)
New Revision: 200

Modified:
   trunk/Sources/Controller/ScanControllerMenus.m
Log:
Allow multiple kismet xml files to be imported with one open panel.  This one 
is for Zero and my sanity tomorrow

Modified: trunk/Sources/Controller/ScanControllerMenus.m
===================================================================
--- trunk/Sources/Controller/ScanControllerMenus.m      2006-10-04 14:00:29 UTC 
(rev 199)
+++ trunk/Sources/Controller/ScanControllerMenus.m      2006-10-05 05:56:27 UTC 
(rev 200)
@@ -70,22 +70,23 @@
     KismetXMLImporter * myImporter =  [[KismetXMLImporter alloc] init];
     
     aOP=[NSOpenPanel openPanel];
-    [aOP setAllowsMultipleSelection:NO];
+    [aOP setAllowsMultipleSelection:YES];
     [aOP setCanChooseFiles:YES];
     [aOP setCanChooseDirectories:NO];
     if ([aOP runModalForTypes:[NSArray arrayWithObjects:@"txt", @"xml", 
nil]]==NSOKButton) {
         [self stopActiveAttacks];
         [self stopScan];
+        _refreshGUI = NO;
         
-        [self showBusyWithText: @"Importing Kismet XML"];
-         
-        _refreshGUI = NO;
-        [myImporter performKismetImport: [aOP filename] 
withContainer:_container];
+        int i;
+        for (i = 0; i < [[aOP filenames] count]; i++) {
+            NSString *file = [[aOP filenames] objectAtIndex:i];
+            [self showBusyWithText: [NSString stringWithFormat: @"Importing %@ 
as Kismet XML", [file lastPathComponent]]];    
+            [myImporter performKismetImport: file withContainer:_container];
+            [self busyDone];
+        }
         _refreshGUI = YES;
         
-        
-        [self busyDone];
-        
         [self updateNetworkTable:self complete:YES];
         [self refreshScanHierarch];
         [_window setDocumentEdited:YES];


Other related posts:

  • » [kismac] [binaervarianz] r200 - trunk/Sources/Controller