aboutsummaryrefslogtreecommitdiffstats
path: root/executive-summary/component
diff options
context:
space:
mode:
Diffstat (limited to 'executive-summary/component')
-rw-r--r--executive-summary/component/.cvsignore2
-rw-r--r--executive-summary/component/Makefile.am64
-rw-r--r--executive-summary/component/Makefile.in465
-rw-r--r--executive-summary/component/component-factory.c156
-rw-r--r--executive-summary/component/component-factory.h31
-rw-r--r--executive-summary/component/e-summary-factory.c255
-rw-r--r--executive-summary/component/e-summary-factory.h32
-rw-r--r--executive-summary/component/e-summary.c496
-rw-r--r--executive-summary/component/e-summary.h69
-rw-r--r--executive-summary/component/executive-summary.pngbin0 -> 25562 bytes
-rw-r--r--executive-summary/component/main.c80
11 files changed, 1650 insertions, 0 deletions
diff --git a/executive-summary/component/.cvsignore b/executive-summary/component/.cvsignore
new file mode 100644
index 0000000000..8f551d62a4
--- /dev/null
+++ b/executive-summary/component/.cvsignore
@@ -0,0 +1,2 @@
+core
+Makefile.in
diff --git a/executive-summary/component/Makefile.am b/executive-summary/component/Makefile.am
new file mode 100644
index 0000000000..1cd38c67ce
--- /dev/null
+++ b/executive-summary/component/Makefile.am
@@ -0,0 +1,64 @@
+bin_PROGRAMS = evolution-executive-summary
+
+INCLUDES = \
+ -I$(top_srcdir)/widgets \
+ -I$(top_srcdir)/widgets/e-text \
+ -I$(top_srcdir) \
+ -I$(top_builddir)/shell \
+ -I$(top_srcdir)/shell \
+ -I$(top_builddir)/executive-summary/evolution-services \
+ -I$(top_srcdir)/executive-summary/widgets \
+ $(GNOME_VFS_CFLAGS) \
+ $(UNICODE_CFLAGS) \
+ $(GTKHTML_CFLAGS) \
+ -DEVOLUTION_VERSION=\""$(VERSION)"\" \
+ -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \
+ -DEVOLUTION_ICONSDIR=\""$(iconsdir)"\" \
+ -DEVOLUTION_LOCALEDIR=\""$(datadir)/locale"\" \
+ -DEVOLUTION_DATADIR=\""$(datadir)"\" \
+ -DG_LOG_DOMAIN=\"evolution-executive-summary\"
+
+CLEANFILES = $(IDL_GENERATED)
+
+IDL_GENERATED = \
+ Executive-Summary.h \
+ Executive-Summary-common.c \
+ Executive-Summary-skels.c \
+ Executive-Summary-stubs.c
+
+Executive-Summary-impl.o: Executive-Summary.h
+
+$(IDL_GENERATED):
+ $(ORBIT_IDL) -I $(datadir)/idl `$(GNOME_CONFIG) --cflags idl` \
+ -I$(srcdir) $(srcdir)/../idl/Executive-Summary.idl
+
+evolution_executive_summary_SOURCES = \
+ component-factory.c \
+ component-factory.h \
+ e-summary.c \
+ e-summary.h \
+ e-summary-factory.c \
+ e-summary-factory.h \
+ main.c
+
+evolution_executive_summary_LDADD = \
+ $(top_builddir)/shell/libeshell.a \
+ $(top_builddir)/widgets/misc/libemiscwidgets.a \
+ $(top_builddir)/e-util/libeutil.la \
+ $(top_builddir)/executive-summary/evolution-services/libevolution-services.la \
+ $(top_builddir)/executive-summary/widgets/libesummary-widgets.a \
+ $(BONOBO_VFS_GNOME_LIBS) \
+ $(EXTRA_GNOME_LIBS) \
+ $(GTKHTML_LIBS) \
+ $(UNICODE_LIBS)
+
+if ENABLE_PURIFY
+PLINK = $(LIBTOOL) --mode=link $(PURIFY) $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
+
+all-local: evolution-mail.pure
+
+evolution-mail.pure: evolution-mail
+ @rm -f evolution-mail.pure
+ $(PLINK) $(evolution_mail_LDFLAGS) $(evolution_mail_OBJECTS) $(evolution_mail_LDADD) $(LIBS)
+
+endif
diff --git a/executive-summary/component/Makefile.in b/executive-summary/component/Makefile.in
new file mode 100644
index 0000000000..7aed4eb957
--- /dev/null
+++ b/executive-summary/component/Makefile.in
@@ -0,0 +1,465 @@
+# Makefile.in generated automatically by automake 1.4a from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ../..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_FLAG =
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+AS = @AS@
+BONOBO_GNOME_CFLAGS = @BONOBO_GNOME_CFLAGS@
+BONOBO_GNOME_LIBS = @BONOBO_GNOME_LIBS@
+BONOBO_HTML_GNOME_CFLAGS = @BONOBO_HTML_GNOME_CFLAGS@
+BONOBO_HTML_GNOME_LIBS = @BONOBO_HTML_GNOME_LIBS@
+BONOBO_VFS_GNOME_CFLAGS = @BONOBO_VFS_GNOME_CFLAGS@
+BONOBO_VFS_GNOME_LIBS = @BONOBO_VFS_GNOME_LIBS@
+CAPPLET_LIBS = @CAPPLET_LIBS@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CPP = @CPP@
+DATADIRNAME = @DATADIRNAME@
+DLLTOOL = @DLLTOOL@
+EVOLUTION_DIR = @EVOLUTION_DIR@
+EXTRA_GNOME_CFLAGS = @EXTRA_GNOME_CFLAGS@
+EXTRA_GNOME_LIBS = @EXTRA_GNOME_LIBS@
+GENCAT = @GENCAT@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GNOMEGNORBA_LIBS = @GNOMEGNORBA_LIBS@
+GNOMEUI_LIBS = @GNOMEUI_LIBS@
+GNOME_APPLETS_LIBS = @GNOME_APPLETS_LIBS@
+GNOME_CAPPLET_LIBS = @GNOME_CAPPLET_LIBS@
+GNOME_CONFIG = @GNOME_CONFIG@
+GNOME_DOCKLETS_LIBS = @GNOME_DOCKLETS_LIBS@
+GNOME_INCLUDEDIR = @GNOME_INCLUDEDIR@
+GNOME_LIBDIR = @GNOME_LIBDIR@
+GNOME_LIBS = @GNOME_LIBS@
+GNOME_PILOT_CFLAGS = @GNOME_PILOT_CFLAGS@
+GNOME_PILOT_LIBS = @GNOME_PILOT_LIBS@
+GNOME_PRINT_CFLAGS = @GNOME_PRINT_CFLAGS@
+GNOME_PRINT_LIBS = @GNOME_PRINT_LIBS@
+GNOME_VFS_CFLAGS = @GNOME_VFS_CFLAGS@
+GNOME_VFS_LIBS = @GNOME_VFS_LIBS@
+GNOME_XML_LIB = @GNOME_XML_LIB@
+GNORBA_CFLAGS = @GNORBA_CFLAGS@
+GNORBA_LIBS = @GNORBA_LIBS@
+GPG = @GPG@
+GTKDOC = @GTKDOC@
+GTKHTML_CFLAGS = @GTKHTML_CFLAGS@
+GTKHTML_LIBS = @GTKHTML_LIBS@
+GTKXMHTML_LIBS = @GTKXMHTML_LIBS@
+GTK_CFLAGS = @GTK_CFLAGS@
+GTK_CONFIG = @GTK_CONFIG@
+GTK_LIBS = @GTK_LIBS@
+GT_NO = @GT_NO@
+GT_YES = @GT_YES@
+HAVE_GTK_DOC = @HAVE_GTK_DOC@
+INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
+INSTOBJEXT = @INSTOBJEXT@
+INTLDEPS = @INTLDEPS@
+INTLLIBS = @INTLLIBS@
+INTLOBJS = @INTLOBJS@
+KRB4_CFLAGS = @KRB4_CFLAGS@
+KRB4_LDFLAGS = @KRB4_LDFLAGS@
+KRB5_CFLAGS = @KRB5_CFLAGS@
+KRB5_LDFLAGS = @KRB5_LDFLAGS@
+LDAP_LIBS = @LDAP_LIBS@
+LEX = @LEX@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+OAF_CFLAGS = @OAF_CFLAGS@
+OAF_CONFIG = @OAF_CONFIG@
+OAF_LIBS = @OAF_LIBS@
+OBJDUMP = @OBJDUMP@
+ORBIT_CFLAGS = @ORBIT_CFLAGS@
+ORBIT_CONFIG = @ORBIT_CONFIG@
+ORBIT_IDL = @ORBIT_IDL@
+ORBIT_LIBS = @ORBIT_LIBS@
+PACKAGE = @PACKAGE@
+PGP = @PGP@
+PGP5 = @PGP5@
+PILOT_BINS = @PILOT_BINS@
+PILOT_LIBS = @PILOT_LIBS@
+PISOCK_INCLUDEDIR = @PISOCK_INCLUDEDIR@
+PISOCK_LIBDIR = @PISOCK_LIBDIR@
+PISOCK_LIBS = @PISOCK_LIBS@
+POFILES = @POFILES@
+POSUB = @POSUB@
+PTHREAD_LIB = @PTHREAD_LIB@
+PURIFY = @PURIFY@
+RANLIB = @RANLIB@
+SENDMAIL = @SENDMAIL@
+THREADS_CFLAGS = @THREADS_CFLAGS@
+THREADS_LIBS = @THREADS_LIBS@
+UNICODE_CFLAGS = @UNICODE_CFLAGS@
+UNICODE_LIBS = @UNICODE_LIBS@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+XPM_LIBS = @XPM_LIBS@
+YACC = @YACC@
+ZVT_LIBS = @ZVT_LIBS@
+cflags_set = @cflags_set@
+cxxflags_set = @cxxflags_set@
+l = @l@
+
+bin_PROGRAMS = evolution-executive-summary
+
+INCLUDES = -I$(top_srcdir)/widgets -I$(top_srcdir)/widgets/e-text -I$(top_srcdir) -I$(top_builddir)/shell -I$(top_srcdir)/shell -I$(top_builddir)/executive-summary/evolution-services -I$(top_srcdir)/executive-summary/widgets $(GNOME_VFS_CFLAGS) $(UNICODE_CFLAGS) $(GTKHTML_CFLAGS) -DEVOLUTION_VERSION=\""$(VERSION)"\" -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" -DEVOLUTION_ICONSDIR=\""$(iconsdir)"\" -DEVOLUTION_LOCALEDIR=\""$(datadir)/locale"\" -DEVOLUTION_DATADIR=\""$(datadir)"\" -DG_LOG_DOMAIN=\"evolution-executive-summary\"
+
+
+CLEANFILES = $(IDL_GENERATED)
+
+IDL_GENERATED = Executive-Summary.h Executive-Summary-common.c Executive-Summary-skels.c Executive-Summary-stubs.c
+
+
+evolution_executive_summary_SOURCES = component-factory.c component-factory.h e-summary.c e-summary.h e-summary-factory.c e-summary-factory.h main.c
+
+
+evolution_executive_summary_LDADD = $(top_builddir)/shell/libeshell.a $(top_builddir)/widgets/misc/libemiscwidgets.a $(top_builddir)/e-util/libeutil.la $(top_builddir)/executive-summary/evolution-services/libevolution-services.la $(top_builddir)/executive-summary/widgets/libesummary-widgets.a $(BONOBO_VFS_GNOME_LIBS) $(EXTRA_GNOME_LIBS) $(GTKHTML_LIBS) $(UNICODE_LIBS)
+
+
+@ENABLE_PURIFY_TRUE@PLINK = $(LIBTOOL) --mode=link $(PURIFY) $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../../config.h
+CONFIG_CLEAN_FILES =
+PROGRAMS = $(bin_PROGRAMS)
+
+
+DEFS = @DEFS@ -I. -I$(srcdir) -I../..
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+evolution_executive_summary_OBJECTS = component-factory.o e-summary.o \
+e-summary-factory.o main.o
+evolution_executive_summary_DEPENDENCIES = \
+$(top_builddir)/shell/libeshell.a \
+$(top_builddir)/widgets/misc/libemiscwidgets.a \
+$(top_builddir)/e-util/libeutil.la \
+$(top_builddir)/executive-summary/evolution-services/libevolution-services.la \
+$(top_builddir)/executive-summary/widgets/libesummary-widgets.a
+evolution_executive_summary_LDFLAGS =
+CFLAGS = @CFLAGS@
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
+DIST_COMMON = Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = gtar
+GZIP_ENV = --best
+DEP_FILES = .deps/component-factory.P .deps/e-summary-factory.P \
+.deps/e-summary.P .deps/main.P
+SOURCES = $(evolution_executive_summary_SOURCES)
+OBJECTS = $(evolution_executive_summary_OBJECTS)
+
+all: all-redirect
+.SUFFIXES:
+.SUFFIXES: .S .c .lo .o .s
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && $(AUTOMAKE) --gnu executive-summary/component/Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+
+mostlyclean-binPROGRAMS:
+
+clean-binPROGRAMS:
+ -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+
+distclean-binPROGRAMS:
+
+maintainer-clean-binPROGRAMS:
+
+install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(bindir)
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ if test -f $$p; then \
+ echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
+ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+ else :; fi; \
+ done
+
+uninstall-binPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ list='$(bin_PROGRAMS)'; for p in $$list; do \
+ rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+ done
+
+.s.o:
+ $(COMPILE) -c $<
+
+.S.o:
+ $(COMPILE) -c $<
+
+mostlyclean-compile:
+ -rm -f *.o core *.core
+
+clean-compile:
+
+distclean-compile:
+ -rm -f *.tab.c
+
+maintainer-clean-compile:
+
+.s.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+.S.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+
+maintainer-clean-libtool:
+
+evolution-executive-summary: $(evolution_executive_summary_OBJECTS) $(evolution_executive_summary_DEPENDENCIES)
+ @rm -f evolution-executive-summary
+ $(LINK) $(evolution_executive_summary_LDFLAGS) $(evolution_executive_summary_OBJECTS) $(evolution_executive_summary_LDADD) $(LIBS)
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ here=`pwd` && cd $(srcdir) \
+ && mkid -f$$here/ID $$unique $(LISP)
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
+
+mostlyclean-tags:
+
+clean-tags:
+
+distclean-tags:
+ -rm -f TAGS ID
+
+maintainer-clean-tags:
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = executive-summary/component
+
+distdir: $(DISTFILES)
+ here=`cd $(top_builddir) && pwd`; \
+ top_distdir=`cd $(top_distdir) && pwd`; \
+ distdir=`cd $(distdir) && pwd`; \
+ cd $(top_srcdir) \
+ && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu executive-summary/component/Makefile
+ @for file in $(DISTFILES); do \
+ d=$(srcdir); \
+ if test -d $$d/$$file; then \
+ cp -pr $$d/$$file $(distdir)/$$file; \
+ else \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file || :; \
+ fi; \
+ done
+
+DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
+
+-include $(DEP_FILES)
+
+mostlyclean-depend:
+
+clean-depend:
+
+distclean-depend:
+ -rm -rf .deps
+
+maintainer-clean-depend:
+
+%.o: %.c
+ @echo '$(COMPILE) -c $<'; \
+ $(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
+ @-cp .deps/$(*F).pp .deps/$(*F).P; \
+ tr ' ' '\012' < .deps/$(*F).pp \
+ | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
+ >> .deps/$(*F).P; \
+ rm .deps/$(*F).pp
+
+%.lo: %.c
+ @echo '$(LTCOMPILE) -c $<'; \
+ $(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
+ @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
+ < .deps/$(*F).pp > .deps/$(*F).P; \
+ tr ' ' '\012' < .deps/$(*F).pp \
+ | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
+ >> .deps/$(*F).P; \
+ rm -f .deps/$(*F).pp
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am: install-binPROGRAMS
+install-exec: install-exec-am
+
+install-data-am:
+install-data: install-data-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am: uninstall-binPROGRAMS
+uninstall: uninstall-am
+all-am: Makefile $(PROGRAMS) all-local
+all-redirect: all-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
+installdirs:
+ $(mkinstalldirs) $(DESTDIR)$(bindir)
+
+
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-compile \
+ mostlyclean-libtool mostlyclean-tags mostlyclean-depend \
+ mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am: clean-binPROGRAMS clean-compile clean-libtool clean-tags \
+ clean-depend clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am: distclean-binPROGRAMS distclean-compile distclean-libtool \
+ distclean-tags distclean-depend distclean-generic \
+ clean-am
+ -rm -f libtool
+
+distclean: distclean-am
+
+maintainer-clean-am: maintainer-clean-binPROGRAMS \
+ maintainer-clean-compile maintainer-clean-libtool \
+ maintainer-clean-tags maintainer-clean-depend \
+ maintainer-clean-generic distclean-am
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \
+maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \
+mostlyclean-compile distclean-compile clean-compile \
+maintainer-clean-compile mostlyclean-libtool distclean-libtool \
+clean-libtool maintainer-clean-libtool tags mostlyclean-tags \
+distclean-tags clean-tags maintainer-clean-tags distdir \
+mostlyclean-depend distclean-depend clean-depend \
+maintainer-clean-depend info-am info dvi-am dvi check check-am \
+installcheck-am installcheck install-exec-am install-exec \
+install-data-am install-data install-am install uninstall-am uninstall \
+all-local all-redirect all-am all installdirs mostlyclean-generic \
+distclean-generic clean-generic maintainer-clean-generic clean \
+mostlyclean distclean maintainer-clean
+
+
+Executive-Summary-impl.o: Executive-Summary.h
+
+$(IDL_GENERATED):
+ $(ORBIT_IDL) -I $(datadir)/idl `$(GNOME_CONFIG) --cflags idl` \
+ -I$(srcdir) $(srcdir)/../idl/Executive-Summary.idl
+
+@ENABLE_PURIFY_TRUE@all-local: evolution-mail.pure
+
+@ENABLE_PURIFY_TRUE@evolution-mail.pure: evolution-mail
+@ENABLE_PURIFY_TRUE@ @rm -f evolution-mail.pure
+@ENABLE_PURIFY_TRUE@ $(PLINK) $(evolution_mail_LDFLAGS) $(evolution_mail_OBJECTS) $(evolution_mail_LDADD) $(LIBS)
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/executive-summary/component/component-factory.c b/executive-summary/component/component-factory.c
new file mode 100644
index 0000000000..3e9edaafdf
--- /dev/null
+++ b/executive-summary/component/component-factory.c
@@ -0,0 +1,156 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/* component-factory.c
+ *
+ * Authors: Ettore Perazzoli <ettore@helixcode.com>
+ * Iain Holmes <iain@helixcode.com>
+ *
+ * Copyright (C) 2000 Helix Code, Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * 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.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <bonobo.h>
+
+#include "Evolution.h"
+#include "evolution-storage.h"
+
+#include "evolution-shell-component.h"
+#include "e-util/e-gui-utils.h"
+
+#include "component-factory.h"
+#include "e-summary-factory.h"
+
+#define COMPONENT_FACTORY_IID "OAFIID:evolution-shell-component-factory:evolution-executive-summary:e030e71d-0c53-4118-8d48-28757f0a8504"
+
+static BonoboGenericFactory *factory = NULL;
+static gint running_objects = 0;
+
+static const EvolutionShellComponentFolderType folder_types[] = {
+ { "executive-summary", "evolution-today.png" },
+ { NULL, NULL }
+};
+
+char *evolution_dir;
+
+/* EvolutionShellComponent methods and signals */
+
+static EvolutionShellComponentResult
+create_view (EvolutionShellComponent *shell_component,
+ const char *physical_uri,
+ const char *folder_type,
+ BonoboControl **control_return,
+ void *closure)
+{
+ EvolutionShellClient *shell_client;
+ Evolution_Shell corba_shell;
+ BonoboControl *control;
+
+ if (g_strcasecmp (folder_type, "executive-summary") != 0)
+ return EVOLUTION_SHELL_COMPONENT_UNSUPPORTEDTYPE;
+
+ shell_client = evolution_shell_component_get_owner (shell_component);
+ corba_shell = bonobo_object_corba_objref (BONOBO_OBJECT (shell_client));
+
+ control = e_summary_factory_new_control (physical_uri, corba_shell);
+ if (!control)
+ return EVOLUTION_SHELL_COMPONENT_NOTFOUND;
+
+ *control_return = control;
+
+ return EVOLUTION_SHELL_COMPONENT_OK;
+}
+
+static void
+owner_set_cb (EvolutionShellComponent *shell_component,
+ EvolutionShellClient *shell_client,
+ const char *evolution_homedir,
+ gpointer user_data)
+{
+ Evolution_Shell corba_shell;
+
+ evolution_dir = g_strdup (evolution_homedir);
+
+ corba_shell = bonobo_object_corba_objref (BONOBO_OBJECT (shell_client));
+}
+
+static void
+owner_unset_cb (EvolutionShellComponent *shell_component,
+ gpointer user_data)
+{
+ gtk_main_quit ();
+}
+
+static void
+factory_destroy (BonoboEmbeddable *embeddable,
+ gpointer dummy)
+{
+ running_objects--;
+
+ if (running_objects > 0)
+ return;
+
+ if (factory)
+ bonobo_object_unref (BONOBO_OBJECT (factory));
+ else
+ g_warning ("Serious ref counting error");
+ factory = NULL;
+
+ gtk_main_quit ();
+}
+
+static BonoboObject *
+factory_fn (BonoboGenericFactory *factory,
+ void *closure)
+{
+ EvolutionShellComponent *shell_component;
+
+ running_objects++;
+
+ shell_component = evolution_shell_component_new (folder_types,
+ create_view,
+ NULL,
+ NULL,
+ NULL,
+ NULL);
+ gtk_signal_connect (GTK_OBJECT (shell_component), "destroy",
+ GTK_SIGNAL_FUNC (factory_destroy), NULL);
+ gtk_signal_connect (GTK_OBJECT (shell_component), "owner_set",
+ GTK_SIGNAL_FUNC (owner_set_cb), NULL);
+ gtk_signal_connect (GTK_OBJECT (shell_component), "owner_unset",
+ GTK_SIGNAL_FUNC (owner_unset_cb), NULL);
+
+ return BONOBO_OBJECT (shell_component);
+}
+
+void
+component_factory_init (void)
+{
+ if (factory != NULL)
+ return;
+
+ factory = bonobo_generic_factory_new (COMPONENT_FACTORY_IID,
+ factory_fn, NULL);
+
+ if (factory == NULL) {
+ e_notice (NULL, GNOME_MESSAGE_BOX_ERROR,
+ _("Cannot initialize Evolution's Executive Summary component."));
+ exit (1);
+ }
+}
diff --git a/executive-summary/component/component-factory.h b/executive-summary/component/component-factory.h
new file mode 100644
index 0000000000..65e4ad1d56
--- /dev/null
+++ b/executive-summary/component/component-factory.h
@@ -0,0 +1,31 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/* component-factory.h
+ *
+ * Copyright (C) 2000 Helix Code, Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * 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.
+ *
+ * Author: Ettore Perazzoli
+ */
+
+#ifndef COMPONENT_FACTORY_H
+#define COMPONENT_FACTORY_H
+
+void component_factory_init (void);
+
+#endif
+
+
diff --git a/executive-summary/component/e-summary-factory.c b/executive-summary/component/e-summary-factory.c
new file mode 100644
index 0000000000..c87985be34
--- /dev/null
+++ b/executive-summary/component/e-summary-factory.c
@@ -0,0 +1,255 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/* e-summary-factory.c
+ *
+ * Authors: Ettore Perazzoli <ettore@helixcode.com>
+ * Iain Holmes <iain@helixcode.com>
+ *
+ * Copyright (C) 2000 Helix Code, Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * 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.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <gnome.h>
+#include <bonobo/bonobo-main.h>
+#include <bonobo/bonobo-object.h>
+#include <bonobo/bonobo-generic-factory.h>
+#include <bonobo/bonobo-control.h>
+
+#include <liboaf/liboaf.h>
+
+#include "gal/util/e-util.h"
+#include "e-util/e-gui-utils.h"
+
+#include "e-summary-factory.h"
+
+#include "e-summary.h"
+#include "Evolution.h"
+
+#include <executive-summary-component-client.h>
+#include <Executive-Summary.h>
+
+#include <executive-summary.h>
+#include <executive-summary-component.h>
+
+static GList *control_list = NULL;
+
+GtkWidget* embed_service (GtkWidget *widget,
+ ESummary *esummary);
+static void update (ExecutiveSummary *summary,
+ const Evolution_SummaryComponent component,
+ const char *html,
+ ESummary *esummary);
+static void set_title (ExecutiveSummary *summary,
+ const Evolution_SummaryComponent component,
+ const char *title,
+ void *closure);
+static void flash (ExecutiveSummary *summary,
+ const Evolution_SummaryComponent component,
+ void *closure);
+
+BonoboUIVerb verbs[] = {
+ BONOBO_UI_VERB ("AddService", embed_service),
+ BONOBO_UI_VERB_END
+};
+
+static void
+set_pixmap (Bonobo_UIContainer container,
+ const char *xml_path,
+ const char *icon)
+{
+ char *path;
+ GdkPixbuf *pixbuf;
+
+ path = g_concat_dir_and_file (EVOLUTION_DATADIR "/images/evolution/buttons", icon);
+
+ pixbuf = gdk_pixbuf_new_from_file (path);
+ g_return_if_fail (pixbuf != NULL);
+
+ bonobo_ui_util_set_pixbuf (container, xml_path, pixbuf);
+ gdk_pixbuf_unref (pixbuf);
+ g_free (path);
+}
+
+static void
+update_pixmaps (Bonobo_UIContainer container)
+{
+ set_pixmap (container, "/Toolbar/AddService", "add-service.png");
+}
+
+static void
+control_activate (BonoboControl *control,
+ BonoboUIHandler *uih,
+ ESummary *esummary)
+{
+ BonoboUIComponent *component;
+ Bonobo_UIContainer container;
+
+ container = bonobo_control_get_remote_ui_handler (control);
+ bonobo_ui_handler_set_container (uih, container);
+ bonobo_object_release_unref (container, NULL);
+
+ g_assert (container == bonobo_ui_compat_get_container (uih));
+ g_return_if_fail (container != CORBA_OBJECT_NIL);
+
+ component = bonobo_ui_compat_get_component (uih);
+ bonobo_ui_component_add_verb_list_with_data (component, verbs, esummary);
+
+ bonobo_ui_container_freeze (container, NULL);
+
+ bonobo_ui_util_set_ui (component, container, EVOLUTION_DATADIR,
+ "evolution-executive-summary.xml",
+ "evolution-executive-summary");
+
+ update_pixmaps (container);
+ bonobo_ui_container_thaw (container, NULL);
+}
+
+static void
+control_deactivate (BonoboControl *control,
+ BonoboUIHandler *uih,
+ ESummary *esummary)
+{
+ bonobo_ui_component_rm (bonobo_ui_compat_get_component (uih),
+ bonobo_ui_compat_get_container (uih), "/", NULL);
+ bonobo_ui_handler_unset_container (uih);
+}
+
+static void
+control_activate_cb (BonoboControl *control,
+ gboolean activate,
+ gpointer user_data)
+{
+ BonoboUIHandler *uih;
+
+ uih = bonobo_control_get_ui_handler (control);
+ g_assert (uih);
+
+ if (activate)
+ control_activate (control, uih, user_data);
+ else
+ control_deactivate (control, uih, user_data);
+}
+
+static void
+control_destroy_cb (BonoboControl *control,
+ gpointer user_data)
+{
+ GtkWidget *esummary = user_data;
+
+ control_list = g_list_remove (control_list, control);
+
+ gtk_object_destroy (GTK_OBJECT (esummary));
+}
+
+static void
+update (ExecutiveSummary *summary,
+ const Evolution_SummaryComponent component,
+ const char *html,
+ ESummary *esummary)
+{
+ e_summary_update_window (esummary, summary, html);
+}
+
+static void
+set_title (ExecutiveSummary *summary,
+ const Evolution_SummaryComponent component,
+ const char *title,
+ void *closure)
+{
+ g_print ("Setting title to %s\n", title);
+}
+
+static void
+flash (ExecutiveSummary *summary,
+ const Evolution_SummaryComponent component,
+ void *closure)
+{
+ g_print ("FLASH!\n");
+}
+
+/* A ********very********
+ temporary function to embed something
+*/
+GtkWidget*
+embed_service (GtkWidget *widget,
+ ESummary *esummary)
+{
+ ExecutiveSummaryComponentClient *client;
+ ExecutiveSummary *summary;
+ char *required_interfaces[2] = {"IDL:Evolution:SummaryComponent:1.0",
+ NULL};
+ char *obj_id;
+ char *title;
+ char *html;
+
+ obj_id = bonobo_selector_select_id ("Select a service",
+ (const char **) required_interfaces);
+ if (obj_id == NULL)
+ return NULL;
+
+ client = executive_summary_component_client_new (obj_id);
+
+ if (client == NULL)
+ return NULL;
+
+ /* Set the owner */
+ summary = executive_summary_new (set_title, flash, update, esummary);
+ executive_summary_component_client_set_owner (client, summary);
+
+ /* Create view */
+ html = executive_summary_component_client_create_html_view (client, &title);
+ e_summary_add_html_service (esummary, summary, html, title);
+ g_free (html);
+
+ e_summary_rebuild_page (esummary);
+ return NULL;
+}
+
+BonoboControl *
+e_summary_factory_new_control (const char *uri,
+ const Evolution_Shell shell)
+{
+ BonoboControl *control;
+ GtkWidget *esummary;
+
+ esummary = e_summary_new (shell);
+ if (esummary == NULL)
+ return NULL;
+
+ gtk_widget_show (esummary);
+
+ control = bonobo_control_new (esummary);
+
+ if (control == NULL) {
+ gtk_object_destroy (GTK_OBJECT (esummary));
+ return NULL;
+ }
+
+ gtk_signal_connect (GTK_OBJECT (control), "activate",
+ control_activate_cb, esummary);
+
+ gtk_signal_connect (GTK_OBJECT (control), "destroy",
+ control_destroy_cb, esummary);
+
+ control_list = g_list_prepend (control_list, control);
+
+ e_summary_rebuild_page (E_SUMMARY (esummary));
+ return control;
+}
diff --git a/executive-summary/component/e-summary-factory.h b/executive-summary/component/e-summary-factory.h
new file mode 100644
index 0000000000..e9c8660c82
--- /dev/null
+++ b/executive-summary/component/e-summary-factory.h
@@ -0,0 +1,32 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/* e-summary-factory.h
+ *
+ * Authors: Iain Holmes <iain@helixcode.com>
+ *
+ * Copyright (C) 2000 Helix Code, Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * 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_SUMMARY_FACTORY_H__
+#define _E_SUMMARY_FACTORY_H__
+
+#include <Evolution.h>
+
+BonoboControl *e_summary_factory_new_control (const char *uri,
+ const Evolution_Shell shell);
+
+#endif
diff --git a/executive-summary/component/e-summary.c b/executive-summary/component/e-summary.c
new file mode 100644
index 0000000000..0684a8c083
--- /dev/null
+++ b/executive-summary/component/e-summary.c
@@ -0,0 +1,496 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/* e-summary.c
+ *
+ * Authors: Iain Holmes <iain@helixcode.com>
+ *
+ * Copyright (C) 2000 Helix Code, Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * 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.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <gnome.h>
+#include <bonobo.h>
+
+#include <gtkhtml/gtkhtml.h>
+#include <gtkhtml/gtkhtml-stream.h>
+#include <gtk/gtkvbox.h>
+#include <gal/util/e-util.h>
+#include <e-summary-subwindow.h>
+
+#include <widgets/misc/e-title-bar.h>
+#include <executive-summary.h>
+
+#include "e-summary.h"
+
+#define PARENT_TYPE (gtk_vbox_get_type ())
+
+static GtkObjectClass *e_summary_parent_class;
+
+struct _ESummaryPrivate {
+ GtkWidget *html_scroller;
+ GtkWidget *html;
+
+ GHashTable *summary_to_window;
+ GList *window_list;
+
+ GtkHTMLStream *stream;
+};
+
+typedef enum {
+ E_SUMMARY_WINDOW_BONOBO,
+ E_SUMMARY_WINDOW_HTML
+} ESummaryWindowType;
+
+typedef struct _ESummaryWindow {
+ ExecutiveSummary *summary;
+ char *title;
+
+ ESummaryWindowType type;
+
+ char *html;
+ GtkWidget *control;
+} ESummaryWindow;
+
+static gboolean on_object_requested (GtkHTML *html,
+ GtkHTMLEmbedded *eb,
+ ESummary *summary);
+static void e_summary_window_free (ESummaryWindow *window,
+ ESummaryPrivate *priv);
+
+/* GtkObject methods */
+
+static void
+s2w_foreach (gpointer *key,
+ gpointer *value,
+ ESummaryPrivate *priv)
+{
+ bonobo_object_unref (BONOBO_OBJECT (key));
+ e_summary_window_free ((ESummaryWindow *) value, priv);
+}
+
+static void
+e_summary_destroy (GtkObject *object)
+{
+ ESummary *esummary = E_SUMMARY (object);
+ ESummaryPrivate *priv;
+
+ priv = esummary->private;
+ if (priv == NULL)
+ return;
+
+ g_hash_table_foreach (priv->summary_to_window,
+ s2w_foreach, priv);
+ g_hash_table_destroy (priv->summary_to_window);
+
+ g_free (esummary->private);
+ esummary->private = NULL;
+
+ e_summary_parent_class->destroy (object);
+}
+
+static void
+e_summary_class_init (GtkObjectClass *object_class)
+{
+ object_class->destroy = e_summary_destroy;
+
+ e_summary_parent_class = gtk_type_class (PARENT_TYPE);
+}
+
+static char *
+e_pixmap_file (const char *filename)
+{
+ char *ret;
+ char *edir;
+
+ /* Try the evolution images dir */
+ edir = g_concat_dir_and_file (EVOLUTION_DATADIR "/images/evolution",
+ filename);
+
+ if (g_file_exists (edir)) {
+ ret = g_strdup (edir);
+ g_free (edir);
+
+ return ret;
+ }
+
+ /* Try the evolution button images dir */
+ edir = g_concat_dir_and_file (EVOLUTION_DATADIR "/images/evolution/buttons",
+ filename);
+
+ if (g_file_exists (edir)) {
+ ret = g_strdup (edir);
+ g_free (edir);
+
+ return ret;
+ }
+
+ /* Fall back to the gnome_pixmap_file */
+ return gnome_pixmap_file (filename);
+}
+
+static void
+request_cb (GtkHTML *html,
+ const gchar *url,
+ GtkHTMLStream *stream)
+{
+ char *filename;
+ FILE *handle;
+
+ filename = e_pixmap_file (url);
+
+ if (filename == NULL) {
+ gtk_html_stream_close (stream, GTK_HTML_STREAM_ERROR);
+ return;
+ }
+
+ handle = fopen (filename, "r");
+ g_free (filename);
+
+ if (handle == NULL) {
+ gtk_html_stream_close (stream, GTK_HTML_STREAM_ERROR);
+ return;
+ }
+
+ while (!feof (handle)) {
+ char buffer[4096];
+ int size;
+
+ /* Clear buffer */
+ memset (buffer, 0x00, 4096);
+
+ size = fread (buffer, 1, 4096, handle);
+ if (size != 4096) {
+ /* Under run */
+ if (feof (handle)) {
+ gtk_html_stream_write (stream, buffer, size);
+ gtk_html_stream_close (stream, GTK_HTML_STREAM_OK);
+ fclose (handle);
+ return;
+ } else {
+ /* Error occurred */
+ gtk_html_stream_close (stream, GTK_HTML_STREAM_ERROR);
+ fclose (handle);
+ return;
+ }
+ }
+ gtk_html_stream_write (stream, buffer, 4096);
+ }
+
+ gtk_html_stream_close (stream, GTK_HTML_STREAM_OK);
+ fclose (handle);
+}
+
+static void
+e_summary_start_load (ESummary *summary)
+{
+ ESummaryPrivate *priv;
+ char *header = "<html><body>";
+
+ priv = summary->private;
+ priv->stream = gtk_html_begin (GTK_HTML (priv->html));
+ gtk_html_write (GTK_HTML (priv->html), priv->stream,
+ header, strlen (header));
+}
+
+static void
+load_default (ESummary *summary)
+{
+ ESummaryPrivate *priv;
+ char *def = "<table width=\"100%\"><tr><td align=\"right\"><img src=\"ccsplash.png\"></td></tr></table><hr>";
+
+ g_return_if_fail (summary != NULL);
+ g_return_if_fail (IS_E_SUMMARY (summary));
+
+ priv = summary->private;
+
+ g_return_if_fail (priv->stream != NULL);
+
+ gtk_html_write (GTK_HTML (priv->html), priv->stream, def, strlen (def));
+}
+
+static void
+e_summary_end_load (ESummary *summary)
+{
+ ESummaryPrivate *priv;
+ char *footer = "<hr></body></html>";
+
+ priv = summary->private;
+ gtk_html_write (GTK_HTML (priv->html), priv->stream,
+ footer, strlen (footer));
+ gtk_html_end (GTK_HTML (priv->html), priv->stream, GTK_HTML_STREAM_OK);
+
+ priv->stream = NULL;
+}
+
+static void
+e_summary_init (ESummary *esummary)
+{
+ GdkColor bgcolour = {0, 0xdfff, 0xdfff, 0xffff};
+ ESummaryPrivate *priv;
+
+ esummary->private = g_new0 (ESummaryPrivate, 1);
+ priv = esummary->private;
+ g_print ("priv: %p\n", priv);
+
+ priv->window_list = NULL;
+ /* HTML widget */
+ priv->html_scroller = gtk_scrolled_window_new (NULL, NULL);
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (priv->html_scroller),
+ GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
+ priv->html = gtk_html_new ();
+ gtk_html_set_editable (GTK_HTML (priv->html), FALSE);
+ gtk_signal_connect (GTK_OBJECT (priv->html), "url-requested",
+ GTK_SIGNAL_FUNC (request_cb), NULL);
+ gtk_signal_connect (GTK_OBJECT (priv->html), "object-requested",
+ GTK_SIGNAL_FUNC (on_object_requested), esummary);
+
+ gtk_html_set_default_background_color (GTK_HTML (priv->html), &bgcolour);
+ gtk_container_add (GTK_CONTAINER (priv->html_scroller), priv->html);
+ gtk_widget_show_all (priv->html_scroller);
+
+ e_summary_rebuild_page (esummary);
+
+ /* Pack stuff */
+ gtk_box_pack_start (GTK_BOX (esummary), priv->html_scroller,
+ TRUE, TRUE, 0);
+
+ /* Init hashtable */
+ priv->summary_to_window = g_hash_table_new (NULL, NULL);
+}
+
+E_MAKE_TYPE (e_summary, "ESummary", ESummary, e_summary_class_init,
+ e_summary_init, PARENT_TYPE);
+
+GtkWidget *
+e_summary_new (const Evolution_Shell shell)
+{
+ ESummary *esummary;
+
+ esummary = gtk_type_new (e_summary_get_type ());
+
+ return GTK_WIDGET (esummary);
+}
+
+static gboolean
+on_object_requested (GtkHTML *html,
+ GtkHTMLEmbedded *eb,
+ ESummary *summary)
+{
+ ESummaryWindow *window;
+ int type;
+
+ if (sscanf (eb->classid, "cid:%d-%p", &type, &window) != 2) {
+ g_warning ("Could not get the window reference\n");
+ return FALSE;
+ }
+
+ switch (type) {
+ case 1:
+ g_assert_not_reached ();
+ break;
+
+ case 2:
+ gtk_widget_show (window->control);
+
+ gtk_widget_ref (GTK_WIDGET (window->control));
+ if (window->control->parent != NULL) {
+ gtk_container_remove (GTK_CONTAINER (window->control->parent), window->control);
+ }
+ gtk_container_add (GTK_CONTAINER (eb), window->control);
+
+ gtk_widget_unref (GTK_WIDGET (window->control));
+ break;
+
+ default:
+ g_assert_not_reached ();
+ }
+
+ return TRUE;
+}
+
+static void
+e_summary_display_window (ESummary *esummary,
+ ESummaryWindow *window)
+{
+ ESummaryPrivate *priv;
+ char *footer = "</td></tr></table>";
+ char *title_cid, *body_cid;
+
+ priv = esummary->private;
+
+ title_cid = g_strdup_printf ("<table height=\"100%%\" width=\"100%%\"><tr><td bgcolor=\"#ff0000\" align=\"left\"><b>%s</b></td></tr><tr><td>", window->title);
+ gtk_html_write (GTK_HTML (priv->html), priv->stream, title_cid,
+ strlen (title_cid));
+ g_free (title_cid);
+
+ switch (window->type) {
+ case E_SUMMARY_WINDOW_HTML:
+ gtk_html_write (GTK_HTML (priv->html), priv->stream,
+ window->html, strlen (window->html));
+ break;
+
+ case E_SUMMARY_WINDOW_BONOBO:
+ body_cid = g_strdup_printf ("<object classid=\"cid:2-%p\"></object>", window);
+ gtk_html_write (GTK_HTML (priv->html), priv->stream,
+ body_cid, strlen (body_cid));
+ break;
+
+ default:
+ break;
+ }
+
+ gtk_html_write (GTK_HTML (priv->html), priv->stream,
+ footer, strlen (footer));
+}
+
+void
+e_summary_rebuild_page (ESummary *esummary)
+{
+ ESummaryPrivate *priv;
+ GList *windows;
+ char *service_table = "<table numcols=\"2\" width=\"100%\">";
+ int loc;
+
+ g_return_if_fail (esummary != NULL);
+ g_return_if_fail (IS_E_SUMMARY (esummary));
+
+ priv = esummary->private;
+
+ gtk_layout_freeze (GTK_LAYOUT (priv->html));
+ e_summary_start_load (esummary);
+ load_default (esummary);
+
+ /* Load the start of the services */
+ gtk_html_write (GTK_HTML (priv->html), priv->stream, service_table,
+ strlen (service_table));
+ /* Load each of the services */
+ loc = 0;
+ for (windows = priv->window_list; windows; windows = windows->next) {
+ ESummaryWindow *window;
+
+ window = windows->data;
+
+ if (loc % 2 == 0) {
+ g_print ("new line:%d\n", loc);
+ if (loc != 0) {
+ gtk_html_write (GTK_HTML (priv->html),
+ priv->stream, "</tr>", 5);
+ }
+ gtk_html_write (GTK_HTML (priv->html),
+ priv->stream, "<tr>", 4);
+ }
+
+ gtk_html_write (GTK_HTML (priv->html), priv->stream,
+ "<td>", 4);
+
+ e_summary_display_window (esummary, window);
+
+ gtk_html_write (GTK_HTML (priv->html), priv->stream, "</td>", 5);
+ loc++;
+ }
+
+ gtk_html_write (GTK_HTML (priv->html), priv->stream, "</tr></table>",
+ 13);
+ e_summary_end_load (esummary);
+ gtk_layout_thaw (GTK_LAYOUT (priv->html));
+}
+
+void
+e_summary_add_html_service (ESummary *esummary,
+ ExecutiveSummary *summary,
+ const char *html,
+ const char *title)
+{
+ ESummaryWindow *window;
+ ESummaryPrivate *priv;
+
+ window = g_new0 (ESummaryWindow, 1);
+ window->type = E_SUMMARY_WINDOW_HTML;
+ window->html = g_strdup (html);
+ window->title = g_strdup (title);
+
+ window->summary = summary;
+ priv = esummary->private;
+ priv->window_list = g_list_append (priv->window_list, window);
+
+ g_hash_table_insert (priv->summary_to_window, summary, window);
+}
+
+void
+e_summary_add_bonobo_service (ESummary *esummary,
+ ExecutiveSummary *summary,
+ GtkWidget *control,
+ const char *title)
+{
+ ESummaryWindow *window;
+ ESummaryPrivate *priv;
+
+ window = g_new0 (ESummaryWindow, 1);
+ window->type = E_SUMMARY_WINDOW_BONOBO;
+ window->control = control;
+
+ window->title = g_strdup (title);
+ window->summary = summary;
+
+ priv = esummary->private;
+ priv->window_list = g_list_append (priv->window_list, window);
+
+ g_hash_table_insert (priv->summary_to_window, summary, window);
+}
+
+static void
+e_summary_window_free (ESummaryWindow *window,
+ ESummaryPrivate *priv)
+{
+ g_free (window->title);
+ if (window->type == E_SUMMARY_WINDOW_BONOBO)
+ gtk_widget_unref (window->control);
+ else
+ g_free (window->html);
+
+ priv->window_list = g_list_remove (priv->window_list, window);
+
+ g_hash_table_remove (priv->summary_to_window, window->summary);
+ g_free (window);
+}
+
+void
+e_summary_update_window (ESummary *esummary,
+ ExecutiveSummary *summary,
+ const char *html)
+{
+ ESummaryWindow *window;
+ ESummaryPrivate *priv;
+
+ g_return_if_fail (esummary != NULL);
+ g_return_if_fail (IS_E_SUMMARY (esummary));
+ g_return_if_fail (summary != NULL);
+
+ priv = esummary->private;
+ window = g_hash_table_lookup (priv->summary_to_window, summary);
+
+ g_return_if_fail (window != NULL);
+
+ g_free (window->html);
+ window->html = g_strdup (html);
+
+ e_summary_rebuild_page (esummary);
+}
+
diff --git a/executive-summary/component/e-summary.h b/executive-summary/component/e-summary.h
new file mode 100644
index 0000000000..5aa608b5e0
--- /dev/null
+++ b/executive-summary/component/e-summary.h
@@ -0,0 +1,69 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/* e-summary.h
+ *
+ * Authors: Iain Holmes <iain@helixcode.com>
+ *
+ * Copyright (C) 2000 Helix Code, Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * 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_SUMMARY_H__
+#define _E_SUMMARY_H__
+
+#include <gtk/gtksignal.h>
+#include <gtkhtml/gtkhtml.h>
+#include <gtk/gtkvbox.h>
+#include <executive-summary.h>
+
+#include "shell/Evolution.h"
+
+#define E_SUMMARY_TYPE (e_summary_get_type ())
+#define E_SUMMARY(obj) (GTK_CHECK_CAST ((obj), E_SUMMARY_TYPE, ESummary))
+#define E_SUMMARY_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_SUMMARY_TYPE, ESummaryClass))
+#define IS_E_SUMMARY(obj) (GTK_CHECK_TYPE ((obj), E_SUMMARY_TYPE))
+#define IS_E_SUMMARY_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_SUMMARY_TYPE))
+
+typedef struct _ESummaryPrivate ESummaryPrivate;
+typedef struct _ESummary ESummary;
+typedef struct _ESummaryClass ESummaryClass;
+
+struct _ESummary {
+ GtkVBox parent;
+
+ ESummaryPrivate *private;
+};
+
+struct _ESummaryClass {
+ GtkVBoxClass parent_class;
+};
+
+GtkType e_summary_get_type (void);
+GtkWidget *e_summary_new (const Evolution_Shell shell);
+void e_summary_rebuild_page (ESummary *esummary);
+void e_summary_add_html_service (ESummary *esummary,
+ ExecutiveSummary *summary,
+ const char *html,
+ const char *title);
+void e_summary_add_bonobo_service (ESummary *esummary,
+ ExecutiveSummary *summary,
+ GtkWidget *control,
+ const char *title);
+void e_summary_update_window (ESummary *esummary,
+ ExecutiveSummary *summary,
+ const char *html);
+
+#endif
diff --git a/executive-summary/component/executive-summary.png b/executive-summary/component/executive-summary.png
new file mode 100644
index 0000000000..10a122f39e
--- /dev/null
+++ b/executive-summary/component/executive-summary.png
Binary files differ
diff --git a/executive-summary/component/main.c b/executive-summary/component/main.c
new file mode 100644
index 0000000000..265baf7e86
--- /dev/null
+++ b/executive-summary/component/main.c
@@ -0,0 +1,80 @@
+/*
+ * main.c: The core of the executive summary component.
+ *
+ * Copyright (C) 2000 Helix Code, Inc
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * 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.
+ *
+ * Author: Iain Holmes <iain@helixcode.com>
+ */
+
+#include <config.h>
+
+#include <signal.h>
+
+#include <gnome.h>
+#include <bonobo/bonobo-main.h>
+#include <bonobo/bonobo-object-directory.h>
+#include <liboaf/liboaf.h>
+
+#ifdef GTKHTML_HAVE_GCONF
+#include <gconf/gconf.h>
+#endif
+
+#include "gal/widgets/e-gui-utils.h"
+#include "gal/widgets/e-cursors.h"
+#include "gal/widgets/e-unicode.h"
+
+#include "component-factory.h"
+
+int
+main (int argc,
+ char **argv)
+{
+ CORBA_ORB orb;
+
+ bindtextdomain (PACKAGE, EVOLUTION_LOCALEDIR);
+ textdomain (PACKAGE);
+
+ gnome_init_with_popt_table ("evolution-executive-summary", VERSION,
+ argc, argv, oaf_popt_options, 0, NULL);
+ orb = oaf_init (argc, argv);
+
+ gdk_rgb_init ();
+ if (bonobo_init (orb, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL) == FALSE) {
+ g_error (_("Executive summary component could not initialize Bonobo.\n"
+ "If there was a warning message about the "
+ "RootPOA, it probably means\nyou compiled "
+ "Bonobo against GOAD instead of OAF."));
+ }
+
+#ifdef GTKHTML_HAVE_GCONF
+ gconf_init (argc, argv, NULL);
+#endif
+
+ e_unicode_init ();
+
+ e_cursors_init ();
+
+ component_factory_init ();
+
+ signal (SIGSEGV, SIG_DFL);
+ signal (SIGBUS, SIG_DFL);
+
+ bonobo_main ();
+
+ return 0;
+}