[kismac] [binaervarianz] r144 - in trunk: KisMAC.xcodeproj Resources/Nibs/English.lproj/PrefsSounds.nib Resources/Nibs/Spanish.lproj/PrefsSounds.nib Sources/Controller Sources/Preferences/PreferencePanes

  • From: svn@xxxxxxxxxxxxxxxx
  • To: kismac@xxxxxxxxxxxxx
  • Date: Fri, 28 Apr 2006 06:27:59 +0200

Author: robin
Date: 2006-04-28 06:27:58 +0200 (Fri, 28 Apr 2006)
New Revision: 144

Modified:
   trunk/KisMAC.xcodeproj/project.pbxproj
   trunk/Resources/Nibs/English.lproj/PrefsSounds.nib/classes.nib
   trunk/Resources/Nibs/English.lproj/PrefsSounds.nib/info.nib
   trunk/Resources/Nibs/English.lproj/PrefsSounds.nib/objects.nib
   trunk/Resources/Nibs/Spanish.lproj/PrefsSounds.nib/classes.nib
   trunk/Resources/Nibs/Spanish.lproj/PrefsSounds.nib/info.nib
   trunk/Resources/Nibs/Spanish.lproj/PrefsSounds.nib/objects.nib
   trunk/Sources/Controller/ScanController.m
   trunk/Sources/Controller/ScanControllerPrivate.m
   trunk/Sources/Preferences/PreferencePanes/PrefsSounds.h
   trunk/Sources/Preferences/PreferencePanes/PrefsSounds.m
Log:
* Added preference to sound preference pane for sounds at end of crack attempt 
- thanks to themacuser!  Closes #69.



Modified: trunk/KisMAC.xcodeproj/project.pbxproj
===================================================================
--- trunk/KisMAC.xcodeproj/project.pbxproj      2006-04-27 10:59:45 UTC (rev 
143)
+++ trunk/KisMAC.xcodeproj/project.pbxproj      2006-04-28 04:27:58 UTC (rev 
144)
@@ -857,7 +857,7 @@
                6CA3BCCA09B2A58F00DCB407 /* Accelerate.framework */ = {isa = 
PBXFileReference; lastKnownFileType = wrapper.framework; name = 
Accelerate.framework; path = /System/Library/Frameworks/Accelerate.framework; 
sourceTree = "<absolute>"; };
                87CEBA8009AEF03700AEB0B8 /* GrowlController.h */ = {isa = 
PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = 
GrowlController.h; sourceTree = "<group>"; };
                87CEBA8109AEF03700AEB0B8 /* GrowlController.m */ = {isa = 
PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; 
path = GrowlController.m; sourceTree = "<group>"; };
-               8D1107320486CEB800E47090 /* KisMAC.app */ = {isa = 
PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; 
path = KisMAC.app; sourceTree = BUILT_PRODUCTS_DIR; };
+               8D1107320486CEB800E47090 /* KisMAC.app */ = {isa = 
PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; 
path = KisMAC.app; sourceTree = BUILT_PRODUCTS_DIR; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */

Modified: trunk/Resources/Nibs/English.lproj/PrefsSounds.nib/classes.nib
===================================================================
--- trunk/Resources/Nibs/English.lproj/PrefsSounds.nib/classes.nib      
2006-04-27 10:59:45 UTC (rev 143)
+++ trunk/Resources/Nibs/English.lproj/PrefsSounds.nib/classes.nib      
2006-04-28 04:27:58 UTC (rev 144)
@@ -18,6 +18,7 @@
                 aNOWEPSounds = id; 
                 aVoices = id; 
                 aWEPSounds = id; 
+                useSounds = id; 
             }; 
             SUPERCLASS = PrefsClient; 
         }

Modified: trunk/Resources/Nibs/English.lproj/PrefsSounds.nib/info.nib
===================================================================
--- trunk/Resources/Nibs/English.lproj/PrefsSounds.nib/info.nib 2006-04-27 
10:59:45 UTC (rev 143)
+++ trunk/Resources/Nibs/English.lproj/PrefsSounds.nib/info.nib 2006-04-28 
04:27:58 UTC (rev 144)
@@ -3,15 +3,19 @@
 <plist version="1.0">
 <dict>
        <key>IBDocumentLocation</key>
-       <string>185 -15 356 240 0 0 1280 832 </string>
+       <string>134 -11 356 240 0 0 1024 746 </string>
        <key>IBEditorPositions</key>
        <dict>
                <key>109</key>
