Commit Graph

10 Commits

Author SHA1 Message Date
d845222a11 Bug 700277 - EClientCache allocates memory ad infinity
Remove a ClientData entry on "source-removed" or "source-disabled"
signals from the ESourceRegistry.
2013-05-29 13:09:36 -04:00
aa394ce82e client_cache_process_results: Fix runtime warnings.
Use g_simple_async_result_complete_in_idle() so the queued results
complete in the correct main loop context.  Otherwise we get runtime
warnings:

    "g_simple_async_result_complete() called from wrong context!"
2013-03-14 18:23:34 -04:00
e8b4f7de7f EClientCache cleanups. 2013-02-27 11:45:47 -05:00
3b81518304 EClientCache: Use e_source_registry_dup_unique_display_name().
Use a standard format for naming an ESource in user-visible messages.
2013-02-23 09:35:20 -05:00
2c195f2266 Add e_client_cache_is_backend_dead().
Returns TRUE if an EClient instance for the given source and extension
name was recently discarded after having emitted a "backend-died" signal,
and a replacement EClient instance has not yet been created.
2013-02-20 16:35:58 -05:00
c941bab524 EClientCache: Don't emit signals while holding a lock.
Jeez, I should know this by now.  Schedule an idle callback on the
internal GMainContext to emit the signal like we do for other signals.
2013-02-20 16:35:58 -05:00
1abd497f66 EClientCache: Add a "client-notify" signal.
Rebroadcasts a GObject::notify signal emitted by a cached EClient.
2013-02-20 16:35:58 -05:00
be7376c085 EClientCache: Fix some signal handler ID variable names. 2013-02-20 16:35:58 -05:00
d84b67875c EClientCache: Keep a strong reference on the ESourceRegistry.
Changed my mind.  There's some scenarios where a function depends on an
ESourceRegistry but could also utilize an EClientCache, and it would be
nice to just pass the EClientCache and extract the ESourceRegistry from
it, so we need to make sure the ESourceRegistry will be there when it's
needed and not quietly disappear.
2013-02-17 14:29:49 -05:00
cefa5edf7f Add EClientCache.
New class to help reduce code duplication and centralize some EClient
handling policies.

Benefits:

- EClient instances can be shared across the entire application.

- Centralized rebroadcasting of "backend-died" and "backend-error"
  signals emitted from cached EClient instances.

- Automatic cache invalidation when backends crash.  The EClient
  is discarded, and a new instance is created on the next request.
2013-02-16 18:57:08 -05:00