nautilus/libnautilus-private/nautilus-private-enum-types.c.template
Carlos Soriano ff6ccbaf40 search: done loading signal only if not restarting engine
It was working as:
- Search directory starts a new search
- Search engine starts all search providers, each one in its
own thread.
- User changes query
- Search engine stops all search providers
- Searchs providers, since they are in its own thread, cancel
in a unknown time.
- Search directory starts a new search, even before all providers
are finished.
- Search engine is marked as need to restart.
- Search providers finished.
- Search engine emits finished signal, since all search providers
now are stopped.
- Clients doesn't have a way to know if the engine
actually finished searching the current search, or the previous
search that the client asked to stop. That might confuse clients
if they ask for results.
- Search engine restart the search providers without noticing the
client, that thinks that the latest search it started was finished
already.

So to fix this confusion, only report that the engine actually finished
if the engine is not going to restart the search providers.
In this way a client can start a batch of consecutive searches without
the risk of getting search finished signals from previous searches.
Clients now will always get the search-finished signal of the
latest search they started.
2015-07-22 13:02:04 +02:00

41 lines
730 B
Plaintext

/*** BEGIN file-header ***/
#include "nautilus-private-enum-types.h"
/*** END file-header ***/
/*** BEGIN file-production ***/
/* enumerations from "@filename@" */
#include "@filename@"
/*** END file-production ***/
/*** BEGIN value-header ***/
GType
@enum_name@_get_type (void)
{
static GType the_type = 0;
if (the_type == 0)
{
static const G@Type@Value values[] = {
/*** END value-header ***/
/*** BEGIN value-production ***/
{ @VALUENAME@,
"@VALUENAME@",
"@valuenick@" },
/*** END value-production ***/
/*** BEGIN value-tail ***/
{ 0, NULL, NULL }
};
the_type = g_@type@_register_static (
g_intern_static_string ("@EnumName@"),
values);
}
return the_type;
}
/*** END value-tail ***/