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.
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
Before this fix: environment variables defined `.travis.yml` were still
dependant of internal configuration of the travis worker virtual
machine. See also previous pull request #1728.
With this fix, `.travis.yml` is even more generic and portable.
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.
This is a second attempt to fix the problems addressed by 69bbe627a9.
Because table cell classes needed to use the same initialization code as the NS_initWithCoder methods, it was necessary to refactor the initialization code into separate NS_initWithCell methods and call them separately from NS_initWithCoder.
Originally the initializer had coerced the parameter to a string, even though it is clearly documented that it should be a string. A later commit removed that coercion.
This commit reinstates the type coercion and thus saves the world from those who would pass non-string types in a parameter that says "withString".
The Javascript .apply() method takes two arguments: A context argument and an array of values. In CPWebScriptObject callWebScriptMethod:withArguments, only an array of arguments was passed to the .apply() method.
This fix inserts `this` as the first argument, and the array of arguments as the second. This has been converted to a pull request from the original issue (#1184)
The original issue also suggested a fix for handling namespaces, which are not incorporated in this patch.
Previously CPAttributedString did not provide an -init method,
with the result that an attributed string created with [[CPAttributedString alloc] init]
would not be correctly initialized.
Also, some methods that took indexes into the string were not checking for an invalid index and were not raising exceptions when the documentation said they should.
Finally, some methods that were supposed to return empty dictionaries were returning nil.
This commit fixes all of these problems. Empty strings should no longer cause errors.
Closes#533
Not clear why this worked before but not now. This fix makes sense regardless.
Without this fix, clicks would not be sent through to the token field menu because its window wasn't the key window.
This fix makes the autocomplete menu declare it does not need to and does not want to become the key window.
Fixes#1807.
Without this fix, grey lines were showing in the background of token field autocomplete menus in recent versions.
This fix removes the grid lines which were never intended to be there to begin with.
Fixes#1806.
Previously, table view cells (non-view-based) were not being decoded with all of the available cell attributes in IB, and many attributes were hard-coded. In addition, there was a bunch of initialization code that has been made redundant by theming.
With this commit, decoding of all control classes has been refactored so that table view cells can use the same code, thus ensuring they decode all available cell attributes. In addition, the redundant code has been eliminated.
It is now possible to apply most table cell attributes such as font, color, alignment, sendsActionOnEndEditing, and so on, directly in IB.
Closes#1803
BREAKING CHANGE:
Changes have been made to table cell decoding in nib2cib. All xibs should be re-converted with `find . -name '*.xib' -exec nib2cib {} \;`.
Without this fix, CGPathMoveToPoint would not actually move to the point if there had been at least one previous CGPath command (a current path existed) but it was not a move to point command.
This fix ensures move to point is effective in all cases.
Fixes#1801.
This fix adds a little more intelligence to the bootstrap.sh script.
If a user is using ZSH or BASH it will recognize those and append to the appropriate config file, creating .profile if necessary.
If the user's shell cannot be read from the $SHELL variable, it will attempt to find the first suitable configuration file in the user's home directory. If none can be found, it will create .profile.
This was based off the Wikipedia article on Unix shells and the configuration files they will read. The only shells that are not supported by this patch should be csh and tcsh.
The implementation of CGPathEqualToPath did not compare all of the subpath types now supported by CGPath. In addition, it referred to subpath properties that no longer exist.
The implementation now compares all properties of all supported subpath types.
Closes#1246
Previously CPCollectionView supported a delegate method collectionViewDidChangeSelection:, which is not defined in Cocoa. Since CPCollectionView is KVO-compliant for selectionIndexes, this delegate method is no longer necessary and is a needless divergence from Cocoa.
The method is now marked as deprecated, and when used will log a deprecation warning.
Closes#715
Previously setContent: was called first, before the rest of the object was initialized. This potentially could have unexpected results because setContent has many side effects.
This commit waits until the object is completely initialized before calling setContent.
In Cocoa, viewWillMoveToSuperview: and viewDidMoveToSuperview: are called when views are instantiated from code or from a nib.
Previously in Cappuccino, when a view was instantiated from a cib, the _subviews of the view were directly set from the decoded subview array. This short-circuited all of the normal notifications a view receives when added to a superview, including viewWillMoveToSuperview: and viewDidMoveToSuperview:. As a result, some views that override these methods, such as CPSearchField, were not set up correctly when instantiated from a cib.
With this commit, subviews instantiated from a cib are manually added to their superview, thus ensuring they go through the same cycle as views instantiated from code, and ensuring that viewWillMoveToSuperview: and viewDidMoveToSuperview: are called.
Closes#1699
Previously, the content view of almost all window types
could overlap the frame of the window.
This is a follow on to b28429f which insets the content view
from the frame for all relevant window types.
Refs #1798
Previously, _CPStandardWindowView did not inset the content view rect
from the window frame, thus its contents could overlap the window frame.
Now the content view is correctly inset so that content view content
is clipped to the window frame, except for the corners. Because the
corners are round and the window frame is a background color, they
can still be overlapped. this will be fixed in a later commit.
Closes#1798