Change when Evolution loads its extension modules
There had already been a workaround for EClientCache, which proved to be sub-optimal, and it can strike on more places, thus better to load the extension modules before EShell is created.
This commit is contained in:
@ -2103,8 +2103,6 @@ e_shell_get_default (void)
|
||||
void
|
||||
e_shell_load_modules (EShell *shell)
|
||||
{
|
||||
EClientCache *client_cache;
|
||||
const gchar *module_directory;
|
||||
GList *list;
|
||||
|
||||
g_return_if_fail (E_IS_SHELL (shell));
|
||||
@ -2112,15 +2110,6 @@ e_shell_load_modules (EShell *shell)
|
||||
if (shell->priv->modules_loaded)
|
||||
return;
|
||||
|
||||
/* Load all shared library modules. */
|
||||
|
||||
module_directory = e_shell_get_module_directory (shell);
|
||||
g_return_if_fail (module_directory != NULL);
|
||||
|
||||
list = e_module_load_all_in_directory (module_directory);
|
||||
g_list_foreach (list, (GFunc) g_type_module_unuse, NULL);
|
||||
g_list_free (list);
|
||||
|
||||
/* Process shell backends. */
|
||||
|
||||
list = g_list_sort (
|
||||
@ -2130,11 +2119,6 @@ e_shell_load_modules (EShell *shell)
|
||||
g_list_foreach (list, (GFunc) shell_process_backend, shell);
|
||||
shell->priv->loaded_backends = list;
|
||||
|
||||
/* XXX The client cache needs extra help loading its extensions,
|
||||
* since it gets instantiated before any modules are loaded. */
|
||||
client_cache = e_shell_get_client_cache (shell);
|
||||
e_extensible_load_extensions (E_EXTENSIBLE (client_cache));
|
||||
|
||||
shell->priv->modules_loaded = TRUE;
|
||||
}
|
||||
|
||||
|
||||
@ -358,6 +358,7 @@ create_default_shell (void)
|
||||
GSettings *settings;
|
||||
GApplicationFlags flags;
|
||||
gboolean online = TRUE;
|
||||
GList *module_types;
|
||||
GError *error = NULL;
|
||||
|
||||
settings = e_util_ref_settings ("org.gnome.evolution.shell");
|
||||
@ -391,6 +392,10 @@ create_default_shell (void)
|
||||
g_clear_error (&error);
|
||||
}
|
||||
|
||||
/* Load all shared library modules. */
|
||||
module_types = e_module_load_all_in_directory (EVOLUTION_MODULEDIR);
|
||||
g_list_free_full (module_types, (GDestroyNotify) g_type_module_unuse);
|
||||
|
||||
flags = G_APPLICATION_HANDLES_OPEN |
|
||||
G_APPLICATION_HANDLES_COMMAND_LINE;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user