From b3ce14cf25ba9ea7d7a6f297c1cd479d26f64894 Mon Sep 17 00:00:00 2001 From: Iain Holmes Date: Mon, 11 Dec 2000 15:47:01 +0000 Subject: 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 --- executive-summary/test-service/rdf-summary.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'executive-summary/test-service/rdf-summary.c') diff --git a/executive-summary/test-service/rdf-summary.c b/executive-summary/test-service/rdf-summary.c index 9596472a58..48b4b8ece0 100644 --- a/executive-summary/test-service/rdf-summary.c +++ b/executive-summary/test-service/rdf-summary.c @@ -300,6 +300,7 @@ download (RdfSummary *summary) /* Then parse it */ /* The update it */ + g_print ("Starting download\n"); view = EXECUTIVE_SUMMARY_HTML_VIEW (summary->view); result = gnome_vfs_open (&handle, summary->location, GNOME_VFS_OPEN_READ); @@ -353,6 +354,8 @@ download (RdfSummary *summary) tree_walk (doc->root, summary, html); executive_summary_html_view_set_html (view, html->str); g_string_free (html, TRUE); + + g_print ("Finished Download\n"); return FALSE; } @@ -495,7 +498,7 @@ create_view (ExecutiveSummaryComponentFactory *_factory, void *closure) { RdfSummary *summary; - BonoboObject *component, *view, *bag, *property; + BonoboObject *component, *view, *bag, *property, *event_source; char *html = "Loading RDF file. . .
Please wait
"; summary = g_new (RdfSummary, 1); @@ -510,7 +513,12 @@ create_view (ExecutiveSummaryComponentFactory *_factory, summary->component = component; - view = executive_summary_html_view_new (); + /* Share the event source between the ExecutiveSummaryHtmlView and the + BonoboPropertyControl as we can only have one Bonobo::EventSource + interface aggregated */ + event_source = bonobo_event_source_new (); + + view = executive_summary_html_view_new_full (BONOBO_EVENT_SOURCE (event_source)); summary->view = view; executive_summary_html_view_set_html (EXECUTIVE_SUMMARY_HTML_VIEW (view), html); @@ -528,7 +536,9 @@ create_view (ExecutiveSummaryComponentFactory *_factory, "The icon for this component's window", 0); bonobo_object_add_interface (component, bag); - property = bonobo_property_control_new (property_control, 1, summary); + property = bonobo_property_control_new_full (property_control, 1, + BONOBO_EVENT_SOURCE (event_source), + summary); summary->property_control = property; gtk_signal_connect (GTK_OBJECT (property), "action", @@ -537,7 +547,7 @@ create_view (ExecutiveSummaryComponentFactory *_factory, bonobo_object_add_interface (component, property); running_views++; - g_idle_add (download, summary); + gtk_timeout_add (5000, download, summary); return component; } -- cgit v1.2.3