Commit Graph
5908 Commits
Author SHA1 Message Date
Andrew Hankinson 7f63be2cd2 Formatting: Make if statement more readable
The if statement had a lot of sub-clauses. These were factored out into variable assignments.
2014-08-13 19:56:50 -04:00
Andrew Hankinson 1236dea4c5 Fixed: equality operators 2014-08-13 19:47:06 -04:00
Andrew Hankinson c5c46df613 Fixed: typo 2014-08-13 19:44:23 -04:00
Andrew Hankinson a96269150a Fixed: AppKit.j is alphabetized
CPTextView.j was out of alphabetical order. This commit fixes that.
2014-08-13 19:34:56 -04:00
Andrew Hankinson 75e347e8e3 Fixed: obscure use of variables
Previously, the counting variable "i" was used as a variable throughout this method, leading to the value of 'i' becoming unclear as the method progressed.

Additionally, a later loop in this method redeclared 'i', providing more confusion.

This commit renames 'i' to the more descriptive 'targetLine' and uses that in its place. The redeclared value of 'i' was also renamed to "newTargetLine".
2014-08-13 18:15:58 -04:00
daboe01 d641cc5057 fix fussy optimization 2014-08-14 00:12:02 +02:00
Christophe Serafin bf5b660cb5 fix background size with 1-part image 2014-08-12 17:26:43 -07:00
Christophe Serafin 712dc493ca remove CPDateFormater dependancy and CPString convertion 2014-08-12 15:42:03 -07:00
Christophe Serafin f4fba64ffb remove test on sendAction 2014-08-12 14:06:37 -07:00
Christophe Serafin e3ad115698 correction based on primalmotion comments 2014-08-12 13:56:25 -07:00
Christophe Serafin c078bb04b2 Correction and optimizations based on Alex comments. Fix for CPDatePickerTest 2014-08-12 13:31:22 -07:00
Alexandre Wilhelm a04f1045bc Fixed: Checking if a CPTextField is usable in a CPPlatformWindow
Previously, when a CPTextField was in a CPPlatformWindow, the checking of if the CPTextField was usable or not (depending on its position) in a CPPlatformWindow didn't take in account the content-inset of the CPTextField. Now it does.
2014-08-12 11:27:25 -07:00
daboe01 cf64145ff3 formatting 2014-08-12 16:06:49 +02:00
daboe01 195eca6b09 typesetter early exit in flushing fix 2014-08-12 15:48:31 +02:00
daboe01 b0ef077e48 fix typesetter nil bug 2014-08-12 15:12:19 +02:00
daboe01 e40a698d1a fixed accessor 2014-08-12 10:37:05 +02:00
daboe01 69c34b1b27 formatting 2014-08-12 08:33:28 +02:00
daboe01 4700c2583d fix acessor names 2014-08-12 08:29:28 +02:00
Christophe Serafin db6975e07a force size only for bordered buttons and bezeled textfields 2014-08-11 18:08:15 -07:00
Christophe Serafin 93127489e7 stop forcing font on CPButton and CPTextField. If the developper wants to set a bigger font it is possible in Cocoa 2014-08-11 17:25:31 -07:00
Christophe Serafin 83064294ac remove useless images and declaration 2014-08-11 15:04:35 -07:00
Christophe Serafin 8412c1db21 enable autoresize theme images instead of creating small and mini images. Remove all existing small and mini images 2014-08-11 14:25:02 -07:00
Antoine Mercadal 18a7a9fdce Merge pull request #2168 from Dogild/CPOutlineView-fixed
Fixed: Memory leaks in CPOutlineView + corrupted itemInfos dictionary
2014-08-11 14:15:59 -07:00
Antoine Mercadal fc90d00354 Merge branch 'master' of https://github.com/cappuccino/cappuccino 2014-08-11 12:47:12 -07:00
Antoine Mercadal 55861a8f44 FIXED: transient popovers were not close with right click
This patch ensure that is a popover is transient and the user right clicks outside, it closes properly.
2014-08-11 12:46:09 -07:00
Alexandre Wilhelm 4fbd307163 Fixed: refactoring of the class CPOutlineView 2014-08-09 15:10:25 -07:00
Alexandre Wilhelm 3e4c03852d Fixed: Memory leaks in CPOutlineView + corrupted itemInfos dictionary
Previously, when reloading a CPOutlineView with different datas than before, the CPOutlineView kept a reference of the previous datas.
Now, when reloading, the CPOutlineView will delete these references when we don't need it anymore. For that, the CPOutlineView will only try to delete the previous reference when we have reloaded the children of a node, otherwise it will keep the other references.

This PR fix some issue with the following methods :

- (BOOL)isExpandable:(id)anItem;
- (BOOL)isItemExpanded:(id)anItem;
- (CPInteger)rowForItem:(id)anItem;
- (CPInteger)levelForItem:(id)anItem;
- (id)itemAtRow:(CPInteger)aRow;
- (CPInteger)levelForItem:(id)anItem;
- (CPInteger)levelForRow:(CPInteger)aRow;

