summaryrefslogtreecommitdiff
path: root/src/nautilus-shell-search-provider.c
Commit message (Collapse)AuthorAgeFilesLines
* general: Run uncrustify scriptOndrej Holy2020-04-051-1/+1
| | | | | There are some style issue since the last run. Let's run it again before enabling style-check CI job.
* general: Allow to compile on Wayland-only systemJavier Jardón2019-12-011-1/+1
| | | | Remove unneeded includes and add some guards to X11-only code.
* shell-search-provider: Respect recursive-search preferenceJiří Černý2019-08-311-10/+14
| | | | | | | | | In the case when recursive-search preference was different from 'never', when launching a new nautilus window from the shell search, new window's search was always non-recursive. This makes new window's search to respect the global user preference. Fixes: https://gitlab.gnome.org/GNOME/nautilus/issues/854
* shell-search-provider: Use indexed search on nautilus launch only if disabledMarco Trevisan (Treviño)2018-07-261-1/+15
| | | | | | | | | | In case we're searching something from the overview, we expect the same results to be opened in nautilus, whatever the user set on the options regarding how he wants to perform the search. At the same way we don't want to block simple-search to run in this case if the user has enabled recursive search, since this action is something that is explicitly requested.
* shell-search-provider: override hidden files search only for overviewMarco Trevisan (Treviño)2018-07-261-1/+1
| | | | | | | | | | We should limit search to hidden files only when searching in overview, not when nautilus is launched from the shell search results. In fact, while it make sense to present only main results in the overview search, it's better to follow user preferences when clicking on the nautilus icon on search results, as we expect that nautilus view to go deeper if the user is fine with searching into hidden files.
* shell: pass the full query to the slot to preserve all settingsMarco Trevisan (Treviño)2018-07-261-19/+22
| | | | | | | Instead of just opening a window with just the location and search terms, we should pass to the window slot the full nautilus query with all the shell search provider flags, so that they will be respected and that the results in the overview will respect the ones in nautilus
* shell-search-provider: enable recursive search on indexed enginesMarco Trevisan (Treviño)2018-07-261-0/+1
| | | | | | Allow to retrieve results from search engines which are only searching on over indexed results (tracker, recent in future), while disable them otherwise (simple search)
* general: Allow running in separate instanceErnestas Kulik2018-03-181-1/+1
| | | | | | | | | | | | | | | | When hacking on Nautilus, it is very inconvenient to have to close any running instance before running the built version. This commit enables running three different instances by changing the application ID. Beside the default “profile” is one crafted for stable flatpak releases and one for development. The stable flatpak profile adds an identifying mark to the about dialog to aid collecting information in bug reports. The development profile is that plus additional styling to help visually identify the development instance. It also will be used when generating Flatpak bundles with the help of CI. Generally, the implementation is slightly hacky to allow all the different workflows, spanning from regular installations to GNOME Builder flatpak builds, as each comes with its own quirks.
* shell-search-provider: Only use location in descriptionFlorian Müllner2017-08-071-2/+4
| | | | | | | | | | | | | The filename is likely to match the display name, which is already prominently used as the result name, so including it in the description doesn't add any information. In fact, as gnome-shell is about to display name and description on a single line[0], duplicating the filename increases the chances of less information being displayed due to ellipsization. [0] https://raw.githubusercontent.com/gnome-design-team/gnome-mockups/master/shell/search/search-list-layout.png https://bugzilla.gnome.org/show_bug.cgi?id=784105
* general: use gdk_monitor_get_scale_factorAlexandru Pandelea2017-03-091-1/+1
| | | | | | | As it is deprecated, instead of using gdk_screen_get_monitor_scale_factor use gdk_monitor_get_scale_factor(). https://bugzilla.gnome.org/show_bug.cgi?id=779774
* general: use gtk_show_uri_on_window ()Ernestas Kulik2017-02-231-1/+1
| | | | | | | gtk_show_uri () has been deprecated. This commit makes the code make use of the recommended API instead. https://bugzilla.gnome.org/show_bug.cgi?id=779083
* shell-search-provider: cast pointers to drop const qualifierRazvan Chitu2016-10-051-2/+2
| | | | | | The type check instance cast macros provided by GLib produce compiler warnings when used on const pointers. In order to fix this, cast the pointers to the non-const variant.
* general: run uncrustifyCarlos Soriano2016-08-291-474/+525
| | | | | | | | And make the style of Nautilus the same for all files. Hopefully we can fix all the style issues we can find in the next days, so expect a little of movement on this. https://bugzilla.gnome.org/show_bug.cgi?id=770564
* shell-search-provider: remove simple engine recursivityCarlos Soriano2016-08-291-3/+0
| | | | | | | | | | | | | | | | | | | | | In 26a3ab4cd5 we put recursivity to the simple search engine in order to fix the report of some users that weren't getting files inside folder of home directory. However this is wrong, since it takes too long and gnome-shell search provider doesn't have a way to get partial results or close the search when done, which makes Nautilus not reporting results until the search is done, and in case the user stops the shell search, nautilus keeps searching making the CPU consumption really high. In fact, we always made recursivity for tracker but not for the simple engine when performing the shell search. The issue users were experiencing seems unrelated to this, and I actually cannot reproduce, so let's return to the regular behaviour we had. https://bugzilla.gnome.org/show_bug.cgi?id=766174
* shell-search-provider: fix incompatible pointer assignmentErnestas Kulik2016-08-051-1/+1
| | | | | | | In execute_search(), there is a pointer assignment of incompatible type. This commit fixes that by adjusting the variable type. https://bugzilla.gnome.org/show_bug.cgi?id=769526
* shell-search-provider: make search recursiveCarlos Soriano2016-07-281-0/+3
| | | | | | | We lost the recursivity on the shell search with the search rework. We need to explicitly set recursivity on the simple provider now. https://bugzilla.gnome.org/show_bug.cgi?id=766174
* 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