diff options
author | ritsuka <[email protected]> | 2014-08-20 07:35:27 +0000 |
---|---|---|
committer | ritsuka <[email protected]> | 2014-08-20 07:35:27 +0000 |
commit | 64f39eb7f2ad0fa54bb9faa8f3f997238500cd4a (patch) | |
tree | ada4c3b395337ef9135c2a245be78f3bdd4245b2 | |
parent | d1897978424444696eda51313f41feffc4112c78 (diff) |
MacGui: set the tab views directly instead of adding a subview in the main window.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6325 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | macosx/Controller.h | 8 | ||||
-rw-r--r-- | macosx/Controller.m | 29 | ||||
-rw-r--r-- | macosx/English.lproj/MainMenu.xib | 10 | ||||
-rw-r--r-- | macosx/HandBrake.xcodeproj/project.pbxproj | 2 |
4 files changed, 13 insertions, 36 deletions
diff --git a/macosx/Controller.h b/macosx/Controller.h index 954817d5c..d4036e81d 100644 --- a/macosx/Controller.h +++ b/macosx/Controller.h @@ -38,19 +38,19 @@ extern NSString *keyTitleTag; /* Video view controller */ HBVideoController * fVideoController; - IBOutlet NSView * fVideoView; + IBOutlet NSTabViewItem * fVideoTab; /* Subtitles view controller */ HBSubtitlesController * fSubtitlesViewController; - IBOutlet NSView * fSubtitlesView; + IBOutlet NSTabViewItem * fSubtitlesTab; /* Audio view controller */ HBAudioController * fAudioController; - IBOutlet NSView * fAudioView; + IBOutlet NSTabViewItem * fAudioTab; /* Chapters view controller */ HBChapterTitlesController * fChapterTitlesController; - IBOutlet NSView * fChaptersTitlesView; + IBOutlet NSTabViewItem * fChaptersTitlesTab; /* Main Menu Outlets */ NSMenuItem * fOpenSourceTitleMMenu; diff --git a/macosx/Controller.m b/macosx/Controller.m index 9e7f1b346..e9a20c61d 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -647,50 +647,29 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It fPresetsView = [[HBPresetsViewController alloc] initWithPresetManager:presetManager]; [fPresetDrawer setContentView:[fPresetsView view]]; fPresetsView.delegate = self; - [[fPresetDrawer contentView] setAutoresizingMask:( NSViewWidthSizable | NSViewHeightSizable )]; // Set up the chapters title view fChapterTitlesController = [[HBChapterTitlesController alloc] init]; - [fChaptersTitlesView addSubview: [fChapterTitlesController view]]; - - // make sure we automatically resize the controller's view to the current window size - [[fChapterTitlesController view] setFrame: [fChaptersTitlesView bounds]]; - [[fChapterTitlesController view] setAutoresizingMask:( NSViewWidthSizable | NSViewHeightSizable )]; + [fChaptersTitlesTab setView:[fChapterTitlesController view]]; // setup the subtitles view fSubtitlesViewController = [[HBSubtitlesController alloc] init]; - [fSubtitlesView addSubview: [fSubtitlesViewController view]]; - - // make sure we automatically resize the controller's view to the current window size - [[fSubtitlesViewController view] setFrame: [fSubtitlesView bounds]]; - [[fSubtitlesViewController view] setAutoresizingMask:( NSViewWidthSizable | NSViewHeightSizable )]; + [fSubtitlesTab setView:[fSubtitlesViewController view]]; // setup the audio controller fAudioController = [[HBAudioController alloc] init]; - [fAudioView addSubview: [fAudioController view]]; - - // make sure we automatically resize the controller's view to the current window size - [[fAudioController view] setFrame: [fAudioView bounds]]; - [[fAudioController view] setAutoresizingMask:( NSViewWidthSizable | NSViewHeightSizable )]; + [fAudioTab setView:[fAudioController view]]; // setup the advanced view controller fAdvancedOptions = [[HBAdvancedController alloc] init]; [fAdvancedView addSubview: [fAdvancedOptions view]]; - // make sure we automatically resize the controller's view to the current window size - [[fAudioController view] setFrame: [fAudioView bounds]]; - [[fAudioController view] setAutoresizingMask:( NSViewWidthSizable | NSViewHeightSizable )]; - // setup the video view controller fVideoController = [[HBVideoController alloc] init]; fVideoController.fAdvancedOptions = fAdvancedOptions; fVideoController.fHBController = self; - [fVideoView addSubview: [fVideoController view]]; - - // make sure we automatically resize the controller's view to the current window size - [[fVideoController view] setFrame: [fVideoView bounds]]; - [[fVideoController view] setAutoresizingMask:( NSViewWidthSizable | NSViewHeightSizable )]; + [fVideoTab setView:[fVideoController view]]; [fWindow recalculateKeyViewLoop]; diff --git a/macosx/English.lproj/MainMenu.xib b/macosx/English.lproj/MainMenu.xib index 33f0c5d72..ba0e2b91c 100644 --- a/macosx/English.lproj/MainMenu.xib +++ b/macosx/English.lproj/MainMenu.xib @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="5056" systemVersion="13F14" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none"> <dependencies> - <deployment version="1060" defaultVersion="1090" identifier="macosx"/> + <deployment version="1060" defaultVersion="1060" identifier="macosx"/> <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="5056"/> </dependencies> <objects> @@ -1089,8 +1089,8 @@ DQ <connections> <outlet property="fAddPresetPanel" destination="1867" id="1869"/> <outlet property="fAdvancedView" destination="2513" id="2516"/> - <outlet property="fAudioView" destination="1476" id="bAi-A0-1dK"/> - <outlet property="fChaptersTitlesView" destination="1990" id="4WE-iV-1e2"/> + <outlet property="fAudioTab" destination="1475" id="AuZ-Uf-bla"/> + <outlet property="fChaptersTitlesTab" destination="1989" id="oUt-8L-Ag2"/> <outlet property="fDstBrowseButton" destination="1562" id="1578"/> <outlet property="fDstFile1Field" destination="1552" id="1596"/> <outlet property="fDstFile2Field" destination="1561" id="1585"/> @@ -1135,8 +1135,8 @@ DQ <outlet property="fSrcTitleField" destination="1540" id="1592"/> <outlet property="fSrcTitlePopUp" destination="1541" id="1593"/> <outlet property="fStatusField" destination="1123" id="1238"/> - <outlet property="fSubtitlesView" destination="5195" id="Ngb-0O-f4g"/> - <outlet property="fVideoView" destination="1478" id="M6c-3U-STI"/> + <outlet property="fSubtitlesTab" destination="5194" id="d9b-rJ-XrS"/> + <outlet property="fVideoTab" destination="1477" id="6o2-cM-yy4"/> <outlet property="fWindow" destination="21" id="350"/> <outlet property="presetsMenu" destination="1949" id="bkm-2h-uFI"/> </connections> diff --git a/macosx/HandBrake.xcodeproj/project.pbxproj b/macosx/HandBrake.xcodeproj/project.pbxproj index 0e098b425..2fb8e4606 100644 --- a/macosx/HandBrake.xcodeproj/project.pbxproj +++ b/macosx/HandBrake.xcodeproj/project.pbxproj @@ -1232,7 +1232,6 @@ GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.6; OTHER_LDFLAGS = ( "-filelist", "$(EXTERNAL_BUILD)/macosx/osl.filelist.txt", @@ -1261,7 +1260,6 @@ GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.6; OTHER_LDFLAGS = ( "-filelist", "$(EXTERNAL_BUILD)/macosx/osl.filelist.txt", |