Commit Graph
1440 Commits
Author SHA1 Message Date
Alexander Ljungberg 7c6ef51cb2 New: CPDate dateByAddingTimeInterval:.
Refs #2126.
2014-06-03 17:41:35 +01:00
Alexander Ljungberg f151920404 Fixed: table view selection text colour in Aristo 1.
This is the same fix as in a4702d48b4 but applied to Aristo 1.

Refs #2009, refs #2001.
2014-05-12 16:04:00 +01:00
Alexander Ljungberg 02f36a1abe New: theme kitchen sink manual test to exercise many themable controls in many states at once.
This test makes it easier to verify themes and theme tweaks.
2014-05-12 15:22:39 +01:00
Alexander Ljungberg ba27a4cc4a Fixed: new first responder and key window theme states not always applied. 2014-05-12 15:17:49 +01:00
Alexander Ljungberg 025a43ea4e New: CPThemeStateKeyWindow for CPView.
Every view in the key window now takes on the 'key window' theme state. This makes it easy to theme everything in inactive windows in more muted colours. Also, combined with the first responder theme state of the previous commit we can have visuals like "first responder but in an inactive window" for text views and such things.
2014-05-11 15:51:17 +01:00
Alexander Ljungberg 050fcf2ab8 New: CPThemeStateFirstResponder for CPView.
When a CPView becomes the first responder it now takes on the 'first responder' theme state, as does all its subviews. This allows it to naturally change appearance when it has the keyboard focus, such as with focus rings and brighter colour schemes.
2014-05-11 15:48:37 +01:00
Alexander Ljungberg c9642fcf35 Test: CPLevelIndicatorTest.
Refs #2071.
2014-05-09 23:24:50 +01:00
Alexander Ljungberg 79c257642c New: visual test for warning/critical state in CPLevelIndicator.
This change makes sure there is both a level indicator which goes into warning and critical display mode for low levels and one which goes into the same for high levels in the manual test for level indicator.

Refs #2071.
2014-05-09 23:04:02 +01:00
Alexander Ljungberg b5f9501001 Test: CPObject isSubclassOfClass. 2014-04-16 23:01:17 +01:00
Antoine Mercadal 7ac37b75f3 Merge pull request #2097 from Asriwi/fix-textfield-placeholder
Fixed: show placeholder string while editing empty CPTextField
2014-04-03 10:50:05 -07:00
Antoine Mercadal c6bd758793 Merge pull request #2087 from Dogild/CPAnimationDelegateProtocol
New: Added protocol CPAnimationDelegate
2014-04-03 10:40:07 -07:00
Alexander Ljungberg 1b351ad5bb New: + CPColor checkerBoardColor for debug use.
This color has a standard 'transparency' checkerboard pattern which is especially useful for our scrolling tests where it makes scrolling easy to visualise.

Refs #2078, #2079.
2014-04-03 11:38:11 +01:00
Alexandre Wilhelm 104761d064 Fixed: AppController of CPAnimationTest does not implement protocol CPAnimationDelegate 2014-03-27 12:21:38 -07:00
Alexandre Wilhelm 7ccdc50637 New: Added protocol CPAnimationDelegate
Added protocol CPAnimationDelegate.
Also, now, delegate methods are called as we are used to do it in Cappuccino

Test app in Tests/Manual/CPAnimationTest.
2014-03-27 12:11:22 -07:00
Ashley Williams d5c48567b3 Test: added manual test case to check for placeholder.
Refs #2049
2014-03-23 17:05:57 -07:00
Alexander Ljungberg d51f179c2d Fixed: error when running some XML tests with rhino.
This problem causes error in Travis that are not errors with JSC.
2014-03-10 22:44:00 +00:00
Saikat Chakrabarti 647686e68e Fix CPViewTest 2014-03-10 12:17:23 -07:00
Saikat Chakrabarti 45df8c0f74 Fix bug with unsetThemeState + more tests. 2014-03-09 15:15:11 -07:00
Alexander Ljungberg 633445883e Test: CFPropertyList.propertyListFromXML.
These tests validate some basic edge cases with the parsing of XML plists.

Refs #2051.
2014-03-06 14:09:18 +00:00
Alexander Ljungberg e6acc3c336 Fixed: missing var, minor tweaks.
Refs #2073.
2014-03-06 14:03:46 +00:00
Saikat Chakrabarti 2fd8940c02 Allow array arguments to various methods that take ThemeStates 2014-03-01 23:11:24 -08:00
Saikat Chakrabarti 68952b273b Add a bunch of unit tests for CPTheme.j 2014-02-21 14:30:09 -08:00
Saikat Chakrabarti 8b2f2fe24d Add new unit tests for CPView 2014-02-21 13:11:08 -08:00
Saikat Chakrabarti 7d304fbd51 First round of changes to change theming system to use arrays and not bitmasks as their underlying datatype 2014-02-20 17:30:27 -08:00
Alexander Ljungberg c6dd18ce40 Fixed: typo. 2014-02-13 12:41:20 +00:00
Alexander Ljungberg a31ad2c367 Fixed: CPAttributedString isEqual: despite attribute differences.
As soon as a range reached the end of the string the equality test would end with a YES, without even comparing the final attribute dict.
2014-02-13 12:41:14 +00:00
Alexander Ljungberg 7e20422e20 Test: CPAttributedString coding. 2014-02-13 12:17:55 +00:00
Alexander Ljungberg f72119f1b6 Formatting: CPAttributedStringTest.
Refs #2045.
2014-02-12 21:57:44 +00:00
daboe01andAlexander Ljungberg a34ae45b05 formatting 2014-02-12 21:57:44 +00:00
daboe01andAlexander Ljungberg c2534ae6da unit-tests + simplification 2014-02-12 21:57:44 +00:00
cacaodev 93b48ba973 Fixed: support for dates (CPDatePicker) in CPPredicateEditor
Before this commit, row templates and views belo,ging to them were copied via archiving/unarchiving.
This was causing problems when the view was not completely CPCoding compliant, like for CPDatePicker.

