Commits on Aug 19, 2013
  1. Simplify.

    aljungberg committed Aug 19, 2013
  2. Fixed: missing imports.

    aljungberg committed Aug 19, 2013
  3. New: grey out Edit menu non applicable items for text fields.

    Copy, cut and delete are now disabled if there's no selection in the active text field. Cut, paste and delete are greyed out if the text field is not editable (a label).
    Refs #1964.
    aljungberg committed Aug 19, 2013
  4. Clean up.

    aljungberg committed Aug 19, 2013
  5. New: CPTextField deleteForward:.

    This enables delete forward to be activated through action connections to text fields (or the first responder).
    aljungberg committed Aug 19, 2013
  6. New: Edit > Delete menu item support for text fields.

    This menu item deletes the current selection if there is one.
    Refs #1964.
    aljungberg committed Aug 19, 2013
  7. Fixed: - CPTextField deleteBackward: required selection.

    According to the spec, deleteBackward: should remove the element before the insertion point if there is no selection (e.g. actually delete backwards).
    aljungberg committed Aug 19, 2013
  8. Fixed: copy and paste by Cappuccino Edit menu not working.

    When the Edit menu is used to cut or to paste, Cappuccino needs to do all the work of making it happen. But the current code relied on the browser doing part of the work.
    This fix adds new state so CPTextField can know if it should expect the browser to do some of the work or not.
    Refs #1964.
    aljungberg committed Aug 19, 2013
  9. Fixed: selectable text deselected when a menu was clicked.

    This made it impossible to select some (non-editable) text, and then to click a Cappuccino menu option like Edit > Copy. Upon the click of Edit, the just selected text would be lost.
    This was caused by some very mysterious code focusing and blurring an input every time propagation was stopped. Since it wasn't documented, the snippet was just removed for now. If it turns out it was useful we'll need to add it back and make sure it's not called in this scenario (while documenting it properly).
    Refs #1964.
    aljungberg committed Aug 19, 2013
Commits on Aug 16, 2013
  1. FIXED: Bug introduced with my previous commit, preventing popover to …

    …open in some cases.
    Previously, addChildWindow:ordered: was setting the platform window of the child window.
    This patch restore the correct behaviour, and fix a bug with _CPAutocompleteMenu. Now the autocomplete menu is opened as a child of its textfield window using the correct platform window.
    primalmotion committed Aug 16, 2013
Commits on Aug 15, 2013
  1. FIXED: Bug that could open a child window in the wrong platform window

    Previously, addChildWindow:ordered: did not set not the child window's platform window. This could result to open them in the wrong browser window. This patch makes sure to set the parent's platform window as the child window's platform window.
    primalmotion committed Aug 15, 2013
  2. Fixed: main div in index.html had wrong id.

    The div's id was changed to cappuccino, and it was supposed to be cappuccino-body, which broke code that relied on the DOM remaining stable during startup.
    aparajita committed Aug 15, 2013
  3. Revert "Fixed: nib2cib used a temp file for plutil output instead of …

    …using stdout."
    This reverts commit 4e4fc38. It wasn't working reliably.
    aparajita committed Aug 15, 2013
  4. Fixed: nib2cib used a temp file for plutil output instead of using st…

    Previously, nib2cib sent the output of plutil to a temp file, then read that file. plutil supports writing to stdout, which avoids the temp file completely, so that is what we do now.
    aparajita committed Aug 15, 2013
  5. Fixed: missing semicolon.

    aparajita committed Aug 15, 2013
Commits on Aug 14, 2013
  1. Fixed: CPTextField deleteBackward: leaving 1 character.

    Previously if - CPTextField `deleteBackward:` was invoked without it being a browser backspace key event for an actively edited text field, the first character in the current selection would not be deleted.
    This fix makes it so that `deleteBackward:` works properly from any caller. The fix also undoes a mistake in a recent previous commit which prevented the text field from visually updating after deletion.
    aljungberg committed Aug 14, 2013
