aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2001-09-06 06:58:45 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2001-09-06 06:58:45 +0800
commit56ed3ed3b9fd94ed34c92aa6bbcd26bb56208595 (patch)
treebebb5bf67602cbdb41cab62e0f95c684302e5334 /shell
parentcf8a393a648e0e9cb7c44dac2b9bb7668cedbdb2 (diff)
downloadgsoc2013-evolution-56ed3ed3b9fd94ed34c92aa6bbcd26bb56208595.tar.gz
gsoc2013-evolution-56ed3ed3b9fd94ed34c92aa6bbcd26bb56208595.tar.zst
gsoc2013-evolution-56ed3ed3b9fd94ed34c92aa6bbcd26bb56208595.zip
[Fix #958, ShellComponents should not be created by factories, for
the test component.] * GNOME_Evolution_TestComponent.oaf: Remove the factory. * evolution-test-component.c (COMPONENT_FACTORY_ID): Removed. (component_factory_init): Removed. (register_component): Rename from `component_fn'. No args, no return value. Register the thing on OAF by yourself instead of using a factory. svn path=/trunk/; revision=12639
Diffstat (limited to 'shell')
-rw-r--r--shell/ChangeLog13
-rw-r--r--shell/GNOME_Evolution_TestComponent.oaf14
-rw-r--r--shell/evolution-test-component.c26
3 files changed, 23 insertions, 30 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 940f2ed41c..b4e60fffb3 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,5 +1,18 @@
2001-09-05 Ettore Perazzoli <ettore@ximian.com>
+ [Fix #958, ShellComponents should not be created by factories, for
+ the test component.]
+
+ * GNOME_Evolution_TestComponent.oaf: Remove the factory.
+
+ * evolution-test-component.c (COMPONENT_FACTORY_ID): Removed.
+ (component_factory_init): Removed.
+ (register_component): Rename from `component_fn'. No args, no
+ return value. Register the thing on OAF by yourself instead of
+ using a factory.
+
+2001-09-05 Ettore Perazzoli <ettore@ximian.com>
+
* e-shortcuts-view.c (get_shortcut_info): New.
(get_efolder_from_shortcut): Removed.
(impl_shortcut_dropped): Use `get_shortcut_info()' instead.
diff --git a/shell/GNOME_Evolution_TestComponent.oaf b/shell/GNOME_Evolution_TestComponent.oaf
index 5a203b51b4..d5ef5333be 100644
--- a/shell/GNOME_Evolution_TestComponent.oaf
+++ b/shell/GNOME_Evolution_TestComponent.oaf
@@ -1,22 +1,10 @@
<oaf_info>
-<oaf_server iid="OAFIID:GNOME_Evolution_TestComponent_ShellComponentFactory"
+<oaf_server iid="OAFIID:GNOME_Evolution_TestComponent_ShellComponent"
type="exe"
location="evolution-test-component">
<oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/ObjectFactory:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="description" type="string"
- value="Factory for the Evolution test component."/>
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_TestComponent_ShellComponent"
- type="factory"
- location="OAFIID:GNOME_Evolution_TestComponent_ShellComponentFactory">
-
- <oaf_attribute name="repo_ids" type="stringv">
<item value="IDL:GNOME/Evolution/ShellComponent:1.0"/>
</oaf_attribute>
diff --git a/shell/evolution-test-component.c b/shell/evolution-test-component.c
index e29773e4dd..3e64464cbb 100644
--- a/shell/evolution-test-component.c
+++ b/shell/evolution-test-component.c
@@ -36,8 +36,7 @@
#include <gdk-pixbuf/gdk-pixbuf.h>
-#define COMPONENT_FACTORY_ID "OAFIID:GNOME_Evolution_TestComponent_ShellComponentFactory"
-#define COMPONENT_ID "OAFIID:GNOME_Evolution_TestComponent_ShellComponent"
+#define COMPONENT_ID "OAFIID:GNOME_Evolution_TestComponent_ShellComponent"
static const EvolutionShellComponentFolderType folder_types[] = {
{ "test", "/usr/share/pixmaps/gnome-money.png", N_("Test"), N_("Test type"), FALSE, NULL, NULL },
@@ -279,11 +278,11 @@ user_create_new_item_callback (EvolutionShellComponent *shell_component,
}
-static BonoboObject *
-factory_fn (BonoboGenericFactory *factory,
- void *closure)
+static void
+register_component (void)
{
EvolutionShellComponent *shell_component;
+ int result;
shell_component = evolution_shell_component_new (folder_types,
NULL,
@@ -301,18 +300,11 @@ factory_fn (BonoboGenericFactory *factory,
gtk_signal_connect (GTK_OBJECT (shell_component), "user_create_new_item",
GTK_SIGNAL_FUNC (user_create_new_item_callback), NULL);
- return BONOBO_OBJECT (shell_component);
-}
-
-static void
-component_factory_init (void)
-{
- BonoboGenericFactory *factory;
-
- factory = bonobo_generic_factory_new (COMPONENT_FACTORY_ID, factory_fn, NULL);
+ result = oaf_active_server_register (COMPONENT_ID,
+ bonobo_object_corba_objref (BONOBO_OBJECT (shell_component)));
- if (factory == NULL)
- g_error ("Cannot initialize test component.");
+ if (result == OAF_REG_ERROR)
+ g_error ("Cannot register active server into OAF");
}
@@ -332,7 +324,7 @@ main (int argc, char **argv)
if (bonobo_init (orb, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL) == FALSE)
g_error ("Cannot initialize the test component.");
- component_factory_init ();
+ register_component ();
bonobo_main ();
b54da08e00d08bbf24b0e16a8e2357d7d66'>Stagify.vanilla2014-07-021-8/+4 * Update to 4.2.5.jkim2014-06-241-4/+4 * Update to libreoffice 4.2.4bapt2014-06-111-4/+4 * Support staging.mi2014-06-102-3/+2 * Remove the NO_STAGE. This port is as stage-ready as graphics/gd.mi2014-06-101-2/+1 * KDE/FreeBSD team presents KDE SC 4.12.5 and KDE Workspace 4.11.9!makc2014-05-111-2/+2 * Update to 4.1.6.jkim2014-05-071-4/+4 * KDE/FreeBSD team presents KDE SC 4.12.4 and KDE Workspace 4.11.8!makc2014-04-031-2/+2 * - Update to 1.7.1sunpoet2014-03-312-3/+3 * - Update to 1.7.1sunpoet2014-03-312-3/+3 * Convert u* and v* to USES=zipbapt2014-03-112-2/+2 * KDE/FreeBSD team presents KDE SC 4.12.3 and KDE Workspace 4.11.7!makc2014-03-052-11/+11 * Update to 4.1.5. It is partially based on the following PR.jkim2014-02-261-4/+4 * - Bump PORTREVISION after KDE4_PREFIX changemakc2014-02-181-0/+1 * KDE/FreeBSD team presents KDE SC 4.12.2 and KDE Workspace 4.11.6!makc2014-02-184-103/+168 * Remove ispell which is deprecated for long, consider using aspell instead or ...bapt2014-01-296-58/+0 * - Update to 1.7.0sunpoet2013-12-302-4/+3 * - Update to 1.7.0sunpoet2013-12-302-4/+6 * - Update Calligra Suite to 2.7.5.avilla2013-12-173-3/+8 * - use STAGEDIRdinoex2013-11-291-1/+0 * - Use single space after WWW:sunpoet2013-11-182-2/+2 * Stagifybapt2013-11-041-4/+3 * Stagifybapt2013-11-041-3/+2 * Support stage, use bsdtar to extractbapt2013-11-041-3/+2 * Stagifybapt2013-11-041-1/+0 * - Update to 4.0.6.jkim2013-10-262-5/+4 * Fix NO_STAGE attributionbapt2013-09-231-1/+1 * Add NO_STAGE all over the place in preparation for the staging support (cat: ...bapt2013-09-2112-30/+16 * - Use USES=gmakesunpoet2013-09-171-2/+1 * Convert to new perl frameworkbapt2013-09-171-2/+1 * 1. Introduce using iconv with arguments:bsam2013-09-021-3/+1 * Update to 4.0.5.jkim2013-08-231-4/+4 * ukrainian/webalizer: Fix gd dependencymarino2013-08-181-6/+2 * - Convert to new perl frameworkaz2013-08-042-3/+4 * KDE3 and QT3 expired on 2013-07-01, remove these ports.rene2013-07-275-674/+0 * Mark job unsafe and convert to USES=gmakebapt2013-07-101-6/+4 * Fix INDEX by really fixing the kde4-l10n portsbapt2013-07-101-0/+1 * KDE4 l10n fixes.rakuco2013-07-102-3/+1 * Update the KDE Software Compilation to 4.10.5.rakuco2013-07-051-2/+2 * Update to KDE SC 4.10.4, proudly presented by the KDE on FreeBSD team.rakuco2013-07-031-2/+2 * Update to 4.0.4.jkim2013-06-201-4/+4 * - Don't remove directories not created by this portmiwi2013-06-191-2/+0 * KDE/FreeBSD team presents KDE SC 4.10.3 ports!makc2013-05-192-4/+2 * Update to 4.0.3.jkim2013-05-101-4/+4 * Add some shebangfix to allow building most of the ports tree without /usr/bin...bapt2013-05-071-5/+2 * - Convert USE_GETTEXT to USES (part 2)ak2013-04-241-1/+1 * Update to 4.0.2.jkim2013-04-171-4/+4 * - Update Calligra and l10n ports to 2.6.2:avilla2013-03-302-5/+8 * KDE/FreeBSD team presents KDE SC 4.10.1 ports!makc2013-03-27