aboutsummaryrefslogtreecommitdiffstats
path: root/mail/folder-browser-factory.c
diff options
context:
space:
mode:
authorbertrand <bertrand@helixcode.com>2000-03-13 08:10:21 +0800
committerBertrand Guiheneuf <bertrand@src.gnome.org>2000-03-13 08:10:21 +0800
commit4ec9945f0595444a94b0816f0146bc797b3037b2 (patch)
tree55c70ce994cee42eec86c375faffabb0044ff404 /mail/folder-browser-factory.c
parent4bfd8d8f291baa38ab1bf73eb1618a202834c660 (diff)
downloadgsoc2013-evolution-4ec9945f0595444a94b0816f0146bc797b3037b2.tar
gsoc2013-evolution-4ec9945f0595444a94b0816f0146bc797b3037b2.tar.gz
gsoc2013-evolution-4ec9945f0595444a94b0816f0146bc797b3037b2.tar.bz2
gsoc2013-evolution-4ec9945f0595444a94b0816f0146bc797b3037b2.tar.lz
gsoc2013-evolution-4ec9945f0595444a94b0816f0146bc797b3037b2.tar.xz
gsoc2013-evolution-4ec9945f0595444a94b0816f0146bc797b3037b2.tar.zst
gsoc2013-evolution-4ec9945f0595444a94b0816f0146bc797b3037b2.zip
added the get_e_folder_type function.
2000-03-12 bertrand <bertrand@helixcode.com> * shell/e-folder.c (e_folder_get_folder_type): added the get_e_folder_type function. 2000-03-12 bertrand <bertrand@helixcode.com> * 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
Diffstat (limited to 'mail/folder-browser-factory.c')
-rw-r--r--mail/folder-browser-factory.c52
1 files changed, 50 insertions, 2 deletions
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);
}