Commit Graph
8745 Commits
Author SHA1 Message Date
Alexandre Wilhelm ab61aef985 Merge pull request #2371 from primalmotion/CPVisualEffectView
CPVisualEffectView & CPAppearance
2015-08-18 15:15:03 -07:00
Alexandre Wilhelm 1f57aa1ea5 Merge branch 'master' of https://github.com/cappuccino/cappuccino 2015-08-16 15:44:01 -07:00
Alexandre Wilhelm 340d827377 Fixed: command cmd+h did not work for the new XcodeCapp 2015-08-16 15:43:56 -07:00
Antoine Mercadal 5cd25e24e4 Merge pull request #2369 from tancred/preserve_boolean_type_when_parsing_predicate_constant_value_expressions
Fixed: preserve type of boolean values when parsing CPPredicate format
2015-08-14 13:55:18 -07:00
Antoine Mercadal 58afc92a26 Merge pull request #2370 from Dogild/new-cache-timeout-urlrequest
New: added timeout and cache feature in CPURLRequest
2015-08-14 13:51:20 -07:00
Alexandre Wilhelm acb9931fe6 Fixed: not possible to to synchrone request and set a timeout 2015-08-14 13:28:27 -07:00
Alexandre Wilhelm d4b035ac1a Fixed: style in CPURLConnection.j CPURLRequest.j CFHTTPRequest.js 2015-08-14 12:40:22 -07:00
Antoine Mercadal 403dd5c005 Updated CPVisualEffectViewTest
The test now show how to use the automatic theme state beased on
CPAppearance
2015-08-14 01:45:19 -07:00
Antoine Mercadal 7e4e1ec68f FIXED: lot's of error with CPAppearance 2015-08-14 01:44:22 -07:00
Antoine Mercadal 547764e3c1 FIXED: Always call [super awakeFromCib] in CPView subclasses 2015-08-14 01:43:55 -07:00
Antoine Mercadal 541a7974e0 NEW: effectiveAppearance and new CPThemeState
Each default (and only supported) CPAppearance now have an associated
theme state. As the appearance is correctly propagated in CPViews
hierarchy, it is now possible to have dark controls when the an
ancestor view has a dark appearance.

Added automated tests
2015-08-13 23:40:27 -07:00
Antoine Mercadal 6bf6f82cad Small refactoring 2015-08-13 21:29:33 -07:00
Antoine Mercadal 7be2325a95 Fix few mistakes 2015-08-13 21:12:04 -07:00
Antoine Mercadal fa1f739458 NEW: Support for basic CPVisualEffectView
This patch contains a very naive implementation of the
NSVisualEffectView. This will only work on very recent unreleased
version of Safari, but should be supported by all at some point. This
allow to use the Yosemite/iOS blurry effect.

Not all options are supported (especially the
`CPVisualEffectBlendingModeBehindWindow` mode…). But hey! it’s a start
:)

Tests in Manual/CPVisualEffectViewTest
2015-08-13 20:53:53 -07:00
Antoine Mercadal 20289ff81b fix two small bugs in CPApperance 2015-08-13 20:25:45 -07:00
Antoine Mercadal 6d67d30aee NEW: Initial support for CPAppearance
This patch adds the `CPAppearance` class and uses it where needed.
There is nearly no impact, but in `_CPPopoverWindowView` where the
`CPPopoverAppearance` needs to be converted to a `CPAppearance` object

nib2cib support has also been added.

*This patch brings no new functionality.*
2015-08-13 19:56:10 -07:00
Alexandre Wilhelm bd0bd2e087 New: added timeout and cache feature in CPURLRequest
This PR adds the possibility to set the timeout and the cache policy of a CPURLRequest.
For that, there are new things in the framework :

