aboutsummaryrefslogtreecommitdiffstats
path: root/executive-summary/component/e-summary-url.c
diff options
context:
space:
mode:
authorIain Holmes <iain@src.gnome.org>2001-02-15 02:37:40 +0800
committerIain Holmes <iain@src.gnome.org>2001-02-15 02:37:40 +0800
commit53659b16caf2b2172c46b261463b589ee12d19b0 (patch)
tree66f7d71f43b0c3a6c0418507bdd6d591a6f95588 /executive-summary/component/e-summary-url.c
parent59cb3688437bd26c4e2d2e3ea674b6a06d0da4e7 (diff)
downloadgsoc2013-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/e-summary-url.c')
-rw-r--r--executive-summary/component/e-summary-url.c50
1 files changed, 45 insertions, 5 deletions
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: