Commit Graph

3804 Commits

Author SHA1 Message Date
Allan Odgaard
4b0dcce670 Potentially update document’s file type when editing first line
If an edit to the first line causes the document to match with a different grammar then we switch to this grammar.
2016-06-29 11:37:28 +02:00
Allan Odgaard
ca01850b7c Make file::type_from_bytes a public function 2016-06-29 11:37:28 +02:00
Allan Odgaard
f55d929aed Remove scale factor support from the print dialog
The implementation was no different than adjusting the font size, so since that is also exposed, there is no reason to provide both to the user.
2016-06-29 11:37:28 +02:00
Allan Odgaard
bcae1a8aa1 Move printing support to OakDocument 2016-06-29 11:37:28 +02:00
Allan Odgaard
81b09120cd Calling OakShowSheetForWindow with no window now show modal dialog
Based on crash reports received it might be that this function is sometimes called without a window, although the call-sites all do pass a window to the function.
2016-06-29 11:37:28 +02:00
Allan Odgaard
f78bfd306d Remove unused constant for “mixed newlines” and callback related to this 2016-06-29 11:37:28 +02:00
Allan Odgaard
78b528f299 Update LINK dependencies in target files 2016-06-29 11:37:27 +02:00
Allan Odgaard
ab1b4a1237 Move everything about loading a document to OakDocument 2016-06-29 11:37:27 +02:00
Allan Odgaard
f97e89e84b Remove document_t::symbols 2016-06-29 11:37:27 +02:00
Allan Odgaard
50dabac467 Let the symbol chooser use OakDocument instead of document_t 2016-06-29 11:37:27 +02:00
Allan Odgaard
1551efa8d2 Allow obtaining OakDocument from document_t and export OakDocument.h 2016-06-29 11:37:27 +02:00
Allan Odgaard
c21b421b5e Add enumerateSymbolsUsingBlock: to OakDocument
Currently this is a no-op when the document is closed.
2016-06-29 11:37:27 +02:00
Allan Odgaard
455fa2a4be Add keepBackupFile property to OakDocument 2016-06-29 11:37:27 +02:00
Allan Odgaard
98dfad30a3 Let status bar translate file type → grammar name
This is so that we can use bindings, once we deal with OakDocument objects.
2016-06-29 11:37:27 +02:00
Allan Odgaard
8580b04e8d Move “recent documents” tracking to OakDocument 2016-06-29 11:37:19 +02:00
Allan Odgaard
cd614c9a3b Changing path already reset our file system observer 2016-06-24 17:23:18 +02:00
Allan Odgaard
e07d150f43 Improve how we handle the state of the “Replace All / Selected” button
The button will show “Replace Selected” if either not all results are selected
or when all results are selected, replacement has been done for only some of the files with matches.

Validation of the Check/Uncheck All menu items has also been improved.
2016-06-24 09:56:24 +02:00
Allan Odgaard
f66ea4d27f Add ‘countOfExcludedReadOnly’ property to FFResultNode
It does seem redundant with four counters for the FFResultNode but this is required for efficient bindings since the state of the “Replace All / Selected” button depend on all these things.
2016-06-24 09:00:57 +02:00
Allan Odgaard
a4a4746dd9 Change FFResultNode’s ‘ignore’ property to ‘readOnly’
At the same time the semantics have been simplified so that the ‘readOnly’ property (formerly ‘ignored’) does not have any side effects with respect to whether or not the item is excluded.

The only thing special is that when a node is set to be read-only, a change of its ‘exclude’ property will not be forwarded to its children.
2016-06-24 08:45:12 +02:00
Allan Odgaard
994d60120f Update backup file atomically and verify that writing succeeded 2016-06-23 10:03:41 +02:00
Allan Odgaard
1f3ea40516 Update dialog plug-ins (remove workaround for Lion and suppress warning) 2016-06-23 08:53:37 +02:00
Allan Odgaard
383ac8c29d Remove tmColorWithCGColor: / tmCGColor (10.8) 2016-06-23 08:45:30 +02:00
Allan Odgaard
33aec21dcb Provide buffer_t visitor with offset and a way to stop the visit
If the lambda stops the visit then buffer_t::visit_data will return true, otherwise it returns false.
2016-06-22 23:22:47 +02:00
Allan Odgaard
c36ec7757e Send minimum OS requirement to server when we upload a new build 2016-06-22 22:53:38 +02:00
Allan Odgaard
b4a0704723 Remove 10.7 section from README 2016-06-22 22:53:06 +02:00
Ronald Wampler
4de647c664 Update deployment target to 10.8 2016-06-22 16:00:05 -04:00
Ronald Wampler
727b5da153 Save with Version 7.3.1 (7D1014) 2016-06-22 15:54:35 -04:00
Allan Odgaard
4e15783500 Change document_t to be a thin wrapper for OakDocument 2016-06-22 20:56:12 +02:00
Allan Odgaard
8fac4b51a4 Add OakDocument class
This is intentionally kept very similar to document_t so that we can make document_t a wrapper and once all document_t code has been migrated to OakDocument, we can extend the API like introducing an OakDocumentEditor and possibly make it an NSDocument subclass.

