Commit Graph

3967 Commits

Author SHA1 Message Date
Allan Odgaard
793a23cda7 QuickLook generator would fail for users with no font configured
We now fallback to the system’s fixed width font.
v2.0-beta.11.14
2016-08-04 18:13:18 +02:00
Allan Odgaard
40a96c8815 Update dialog plug-ins (Replace deprecated nib initializing) v2.0-beta.11.13 2016-08-04 14:39:35 +02:00
Allan Odgaard
e381dbaf58 Fix typo in comment 2016-08-04 14:37:02 +02:00
Allan Odgaard
49cc601ae6 Only call NSData’s enumerateByteRangesUsingBlock: when available
This restores compatibility with 10.8.
2016-08-04 14:37:02 +02:00
Allan Odgaard
49ce387960 Update dialog plug-ins (revert ‘Replace deprecated nib initializing’) 2016-08-04 00:34:53 +02:00
Allan Odgaard
c947ca6659 Add crash report debug info 2016-08-04 00:34:53 +02:00
Ronald Wampler
4c1f8a18fb Use weak storage for GutterView's partnerView
On 10.12 beta 3, when closing a window, the following exception is thrown:

Exception Name: NSInternalInconsistencyException
Description: <GutterView 0x7fa71c511150> has reached dealloc but still has a super view. Super views strongly reference there children, so this is being over-released, or has been over-released in the past.

Despite the mention of our GutterView instance being over-released, the actual problem is that we do not call super in our override of `removeFromSuperView`, where we nil out our partner view. A simple fix to avoid crashing would be just calling super in that method so that the view is marked as being removed; however, we can simplify the code and eliminate the need to override our super's method by using a weak reference instead and let ARC automatically handle the zeroing of our partner view.
2016-07-21 15:55:01 -04:00
Allan Odgaard
502c578f54 Checkin release notes v2.0-beta.11.10 2016-07-16 14:08:31 +02:00
Allan Odgaard
866136fe83 Add more (crash reports) debug info when dragging text 2016-07-16 13:40:33 +02:00
Allan Odgaard
f3a042aead Add some (crash reports) debug info to libressl usage
After switching to a version of libressl compiled from source I am seeing crashes from BIO_new_mem_buf and PEM_read_bio_RSA_PUBKEY.

