aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-automation.c
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@gnome.org>2003-09-24 01:08:54 +0800
committerMarco Pesenti Gritti <marco@src.gnome.org>2003-09-24 01:08:54 +0800
commit30930917e8ce020776e0096928aedfebe779bfd5 (patch)
treec888c0b43e0249264f098b3be4cbfbc876cceb25 /src/ephy-automation.c
parent2e1474156400d308faf8836801ee87607d9632d7 (diff)
downloadgsoc2013-epiphany-30930917e8ce020776e0096928aedfebe779bfd5.tar
gsoc2013-epiphany-30930917e8ce020776e0096928aedfebe779bfd5.tar.gz
gsoc2013-epiphany-30930917e8ce020776e0096928aedfebe779bfd5.tar.bz2
gsoc2013-epiphany-30930917e8ce020776e0096928aedfebe779bfd5.tar.lz
gsoc2013-epiphany-30930917e8ce020776e0096928aedfebe779bfd5.tar.xz
gsoc2013-epiphany-30930917e8ce020776e0096928aedfebe779bfd5.tar.zst
gsoc2013-epiphany-30930917e8ce020776e0096928aedfebe779bfd5.zip
Refactor initialization/automation code. Now all the code used by the
2003-09-23 Marco Pesenti Gritti <marco@gnome.org> * src/ephy-automation.c: (ephy_automation_factory_new): * src/ephy-automation.h: * src/ephy-main.c: (main), (ephy_main_start): * src/ephy-shell.c: (ephy_shell_init), (ephy_shell_finalize): Refactor initialization/automation code. Now all the code used by the first instance is in ephy_shell, all the code used by other instances is in ephy_main. Unref the factory before quitting so we dont risk new automation object are created and used with a dead shell.
Diffstat (limited to 'src/ephy-automation.c')
-rw-r--r--src/ephy-automation.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/ephy-automation.c b/src/ephy-automation.c
index 5980f9c09..0abb0d540 100644
--- a/src/ephy-automation.c
+++ b/src/ephy-automation.c
@@ -28,7 +28,6 @@
#include "ephy-bookmarks-import.h"
#include <string.h>
-#include <bonobo/bonobo-generic-factory.h>
#include <bonobo/bonobo-main.h>
#include <bonobo/bonobo-context.h>
@@ -75,18 +74,20 @@ ephy_automation_factory (BonoboGenericFactory *this_factory,
return BONOBO_OBJECT(a);
}
-BonoboObject *
-ephy_automation_new (void)
+BonoboGenericFactory *
+ephy_automation_factory_new (void)
{
- BonoboGenericFactory *factory;
+ BonoboGenericFactory *factory;
factory = bonobo_generic_factory_new (EPHY_FACTORY_OAFIID,
ephy_automation_factory,
NULL);
+ if (factory == NULL)
+ {
+ g_warning ("Could not initialize EphyAutomation factory");
+ }
- g_return_val_if_fail (factory != NULL, NULL);
-
- return BONOBO_OBJECT (factory);
+ return factory;
}
static void