Commit Graph
5908 Commits
Author SHA1 Message Date
cacaodev e53337bcdc Remove check in -hitTest: that was preventing reverse set binding 2013-04-13 21:39:20 +02:00
cacaodev e5d883f97e CAKeyframeAnimation
CPAnimatablePropertyContainer protocol (CPView)
CPAnimationContext
_CPObjectAnimator CPViewAnimator
CSS Animations wrapper

CPAnimatablePropertyContainerTest : animations of views with custom Layout / Regular Layout / Custom DrawRect: / No DrawRect: / Subviews / No Subviews and combinations of these situations.
controls animation (text field, button, popup, slider ...). They animate their size via their action.
2013-04-13 16:29:43 +02:00
cacaodev 548a55792c Merge remote-tracking branch 'upstream/master' into CPTableView-enumerateRows 2013-04-13 11:52:51 +02:00
cacaodev 43f0f2a0fd Simplified -numberOfRows
Added -_numberOfRows that computes the new number of rows. Removed the
nil check.

All tests in AppKit/CPTableViewTest are now passing with success.
2013-04-13 11:38:47 +02:00
Alexandre Wilhelm 0bbaec0829 New: Added support for CPTimeZone and CPDateFormatter
- Added support for CPDateFormatter in Foundation
- Added support for CPTimeZone in Foundation
- Added support fo CPDateFormatter in nib2cib

Test app in Tests/Manual/CPDateFormatter
UnitTest in Tests/Foundation/CPTimeZoneTest.j
UnitTest in Tests/Foundation/CPDateFormatterTest.j
2013-04-12 11:15:10 -07:00
cacaodev 8d69c3764d Fixed: The data views were not loaded immediately
When reloading the table view, the actual loading (-load) is defered
until layout is needed (generally in the next run loop). This is an
advantage because it minimize reloads but in some case it is necessary
to force a reload, for example when we need to access data views, or
manually edit a view, or when we explicitely ask for a reload.
This commit adds _reloadDataViewsImmediately and make use of it when
necessary.

Tests: AppKit/CPTableViewTest -> -testEditCell
2013-04-12 19:35:03 +02:00
cacaodev 87acd9d7ee Fixed: in some circumstances, table views binded with the content binding were not correctly reloading the data.
Test: AppKit/WithOrWithoutbinding
2013-04-12 19:23:51 +02:00
cacaodev 06391c9de6 Fixed: data views were not reloaded after a CPTableColumn setDataView:
Cell-based table views with no identifier set for the table column:
Before this commit, the caching system was asking for a view identified
by the tableColumn UID. If the table column data view was changed
externaly, the previoulsy cached data views were loaded instead of the
new ones. The views are now identified by the -dataview UID.

Test: AppKit/TableTest -testLayout were a custom data view is set.
2013-04-12 19:21:16 +02:00
cacaodev b42b41216b Remove old code. Adds Equality check in -setDataView: 2013-04-12 19:08:27 +02:00
Andrew Hankinson cc9ff15142 Fixed: Removing an item from a menu also removes its highlight state
Previously when a menu item was instantiated outside of the context of the menu itself, its highlight state was maintained even after it was removed from the menu. If the menu was dismissed with the item highlighted, and then the item was used in another menu (e.g., re-added to a context menu for a table row) it would appear highlighted, even though the menu highlight index was not set.

This commit ensures that when removing items from a menu that the highlight state of the underlying view is set to NO as well.

Tests for this behaviour are included as well.

Fixes #1899
2013-04-10 00:04:53 -04:00
Andrew Hankinson 100f1b0b41 Fixed: AboutPanel is now constructed in code, rather than in a CIB
Previously the default About panel was constructed in a CIB. Additionally, an Xcode-based XIB/CIB file was constructed to replace it.

