aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Meeks <michael@ximian.com>2001-02-23 08:53:41 +0800
committerMichael Meeks <michael@src.gnome.org>2001-02-23 08:53:41 +0800
commitf581cae993b563b395a12afda0c270faa83e551a (patch)
treeaf73bf505f5230a6029517d3f8ca1b2fe93a692e
parent5c9c2f33b943c9996eac380d5534b80ce5402360 (diff)
downloadgsoc2013-evolution-f581cae993b563b395a12afda0c270faa83e551a.tar.gz
gsoc2013-evolution-f581cae993b563b395a12afda0c270faa83e551a.tar.zst
gsoc2013-evolution-f581cae993b563b395a12afda0c270faa83e551a.zip
add include. (show_import_wizard): update signature to that of a verb.
2001-02-21 Michael Meeks <michael@ximian.com> * importer/importer.c: add include. (show_import_wizard): update signature to that of a verb. * evolution-shell-component.c (corba_class_init): move into (class_init): here & upd. (evolution_shell_component_construct): upd. (create_servant): kill. (E_MAKE_TYPE) -> E_MAKE_X_TYPE. svn path=/trunk/; revision=8359
-rw-r--r--shell/ChangeLog11
-rw-r--r--shell/evolution-shell-component.c86
-rw-r--r--shell/evolution-shell-component.h9
-rw-r--r--shell/importer/importer.c5
-rw-r--r--shell/importer/importer.h6
5 files changed, 41 insertions, 76 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index b4acb5d56c..f3ee7bbb28 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,3 +1,14 @@
+2001-02-21 Michael Meeks <michael@ximian.com>
+
+ * importer/importer.c: add include.
+ (show_import_wizard): update signature to that of a verb.
+
+ * evolution-shell-component.c (corba_class_init): move into
+ (class_init): here & upd.
+ (evolution_shell_component_construct): upd.
+ (create_servant): kill.
+ (E_MAKE_TYPE) -> E_MAKE_X_TYPE.
+
2001-02-20 Dan Winship <danw@ximian.com>
* e-folder.c (_EFolderPrivate): split "highlighted" into
diff --git a/shell/evolution-shell-component.c b/shell/evolution-shell-component.c
index d5588d6973..63f5fb7254 100644
--- a/shell/evolution-shell-component.c
+++ b/shell/evolution-shell-component.c
@@ -34,8 +34,9 @@
#include "evolution-shell-component.h"
-#define PARENT_TYPE BONOBO_OBJECT_TYPE
-static BonoboObjectClass *parent_class = NULL;
+#define PARENT_TYPE BONOBO_X_OBJECT_TYPE
+
+static GtkObjectClass *parent_class = NULL;
struct _EvolutionShellComponentPrivate {
GList *folder_types; /* EvolutionShellComponentFolderType */
@@ -62,31 +63,6 @@ static guint signals[LAST_SIGNAL] = { 0 };
/* CORBA interface implementation. */
-static POA_GNOME_Evolution_ShellComponent__vepv ShellComponent_vepv;
-
-static POA_GNOME_Evolution_ShellComponent *
-create_servant (void)
-{
- POA_GNOME_Evolution_ShellComponent *servant;
- CORBA_Environment ev;
-
- servant = (POA_GNOME_Evolution_ShellComponent *) g_new0 (BonoboObjectServant, 1);
- servant->vepv = &ShellComponent_vepv;
-
- CORBA_exception_init (&ev);
-
- POA_GNOME_Evolution_ShellComponent__init ((PortableServer_Servant) servant, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_free (servant);
- CORBA_exception_free (&ev);
- return NULL;
- }
-
- CORBA_exception_free (&ev);
-
- return servant;
-}
-
static GNOME_Evolution_FolderTypeList *
impl_ShellComponent__get_supported_types (PortableServer_Servant servant,
CORBA_Environment *ev)
@@ -363,43 +339,17 @@ destroy (GtkObject *object)
g_free (priv);
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
+ parent_class->destroy (object);
}
/* Initialization. */
static void
-corba_class_init (void)
-{
- POA_GNOME_Evolution_ShellComponent__vepv *vepv;
- POA_GNOME_Evolution_ShellComponent__epv *epv;
- PortableServer_ServantBase__epv *base_epv;
-
- base_epv = g_new0 (PortableServer_ServantBase__epv, 1);
- base_epv->_private = NULL;
- base_epv->finalize = NULL;
- base_epv->default_POA = NULL;
-
- epv = g_new0 (POA_GNOME_Evolution_ShellComponent__epv, 1);
- epv->_get_supported_types = impl_ShellComponent__get_supported_types;
- epv->setOwner = impl_ShellComponent_set_owner;
- epv->unsetOwner = impl_ShellComponent_unset_owner;
- epv->createView = impl_ShellComponent_create_view;
- epv->createFolderAsync = impl_ShellComponent_async_create_folder;
- epv->removeFolderAsync = impl_ShellComponent_async_remove_folder;
- epv->populateFolderContextMenu = impl_ShellComponent_populate_folder_context_menu;
-
- vepv = &ShellComponent_vepv;
- vepv->_base_epv = base_epv;
- vepv->Bonobo_Unknown_epv = bonobo_object_get_epv ();
- vepv->GNOME_Evolution_ShellComponent_epv = epv;
-}
-
-static void
class_init (EvolutionShellComponentClass *klass)
{
GtkObjectClass *object_class;
+ POA_GNOME_Evolution_ShellComponent__epv *epv = &klass->epv;
object_class = GTK_OBJECT_CLASS (klass);
object_class->destroy = destroy;
@@ -425,7 +375,13 @@ class_init (EvolutionShellComponentClass *klass)
parent_class = gtk_type_class (PARENT_TYPE);
- corba_class_init ();
+ epv->_get_supported_types = impl_ShellComponent__get_supported_types;
+ epv->setOwner = impl_ShellComponent_set_owner;
+ epv->unsetOwner = impl_ShellComponent_unset_owner;
+ epv->createView = impl_ShellComponent_create_view;
+ epv->createFolderAsync = impl_ShellComponent_async_create_folder;
+ epv->removeFolderAsync = impl_ShellComponent_async_remove_folder;
+ epv->populateFolderContextMenu = impl_ShellComponent_populate_folder_context_menu;
}
static void
@@ -452,7 +408,6 @@ init (EvolutionShellComponent *shell_component)
void
evolution_shell_component_construct (EvolutionShellComponent *shell_component,
const EvolutionShellComponentFolderType folder_types[],
- GNOME_Evolution_ShellComponent corba_object,
EvolutionShellComponentCreateViewFn create_view_fn,
EvolutionShellComponentCreateFolderFn create_folder_fn,
EvolutionShellComponentRemoveFolderFn remove_folder_fn,
@@ -464,9 +419,6 @@ evolution_shell_component_construct (EvolutionShellComponent *shell_component,
int i;
g_return_if_fail (shell_component != NULL);
- g_return_if_fail (corba_object != CORBA_OBJECT_NIL);
-
- bonobo_object_construct (BONOBO_OBJECT (shell_component), corba_object);
priv = shell_component->priv;
@@ -507,19 +459,11 @@ evolution_shell_component_new (const EvolutionShellComponentFolderType folder_ty
void *closure)
{
EvolutionShellComponent *new;
- POA_GNOME_Evolution_ShellComponent *servant;
- GNOME_Evolution_ShellComponent corba_object;
-
- servant = create_servant ();
- if (servant == NULL)
- return NULL;
new = gtk_type_new (evolution_shell_component_get_type ());
- corba_object = bonobo_object_activate_servant (BONOBO_OBJECT (new), servant);
evolution_shell_component_construct (new,
folder_types,
- corba_object,
create_view_fn,
create_folder_fn,
remove_folder_fn,
@@ -540,5 +484,7 @@ evolution_shell_component_get_owner (EvolutionShellComponent *shell_component)
}
-E_MAKE_TYPE (evolution_shell_component, "EvolutionShellComponent", EvolutionShellComponent,
- class_init, init, PARENT_TYPE)
+E_MAKE_X_TYPE (evolution_shell_component, "EvolutionShellComponent", EvolutionShellComponent,
+ class_init, init, PARENT_TYPE,
+ POA_GNOME_Evolution_ShellComponent__init,
+ GTK_STRUCT_OFFSET (EvolutionShellComponentClass, epv));
diff --git a/shell/evolution-shell-component.h b/shell/evolution-shell-component.h
index 21ae216267..0f5e57b9af 100644
--- a/shell/evolution-shell-component.h
+++ b/shell/evolution-shell-component.h
@@ -24,7 +24,7 @@
#ifndef EVOLUTION_SHELL_COMPONENT_H
#define EVOLUTION_SHELL_COMPONENT_H
-#include <bonobo/bonobo-object.h>
+#include <bonobo/bonobo-xobject.h>
#include <bonobo/bonobo-control.h>
#include "Evolution.h"
@@ -102,13 +102,15 @@ struct _EvolutionShellComponentFolderType {
typedef struct _EvolutionShellComponentFolderType EvolutionShellComponentFolderType;
struct _EvolutionShellComponent {
- BonoboObject parent;
+ BonoboXObject parent;
EvolutionShellComponentPrivate *priv;
};
struct _EvolutionShellComponentClass {
- BonoboObjectClass parent_class;
+ BonoboXObjectClass parent_class;
+
+ POA_GNOME_Evolution_ShellComponent__epv epv;
/* Signals. */
@@ -122,7 +124,6 @@ struct _EvolutionShellComponentClass {
GtkType evolution_shell_component_get_type (void);
void evolution_shell_component_construct (EvolutionShellComponent *shell_component,
const EvolutionShellComponentFolderType folder_types[],
- GNOME_Evolution_ShellComponent corba_object,
EvolutionShellComponentCreateViewFn create_view_fn,
EvolutionShellComponentCreateFolderFn create_folder_fn,
EvolutionShellComponentRemoveFolderFn remove_folder_fn,
diff --git a/shell/importer/importer.c b/shell/importer/importer.c
index b664be7379..5286a1b04d 100644
--- a/shell/importer/importer.c
+++ b/shell/importer/importer.c
@@ -33,6 +33,7 @@
#include <glade/glade.h>
#include <gtkhtml/gtkhtml.h>
+#include <gal/widgets/e-gui-utils.h>
#include <e-util/e-html-utils.h>
#include <gal/widgets/e-gui-utils.h>
@@ -574,7 +575,9 @@ druid_finish_button_change (GnomeDruid *druid)
}
void
-show_import_wizard (void)
+show_import_wizard (BonoboUIComponent *component,
+ gpointer user_data,
+ const char *cname)
{
ImportData *data = g_new0 (ImportData, 1);
GnomeDruidPageStart *start;
diff --git a/shell/importer/importer.h b/shell/importer/importer.h
index ed457b9e15..644ff62866 100644
--- a/shell/importer/importer.h
+++ b/shell/importer/importer.h
@@ -21,9 +21,13 @@
* Author: Iain Holmes <iain@helixcode.com>
*/
+#include <bonobo/bonobo-ui-component.h>
+
#ifndef __IMPORTER_H__
#define __IMPORTER_H__
-void show_import_wizard (void);
+void show_import_wizard (BonoboUIComponent *component,
+ gpointer user_data,
+ const char *cname);
#endif