]> granicus.if.org Git - handbrake/commitdiff
MacGui: Add subtitle widgets for eddyg's forced subtitle implementation.
authordynaflash <dynaflashtech@gmail.com>
Tue, 21 Aug 2007 05:55:36 +0000 (05:55 +0000)
committerdynaflash <dynaflashtech@gmail.com>
Tue, 21 Aug 2007 05:55:36 +0000 (05:55 +0000)
- Create checkbox called "Forced" next to the NSPopUp button for subtitle selection with outlet named fSubForcedCheck
- Create a new preference checkbox to use subtitles instead of dubbed audio track if so desired.

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@845 b64f7644-9d1e-0410-96f1-a4d463321fa5

macosx/Controller.h
macosx/Controller.mm
macosx/English.lproj/MainMenu.nib/classes.nib
macosx/English.lproj/MainMenu.nib/keyedobjects.nib
macosx/English.lproj/Preferences.nib/keyedobjects.nib

index 4c4d4b4dc1e27b7bdc105fbc5bfdddf3e1e24fe6..d990118a1f2a82ac4514b1d4560d20d36c521ea2 100644 (file)
     /* Subtitles box */
     IBOutlet NSTextField         * fSubField;
     IBOutlet NSPopUpButton       * fSubPopUp;
+       IBOutlet NSButton            * fSubForcedCheck;
        
     /* Audio box */
     IBOutlet NSTextField         * fAudLang1Field;
 - (IBAction) AudioTrackPopUpChanged: (id) sender;
 - (IBAction) AudioTrackPopUpChanged: (id) sender mixdownToUse: (int) mixdownToUse;
 - (IBAction) AudioTrackMixdownChanged: (id) sender;
+- (IBAction) SubtitleSelectionChanged: (id) sender;
 
 - (IBAction) BrowseFile: (id) sender;
 - (void)     BrowseFileDone: (NSSavePanel *) sheet
index 6209966470e9176e44cc1a72f2f620803093d27d..8f9d6c8583492e94eae73b1a7d3ff9457cabf30d 100644 (file)
@@ -1866,6 +1866,8 @@ list = hb_get_titles( fHandle );
             subtitle->lang] action: NULL keyEquivalent: @""];
     }
     [fSubPopUp selectItemAtIndex: 0];
+       
+       [self SubtitleSelectionChanged: NULL];
     
     /* Update chapter table */
     [fChapterTitlesDelegate resetWithTitle:title];
@@ -2497,6 +2499,21 @@ list = hb_get_titles( fHandle );
     }
 
 }
+
+- (IBAction) SubtitleSelectionChanged: (id) sender
+{
+       if ([fSubPopUp indexOfSelectedItem] == 0)
+       {
+       [fSubForcedCheck setState: NSOffState];
+       [fSubForcedCheck setEnabled: NO];       
+       }
+       else
+       {
+       [fSubForcedCheck setEnabled: YES];      
+       }
+       
+}
+
 /* lets set the picture size back to the max from right after title scan
    Lets use an IBAction here as down the road we could always use a checkbox
    in the gui to easily take the user back to max. Remember, the compiler
index a949990eebdbba7bf08c1a7e9828e50a32871898..6c29793e7de13b858ef940faf911d48ce9a045b3 100644 (file)
@@ -37,6 +37,7 @@
                 ShowPicturePanel = id; 
                 ShowQueuePanel = id; 
                 ShowScanPanel = id; 
+                SubtitleSelectionChanged = id; 
                 TitlePopUpChanged = id; 
                 TwoPassCheckboxChanged = id; 
                 VideoFrameRateChanged = id; 
                 fSrcTitlePopUp = NSPopUpButton; 
                 fStatusField = NSTextField; 
                 fSubField = NSTextField; 
+                fSubForcedCheck = NSButton; 
                 fSubPopUp = NSPopUpButton; 
                 fVidBitrateCell = NSButtonCell; 
                 fVidBitrateField = NSTextField; 
index 16076eacdc4254874230f6a2eaaad8c9f1e19231..a9982a965c01eac57af735a36cd1ecb99115dbeb 100644 (file)
Binary files a/macosx/English.lproj/MainMenu.nib/keyedobjects.nib and b/macosx/English.lproj/MainMenu.nib/keyedobjects.nib differ
index c4997993ebef4376c61fb36274602a1d8715ca23..9d32ae0614f647d9e89d8f7041190c77bf4d9e25 100644 (file)
Binary files a/macosx/English.lproj/Preferences.nib/keyedobjects.nib and b/macosx/English.lproj/Preferences.nib/keyedobjects.nib differ