diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2004-02-02 06:52:10 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2004-02-02 06:52:10 +0800 |
commit | 29381411f305c8ddc80cea606f35a225cfdbf990 (patch) | |
tree | 92bd7be6001a0151e7ce4d91ba38ae603c7a515b /src | |
parent | 1617c0c726c160c11707e57ed0af49084b93d5d6 (diff) | |
download | gsoc2013-epiphany-29381411f305c8ddc80cea606f35a225cfdbf990.tar gsoc2013-epiphany-29381411f305c8ddc80cea606f35a225cfdbf990.tar.gz gsoc2013-epiphany-29381411f305c8ddc80cea606f35a225cfdbf990.tar.bz2 gsoc2013-epiphany-29381411f305c8ddc80cea606f35a225cfdbf990.tar.lz gsoc2013-epiphany-29381411f305c8ddc80cea606f35a225cfdbf990.tar.xz gsoc2013-epiphany-29381411f305c8ddc80cea606f35a225cfdbf990.tar.zst gsoc2013-epiphany-29381411f305c8ddc80cea606f35a225cfdbf990.zip |
Decouple extensions manager initialisation and extensions loading. Fixes a
2004-02-01 Christian Persch <chpe@cvs.gnome.org>
* src/ephy-extensions-manager.c: (ephy_extensions_manager_init):
* src/ephy-extensions-manager.h:
* src/ephy-shell.c: (ephy_shell_get_extensions_manager):
Decouple extensions manager initialisation and extensions loading.
Fixes a crash when an extensions tried to get the session,
causing us to load extensions more than once.
Diffstat (limited to 'src')
-rw-r--r-- | src/ephy-extensions-manager.c | 4 | ||||
-rw-r--r-- | src/ephy-extensions-manager.h | 3 | ||||
-rw-r--r-- | src/ephy-shell.c | 6 |
3 files changed, 9 insertions, 4 deletions
diff --git a/src/ephy-extensions-manager.c b/src/ephy-extensions-manager.c index d7d44d521..9dc4d6842 100644 --- a/src/ephy-extensions-manager.c +++ b/src/ephy-extensions-manager.c @@ -130,7 +130,7 @@ ephy_extensions_manager_load (EphyExtensionsManager *manager, return extension; } -static void +void ephy_extensions_manager_load_dir (EphyExtensionsManager *manager, const char *path) { @@ -187,8 +187,6 @@ ephy_extensions_manager_init (EphyExtensionsManager *manager) manager->priv->loaders = NULL; manager->priv->extensions = NULL; - - ephy_extensions_manager_load_dir (manager, EXTENSIONS_DIR); } static void diff --git a/src/ephy-extensions-manager.h b/src/ephy-extensions-manager.h index 481b13ccf..22e956a0b 100644 --- a/src/ephy-extensions-manager.h +++ b/src/ephy-extensions-manager.h @@ -60,6 +60,9 @@ EphyExtensionsManager *ephy_extensions_manager_new (void); EphyExtension *ephy_extensions_manager_load (EphyExtensionsManager *manager, const char *filename); +void ephy_extensions_manager_load_dir (EphyExtensionsManager *manager, + const char *path); + EphyExtension *ephy_extensions_manager_add (EphyExtensionsManager *manager, GType type); diff --git a/src/ephy-shell.c b/src/ephy-shell.c index 8d65f60cb..f22da2cc0 100644 --- a/src/ephy-shell.c +++ b/src/ephy-shell.c @@ -710,8 +710,12 @@ ephy_shell_get_extensions_manager (EphyShell *es) if (es->priv->extensions_manager == NULL) { - /* Instantiate extensions manager; this will load the extensions */ + /* Instantiate extensions manager */ es->priv->extensions_manager = ephy_extensions_manager_new (); + + /* load the extensions */ + ephy_extensions_manager_load_dir (es->priv->extensions_manager, + EXTENSIONS_DIR); } return G_OBJECT (es->priv->extensions_manager); |