diff options
author | ritsuka <[email protected]> | 2008-04-30 13:41:45 +0000 |
---|---|---|
committer | ritsuka <[email protected]> | 2008-04-30 13:41:45 +0000 |
commit | 69b6aabe79e998b69450a77b223d3253f4db3ed3 (patch) | |
tree | 02213970a7d29e70828fb63adbf4e675f8986a94 /macosx | |
parent | 1fb35b03be03367c930be567995d91679b53199c (diff) |
MacGUI: Clean up HBPreferencesController, remove an unused method, and use standard icons for the General and Advanced panel.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1450 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/HBPreferencesController.m | 29 | ||||
-rw-r--r-- | macosx/HandBrake.xcodeproj/project.pbxproj | 8 |
2 files changed, 10 insertions, 27 deletions
diff --git a/macosx/HBPreferencesController.m b/macosx/HBPreferencesController.m index cb2cd1990..6aa4b16ce 100644 --- a/macosx/HBPreferencesController.m +++ b/macosx/HBPreferencesController.m @@ -19,7 +19,7 @@ * no getter/setter code is needed in this file (unless more complicated * preference settings are added that cannot be handled with Cocoa bindings). */ - + @interface HBPreferencesController (Private) - (void) setPrefView: (id) sender; @@ -35,7 +35,7 @@ + (void)registerUserDefaults { NSString *desktopDirectory = [@"~/Desktop" stringByExpandingTildeInPath]; - + [[NSUserDefaults standardUserDefaults] registerDefaults:[NSDictionary dictionaryWithObjectsAndKeys: @"YES", @"CheckForUpdates", @"English", @"DefaultLanguage", @@ -63,7 +63,7 @@ { NSAssert([self window], @"[HBPreferencesController init] window outlet is not connected in Preferences.nib"); } - return self; + return self; } - (void) awakeFromNib @@ -74,7 +74,7 @@ [toolbar setDisplayMode: NSToolbarDisplayModeIconAndLabel]; [toolbar setSizeMode: NSToolbarSizeModeRegular]; [[self window] setToolbar: toolbar]; - + [toolbar setSelectedItemIdentifier: TOOLBAR_GENERAL]; [self setPrefView:nil]; } @@ -88,7 +88,7 @@ if ([ident isEqualToString: TOOLBAR_GENERAL]) { [item setLabel: NSLocalizedString(@"General", "General")]; - [item setImage: [NSImage imageNamed: @"pref-general"]]; + [item setImage: [NSImage imageNamed: @"NSPreferencesGeneral"]]; [item setTarget: self]; [item setAction: @selector(setPrefView:)]; [item setAutovalidates: NO]; @@ -112,7 +112,7 @@ else if ([ident isEqualToString: TOOLBAR_ADVANCED]) { [item setLabel: NSLocalizedString(@"Advanced", "Advanced")]; - [item setImage: [NSImage imageNamed: @"pref-advanced"]]; + [item setImage: [NSImage imageNamed: @"NSAdvanced"]]; [item setTarget: self]; [item setAction: @selector(setPrefView:)]; [item setAutovalidates: NO]; @@ -142,15 +142,6 @@ TOOLBAR_AUDIO, TOOLBAR_ADVANCED, nil]; } -/** - * Closes the window and stops modal state. Any changes made in field editor - * are saved by [NSWindow endEditingFor:] before closing the window. - */ -- (IBAction)close:(id)sender -{ - //[self makeFirstResponder: nil]; -} - @end @implementation HBPreferencesController (Private) @@ -169,21 +160,21 @@ view = fAdvancedView; else; } - + NSWindow * window = [self window]; if ([window contentView] == view) return; - + NSRect windowRect = [window frame]; float difference = ([view frame].size.height - [[window contentView] frame].size.height) * [window userSpaceScaleFactor]; windowRect.origin.y -= difference; windowRect.size.height += difference; - + [view setHidden: YES]; [window setContentView: view]; [window setFrame: windowRect display: YES animate: YES]; [view setHidden: NO]; - + //set title label if (sender) [window setTitle: [sender label]]; diff --git a/macosx/HandBrake.xcodeproj/project.pbxproj b/macosx/HandBrake.xcodeproj/project.pbxproj index 943abc78c..68385aa8d 100644 --- a/macosx/HandBrake.xcodeproj/project.pbxproj +++ b/macosx/HandBrake.xcodeproj/project.pbxproj @@ -108,9 +108,7 @@ A2D7AD670C998AD30082CA33 /* ActivityWindow.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A2D7AD5E0C998AD30082CA33 /* ActivityWindow.tiff */; }; A2D7AD680C998AD30082CA33 /* AddToQueue.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A2D7AD5F0C998AD30082CA33 /* AddToQueue.tiff */; }; A2D7AD690C998AD30082CA33 /* Drawer.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A2D7AD600C998AD30082CA33 /* Drawer.tiff */; }; - A2D7AD6A0C998AD30082CA33 /* pref-advanced.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A2D7AD610C998AD30082CA33 /* pref-advanced.tiff */; }; A2D7AD6B0C998AD30082CA33 /* pref-audio.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A2D7AD620C998AD30082CA33 /* pref-audio.tiff */; }; - A2D7AD6C0C998AD30082CA33 /* pref-general.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A2D7AD630C998AD30082CA33 /* pref-general.tiff */; }; A2D7AD6D0C998AD30082CA33 /* pref-picture.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A2D7AD640C998AD30082CA33 /* pref-picture.tiff */; }; A2D7AD6E0C998AD30082CA33 /* Queue.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A2D7AD650C998AD30082CA33 /* Queue.tiff */; }; A2D7AD6F0C998AD30082CA33 /* Source.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A2D7AD660C998AD30082CA33 /* Source.tiff */; }; @@ -274,9 +272,7 @@ A2D7AD5E0C998AD30082CA33 /* ActivityWindow.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = ActivityWindow.tiff; sourceTree = "<group>"; }; A2D7AD5F0C998AD30082CA33 /* AddToQueue.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = AddToQueue.tiff; sourceTree = "<group>"; }; A2D7AD600C998AD30082CA33 /* Drawer.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = Drawer.tiff; sourceTree = "<group>"; }; - A2D7AD610C998AD30082CA33 /* pref-advanced.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = "pref-advanced.tiff"; sourceTree = "<group>"; }; A2D7AD620C998AD30082CA33 /* pref-audio.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = "pref-audio.tiff"; sourceTree = "<group>"; }; - A2D7AD630C998AD30082CA33 /* pref-general.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = "pref-general.tiff"; sourceTree = "<group>"; }; A2D7AD640C998AD30082CA33 /* pref-picture.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = "pref-picture.tiff"; sourceTree = "<group>"; }; A2D7AD650C998AD30082CA33 /* Queue.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = Queue.tiff; sourceTree = "<group>"; }; A2D7AD660C998AD30082CA33 /* Source.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = Source.tiff; sourceTree = "<group>"; }; @@ -532,8 +528,6 @@ A2D7AD650C998AD30082CA33 /* Queue.tiff */, A2D7AD5E0C998AD30082CA33 /* ActivityWindow.tiff */, A2D7AD600C998AD30082CA33 /* Drawer.tiff */, - A2D7AD630C998AD30082CA33 /* pref-general.tiff */, - A2D7AD610C998AD30082CA33 /* pref-advanced.tiff */, A2D7AD620C998AD30082CA33 /* pref-audio.tiff */, A2D7AD640C998AD30082CA33 /* pref-picture.tiff */, A9DE40430C959834008A5440 /* minus-8.png */, @@ -724,9 +718,7 @@ A2D7AD670C998AD30082CA33 /* ActivityWindow.tiff in Resources */, A2D7AD680C998AD30082CA33 /* AddToQueue.tiff in Resources */, A2D7AD690C998AD30082CA33 /* Drawer.tiff in Resources */, - A2D7AD6A0C998AD30082CA33 /* pref-advanced.tiff in Resources */, A2D7AD6B0C998AD30082CA33 /* pref-audio.tiff in Resources */, - A2D7AD6C0C998AD30082CA33 /* pref-general.tiff in Resources */, A2D7AD6D0C998AD30082CA33 /* pref-picture.tiff in Resources */, A2D7AD6E0C998AD30082CA33 /* Queue.tiff in Resources */, A2D7AD6F0C998AD30082CA33 /* Source.tiff in Resources */, |