summaryrefslogtreecommitdiff
path: root/src/nautilus-shell-search-provider.c
Commit message (Collapse)AuthorAgeFilesLines
* general: merge libnautilus-private to srcwip/csoriano/private-to-srcCarlos Soriano2016-04-251-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And fix make distcheck. Although libnautilus-private seem self contained, it was actually depending on the files on src/ for dnd. Not only that, but files in libnautilus-private also were depending on dnd files, which you can guess it's wrong. Before the desktop split, this was working because the files were distributed, but now was a problem since we reestructured the code, and now nautilus being a library make distcheck stop working. First solution was try to fix this inter dependency of files, but at some point I realized that there was no real point on splitting some of those files, because for example, is perfectly fine for dnd to need to access the window functions, and it's perfectly fine for the widgets in the private library to need to access to all dnd functions. So seems to me the private library of nautilus is somehow an artificial split, which provides more problems than solutions. We needed libnautilus-private to have a private library that we could isolate from extensions, but I don't think it worth given the problems it provides, and also, this not so good logical split. Right now, since with the desktop split we created a libnautilus to be used by the desktop part of nautilus, extensions have access to all the API of nautilus. We will think in future how this can be handled if we want. So for now, merge the libnautilus-private into src, and let's rethink a better logic to split the code and the private parts of nautilus than what we had. Thanks a lot to Rafael Fonseca for helping in get this done. https://bugzilla.gnome.org/show_bug.cgi?id=765543
* shell-search: use correct castingCarlos Soriano2016-03-101-1/+1
|
* shell-search-provider: make it work againCarlos Soriano2016-03-031-2/+1
| | | | | | | | | | | | | | | | | | | We removed the search action with a rework on the whole handling of views/slots/search-query handling to decouple the code better and not expose API that is not needed outside. The problem is that we actually needed a way to search from the application, since gnome-shell search provider communicates in that way. However we missed this since it was just an action in the application, which made us don't catch this. Now we allow a search in the whole stack but in a cleaner and direct way to not be in the same situation in the future. This patch use that to make the shell search provider work again. https://bugzilla.gnome.org/show_bug.cgi?id=762076
* shell-search-provider: don't crash if file doesn't have pathCarlos Soriano2016-03-031-1/+2
| | | | | | | | | Some backends doesn't support g_file_get_path, like the trash backends, and we were crashing trying to create a description with a NULL path. For those, just use the uri as a description. https://bugzilla.gnome.org/show_bug.cgi?id=762076
* query: make NautilusQuery a final classGeorges Basile Stavracas Neto2016-02-021-4/+5
| | | | | | | | | | | | | NautilusQuery handle all the necessary data to perform searches throughout directories. Currently, there is no NautilusQuery subclass in Nautilus code, and - since it's inside libnautilus-private - there is no way to subclass it. This commit updates NautilusQuery code be a final class.
* bookmark-list: use internal list for clientsCarlos Soriano2015-12-161-5/+4
| | | | | So we will be able to remove some of the public API, since we can use GList functions.
* shell-search-engine: fix crashCarlos Soriano2015-07-231-2/+3
| | | | | | | With latests commits we changed the finished signal to report also the search engine status. I forgot to change it for the shell-search-provider as well, which was making nautilus crash when searching on shell.
* search-provider: initialize volume monitor lazilyCosimo Cecchi2015-05-241-8/+6
| | | | | There is no need to initialize the volume monitor early, since it's already a singleton.
* search-provider: initialize bookmark list lazilyCosimo Cecchi2015-05-241-6/+12
| | | | | | | | | NautilusBookmarkList is already a singleton; since the shell provider object is created before the application knows whether it's the primary instance or not, loading the list in that code path makes us do ore work than needed when we're only running as a launcher. Just call the singleton getter every time.
* nautilus-shell-search-provider: Add path as descriptionCarlos Soriano2015-02-021-0/+7
| | | | | | | | | | It's useful to differentiate files from different folders with the same name. That's a common problem that we hit in the normal nautilus search. But it's easily fixable for the shell provider search, adding the path as a description. https://bugzilla.gnome.org/show_bug.cgi?id=743715
* search-provider: don't own a separate bus nameCosimo Cecchi2014-04-301-66/+29
| | | | This is not needed anymore, now what we're fully dbus activatable.
* Don't mention FSF addressCosimo Cecchi2014-02-171-2/+1
| | | | | | Use the website instead. https://bugzilla.gnome.org/show_bug.cgi?id=721518
* search-provider: Return TRUE from GDBus method handlersDavid King2013-09-201-6/+11
| | | | | | | | | | | | | | | | As Matthias Clasen noticed, the signal handlers for the gdbus-codegen skeleton for the shell search provider have the wrong signature, and should return TRUE to indicate that the signal has been handled. Otherwise, it is down to chance if the method is handled or if a method-not-implemented error is emitted. It seems that the GCC option -fstack-protector-strong causes the default return value to be interpreted as FALSE, so this might explain why the problem was only noticed by a wide variety of users recently. The bug manifests as Nautilus not returning any search results when using the gnome-shell activities overview search. https://bugzilla.gnome.org/show_bug.cgi?id=692041
* src: don't use deprecated GtkImageMenuItem and GtkStockCosimo Cecchi2013-08-131-1/+0
| | | | | There's another occurrence of GtkImageMenuItem right now, for the "Open With..." menu which is harder to fix.
* Support HiDpi iconsCosimo Cecchi2013-08-031-0/+4
| | | | | Port the rendering of icons to cairo surfaces, so that we can apply the GDK scale factor when rendering icons.
* search-provider: Use a serialized gicon instead of a to_string'd oneJasper St. Pierre2013-07-261-37/+8
| | | | | | This improves deserialization performance in gnome-shell. https://bugzilla.gnome.org/show_bug.cgi?id=704949
* search-provider: fix activation behaviorCosimo Cecchi2013-02-191-3/+10
| | | | | It was unintentionally changed from opening the default application for the result to selecting it in a view.
* shell-search-provider: plug a memleakCosimo Cecchi2013-01-211-2/+0
|
* search-provider: keep a reference to the dbus invocationCosimo Cecchi2013-01-021-2/+4
| | | | | | | | While the operation is in progress, since we're returning the result asynchronously, we need to keep a reference to the invocation, or it could be invalid when returning later. Related: https://bugzilla.redhat.com/show_bug.cgi?id=874534
* shell-provider: use the right signature for LaunchSearch()Cosimo Cecchi2012-12-101-3/+4
|
* shell-provider: don't use a separate binaryCosimo Cecchi2012-12-061-86/+61
| | | | | | | | Since NautilusApplication is a service, we can now handle searches and windows coming and going indipendently just fine. This also allows us to launch a search directly from the search provider very easily.
* search-provider: use org.gnome.Shell.SearchProvider2 interfaceCosimo Cecchi2012-12-061-75/+21
|
* all: remove deprecated g_type_init()Cosimo Cecchi2012-10-261-2/+0
| | | | Now that we depend on GLib master anyway.
* places-sidebar: use the bookmark display nameCosimo Cecchi2012-10-221-2/+2
| | | | | | Instead of the XDG directory name; this makes name edits from the Bookmarks window apply correctly to the sidebar. Likewise, allow renaming of XDG bookmarks from the context menu.
* bookmark-list: change item_with_uri() API to use a GFile insteadCosimo Cecchi2012-10-221-8/+8
| | | | | Avoid GFile<->URI roundtrips if possible. Also, this will allow us to use the same API for another purpose.
* shell-provider: fix an erroneous typoCosimo Cecchi2012-10-191-0/+2
| | | | Didn't mean to remove this line.
* shell-provider: make the provider more robust to cancellationCosimo Cecchi2012-10-181-43/+38
| | | | | | | | | | | Don't assume there's only one engine running at the time, and avoid requiring state from the global app singleton in search callbacks. This fixes a crash where we would dereference NULL in the hits-added callback, since we would access it through the global app object, and self->active_search was previously cleared on cancellation. https://bugzilla.gnome.org/show_bug.cgi?id=686168
* search: remove unused hits-subtracted signalCosimo Cecchi2012-10-151-24/+0
| | | | | Since this is never emitted, keeping the code around just makes it more complicated.
* query: move string matching code in NautilusQueryCosimo Cecchi2012-10-151-22/+8
| | | | | This also allows us to use a heuristic to evaluate how good the filename match is.
* shell-provider: make the shell search provider follow show-hiddenCosimo Cecchi2012-10-111-0/+1
| | | | | | | Add a query property we can set to false from the shell provider, and use it in the simple search engine to exclude hidden files. Note that by default the query sets it to TRUE, so the behavior in Nautilus is unchanged.
* shell-provider: get a timestamp from X when activating the fileCosimo Cecchi2012-09-281-1/+58
| | | | | | | Since the WM itself spawns us, I think the API should pass the timestamp down; since it doesn't, get a timestamp ourselves. https://bugzilla.gnome.org/show_bug.cgi?id=674816
* search: factor out a common helper function and use itCosimo Cecchi2012-09-261-14/+3
|
* shell-search-provider: consolidate string matching for builtin placesCosimo Cecchi2012-09-261-75/+69
| | | | | | | Instead of immediately adding hits to the hash table for every type we're interested in, and loop through the terms array every time, first build a list of builtin match candidates, and then check in a single loop if they're valid search results.
* shell-search-provider: include Home and Trash among the resultsCosimo Cecchi2012-09-261-0/+37
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=684697
* shell-search-provider: warn against NULL strings before normalizingCosimo Cecchi2012-09-251-0/+6
| | | | | | | | | Since g_mount_get_name() and nautilus_bookmark_get_name() can possibly return NULL, warn against it before normalizing the string and trying to compare it with the search terms. This fixes a crasher in the shell search provider. https://bugzilla.gnome.org/show_bug.cgi?id=684807
* search-provider: Add volume mounts only if mountedYanko Kaneti2012-09-191-3/+10
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=684378
* search-provider: also return bookmarks and mountsCosimo Cecchi2012-09-141-2/+190
| | | | Since the hardcoded provider in the Shell is going away.
* shell-provider: implement caching for GVariant metasCosimo Cecchi2012-09-061-15/+54
| | | | Based on a patch by Florian Müllner <fmuellner@gnome.org>
* shell-provider: implement search provider methodsCosimo Cecchi2012-09-061-10/+385
| | | | | Wire the methods with an implementation that uses NautilusSearchEngine to get results.
* shell-provider: add a first skeleton of the shell search providerCosimo Cecchi2012-09-061-0/+204
It's not wired in yet.