- CFHTTPRequest has now the functions setTimeout(), getTimeout() and isTimeoutRequest
- CPURLRequest has now the methods +requestWithURL:cachePolicy:timeoutInterval: and -initWithURL:cachePolicy:timeoutInterval:
- CPURLConnection does not call the delegate didReceiveData: when a request has timed out. I will call the delegate didFailWithError:
- Cache is now possible for a CPURLRequest, only CPURLRequestReturnCacheDataElseLoad, CPURLRequestReturnCacheDataDontLoad and CPURLRequestReloadIgnoringLocalCacheData are supported. By default CPURLRequestReloadIgnoringLocalCacheData.
- Default timeout has been set to 60sec as in cocoa.
- A request is considered as timeout when there isn't any response (text/xml/type) and when the status of the response is 0.
2015-08-13 17:08:59 -07:00
Antoine Mercadal 3d79799450 Do not fail Cappuccino installation if XcodeCapp build fails 2015-08-13 12:13:38 -07:00
Alexandre Wilhelm c99f9205b7 Merge pull request #2367 from primalmotion/xcodecapp4.0
Xcodecapp4.0
2015-08-12 11:26:55 -07:00
Malte Tancred 26bb54472f Fixed: preserve type of boolean values when parsing CPPredicate format
When parsing a predicate format that contains a constant boolean expression
(e.g., 'key = YES') the value of the returned constant value expression has
the wrong type. Instead of using native types as values, the parser uses
[CPNumber +numberWithBool:].

This commit changes the format parser (CPPredicateScanner) to use native
booleans for constant value expression.

There's a test case that checks the parse result and an additional test
that ensures boolean expressions evaluate as expected with different kinds
of objects. The latter test passed before the fix but was added to ensure
compliance with Cocoa.
2015-08-12 17:05:56 +02:00
Antoine Mercadal d317744f05 Update pbxproj to auto deploy 2015-08-04 10:43:59 -07:00
Antoine Mercadal 47611b7615 NEW: XcodeCapp 4.0
XcodeCapp 4.0 is a major release of our beloved tool. In a nutshell it:

- allows to manage multiple projects simultaneously
- allows to follow operations and cancel them
- has a per project Error and Warning reporting
- supports capp_env as you can define additional paths and objj include path per project
- much more things
2015-08-04 10:35:23 -07:00
Antoine Mercadal 6420a51dd0 FIXED: crash when a cell based table view contains a dataview that contains an editable text field
Previously, CPTableView was listening to all end editing notifications in cell-based mode.
This caused a crash if the textfield is an actually subview of a dataview.

This patch ensures to listen only editing did end notification for direct subview of tableView.
2015-08-03 15:00:04 -07:00
Antoine Mercadal 7c17d5bac0 Merge branch 'master' of https://github.com/cappuccino/cappuccino 2015-08-03 14:57:15 -07:00
Antoine Mercadal 0efd7c93c5 FIXED: Fonts from IB not correctly interpreted in OSX El Capitain
This patch adds support for the new way of defining the default font from Xcode 7 beta. The patch also supports the old explicit 'Lucida Grande' of previous version.
2015-07-29 23:39:07 -07:00
Alexandre Wilhelm 806be9551c New: added protocol CPURLConnectionDelegate 2015-07-23 14:38:06 -07:00
Alexandre Wilhelm 6b4a1b6758 New: Added gitter link in the readme
New: Added gitter link in the readme
2015-07-15 15:42:07 -07:00
Antoine Mercadal d6b0fccbda FIXED: Previous patch by @dogild was not correctly setting the CSS class
This patch adds a reference to the current CSS selectable field in and
reset the style when user clicks on a different one.
2015-07-08 15:35:20 -07:00
Alexandre Wilhelm d1e31da2e5 Fixed: selection did not work in Cappuccino when doing a right click or dragging
Previously, the selection of a textField did not work as expected when the user did a right click or a drag even if the label was set to none selectable.
Now, with the css style user-select, a textField can only be selected if it is selectable and enable.

Credit to @primalmotion
2015-07-08 13:34:57 -07:00
Alexandre Wilhelm 923d32ee6d Test: finally put the init of the CPApplication in the instance method setUp. See previous commit #6fe9dae3d62af995f2481bfebdd706aeb0b21365 2015-07-07 15:04:29 -07:00
Alexandre Wilhelm 6fe9dae3d6 Fixed: AppKit unit-tests are not standalone
Previously, every AppKit tests used the same sharedApplication. Due to this implementation, a could not pass because a previous test made failed the current test. For instance, a test could fail because the window of the previous test resigned (just imagine a new window is the key window in the current test), and this resign could raise an error. The error was displayed for the current test thought this test was perfect !

We now instead of using sharedApplication create a new CPApplication per unit-test file in the class method setUp.
2015-07-07 14:12:19 -07:00
Alexandre Wilhelm 4c1e22b0f6 Fixed: travis failed because the unittests tried to display a layer
Previously, the unittests for the CPDatePicker broke the tests suite of cappuccino. A CPDatePicker uses a CALayer, and the CALayer display methods wasn't wrap in a #if PLATFOrM(DOM). Now it does, so during the tests we do not try to access do the element document anymore.

