From dcdc48a753f443c0246bcfa7a7e235e5a447f98c Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Thu, 5 Feb 2009 15:44:24 -0500 Subject: [PATCH] Add the paths replacement panel but don't implement anything in it --- English.lproj/Preferences.xib | 90 ++++++++++++++++++++++++++++++++-- Source/PreferencesController.h | 4 ++ Source/PreferencesController.m | 18 ++++++- 3 files changed, 108 insertions(+), 4 deletions(-) diff --git a/English.lproj/Preferences.xib b/English.lproj/Preferences.xib index 37816bf..fefb73d 100644 --- a/English.lproj/Preferences.xib +++ b/English.lproj/Preferences.xib @@ -50,6 +50,7 @@ YES 6AEED900-187C-4FE3-B185-35C4C2105744 + 7E7339A3-79C3-4087-B2F7-2479CFD10818 NSToolbarFlexibleSpaceItem NSToolbarSpaceItem @@ -77,6 +78,28 @@ YES 0 + + + 7E7339A3-79C3-4087-B2F7-2479CFD10818 + + Paths + Path Replacement + + + + NSImage + NSFolderSmart + + + + {0, 0} + {0, 0} + YES + NO + -1 + YES + 0 + NSToolbarFlexibleSpaceItem @@ -144,10 +167,12 @@ + YES + @@ -303,6 +328,12 @@ NSView + + + 268 + {163, 96} + NSView + @@ -387,6 +418,30 @@ 49 + + + showPaths: + + + + 51 + + + + pathsPreferencesItem + + + + 52 + + + + pathsPreferencesView + + + + 54 + @@ -448,6 +503,7 @@ + @@ -550,6 +606,17 @@ + + 50 + + + + + 53 + + + PathsPreferences + @@ -585,6 +652,8 @@ 40.IBPluginDependency 41.IBPluginDependency 43.IBPluginDependency + 50.IBPluginDependency + 53.IBPluginDependency YES @@ -617,6 +686,8 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin @@ -639,7 +710,7 @@ - 49 + 54 @@ -662,8 +733,17 @@ PreferencesController NSWindowController - showGeneral: - id + YES + + YES + showGeneral: + showPaths: + + + YES + id + id + YES @@ -671,12 +751,16 @@ YES generalPreferencesItem generalPreferencesView + pathsPreferencesItem + pathsPreferencesView toolbar YES NSToolbarItem NSView + NSToolbarItem + NSView NSToolbar diff --git a/Source/PreferencesController.h b/Source/PreferencesController.h index 3f680cc..bcb318c 100644 --- a/Source/PreferencesController.h +++ b/Source/PreferencesController.h @@ -23,11 +23,15 @@ IBOutlet NSView *generalPreferencesView; IBOutlet NSToolbarItem *generalPreferencesItem; + + IBOutlet NSView *pathsPreferencesView; + IBOutlet NSToolbarItem *pathsPreferencesItem; } - (void)showPreferencesWindow; // panel switching - (IBAction)showGeneral:(id)sender; +- (IBAction)showPaths:(id)sender; @end diff --git a/Source/PreferencesController.m b/Source/PreferencesController.m index 620048a..56b18af 100644 --- a/Source/PreferencesController.m +++ b/Source/PreferencesController.m @@ -53,6 +53,18 @@ [toolbar setSelectedItemIdentifier:[generalPreferencesItem itemIdentifier]]; } +/** + * Shows the path replacement panel + */ +- (IBAction)showPaths:(id)sender +{ + if ([[self window] contentView] == pathsPreferencesView) + return; + + [[self window] setContentView:pathsPreferencesView]; + [toolbar setSelectedItemIdentifier:[pathsPreferencesItem itemIdentifier]]; +} + #pragma mark NSToolbar Delegate /** @@ -60,7 +72,11 @@ */ - (NSArray *)toolbarSelectableItemIdentifiers:(NSToolbar *)toolbar { - return [NSArray arrayWithObjects:[generalPreferencesItem itemIdentifier], nil]; + return [NSArray arrayWithObjects: + [generalPreferencesItem itemIdentifier], + [pathsPreferencesItem itemIdentifier], + nil + ]; } @end -- 2.43.5