Commit Graph
28 Commits
Author SHA1 Message Date
Klaas Pieter Annema 4e1ecbef72 Merge branch 'CPTextField-InterpretKeyEvents' of https://github.com/luuse/cappuccino into luuse-CPTextField-InterpretKeyEvents
Conflicts:
	AppKit/CPSearchField.j
	AppKit/CPTextField.j
2011-01-18 10:07:16 +01:00
cacaodevandKlaas Pieter Annema 43f8b50ef7 revert _searchMenuTemplate -> searchMenuTemplate 2010-12-01 10:35:25 +01:00
cacaodevandKlaas Pieter Annema 7c098753cf CPSearchField:
- Fix recentAutosaveName decoding (setter was needed)
- Fix a bug where 2 search fields in the same app would receive the same recentSearches update when recentAutosaveName set.
- Update recentAutosaveName to use the new CPUserDefaults class instead of CPCookie.
- searchMenuTemplate nib2cib decoding. searchMenutemplate is just an outlet, it's automatically connected.
- Removed CPSearchFieldSeparatorItemTag
- Updated Test app with a nib2cibed search field. Ability to set some options for the regular search field.
- Style and white space.
2010-12-01 10:35:25 +01:00
Andreas bb9e1a830d Add cancelOperation action to clear text when pressing ESC 2010-11-13 15:21:37 +01:00
Francisco Ryan Tolmasky I 52f7844aee Made it so .h files are automatically included in AppKit (avoiding needing to manually include Platform.h, etc.).
Also changed a bunch of <AppKit/*> imports to "*" imports.

Reviewed by me.
2010-11-01 11:10:01 -07:00
Klaas Pieter Annema 6e9f82212b rename CPView +themeClass to +defaultThemeClass 2010-10-25 14:15:22 +02:00
Klaas Pieter Annema 991e213d02 give CPSearchField it's own theme class
Before this change it was not possible to theme CPSearchField separately from a CPTextField. Aristo still just uses the rounded theme style.
2010-10-19 14:21:00 +02:00
Paul Baumgart 01852d8075 Fix a bunch of missing @imports.
All classes (excluding the ones prefixed with underscores) in Foundation
and AppKit can now be loaded individually except CPOpenPanel and
CPSavePanel. These two classes have some sort of dependency cycle
that seems impossible to resolve without forward declarations (which
we don't have).
2010-10-05 15:54:25 -07:00
Aparajita FishmanandAlexander Ljungberg 088a5c7166 Remove extra call to _init in -initWithCoder: 2010-08-11 12:23:47 -04:00
Ross Boucher a7ca917abf Better method of expressing this condition. 2010-07-29 11:26:13 -07:00
Aparajita FishmanandRoss Boucher 48a89fd828 frame parameter is not being used in _initWithFrame, might as well leave it out, fixed typo in comment 2010-07-29 09:56:55 -07:00
Aparajita FishmanandRoss Boucher eb99b7d7ca CPSearchField fixes/enhancements to commit 5b763928fe:
- Added more documentation for -defaultSearchTemplate.

- Capitalized the text of the menu items in the default template.

- Adding a separator before no recents menu item if there are items before it.

- Updated the test app to use the default template and then modify it.

- Updated the test app to maintain the state of the custom items.
2010-07-28 15:16:04 -07:00
Aparajita FishmanandRoss Boucher 006f709d37 Fixes to commit 69273259a5:
- No longer setting the search menu template to the default, but -defaultSearchMenuTemplate was made public.

- Action and target for clear recents item is always set to CPSearchField -_searchFieldClearRecents: since that is a built-in type.

- Action and target for recents item is always set to CPSearchField -_searchFieldSearch: since that is a built-in type.

- Template menu items are copied via CPMenuItem -copy (which is now implemented), so all state is maintained.
2010-07-28 15:15:47 -07:00
Ross Boucher 7caf5fe20a Must return from this method. 2010-07-28 14:54:07 -07:00
Aparajita FishmanandRoss Boucher 44a958d3f8 -hitTest was always returning self, which did not allow any other views to receive a mouse down 2010-07-28 14:53:13 -07:00
Aparajita FishmanandRoss Boucher 4c562048dc More fixes to CPSearchField (Cocoa compliance and bugs):
- Added the ability to specify a separator in the template by using the tag CPSearchFieldSeparatorMenuItemTag.
- _recentSearches was not being initialized by -initWithCoder, moved that code into -_init.
- -setSearchMenuTemplate was not being invoked. Since having a recents menu is the default behavior in Cocoa, it should probably be the default behavior in cappuccino. To turn it off, set _maximumRecents to >= 254.
- -searchTextRectForBounds was using the wrong rect for -searchButtonRectForBounds and -cancelButtonRectForBounds, resulting in a rect that was too narrow and did not fill the space.
- Tightened up the spacing between the magnifying glass and the text to exactly Cocoa distance.
- Overhauled -
updateSearchMenu to fix some logic bugs.
- Made sure the search field becomes first responder after closing the search menu.
- Cleared the search string when clearing recent searches, this is what Safari does.
- Removed redundant invoking of -setDelegate in -initWithCoder.
- -_init has to be called last in _initWithCoder.
2010-07-28 14:53:04 -07:00
Aparajita FishmanandRoss Boucher f3b92c7445 Fixes to cacaodev/searchfield/ffb8f99603d96b903b6bb39bc4dcb15ad09465be...
- Replaced CG functions with inline _CG functions
- _canResignFirstResponder was not being initialized to YES
- -resignFirstResponder has to call super if _canResignFirstResponder == YES
2010-07-28 14:51:57 -07:00
cacaodevandRoss Boucher 675e9829bd CPSearchField: Fixes (per cocoa)
- Do not override search button action, catch mouse events in mouseDown: instead.
- Do not resign first responder on searchfield when showing the context menu
- Give more space between search button and insertion point
- Do not add search string to recents searches when typing and sendsWholeString == NO, only on enter.
- Select all text when showing the menu or after selecting a recent search in the menu
- Support custom search/cancel buttons and custom layout
- Allow images in template menu items
- Updated Test App with custom buttons
2010-07-28 14:49:02 -07:00
Klaas Pieter AnnemaandRoss Boucher 6c1a6a2033 made _sendPartialString send it's action down the responder chain 2010-05-25 11:47:52 -07:00
Ross Boucher 8b8998a2b9 Don't encode the search/cancel buttons. They add bloat and complicate the process. 2010-03-12 19:46:05 -08:00
Ross Boucher 503ce5502e Fix nib2cib support for CPSearchField 2010-03-12 18:49:37 -08:00
cacaodevandRoss Boucher 01d60ad4e9 CPSearchField changes from issue #194 2009-12-03 19:24:43 -08:00
Randall LueckeandRoss Boucher b5cdcec004 fixed CPSearchField search and cancel buttons so they stay positioned correctly when resized. 2009-10-25 19:17:01 -07:00
Ross Boucher f5d05a7c93 Change file encodings. 2009-10-15 16:59:19 -07:00
lowell vizonandFrancisco Ryan Tolmasky I 377f331b47 Documentation Edits: Replaced <code> and <pre> tags with \c; this allows monospaced text to be displayed with formatted text without needing a new line. See AppKit/CPView after generating documentation for examples. Also added - and + signs to the above changes when referring to either an -instanceMethod or a +classMethod. --lowell@cocoastep
Signed-off-by: Francisco Ryan Tolmasky I <francisco@280north.com>
2009-08-08 03:50:50 +08:00
cacaodevandFrancisco Ryan Tolmasky I 57ee7bcfce Fixed bug reported by Paul Tomlin http://groups.google.com/group/objectivej/browse_thread/thread/e4bc41026a8f100f/6b14f3b74189df18
Signed-off-by: Francisco Ryan Tolmasky I <francisco@280north.com>
2009-07-25 02:48:58 +08:00
aburkhalterandtlrobinson 927b94244a Added test coverage for CPSearchField instantiation, recentSearch getter/setter, added DOM protection to class init 2009-06-06 16:49:46 -07:00
cacaodevandtlrobinson fc74bba68c CPSearchField contributed by cacaodev 2009-06-06 15:27:25 -07:00