This PR fixes also some warnings when compiling.
2015-07-06 14:14:39 -07:00
Alexandre Wilhelm 058a73f8a0 New: added delegate methods applicationShouldTerminate and applicationShouldTerminateMessage
This PR adds the delegate methods applicationShouldTerminate and applicationShouldTerminateMessage in CPApplicationDelegateProtocol.

The delegate applicationShouldTerminate does not exactly work as in Cocoa. In Cocoa, this method is called in CPApp -terminate, but in cappuccino it is called in the method onbeforeunload of the window. In JS, this is the only time where we can prevent to reload the HTML page. If the developer cancel to reload the page, the browser will ask the user if he wants to reload or not the page thought (natural behavior of js).

The method applicationShouldTerminateMessage allows you to define what will be the text displayed in the confirmation alert.

Test app in Tests/Manual/CPPlatformWindow/
2015-07-02 16:35:35 -07:00
Alexandre Wilhelm 1ad8d34ecb Fixed: fixed travis with datePicker test 2015-07-02 15:12:18 -07:00
Alexandre Wilhelm 3f9f926c8e New: added method closeAllPlatformWindows in CPPlatform
Added the method closeAllPlatformWindows in CPPlatform. This platform close all platform windows of the application (except the main one). This method is now used when reloading or leaving a cappuccino application, the application will now close every external window openend by the application.
2015-07-02 13:41:37 -07:00
Alexandre Wilhelm 1f983db47c Fixed: refactoring of the class _CPDatePickerTextField.j. We now use the method called by interpreteKeyEvents instead of handling the key equivalent in performKeyEquivalent 2015-06-29 14:28:28 -07:00
Alexandre Wilhelm 3a6a84917b New: added CPUserNotification and CPUserNotificationCenter in Foundation
This PR adds the features CPUserNotification and CPUserNotificationCenter in Foundation.
The CPUserNotificationCenter allows you to send user notification to the system.
Right now, we only propose what the W3C proposes. We can set for a notification the title, informativeText and the icon.
We only support local notification yet.

The protocol CPUserNotificationCenterDelegate has been added as well.

Test app in Tests/Manual/CPUserNotificationTest
2015-06-26 16:36:11 -07:00
Alexandre Wilhelm 9694c796e3 Revert "fix disappearing buttons"
This reverts commit 7323a5e393.

Fixed #2361
2015-06-24 14:35:23 -07:00
Antoine Mercadal da6698b216 Merge branch 'master' into capp_env 2015-06-19 10:12:02 -07:00
Antoine Mercadal c9f391dfc1 Update the installation process 2015-06-19 10:11:40 -07:00
Antoine Mercadal 0f62926623 rename cappenv_deactivate to capp_env_deactivate 2015-06-19 09:59:14 -07:00
Alexandre Wilhelm a419694f70 Test: updated unit test ToolsTest.j. Fixed travis... 2015-06-13 21:58:09 -06:00
Alexandre Wilhelm 472372c9ed Test: updated unittest for the tools 2015-06-08 10:35:13 -07:00
Alexandre Wilhelm d358f0d27b Fixed: xml format now has the key sourcePath instead of path for the command objj and objj2objcskeleton 2015-06-08 10:30:54 -07:00
Alexandre Wilhelm 3f88e02587 New: added the option -n to specify the name of the cocoa files generated by objj2objcskeleton 2015-06-01 15:22:56 -07:00
Antoine Mercadal 245da9b422 Add capp_env 2015-06-01 15:20:20 -07:00
Alexandre Wilhelm 8cc075aff3 Fixed: objj2objcskeleton does not work with categories on cappuccino class
Previously, when making objj2objcskeleton on a category of a cappuccino class, the cocoa category was not a cocoa class but still a cappuccino class. For instance, a CPView category was still a CPView category instead of being a NSView category.

Fixed #2344
2015-06-01 14:35:12 -07:00
Alexandre Wilhelm 128a243166 Merge branch 'master' of https://github.com/cappuccino/cappuccino 2015-06-01 13:53:56 -07:00
Alexandre Wilhelm 0e41365020 Fixed: some objj errors were not print in xml when necessary 2015-06-01 13:53:41 -07:00
Alexandre Wilhelm de7951f4db New: added build passing tag to the realm markdown 2015-05-27 18:38:10 -07:00