]> granicus.if.org Git - handbrake/commitdiff
Mac GUI - Add default preference for AAC 5.1 Surround Sound Extraction (if available)
authordynaflash <dynaflashtech@gmail.com>
Wed, 14 Feb 2007 17:06:58 +0000 (17:06 +0000)
committerdynaflash <dynaflashtech@gmail.com>
Wed, 14 Feb 2007 17:06:58 +0000 (17:06 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/branches/0.8.0_beta2_5.1@330 b64f7644-9d1e-0410-96f1-a4d463321fa5

macosx/Controller.mm
macosx/English.lproj/MainMenu.nib/classes.nib
macosx/English.lproj/MainMenu.nib/info.nib
macosx/English.lproj/MainMenu.nib/keyedobjects.nib
macosx/PrefsController.h
macosx/PrefsController.m

index ac30eef9b887db58b1eb1a9247b7ab80d3d2b91a..8745dde21a1c6a0b10bfa99039af33266c2d2b49 100644 (file)
@@ -1236,6 +1236,11 @@ static int FormatSettings[3][4] =
     /* If we are extracting to AAC, and any of our soundtracks were 5.1, then enable the checkbox  */
        if (foundfiveoneaudio) {
                [fAudLang1SurroundCheck setEnabled: YES];
+               /* Check default surround sound pref and if it is YES, lets also check the checkbox */
+               if ([[NSUserDefaults standardUserDefaults] boolForKey:@"DefaultSurroundSound"] > 0)
+               {
+                       [fAudLang1SurroundCheck setState: NSOnState];
+               }
        } else {
                [fAudLang1SurroundCheck setEnabled: NO];
                /* as well as disabling the checkbox, let's uncheck it if it is checked */
index 8f1c7c5a617fa5e349ae28c126903316d370e3d1..d431a2c95056d5dea00e06e0b2a4ac89ac019d5f 100644 (file)
             CLASS = PrefsController; 
             LANGUAGE = ObjC; 
             OUTLETS = {
+                fDefAudioSurround = NSButton; 
                 fDefCrf = NSButton; 
                 fDefDeinterlace = NSButton; 
                 fDefPicSizeAutoSetipod = NSButton; 
index a3dda6038a5f65e15a6b392d3ff18ab926aa6fac..7ae790b10f78f6e6478451205813f957f23b7885 100644 (file)
@@ -3,7 +3,7 @@
 <plist version="1.0">
 <dict>
        <key>IBDocumentLocation</key>
-       <string>9 63 555 411 0 0 1440 878 </string>
+       <string>-12 -50 555 411 0 0 1440 878 </string>
        <key>IBEditorPositions</key>
        <dict>
                <key>29</key>
        </array>
        <key>IBOpenObjects</key>
        <array>
-               <integer>21</integer>
+               <integer>1438</integer>
        </array>
        <key>IBSystem Version</key>
-       <string>8L2127</string>
+       <string>8L127</string>
        <key>IBUserGuides</key>
        <dict>
                <key>21</key>
index c742d03f0f11a2c8c4f989c8705791d7e2568c07..199fdd2eaf4c5e717eb1d4072be0644b674b55b9 100644 (file)
Binary files a/macosx/English.lproj/MainMenu.nib/keyedobjects.nib and b/macosx/English.lproj/MainMenu.nib/keyedobjects.nib differ
index a9c198c551687bf45fc598877ab89f9222ce37a8..422c3c3134520c7976a262c32d9ae5a9ee7e9860 100644 (file)
@@ -12,6 +12,7 @@
        IBOutlet NSButton * fDefDeinterlace;
        IBOutlet NSButton * fDefPicSizeAutoSetipod;
        IBOutlet NSButton * fDefPixelRatio;
+       IBOutlet NSButton * fDefAudioSurround;
 
        
 }
index 6f98400e5a9a37af3768e38d4ee53019ebbdd652..ed62a27704320070888b471eaaceda14b979892d 100644 (file)
@@ -8,7 +8,7 @@
     NSDictionary   * appDefaults;
     
     /* Unless the user specified otherwise, default is to check
-       for update  fDefPicSizeAutoSetipod*/
+       for update  fDefAudioSurround*/
     defaults    = [NSUserDefaults standardUserDefaults];
     appDefaults = [NSDictionary dictionaryWithObject:@"YES"
                    forKey:@"CheckForUpdates"];
@@ -24,7 +24,8 @@
                    forKey:@"DefaultPicSizeAutoiPod"];
        appDefaults = [NSDictionary dictionaryWithObject:@"NO"
                    forKey:@"PixelRatio"];
-
+          appDefaults = [NSDictionary dictionaryWithObject:@"NO"
+                   forKey:@"DefaultSurroundSound"];
        
     [defaults registerDefaults: appDefaults];
 
@@ -32,7 +33,6 @@
     [fUpdateCheck setState: [defaults boolForKey:@"CheckForUpdates"] ?
         NSOnState : NSOffState];
        
-       
 
        // Fill the languages combobox
     [fdefaultlanguage removeAllItems];
                /* fDefPixelRatio */
     [fDefPixelRatio setState: [defaults boolForKey:@"PixelRatio"] ?
         NSOnState : NSOffState];
+               
+     /* fDefAudioSurround Check or uncheck according to the preferences */
+    [fDefAudioSurround setState: [defaults boolForKey:@"DefaultSurroundSound"] ?
+        NSOnState : NSOffState];
 }
 
 
     {
         [defaults setObject:@"NO" forKey:@"PixelRatio"];
     }
-
+  
+        /* Use Surround Sound if available*/
        
+       if( [fDefAudioSurround state] == NSOnState )
+    {
+        [defaults setObject:@"YES" forKey:@"DefaultSurroundSound"];
+    }
+    else
+    {
+        [defaults setObject:@"NO" forKey:@"DefaultSurroundSound"];
+    }  
        
 }