]> granicus.if.org Git - handbrake/commitdiff
MacGui: Add Chapter Marker Preference
authordynaflash <dynaflashtech@gmail.com>
Sun, 25 Mar 2007 05:53:03 +0000 (05:53 +0000)
committerdynaflash <dynaflashtech@gmail.com>
Sun, 25 Mar 2007 05:53:03 +0000 (05:53 +0000)
- add a preference to default chapter markers on/off
- currently default is off.

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@449 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 98254baadece0a2af387b8871b9785d5d8567d47..acfb82f83879d2895d5c934f46dfe5f5c4f7ce13 100644 (file)
@@ -1181,6 +1181,10 @@ if ([[NSUserDefaults standardUserDefaults] boolForKey:@"DefaultPresetsDrawerShow
                 _( @"AVC/H.264 Video / AAC Audio" )];
                        /* We enable the create chapters checkbox here since we are .mp4 */     
                    [fCreateChapterMarkers setEnabled: YES];
+                       if ([[NSUserDefaults standardUserDefaults] boolForKey:@"DefaultChapterMarkers"] > 0)
+               {
+                   [fCreateChapterMarkers setState: NSOnState];
+               }
                        break;
         case 1: 
             ext = "avi";
index 60d576b6b2576ba1c6057a4c9c6ed5bd4422b592..fb50aa48fcd089301162a7ff95d6a510213c7f3e 100644 (file)
                 fDefAdvancedx264FlagsView = NSButton; 
                 fDefAudioSurround = NSButton; 
                 fDefAutoNaming = NSButton; 
+                fDefChapterMarkers = NSButton; 
                 fDefCrf = NSButton; 
                 fDefDeinterlace = NSButton; 
                 fDefPicSizeAutoSetipod = NSButton; 
                 fDefPixelRatio = NSButton; 
-                fDefPresetDrawerShow = id
+                fDefPresetDrawerShow = NSButton
                 fFileExtItunes = NSButton; 
                 fPanel = NSPanel; 
                 fUpdateCheck = NSButton; 
index 3d6e506bfd2169893f52a79890abc6e562b3b0c1..ef6423db693394ec0063863932ee8d4e9d77a48e 100644 (file)
@@ -3,7 +3,7 @@
 <plist version="1.0">
 <dict>
        <key>IBDocumentLocation</key>
-       <string>31 44 630 601 0 0 1440 878 </string>
+       <string>-6 259 630 601 0 0 1440 878 </string>
        <key>IBEditorPositions</key>
        <dict>
                <key>1843</key>
        </array>
        <key>IBOpenObjects</key>
        <array>
-               <integer>1867</integer>
-               <integer>1843</integer>
-               <integer>21</integer>
-               <integer>29</integer>
+               <integer>1438</integer>
        </array>
        <key>IBSystem Version</key>
        <string>8P2137</string>
index 0f0ede5be10e54047241a6d7d10339be9601a7b7..39671d2b73dd363b43caf044e3fc16036e512442 100644 (file)
Binary files a/macosx/English.lproj/MainMenu.nib/keyedobjects.nib and b/macosx/English.lproj/MainMenu.nib/keyedobjects.nib differ
index 84ccd542eb11de69cf4d594165f6882a836d6b33..2b0c0c13c7cca8c773579b679df9bc56e02c3d12 100644 (file)
@@ -15,6 +15,7 @@
        IBOutlet NSButton * fDefAudioSurround;
        IBOutlet NSButton * fDefPresetDrawerShow;
        IBOutlet NSButton * fDefAutoNaming;
+       IBOutlet NSButton * fDefChapterMarkers;
 
        IBOutlet NSTextView * fDefAdvancedx264FlagsView;
 }
index 8d058750ef9c0b49a6ad078ae294c8261a711cea..8f5dd61d86e6fe74871d2a5299938b3b6f710864 100644 (file)
@@ -35,6 +35,8 @@
        appDefaults = [NSDictionary dictionaryWithObject:defDestDirectory forKey:@"LastDestinationDirectory"];
        appDefaults = [NSDictionary dictionaryWithObject:@"NO"
                    forKey:@"DefaultAutoNaming"];
+       appDefaults = [NSDictionary dictionaryWithObject:@"NO"
+                   forKey:@"DefaultChapterMarkers"];
     [defaults registerDefaults: appDefaults];
 
        /* fUpdateCheck Check or uncheck according to the preferences */
        /* fDefAutoNaming Check or uncheck according to the preferences*/
     [fDefAutoNaming setState: [defaults boolForKey:@"DefaultAutoNaming"] ?
                   NSOnState : NSOffState];
+       /* fDefChapterMarkers Check or uncheck according to the preferences*/
+    [fDefChapterMarkers setState: [defaults boolForKey:@"DefaultChapterMarkers"] ?
+                  NSOnState : NSOffState];
 }
 
 
     {
         [defaults setObject:@"NO" forKey:@"DefaultAutoNaming"];
     }
+       /* Chapter Markers */
+       if( [fDefChapterMarkers state] == NSOnState )
+    {
+        [defaults setObject:@"YES" forKey:@"DefaultChapterMarkers"];
+    }
+    else
+    {
+        [defaults setObject:@"NO" forKey:@"DefaultChapterMarkers"];
+    }
 
 }