diff options
author | Iain Holmes <iain@src.gnome.org> | 2000-12-08 08:00:15 +0800 |
---|---|---|
committer | Iain Holmes <iain@src.gnome.org> | 2000-12-08 08:00:15 +0800 |
commit | 4a74b1ff15ca5cbc175c8fb98839960f1af494fb (patch) | |
tree | ed80ade2d481f5a265c0d9a475be689ace09c8df /executive-summary/evolution-services/executive-summary-html-view.c | |
parent | adf19f49fbdf0e0e69a6ed80fe0cddaf4f3978d1 (diff) | |
download | gsoc2013-evolution-4a74b1ff15ca5cbc175c8fb98839960f1af494fb.tar.gz gsoc2013-evolution-4a74b1ff15ca5cbc175c8fb98839960f1af494fb.tar.zst gsoc2013-evolution-4a74b1ff15ca5cbc175c8fb98839960f1af494fb.zip |
New and improved display,
Bug fixes
memory leaks removed
Preferences
and probably more that I can't remember.
svn path=/trunk/; revision=6858
Diffstat (limited to 'executive-summary/evolution-services/executive-summary-html-view.c')
-rw-r--r-- | executive-summary/evolution-services/executive-summary-html-view.c | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/executive-summary/evolution-services/executive-summary-html-view.c b/executive-summary/evolution-services/executive-summary-html-view.c index ef90461623..ebc3ae9b23 100644 --- a/executive-summary/evolution-services/executive-summary-html-view.c +++ b/executive-summary/evolution-services/executive-summary-html-view.c @@ -27,6 +27,7 @@ #endif #include <bonobo.h> +#include <bonobo/bonobo-event-source.h> #include <gnome.h> #include <gal/util/e-util.h> @@ -42,6 +43,8 @@ static void executive_summary_html_view_class_init (ExecutiveSummaryHtmlViewClas static BonoboObjectClass *parent_class; struct _ExecutiveSummaryHtmlViewPrivate { + BonoboEventSource *event_source; + char *html; }; @@ -103,7 +106,7 @@ executive_summary_html_view_destroy (GtkObject *object) view->private = NULL; - (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); + GTK_OBJECT_CLASS (parent_class)->destroy (object); } static void @@ -147,6 +150,7 @@ executive_summary_html_view_init (ExecutiveSummaryHtmlView *view) priv = g_new (ExecutiveSummaryHtmlViewPrivate, 1); priv->html = NULL; + priv->event_source = NULL; view->private = priv; } @@ -159,9 +163,18 @@ static void executive_summary_html_view_construct (ExecutiveSummaryHtmlView *view, GNOME_Evolution_Summary_HTMLView corba_object) { + ExecutiveSummaryHtmlViewPrivate *priv; + g_return_if_fail (view != NULL); g_return_if_fail (corba_object != CORBA_OBJECT_NIL); + priv = view->private; + + priv->event_source = bonobo_event_source_new (); + g_warning ("new event source: %p", priv->event_source); + bonobo_object_add_interface (BONOBO_OBJECT (view), + BONOBO_OBJECT (priv->event_source)); + bonobo_object_construct (BONOBO_OBJECT (view), corba_object); } @@ -206,6 +219,8 @@ executive_summary_html_view_set_html (ExecutiveSummaryHtmlView *view, const char *html) { ExecutiveSummaryHtmlViewPrivate *priv; + CORBA_any any; + CORBA_short s; g_return_if_fail (view != NULL); g_return_if_fail (IS_EXECUTIVE_SUMMARY_HTML_VIEW (view)); @@ -218,6 +233,16 @@ executive_summary_html_view_set_html (ExecutiveSummaryHtmlView *view, priv->html = g_strdup (html); else priv->html = NULL; + + /* Notify any listeners */ + s = 0; + + any._type = (CORBA_TypeCode) TC_short; + any._value = &s; + + g_warning ("Notifying event source: %p", priv->event_source); + bonobo_event_source_notify_listeners (BONOBO_EVENT_SOURCE (priv->event_source), + "html_changed", &any, NULL); } /** * executive_summary_html_view_get_html: |