Commit Graph

2016 Commits

Author SHA1 Message Date
Allan Odgaard
0231ca5cfb Checkin release notes v2.0-alpha.9479 2013-09-13 00:27:38 +02:00
Allan Odgaard
3e2567d2d0 Add Sticky and Close Tabs to the Right to File menu
The title of the Sticky item is nonsensical, but I couldn’t come up with anything good.

Closes #1110.
2013-09-12 23:46:05 +02:00
Allan Odgaard
712a18cd50 Add IBAction to methods 2013-09-12 23:46:05 +02:00
Allan Odgaard
1ae67343f1 Add menu validation for close tabs related actions 2013-09-12 23:46:05 +02:00
Allan Odgaard
35ad8a1ed9 Add action method for closing tabs to the right 2013-09-12 23:46:05 +02:00
Allan Odgaard
aa08d67090 Let tab menu methods fallback on active tab
These normally require that the sender is an NSIndexSet or has one as its represented object, but with this commit, they will also be usable when there is no index set available, and will then simply use the active tab.
2013-09-12 23:46:05 +02:00
Michael Sheets
683ccd3ab2 Add icon definitions to CFBundleDocumentTypes
Works around a bug where icons are not inherited from the UTI definitions.
2013-09-12 23:46:04 +02:00
Allan Odgaard
fb8627d077 Intersect left/right scope for rendering soft break nodes
This is only relevant for indented soft wrap where e.g. the text following the soft break is underlined: Previously we would then render an underline for the soft break node itself (which normally consists of whitespace).
2013-09-12 23:46:04 +02:00
Allan Odgaard
e4a5db0f3b Only first call to window.close() would have an effect
This is a workaround for https://bugs.webkit.org/show_bug.cgi?id=121232
2013-09-12 23:46:04 +02:00
Allan Odgaard
776a8d46d9 Fix window.close() for HTML output embedded in main window 2013-09-12 23:46:04 +02:00
Allan Odgaard
f251c0b7d3 Do not re-use closed HTML output windows 2013-09-12 23:46:04 +02:00
Allan Odgaard
2f72f84ae5 Add leak watcher and some debug output 2013-09-12 23:46:04 +02:00
Allan Odgaard
3f055aa318 Clear all web view delegates during dealloc 2013-09-12 23:46:04 +02:00
Allan Odgaard
8c7e68bf2f Ensure that at least 8 tabs stay open when auto-pruning 2013-09-12 23:46:03 +02:00
Boris Dušek
21088105a8 Support text attributes with VoiceOver
VoiceOver can announce text formatting, such as bold font, italics,
underline, font, etc., as well as whether text is misspelled. For this,
it needs the AXAttributedStringForRange attribute supported. This commit
does exactly that.

Testing can be done in this way (VO stands for Ctrl-Option):

* first interact with the text (VO-Shift-down arrow when standing
  on the text element)
* to announce text attributes for character after cursor, press VO-T
* to seek for next:
  * misspelled text: VO-Cmd-E
  * color change:    VO-Cmd-K
  * underlined text: VO-Cmd-U
  * many more (see VO-H-H, "Find", close help with Esc)
* to seek for previous *: just add Shift to the shortcut

Some attributes remain to be supported (full list of attributes is available at: https://developer.apple.com/library/mac/documentation/cocoa/reference/applicationkit/Protocols/NSAccessibility_Protocol/Reference/Reference.html#//apple_ref/doc/uid/20000945-SW53).

The misspelled text VoiceOver support can be used nicely with TextMate's
spelling support:

1. the user finds next mistake with VO-Cmd-E, hears the misspelled word,
   perhaps reads it on a braille display
2. the user then presses Cmd-; to show the spelling menu for that word
   and chooses the desired resolution (apply suggested correction etc.)
3. go back to step 1. :-)
2013-09-12 23:13:57 +02:00
Ronald Wampler
08b0b5ba0b Let OakFinderLabelChooser draw and manage it's own title
This removes the need to create and manage a separate menu item
as a placeholder for the title of the color swatch in the file
browser action menu.
2013-09-12 23:13:57 +02:00
Allan Odgaard
2ad5b2fb59 Checkin release notes 2013-09-06 16:01:44 +02:00
Allan Odgaard
96283a6554 Update to Cap’n Proto v0.3.0 2013-09-06 11:53:58 +02:00
Allan Odgaard
e2660960e7 Reject bundle index cache if version is not the current 2013-09-06 11:53:58 +02:00
Allan Odgaard
2107223460 Don’t close file descriptor until after ~PackedFdMessageReader()
The message reader may use the file descriptor in its destructor, which is why we can’t close it until that object has been destroyed.
2013-09-06 11:53:41 +02:00
Allan Odgaard
d3a78e59f2 Put posix_spawn related failure in crash report 2013-09-05 23:57:03 +02:00
Allan Odgaard
f346f2e717 Ensure delegate is retained 2013-09-05 23:57:02 +02:00
Allan Odgaard
1c308c810d Use map::emplace instead of inserting std::pair (C++11) 2013-09-05 20:59:11 +02:00
Joachim Mårtensson
ca98e2f86d Use std::atomic family 2013-09-05 20:59:10 +02:00
Allan Odgaard
aa24f237c6 Make last effective (proxy) tab sticky
When the tab bar overflows and the selected tab would normally be rendered outside the visible area, we use the last visible tab as a proxy. With this commit, the last visible tab keeps showing the document if switching to another (visible) tab.
2013-09-05 17:26:48 +02:00
Allan Odgaard
5c4573873f Protect grammar_t with mutex
Presently buffer_t::wait_for_repair will use the grammar from the main thread (rather than wait for the parse thread to finish) which does cause a race condition since the parser will now mutate the grammar (graph coloring).