This commit creates the default About panel in code and removes the additional CIB/XIB files in the AppKit/Resources panel.
2013-04-08 19:20:37 -04:00
Aparajita Fishman d9117bd9a0 Fixed: Converter was copying too much state from Nib2Cib, framework resources could not be referenced in Xcode.
* State *
Previously the Converter class needlessly copied a whole bunch of state from the Nib2Cib class, which was not only poor factoring, but made for easy omissions of state when instantiating a new Converter, such as was done in NSNib.j.

This commit pushes all state not specific to Converter up to Nib2Cib. This allowed removal of redundant code in NSNib -NS_initWithCoder.

* Resources *
Previously it was not possible to use custom images that were located in a framework, because only the app's Resources directory was searched.

This commit automatically searches all frameworks for Resources directories. When a custom image is specified in Xcode, first the app's Resources directory is searched, then all framework Resource directories. Alternately, the specific framework to use can be specified in Xcode by using the form framework@image.

At runtime, the framework is loaded by its identifier (as specified in Info.plist), and if there is no identifier, by searching next to the current AppKit framework.

All of this renders the nib2cib -R option completely obsolete, so it was removed from the NibApplication/Jakefile template.
2013-04-08 15:48:45 -04:00
Andrew Hankinson 6ef5b46dd6 Fixed: CPTokenField sends focus and blur notifications
This commit adds notifications for focus and blur on CPTokenField.

Attached is a modified Manual CPTokenFieldTest that observes these notifications.

Fixes #1396
2013-04-07 20:50:50 -04:00
Alexander Ljungberg 8d345701da Merge pull request #1896 from ahankinson/fix-about-panel-xib
Fixed: New AboutPanel.xib replaces older CIB file
2013-04-07 23:18:48 +01:00
Alexander Ljungberg 016ed4f6ee Merge branch 'master' of github.com:cappuccino/cappuccino 2013-04-07 23:16:45 +01:00
Andrew Hankinson b1229bce1d Fixed: New AboutPanel.xib replaces older CIB file
With the death of Atlas CIB files can no longer be edited directly. This commit replaces a CIB-only version of "AppKit/Resources/AboutPanel.cib" with a XIB-derived one that can be edited in Xcode.

This commit also moves some of the formatting of the about panel into the IB file (c.f. the FIXME note).
2013-04-07 16:54:15 -04:00
Antoine Mercadal 90e11039a1 Merge branch 'CPDatePickerTarget' of https://github.com/Dogild/cappuccino into pr-1895 2013-04-05 11:40:27 -07:00
Antoine Mercadal 80d928eff2 Merge branch 'menuKeyboardNavigationFix' of https://github.com/BlairDuncan/cappuccino into pr-1894 2013-04-05 11:37:21 -07:00
Antoine Mercadal 838041ef59 Merge pull request #1872 from ahankinson/fix-tableview-method-documentation
Docs: Out of date documentation for CPTableView
2013-04-05 11:31:23 -07:00
Antoine Mercadal 35c15c90e4 Merge pull request #1890 from Dogild/MenuItemColor
Fixed: CPMenuBar theming
2013-04-05 11:28:57 -07:00
Alexandre Wilhelm 812cd463db Fixed: CPDatePicker works with action and target
Previously the CPDatePicker didn't work with the action and target. Now each time the dateValue changed, the given action is sent to the target.
This commit fix also a bug with moving with tab and the arrows. Before, the left arrow worked liked a tab when the firstElementTextField was selected in a textual CPDatePicker.

Test app in Tests/Manual/CPDatePicker.
2013-04-05 11:28:41 -07:00
Alexandre Wilhelm 090d097a53 Added action and target 2013-04-05 11:19:20 -07:00
Alexandre Wilhelm 36b337e784 Fixed bug about left moving 2013-04-05 11:13:28 -07:00
cacaodev 0a1d215560 Fixed: -reloadData: was not reloading views after a change in model rows count 2013-04-04 20:00:56 +02:00
Blair Duncan 7d0d1056c0 Fixed – Menus no longer respond to keyboard navigation
When a menu is active, menu selection should change as characters are typed.
This can be seen in the manual CPMenuTest.