-               <string>410 477 459 180 0 0 1280 832 </string>
+               <string>538 214 459 265 0 0 1024 746 </string>
        </dict>
        <key>IBFramework Version</key>
-       <string>439.0</string>
+       <string>443.0</string>
+       <key>IBOpenObjects</key>
+       <array>
+               <integer>109</integer>
+       </array>
        <key>IBSystem Version</key>
-       <string>8C46</string>
+       <string>8I127</string>
 </dict>
 </plist>

Modified: trunk/Resources/Nibs/English.lproj/PrefsSounds.nib/objects.nib
===================================================================
(Binary files differ)

Modified: trunk/Resources/Nibs/Spanish.lproj/PrefsSounds.nib/classes.nib
===================================================================
--- trunk/Resources/Nibs/Spanish.lproj/PrefsSounds.nib/classes.nib      
2006-04-27 10:59:45 UTC (rev 143)
+++ trunk/Resources/Nibs/Spanish.lproj/PrefsSounds.nib/classes.nib      
2006-04-28 04:27:58 UTC (rev 144)
@@ -18,6 +18,7 @@
                 aNOWEPSounds = id; 
                 aVoices = id; 
                 aWEPSounds = id; 
+                useSounds = id; 
             }; 
             SUPERCLASS = PrefsClient; 
         }

Modified: trunk/Resources/Nibs/Spanish.lproj/PrefsSounds.nib/info.nib
===================================================================
--- trunk/Resources/Nibs/Spanish.lproj/PrefsSounds.nib/info.nib 2006-04-27 
10:59:45 UTC (rev 143)
+++ trunk/Resources/Nibs/Spanish.lproj/PrefsSounds.nib/info.nib 2006-04-28 
04:27:58 UTC (rev 144)
@@ -3,15 +3,19 @@
 <plist version="1.0">
 <dict>
        <key>IBDocumentLocation</key>
-       <string>185 -15 356 240 0 0 1280 832 </string>
+       <string>134 -7 356 240 0 0 1024 746 </string>
        <key>IBEditorPositions</key>
        <dict>
                <key>109</key>
-               <string>410 477 459 180 0 0 1280 832 </string>
+               <string>282 366 459 265 0 0 1024 746 </string>
        </dict>
        <key>IBFramework Version</key>
-       <string>439.0</string>
+       <string>443.0</string>
+       <key>IBOpenObjects</key>
+       <array>
+               <integer>109</integer>
+       </array>
        <key>IBSystem Version</key>
-       <string>8C46</string>
+       <string>8I127</string>
 </dict>
 </plist>

Modified: trunk/Resources/Nibs/Spanish.lproj/PrefsSounds.nib/objects.nib
===================================================================
(Binary files differ)

Modified: trunk/Sources/Controller/ScanController.m
===================================================================
--- trunk/Sources/Controller/ScanController.m   2006-04-27 10:59:45 UTC (rev 
143)
+++ trunk/Sources/Controller/ScanController.m   2006-04-28 04:27:58 UTC (rev 
144)
@@ -73,6 +73,7 @@
         @"None", @"WEPSound",
         @"None", @"noWEPSound",
         @"None", @"GeigerSound",
+               [NSNumber numberWithBool:TRUE], @"playCrackSounds",
         @"", @"GPSDevice",
         [NSNumber numberWithInt:2], @"GPSTrace",
         [NSNumber numberWithInt:0], @"GPSNoFix",

Modified: trunk/Sources/Controller/ScanControllerPrivate.m
===================================================================
--- trunk/Sources/Controller/ScanControllerPrivate.m    2006-04-27 10:59:45 UTC 
(rev 143)
+++ trunk/Sources/Controller/ScanControllerPrivate.m    2006-04-28 04:27:58 UTC 
(rev 144)
@@ -257,6 +257,7 @@
     _importOpen--;
        NSParameterAssert(_importOpen == 0);
        [self menuSetEnabled:YES menu:[NSApp mainMenu]];
+       NSUserDefaults *defs;
 
        [aInfoController reloadData];
     
