diff options
author | Iain Holmes <iain@src.gnome.org> | 2001-02-15 02:37:40 +0800 |
---|---|---|
committer | Iain Holmes <iain@src.gnome.org> | 2001-02-15 02:37:40 +0800 |
commit | 53659b16caf2b2172c46b261463b589ee12d19b0 (patch) | |
tree | 66f7d71f43b0c3a6c0418507bdd6d591a6f95588 /executive-summary/component | |
parent | 59cb3688437bd26c4e2d2e3ea674b6a06d0da4e7 (diff) | |
download | gsoc2013-evolution-53659b16caf2b2172c46b261463b589ee12d19b0.tar gsoc2013-evolution-53659b16caf2b2172c46b261463b589ee12d19b0.tar.gz gsoc2013-evolution-53659b16caf2b2172c46b261463b589ee12d19b0.tar.bz2 gsoc2013-evolution-53659b16caf2b2172c46b261463b589ee12d19b0.tar.lz gsoc2013-evolution-53659b16caf2b2172c46b261463b589ee12d19b0.tar.xz gsoc2013-evolution-53659b16caf2b2172c46b261463b589ee12d19b0.tar.zst gsoc2013-evolution-53659b16caf2b2172c46b261463b589ee12d19b0.zip |
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
Diffstat (limited to 'executive-summary/component')
-rw-r--r-- | executive-summary/component/component-factory.c | 6 | ||||
-rw-r--r-- | executive-summary/component/e-summary-callbacks.c | 9 | ||||
-rw-r--r-- | executive-summary/component/e-summary-factory.c | 1 | ||||
-rw-r--r-- | executive-summary/component/e-summary-prefs.c | 4 | ||||
-rw-r--r-- | executive-summary/component/e-summary-url.c | 50 | ||||
-rw-r--r-- | executive-summary/component/e-summary-util.c | 6 | ||||
-rw-r--r-- | executive-summary/component/e-summary.c | 33 | ||||
-rw-r--r-- | executive-summary/component/e-summary.h | 2 | ||||
-rw-r--r-- | executive-summary/component/main.c | 7 |
9 files changed, 84 insertions, 34 deletions
diff --git a/executive-summary/component/component-factory.c b/executive-summary/component/component-factory.c index 7e1dc17b45..0537275d4e 100644 --- a/executive-summary/component/component-factory.c +++ b/executive-summary/component/component-factory.c @@ -26,8 +26,8 @@ #include <config.h> #endif -#include <bonobo.h> -#include <gnome.h> +#include <bonobo/bonobo-object.h> +#include <bonobo/bonobo-generic-factory.h> #include "Evolution.h" #include "evolution-storage.h" @@ -106,7 +106,7 @@ component_destroy_cb (GtkObject *object, } static void -factory_destroy (BonoboEmbeddable *embeddable, +factory_destroy (BonoboObject *component, gpointer dummy) { running_objects--; diff --git a/executive-summary/component/e-summary-callbacks.c b/executive-summary/component/e-summary-callbacks.c index 4d9929fc7e..4ffa7f4d00 100644 --- a/executive-summary/component/e-summary-callbacks.c +++ b/executive-summary/component/e-summary-callbacks.c @@ -26,8 +26,13 @@ #include <config.h> #endif -#include <gnome.h> -#include <bonobo.h> +#include <libgnomeui/gnome-propertybox.h> +#include <libgnomeui/gnome-file-entry.h> +#include <libgnome/gnome-i18n.h> + +#include <bonobo/bonobo-selector.h> + +#include <stdlib.h> /* For atoi */ #include <liboaf/liboaf.h> #include <glade/glade.h> diff --git a/executive-summary/component/e-summary-factory.c b/executive-summary/component/e-summary-factory.c index 4fcd77db48..444c8e8558 100644 --- a/executive-summary/component/e-summary-factory.c +++ b/executive-summary/component/e-summary-factory.c @@ -26,7 +26,6 @@ #include <config.h> #endif -#include <gnome.h> #include <bonobo/bonobo-main.h> #include <bonobo/bonobo-object.h> #include <bonobo/bonobo-generic-factory.h> diff --git a/executive-summary/component/e-summary-prefs.c b/executive-summary/component/e-summary-prefs.c index 440c3837f4..5ed9876cf4 100644 --- a/executive-summary/component/e-summary-prefs.c +++ b/executive-summary/component/e-summary-prefs.c @@ -25,7 +25,9 @@ #include <config.h> #endif -#include <gnome.h> +#include <stdio.h> +#include <libgnome/gnome-defs.h> +#include <libgnome/gnome-config.h> #include "e-summary-prefs.h" #include "e-summary.h" diff --git a/executive-summary/component/e-summary-url.c b/executive-summary/component/e-summary-url.c index 2c405b8664..cdc68091cd 100644 --- a/executive-summary/component/e-summary-url.c +++ b/executive-summary/component/e-summary-url.c @@ -25,8 +25,16 @@ #include <config.h> #endif -#include <gnome.h> -#include <bonobo.h> +#include <bonobo/bonobo-property-control.h> +#include <bonobo/bonobo-event-source.h> +#include <bonobo/bonobo-widget.h> + +#include <libgnome/gnome-i18n.h> +#include <libgnome/gnome-url.h> +#include <libgnome/gnome-exec.h> +#include <libgnomeui/gnome-propertybox.h> + +#include <stdlib.h> #include <gtkhtml/gtkhtml.h> #include <gtkhtml/gtkhtml-stream.h> @@ -430,6 +438,23 @@ dialog_destroyed (GtkObject *object, g_free (dialog); } +struct _idle_data { + ESummary *esummary; + ESummaryWindow *window; +}; + +static gboolean +idle_remove_window (gpointer data) +{ + struct _idle_data *id = data; + + e_summary_remove_window (id->esummary, id->window); + e_summary_queue_rebuild (id->esummary); + g_free (id); + + return FALSE; +} + void e_summary_url_click (GtkWidget *widget, const char *url, @@ -439,6 +464,7 @@ e_summary_url_click (GtkWidget *widget, char *parsed; int address; ESummaryWindow *window; + struct _idle_data *id; Bonobo_Control control; Bonobo_Listener corba_listener; GtkWidget *prefsbox, *control_widget; @@ -473,8 +499,15 @@ e_summary_url_click (GtkWidget *widget, if (window->iid == NULL) break; - e_summary_remove_window (esummary, window); - e_summary_queue_rebuild (esummary); + id = g_new (struct _idle_data, 1); + id->window = window; + id->esummary = esummary; + + /* Close the window on an idle to work around a bug in + gnome-vfs which locks the e_summary_remove_window function + and as gtkhtml has a pointer grab on, this locks the whole + display. GAH! */ + g_idle_add (idle_remove_window, id); break; case PROTOCOL_CONFIGURE: @@ -565,8 +598,15 @@ e_summary_url_click (GtkWidget *widget, e_summary_queue_rebuild (esummary); break; - case PROTOCOL_NONE: case PROTOCOL_OTHER: + /* Pass it to the parent component */ + CORBA_exception_init (&ev); + GNOME_Evolution_Summary_HTMLView_handleURI (window->html, + url, &ev); + CORBA_exception_free (&ev); + break; + + case PROTOCOL_NONE: case PROTOCOL_HTTP: case PROTOCOL_FILE: default: diff --git a/executive-summary/component/e-summary-util.c b/executive-summary/component/e-summary-util.c index 3bd954ce12..a983da39b8 100644 --- a/executive-summary/component/e-summary-util.c +++ b/executive-summary/component/e-summary-util.c @@ -23,13 +23,15 @@ #include <e-summary-util.h> -#include <gnome.h> - #include <unistd.h> #include <sys/types.h> #include <sys/stat.h> #include <dirent.h> +#include <glib.h> +#include <libgnome/gnome-defs.h> +#include <libgnome/gnome-util.h> + /** * e_pixmap_file: * @filename: Filename of pixmap. diff --git a/executive-summary/component/e-summary.c b/executive-summary/component/e-summary.c index ae55f63e53..0e5d613ad8 100644 --- a/executive-summary/component/e-summary.c +++ b/executive-summary/component/e-summary.c @@ -25,8 +25,11 @@ #include <config.h> #endif -#include <gnome.h> -#include <bonobo.h> +#include <bonobo/bonobo-object.h> +#include <bonobo/bonobo-event-source.h> +#include <bonobo/bonobo-listener.h> +#include <bonobo/bonobo-property-bag.h> +#include <bonobo/bonobo-property-control.h> #include <gtkhtml/gtkhtml.h> #include <gtkhtml/gtkhtml-embedded.h> @@ -479,7 +482,7 @@ e_summary_rebuild_page (ESummary *esummary) gtk_layout_freeze (GTK_LAYOUT (priv->html)); e_summary_start_load (esummary); - if (priv->header == NULL) { + if (priv->header == NULL || *priv->header == '\0') { load_default_header (esummary); } else { gtk_html_write (GTK_HTML (priv->html), priv->stream, @@ -504,7 +507,6 @@ e_summary_rebuild_page (ESummary *esummary) for (i = 0; i < numrows; i++) { GList *window = windows; - g_print ("i: %d/%d\n", i, numrows); /* Do the same row twice: Once for the title, once for the contents */ for (j = 0; j < 2; j++) { @@ -516,7 +518,6 @@ e_summary_rebuild_page (ESummary *esummary) limit = MIN (columns, (numwindows - (i * columns))); for (k = 0; k < limit; k++) { - g_print ("%d of %d\n", k, limit); if (window == NULL) break; @@ -553,7 +554,7 @@ e_summary_rebuild_page (ESummary *esummary) } gtk_html_write (GTK_HTML (priv->html), priv->stream, "</tr></table>", 13); - if (priv->footer == NULL) { + if (priv->footer == NULL || *priv->footer == '\0') { load_default_footer (esummary); } else { gtk_html_write (GTK_HTML (priv->html), priv->stream, @@ -658,7 +659,12 @@ e_summary_add_service (ESummary *esummary, return NULL; } - window->event_source = Bonobo_Unknown_queryInterface(window->component, + unknown = Bonobo_Unknown_queryInterface (component, + "IDL:Bonobo/PropertyBag:1.0", + &ev); + window->propertybag = (Bonobo_PropertyBag) unknown; + + window->event_source = Bonobo_Unknown_queryInterface(window->propertybag, "IDL:Bonobo/EventSource:1.0", &ev); if (window->event_source == CORBA_OBJECT_NIL) { g_warning ("There is no Bonobo::EventSource interface"); @@ -675,11 +681,6 @@ e_summary_add_service (ESummary *esummary, window->listener_id = Bonobo_EventSource_addListener (window->event_source, listener, &ev); unknown = Bonobo_Unknown_queryInterface (component, - "IDL:Bonobo/PropertyBag:1.0", - &ev); - window->propertybag = (Bonobo_PropertyBag) unknown; - - unknown = Bonobo_Unknown_queryInterface (component, "IDL:Bonobo/PersistStream:1.0", &ev); window->persiststream = (Bonobo_PersistStream) unknown; @@ -693,8 +694,10 @@ e_summary_add_service (ESummary *esummary, window->title = bonobo_property_bag_client_get_value_string (window->propertybag, "window_title", NULL); + g_print ("title: %s\n", window->title); window->icon = bonobo_property_bag_client_get_value_string (window->propertybag, "window_icon", NULL); + g_print ("icon: %s\n", window->icon); CORBA_exception_free (&ev); priv->window_list = g_list_append (priv->window_list, window); @@ -748,7 +751,7 @@ e_summary_window_free (ESummaryWindow *window) if (ev._major != CORBA_NO_EXCEPTION) { g_warning ("CORBA ERROR: %s", CORBA_exception_id (&ev)); } - bonobo_object_release_unref (window->event_source, &ev); + bonobo_object_release_unref (window->event_source, &ev); } bonobo_object_release_unref (window->propertybag, &ev); @@ -756,10 +759,9 @@ e_summary_window_free (ESummaryWindow *window) bonobo_object_release_unref (window->propertycontrol, &ev); bonobo_object_unref (BONOBO_OBJECT (window->listener)); bonobo_object_release_unref (window->html, &ev); - + bonobo_object_release_unref (window->component, &ev); CORBA_exception_free (&ev); - g_free (window); } @@ -1211,7 +1213,6 @@ e_summary_save_state (ESummary *esummary, fullpath = g_strdup_printf("%s/Executive-Summary", path); g_print ("fullpath: %s\n", fullpath); - /* FIXME: Use RC's rmdir function */ e_summary_rm_dir (fullpath); storage = bonobo_storage_open (STORAGE_TYPE, fullpath, diff --git a/executive-summary/component/e-summary.h b/executive-summary/component/e-summary.h index 470863a9f5..36a9be6ed3 100644 --- a/executive-summary/component/e-summary.h +++ b/executive-summary/component/e-summary.h @@ -26,7 +26,7 @@ #include <gtk/gtkvbox.h> -#include <bonobo.h> +#include <bonobo/bonobo-object.h> #include <bonobo/bonobo-listener.h> #include <bonobo/bonobo-event-source.h> #include <Evolution.h> diff --git a/executive-summary/component/main.c b/executive-summary/component/main.c index 3e29b5f337..0834802da1 100644 --- a/executive-summary/component/main.c +++ b/executive-summary/component/main.c @@ -21,11 +21,13 @@ * Author: Iain Holmes <iain@helixcode.com> */ +#ifdef HAVE_CONFIG_H #include <config.h> +#endif #include <gnome.h> + #include <bonobo/bonobo-main.h> -#include <bonobo/bonobo-object-directory.h> #include <liboaf/liboaf.h> #include <glade/glade.h> @@ -35,7 +37,6 @@ #include "gal/widgets/e-gui-utils.h" #include "gal/widgets/e-cursors.h" -#include "gal/widgets/e-unicode.h" #include <libgnomevfs/gnome-vfs.h> #include "component-factory.h" @@ -45,7 +46,7 @@ main (int argc, char **argv) { CORBA_ORB orb; - + bindtextdomain (PACKAGE, EVOLUTION_LOCALEDIR); textdomain (PACKAGE); |