Previously these methods took care about not displayed items. Now they just work with displayed items.

Added unit-tests in Test/AppKit/CPOutlineViewTest.j

Test app in Test/Manual/CPOutlineViewTestCib
2014-08-08 15:05:24 -07:00
Christophe Serafin 568a652fb4 added default CPButton images 2014-08-07 18:26:32 -07:00
Christophe Serafin fd3a4b069d removes CPRuleEditorPopUpButton and use CPPopUpButton directly 2014-08-07 16:50:52 -07:00
Christophe Serafin 4aaafa6de7 fix CPDatePicker alignment in CPPredicateEditor. fixes #2162 2014-08-07 16:50:23 -07:00
Christophe Serafin 97475fb27b enable CPButton to use ControlSize management 2014-08-07 16:47:09 -07:00
Christophe Serafin 26e29df657 update CPRuleEditor to use small control size for each control. 2014-08-07 09:44:06 -07:00
Christophe Serafin d15a853bf7 enable control size management on CPButton, CPPopUpButton, CPCheckbox, CPDatePicker, CPTexteField, CPStepper 2014-08-07 09:41:43 -07:00
Aparajita Fishman b3f7f440c8 Set user event flag based on presence of DOMEvent. 2014-08-06 08:08:53 -04:00
daboe01 6cf79a3c73 size should not be smaller than clipview 2014-08-06 13:31:31 +02:00
daboe01 2c110f7796 fixed: display error at bottom in case of resizing 2014-08-06 13:17:35 +02:00
Christophe Serafin 5feac3a7ff allow using regular, small and mini sizes from xCode and from code using setControlSize method. Available on CPTextField, CPStepper, CPDatePicker only for the moment 2014-08-05 17:34:58 -07:00
Antoine Mercadal 215c1c53f5 Merge pull request #2166 from Dogild/PopoverAnimation
Fixed: CPPopover animation issue
2014-08-04 12:54:26 -07:00
Alexandre Wilhelm 7890085c6c Fixed: CPPopover animation issue
Previously, when opening a popover after another one, the CPPopover was blurred.
This occurred due to some CSS Transitions specification :

"Since this specification does not define when a style change event occurs, and thus what changes to computed values are considered simultaneous, authors should be aware that changing any of the transition properties a small amount of time after making a change that might transition can result in behavior that varies between implementations, since the changes might be considered simultaneous in some implementations but not others."

The fix consists to access to a transform value of the style of the _DOMElement to force it to recalculate the values.

More information here : https://code.google.com/p/chromium/issues/detail?id=388082

Fixed #2143
Test app in Test/Manual/CPPopover
2014-08-04 10:55:29 -07:00
daboe01 aebea0b57f Update CPTypesetter.j 2014-08-04 13:27:42 +02:00
daboe01 8684455ea5 make canvas sizing validity detection more robust 2014-08-04 13:22:38 +02:00
Christophe Serafin 12c427a9cf enable CPControl to use setControlSize. Created an example with CPStepper 2014-08-01 16:57:02 -07:00
daboe01 7cbb103376 fix selecting last newline error 2014-07-31 20:35:29 +02:00
daboe01 d686a0dadf reverseSetValuesFor: handle multiple selection 2014-07-30 21:09:41 +02:00
Antoine Mercadal eb186f550c Merge branch 'master' of https://github.com/cappuccino/cappuccino 2014-07-30 11:32:59 -07:00
Antoine Mercadal 01b631aea6 FIXED: Popover not showing in correct platform window.
This was fixed a month ago, but additional later commits added a dumb test preventing this to work correctly
2014-07-30 11:31:54 -07:00
Aparajita Fishman 293114f1a0 Fixed: delete methods erased entire field
Previously, the deleteForward:, deleteBackward: and delete: methods in CPTextField called setStringValue, which would consult a formatter, and if the formatter failed all of the text would be deleted.

Now the code has been refactored such that when one of the delete methods is invoked via a key event, the formatter is not used and the DOM event is used, which results in the expected behavior.

A bug in checking the selected range was also fixed in deleteForward:.

The CPFormatter test was updated with buttons to call the delete methods directly to ensure they work correctly when not invoked from a key event.

Closes #1997
2014-07-29 23:32:14 +04:00
Antoine Mercadal 20b92c03cb Merge pull request #2161 from Dogild/CPComboBoxDataSource
New: added protocol CPComboBoxDataSource
2014-07-29 11:22:37 -07:00
Antoine Mercadal b6d76eb84e Merge pull request #2163 from t00f/predicate_editor_with_date
set CPDatePicker elements to days, months, year when used within a CPPre...
2014-07-28 17:29:25 -07:00
Alexandre Wilhelm 25bb51f4a3 New: added protocol CPComboBoxDataSource
Added protocol CPComboBoxDataSource
2014-07-28 13:38:11 -07:00