Commit Graph

4387 Commits

Author SHA1 Message Date
Allan Odgaard
bbe7ff7d21 Add syntax highlight to pasteboard search history
This is just a quick proof-of-concept.
v2.0-beta.12.16
2016-09-25 19:45:17 +02:00
Allan Odgaard
dd2a38da10 Remove document_t and related tests
Tests should be ported to OakDocument.
2016-09-25 19:45:17 +02:00
Allan Odgaard
a3c0166bba Let OakDocument use OakSourceControlManager 2016-09-25 19:45:16 +02:00
Allan Odgaard
03e6c64c48 WIP: Add OakSourceControlManager 2016-09-25 19:45:16 +02:00
Allan Odgaard
cbdefcc660 Fix issue with updating bufferEmpty property
We should initiate it to YES and the logic for when to skip updating was wrong because of precedence.
2016-09-25 19:45:16 +02:00
Allan Odgaard
456ff37301 Skip work when regular expression property is set to its existing value 2016-09-25 13:24:02 +02:00
Allan Odgaard
67dc735bd9 Enable syntax highlight for find and replace text fields
These use the source.regexp.oniguruma and textmate.format-string grammars respectively, both in the TextMate bundle.
2016-09-25 13:08:21 +02:00
Allan Odgaard
b5d897315c Add ${«var»:/titlecase} as alias for ${«var»:/capitalize} 2016-09-25 13:08:21 +02:00
Allan Odgaard
fea5aef025 Fix typo in help page 2016-09-25 13:08:21 +02:00
Allan Odgaard
7f42f439b7 Add NSFormatter subclass that does syntax highlight
The theme used can be set using the UIThemeUUID defaults key. The default is Mac Classic.
2016-09-25 13:08:21 +02:00
Allan Odgaard
5a571ad036 Fix leak: CGPathRef 2016-09-25 07:31:13 +02:00
Allan Odgaard
973e38a383 Fix leak: buffer_callback_t 2016-09-25 07:31:13 +02:00
Allan Odgaard
b56c51212a Check for exact dependencies when updating icon/represented file 2016-09-24 15:21:02 +02:00
Allan Odgaard
8cab8be8b5 Also observe document’s display name
The display name can change without a change to the path, in which case, we should update the UI accordingly, although the current implementation of OakDocument does not trigger any change notification when e.g. the user enables “Hide Extension” for a document.
2016-09-24 15:21:02 +02:00
Allan Odgaard
66075f6a30 Inline the track/untrack methods 2016-09-24 15:21:02 +02:00
Allan Odgaard
46e83179ae No need to track/untrack selected document since we track all documents 2016-09-24 15:21:01 +02:00
Allan Odgaard
7d40792a32 Do not update documentPath from setSelectedDocument:
The property will automatically be updated by our observer.
2016-09-24 15:21:01 +02:00
Allan Odgaard
d9b6bde6ec Update window’s icon/represented file directly from observer 2016-09-24 15:21:01 +02:00
Allan Odgaard
a3543029d8 Update window’s documentEdited property directly from observer 2016-09-24 15:21:01 +02:00
Allan Odgaard
17046aa051 Observe documents/selectedDocument properties instead of each document 2016-09-24 15:21:01 +02:00
Allan Odgaard
0a6cbe150e Remove documentDisplayName property
The only purpose of observing this property seems to be to update the window title, but since display name is derived from path, which we also observe, it seems redundant.

Though technically the display name could change because extension is hidden or similar, but this is a bit of an edge-case, and long-term we want file browser and tab bar to observe the document’s displayName property directly.
2016-09-24 09:43:59 +02:00
Allan Odgaard
510d093696 Use selectedDocument.property instead of our mirrored documentProperty 2016-09-24 09:41:36 +02:00
Allan Odgaard
dcd725de05 Remove cppDocuments property and last usage of document_t 2016-09-24 09:37:31 +02:00
Allan Odgaard
83c1f2b6e5 Use OakDocument API to “detach” backup file
This needs to be revised.
2016-09-24 09:37:31 +02:00
Allan Odgaard
14cdd420d3 Make backupPath property public 2016-09-24 09:37:31 +02:00
Allan Odgaard
2baf1f7889 Remove most uses of _cppDocuments 2016-09-24 09:37:31 +02:00
Allan Odgaard
b7e4f3bc4f Make OakDocument’s saveBackup: public API
This is required when saving session state.
2016-09-24 09:37:31 +02:00
Allan Odgaard
58b075da44 Remove selectedCppDocument property
The selectedDocument property is now readwrite.
2016-09-24 09:37:31 +02:00
Allan Odgaard
25156bcd8d Limit use of selectedCppDocument property 2016-09-24 09:37:31 +02:00
Allan Odgaard
a478cc0ae1 Move openAndSelectDocument: API to use OakDocument 2016-09-24 09:37:30 +02:00
Allan Odgaard
754ca4901c Move insertDocuments: API to use OakDocument 2016-09-24 09:37:30 +02:00
Allan Odgaard
cdda7495ea Prepare moving insertDocuments: API to OakDocument 2016-09-24 09:37:30 +02:00
Allan Odgaard
f4b56d1435 More code updated to use OakDocument 2016-09-24 09:37:30 +02:00
Allan Odgaard
381e1bff73 Use OakDocument’s isEqual: instead of document_ptr’s operator==
Since we no longer ensure document_ptr objects are reused, we cannot compare them using operator==.
2016-09-24 09:37:30 +02:00
Allan Odgaard
2f363060ee Make OakDocument’s isBufferEmpty property public 2016-09-24 09:37:30 +02:00
Allan Odgaard
53c1c4b13c Use OakDocument type for managing sticky state 2016-09-24 09:37:30 +02:00
Allan Odgaard
41eff5c089 Use NSArray<NSUUID*>* for tabs to close
Also change disposableDocument to NSUUID*.
2016-09-24 09:37:30 +02:00
Allan Odgaard
5ee70bfe29 Use instance variable for documents array instead 2016-09-24 09:37:30 +02:00
Allan Odgaard
331c2c08b4 Remove document::show API 2016-09-24 09:37:30 +02:00
Allan Odgaard
34e1fec7f1 Remove UI proxy implementation from DocumentWindowController 2016-09-24 09:37:30 +02:00
Allan Odgaard
edaf02a6c3 Remove document_t callback system 2016-09-24 09:37:29 +02:00
Allan Odgaard
965eac9342 Use KVO instead of document_t callback 2016-09-24 09:37:29 +02:00
Allan Odgaard
df0fbe8630 Preparation for removing document_ptr from DocumentWindowController 2016-09-24 09:00:25 +02:00
Allan Odgaard
e133be01b7 Rename documents property to cppDocuments
This is just to make migration easier.
2016-09-24 08:59:31 +02:00
Allan Odgaard
eef0878538 Remove document::show_browser
Instead use OakDocumentController’s showFileBrowserAtPath:
2016-09-24 08:55:18 +02:00
Allan Odgaard
2f9e1d8a69 Remove unnecessary import statements 2016-09-24 08:55:18 +02:00
Allan Odgaard
48a73f0a0f Remove openAndSelectDocument: from public API 2016-09-24 08:55:18 +02:00
Allan Odgaard
ffca47a262 More code ported to OakDocument 2016-09-24 08:55:06 +02:00
Allan Odgaard
38a2cd6c1e Remove revision and savedRevision from document API 2016-09-24 08:33:34 +02:00
Allan Odgaard
b5bbb46dfb Let bundle editor use OakDocumentController API 2016-09-24 08:33:33 +02:00