Re: [evolution-patches] [Shell] Reworked patch for Bug 260354: Window List Needs To Reflect New Messages



hi

Added changeLog to the patch.

Thanks
Johnny

On 12/20/05, Parthasarathi Susarla <sparthasarathi novell com> wrote:
> Looks Fine.
>
> But you need to have a Changelog with the patch. Be sure that you send
> the Changelog with the patch.
>
> Otherwise ok to commit.
>
> Cheers,
> partha
> On Fri, 2005-12-16 at 11:29 +0530, Johnny Jacob wrote:
> > HI
> > Reworked the patch for Bug 260354: Window List Needs To Reflect New Messages
> >
> > Please comment..
> >
> > Thanks
> > Johnny
> > _______________________________________________
> > Evolution-patches mailing list
> > Evolution-patches gnome org
> > http://mail.gnome.org/mailman/listinfo/evolution-patches
>
>
Index: addressbook/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/ChangeLog,v
retrieving revision 1.2015
diff -u -p -r1.2015 ChangeLog
--- addressbook/ChangeLog	6 Dec 2005 08:43:35 -0000	1.2015
+++ addressbook/ChangeLog	20 Dec 2005 09:21:04 -0000
@@ -1,3 +1,8 @@
+2004-06-28  Not Zed  <NotZed Ximian com>
+
+	* gui/component/addressbook-component.c (impl_createView): changed
+	from createControls for new shell apis.
+
 2005-12-06  Veerapuram Varadhan <vvaradhan novell com>
 	
 	* conduits/addressbook-conduit.c: (pre_sync):
Index: addressbook/gui/component/addressbook-component.c
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/gui/component/addressbook-component.c,v
retrieving revision 1.140
diff -u -p -r1.140 addressbook-component.c
--- addressbook/gui/component/addressbook-component.c	25 Nov 2005 13:09:37 -0000	1.140
+++ addressbook/gui/component/addressbook-component.c	20 Dec 2005 09:21:39 -0000
@@ -41,6 +41,8 @@
 #include "misc/e-task-bar.h"
 #include "misc/e-info-label.h"
 
+#include "shell/e-component-view.h"
+
 #include <string.h>
 #include <bonobo/bonobo-i18n.h>
 #include <gtk/gtkimage.h>
