aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/calendar-component.c
diff options
context:
space:
mode:
authorIain Holmes <iain@helixcode.com>2000-10-10 08:18:07 +0800
committerIain Holmes <iain@src.gnome.org>2000-10-10 08:18:07 +0800
commit1febeef6becb09f0b6838e3e6850fb7d1e538396 (patch)
treee4bf09b22a37faf70ca1f2e83ba7c0b09e000d74 /calendar/gui/calendar-component.c
parentd9d237a838ee852028c6d93b26b01b13f93464ac (diff)
downloadgsoc2013-evolution-1febeef6becb09f0b6838e3e6850fb7d1e538396.tar
gsoc2013-evolution-1febeef6becb09f0b6838e3e6850fb7d1e538396.tar.gz
gsoc2013-evolution-1febeef6becb09f0b6838e3e6850fb7d1e538396.tar.bz2
gsoc2013-evolution-1febeef6becb09f0b6838e3e6850fb7d1e538396.tar.lz
gsoc2013-evolution-1febeef6becb09f0b6838e3e6850fb7d1e538396.tar.xz
gsoc2013-evolution-1febeef6becb09f0b6838e3e6850fb7d1e538396.tar.zst
gsoc2013-evolution-1febeef6becb09f0b6838e3e6850fb7d1e538396.zip
Added the executive-summary library and cflags
2000-10-09 Iain Holmes <iain@helixcode.com> * Makefile.am: Added the executive-summary library and cflags * evolution-calendar.oafinfo: Added oaf servers for the executive summary and executive summary factory. * calendar-summary.[ch]: New files to create the summary. * component-factory.c (summary_fn): Create the executive summary component. (component_factory_init): Start the summary factory as well. svn path=/trunk/; revision=5807
Diffstat (limited to 'calendar/gui/calendar-component.c')
-rw-r--r--calendar/gui/calendar-component.c26
1 files changed, 25 insertions, 1 deletions
diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c
index fce8512725..351beee6b3 100644
--- a/calendar/gui/calendar-component.c
+++ b/calendar/gui/calendar-component.c
@@ -24,14 +24,19 @@
#include <config.h>
#include <bonobo.h>
#include "evolution-shell-component.h"
+#include <executive-summary/evolution-services/executive-summary-component.h>
#include "component-factory.h"
#include "control-factory.h"
+#include "calendar-summary.h"
#define COMPONENT_FACTORY_ID "OAFIID:evolution-shell-component-factory:evolution-calendar:cba77062-1466-4aac-8ce7-b019eaf2e921"
+#define SUMMARY_FACTORY_ID "OAFIID:evolution-executive-summary-component-factory:evolution-calendar:6b45a890-fbc0-4f20-97d8-b8e344c059af"
static BonoboGenericFactory *factory = NULL;
+static BonoboGenericFactory *summary_factory = NULL;
+static char *evolution_dir;
static const EvolutionShellComponentFolderType folder_types[] = {
{ "calendar", "evolution-calendar.png" },
@@ -68,6 +73,7 @@ owner_set_cb (EvolutionShellComponent *shell_component,
Evolution_Shell shell_interface,
const char *evolution_homedir)
{
+ evolution_dir = g_strdup (evolution_homedir);
owner_count ++;
}
@@ -77,6 +83,7 @@ owner_unset_cb (EvolutionShellComponent *shell_component,
EvolutionShellClient shell_client,
void *data)
{
+ g_free (evolution_dir);
owner_count --;
if (owner_count <= 0)
gtk_main_quit();
@@ -101,15 +108,32 @@ factory_fn (BonoboGenericFactory *factory,
return BONOBO_OBJECT (shell_component);
}
+static BonoboObject *
+summary_fn (BonoboGenericFactory *factory,
+ void *closure)
+{
+ ExecutiveSummaryComponent *summary_component;
+
+ summary_component = executive_summary_component_new (NULL,
+ create_summary_view,
+ NULL,
+ evolution_dir);
+ return BONOBO_OBJECT (summary_component);
+}
+
void
component_factory_init (void)
{
- if (factory != NULL)
+ if (factory != NULL && factory != NULL)
return;
factory = bonobo_generic_factory_new (COMPONENT_FACTORY_ID, factory_fn, NULL);
+ summary_factory = bonobo_generic_factory_new (SUMMARY_FACTORY_ID, summary_fn, NULL);
if (factory == NULL)
g_error ("Cannot initialize Evolution's calendar component.");
+
+ if (summary_factory == NULL)
+ g_error ("Cannot initialize Evolution's calendar summary component.");
}