From 53659b16caf2b2172c46b261463b589ee12d19b0 Mon Sep 17 00:00:00 2001 From: Iain Holmes Date: Wed, 14 Feb 2001 18:37:40 +0000 Subject: Fix crashes, remove gnome.h includes, add a timer check for the RDF summary, add a new method to the HTMLView so it can handle funny URIs. svn path=/trunk/; revision=8224 --- .../executive-summary-html-view.c | 31 +++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) (limited to 'executive-summary/evolution-services/executive-summary-html-view.c') diff --git a/executive-summary/evolution-services/executive-summary-html-view.c b/executive-summary/evolution-services/executive-summary-html-view.c index 659aad18fd..8a3498cdd8 100644 --- a/executive-summary/evolution-services/executive-summary-html-view.c +++ b/executive-summary/evolution-services/executive-summary-html-view.c @@ -42,6 +42,13 @@ static void executive_summary_html_view_class_init (ExecutiveSummaryHtmlViewClas static BonoboObjectClass *parent_class; +enum { + HANDLE_URI, + LAST_SIGNAL +}; + +static guint signals[LAST_SIGNAL] = { 0 }; + struct _ExecutiveSummaryHtmlViewPrivate { BonoboEventSource *event_source; @@ -88,6 +95,18 @@ impl_GNOME_Evolution_Summary_HTMLView_getHtml (PortableServer_Servant servant, return CORBA_string_dup (priv->html? priv->html: ""); } +static void +impl_GNOME_Evolution_Summary_HTMLView_handleURI (PortableServer_Servant servant, + CORBA_char *uri, + CORBA_Environment *ev) +{ + BonoboObject *bonobo_object; + + bonobo_object = bonobo_object_from_servant (servant); + + gtk_signal_emit (GTK_OBJECT (bonobo_object), signals[HANDLE_URI], uri); +} + /* GtkObject methods */ static void executive_summary_html_view_destroy (GtkObject *object) @@ -95,13 +114,13 @@ executive_summary_html_view_destroy (GtkObject *object) ExecutiveSummaryHtmlView *view; ExecutiveSummaryHtmlViewPrivate *priv; + g_print ("BANG!"); view = EXECUTIVE_SUMMARY_HTML_VIEW (object); priv = view->private; if (priv == NULL) return; - bonobo_object_unref (BONOBO_OBJECT (priv->event_source)); g_free (priv->html); g_free (priv); @@ -124,6 +143,7 @@ corba_class_init (void) epv = g_new0 (POA_GNOME_Evolution_Summary_HTMLView__epv, 1); epv->getHtml = impl_GNOME_Evolution_Summary_HTMLView_getHtml; + epv->handleURI = impl_GNOME_Evolution_Summary_HTMLView_handleURI; vepv = &HTMLView_vepv; vepv->_base_epv = base_epv; @@ -139,6 +159,15 @@ executive_summary_html_view_class_init (ExecutiveSummaryHtmlViewClass *klass) object_class = GTK_OBJECT_CLASS (klass); object_class->destroy = executive_summary_html_view_destroy; + signals[HANDLE_URI] = gtk_signal_new ("handle_uri", GTK_RUN_FIRST, + object_class->type, + GTK_SIGNAL_OFFSET (ExecutiveSummaryHtmlViewClass, handle_uri), + gtk_marshal_NONE__POINTER, + GTK_TYPE_NONE, 1, + GTK_TYPE_POINTER); + + gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); + parent_class = gtk_type_class (PARENT_TYPE); corba_class_init (); -- cgit v1.2.3