It used to work in the past but with all of the changes in the last few months to the compiler I
was not able to track down the exact commit that broke it. The code responsible for
clearing the _keybuffer after a brief delay in typing, was not being called,
resulting in a build up of characters.

This commit moves the check for delay to the interpretKeyEvent and takes care of
clearing the _keybuffer itself and removes that responsibility from the selection method.
2013-04-04 12:44:15 -04:00
Aparajita Fishman 21146ff49f Fixed: scrolling CPTextField to visible would cause unexpected behavior
Previously, when a text field became the key responder, first it was scrolled to visible, then a check was made to see if the text field was completely within the platform window bounds. The scrolling to visible would unfortunately cause problems because of the interaction between the blur handler in text fields and controls that can be clicked without becoming first responder.

This commit completely forbids text fields from becoming first responder if they are not completely within the platform window. That eliminates any possibility of unwanted browser scrolling of the text field.
2013-04-02 12:06:32 -04:00
Antoine Mercadal b76eedfc0e Merge pull request #1884 from Dogild/CPDatePickerSupport
New: CPDatePicker Support
2013-04-01 18:01:42 -07:00
Alexandre Wilhelm c547117223 Removed comments 2013-04-01 14:37:53 -07:00
Antoine Mercadal fc2132485d Merge branch 'CPMenuGhost' of https://github.com/Dogild/cappuccino into pr-1891 2013-04-01 14:26:47 -07:00
Alexandre Wilhelm 71cc825038 Fixed: CPMenu ghost his fixed #1887
Fixed the bug about ghost menu after several right click
2013-04-01 13:28:30 -07:00
Antoine Mercadal 59d1da77c2 Fixed: setting CPNullPlaceholderBindingOption in binding was setting the value
This commit fix a bug where declaring the binding option CPNullPlaceholderBindingOption was actually setting the
actual value of a text field instead of just its placeholder. This commit adds a test to determine if the binding source
implements setPlaceholderString:. In that case, we let the value to be nil.
2013-04-01 12:47:00 -07:00
cacaodev 44b6136ce2 Fixed CPOutlineView dragging column subclassing 2013-04-01 20:11:02 +02:00
cacaodev ba3c6023a8 Fixed CPOutlineView subclassing when settting CPThemeStateSelectedDataView 2013-04-01 20:11:02 +02:00
cacaodev be7f6ae7d1 Fixed CPOutlineView -reloadData and _layoutViewsForRowIndexes:columnIndexes: subclassing. 2013-04-01 20:11:02 +02:00
cacaodev 984c7a67f5 Fixed: -moveColumn:to: now preserve selected columns
Fixed: Starting a column drag is now faster.
Fixed: When dragging a selected column, selection is now drawn on the dragging view and the cursor is the closed hand.
Fixed: When dragging a table column, underlying columns were sliding according to the tracking location instead of the column lateral edges.
Fixed: In CPTableView, the drop indicator for rows could appear when dragging a column.

This commit creates directly the dragging column instead of relying on
built-in drag&drop. Also fixes a bug where the drop indicator would appear when
dragging a column if some rows were previously drag&dropped.
2013-04-01 20:08:37 +02:00
cacaodev a4bf6c1f7a Fixed: selectColumnIndexes:byExtendingSelection: returns early when there is no change in columns selection
Before this change, rows could be unselected even if the columns
selection did not change.
2013-04-01 20:08:36 +02:00
cacaodev 690ae1a7b6 Fixed: noteHeightOfRowsWithIndexesChanged: was not showing immediatly row height changes.
Todo: instead of reloading everything we should be able to just
relayout frames for visible views and then tile.
2013-04-01 19:52:37 +02:00
cacaodev eae9a10a7d Fixed: editingColumn and editingRow return the correct index in view based tables
Fixed: An edited view no longer send its action (view-based) or commit its object value (cell-based) when unexposed.
Fixed: Cell based tables support for editing any control, not just textfield and buttons.
2013-04-01 19:52:30 +02:00
cacaodev 7c6765b969 Fixed: After drag, views were cached.
This commit reverts #1478. It appears it is a bad idea to enqueue
visible views. The views generally stay in the cache forever and they
are repeatedly asked to be removed from the table at each load, causing
a performance penalty.
2013-04-01 19:50:41 +02:00
cacaodev a6c143a1c7 Fixed: -reloadDataForRowsIndexes:columnIndexes: behavior.
Fixed: Column dragging performance, content binding performance.

