Commit Graph

27 Commits

Author SHA1 Message Date
Philippe Saint-Pierre
852e061a74 Allow TextSearch add-on to be used also on volumes.
This fixes ticket #3386.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30391 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-25 04:16:09 +00:00
Jonas Sundström
2db5c7580c Spotted a few left-over occurences of the previous names: TrackerGrep and Tracker Grep. Simplified the About window: Version is no longer essential. Its simply part of Haiku now. The name is more self-explanatory now, so there is no need to explain the purpose of the application in the About window. Removed the mention of myself as the maintainer, as its maintained collectively by Haiku now. Moved myself into the list of contributors, after Oliver Tappe, which I think is chronologically correct. If the primary copyright holder was Haiku and not Matthijs Hollemans, it would have been appropriate to use Haikus BAboutWindow, but alas.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29932 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-05 13:08:42 +00:00
Stephan Aßmus
f3142445ae Fixed the layout/width of the search string text view.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28028 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-13 12:02:32 +00:00
Karsten Heimrich
05ea853598 * fix some mem leaks
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27858 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-03 12:36:58 +00:00
Karsten Heimrich
c716766b3d * whitespace cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27857 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-03 12:35:57 +00:00
Stephan Aßmus
f88398b6ac * GrepWindow::_AreAllFoldersOpenInTracker() could still leak entry_refs,
even in not unlikely situations.
* GrepWindow::_SelectFilesInTracker() was still leaking entry_refs in the
  success code path.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27577 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-15 20:09:15 +00:00
Ryan Leavengood
3d65935d2d Fixed CID 1294 and 1295: delete the entry_ref on the terminating conditions.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27433 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-12 06:10:56 +00:00
Stephan Aßmus
a4def7bd0f Node monitoring changes:
* In the ChangesIterator, just remove removed files from the HashMap, regardless
  if they could be considered "temporary" or not.
* If a file is removed, we can directly remove it from the results list. This
  makes removing files from the result list more robust and quicker if this
  was the only thing that happened with regards to node monitoring (the grep
  process does not need to be run again).
* Refactored removing result items from the list on result notifications.
* Beginnings of supporting moving files within the watched folder hierarchy.
  If they were just moved, the new location should update in the list.
  (not well tested)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27377 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-08 11:31:06 +00:00
Stephan Aßmus
f0d8b55fe6 Add method to remove all subitems of a result item, and optionally also the
item itself.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27376 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-08 11:25:57 +00:00
Stephan Aßmus
e74f2e8388 * Small cleanup
* Mention the fact that the same code is used in DiskUsage.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27375 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-08 11:24:59 +00:00
Stephan Aßmus
24094896b0 Change prefs file name to just "TextSearch". No reason to append "Settings"
if this file is to be found in the "settings" folder...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27374 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-08 11:24:24 +00:00
Stephan Aßmus
7c9d86d7c1 Change default settings to "Invoke in Pe" if Pe is installed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27373 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-08 11:23:40 +00:00
Stephan Aßmus
545bce00c6 * Added more tracing facilities (Function enter/exit printer)
* Decreased the node monitor activity timeout to 150 ms
* _StartNodeMonitoring() simply starts watching the root folder with the
  B_WATCH_RECURSIVELY flag set. (Requires forthcomming changes to
  BPathMonitor, but it was broken anyways.)
* _StopNodeMonitoring() returns early if node monitoring is inactive.
* When node monitoring is started after a search finished, it is done
  asynchronous, since messing with the other controls results in modification
  messages that otherwise stop node monitoring again. Now the message is
  inserted last and works reliably.
* When receiving B_PATH_MONITOR messages, they are supposed to simply contain
  a "path" field with the full path to the node that changed. That's not
  currently the case with BPathMonitor, but I will commit that stuff next.
  (Was broken before anyways.)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26935 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-11 19:08:12 +00:00
Stephan Aßmus
b815b7edc6 * Added convenience methods for debugging.
* Added better tracing support.
* GetNextName() was not incrementing the index when iterating to the next entry
  and was therefor broken if the object managed more than one entry.
* Made a small simplification in EntryRemoved().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26934 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-11 19:00:35 +00:00
Stephan Aßmus
0f5788e861 It's important to add the ref ot the message also when we are reporting a
negative.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26933 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-11 18:57:09 +00:00
Stephan Aßmus
39c564f1e7 * Turn the debug output for node monitoring optional tracing.
* Output something if the node monitor message does not contain the expected
  fields (Haiku node monitoring is soo much easier...)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26869 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-07 21:37:32 +00:00
Stephan Aßmus
a5b8a7dfc9 Handle removed files.
* On Haiku, this will make them disappear from the results list.
* On BeOS, it will only work around the problem that we don't know
  which file was removed from the node monitoring message...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26848 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-06 20:22:50 +00:00
Stephan Aßmus
28fd262f0e Stop node monitoring when the model changes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26846 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-06 19:55:19 +00:00
Stephan Aßmus
c891bf220e Fix compilation for BeOS compatible targets.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26845 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-06 19:41:00 +00:00
Stephan Aßmus
962a6c67e9 Finished implementing and enabled node monitoring on the folders and files
of the current search. If new files match the pattern, the appear in the
results, or are removed if they don't match anymore. The results also
adapt to changes in the files.
Basically, I added another iterator that is also used to track changes when
node monitor events arrive. Only those changed files are grepped again after
a timeout of .5 seconds when no new node monitor events pour in.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26809 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-04 21:51:33 +00:00
Stephan Aßmus
3b364ddd42 Intermediate commit, because I want to rename FolderIterator but it has changes.
* Beginnings of node monitoring support. Currently disabled, but detects
  new, changed and removed files. Folders untested yet. There may also be
  a problem with the toplevel folders when a pose selection message is used.
  That's untested too as of yet.
* Removed some superfluous whitespace.
* Small refactoring in FolderIterator to access some stuff from the outside
  as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26795 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-04 15:16:30 +00:00
Stephan Aßmus
3896078543 * Refactoring, added const specifiers to helper methods that don't modify the
object.
* Improved check that enforces search pattern history limit to also handle
  the case when the limit is changed in the source.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26787 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-04 12:53:55 +00:00
Stephan Aßmus
684507777b Refactoring
* FileIterator is now a mostly abstract interface
* FolderIterator is the currently only implementation (there could be
  MessageIterator for an even better separation, which would read the top
  level search folders from the BMessage with the selected poses, but it
  would mostly use the same code for traversing the subfolders anyways so I
  left that for the time being.)
* The Grepper and FolderIterator now copy the current settings from the Model
  at instantiation. Since they run in a separate thread and the Model may
  actually be changed from the Window thread, I think this is just a cleaner
  and more safe solution.
* Cleanup here and there.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26786 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-04 11:30:21 +00:00
Stephan Aßmus
1fffad3f43 Refactored a new class FileIterator from Grepper that will make adding
node monitoring easier. Also, FileIterator will be split to make the code
cleaner with regards to folder or selection mode.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26752 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-03 10:45:51 +00:00
François Revol
e1ebbfbbd8 Fix gcc4 build. my->beers--;
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26748 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-02 23:57:03 +00:00
Ingo Weinhold
0ad9adef62 Build fix.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26744 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-02 21:15:17 +00:00
Stephan Aßmus
edf2516d60 Moved TextSearch to apps folder, since it's actually a regular app.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26738 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-02 18:51:20 +00:00