OSDN Git Service

MacGui: Add subtitle widgets for eddyg's forced subtitle implementation.
authordynaflash <dynaflash@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Tue, 21 Aug 2007 05:55:36 +0000 (05:55 +0000)
committerdynaflash <dynaflash@b64f7644-9d1e-0410-96f1-a4d463321fa5>
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://localhost/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 4c4d4b4..d990118 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 6209966..8f9d6c8 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 a949990..6c29793 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 16076ea..a9982a9 100644 (file)
Binary files a/macosx/English.lproj/MainMenu.nib/keyedobjects.nib and b/macosx/English.lproj/MainMenu.nib/keyedobjects.nib differ
index c499799..9d32ae0 100644 (file)
Binary files a/macosx/English.lproj/Preferences.nib/keyedobjects.nib and b/macosx/English.lproj/Preferences.nib/keyedobjects.nib differ