From acbfc238503d7975800f9cb19988048fc56449d4 Mon Sep 17 00:00:00 2001 From: Wolfgang Lux Date: Mon, 2 Aug 2010 19:10:17 +0000 Subject: [PATCH] Initialize the items of Gorm's predefined Find menu with tags and actions suitable for using the standard NSTextView find panel. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@31069 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 10 ++++++++++ Palettes/0Menus/MenusPalette.m | 30 +++++++++++++++++------------- Resources/ClassInformation.plist | 2 ++ 3 files changed, 29 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9081f7f8..2913eeb4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2010-08-02 Wolfgang Lux + + * Palettes/0Menus/MenusPalette.m (-finishInstantiate): + Initialize the find menu items with tags and actions suitable for + using the standard NSTextView find panel. + + * Resources/ClassInformation.plist: + Add -centerSelectionInVisibleArea: and -performFindPanelAction: to + the list of first responder actions. + 2010-07-10 01:22-EDT Gregory John Casamento * GormInfo.plist: Simplified copyright portion. Give a range of diff --git a/Palettes/0Menus/MenusPalette.m b/Palettes/0Menus/MenusPalette.m index af483f3c..7ea72e28 100644 --- a/Palettes/0Menus/MenusPalette.m +++ b/Palettes/0Menus/MenusPalette.m @@ -306,20 +306,24 @@ * The Find menu */ m = [[GormNSMenu alloc] init]; - [m addItemWithTitle: @"Find Panel..." - action: NULL - keyEquivalent: @"f"]; - [m addItemWithTitle: @"Find Next" - action: NULL - keyEquivalent: @"g"]; - [m addItemWithTitle: @"Find Previous" - action: NULL - keyEquivalent: @"d"]; - [m addItemWithTitle: @"Enter Selection" - action: NULL - keyEquivalent: @"e"]; + i = [m addItemWithTitle: @"Find Panel..." + action: @selector(performFindPanelAction:) + keyEquivalent: @"f"]; + [i setTag: NSFindPanelActionShowFindPanel]; + i = [m addItemWithTitle: @"Find Next" + action: @selector(performFindPanelAction:) + keyEquivalent: @"g"]; + [i setTag: NSFindPanelActionNext]; + i = [m addItemWithTitle: @"Find Previous" + action: @selector(performFindPanelAction:) + keyEquivalent: @"d"]; + [i setTag: NSFindPanelActionPrevious]; + i = [m addItemWithTitle: @"Enter Selection" + action: @selector(performFindPanelAction:) + keyEquivalent: @"e"]; + [i setTag: NSFindPanelActionSetFindString]; [m addItemWithTitle: @"Jump To Selection" - action: NULL + action: @selector(centerSelectionInVisibleArea:) keyEquivalent: @"j"]; [m setTitle: @"Find"]; i = [[NSMenuItem alloc] initWithTitle: @"Find" diff --git a/Resources/ClassInformation.plist b/Resources/ClassInformation.plist index 05add408..7ad7537b 100644 --- a/Resources/ClassInformation.plist +++ b/Resources/ClassInformation.plist @@ -9,6 +9,7 @@ "arrangeInFront:", "cancel:", "capitalizeWord:", + "centerSelectionInVisibleArea:", "changeColor:", "changeFont:", "checkSpelling:", @@ -81,6 +82,7 @@ "pasteFont:", "pasteRuler:", "performClose:", + "performFindPanelAction:", "performMiniaturize:", "performZoom:", "print:",