After this commit, -reloadDataForRowsIndexes:columnIndexes: reloads the data and the data only.
The -reloadData method no longer tries to reuse the views, instead it just reloads the data for visible views.
To flush and reload the views cache for visible rows, use _reloadDataViews.
To internaly layout the views geometry, use _layouViewsForRowIndexes:columnIndexes:

In CPTableView dragging column code, relayout the views whose frame changed instead of reloading everything.
2013-04-01 19:50:41 +02:00
cacaodev 714da0ab3b New: -enumerateAvailableViewsUsingBlock: and private -_enumerateViewsInRows:columns:usingBlock: and -_enumerateViewsInRows:tableColumns:usingBlock: methods.
New: preparedViewAtColumn:row:

These methods allow to enumerate visible data views or data views in specified columns and rows.
-enumerateAvailableViewsUsingBlock: is the counterpart of cocoa's -enumerateAvailableRowViewsUsingBlock: except that it enumerates data views instead of CPTableRowView and the block has an additional column parameter.

This commit reverses the way views are stored and accessed in the table view: rows>columns instead of columns>rows.
Applied the second method where it is relevant, making the code more compact and readable.
2013-04-01 19:49:41 +02:00
Alexandre Wilhelm c6a59d7c59 Fixed: CPMenuBar theming
Previously it wasn't possible to theme the main menu of the app. With this fix the user can either theme the main menu with the theming system or with the method +setMenuBarAttributes from CPMenu.
2013-03-31 23:31:02 -07:00
Saikat Chakrabarti aa0602dcbb Fix a memory leak in _CPImageAndTextView.j 2013-03-30 21:52:17 -07:00
Antoine Mercadal 6d0caacdeb Fixed: setAnimates: for CPPopover doesn't get forwarded to _CPPopoverWindow.
Without this fix, using setAnimates: on a popover would only be applied after closing/reopening of the popover.
2013-03-28 15:18:46 -07:00
Andrew Hankinson 792a72af74 Fixed: Themed text values set via a single variable
Previously, the themed text values for controls were set directly on the control, which made modifying the theme values for text consistently across the controls difficult.

This commit introduces several file-scoped variables that are used to set the text colour, the disabled text colour for both regular and default controls, as well as a consistent text shadow colour for each of these as well.
2013-03-28 13:35:09 -04:00
Andrew Hankinson 8fee6578c2 Fixed: Minor typo in CPWindow comment 2013-03-28 10:36:46 -04:00
Andrew Hankinson 6d843e6aab Fixed: Removed duplicated method in CPToolbar
CPToolbar setDisplayMode has been implemented (L246). This commit removes a duplicate empty method that says it has not been implemented.
2013-03-28 10:19:08 -04:00
Alexandre Wilhelm 27bb85bb00 Fixed bug about firstResponder. Fixed bug about current date when changing the month (to pass from the 31 to 30) 2013-03-27 11:23:20 -07:00
Andrew Hankinson 3d0bde6763 Stepper disabled graphics update 2013-03-27 00:20:20 -04:00
Andrew Hankinson 11f509933e Typos 2013-03-26 23:40:19 -04:00