Commits on Aug 13, 2013
  1. Formatting.

    aljungberg committed Aug 13, 2013
  2. Formatting

    aparajita committed Aug 13, 2013
Commits on Aug 12, 2013
  1. Fixed: attempting to use an unsupported built in image in IB would ge…

    …nerate an error, but not explain why.
    Previously, attempting to use an unsupported built in image such as NSActionTemplate would generate an error message that said, "The image “NSActionTemplate” cannot be found." This would lead the user to think that there was something wrong with nib2cib, instead of understanding that only certain built in images are supported (currently NSAddTemplate and NSRemoveTemplate).
    With this commit, an attempt to use an unsupported built in image (where built in is assumed to be any name that matches /^NS[A-Z][A-Za-z]+$/) results in the error message "The built in image “<name>” is not supported."
    aparajita committed Aug 12, 2013
  2. Fixed: _CPImageAndTextView unguarded platform access.

    This could cause issues during jake deploy or unit testing.
    aljungberg committed Aug 12, 2013
  3. New: triple click selectable text field to select all.

    This matches Cocoa behaviour. Cocoa also supports double click to select the current word but we currently don't know what word is being clicked. In some browsers (e.g. Safari) this will work natively. Chrome on the other hand selects something random after double click on a non editable div.
    aljungberg committed Aug 12, 2013
  4. New: selectable textfield Select All (Cmd-A, Ctrl-A) support.

    Like in Cocoa, a non-editable but selectable text can now be clicked and all text can be selected with the Edit > Select All option or the associated keyboard equivalent. Just like in Cocoa this works on selectable text labels as well (text fields without a bezel).
    aljungberg committed Aug 12, 2013
  5. Test: extended copy and paste manual test.

    This change adds selectable text fields and labels to the potential copy sources.
    Refs #1972.
    aljungberg committed Aug 12, 2013
  6. Fixed: CPTextField copy: only worked for editable text fields.

    A non-editable text field does not use an input field, and so does not track what is selected within it. We will use a workaround for now but in a CoreText based text field in the future we'd be likely to always have a correct selectedRange and be able to remove this hack.
    Fixes #1972.
    aljungberg committed Aug 12, 2013
  7. New: non-editable but selectable text fields can become the first res…

    Without this change, text fields with setEditable:NO but setSelectable:YES could not become the first responder, and so would not listen for copy: events.
    This change allows selectable fields to become the first responder, taking advantage of the distinction between first responder and first key responder maintained internally in CPTextField - a merely selectable field does not become the first key responder.
    Refs #1972.
    aljungberg committed Aug 12, 2013
Commits on Aug 10, 2013
  1. Fixed: CGContextAddArc would fail if the path was empty.

    Previously, CGContextAddArc would not work with an empty path. In Cocoa, CGContextAddArc implicitly starts a path, so it does not require a non-empty path.
    This commit allows CGContextAddArc to be used with an empty path.
    aparajita committed Aug 10, 2013
Commits on Aug 9, 2013
  1. Fixed: CPApplicationDidChangeScreenParametersNotification was sent on…

    …ce for each window.
    Should be sent only once per resize.
    aparajita committed Aug 9, 2013
  2. Fixed: when constraining a window resize, the horizontal margin was f…

    …ixed (and too large).
    Previously a fixed margin of 40px was maintained at the left/right of a window when resizing it, which was excessive.
    Now the minimum size allowed during a resize is the same as the minimum margin allowed when moving a window, which is determined based on the type of window.
    aparajita committed Aug 9, 2013
  3. Fixed: constraining window's to the screen did not respect a window's…

    … minSize.
    Previously, when the platform window was resized, windows were moved/resized to stay within the virtual screen, but if the window had a minimum size, it was not respected.
    This commit ensures that if a window has a minimum size, it will always be respected.
    aparajita committed Aug 9, 2013
  4. New: sort the keys in CPDictionary -description.

    This makes it easier to find an item in a large dictionary.
    aparajita committed Aug 8, 2013
  5. Formatting, optimizations.

    aparajita committed Aug 6, 2013