Commit Graph

3560 Commits

Author SHA1 Message Date
Allan Odgaard
f2366b42fb Add debug output to Close Other Tabs 2016-09-21 10:17:31 +02:00
Allan Odgaard
0715331daf Let OakDocument use OakSourceControlManager 2016-09-21 08:11:48 +02:00
Allan Odgaard
197a398fd4 WIP: Add OakSourceControlManager 2016-09-21 08:11:48 +02:00
Ronald Wampler
f38eaa5315 Let OakPopOutAnimation set the color in the image to black
This makes the text easier to see against the yellow background.
2016-09-21 08:11:48 +02:00
Allan Odgaard
2ffbfe02a5 Remove find::kSearchOpenFiles constant 2016-09-20 20:04:33 +02:00
Allan Odgaard
1087a68f44 Add “File Browser Items” as find dialog search target 2016-09-20 20:04:19 +02:00
Allan Odgaard
4dc3de163e Guard against infinite loop 2016-09-20 20:03:32 +02:00
Allan Odgaard
9d97662b89 Let FFDocumentSearch accept an array of paths 2016-09-20 20:02:08 +02:00
Allan Odgaard
315735a13a Add helper function for common ancestor 2016-09-20 19:55:16 +02:00
Allan Odgaard
c04430ebe4 FFDocumentSearch no longer search current document or open files 2016-09-20 18:20:36 +02:00
Allan Odgaard
d7f4b5bfb6 Use ‘enabled2’ in binding since we already bind to ‘enabled’
Before the Replace & Find button was enabled for folder searches.
2016-09-20 18:19:20 +02:00
Allan Odgaard
dbee4704cc Clear the countOfMatches properties after unbinding
The Replace All button’s enabled state is based on count of matches (via bindings), so unbinding would leave it possibly enabled when it should have been disabled.
2016-09-20 18:17:37 +02:00
Allan Odgaard
2e61de9f7d Do not show missing items under Recent Places in folder search 2016-09-20 18:17:06 +02:00
Allan Odgaard
e20bb55d18 Use home folder as fallback in FFFolderMenu
This is to avoid an exception when the code is used with menu items that have no represented object (which it normally wouldn’t in shipping code, but it seems it should be supported nonetheless).
2016-09-20 18:16:41 +02:00
Allan Odgaard
53a6708c08 Add API to search for documents at multiple locations 2016-09-20 18:15:20 +02:00
Allan Odgaard
330695a775 Import Find.h instead of redeclaring some of its symbols 2016-09-20 18:14:07 +02:00
Allan Odgaard
c722c0266d Include spelling languages in the bundle item chooser 2016-09-20 18:13:24 +02:00
Allan Odgaard
e3874bcecb Only set menu item image when required
The system can be updating the menu only to resolve a key equivalent, hence the image is not required. The document icon can be a little expensive to create because of the SCM badge. This would be noticeable when doing a folder search with hundres or thousands of results and then pressing ⌘1, here it would previously need to create all the document icons before responding to the key.
2016-09-20 18:12:13 +02:00
Allan Odgaard
1fad00682a Do not include final “newline” when creating image from selection
Previously searching for something with a trailing newline would have the pop-out animation (image) include an extra empty line.