Also minor code touchups, no functional change.
2016-07-16 13:27:57 +02:00
Allan Odgaard
511e1d58a5 Remove old (crash reports) debug info 2016-07-16 13:14:43 +02:00
Allan Odgaard
93e9d23a7d Ensure “will save” callbacks run on buffer that gets written to disk 2016-07-16 13:14:43 +02:00
Allan Odgaard
07bb1ce28d Let OakDocumentEditor update document’s ‘selection’ property 2016-07-16 13:14:43 +02:00
Allan Odgaard
55c6f20b51 Let OakDocumentEditor update document’s ‘folding’ property
This has the advantage that we also get updated folding state saved with backups plus we do not burden the OakTextView with keeping metadata in sync.
2016-07-16 13:14:42 +02:00
Allan Odgaard
1f09c4292a Drop the OakDocumentEditorProtocol
This was only required when the OakDocumentEditor implementation was in a different framework (that OakDocument could not depend on).
2016-07-16 13:14:39 +02:00
Allan Odgaard
417706400d Remove document_t from refresh helper 2016-07-16 13:13:45 +02:00
Allan Odgaard
4d8cef31a0 Let OakDocumentEditor expose buffer_t
Although the buffer is maintained by OakDocument, it makes sense to only allow access via an OakDocumentEditor instance, since the buffer only exist when the document is loaded (implied by the presence of an editor).
2016-07-16 13:13:45 +02:00
Allan Odgaard
86719625d2 Limit what we import in a public header 2016-07-16 13:13:44 +02:00
Allan Odgaard
a7e6d2fcee Let OakDocumentEditor sanitize selection on external content changes 2016-07-16 13:13:44 +02:00
Allan Odgaard
5ec9aafc81 Add undo/redo API to OakDocument 2016-07-16 13:13:44 +02:00
Allan Odgaard
d285969887 Add ‘selection’ property to OakDocumentEditor
Currently setting the selection will clear any snippets.
2016-07-16 13:13:44 +02:00
Allan Odgaard
8d549d49d2 Move variables method to OakDocument 2016-07-16 13:13:44 +02:00
Allan Odgaard
750259fee1 Automatically update document’s revision after ending an undo group 2016-07-16 13:13:44 +02:00
Allan Odgaard
a0af3d98c0 Don’t redeclare private OakDocument interface 2016-07-16 13:13:44 +02:00
Allan Odgaard
c6bea5c3ff Update LINK dependencies in target files 2016-07-16 13:13:44 +02:00
Allan Odgaard
2ce7d39dbc Merge OakDocument into document framework 2016-07-16 13:13:44 +02:00
Allan Odgaard
4854139426 Remove use of document::run from tests 2016-07-16 13:13:44 +02:00
Allan Odgaard
bc344827bc Remove document_t from editor_t
We still link with the document framework because the tests still use document::run().
2016-07-16 13:13:44 +02:00
Allan Odgaard
df35494b80 Remove ng::editor_for_document 2016-07-16 13:13:43 +02:00
Allan Odgaard
4f4eef50f3 Don’t use ng::editor_for_document in tests 2016-07-16 13:13:43 +02:00
Allan Odgaard
bd3acf8e96 Pass lambda (to run commands) to editor_t instead of document_t 2016-07-16 13:13:43 +02:00
Allan Odgaard
d9a9fd34bc Use OakDocumentEditor instead of ng::editor_for_document 2016-07-16 13:13:43 +02:00
Allan Odgaard
8cfd33481e Eliminate two document_t references 2016-07-16 13:13:43 +02:00
Allan Odgaard
3606be8925 Add very basic OakDocumentEditor class 2016-07-16 13:13:43 +02:00
Allan Odgaard
978e16174b Add preliminary OakDocumentEditor registration to OakDocument 2016-07-16 13:13:41 +02:00
Allan Odgaard
fc33b25da1 Sort untitled documents after most recent use in Open Quickly… 2016-07-14 15:15:12 +02:00
Allan Odgaard
a5882463d4 Support no completion handler when loading document 2016-07-14 14:06:57 +02:00
Allan Odgaard
8acc2be710 Remove unnecessary references to ‘document’ instance variable 2016-07-14 12:22:44 +02:00
Allan Odgaard
8affd6234f Move clipboard wrapper to (new) OakDocument framework
Ideally we would stay in the document framework, but the editor framework currently depends on our document framework and we want to introduce a OakDocumentEditor which encapsulates an editor and layout instance, so to avoid cyclic dependencies we are doing this as a new framework.

Once the last document dependencies have been removed from the editor framework, we can merge OakDocument and OakDocumentEditor.
2016-07-14 12:22:44 +02:00
Allan Odgaard
e4f4ec603a Don’t let editor_t keep a document_t instance as member data 2016-07-14 12:22:44 +02:00
Allan Odgaard
d25f6aa6cb Pass document_t to macro and execute_dispatch member functions
This way the editor_t instance no longer require a reference to a document instance.
2016-07-14 12:22:44 +02:00
Allan Odgaard
cb41e89736 Simplify file patterns in default properties file 2016-07-14 12:22:44 +02:00
Allan Odgaard
3046ccd50d Add slash to folder when searching settings for untitled documents
That way, if we have a setting for [ templates/** ] and create a new file in the templates folder (via the file browser) these settings will apply.

Previously we used the folder without trailing slash which required making the file pattern something like [ templates{/**,} ].
2016-07-14 12:21:28 +02:00
Ronald Wampler
e50dc57db0 Manually release GCD objects in C++ libraries
Since these are pure C++ libraries, they are not managed by ARC. This commit partially reverts 469fd74a7b.
2016-07-14 12:21:28 +02:00
Ronald Wampler
fa9ceead09 Refactor ODBEditorSuite to avoid FSRef API (10.8) 2016-07-14 12:21:28 +02:00
Allan Odgaard
59e48f0618 Post missing ‘document will save’ notification v2.0-beta.11.9 2016-07-13 00:40:32 +02:00
Allan Odgaard
de8eedebc4 Release document observer before reaching our destructor
Releasing the document observer will trigger a “document will delete” notification, and I am seeing a few crashes from this. I don’t see any theoretical problem with posting this from the destructor, as the object is still “live”, but let’s see if this change doesn’t fix the crashes.
2016-07-13 00:40:32 +02:00
Allan Odgaard
7dbb44c4a0 Make parallel test execution the default (again) 2016-07-12 11:35:29 +02:00
Allan Odgaard
c23d0507ae Change button title to Save when asking user about encoding v2.0-beta.11.6 2016-07-12 11:00:11 +02:00
Allan Odgaard
19ced5ac0f Limit “encoding preview” to 256 KiB 2016-07-12 11:00:11 +02:00