From 4ec9945f0595444a94b0816f0146bc797b3037b2 Mon Sep 17 00:00:00 2001 From: bertrand Date: Mon, 13 Mar 2000 00:10:21 +0000 Subject: added the get_e_folder_type function. 2000-03-12 bertrand * shell/e-folder.c (e_folder_get_folder_type): added the get_e_folder_type function. 2000-03-12 bertrand * folder-browser.h: added a reference to an Evolution::Shell object. * folder-browser-factory.c (folder_browser_set_shell): (folder_browser_control_add_service_repository_interface): (folder_browser_factory): the folder-browser control now implements the Evolution/ServiceRepository interface. Sync for matt svn path=/trunk/; revision=2108 --- mail/ChangeLog | 10 +++++++++ mail/Makefile.am | 7 +++++- mail/folder-browser-factory.c | 52 +++++++++++++++++++++++++++++++++++++++++-- mail/folder-browser.c | 1 - mail/folder-browser.h | 7 ++++++ 5 files changed, 73 insertions(+), 4 deletions(-) (limited to 'mail') diff --git a/mail/ChangeLog b/mail/ChangeLog index 053f1b1d24..afff7a2efd 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,13 @@ +2000-03-12 bertrand + + * folder-browser.h: added a reference to an + Evolution::Shell object. + + * folder-browser-factory.c (folder_browser_set_shell): + (folder_browser_control_add_service_repository_interface): + (folder_browser_factory): the folder-browser control now + implements the Evolution/ServiceRepository interface. + 2000-03-07 bertrand * folder-browser-factory.c (development_warning): diff --git a/mail/Makefile.am b/mail/Makefile.am index 7fd2e98c7d..a7421d27e8 100644 --- a/mail/Makefile.am +++ b/mail/Makefile.am @@ -36,9 +36,14 @@ evolution_mail_SOURCES = \ message-list.c \ message-list.h \ session.c \ - session.h + session.h + evolution_mail_LDADD = \ + ../shell/Evolution-common.o \ + ../shell/Evolution-stubs.o \ + ../shell/Evolution-skels.o \ + ../shell/evolution-service-repository.o \ ../widgets/e-table/libetable.a \ ../widgets/e-text/libetext.a \ ../camel/libcamel.la \ diff --git a/mail/folder-browser-factory.c b/mail/folder-browser-factory.c index 638ebdcaaf..213e1408ad 100644 --- a/mail/folder-browser-factory.c +++ b/mail/folder-browser-factory.c @@ -17,6 +17,8 @@ #include "e-util/e-gui-utils.h" #include "folder-browser.h" #include "main.h" +#include "shell/Evolution.h" +#include "shell/evolution-service-repository.h" static const gchar *warning_dialog_buttons[] = { @@ -24,7 +26,44 @@ static const gchar *warning_dialog_buttons[] = { "OK", NULL }; - + +static void +folder_browser_set_shell (EvolutionServiceRepository *sr, + Evolution_Shell shell, + void *closure) +{ + FolderBrowser *folder_browser; + + g_return_if_fail (closure); + g_return_if_fail (IS_FOLDER_BROWSER (closure)); + g_return_if_fail (shell != CORBA_OBJECT_NIL); + + folder_browser = FOLDER_BROWSER (closure); + + /* FIXME : ref the shell here */ + folder_browser->shell = shell; + +} + +static void +folder_browser_control_add_service_repository_interface (BonoboControl *control, + GtkWidget *folder_browser) +{ + EvolutionServiceRepository *sr; + + /* + * create an implementation for the Evolution::ServiceRepository + * interface + */ + sr = evolution_service_repository_new (folder_browser_set_shell, + (void *)folder_browser); + + /* add the interface to the control */ + bonobo_object_add_interface (BONOBO_OBJECT (control), + BONOBO_OBJECT (sr)); +} + + static int development_warning () { @@ -92,7 +131,16 @@ folder_browser_factory (BonoboGenericFactory *factory, void *closure) bonobo_control_set_property_bag ( control, FOLDER_BROWSER (folder_browser)->properties); - + + /* for the moment, the control has the ability to register + * some services itself, but this should not last. + * + * It's not the way to do it, but we don't have the + * correct infrastructure in the shell now. + */ + folder_browser_control_add_service_repository_interface (control, folder_browser); + + return BONOBO_OBJECT (control); } diff --git a/mail/folder-browser.c b/mail/folder-browser.c index b305616bf8..130011732b 100644 --- a/mail/folder-browser.c +++ b/mail/folder-browser.c @@ -26,7 +26,6 @@ static GtkObjectClass *folder_browser_parent_class; - static void folder_browser_destroy (GtkObject *object) { diff --git a/mail/folder-browser.h b/mail/folder-browser.h index 7692b1a20a..04c3dbcb4a 100644 --- a/mail/folder-browser.h +++ b/mail/folder-browser.h @@ -1,3 +1,6 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ + + #ifndef _FOLDER_BROWSER_H_ #define _FOLDER_BROWSER_H_ @@ -7,6 +10,8 @@ #include #include "message-list.h" #include "mail-display.h" +#include "shell/Evolution.h" + #define FOLDER_BROWSER_TYPE (folder_browser_get_type ()) #define FOLDER_BROWSER(o) (GTK_CHECK_CAST ((o), FOLDER_BROWSER_TYPE, FolderBrowser)) @@ -20,6 +25,8 @@ struct _FolderBrowser { BonoboPropertyBag *properties; + Evolution_Shell shell; + /* * The current URI being displayed by the FolderBrowser */ -- cgit