@@ -264,9 +265,12 @@
     [_importController stopAnimation];
 
     if (returnCode == -1 && ![_importController canceled]) {
-               for (i=0;i<3;i++) {
-                       [[NSSound soundNamed:[[NSUserDefaults 
standardUserDefaults] objectForKey:@"WEPSound"]] play];
-                       sleep(1);
+               defs = [NSUserDefaults standardUserDefaults];
+               if([[defs objectForKey:@"playCrackSounds"] intValue]) {
+                       for (i=0;i<3;i++) {
+                               [[NSSound soundNamed:[[NSUserDefaults 
standardUserDefaults] objectForKey:@"WEPSound"]] play];
+                               sleep(1);
+                       }
                }
                switch(_crackType) {
         case 1:
@@ -313,9 +317,12 @@
             [aInjPacketsMenu setState:NSOnState];
             [aInjPacketsMenu setTitle:[NSLocalizedString(@"Reinjecting into ", 
"menu item") stringByAppendingString:[_curNet BSSID]]];
         } else {
-                       for (i=0;i<3;i++) {
-                               [[NSSound soundNamed:[[NSUserDefaults 
standardUserDefaults] objectForKey:@"noWEPSound"]] play];
-                               sleep(1);
+                       defs = [NSUserDefaults standardUserDefaults];
+                       if([[defs objectForKey:@"playCrackSounds"] intValue]) {
+                               for (i=0;i<3;i++) {
+                                       [[NSSound soundNamed:[[NSUserDefaults 
standardUserDefaults] objectForKey:@"noWEPSound"]] play];
+                                       sleep(1);
+                               }
                        }
                        NSBeginAlertSheet(NSLocalizedString(@"Cracking 
successful", "Crack dialog title"),
                 OK, NULL, NULL, _window, self, NULL, NULL, NULL, 

Modified: trunk/Sources/Preferences/PreferencePanes/PrefsSounds.h
===================================================================
--- trunk/Sources/Preferences/PreferencePanes/PrefsSounds.h     2006-04-27 
10:59:45 UTC (rev 143)
+++ trunk/Sources/Preferences/PreferencePanes/PrefsSounds.h     2006-04-28 
04:27:58 UTC (rev 144)
@@ -18,6 +18,7 @@
     IBOutlet id aVoices;
     IBOutlet id aGeigerSounds;
     IBOutlet id aGeigerSensity;    
+       IBOutlet id useSounds;
 }
 
 - (IBAction)playVoice:(id)sender;

Modified: trunk/Sources/Preferences/PreferencePanes/PrefsSounds.m
===================================================================
--- trunk/Sources/Preferences/PreferencePanes/PrefsSounds.m     2006-04-27 
10:59:45 UTC (rev 143)
+++ trunk/Sources/Preferences/PreferencePanes/PrefsSounds.m     2006-04-28 
04:27:58 UTC (rev 144)
@@ -59,10 +59,12 @@
         [controller setObject:@"None" forKey:@"WEPSound"];
         [controller setObject:@"None" forKey:@"noWEPSound"];
         [controller setObject:@"None" forKey:@"GeigerSound"];
+               [controller setObject:[NSNumber numberWithBool:TRUE] 
forKey:@"playCrackSounds"];
     }
     [aGeigerSounds selectItemWithTitle:[controller 
objectForKey:@"GeigerSound"]];
     [aWEPSounds selectItemWithTitle:[controller objectForKey:@"WEPSound"]];
     [aNOWEPSounds selectItemWithTitle:[controller objectForKey:@"noWEPSound"]];
+       [useSounds setState:[[controller objectForKey:@"playCrackSounds"] 
intValue]];
 
     [aVoices selectItemAtIndex:[[controller objectForKey:@"Voice"] intValue]];
 }
@@ -95,6 +97,9 @@
     else if (sender == aGeigerSensity) {
         [controller setObject:[NSNumber numberWithInt:[sender intValue]] 
forKey:@"GeigerSensity"];
     }
+    else if (sender == useSounds) {
+        [controller setObject:[NSNumber numberWithBool:[sender state]] 
forKey:@"playCrackSounds"];
+    }
     else {
         NSLog(@"Error: Invalid sender(%@) in setValueForSender:",sender);
     }
@@ -113,4 +118,4 @@
         [WaveHelper speakSentence:cSentence withVoice:[sender 
indexOfSelectedItem]];
 }
 
-@end
+@end
\ No newline at end of file


Other related posts:

  • » [kismac] [binaervarianz] r144 - in trunk: KisMAC.xcodeproj Resources/Nibs/English.lproj/PrefsSounds.nib Resources/Nibs/Spanish.lproj/PrefsSounds.nib Sources/Controller Sources/Preferences/PreferencePanes