From: dynaflash Date: Fri, 12 Dec 2008 15:53:15 +0000 (+0000) Subject: MacGui: Add "Picture Settings" toolbar item to main window toolbar X-Git-Tag: 0.9.4~936 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1a295f78e540e2c086e07615efeaf1c3268637eb;p=handbrake MacGui: Add "Picture Settings" toolbar item to main window toolbar - Currently uses the same icon as the picture item in the preferences toolbar - Performs same function as the "Picture Settings ..." button in the video tab which is to say it opens the picture settings window - Removed the "Picture Settings ..." button in the video tab git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2021 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- diff --git a/macosx/Controller.h b/macosx/Controller.h index 453b48017..5ab03c60b 100644 --- a/macosx/Controller.h +++ b/macosx/Controller.h @@ -198,7 +198,6 @@ BOOL fIsDragging; ChapterTitles * fChapterTitlesDelegate; /* Bottom */ - IBOutlet NSButton * fPictureButton; IBOutlet NSTextField * fStatusField; IBOutlet NSProgressIndicator * fRipIndicator; BOOL fRipIndicatorShown; diff --git a/macosx/Controller.mm b/macosx/Controller.mm index dc2dacd65..24acbbb06 100644 --- a/macosx/Controller.mm +++ b/macosx/Controller.mm @@ -18,6 +18,7 @@ static NSString * StartEncodingIdentifier = @"Start Encoding I static NSString * PauseEncodingIdentifier = @"Pause Encoding Item Identifier"; static NSString * ShowQueueIdentifier = @"Show Queue Item Identifier"; static NSString * AddToQueueIdentifier = @"Add to Queue Item Identifier"; +static NSString * ShowPictureIdentifier = @"Show Picture Window Item Identifier"; static NSString * ShowActivityIdentifier = @"Debug Output Item Identifier"; static NSString * ChooseSourceIdentifier = @"Choose Source Item Identifier"; @@ -410,7 +411,7 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It fAudTrack1BitratePopUp, fAudTrack2BitratePopUp, fAudTrack3BitratePopUp, fAudTrack4BitratePopUp, fAudDrcLabel, fAudTrack1DrcSlider, fAudTrack1DrcField, fAudTrack2DrcSlider, fAudTrack2DrcField, fAudTrack3DrcSlider, fAudTrack3DrcField, fAudTrack4DrcSlider,fAudTrack4DrcField, - fPictureButton,fQueueStatus,fPicSettingARkeep, fPicSettingDeinterlace,fPicLabelSettings,fPicLabelSrc, + fQueueStatus,fPicSettingARkeep, fPicSettingDeinterlace,fPicLabelSettings,fPicLabelSrc, fPicLabelOutp,fPicSettingsSrc,fPicSettingsOutp,fPicSettingsAnamorphic, fPicLabelAr,fPicLabelDeinterlace,fPicSettingPAR,fPicLabelAnamorphic,fPresetsAdd,fPresetsDelete, fCreateChapterMarkers,fVidTurboPassCheck,fDstMp4LargeFileCheck,fPicLabelAutoCrop, @@ -924,7 +925,17 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It [item setTarget: self]; [item setAction: @selector(Pause:)]; } - else if ([itemIdent isEqualToString: ShowActivityIdentifier]) { + else if ([itemIdent isEqualToString: ShowPictureIdentifier]) + { + [item setLabel: @"Picture Settings"]; + [item setPaletteLabel: @"Show Picture Settings"]; + [item setToolTip: @"Show Picture Settings"]; + [item setImage: [NSImage imageNamed: @"pref-picture"]]; + [item setTarget: self]; + [item setAction: @selector(showPicturePanel:)]; + } + else if ([itemIdent isEqualToString: ShowActivityIdentifier]) + { [item setLabel: @"Activity Window"]; [item setPaletteLabel: @"Show Activity Window"]; [item setToolTip: @"Show Activity Window"]; @@ -954,13 +965,13 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It { return [NSArray arrayWithObjects: ChooseSourceIdentifier, NSToolbarSeparatorItemIdentifier, StartEncodingIdentifier, PauseEncodingIdentifier, AddToQueueIdentifier, ShowQueueIdentifier, NSToolbarFlexibleSpaceItemIdentifier, - NSToolbarSpaceItemIdentifier, ShowActivityIdentifier, ToggleDrawerIdentifier, nil]; + NSToolbarSpaceItemIdentifier, ShowPictureIdentifier, ShowActivityIdentifier, ToggleDrawerIdentifier, nil]; } - (NSArray *) toolbarAllowedItemIdentifiers: (NSToolbar *) toolbar { return [NSArray arrayWithObjects: StartEncodingIdentifier, PauseEncodingIdentifier, AddToQueueIdentifier, - ChooseSourceIdentifier, ShowQueueIdentifier, ShowActivityIdentifier, ToggleDrawerIdentifier, + ChooseSourceIdentifier, ShowQueueIdentifier, ShowPictureIdentifier, ShowActivityIdentifier, ToggleDrawerIdentifier, NSToolbarCustomizeToolbarItemIdentifier, NSToolbarFlexibleSpaceItemIdentifier, NSToolbarSpaceItemIdentifier, NSToolbarSeparatorItemIdentifier, nil]; } @@ -993,8 +1004,12 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It return YES; } if (SuccessfulScan) + { if ([ident isEqualToString: AddToQueueIdentifier]) return YES; + if ([ident isEqualToString: ShowPictureIdentifier]) + return YES; + } } else if (s.state == HB_STATE_PAUSED) { @@ -1010,6 +1025,8 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It return YES; if ([ident isEqualToString: AddToQueueIdentifier]) return YES; + if ([ident isEqualToString: ShowPictureIdentifier]) + return YES; } else if (s.state == HB_STATE_SCANNING) return NO; @@ -1028,6 +1045,8 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It } if ([ident isEqualToString: AddToQueueIdentifier]) return YES; + if ([ident isEqualToString: ShowPictureIdentifier]) + return YES; } } diff --git a/macosx/English.lproj/MainMenu.xib b/macosx/English.lproj/MainMenu.xib index ce0ff233d..d910dda87 100644 --- a/macosx/English.lproj/MainMenu.xib +++ b/macosx/English.lproj/MainMenu.xib @@ -414,29 +414,6 @@ - - - 256 - {{580, 95}, {122, 28}} - - YES - - -2080244224 - 134348800 - UGljdHVyZSBTZXR0aW5nc+KApg - - - -2038284033 - 1 - - - - - - 200 - 25 - - 256 @@ -5213,14 +5190,6 @@ 1637 - - - showPicturePanel: - - - - 1735 - fPicLabelSrc @@ -5253,14 +5222,6 @@ 1748 - - - fPictureButton - - - - 1750 - fSubField @@ -6942,7 +6903,6 @@ - @@ -7063,15 +7023,6 @@ - - 1713 - - - YES - - - - 1714 @@ -8649,11 +8600,6 @@ - - 4882 - - - 4883 @@ -10176,8 +10122,6 @@ 1636.ImportedFromIB2 1638.IBPluginDependency 1638.ImportedFromIB2 - 1713.IBPluginDependency - 1713.ImportedFromIB2 1714.IBPluginDependency 1714.ImportedFromIB2 1717.IBPluginDependency @@ -10939,8 +10883,6 @@ com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{454, 306}, {270, 550}} com.apple.InterfaceBuilder.CocoaPlugin