Allan Odgaard
4d6a8174f0
Fix variable names in debug statement
2014-09-02 18:59:28 +02:00
Allan Odgaard
91e3c2c0de
Ask for search results to fade out when being removed
2014-09-01 17:37:11 +02:00
Allan Odgaard
d2a2a9dfdd
Don’t call NSOutlineView’s sizeLastColumnToFit
...
This doesn’t seem to be required, might only have been an issue with cell-based outline views, or perhaps only on an older version of the OS.
2014-09-01 17:37:11 +02:00
Allan Odgaard
5cc60a6d5b
Use NSOutlineView’s insertItemsAtIndexes:… instead of reloadData
...
We wrap it in begin/endUpdates because the number of results badges might otherwise show briefly, as expansion happens post-insertion.
2014-09-01 17:37:11 +02:00
Allan Odgaard
4e5e4ef601
Add badges to show number of search results (when collapsed)
...
This is implemented by observing NSOutlineView’s did expand/collapse item notification and then asking for a full reload of the outline view.
None of the granular reload methods would cause the view to be recreated, and there is no “isExpanded” property that the view can bind to.
Given the above, it might be a good idea to introduce an NSTableCellView subclass / view controller for the group view and have this handle it, to avoid the overhead of asking for a full reload each time an item is expanded/collapsed (which is multiplied by number of items when using expand/collapse all).
2014-09-01 17:37:11 +02:00
Allan Odgaard
da27ee570e
Remove unused cell-based outline view method
2014-09-01 17:37:11 +02:00
Allan Odgaard
33d347cedd
Use toggle button for status bar instead of NSTextField subclass
2014-09-01 17:37:10 +02:00
Allan Odgaard
8940593af0
Rely on bindings for document edited and Replace All button state
...
Also fix an issue where it would show Replace Selected even with search results hidden.
2014-09-01 17:37:10 +02:00
Allan Odgaard
75e7ebaca2
Don’t implement the NSCopying protocol for FFResultNode
...
This doesn’t seem to be a requirement when using view-based NSOutlineViews, and as our implementation wasn’t actually doing any copying, better to not pretend we conform to this interface.
2014-09-01 17:37:10 +02:00
Allan Odgaard
0d04dc7efa
Give the find dialog a more predictable key view loop
2014-08-30 16:19:23 +02:00
Allan Odgaard
05cf40d77b
Convert tabs in search results to em-spaces
...
This is to decrease the tab width which technically should be doen by creating NSTextTab objects (with tab positions), but that is too complex and I think ideally we should visualize the tabs (e.g. “‣”) like we do in the search/clipboard history windows.
2014-08-30 08:51:33 +02:00
Allan Odgaard
356a21d7e7
Add button to remove search results from the list
2014-08-28 13:40:24 +02:00
Allan Odgaard
9e0d0e9b34
Limit data reload of results outline view
2014-08-28 13:40:24 +02:00
Allan Odgaard
5a45023f9e
Add new method to Find class: ‘takeSearchResultToRemoveFrom:’
...
This can be used after a completed search to prune the results. Currently though no UI is connected to this action.
2014-08-27 09:26:56 +02:00
Allan Odgaard
7262dd9d27
Switch search results to a view-based outline view
...
Currently does not support dragging of the file icon nor does it show number of matches in a single file when results are collapsed.
2014-08-27 09:14:10 +02:00
Allan Odgaard
23261fe293
Use reloadDataForRowIndexes:columnIndexes: instead of reloadData:
...
This is mainly in preparation of switching to a view-based table view where reloadData: loses the selection (and recreates all table row views).
2014-08-27 09:12:01 +02:00
Allan Odgaard
75ae3cd52d
Use bindings to track count of leafs and excluded leafs
2014-08-27 09:12:01 +02:00
Allan Odgaard
e098611387
Use the correct selected text color (for lists)
2014-08-27 09:12:01 +02:00
Allan Odgaard
0ff652d5c9
Introduce semantic convenience getters
2014-08-27 09:12:01 +02:00
Allan Odgaard
ff99f06647
Provide base directory when creating FFResultNode group nodes
2014-08-27 09:12:01 +02:00
Allan Odgaard
cebb90b6c8
Remove implementation details from Find singleton’s interface
2014-08-27 09:12:01 +02:00
Allan Odgaard
44358ad034
Rename FFResultNode property: ‘exclude’ → ‘excluded’
2014-08-27 09:12:01 +02:00
Allan Odgaard
1ee217adc6
Rename FFResultNode property: ‘matches’ → ‘children’
2014-08-27 09:11:58 +02:00
Allan Odgaard
860a6aa546
Let FFResultNode tree track count of leafs and excluded leafs
2014-08-27 09:10:44 +02:00
Allan Odgaard
c27082a5f6
Fix zero row height for empty match ranges
2014-08-27 09:09:00 +02:00
Allan Odgaard
0bb7acfbf3
Add ‘removeFromParent’ to FFResultNode
2014-08-24 12:12:24 +02:00
Allan Odgaard
bb41b55d16
Remove folder_scan_settings_t (API simplification)
2014-08-24 12:12:24 +02:00
Allan Odgaard
93e14c6a15
Update includes
2014-08-24 12:12:23 +02:00
Allan Odgaard
89e395df44
Abort search when closing find dialog
2014-08-24 12:12:23 +02:00
Allan Odgaard
aa27ccced5
Move some logic to the FFResultNode type
2014-08-23 17:45:22 +02:00
Allan Odgaard
846c220b6b
Exclude line after match from excerpt when match ends with LF
2014-08-23 17:45:22 +02:00
Allan Odgaard
40ab59447c
Move convenience functions from FFMatch → FFResultNode
2014-08-23 17:45:22 +02:00
Allan Odgaard
e6185fd5a1
Move select next/previous tab/result out of window controller
2014-08-23 17:45:22 +02:00
Allan Odgaard
871a0df11a
Introduce showResultNode: convenience method
2014-08-23 17:45:21 +02:00
Allan Odgaard
54ac376825
Change terminology: ‘Match’ → ‘ResultNode’
2014-08-23 17:45:21 +02:00
Allan Odgaard
180f21d7aa
Add first/last match convenience methods to FFResultNode
2014-08-23 17:45:21 +02:00
Allan Odgaard
87dcaf93ec
Iterate all search results using a single for-loop
2014-08-23 17:45:21 +02:00
Allan Odgaard
f855739d33
Use FFResultNode objects as the ‘Go To’ menu’s representedObject
2014-08-23 17:45:21 +02:00
Allan Odgaard
2f6370f4b0
Use a FFResultNode object to contain top-level results
2014-08-23 17:45:21 +02:00
Allan Odgaard
1cabec256c
Use custom type for search results to get better type checking
...
This also makes it easy to have next/previous/parent (weak) pointers for better traversing.
2014-08-23 17:45:21 +02:00
Allan Odgaard
34965c230d
Find All for single document: Fix absolute path in search results
2014-08-22 14:58:44 +02:00
Allan Odgaard
b1b0ffda58
Add ‘charset’ property to FFFilePathCell
...
This is really just a right-aligned label, but we might later change how it’s drawn.
2014-08-22 09:33:41 +02:00
Allan Odgaard
6646a14da1
Use alternate status string to show how many bytes were searched
2014-08-21 17:40:20 +02:00
Allan Odgaard
4b521541d7
Support alternate status string in find dialog window
...
The alternate string is shown after the user clicks the status bar.
2014-08-21 17:39:13 +02:00
Allan Odgaard
50d3a584c9
Track how many bytes we search
2014-08-21 17:36:16 +02:00
Allan Odgaard
4a2a3997cc
Update API of find::scan_path_t
2014-08-21 16:50:05 +02:00
Allan Odgaard
a06554b638
Minor update of FFDocumentSearch’s instance data usage
...
Prior to this commit the ‘searchDuration’ property would actually return seconds since we last started a search, rather than how long the last search took.
2014-08-21 16:07:23 +02:00
Allan Odgaard
2908384a24
Add Check/Uncheck All to folder search action menu
2014-08-21 16:07:23 +02:00
Allan Odgaard
ffe3a464f2
Improve implementation of collapsing/expanding search results
...
We now collapse if more than half the items are expanded, otherwise expand. Previously we relied on a property to track the collapsed/expanded state, which could be out of sync if the user manually changed the state for half the items, and we also needed to reset the state variables when updating search results.
2014-08-21 16:06:34 +02:00
Allan Odgaard
baff330459
Refactor Find in Folder code
...
Minor functional changes, for example after replacing we keep showing the search results, but with disabled checkboxes and ‘replace all’ button.
2014-08-21 16:06:34 +02:00