Aparajita Fishman
cae5486ec6
Added missing class checks in +initialize, regularized checking code
2012-06-28 12:05:18 -07:00
Antoine Mercadal
0d29f15b70
Merge pull request #1513 from BlairDuncan/MenuTimestampFix
...
Fix for menu selection that was broken with the change to CPEvent timestamp
2012-06-14 17:02:06 -07:00
Alexander Ljungberg
ad5403b538
Setting the shadow style just once will do.
2012-06-11 13:13:36 +01:00
Blair Duncan
eeceaa0c9b
unlite if mouse is moved off and cursor up hilites last item if none
2012-06-01 20:17:09 -04:00
Blair Duncan
d6429e532b
typo fix
2012-04-24 00:02:12 -04:00
Blair Duncan
864db16e33
Fix for issue 1491, don't scroll if active menu container is menubar
2012-04-23 23:54:13 -04:00
Blair Duncan
02ebb6e4f7
highlite menu item only if the active item was found
2012-04-23 23:06:31 -04:00
Blair Duncan
5b5034da63
CPEvent - send a valid timestamp for periodic events
2012-04-23 18:19:37 -04:00
Blair Duncan
5b6779a3a9
Fix for menu selection that was broken with the change to CPEvent timestamp
2012-04-23 16:51:10 -04:00
Aparajita Fishman
5763ebdf2b
Fixed CPEvent -timestamp to return seconds since startup, as documented in Cocoa.
...
Miscellaneous cleanup of timestamp usage as well.
2012-04-15 11:30:27 -04:00
Aparajita Fishman
e2ead56256
Collection KVC fixes, nextObject correctness
...
- Moved common CPArray/CPSet collection KVC operators to _CPCollectionKVCOperators.
- Implemented KVC operator dispatch using Objective-J.
- Fixed infinite loop with empty collection in @min, @max and @sum operators.
- Correctly return valueForUndefinedKey when necessary.
- valueForUndefinedKey reason uses raw description for consistency, class' overridden description may not helpful at all.
- Don't create a forwarder for @ operators with property paths.
- Fixed CPSet -valueForKeyPath to correctly deal with nil/undefined/empty values.
- Added tests for collection KVC operators.
- enumerator -nextObject should always compare against nil for clarity, correctness, and consistency.
2012-04-03 22:16:55 -07:00
Aparajita Fishman
d68278e41f
Use isMenuBar instead of testing class
2012-03-27 11:19:41 -07:00
Aparajita Fishman
cd148c36c9
Menu tracking fixes:
...
- Finally fixed #1457 .
- Fixed case where mouse is dragged and then released over a submenu, which should release the menu.
- Fixed case where clicking without dragging, then clicking again on a menu title would not close the menu.
2012-03-26 12:38:50 -07:00
Blair Duncan
bb7876759a
unnecessary globals
2011-12-10 23:10:22 -05:00
Alexander Ljungberg
3cee00323c
Don't separate statements by commas.
2011-11-10 12:31:16 +00:00
Aparajita Fishman
8c83816ec8
Made [CPMenu -removeAllItems] KVO compliant
...
Fixes https://github.com/cappuccino/cappuccino/issues/1395
2011-11-09 14:50:52 -08:00
Klaas Pieter Annema
f241142216
don't disallow setEnabled for auto enabled items
2011-07-21 14:41:47 +02:00
Klaas Pieter Annema
f0561844d8
don't close a menu item with a submenu
...
A submenu item should only close the menu if it has a non default action.
This is compliant with how Cocoa behavior.
2011-07-21 12:23:11 +02:00
Klaas Pieter Annema
edcee8934d
fix empty contextual menus out of bounds error
2011-07-14 16:26:58 +02:00
Klaas Pieter Annema
d115d2ef47
fix context menu only closes after two clicks
...
This is a regression from 73b4c33f05 .
Because we were only tracking wether the left mouse button went up after a contextual menu (which is opened with the right mouse)
would only close after the second left mouse up.
2011-07-14 11:15:34 +02:00
Klaas Pieter Annema
4719578f10
fix 0 is a valid highlighted index
2011-07-07 20:40:22 +02:00
Klaas Pieter Annema
63d208bf20
never return a separator as the highlighted item
2011-07-07 18:33:00 +02:00
Klaas Pieter Annema
73b4c33f05
track if the mouse was released after menu open
...
Make sure the menu isn't closed by the mouse up that is directly followed by the mouse down that opened the menu.
2011-07-07 16:04:10 +02:00
Klaas Pieter Annema
ad30f4dcbb
call delegate when submenu open and close
2011-07-07 16:04:10 +02:00
Klaas Pieter Annema
2b6fddf26c
move menu delegate logic to generic methods
2011-07-07 16:04:04 +02:00
Randy Luecke
f419629ce4
Merge pull request #1260 from aparajita/cpmenu-remove-all
...
Added CPMenu -removeAll
2011-05-21 18:21:15 -07:00
Aparajita Fishman
bb3ed30b4e
Style cleanup
2011-05-15 12:15:00 -07:00
Aparajita Fishman
3242e35250
Added CPMenu -removeAll method, removed unused internal _itemIsHighlighted method, test app
2011-05-11 23:59:33 -04:00
Klaas Pieter Annema
dc5d8f5fd3
never disable menu items with submenus
2011-04-20 21:00:52 +02:00
Klaas Pieter Annema
8e3c26c313
implement CPMenu user interface validation
2011-04-20 10:38:22 +02:00
Klaas Pieter Annema
dc264231c8
open menu bar menus directly
2011-04-20 08:58:30 +02:00
Klaas Pieter Annema
a9f23fe082
open submenus after a short delay
2011-03-04 10:21:26 +01:00
Klaas Pieter Annema
3c77d43e03
implement mousewheel support for CPMenu
2011-03-04 10:21:26 +01:00
Klaas Pieter Annema
7fb78fe157
lint _CPMenuWindow
2011-03-04 10:21:26 +01:00
Klaas Pieter Annema
566fdf6400
lint _CPMenuManager.j
2011-03-04 10:21:25 +01:00
Blair Duncan
7d7c037682
add support for Home and End key and modified logic for pageUp and pageDown
2011-03-04 10:20:54 +01:00
Blair Duncan
bf72a7f92d
added support for escape key to cancel menus, removed unused var
2011-03-04 10:20:54 +01:00
Blair Duncan
df9387fc78
remove unneccessary scrolling calls and periodic events when not needed
2011-03-04 10:20:54 +01:00
Blair Duncan
9296df89df
fixed some spacing and added a delay in the reset time for longer lists
2011-03-04 10:19:35 +01:00
Blair Duncan
d4d65ed4d7
Add support for keyboard navigation in menus
2011-03-04 10:19:35 +01:00
Alexander Ljungberg
50e5fa2c8e
Fix accidental globals.
2011-03-01 00:02:35 -03:00
Alexander Ljungberg
dedf3cd90f
More AppKit coding standards.
2011-02-28 23:55:29 -03:00
Stephen Ierodiaconou
6a942630e4
Fixing spelling mistakes
2011-01-24 11:05:48 +02:00
Francisco Ryan Tolmasky I
6310733881
Fix for menu bar color being reset (+ [CPMenu initialize] didn't check the class).
...
Reviewed by me.
2011-01-18 13:59:57 -08:00
Francisco Ryan Tolmasky I
9796f5d5d7
Fix CPPopUpButton menu support.
...
- Added enumerateObjectsUsingBlock: to CPArray
- Fixed a remaining case of [] being used instead of objectAtIndex: in CPMutableArray.
- Added KVO support for menu items array in menus.
- Changed CPPopUpButton to use KVO to sync up with menu instead of notifications.
- Removed extra menu encoding in CPPopUpButton.
- Removed extra mainMenu object from CPApplication.
- Use setters in CPResponder instead of direct ivar access in initWithCoder:.
Closes #298 .
Closes $1059.
Reviewed by me.
2011-01-17 01:31:15 -08:00
Brian Donovan
9fc0006316
Fix copy-paste error in calling the menuDidOpen: delegate method.
2010-11-30 17:58:26 -08: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
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 Fishman
8702b1421f
Fix for issue #777 , also fixed a declared type while I was at it
2010-07-28 15:09:02 -07:00
Scott Kyle
1899250a53
Semicolons are nice...
2010-06-10 16:42:28 -05:00