An issue is when only searching for a newline, currently this results in an empty image, so we need to special-case that.
2016-09-20 18:11:23 +02:00
Allan Odgaard
10f88212e4 Use setDynamicTitle: for menu items with dynamic title
See previous commit for details.
2016-09-20 10:03:45 +02:00
Allan Odgaard
60441f69e4 Add NSMenuItem category method to be used for dynamic titles
When a menu item has a custom app shortcut it is necessary to keep the original title as we would otherwise lose the custom app shortcut defined by the user (using the original title).
2016-09-20 10:03:45 +02:00
Allan Odgaard
ad883f7211 fixup! Only set table view’s row height during sizeToFit
Incase of no choices we would set a row height of zero which is not allowed.
2016-09-19 13:12:53 +02:00
Allan Odgaard
7bddb114bc Only obtain SCM info when file chooser is showing Uncommitted Changes 2016-09-19 12:57:50 +02:00
Allan Odgaard
6f4eddf88c Avoid wrapper objects in FileChooser 2016-09-19 12:56:03 +02:00
Allan Odgaard
7cc017f343 Harmonize all implementations of sharedInstance 2016-09-19 12:54:19 +02:00
Allan Odgaard
fe831c2fc2 Declare NSMenuDelegate protocol conformance for OakOpenWithMenu 2016-09-19 12:52:46 +02:00
Allan Odgaard
41bf68e636 Remove FileChooser’s openDocuments property
List of open documents are (now) obtained from OakDocumentController.
2016-09-19 12:51:36 +02:00
Allan Odgaard
9397aed6ef Make document icon and close button update in FileChooser 2016-09-19 12:51:19 +02:00
Allan Odgaard
44d037da65 Use OakDocument’s icon for Select Tab menu items 2016-09-19 12:50:04 +02:00
Allan Odgaard
297cfa1726 Remove unused OakFileIconImage.h includes 2016-09-19 12:49:03 +02:00
Allan Odgaard
636b0fe5f8 Use OakDocument for icon and close button in Open Quickly
Currently these do not update when document properties change.
2016-09-19 12:48:46 +02:00
Allan Odgaard
238ee0cc4f Load potential backup before operating on non-loaded documents 2016-09-19 12:48:12 +02:00
Allan Odgaard
9b75a50520 Fix issue where aborting a file rename did not restore display name 2016-09-19 12:46:54 +02:00
Allan Odgaard
7a69bf3b28 Ensure untitled documents are in the LRU list after session restore 2016-09-19 12:46:07 +02:00
Allan Odgaard
de83ebf06e Introduce OakCreateCloseButton API 2016-09-19 09:01:35 +02:00
Allan Odgaard
ce639d6d09 Move close button graphics to OakAppKit 2016-09-19 08:59:34 +02:00
Allan Odgaard
bc6c05086a Include untitled document’s directory in their description 2016-09-18 13:26:13 +02:00
Allan Odgaard
05711359a0 Also return untitled documents from enumerateDocumentsAtPath:
We look at the document’s directory property to see if it is within the folder being searched.
2016-09-18 13:26:13 +02:00
Allan Odgaard
9e5c4f27b6 OakDocumentController’s openDocuments now return a sorted array 2016-09-18 13:26:13 +02:00
Allan Odgaard
abeaa0498f OakDocument’s icon now indicate when a file is missing on disk 2016-09-18 13:26:12 +02:00
Allan Odgaard
82ad6667e9 Ensure all untitled documents in a project get a directory
We should probably update the directory if the project’s project folder is changed, and we may also consider storing this in the session, at least if we set the directory during “New Tab” (based on current file browser selection).
2016-09-18 13:26:12 +02:00
Allan Odgaard
1627a62b90 Clear document’s directory property when changing path
This is just for good measure.
2016-09-18 13:26:12 +02:00
Allan Odgaard
87dafa3332 Only let untitled documents read settings via directory property 2016-09-18 13:26:12 +02:00
Allan Odgaard
a58f3b88e9 Let document window send ‘open’ to unloaded documents
When batch-opening documents we only load the selected one. Previously this meant that e.g. after session restore, using Find in Open Files would not search documents in background tabs (that had not yet been clicked).
2016-09-18 10:35:33 +02:00
Allan Odgaard
5f53075864 Disable recent tracking for non-open documents instead of non-loaded 2016-09-18 10:33:45 +02:00
Allan Odgaard
d66b2b982d Search open files using OakDocument’s isOpen property 2016-09-18 10:33:20 +02:00
Allan Odgaard
532e9742d2 Add openDocuments property to OakDocumentController
This uses OakDocument’s isOpen property to know which documents are open.

Currently not KVO compliant, but it probably should be.
2016-09-18 10:31:50 +02:00
Allan Odgaard
fa2eaa1e50 Make OakDocument’s open/isOpen separat from isLoaded
A loaded document is always open but an open document is not necessarily loaded.
2016-09-18 10:30:28 +02:00
Allan Odgaard
ddefdec649 Change document’s isOpen property to isLoaded
Since we do not load documents before the user selects them, e.g. after session restore or when opening multiple documents, it makes sense to have both an isOpen and isLoaded property, the former means “is shown somewhere in the UI” and would make it appear (e.g. in file browser) with close button etc., whereas the latter means that data has been loaded from disk, and we can safely access the buffer.
2016-09-18 10:29:21 +02:00
Allan Odgaard
cd58781f19 Increase find results update interval from 0.03 to 0.20 seconds
It looks better when we have a “full page” of results on the first update, rather than building up the first page of results file-by-file with only 0.03 seconds between each “increment”.
2016-09-18 10:29:20 +02:00