Commit Graph
5908 Commits
Author SHA1 Message Date
Stefan Wallström a549c191da lint 2013-03-11 21:09:22 +01:00
Antoine Mercadal 26213491a3 Revert "don't allow views from another window to be next/previouskeyViews"
This reverts commit 7fab8d9782.

This breaks the repsonder chain if it is defined in a view that has no window yet.
Details and reduction here: https://github.com/cappuccino/cappuccino/commit/7fab8d9782d4604c4441e48701f9207e4a2b4229#commitcomment-2781849
2013-03-11 13:01:22 -07:00
Alexander Ljungberg 5f086b11b8 Fixed: platform windows resizable.
Without this fix, a platform window could be resized by clicking just under the menu bar and dragging downwards, even that platform windows are supposed to be the size of the browser window by definition.
2013-03-11 17:40:11 +00:00
cacaodev 0d168a4518 Remove //@class CPClipView 2013-03-11 17:52:21 +01:00
Alexander Ljungberg 59b766eb93 Fixed: token field autocomplete menu not receiving mouse events in presence of modal window.
Without this fix, the presence of a modal ancestor window to a token field would lock down the autocomplete menu from mouse interaction.

This fix ensures the token field autocomplete menu accepts mouse events even during the presence of modal widows, just like other auxiliary windows such as pop up menus.
2013-03-11 16:41:06 +00:00
cacaodev 0e4f5e9203 Uncomment import 2013-03-11 17:14:00 +01:00
cacaodev a98def4326 Added doc for -setItemPrototype: explaining how to setup the item prototype when you want to use bindings for the view. 2013-03-11 16:49:19 +01:00
Andrew Hankinson b274c63395 CPTableView formatting
Formatting, whitespace and typo correction.
2013-03-11 10:01:46 -04:00
Alexander Ljungberg 6327d8c92e Fixed: transient popovers broke modal windows.
Without this fix, opening a transient popover would allow windows other than the modal window (or its children) to be interacted with.

In general, setCallback:forNextEventMatchingMask: did not work right if more than 1 callback was installed.

In the popover case the modal window would install its "any event" callback to control the event loop, but then the popover would add a second callback for mouse down to detect clicks outside of it. This would disrupt the modal event handling and allow mouse clicks (and presumably other events) to escape the modal event catcher.

This fix makes multiple nextEvent callbacks work as one would expect, with later ones taking priority over older ones and reinserted callbacks remaining at a stable priority.

This allows the modal window callback to be at the "bottom" of the handler stack and the popover event handler to be "on top" of that, and to remain that way. In theory more layers of event handling could be layered on top such as 2 simultaneous popovers.

This fix also fixes the dequeue argument in forNextEvent callbacks.
2013-03-11 13:14:18 +00:00
Alexander Ljungberg ff15f11927 Fixed: transient popover windows would close on mouse interaction with certain controls.
Without this fix, a transient popover would close if the autocomplete menu of a token field contained in it was clicked.

This happened because the popover considered the click to be on a different window. Although not tested, it's likely the same thing would happen if the menu of a combo pop or a pop up button was clicked.

This fix makes it so that any child window of a popover can be clicked without the popover closing.
2013-03-10 22:48:26 +00:00
Alexander Ljungberg 5f2d1b8255 Merge branch 'master' of github.com:cappuccino/cappuccino 2013-03-10 17:41:42 +00:00
Stefan Wallström 2bf2442096 Fixed: Using keyboard navigation in empty CPCollectionView threw exception. 2013-03-10 17:38:08 +01:00
Christophe Serafin ef4ba78ab7 removed extra blank and added a blank line above if condition 2013-03-10 17:05:53 +01:00
Christophe Serafin 85cb1b7a76 removed an extra blank and changed _shouldReorderColumn format 2013-03-10 17:04:45 +01:00
Christophe Serafin fe260a85f5 added _lastDragDestinationColumnIndex to call delegate method only once 2013-03-10 16:41:37 +01:00
Alexander Ljungberg f4096b94a7 New: use @ref and @deref instead of Ref.h throughout Cappuccino. 2013-03-10 13:08:34 +00:00
Aparajita Fishman a01de54b65 Fixed: optimize access to object property
Accessing a property via dot notation is faster than indexing via a string.
2013-03-09 14:34:58 -05:00
aparajita 5c7e26c176 Merge pull request #1826 from stewa/non-string-markers
New: use dedicated class instead of CPString for selection markers

Previously, selection markers were strings, which allowed the possibility that user data could be mistaken for a selection marker.

With this commit, selection markers are global instances of a private class, removing the possibility of clashes with user data.
2013-03-09 08:59:37 -08:00
aparajita 4da1c67d18 Merge pull request #1837 from BlairDuncan/keyViewLoopInfinateLoopFix
Fixed: views from other windows cannot be next/previous key views

Previously, a view from another window could be set as the next/previous key view, which would result in unexpected behavior, including an infinite loop.

This commit ensures the proposed next/previous view belongs to the same window as the view to which it will be chained.
2013-03-09 08:17:52 -08:00
aparajita f3d0cdbddc Merge pull request #1836 from kerusan/cpruleeditor_tooltip_localization
Fixed: CPRuleEditor tooltips were not localized