Ideally buffer_t::wait_for_repeat would simply wait for the parser to finish, but I’d prefer to first switch the parser to use GCD.
2013-09-05 17:26:47 +02:00
Allan Odgaard
69be0205ba Fix update of misspelled ranges
If nothing was misspelled in the updated range, and a value existed for the end of the range (indicating that what followed the updated range was misspelled) then that value would be erased.
2013-09-05 12:41:30 +02:00
Allan Odgaard
145a4f6386 Implement NSChangeSpelling and NSIgnoreMisspelledWords 2013-09-05 12:41:30 +02:00
Allan Odgaard
b832a8d7d0 Use specialized menu for Check Spelling
We only show “Find Next” (previously “Show Next”) when context menu is shown as a result of “Check Spelling” and we leave out the other actions.
2013-09-04 12:55:16 +02:00
Allan Odgaard
68bf3efff9 Synchronize spelling panel and buffer languages
If the spelling panel is visible when checkSpelling: is invoked then its language is taken and used for the buffer. If the panel is not visible, the buffer’s language is set for the spelling panel.

We probably should also set the spelling panel’s language when switching document, and when the panel is first opened. I don’t think the code complexity is really worth it though (depends on how often one use the spelling panel with a non-default language).

Fixes #1104
2013-09-04 12:55:16 +02:00
Allan Odgaard
d265d24441 Enable “Check Spelling as You Type” in checkSpelling:
This is required so that we have the proper meta data (misspelling ranges).
2013-09-04 12:55:16 +02:00
Allan Odgaard
160dcf50af Use local variable for document->buffer() 2013-09-04 12:55:15 +02:00
Allan Odgaard
13ca6b731e Update spelling panel and use when visible 2013-09-04 12:55:15 +02:00
Allan Odgaard
a20778f5de Enable text view’s context menu actions 2013-09-04 12:55:15 +02:00
Allan Odgaard
ae708eaa41 Remove Text → Transpose Words
This is unimplemented and I probably won’t implement it unless there is a very compelling use-case.

The Text → Transpose action can already transpose words, either when separated by whitespace, comma, etc., or when the words are selected as two (or more) discontinuous selections.

Closes #1109
2013-09-03 16:48:00 +02:00
Adam Strzelecki
de21c812a9 Only show suggestions when Check Spelling is called via menu item
Otherwise just select next spelling error on Check Spelling, which is called by
spelling panel as well.
2013-09-03 15:06:40 +02:00
Adam Strzelecki
b0b182e2e1 Invalidate spelling when ignoring or learning a word
We invalidate the entire buffer since the word can appear in multiple locations. This could be optimized to only invalidate misspelled instances of the ignored or learned word. Likewise, we redraw entire buffer since the refresh macro is not able to handle changes in spelling meta data and calculate minimal refresh region.
2013-09-03 15:06:40 +02:00
Adam Strzelecki
6997fb820e Reduce text overlap when showing context menu 2013-09-03 15:06:40 +02:00
Adam Strzelecki
cc137f3c24 Add Show Next for quick spelling iteration
Also add key equivalents to spell popup menu.
2013-09-03 15:06:40 +02:00
Adam Strzelecki
6c6316573f Implement Check Spelling
Now using Edit -> Spelling -> Check Spelling selects next spelling error or one
at caret if it was not yet selected, then shows context menu with correction
suggestions.

This makes checking spelling as easy as tapping Cmd+;

Closes #1103
2013-09-03 15:06:07 +02:00
Allan Odgaard
02e64d17e6 Remove unused operation queue type 2013-09-03 12:27:20 +02:00
Allan Odgaard
e4e80a946c Use std::make_shared 2013-09-03 12:27:20 +02:00
Allan Odgaard
d58bb1fdde Avoid using NULL_STR with scope_t::push_scope 2013-09-03 12:10:18 +02:00
Michael Sheets
c1bdbfa975 Use UTIs for both application and Quicklook generator
UTIs are taken from both the Apple supplied list and newly created for those that didn't exist. For those languages where no clear 'owner' existed to provide the reverse-DNS notation we use a com.macromates.* stand-in.
2013-09-03 12:10:18 +02:00
Ronald Wampler
e631068c56 Show a chevron menu button when tab bar overflows
The behavior is based on Safari where last visible tab is swapped with the selected tab, if selected tab itself would not be visible.

Commit edited by Allan Odgaard, original version used document icons in overflow menu and would make the effective last tab sticky.

Closes #1060
2013-09-03 10:37:43 +02:00
Allan Odgaard
29ba700c71 More encapsulation 2013-08-31 21:24:39 +02:00
Allan Odgaard
ba29e90762 Remove redundant assert 2013-08-31 21:24:39 +02:00
Allan Odgaard
91fb146f26 Remove custom debug/trace log system 2013-08-31 21:24:39 +02:00
Allan Odgaard
95376adb79 Convert scope match API to accept C strings 2013-08-31 21:24:39 +02:00
Allan Odgaard
f67c91dcb9 Introduce C string API
This may seem like a step back, but is the easiest way to deal with “static strings” (that should not be copied).
2013-08-31 21:24:39 +02:00