The implementation of OakDocument have some minor improvements over document_t for example when a document is changed on disk we delay reloading the changes until TextMate is made active, and we currently do not reload the content when there are merge conflicts (though we need to warn the user about this).

Minimum OS requirement is now OS X 10.8 because we use NSUUID.
2016-06-22 20:56:12 +02:00
Allan Odgaard
48e3a65681 Remove use of @synthesize in OakTextView related files 2016-06-22 20:56:12 +02:00
Allan Odgaard
669928f4de Remove use of @synthesize in miscellaneous files 2016-06-22 20:44:41 +02:00
Allan Odgaard
990f972a04 Remove use of @synthesize in bundle editor code 2016-06-22 20:44:41 +02:00
Allan Odgaard
0d0e8505dd Remove use of @synthesize in preferences window code 2016-06-22 20:44:41 +02:00
Allan Odgaard
96508d81c3 Remove unused function (os_tuple) 2016-06-22 20:44:41 +02:00
Allan Odgaard
fdaf7ca732 Remove workaround for OS bug (10.8) 2016-06-22 20:44:41 +02:00
Allan Odgaard
ef2d50606f Use non-deprecated version of weak NSMapTable (10.8) 2016-06-22 20:44:41 +02:00
Allan Odgaard
7dd19c0c0e Update deployment target to 10.8 for all xib files 2016-06-22 20:43:28 +02:00
Allan Odgaard
469fd74a7b Rely on ARC to manage GCD types (10.8) 2016-06-22 20:43:28 +02:00
Allan Odgaard
e2be8a104d Set minimum OS to 10.8
You need to re-run ./configure or edit $builddir/build.ninja before this has effect.
2016-06-22 20:43:28 +02:00
Allan Odgaard
53157bedd6 Checkin release notes 2016-06-22 20:43:28 +02:00
Allan Odgaard
28533a48d6 Ignore binary identification glob when search should include binary files 2016-06-22 19:45:24 +02:00
Allan Odgaard
d6993bb476 Remove xib from binary file identification glob 2016-06-22 19:45:24 +02:00
Allan Odgaard
c50795af91 Simplify code by using std::function 2016-06-22 18:31:49 +02:00
Allan Odgaard
ff4a796c20 Don’t pass inserted data to the buffer_t metadata hooks
None of the hooks actually use this data and as they are called after the replacement has been done, they can query the buffer, should they require information about its content.

The problem with having to pass the data pointer to the hooks is that there could be future situations in where the buffer’s data is not inserted as one contiguous block of memory, for example we could allow constructing a buffer from a storage_t instance.
2016-06-22 18:31:49 +02:00
Allan Odgaard
61a3a6229a Use constructor delegation for buffer_t 2016-06-22 18:31:49 +02:00
Allan Odgaard
f5832c975f Add missing include statements 2016-06-22 18:31:49 +02:00
Allan Odgaard
371d426c5f Add ‘char const*’ insertion API to ng::buffer_t 2016-06-21 23:23:44 +02:00
Allan Odgaard
7ac10b7b29 Add to_ns helper function which creates an NSString from std::string 2016-06-21 22:11:13 +02:00
Allan Odgaard
daa90613f0 Use BOM versions of UTF-16/32 in list of default encodings
If we find that the user doesn’t have any BOM versions enabled but do have the non-BOM versions then we update their settings to instead use the BOM versions.
2016-06-21 19:47:44 +02:00
Allan Odgaard
b72091b3bb The encoding::charset_from_bom function now return “«charset»//BOM” 2016-06-21 19:32:47 +02:00