Tooltip text was hardcoded in English. Now they use the localizer.
2013-03-09 07:56:44 -08:00
Christophe Serafin 159941696d changed condition order for optimization 2013-03-08 19:35:10 +01:00
Blair Duncan 7fab8d9782 don't allow views from another window to be next/previouskeyViews 2013-03-08 12:27:19 -05:00
Christophe Serafin 152fd66bbe fixed reordering column with a restriction on a targeted column 2013-03-08 18:11:27 +01:00
Christophe Serafin ae4c77a6d4 Merge branch 'master' of https://github.com/cappuccino/cappuccino 2013-03-08 16:53:07 +01:00
cacaodevandAparajita Fishman 72c277d9ee New: CPSegmentedControl segment selection bindings support
This commit adds support for the segment selection bindings: selectedIndex, selectedLabel, and selectedTag.

Sample app included.
2013-03-08 08:54:00 -05:00
Aparajita Fishman 0fdf648e1b Formatting: added missing whitespace 2013-03-08 08:35:16 -05:00
aparajita ba1fc13eed Merge pull request #1827 from stewa/issue1499-simple
Fixed: null placeholder is set correctly when using bindings
2013-03-08 05:32:01 -08:00
Kjell Nilsson 197decc842 Changed tooltip word to lowercase to follow other tooltip formatting 2013-03-08 13:47:46 +01:00
Kjell Nilsson c381672aee Added localization of tooltips with the standard localizer 2013-03-08 09:52:55 +01:00
Aparajita Fishman 4469046b3b Revert "Fix #357: Fix resizeWithOldSuperviewSize to work more like Cocoa"
This reverts commit 4605130a53, which is breaking sheets.
2013-03-07 16:49:25 -05:00
Stefan Wallström 5cbe94ba66 CPTextField: Optimization: Only restore null placeholder when setting null values through binders. 2013-03-07 20:32:57 +01:00
aparajita 2bc5efe641 Merge pull request #1815 from cacaodev/CPTableView-issue1814
CPTableView fix for #1814.
2013-03-07 09:13:33 -08:00
Stefan Wallström bd269501ac Fixed parameter type for _placeholderForMarker: 2013-03-07 12:49:19 +01:00
Stefan Wallström 455ff57eec Fixed return type for _placeholderForMarker: 2013-03-07 12:39:04 +01:00
Stefan Wallström 51e682335b Use UID instead of hash. 2013-03-07 12:37:35 +01:00
Stefan Wallström 11c6b667fb Fixed: Wrong placeholder string in CPTextField when using bindings 2013-03-06 20:44:09 +01:00
Stefan Wallström 262bd5b7c1 Use dedicated class, _CPStateMarker, instead of CPString for selection markers. 2013-03-06 19:30:17 +01:00
Aparajita Fishman 3364733bd6 Typo 2013-03-06 10:19:26 -05:00
Aparajita Fishman 7461407140 Merge branch 'refs/heads/CPDictionary_deprecate_nil' 2013-03-06 08:53:44 -05:00
Martin CarlbergandAparajita Fishman b98b301089 Fixed: Removed deprecated warning when creating CPDictionary with nil object 2013-03-06 07:56:50 -05:00
Aparajita Fishman 4b0b19aec7 Formatting, refactoring, use separate message for nil key 2013-03-06 07:49:18 -05:00
Aparajita Fishman af142a5ccc Merge branch 'refs/heads/cpdictionary_throw_on_nil' into temp 2013-03-05 15:50:41 -05:00
aparajita e3384d98b7 Merge pull request #1810 from ahankinson/fix-issue1184
Fix #1184: Add missing argument to .apply()
2013-03-05 12:40:27 -08:00
cacaodev ac3a45aec5 CPTableView: force the mask to CPViewNotSizable for IB made CPTableCellView.
Added documentation for tableView:dataViewForTableColum:row: delegate method. Document other cases, when we expect the data view to have a CPViewNotSizable mask.
ViewBasedCib example: added variable row heights.
2013-03-04 20:03:20 +01:00
Andrew Hankinson 4605130a53 Fix #357: Fix resizeWithOldSuperviewSize to work more like Cocoa
Without this fix, CPView's resizeWithOldSuperviewSize: would simply resize subviews at the rate of 1 pixel for every 2 pixel change.

This change introduces a new method of resizing views to a ratio of the size of the superview.

Patch contributed by @davidkhess
2013-03-02 16:40:00 -05:00
Blair Duncan 9730e066b8 fix for issue #1819 tableview infinate loop 2013-03-01 17:00:38 -05:00
Christophe Serafin 77d2ebbda0 adds shouldReorderColumn to CPTableView delegate methods 2013-03-01 11:57:24 +01:00
Martin Carlberg e686fbc0a8 Fixed: Handle deprecated setObject:forKey: calls with nil object on CPDictionary 2013-03-01 10:50:00 +01:00
Aparajita Fishman 62ced1749f Fixed: invalid menu item validator was not checked properly
Previously, if CPApplication -targetForAction:to:from: returned nil, no check was done to see if that failed because there was no action or no valid target. If the item had no item, no target, and to action binding, it would be left enabled, which was incorrect.

This commit fixes the validation to disable the item if targetForAction:to:from: returns nil and the item has an action or target.
2013-02-27 18:26:34 -05:00
Stefan Wallström b7ff643a34 Fixed: when clicking and dragging inside a menu, mouseEntered and mouseExited was mixed up for custom views. 2013-02-27 22:26:52 +01:00