@@ -183,30 +185,27 @@ view_destroyed_cb (gpointer data, GObjec
 
 /* Evolution::Component CORBA methods.  */
 
-static void
-impl_createControls (PortableServer_Servant servant,
-		     Bonobo_Control *corba_sidebar_control,
-		     Bonobo_Control *corba_view_control,
-		     Bonobo_Control *corba_statusbar_control,
-		     CORBA_Environment *ev)
+static GNOME_Evolution_ComponentView
+impl_createView (PortableServer_Servant servant,
+		 GNOME_Evolution_ShellView parent,
+		 CORBA_Environment *ev)
 {
 	AddressbookComponent *addressbook_component = ADDRESSBOOK_COMPONENT (bonobo_object_from_servant (servant));
 	AddressbookComponentPrivate *priv = addressbook_component->priv;
 	AddressbookView *view = addressbook_view_new ();
-	BonoboControl *sidebar_control;
-	BonoboControl *view_control;
-	BonoboControl *statusbar_control;
-
-	sidebar_control = bonobo_control_new (addressbook_view_peek_sidebar (view));
-	view_control = addressbook_view_peek_folder_view (view);
-	statusbar_control = bonobo_control_new (addressbook_view_peek_statusbar (view));
 
 	g_object_weak_ref (G_OBJECT (view), view_destroyed_cb, addressbook_component);
 	priv->views = g_list_append (priv->views, view);
 
-	*corba_sidebar_control = CORBA_Object_duplicate (BONOBO_OBJREF (sidebar_control), ev);
-	*corba_view_control = CORBA_Object_duplicate (BONOBO_OBJREF (view_control), ev);
-	*corba_statusbar_control = CORBA_Object_duplicate (BONOBO_OBJREF (statusbar_control), ev);
+	EComponentView *component_view;
+
+	component_view = e_component_view_new_controls (parent, "contacts",
+							bonobo_control_new (addressbook_view_peek_sidebar (view)),
+							addressbook_view_peek_folder_view (view),
+							bonobo_control_new (addressbook_view_peek_statusbar (view)));
+
+	return BONOBO_OBJREF(component_view);
+
 }
 
 static GNOME_Evolution_CreatableItemTypeList *
@@ -438,7 +437,7 @@ addressbook_component_class_init (Addres
 	POA_GNOME_Evolution_Component__epv *epv = &class->epv;
 	GObjectClass *object_class = G_OBJECT_CLASS (class);
 
-	epv->createControls          = impl_createControls;
+	epv->createView              = impl_createView;
 	epv->_get_userCreatableItems = impl__get_userCreatableItems;
 	epv->requestCreateItem       = impl_requestCreateItem;
 	epv->upgradeFromVersion      = impl_upgradeFromVersion;
Index: calendar/gui/calendar-component.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/calendar-component.c,v
retrieving revision 1.210
diff -u -p -r1.210 calendar-component.c
--- calendar/gui/calendar-component.c	25 Nov 2005 13:14:19 -0000	1.210
+++ calendar/gui/calendar-component.c	20 Dec 2005 09:37:52 -0000
@@ -35,6 +35,7 @@
 #include <libecal/e-cal-time-util.h>
 #include <libedataserverui/e-source-selector.h>
 #include <shell/e-user-creatable-items-handler.h>
+#include <shell/e-component-view.h>
 #include "e-pub-utils.h"
 #include "e-calendar-view.h"
 #include "calendar-config-keys.h"
@@ -1427,16 +1428,15 @@ view_destroyed_cb (gpointer data, GObjec
 	}
 }
 
-static void
-impl_createControls (PortableServer_Servant servant,
-		     Bonobo_Control *corba_sidebar_control,
-		     Bonobo_Control *corba_view_control,
-		     Bonobo_Control *corba_statusbar_control,
-		     CORBA_Environment *ev)
+static GNOME_Evolution_ComponentView
+impl_createView (PortableServer_Servant servant,
+		 GNOME_Evolution_ShellView parent,
+		 CORBA_Environment *ev)
 {
 	CalendarComponent *calendar_component = CALENDAR_COMPONENT (bonobo_object_from_servant (servant));
 	CalendarComponentPrivate *priv;
 	CalendarComponentView *component_view;
+	EComponentView *ecv;
 	
 	priv = calendar_component->priv;
 
@@ -1446,16 +1446,17 @@ impl_createControls (PortableServer_Serv
 		/* FIXME Should we describe the problem in a control? */
 		bonobo_exception_set (ev, ex_GNOME_Evolution_Component_Failed);
 
-		return;
+		return CORBA_OBJECT_NIL;
 	}
 
 	g_object_weak_ref (G_OBJECT (component_view->view_control), view_destroyed_cb, calendar_component);
 	priv->views = g_list_append (priv->views, component_view);
 	
-	/* Return the controls */
-	*corba_sidebar_control = CORBA_Object_duplicate (BONOBO_OBJREF (component_view->sidebar_control), ev);
-	*corba_view_control = CORBA_Object_duplicate (BONOBO_OBJREF (component_view->view_control), ev);
-	*corba_statusbar_control = CORBA_Object_duplicate (BONOBO_OBJREF (component_view->statusbar_control), ev);
+	/* TODO: Make CalendarComponentView just subclass EComponentView */
+	ecv = e_component_view_new_controls (parent, "calendar", component_view->sidebar_control,
+					     component_view->view_control, component_view->statusbar_control);
+
+	return BONOBO_OBJREF(ecv);
 }
 
 
@@ -1599,7 +1600,7 @@ calendar_component_class_init (CalendarC
 	parent_class = g_type_class_peek_parent (class);
 
 	epv->upgradeFromVersion      = impl_upgradeFromVersion;
-	epv->createControls          = impl_createControls;
+	epv->createView              = impl_createView;
 	epv->_get_userCreatableItems = impl__get_userCreatableItems;
 	epv->requestCreateItem       = impl_requestCreateItem;
 	epv->handleURI               = impl_handleURI;
Index: calendar/gui/tasks-component.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/tasks-component.c,v
retrieving revision 1.94
diff -u -p -r1.94 tasks-component.c
--- calendar/gui/tasks-component.c	25 Nov 2005 13:19:17 -0000	1.94
+++ calendar/gui/tasks-component.c	20 Dec 2005 09:40:13 -0000
@@ -33,6 +33,7 @@
 #include <libecal/e-cal.h>
 #include <libedataserverui/e-source-selector.h>
 #include <shell/e-user-creatable-items-handler.h>
+#include <shell/e-component-view.h>
 #include "e-cal-model.h"
 #include "e-tasks.h"
 #include "tasks-component.h"
@@ -1124,16 +1125,15 @@ view_destroyed_cb (gpointer data, GObjec
 	}
 }
 
-static void
-impl_createControls (PortableServer_Servant servant,
-		     Bonobo_Control *corba_sidebar_control,
-		     Bonobo_Control *corba_view_control,
-		     Bonobo_Control *corba_statusbar_control,
-		     CORBA_Environment *ev)
+static GNOME_Evolution_ComponentView
+impl_createView (PortableServer_Servant servant,
+		 GNOME_Evolution_ShellView parent,
+		 CORBA_Environment *ev)
 {
 	TasksComponent *component = TASKS_COMPONENT (bonobo_object_from_servant (servant));
 	TasksComponentPrivate *priv;
 	TasksComponentView *component_view;
+	EComponentView *ecv;
 	
 	priv = component->priv;
 
@@ -1143,16 +1143,17 @@ impl_createControls (PortableServer_Serv
 		/* FIXME Should we describe the problem in a control? */
 		bonobo_exception_set (ev, ex_GNOME_Evolution_Component_Failed);
 
-		return;
+		return CORBA_OBJECT_NIL;
 	}
 
 	g_object_weak_ref (G_OBJECT (component_view->view_control), view_destroyed_cb, component);
 	priv->views = g_list_append (priv->views, component_view);
 	
-	/* Return the controls */
-	*corba_sidebar_control = CORBA_Object_duplicate (BONOBO_OBJREF (component_view->sidebar_control), ev);
-	*corba_view_control = CORBA_Object_duplicate (BONOBO_OBJREF (component_view->view_control), ev);
-	*corba_statusbar_control = CORBA_Object_duplicate (BONOBO_OBJREF (component_view->statusbar_control), ev);
+	/* TODO: Make TasksComponentView just subclass EComponentView */
+	ecv = e_component_view_new_controls (parent, "tasks", component_view->sidebar_control,
+					     component_view->view_control, component_view->statusbar_control);
+
+	return BONOBO_OBJREF(ecv);
 }
 
 static GNOME_Evolution_CreatableItemTypeList *
@@ -1286,7 +1287,7 @@ tasks_component_class_init (TasksCompone
 	parent_class = g_type_class_peek_parent (klass);
 
 	epv->upgradeFromVersion      = impl_upgradeFromVersion;
-	epv->createControls          = impl_createControls;
+	epv->createView		     = impl_createView;
 	epv->_get_userCreatableItems = impl__get_userCreatableItems;
 	epv->requestCreateItem       = impl_requestCreateItem;
 
Index: mail/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.3730
diff -u -p -r1.3730 ChangeLog
--- mail/ChangeLog	6 Dec 2005 08:37:26 -0000	1.3730
+++ mail/ChangeLog	20 Dec 2005 10:04:08 -0000
@@ -1,3 +1,16 @@
+2004-06-28  Not Zed  <NotZed Ximian com>
+
+	* mail-component.c (impl_createView, view_changed_cb): api updates.
+
+2004-06-25  Not Zed  <NotZed Ximian com>
+
+	** See bug #60354.
+
+	* mail-component.c (view_changed_cb): set the shell window title
+	as well.
+	(impl_createView): renamed from createControls, just return a
+	EComponentView instead.
+
 2005-12-05  Shi Pu  <shi pu sun com>
 
 	See bug ** 323253
Index: mail/mail-component.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-component.c,v
retrieving revision 1.125
diff -u -p -r1.125 mail-component.c
--- mail/mail-component.c	22 Aug 2005 02:54:51 -0000	1.125
+++ mail/mail-component.c	20 Dec 2005 10:06:22 -0000
@@ -63,6 +63,7 @@
 
 #include "e-activity-handler.h"
 #include "shell/e-user-creatable-items-handler.h"
+#include "shell/e-component-view.h"
 
 #include "composer/e-msg-composer.h"
 
@@ -490,10 +491,15 @@ view_on_url (GObject *emitter, const cha
 }
 
 static void
-view_changed(EMFolderView *emfv, EInfoLabel *el)
+view_changed(EMFolderView *emfv, EComponentView *component_view)
 {
+	EInfoLabel *el = g_object_get_data((GObject *)component_view, "info-label");
+	CORBA_Environment ev;
+
+	CORBA_exception_init(&ev);
+
 	if (emfv->folder) {
-		char *name;
+		char *name, *title;
 		guint32 visible, unread, deleted, junked;
 		GString *tmp = g_string_new("");
 
@@ -555,20 +561,27 @@ view_changed(EMFolderView *emfv, EInfoLa
 			e_info_label_set_info(el, _(name), tmp->str);
 		else
 			e_info_label_set_info(el, name, tmp->str);
+
+		title = g_strdup_printf("%s, %s", name, tmp->str);
+		e_component_view_set_title(component_view, title);
+		g_free(title);
+
 		g_string_free(tmp, TRUE);
 		camel_object_free(emfv->folder, CAMEL_FOLDER_NAME, name);
 	} else {
 		e_info_label_set_info(el, _("Mail"), "");
+		e_component_view_set_title(component_view, _("Mail"));
 	}
 }
 
 static int
 view_changed_timeout(void *d)
 {
-	EInfoLabel *el = d;
+	EComponentView *component_view = d;	
+	EInfoLabel *el = g_object_get_data((GObject *)component_view, "info-label");
 	EMFolderView *emfv = g_object_get_data((GObject *)el, "folderview");
 
-	view_changed(emfv, el);
+	view_changed(emfv, component_view);
 
 	g_object_set_data((GObject *)emfv, "view-changed-timeout", NULL);
 
@@ -579,9 +592,10 @@ view_changed_timeout(void *d)
 }
 
 static void
-view_changed_cb(EMFolderView *emfv, EInfoLabel *el)
+view_changed_cb(EMFolderView *emfv, EComponentView *component_view)
 {
 	void *v;
+	EInfoLabel *el = g_object_get_data((GObject *)component_view, "info-label");
 
 	/* This can get called 3 times every cursor move, so
 	   we don't need to/want to run it immediately */
@@ -595,23 +609,19 @@ view_changed_cb(EMFolderView *emfv, EInf
 		g_object_ref(el);
 	}
 
-	g_object_set_data((GObject *)emfv, "view-changed-timeout", GINT_TO_POINTER(g_timeout_add(250, view_changed_timeout, el)));
+	g_object_set_data((GObject *)emfv, "view-changed-timeout", GINT_TO_POINTER(g_timeout_add(250, view_changed_timeout, component_view)));
 }
 
 /* Evolution::Component CORBA methods.  */
 
-static void
-impl_createControls (PortableServer_Servant servant,
-		     Bonobo_Control *corba_tree_control,
-		     Bonobo_Control *corba_view_control,
-		     Bonobo_Control *corba_statusbar_control,
-		     CORBA_Environment *ev)
+static GNOME_Evolution_ComponentView
+impl_createView (PortableServer_Servant servant,
+		 GNOME_Evolution_ShellView parent,
+		 CORBA_Environment *ev)
 {
 	MailComponent *mail_component = MAIL_COMPONENT (bonobo_object_from_servant (servant));
 	MailComponentPrivate *priv = mail_component->priv;
-	BonoboControl *tree_control;
-	BonoboControl *view_control;
-	BonoboControl *statusbar_control;
+	EComponentView *component_view;
 	GtkWidget *tree_widget, *vbox, *info;
 	GtkWidget *view_widget;
 	GtkWidget *statusbar_widget;
@@ -652,25 +662,23 @@ impl_createControls (PortableServer_Serv
 	gtk_widget_show(info);
 	gtk_widget_show(vbox);
 
-	tree_control = bonobo_control_new (vbox);
-	view_control = bonobo_control_new (view_widget);
-	statusbar_control = bonobo_control_new (statusbar_widget);
-	
-	*corba_tree_control = CORBA_Object_duplicate (BONOBO_OBJREF (tree_control), ev);
-	*corba_view_control = CORBA_Object_duplicate (BONOBO_OBJREF (view_control), ev);
-	*corba_statusbar_control = CORBA_Object_duplicate (BONOBO_OBJREF (statusbar_control), ev);
+	component_view = e_component_view_new(parent, "mail", vbox, view_widget, statusbar_widget);
+
+	g_object_set_data((GObject *)component_view, "info-label", info);
 
 	g_object_set_data_full((GObject *)view_widget, "e-creatable-items-handler",
 			       e_user_creatable_items_handler_new("mail", create_local_item_cb, tree_widget),
 			       (GDestroyNotify)g_object_unref);
 
-	g_signal_connect (view_control, "activate", G_CALLBACK (view_control_activate_cb), view_widget);
+	g_signal_connect (component_view->view_control, "activate", G_CALLBACK (view_control_activate_cb), view_widget);
 	g_signal_connect (tree_widget, "folder-selected", G_CALLBACK (folder_selected_cb), view_widget);
 
-	g_signal_connect(view_widget, "changed", G_CALLBACK(view_changed_cb), info);
-	g_signal_connect(view_widget, "loaded", G_CALLBACK(view_changed_cb), info);
-
+	g_signal_connect(view_widget, "changed", G_CALLBACK(view_changed_cb), component_view);
+	g_signal_connect(view_widget, "loaded", G_CALLBACK(view_changed_cb), component_view);
+	
 	g_object_set_data((GObject*)info, "folderview", view_widget);
+
+	return BONOBO_OBJREF(component_view);
 }
 
 static CORBA_boolean
@@ -1016,7 +1024,7 @@ mail_component_class_init (MailComponent
 	object_class->dispose  = impl_dispose;
 	object_class->finalize = impl_finalize;
 	
-	epv->createControls          = impl_createControls;
+	epv->createView          = impl_createView;
 	epv->requestQuit = impl_requestQuit;
 	epv->quit = impl_quit;
 	epv->_get_userCreatableItems = impl__get_userCreatableItems;
Index: shell/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/shell/ChangeLog,v
retrieving revision 1.1544
diff -u -p -r1.1544 ChangeLog
--- shell/ChangeLog	14 Nov 2005 18:50:44 -0000	1.1544
+++ shell/ChangeLog	20 Dec 2005 10:09:26 -0000
@@ -1,3 +1,40 @@
+2004-06-28  Not Zed  <NotZed Ximian com>
+
+	* e-shell-view.c (impl_ShellView_setTitle): take a component id
+	argument.
+
+	* e-shell-window.c (component_view_free): release the corba object
+	properly.
+	(e_shell_window_set_title): new helper to set the title for the
+	component.
+	(switch_view): use the component specific title if available or
+	fallback to the component name.
+
+2004-06-25  Not Zed  <NotZed Ximian com>
+
+	** See bug #60354.
+
+	* Evolution-Component.idl: createControls -> createView and
+	ComponentView to keep track of things.
+
+	* Evolution-Shell.idl: return a new type ShellView from
+	createNewWindow so other parts of the system can access it later.
+	ShellView so far just lets you set title or switch component, but
+	could be subclassed later.
+
+	* e-shell.c (impl_Shell_createNewWindow): return a shell view.
+
+	* e-shell-window.c (init_view): create the view from the compnent
+	first, then get the controls from it separately.
+	(init): setup the e-shell-view object for the create view
+	thing.
+
+	* e-shell-view.c (e_shell_view_new): simple bonobo object for
+	Evolution_ShellView, keep track of the EShellWindow.
+
+	* e-component-view.[ch]: simple bonobo object for
+	Evolution_ComponentView.  Just keep track of the controls.
+
 2005-11-14  Harish Krishnaswamy  <kharish novell com>
 
 	* e-shell-settings-dialog.c: (set_dialog_size),
Index: shell/Evolution-Component.idl
===================================================================
RCS file: /cvs/gnome/evolution/shell/Evolution-Component.idl,v
retrieving revision 1.18
diff -u -p -r1.18 Evolution-Component.idl
--- shell/Evolution-Component.idl	18 Aug 2005 04:35:30 -0000	1.18
+++ shell/Evolution-Component.idl	20 Dec 2005 10:10:49 -0000
@@ -42,6 +42,12 @@ module Evolution {
 	};
 	typedef sequence <CreatableItemType> CreatableItemTypeList;
 
+	interface ComponentView : Bonobo::Unknown {
+		void getControls (out Bonobo::Control sidebar_control,
+				  out Bonobo::Control view_control,
+				  out Bonobo::Control statusbar_control);
+	};
+
 	interface Listener : Bonobo::Unknown {
 		/* Indicate the change of state is complete */
 		void complete();
@@ -64,12 +70,10 @@ module Evolution {
 			raises (UnsupportedVersion, UpgradeFailed);
 
 		/*** Basic functionality.  ***/
+		ComponentView createView(in ShellView parent)
+			raises (Failed);
 
 		/* Create the controls for embedding in the shell.  */
-		void createControls (out Bonobo::Control sidebar_control,
-				     out Bonobo::Control view_control,
-				     out Bonobo::Control statusbar_control)
-			raises (Failed);
 
 		/* Check if the component can quit.
 		   Do not perform any quit-related tasks however.
Index: shell/Evolution-Shell.idl
===================================================================
RCS file: /cvs/gnome/evolution/shell/Evolution-Shell.idl,v
retrieving revision 1.28
diff -u -p -r1.28 Evolution-Shell.idl
--- shell/Evolution-Shell.idl	2 Jun 2005 05:51:53 -0000	1.28
+++ shell/Evolution-Shell.idl	20 Dec 2005 10:11:34 -0000
@@ -15,6 +15,109 @@
 
 module GNOME {
 module Evolution {
+	enum CreatableItem {
+		CREATABLE_OBJECT,
+		CREATABLE_FOLDER
+	};
+
+	/* A type of item that the component can create when asked by the user,
+	   e.g. a mail message or an appointment.  */
+	struct CreatableItemType {
+		string id;
+		string description;
+		string menuDescription;
+		string tooltip;
+		char menuShortcut;
+		string iconName;
+		CreatableItem type;
+	};
+	typedef sequence <CreatableItemType> CreatableItemTypeList;
+
+	interface ComponentView : Bonobo::Unknown {
+		void getControls (out Bonobo::Control sidebar_control,
+				  out Bonobo::Control view_control,
+				  out Bonobo::Control statusbar_control);
+	};
+
+	interface Listener : Bonobo::Unknown {
+		/* Indicate the change of state is complete */
+		void complete();
+	};
+
+	interface ShellView : Bonobo::Unknown {
+		/* Should really use a ComponentView i guess */
+		void setTitle(in string component, in string title);
+		void setComponent(in string component);
+	};
+
+	interface Component : Bonobo::Unknown {
+		exception Failed {};
+		exception UnknownType {};
+		/* We don't know about the old version we're upgrading from */
+		exception UnsupportedVersion {};
+		/* We encountered a non-recoverable, fatal error, explain why */
+		exception UpgradeFailed {
+			string what;
+			string why;
+		};
+
+		/*** Upgrade path.  ***/
+
+		void upgradeFromVersion (in short major, in short minor, in short revision)
+			raises (UnsupportedVersion, UpgradeFailed);
+
+		/*** Basic functionality.  ***/
+		ComponentView createView(in ShellView parent)
+			raises (Failed);
+
+		/* Create the controls for embedding in the shell.  */
+
+		/* Check if the component can quit.
+		   Do not perform any quit-related tasks however.
+		   May be called multiple times, depending on user interaction. */
+		boolean requestQuit ();
+
+		/* Ask the component to quit.  Returns TRUE when the
+		   component has completed any closing-down tasks, and
+		   is ready to exit().  This will be called repeatedly
+		   at intervals until it returns TRUE. */
+		boolean quit ();
+
+		/* Notify the component of whether the shell is currently
+		   running in interactive mode or not.  (I.e. basically,
+		   whether there are any Evolution windows on the screen.)
+		   @new_view_xid is an X Window ID ("None" if @now_interactive
+		   is FALSE) */
+		void interactive (in boolean now_interactive,
+				  in unsigned long new_view_xid);
+
+
+		/*** The following stuff is needed to build the "New" toolbar
+                     item as well as the "File -> New" submenu.  ***/
+
+		/* List of creatable items. */
+		readonly attribute CreatableItemTypeList userCreatableItems;
+
+		/* Pop up a new editing dialog for the item with the specified
+		   @item_type_name.  */
+		void requestCreateItem (in string item_type_name)
+			raises (UnknownType, Failed);
+
+
+		/*** URI handling (e.g. for the command-line, "evolution
+		     mailto:foo bar org")  ***/
+		void handleURI (in string uri);
+
+
+		/*** Send/receive.  ***/
+
+		void sendAndReceive ();
+
+		/* Set the online status of the component asynchronously */
+
+		void setLineStatus(in boolean online, in Listener listener);
+	};
+
 	interface Shell : Bonobo::Unknown {
 		exception Busy {};
 		exception ComponentNotFound {};
@@ -29,7 +132,7 @@ module Evolution {
 		 * @component_id: id or alias of the component to display in the new window.
 		 *
 		 */
-		void createNewWindow (in string component_id)
+		ShellView createNewWindow (in string component_id)
 			raises (NotReady, ComponentNotFound, UnsupportedSchema, InternalError);
 
 		/**
Index: shell/Evolution.idl
===================================================================
RCS file: /cvs/gnome/evolution/shell/Evolution.idl,v
retrieving revision 1.26
diff -u -p -r1.26 Evolution.idl
--- shell/Evolution.idl	18 Aug 2005 04:35:30 -0000	1.26
+++ shell/Evolution.idl	20 Dec 2005 10:12:04 -0000
@@ -13,7 +13,6 @@
 
 #include <Bonobo.idl>
 
-#include <Evolution-Component.idl>
 #include <Evolution-ConfigControl.idl>
 #include <Evolution-Shell.idl>
 
Index: shell/Makefile.am
===================================================================
RCS file: /cvs/gnome/evolution/shell/Makefile.am,v
retrieving revision 1.212
diff -u -p -r1.212 Makefile.am
--- shell/Makefile.am	18 Aug 2005 04:35:30 -0000	1.212
+++ shell/Makefile.am	20 Dec 2005 10:13:03 -0000
@@ -79,6 +79,7 @@ eshellincludedir = $(privincludedir)/she
 
 eshellinclude_HEADERS = 			\
 	Evolution.h				\
+	e-component-view.h			\
 	e-shell-utils.h				\
 	e-user-creatable-items-handler.h	\
 	evolution-config-control.h		\
@@ -91,6 +92,7 @@ eshellinclude_HEADERS = 			\
 libeshell_la_SOURCES = 				\
 	$(IDL_GENERATED)			\
 	$(MARSHAL_GENERATED)			\
+	e-component-view.c			\
 	evolution-component.c			\
 	evolution-listener.c			\
 	e-shell-utils.c				\
@@ -118,6 +120,8 @@ evolution_SOURCES =				\
 	e-corba-config-page.h			\
 	e-history.c				\
 	e-history.h				\
+	e-shell.c				\
+	e-shell.h				\
 	e-shell-constants.h			\
 	e-shell-folder-title-bar.c		\
 	e-shell-folder-title-bar.h		\
@@ -129,8 +133,8 @@ evolution_SOURCES =				\
 	e-shell-window-commands.h		\
 	e-shell-window.c			\
 	e-shell-window.h			\
-	e-shell.c				\
-	e-shell.h				\
+	e-shell-view.c				\
+	e-shell-view.h				\
 	e-sidebar.c				\
 	e-sidebar.h				\
 	es-event.c				\
--- shell/e-component-view.c	2005-12-13 22:56:53.000000000 +0530
+++ /dev/null	2005-12-20 08:29:25.436265750 +0530
@@ -1,141 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*-
- * e-component-view.c
- *
- * Copyright (C) 2004 Novell Inc.
- *
- * Author(s): Michael Zucchi <notzed ximian com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Helper class for evolution components to setup a view
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <glib.h>
-
-#include "e-component-view.h"
-
-#include "bonobo/bonobo-control.h"
-
-static BonoboObjectClass *parent_class = NULL;
-
-static void
-impl_ComponentView_getControls(PortableServer_Servant servant,
-		 Bonobo_Control *side_control,
-		 Bonobo_Control *view_control,
-		 Bonobo_Control *statusbar_control,
-		 CORBA_Environment *ev)
-{
-	EComponentView *ecv = (EComponentView *)bonobo_object_from_servant(servant);
-
-	*side_control = CORBA_Object_duplicate (BONOBO_OBJREF (ecv->side_control), ev);
-	*view_control = CORBA_Object_duplicate (BONOBO_OBJREF (ecv->view_control), ev);
-	*statusbar_control = CORBA_Object_duplicate (BONOBO_OBJREF (ecv->statusbar_control), ev);
-}
-
-/* GObject methods.  */
-
-static void
-impl_dispose (GObject *object)
-{
-	EComponentView *ecv = (EComponentView *)object;
-
-	ecv->side_control = NULL;
-	ecv->view_control = NULL;
-	ecv->statusbar_control = NULL;
-
-	((GObjectClass *)parent_class)->dispose(object);
-}
-
-static void
-impl_finalise (GObject *object)
-{
-	EComponentView *ecv = (EComponentView *)object;
-
-	g_free(ecv->id);
-
-	((GObjectClass *)parent_class)->finalize(object);
-}
-
-static void
-e_component_view_class_init (EComponentViewClass *klass)
-{
-	GObjectClass *object_class;
-	POA_GNOME_Evolution_ComponentView__epv *epv;
-
-	parent_class = g_type_class_ref(bonobo_object_get_type());
-
-	object_class = G_OBJECT_CLASS (klass);
-	object_class->dispose  = impl_dispose;
-	object_class->finalize = impl_finalise;
-
-	epv = & klass->epv;
-	epv->getControls = impl_ComponentView_getControls;
-}
-
-static void
-e_component_view_init (EComponentView *shell)
-{
-}
-
-EComponentView *e_component_view_new(GNOME_Evolution_ShellView parent, const char *id, struct _GtkWidget *side, struct _GtkWidget *view, struct _GtkWidget *statusbar)
-{
-	EComponentView *new = g_object_new (e_component_view_get_type (), NULL);
-	CORBA_Environment ev = { 0 };
-
-	new->id = g_strdup(id);
-	new->shell_view = CORBA_Object_duplicate(parent, &ev);
-	CORBA_exception_free(&ev);
-
-	/* FIXME: hook onto destroys */
-	new->side_control = bonobo_control_new(side);
-	new->view_control = bonobo_control_new(view);
-	new->statusbar_control = bonobo_control_new(statusbar);
-
-	return new;
-}
-
-EComponentView *e_component_view_new_controls(GNOME_Evolution_ShellView parent, const char *id, BonoboControl *side, BonoboControl *view, BonoboControl *statusbar)
-{
-	EComponentView *new = g_object_new (e_component_view_get_type (), NULL);
-	CORBA_Environment ev = { 0 };
-
-	new->id = g_strdup(id);
-	new->shell_view = CORBA_Object_duplicate(parent, &ev);
-	CORBA_exception_free(&ev);
-
-	/* FIXME: hook onto destroys */
-	new->side_control = side;
-	new->view_control = view;
-	new->statusbar_control = statusbar;
-
-	return new;
-}
-
-void
-e_component_view_set_title(EComponentView *ecv, const char *title)
-{
-	CORBA_Environment ev = { 0 };
-
-	/* save roundtrips, check title is the same */
-	GNOME_Evolution_ShellView_setTitle(ecv->shell_view, ecv->id, title, &ev);
-	CORBA_exception_free(&ev);
-}
-
-BONOBO_TYPE_FUNC_FULL (EComponentView, GNOME_Evolution_ComponentView, bonobo_object_get_type(), e_component_view)
-
--- shell/e-component-view.h	2005-12-13 22:58:43.000000000 +0530
+++ /dev/null	2005-12-20 08:29:25.436265750 +0530
@@ -1,78 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*-
- * e-component-view.h
- *
- * Copyright (C) 2004 Novell Inc.
- *
- * Author(s): Michael Zucchi <notzed ximian com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-#ifndef _E_COMPONENT_VIEW_H_
-#define _E_COMPONENT_VIEW_H_
-
-#include <bonobo/bonobo-object.h>
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-struct _GtkWidget;
-
-typedef struct _EComponentView        EComponentView;
-typedef struct _EComponentViewPrivate EComponentViewPrivate;
-typedef struct _EComponentViewClass   EComponentViewClass;
-
-#include "Evolution.h"
-
-#define E_TYPE_COMPONENT_VIEW			(e_component_view_get_type ())
-#define E_COMPONENT_VIEW(obj)			(GTK_CHECK_CAST ((obj), E_TYPE_COMPONENT_VIEW, EComponentView))
-#define E_COMPONENT_VIEW_CLASS(klass)		(GTK_CHECK_CLASS_CAST ((klass), E_TYPE_COMPONENT_VIEW, EComponentViewClass))
-#define E_IS_COMPONENT_VIEW(obj)			(GTK_CHECK_TYPE ((obj), E_TYPE_COMPONENT_VIEW))
-#define E_IS_COMPONENT_VIEW_CLASS(klass)		(GTK_CHECK_CLASS_TYPE ((obj), E_TYPE_COMPONENT_VIEW))
-
-struct _EComponentView {
-	BonoboObject parent;
-
-	EComponentViewPrivate *priv;
-
-	char *id;
-	GNOME_Evolution_ShellView shell_view;
-
-	struct _BonoboControl *side_control;
-	struct _BonoboControl *view_control;
-	struct _BonoboControl *statusbar_control;
-};
-
-struct _EComponentViewClass {
-	BonoboObjectClass parent_class;
-
-	POA_GNOME_Evolution_ComponentView__epv epv;
-};
-
-GType           e_component_view_get_type(void);
-EComponentView *e_component_view_new(GNOME_Evolution_ShellView shell_view, const char *id, struct _GtkWidget *side, struct _GtkWidget *view, struct _GtkWidget *status);
-EComponentView *e_component_view_new_controls(GNOME_Evolution_ShellView parent, const char *id, struct _BonoboControl *side, struct _BonoboControl *view, struct _BonoboControl *statusbar);
-
-void e_component_view_set_title(EComponentView *ecv, const char *title);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* _E_COMPONENT_VIEW_H_ */
-
--- shell/e-shell-view.c	2005-12-13 23:01:24.000000000 +0530
+++ /dev/null	2005-12-20 08:29:25.436265750 +0530
@@ -1,109 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*-
- * e-shell-view.c
- *
- * Copyright (C) 2004 Novell Inc.
- *
- * Author(s): Michael Zucchi <notzed ximian com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Helper class for evolution shells to setup a view
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <glib.h>
-
-#include <gtk/gtkwindow.h>
-
-#include "e-shell-view.h"
-#include "e-shell-window.h"
-
-static BonoboObjectClass *parent_class = NULL;
-
-struct _EShellViewPrivate {
-	int dummy;
-};
-
-static void
-impl_ShellView_setTitle(PortableServer_Servant _servant, const CORBA_char *id, const CORBA_char * title, CORBA_Environment * ev)
-{
-	EShellView *esw = (EShellView *)bonobo_object_from_servant(_servant);
-	char *tmp = g_strdup_printf("Evolution - %s", title);
-
-	printf("shell view:setTitle '%s'\n", title);
-
-	e_shell_window_set_title(esw->window, id, tmp);
-	g_free(tmp);
-}
-
-static void
-impl_ShellView_setComponent(PortableServer_Servant _servant, const CORBA_char *id, CORBA_Environment * ev)
-{
-	EShellView *esw = (EShellView *)bonobo_object_from_servant(_servant);
-
-	e_shell_window_switch_to_component(esw->window, id);
-}
-
-static void
-impl_dispose (GObject *object)
-{
-	/*EShellView *esv = (EShellView *)object;*/
-
-	((GObjectClass *)parent_class)->dispose(object);
-}
-
-static void
-impl_finalise (GObject *object)
-{
-	((GObjectClass *)parent_class)->finalize(object);
-}
-
-static void
-e_shell_view_class_init (EShellViewClass *klass)
-{
-	GObjectClass *object_class;
-	POA_GNOME_Evolution_ShellView__epv *epv;
-
-	parent_class = g_type_class_ref(bonobo_object_get_type());
-
-	object_class = G_OBJECT_CLASS (klass);
-	object_class->dispose  = impl_dispose;
-	object_class->finalize = impl_finalise;
-
-	epv = & klass->epv;
-	epv->setTitle = impl_ShellView_setTitle;
-	epv->setComponent = impl_ShellView_setComponent;
-}
-
-static void
-e_shell_view_init (EShellView *shell)
-{
-}
-
-EShellView *e_shell_view_new(struct _EShellWindow *window)
-{
-	EShellView *new = g_object_new (e_shell_view_get_type (), NULL);
-
-	/* TODO: listen to destroy? */
-	new->window = window;
-
-	return new;
-}
-
-BONOBO_TYPE_FUNC_FULL (EShellView, GNOME_Evolution_ShellView, bonobo_object_get_type(), e_shell_view)
-
--- shell/e-shell-view.h	2005-12-13 23:03:00.000000000 +0530
+++ /dev/null	2005-12-20 08:29:25.436265750 +0530
@@ -1,70 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-shell-view.h
- *
- * Copyright (C) 2000  Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * This is only a CORBA wrapper around e_shell_window.
- */
-
-#ifndef _E_SHELL_VIEW_H_
-#define _E_SHELL_VIEW_H_
-
-#include <bonobo-activation/bonobo-activation.h>
-#include <bonobo/bonobo-object.h>
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-struct _EShell;
-
-typedef struct _EShellView        EShellView;
-typedef struct _EShellViewPrivate EShellViewPrivate;
-typedef struct _EShellViewClass   EShellViewClass;
-
-#include "Evolution.h"
-
-#define E_TYPE_SHELL_VIEW			(e_shell_view_get_type ())
-#define E_SHELL_VIEW(obj)			(GTK_CHECK_CAST ((obj), E_TYPE_SHELL_VIEW, EShellView))
-#define E_SHELL_VIEW_CLASS(klass)		(GTK_CHECK_CLASS_CAST ((klass), E_TYPE_SHELL_VIEW, EShellViewClass))
-#define E_IS_SHELL_VIEW(obj)			(GTK_CHECK_TYPE ((obj), E_TYPE_SHELL_VIEW))
-#define E_IS_SHELL_VIEW_CLASS(klass)		(GTK_CHECK_CLASS_TYPE ((obj), E_TYPE_SHELL_VIEW))
-
-struct _EShellView {
-	BonoboObject parent;
-
-	struct _EShellWindow *window;
-
-	EShellViewPrivate *priv;
-};
-
-struct _EShellViewClass {
-	BonoboObjectClass parent_class;
-
-	POA_GNOME_Evolution_ShellView__epv epv;
-};
-
-GType                e_shell_view_get_type   (void);
-EShellView *e_shell_view_new(struct _EShellWindow *window);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* _E_SHELL_VIEW_H_ */
-
Index: shell/e-shell-window.c
===================================================================
RCS file: /cvs/gnome/evolution/shell/e-shell-window.c,v
retrieving revision 1.39
diff -u -p -r1.39 e-shell-window.c
--- shell/e-shell-window.c	23 Sep 2005 09:44:58 -0000	1.39
+++ shell/e-shell-window.c	20 Dec 2005 10:18:26 -0000
@@ -25,6 +25,7 @@
 #endif
 
 #include "e-shell-window.h"
+#include "e-shell-view.h"
 
 #include "Evolution.h"
 
@@ -67,6 +68,9 @@ struct _ComponentView {
 	char *component_id;
 	char *component_alias;
 
+	GNOME_Evolution_ComponentView component_view;
+	char *title;
+
 	GtkWidget *sidebar_widget;
 	GtkWidget *view_widget;
 	GtkWidget *statusbar_widget;
@@ -79,6 +83,8 @@ typedef struct _ComponentView ComponentV
 struct _EShellWindowPrivate {
 	EShell *shell;
 
+	EShellView *shell_view;	/* CORBA wrapper for this, just a placeholder */
+
 	/* plugin menu manager */
 	ESMenu *menu;
 
@@ -149,6 +155,13 @@ component_view_new (const char *id, cons
 static void
 component_view_free (ComponentView *view)
 {
+	if (view->component_view) {
+		CORBA_Environment ev = { 0 };
+
+		CORBA_Object_release(view->component_view, &ev);
+		CORBA_exception_free(&ev);
+	}
+
 	g_free (view->component_id);
 	g_free (view->component_alias);
 	g_free (view);
@@ -193,6 +206,7 @@ init_view (EShellWindow *window,
 	EShellWindowPrivate *priv = window->priv;
 	EComponentRegistry *registry = e_shell_peek_component_registry (window->priv->shell);
 	GNOME_Evolution_Component component_iface;
+	GNOME_Evolution_ComponentView component_view;
 	Bonobo_UIContainer container;
 	Bonobo_Control sidebar_control;
 	Bonobo_Control view_control;
@@ -221,19 +235,29 @@ init_view (EShellWindow *window,
 
 	/* 2. Set up view.  */
 
-	GNOME_Evolution_Component_createControls (component_iface, &sidebar_control, &view_control, &statusbar_control, &ev);
-	if (BONOBO_EX (&ev)) {
+	/* The rest of the code assumes that the component is valid and can create
+	   controls; if this fails something is really wrong in the component
+	   (e.g. methods not implemented)...  So handle it as if there was no
+	   component at all.  */
+
+	component_view = GNOME_Evolution_Component_createView(component_iface, BONOBO_OBJREF(priv->shell_view), &ev);
+	if (component_view == NULL || BONOBO_EX (&ev)) {
 		g_warning ("Cannot create view for %s", view->component_id);
+		bonobo_object_release_unref (component_iface, NULL);
+		CORBA_exception_free (&ev);
+		return;
+	}
 
-		/* The rest of the code assumes that the component is valid and can create
-		   controls; if this fails something is really wrong in the component
-		   (e.g. methods not implemented)...  So handle it as if there was no
-		   component at all.  */
+	GNOME_Evolution_ComponentView_getControls(component_view, &sidebar_control, &view_control, &statusbar_control, &ev);
+	if (BONOBO_EX (&ev)) {
+		g_warning ("Cannot create view for %s", view->component_id);
 		bonobo_object_release_unref (component_iface, NULL);
 		CORBA_exception_free (&ev);
 		return;
 	}
 
+	view->component_view = component_view;
+
 	CORBA_exception_free (&ev);
 
 	container = bonobo_ui_component_get_container (priv->ui_component);
@@ -301,9 +325,12 @@ switch_view (EShellWindow *window, Compo
 		gtk_notebook_set_current_page (GTK_NOTEBOOK (priv->statusbar_notebook), component_view->notebook_page_num);
 	}
 
-	title = g_strdup_printf ("Evolution - %s", info->button_label);
-	gtk_window_set_title (GTK_WINDOW (window), title);
-	g_free (title);
+	if (component_view->title == NULL) {
+		title = g_strdup_printf ("Evolution - %s", info->button_label);
+		gtk_window_set_title (GTK_WINDOW (window), title);
+		g_free (title);
+	} else
+		gtk_window_set_title (GTK_WINDOW (window), component_view->title);
 
 	if (info->button_icon)
 		gtk_window_set_icon (GTK_WINDOW (window), info->button_icon);
@@ -834,6 +861,7 @@ e_shell_window_init (EShellWindow *shell
 	EShellWindowPrivate *priv = g_new0 (EShellWindowPrivate, 1);
 
 	priv->tooltips = gtk_tooltips_new ();
+	priv->shell_view = e_shell_view_new(shell_window);
 
 	shell_window->priv = priv;
 
@@ -1054,5 +1082,31 @@ e_shell_window_show_settings (EShellWind
 	g_return_if_fail (E_IS_SHELL_WINDOW (window));
 
 	e_shell_show_settings (window->priv->shell, window->priv->current_view ? window->priv->current_view->component_alias : NULL, window);
+}
+
+void
+e_shell_window_set_title(EShellWindow *window, const char *component_id, const char *title)
+{
+	EShellWindowPrivate *priv = window->priv;
+	ComponentView *view = NULL;
+	GSList *p;
+
+	for (p = priv->component_views; p != NULL; p = p->next) {
+		ComponentView *this_view = p->data;
+
+		if (strcmp (this_view->component_id, component_id) == 0
+		    || (this_view->component_alias != NULL
+			&& strcmp (this_view->component_alias, component_id) == 0)) {
+			view = p->data;
+			break;
+		}
+	}
+
+	if (view) {
+		g_free(view->title);
+		view->title = g_strdup(title);
+		if (view->title && view == priv->current_view)
+			gtk_window_set_title((GtkWindow *)window, title);
+	}
 }
 
Index: shell/e-shell-window.h
===================================================================
RCS file: /cvs/gnome/evolution/shell/e-shell-window.h,v
retrieving revision 1.10
diff -u -p -r1.10 e-shell-window.h
--- shell/e-shell-window.h	23 Sep 2005 09:44:58 -0000	1.10
+++ shell/e-shell-window.h	20 Dec 2005 10:18:54 -0000
@@ -68,6 +68,8 @@ BonoboUIComponent *e_shell_window_peek_b
 ESidebar          *e_shell_window_peek_sidebar              (EShellWindow *window);
 GtkWidget         *e_shell_window_peek_statusbar            (EShellWindow *window);
 
+void e_shell_window_set_title(EShellWindow *window, const char *component_id, const char *title);
+
 void  e_shell_window_save_defaults  (EShellWindow *window);
 void  e_shell_window_show_settings  (EShellWindow *window);
 
Index: shell/e-shell.c
===================================================================
RCS file: /cvs/gnome/evolution/shell/e-shell.c,v
retrieving revision 1.267
diff -u -p -r1.267 e-shell.c
--- shell/e-shell.c	18 Aug 2005 04:35:31 -0000	1.267
+++ shell/e-shell.c	20 Dec 2005 10:19:45 -0000
@@ -28,6 +28,7 @@
 #include <dirent.h>
 
 #include "e-shell.h"
+#include "e-shell-view.h"
 
 #include "e-util/e-dialog-utils.h"
 #include "e-util/e-bconf-map.h"
@@ -211,7 +212,7 @@ raise_exception_if_not_ready (PortableSe
 	return FALSE;
 }
 
-static void
+static GNOME_Evolution_ShellView
 impl_Shell_createNewWindow (PortableServer_Servant servant,
 			    const CORBA_char *component_id,
 			    CORBA_Environment *ev)
@@ -219,9 +220,10 @@ impl_Shell_createNewWindow (PortableServ
 	BonoboObject *bonobo_object;
 	EShell *shell;
 	EShellWindow *shell_window;
+	EShellView *shell_view;
 
 	if (raise_exception_if_not_ready (servant, ev))
-		return;
+		return CORBA_OBJECT_NIL;
 
 	bonobo_object = bonobo_object_from_servant (servant);
 	shell = E_SHELL (bonobo_object);
@@ -233,8 +235,14 @@ impl_Shell_createNewWindow (PortableServ
 	if (shell_window == NULL) {
 		CORBA_exception_set (ev, CORBA_USER_EXCEPTION,
 				     ex_GNOME_Evolution_Shell_ComponentNotFound, NULL);
-		return;
+		return CORBA_OBJECT_NIL;
 	}
+
+	/* refs?? */
+	shell_view = e_shell_view_new(shell_window);
+	
+	return BONOBO_OBJREF(shell_view);
+
 }
 
 static void
Index: calendar/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2863
diff -u -p -r1.2863 ChangeLog
--- calendar/ChangeLog	6 Dec 2005 08:41:14 -0000	1.2863
+++ calendar/ChangeLog	20 Dec 2005 10:31:27 -0000
@@ -1,3 +1,15 @@
+2005-12-20  Johnny Jacob <johnnyjacob gmail com>
+
+	* gui/memos-component.c (impl_createControls): -> createView for
+	new shell apis.
+
+2004-06-28  Not Zed  <NotZed Ximian com>
+
+	* gui/tasks-component.c (impl_createControls): same.
+
+	* gui/calendar-component.c (impl_createControls): ->createView for
+	new shell apis.
+
 2005-12-06  Veerapuram Varadhan <vvaradhan novell com>
 
 	* conduits/todo/todo-conduit.c (start_calendar_server):
Index: calendar/gui/memos-component.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/memos-component.c,v
retrieving revision 1.2
diff -u -p -r1.2 memos-component.c
--- calendar/gui/memos-component.c	6 Dec 2005 05:29:34 -0000	1.2
+++ calendar/gui/memos-component.c	20 Dec 2005 10:31:51 -0000
@@ -34,6 +34,7 @@
 #include <libecal/e-cal.h>
 #include <libedataserverui/e-source-selector.h>
 #include <shell/e-user-creatable-items-handler.h>
+#include <shell/e-component-view.h>
 #include "e-cal-model.h"
 #include "e-memos.h"
 #include "memos-component.h"
@@ -1109,16 +1110,15 @@ view_destroyed_cb (gpointer data, GObjec
 	}
 }
 
-static void
-impl_createControls (PortableServer_Servant servant,
-		     Bonobo_Control *corba_sidebar_control,
-		     Bonobo_Control *corba_view_control,
-		     Bonobo_Control *corba_statusbar_control,
-		     CORBA_Environment *ev)
+static GNOME_Evolution_ComponentView
+impl_createView (PortableServer_Servant servant,
+		 GNOME_Evolution_ShellView parent,
+		 CORBA_Environment *ev)
 {
 	MemosComponent *component = MEMOS_COMPONENT (bonobo_object_from_servant (servant));
 	MemosComponentPrivate *priv;
 	MemosComponentView *component_view;
+	EComponentView *ecv;
 	
 	priv = component->priv;
 
@@ -1128,16 +1128,17 @@ impl_createControls (PortableServer_Serv
 		/* FIXME Should we describe the problem in a control? */
 		bonobo_exception_set (ev, ex_GNOME_Evolution_Component_Failed);
 
-		return;
+		return CORBA_OBJECT_NIL;
 	}
 
 	g_object_weak_ref (G_OBJECT (component_view->view_control), view_destroyed_cb, component);
 	priv->views = g_list_append (priv->views, component_view);
 	
-	/* Return the controls */
-	*corba_sidebar_control = CORBA_Object_duplicate (BONOBO_OBJREF (component_view->sidebar_control), ev);
-	*corba_view_control = CORBA_Object_duplicate (BONOBO_OBJREF (component_view->view_control), ev);
-	*corba_statusbar_control = CORBA_Object_duplicate (BONOBO_OBJREF (component_view->statusbar_control), ev);
+	/* TODO: Make CalendarComponentView just subclass EComponentView */
+	ecv = e_component_view_new_controls (parent, "memos", component_view->sidebar_control,
+					     component_view->view_control, component_view->statusbar_control);
+
+	return BONOBO_OBJREF(ecv);
 }
 
 static GNOME_Evolution_CreatableItemTypeList *
@@ -1262,7 +1263,7 @@ memos_component_class_init (MemosCompone
 	parent_class = g_type_class_peek_parent (klass);
 
 	epv->upgradeFromVersion      = impl_upgradeFromVersion;
-	epv->createControls          = impl_createControls;
+	epv->createView		     = impl_createView;
 	epv->_get_userCreatableItems = impl__get_userCreatableItems;
 	epv->requestCreateItem       = impl_requestCreateItem;
 
Index: mail/Evolution-Mail.idl
===================================================================
RCS file: /cvs/gnome/evolution/mail/Evolution-Mail.idl,v
retrieving revision 1.2
diff -u -p -r1.2 Evolution-Mail.idl
--- mail/Evolution-Mail.idl	2 Jun 2005 05:51:41 -0000	1.2
+++ mail/Evolution-Mail.idl	20 Dec 2005 10:33:09 -0000
@@ -3,7 +3,7 @@
 #define _GNOME_EVOLUTION_MAILCOMPONENT_IDL
 
 
-#include <shell/Evolution-Component.idl>
+#include <shell/Evolution-Shell.idl>
 
 module GNOME {
 module Evolution {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]