Previously, setting a CPComboBox to disabled would not dim the text. This commit fixes the theme state to include a setting for the text colour and text shadow colour.
Previously some disabled controls would be set with an opacity of 0.35, which resulted in controls that were visually too light.
This commit changes the default disabled opacity to 0.5.
Refs #1788
Previously, the enabled/disabled control for NSTextField in Interface Builder was ignored by nib2cib.
This change allows the enabled/disabled state on CPTextField to be set in interface builder.
Previously the Aristo2 checkboxes used dedicated images for disabled controls.
This commit removes the disabled controls and allows the disabled state to be set via CSS opacity on the "regular" checkbox controls.
Previously the Aristo2 checkboxes used dedicated images for disabled controls.
This commit removes the disabled controls and allows the disabled state to be set via CSS opacity on the "regular" checkbox controls.
Previously, when
- Dragging a row in the rule editor
would eventually try to generate a dictionary with key 'indexes' and a
nil value in the method __postRowCountChangedNotificationOfType:indexes:.
Generating an empty dictionary instead when there is no indexes solves
this issue.
Previously, NSNib would create a Converter instance for converting table cell views. Unfortunately Converter did not expect to be instantiated more than once, and the singleton SharedConverter was unconditionally being set in the initializer. This might not have caused problems, except that NSNib did not copy all of the shared Converter's state to the copy, especially the resource path, which caused custom images in table cell views to fail.
This commit correctly ensures that the shared Converter instance is set only once, and also copies all of the shared Converter state to the instance that is used for converting the table cell view.
Long ago it was required to use the -R option with nib2cib if custom images were used. nib2cib now infers the resource path, so there will always be at least a default resource path. Thus the check for no resource path was unnecessary.
This commit removes that check.
Previously, if properties were bound to table columns in a cell-based table, and an object was added/inserted using CPArrayController, a warning was generated about a missing observer.
This commit is a temporary fix, the real fix is to implement more granular notifications during didChangeValueForKey:, which will eliminate the source of this problem.
Fixes#1781.
Previously, when a view-based table:
- Had no delegate.
- Used bindings for its data source, thus obviating the need for makeViewWithIdentifier:owner:.
it would eventually call CPCib -instantiateCibWithOwner:topLevelObjects: with a nil owner (the nil table delegate). This method would try to construct a dictionary with the nil owner, which would generate a deprecation warning, and will in the future fail altogether.
In Cocoa, this is exactly what happens, the owner is nil. And the documentation for -instantiateNibWithOwner:topLevelObjects: clearly states that the owner may be nil.
This commit only adds the owner to the name table dictionary if the owner is non-nil. Since objectForKey: with a non-existent key returns nil, this is the same as storing nil for that key.
For example, in CPTableView before this change, dragged rows could not move up if the table view was near the top of the platform window.
Fixes#1877
Test TableTest/ViewBasedCib/ and drag up the third row.
This bug appears only if a table view have been added to the window.
CPTableView observes first responder changes and moves up in the view
hierarchy to determine the edited data view. If for some reason, a
superview in the hierarchy was nil, we entered an infinite loop.
This commit adds guards to the recursive method that searches the data
view. Also added an early return when the fr changes to a view outside
the table.
Fixes#1875
Previously, CPArray did not allow binding to the collection operator @count. In Cocoa this is allowed.
This commit allow the key path @count to be observed, so that @count can be bound to.
Formatting fixes as well.
Previously, XCC would indiscriminately add files to the Xcode project via the pbxprojModifier.py script. This resulted in duplicate references to a file.
This fix adds a check to see if the file is already included in the project's sourceGroup folder, and will return None if it is.
Fixes#1866
In this commit I've added the currentDocument method to the document controller
Also removed the firstEligibleExistingWindowController method from CPDocument
It did nothing but add confusion as it was not used anywhere else in the frameworks.
And it is not in cocoa.
Example:
#define first Martin
#define second Carlberg
var first##second = 13;
Compiles to:
var MartinCarlberg = 13;
Example 2:
#define _function(inline) function inline { return _##inline; }
#define _CGPointMake(x_, y_) { x:x_, y:y_ }
_function(CGPointMake(x, y))
Compiles to:
function CGPointMake (x, y) {
return {x: x, y: y};
}
Previously, passing nil to the first or last argument of getLineDash:count:phase: would cause a crash.
With this change, these references are simply not written to if nil.
Previously, setLineDash:count:phase: took references for its arguments to match getLineDash:count:phase:. This was however wrong and is not what is done in Cocoa.
This fix makes the setLineDash:count:phase: calling convention the same as in Cocoa.
This fix should in theory make the phase argument work in Firefox, although in Firefox 19.0.2 it doesn't seem to work. Hopefully it'll kick in in a future version of Firefox.