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
Keep a ref to the engine while the async search is in progress. This is
what all the other engines do, and not doing it causes problems when
cancelling the operation.
While we're at it, also refactor the completion notification code in a
single function.
https://bugzilla.gnome.org/show_bug.cgi?id=686168
Add another input-only child to the parent GdkWindow's for events and
imcontext. Since we will be painted in a GtkLayout, using only one
input-only window won't work well with scrolling, but this way we can
ensure that whatever GdkWindow the XIM engine will try to ensure native,
it won't be our (floating) drawing window.
https://bugzilla.gnome.org/show_bug.cgi?id=686053
Use the same behavior of GtkEntry i.e. create an input only GdkWindow
for the text area. This avoids the text area becoming black when it's
used together with the XIM module.
https://bugzilla.gnome.org/show_bug.cgi?id=686053
We used to do this implicitly, but
6b5ffd4e88 made it necessary to call it
manually, since we avoid g_application_register() when we perform self
checks.
So that they get the same kind of bonus they would if they matched with
the other engines. The FTS rank that tracker gives us is added as
another bonus.
When we're getting reloaded, we should wait for the completion of all
engines before triggering a new search. When this happens, set an
internal restart flag and apply it when the last provider returns.
This avoids finished signals from providers that complete the previous
search after a while to being interpreted for the current search.
And among those with the same distance from the search root, add more
bonus for recency and FTS rank. This ensures results don't move too much
when searching recursively.
Also, while we're at it, change the code to use GFile instead of simple
string comparisons.
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.
Since we use the vertical layout only for the desktop these days, remove
NautilusCanvasLayoutMode completely, and just return TRUE from
nautilus_canvas_container_layout_is_vertical() if we're a desktop
container.
This allows to remove a lot of unused layouting code.
This ensures desktop icons are pinned to the primary monitor, instead of
moving around when plugging in a new display.
There's also a slight change in behavior introduced by this patch - that
is for multihead configurations where the first monitor in visible order
is not the primary one, it won't be possible to move desktop icons to
monitors to the left, or to the top, of the primary monitor - in other
words, desktop icons layout starts from the primary monitor and expands
rightwards/downwards.
https://bugzilla.gnome.org/show_bug.cgi?id=420624