aboutsummaryrefslogtreecommitdiffstats
path: root/executive-summary/evolution-services
diff options
context:
space:
mode:
authorIain Holmes <iain@src.gnome.org>2000-12-11 23:47:01 +0800
committerIain Holmes <iain@src.gnome.org>2000-12-11 23:47:01 +0800
commitb3ce14cf25ba9ea7d7a6f297c1cd479d26f64894 (patch)
treef49a6a85d2d8d455cdf9c94fd6ae3d8ce3aa69df /executive-summary/evolution-services
parent96fb2423d02a5ca60fa61765c63817c816ee267f (diff)
downloadgsoc2013-evolution-b3ce14cf25ba9ea7d7a6f297c1cd479d26f64894.tar
gsoc2013-evolution-b3ce14cf25ba9ea7d7a6f297c1cd479d26f64894.tar.gz
gsoc2013-evolution-b3ce14cf25ba9ea7d7a6f297c1cd479d26f64894.tar.bz2
gsoc2013-evolution-b3ce14cf25ba9ea7d7a6f297c1cd479d26f64894.tar.lz
gsoc2013-evolution-b3ce14cf25ba9ea7d7a6f297c1cd479d26f64894.tar.xz
gsoc2013-evolution-b3ce14cf25ba9ea7d7a6f297c1cd479d26f64894.tar.zst
gsoc2013-evolution-b3ce14cf25ba9ea7d7a6f297c1cd479d26f64894.zip
Changes to the HTML file to add an entry box.
Changed to use the new BonoboPropertyControl methods, and changed executive-summary-html-view to use the same idea. Added rdf-summary to the .cvsignore, and put a timeout so that it can return imediatly if there is a hold up on the connection. svn path=/trunk/; revision=6905
Diffstat (limited to 'executive-summary/evolution-services')
-rw-r--r--executive-summary/evolution-services/executive-summary-html-view.c58
-rw-r--r--executive-summary/evolution-services/executive-summary-html-view.h5
2 files changed, 56 insertions, 7 deletions
diff --git a/executive-summary/evolution-services/executive-summary-html-view.c b/executive-summary/evolution-services/executive-summary-html-view.c
index ebc3ae9b23..3e34ccb5c1 100644
--- a/executive-summary/evolution-services/executive-summary-html-view.c
+++ b/executive-summary/evolution-services/executive-summary-html-view.c
@@ -161,17 +161,18 @@ E_MAKE_TYPE (executive_summary_html_view, "ExecutiveSummaryHtmlView",
static void
executive_summary_html_view_construct (ExecutiveSummaryHtmlView *view,
+ BonoboEventSource *event_source,
GNOME_Evolution_Summary_HTMLView corba_object)
{
ExecutiveSummaryHtmlViewPrivate *priv;
g_return_if_fail (view != NULL);
+ g_return_if_fail (IS_EXECUTIVE_SUMMARY_HTML_VIEW (view));
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);
+ priv->event_source = event_source;
bonobo_object_add_interface (BONOBO_OBJECT (view),
BONOBO_OBJECT (priv->event_source));
@@ -180,7 +181,9 @@ executive_summary_html_view_construct (ExecutiveSummaryHtmlView *view,
/*** Public API ***/
/**
- * executive_summary_html_view_new:
+ * executive_summary_html_view_new_full:
+ * @event_source: A BonoboEventSource that will be aggregated onto the
+ * interface.
*
* Creates a new BonoboObject that implements
* the HTMLView.idl interface.
@@ -188,12 +191,15 @@ executive_summary_html_view_construct (ExecutiveSummaryHtmlView *view,
* Returns: A BonoboObject.
*/
BonoboObject *
-executive_summary_html_view_new (void)
+executive_summary_html_view_new_full (BonoboEventSource *event_source)
{
ExecutiveSummaryHtmlView *view;
POA_GNOME_Evolution_Summary_HTMLView *servant;
GNOME_Evolution_Summary_HTMLView corba_object;
+ g_return_val_if_fail (event_source != NULL, NULL);
+ g_return_val_if_fail (BONOBO_IS_EVENT_SOURCE (event_source), NULL);
+
servant = create_servant ();
if (servant == NULL)
return NULL;
@@ -201,12 +207,33 @@ executive_summary_html_view_new (void)
view = gtk_type_new (executive_summary_html_view_get_type ());
corba_object = bonobo_object_activate_servant (BONOBO_OBJECT (view),
servant);
- executive_summary_html_view_construct (view, corba_object);
+
+ bonobo_object_ref (BONOBO_OBJECT (event_source));
+ executive_summary_html_view_construct (view, event_source, corba_object);
return BONOBO_OBJECT (view);
}
/**
+ * executive_summary_html_view_new:
+ *
+ * Creates a new BonoboObject that implements
+ * the HTMLView.idl interface.
+ * Creates a default Bonobo::EventSource interface that will be aggregated onto
+ * the interface.
+ *
+ * Returns: A BonoboObject.
+ */
+BonoboObject *
+executive_summary_html_view_new (void)
+{
+ BonoboEventSource *event_source;
+
+ event_source = bonobo_event_source_new ();
+ return executive_summary_html_view_new_full (event_source);
+}
+
+/**
* executive_summary_html_view_set_html:
* @view: The ExecutiveSummaryHtmlView to operate on,
* @html: The HTML as a string.
@@ -240,10 +267,11 @@ executive_summary_html_view_set_html (ExecutiveSummaryHtmlView *view,
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_HTML_CHANGED,
+ &any, NULL);
}
+
/**
* executive_summary_html_view_get_html:
* @view: The ExecutiveSummaryHtmlView to operate on.
@@ -267,3 +295,19 @@ executive_summary_html_view_get_html (ExecutiveSummaryHtmlView *view)
return priv->html;
}
+/**
+ * executive_summary_html_view_get_event_source:
+ * @view: The ExecutiveSummaryHtmlView to operate on.
+ *
+ * Retrieves the BonoboEventSource that is used in this view.
+ *
+ * Returns: A BonoboEventSource pointer.
+ */
+BonoboEventSource *
+executive_summary_html_view_get_event_source (ExecutiveSummaryHtmlView *view)
+{
+ g_return_val_if_fail (view != NULL, NULL);
+ g_return_val_if_fail (IS_EXECUTIVE_SUMMARY_HTML_VIEW (view), NULL);
+
+ return view->private->event_source;
+}
diff --git a/executive-summary/evolution-services/executive-summary-html-view.h b/executive-summary/evolution-services/executive-summary-html-view.h
index 19e40cb2b8..3c8895167d 100644
--- a/executive-summary/evolution-services/executive-summary-html-view.h
+++ b/executive-summary/evolution-services/executive-summary-html-view.h
@@ -25,6 +25,9 @@
#define _EXECUTIVE_SUMMARY_HTML_VIEW_H__
#include <bonobo/bonobo-object.h>
+#include <bonobo/bonobo-event-source.h>
+
+#define EXECUTIVE_SUMMARY_HTML_VIEW_HTML_CHANGED "GNOME:Evolution:Summary:HTMLView:html_changed"
#define EXECUTIVE_SUMMARY_HTML_VIEW_TYPE (executive_summary_html_view_get_type ())
#define EXECUTIVE_SUMMARY_HTML_VIEW(obj) (GTK_CHECK_CAST ((obj), EXECUTIVE_SUMMARY_HTML_VIEW_TYPE, ExecutiveSummaryHtmlView))
@@ -47,11 +50,13 @@ struct _ExecutiveSummaryHtmlViewClass {
};
GtkType executive_summary_html_view_get_type (void);
+BonoboObject *executive_summary_html_view_new_full (BonoboEventSource *event_source);
BonoboObject *executive_summary_html_view_new (void);
void executive_summary_html_view_set_html (ExecutiveSummaryHtmlView *view,
const char *html);
const char *executive_summary_html_view_get_html (ExecutiveSummaryHtmlView *view);
+BonoboEventSource *executive_summary_html_view_get_event_source (ExecutiveSummaryHtmlView *view);
#endif