With this commit, template views use CPCopying (-copy method) when available.
Also added CPCopying for CPDatePicker as a category in CPPredicateEditor.

Test: in CPPredicateEditorTest, on the right panel, choose a keypath, operator, and select 'Dates' in the popup for the right expression.

Fixes #2041
2014-01-17 10:49:52 +01:00
Antoine Mercadal 4622600ab0 Merge pull request #2031 from Dogild/protocolTableView
New : Added protocols CPTableViewDelegate and CPTableViewDataSource
2014-01-14 14:47:39 -08:00
Alexandre Wilhelm e822966464 Fixed: removed unused test case 2013-12-10 11:00:47 -08:00
Alexander Ljungberg 2fc501fe59 Fixed: CPDateFormatter stringFromDate:"" did not return a default date.
In Cocoa formatting an empty string actually results in a particular date. For consistency we should handle an empty string the same way.

Refs #2030.
2013-12-09 16:58:55 +00:00
Alexander Ljungberg 21aac76ba2 Fixed: CPDateFormatter getObjectValue: with nil errorDescription crash.
Like for all formatters, a nil errorDescription just means we don't care about the error description if there is an error.

Fixes #2030.
2013-12-09 16:39:53 +00:00
Alexandre Wilhelm 7b86465d7b New : Added protocols CPTableViewDelegate and CPTableViewDataSource
This PR adds protocols CPTableViewDelegate and CPTableViewDataSource

Unit test in Tests/AppKit/CPTableViewTest.j
2013-12-08 17:48:41 -08:00
Alexander Ljungberg c1f538ece5 Formatting: whitespace.
Refs #1974.
2013-11-28 18:39:01 +00:00
Martin Carlberg e511638962 Fixed: Cleaned up return and parameter types on methods. 2013-11-24 22:21:56 +01:00
Martin Carlberg 8419001810 Merge branch 'master' of https://github.com/cappuccino/cappuccino into protocol 2013-11-22 14:23:52 +01:00
Antoine Mercadal 985db21ed9 Merge pull request #1990 from spebbe/cpanimation_frame_rate
CPAnimation frame rate fixes.
2013-11-18 16:20:29 -08:00
Alexander Ljungberg 6cbfa30652 Fixed: view coordinate conversion broken by previous commit.
Without this fix, -CPView convertPoint:fromView was broken due to the changes made in #1998. In particular, the transform for the fromView would be calculated and then just thrown away if the views were in the same window. This happened to work in some specific cases and the lack of unit tests concealed the error.

This fix properly applies the transforms when two views are in the same window without one of them necessarily being inside the other.

Refs #1998.
2013-11-04 00:03:31 +00:00
Antoine Mercadal 2508fa7a97 Merge pull request #1998 from Dogild/scaling-support
New: Added support for scaling in CPView
2013-10-29 12:54:12 -07:00
Antoine Mercadal 0b351ac2d7 Merge pull request #2011 from Dogild/CPTextMovements
New: Added Movement Codes for CPTextDidEndEditingNotification
2013-10-29 11:27:17 -07:00
Antoine Mercadal 6e7fc5c887 Merge pull request #2008 from Dogild/souldSelectTableColumnFix
Fixed: shouldSelectTableColumn isn't called in CPTableView and CPOutlineView
2013-10-29 11:22:01 -07:00
Alexander Ljungberg d3ab2a0f3d New: "//site.com/x" style URL support in CPURL and CFURL.
With this feature, CFURL and CPURL can now correctly transform a relative scheme URL starting with a double-slash.

For example, + CPURL URLWithString:@"//a.se/a" relativeToURL:@"ftp://b.se/c" would represent an absolute URL of "ftp://a.se/a".
2013-10-29 15:03:37 +00:00
Alexandre Wilhelm ebc1025fd9 New: Added Movement Codes for CPTextDidEndEditingNotification
This PR adds a new feature for CPControl. Now when leaving the control, the userInfo of the notification CPTextDidEndEditingNotification contains the last movements of the control as in COCOA

Test app in Tests/Manual/CPTextFieldMovementsTest
2013-10-29 01:20:00 -07:00
Alexandre Wilhelm c22f489ee9 Fixed: shouldSelectTableColumn isn't called in CPTableView and CPOutlineView
Previously shouldSelectTableColumn wasn't called in CPTableView and CPOutlineView.
This PR resolves this issue, shouldSelectTableColumn is now called between selectionShouldChangeInTableView and tableViewSelectionIsChanging as in COCOA.

Test app Tests/Manual/TableTest/DelegateSelectionTest/
2013-10-24 22:13:35 -07:00
Alexandre Wilhelm 4b8a6ee674 Fixed: shouldSelectRow was called with selectionIndexesForProposedSelection
Previously the method shouldSelectRow was called even it's the method selectionIndexesForProposedSelection was implemented by the delegate. Now it works as in Cocoa.
The method selectionIndexesForProposedSelection is called when it has to be called, like in Cocoa.
This PR adds new methods to check and call the delegate/datasource methods more easily

Test app in Tests/Manual/TableTest/DelegateSelectionTest/
2013-10-17 14:26:19 -07:00
Antoine Mercadal b2dc9c225c Merge pull request #1999 from Dogild/delegate-CPTableView-Methods
Fixed: Delegate method of CPTableView aren't call in the good order
2013-10-16 16:28:48 -07:00
Antoine Mercadal 86e94178e3 Merge branch 'master' of https://github.com/cappuccino/cappuccino 2013-10-16 16:10:11 -07:00