aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2005-08-26 09:52:55 +0800
committerMichael Zucci <zucchi@src.gnome.org>2005-08-26 09:52:55 +0800
commit9185fb32b379bb767de52835a454549e973efa99 (patch)
tree03cca11bef21397f11b78b8800910cf452af69c8
parent9bed0d6fee7116e3f2875ecd16fe0f980a2c588b (diff)
downloadgsoc2013-evolution-9185fb32b379bb767de52835a454549e973efa99.tar.gz
gsoc2013-evolution-9185fb32b379bb767de52835a454549e973efa99.tar.zst
gsoc2013-evolution-9185fb32b379bb767de52835a454549e973efa99.zip
** See bug #314440.
2005-08-25 Not Zed <NotZed@Ximian.com> ** See bug #314440. * em-format-html.c (efh_url_requested): check the content object's mime type, not the container, when seeing if the data should be written. (efh_write_text_html): add some debug. * em-format-html-display.c (efhd_html_button_press_event): fix debug. svn path=/trunk/; revision=30253
-rw-r--r--mail/ChangeLog12
-rw-r--r--mail/em-format-html-display.c13
-rw-r--r--mail/em-format-html.c17
3 files changed, 34 insertions, 8 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 7ec419a8d6..8bad5c57c2 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,15 @@
+2005-08-25 Not Zed <NotZed@Ximian.com>
+
+ ** See bug #314440.
+
+ * em-format-html.c (efh_url_requested): check the content object's
+ mime type, not the container, when seeing if the data should be
+ written.
+ (efh_write_text_html): add some debug.
+
+ * em-format-html-display.c (efhd_html_button_press_event): fix
+ debug.
+
2005-08-22 Srinivasa Ragavan <sragavan@novell.com>
* em-format-html-display.c (efhd_bar_resize): Dont call update.
diff --git a/mail/em-format-html-display.c b/mail/em-format-html-display.c
index 63a5c727c4..0e054f1dca 100644
--- a/mail/em-format-html-display.c
+++ b/mail/em-format-html-display.c
@@ -613,26 +613,25 @@ efhd_iframe_created(GtkHTML *html, GtkHTML *iframe, EMFormatHTMLDisplay *efh)
static int
efhd_html_button_press_event (GtkWidget *widget, GdkEventButton *event, EMFormatHTMLDisplay *efhd)
{
- char *url;
+ char *uri;
gboolean res = FALSE;
EMFormatPURI *puri = NULL;
if (event->button != 3)
return FALSE;
- url = gtk_html_get_url_at (GTK_HTML (widget), event->x, event->y);
+ uri = gtk_html_get_url_at (GTK_HTML (widget), event->x, event->y);
d(printf("popup button pressed\n"));
- if (url) {
- puri = em_format_find_puri((EMFormat *)efhd, url);
-
+ if (uri) {
+ puri = em_format_find_puri((EMFormat *)efhd, uri);
d(printf("poup event, uri = '%s' part = '%p'\n", uri, puri?puri->part:NULL));
}
- g_signal_emit((GtkObject *)efhd, efhd_signals[EFHD_POPUP_EVENT], 0, event, url, puri?puri->part:NULL, &res);
+ g_signal_emit((GtkObject *)efhd, efhd_signals[EFHD_POPUP_EVENT], 0, event, uri, puri?puri->part:NULL, &res);
- g_free(url);
+ g_free(uri);
return res;
}
diff --git a/mail/em-format-html.c b/mail/em-format-html.c
index 7f06969297..f0a91f92c4 100644
--- a/mail/em-format-html.c
+++ b/mail/em-format-html.c
@@ -529,7 +529,8 @@ efh_url_requested(GtkHTML *html, const char *url, GtkHTMLStream *handle, EMForma
puri = em_format_find_visible_puri((EMFormat *)efh, url);
if (puri) {
- CamelContentType *ct = ((CamelDataWrapper *)puri->part)->mime_type;
+ CamelDataWrapper *dw = camel_medium_get_content_object((CamelMedium *)puri->part);
+ CamelContentType *ct = dw?dw->mime_type:NULL;
/* GtkHTML only handles text and images.
application/octet-stream parts are the only ones
@@ -546,6 +547,7 @@ efh_url_requested(GtkHTML *html, const char *url, GtkHTMLStream *handle, EMForma
d(printf(" adding puri job\n"));
job = em_format_html_job_new(efh, emfh_getpuri, puri);
} else {
+ d(printf(" part is unknown type '%s', not using\n", ct?camel_content_type_format(ct):"<unset>"));
gtk_html_stream_close(handle, GTK_HTML_STREAM_ERROR);
}
} else if (g_ascii_strncasecmp(url, "http:", 5) == 0 || g_ascii_strncasecmp(url, "https:", 6) == 0) {
@@ -793,6 +795,19 @@ efh_text_enriched(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, E
static void
efh_write_text_html(EMFormat *emf, CamelStream *stream, EMFormatPURI *puri)
{
+#if d(!)0
+ CamelStream *out;
+ int fd;
+ CamelDataWrapper *dw;
+
+ fd = dup(STDOUT_FILENO);
+ out = camel_stream_fs_new_with_fd(fd);
+ printf("writing text content to frame '%s'\n", puri->cid);
+ dw = camel_medium_get_content_object(puri->part);
+ if (dw)
+ camel_data_wrapper_write_to_stream(dw, out);
+ camel_object_unref(out);
+#endif
em_format_format_text(emf, stream, camel_medium_get_content_object((CamelMedium *)puri->part));
}
it/cgit.cgi/freebsd-ports-gnome/commit/sysutils/xfce4-settings?id=39ef19450c2cf8b75e3b20495c6e2331f67e3138'>Chase libnotify, libproxy and webkit-gtk2 shlib changes, and fix build where ...kwm2011-08-241-2/+2 * update x11/libexo to 0.6.2oliver2011-07-271-0/+1 * update xfce4-settings to 4.8.2oliver2011-06-072-7/+5 * update libexo to 0.6.1oliver2011-06-071-0/+1 * Welcome XFCE 4.8 to the portstree!oliver2011-03-033-73/+29 * Sync to new bsd.autotools.mkade2010-12-041-1/+1 * update xfce to 4.6.2oliver2010-05-313-62/+166 * Bounce PORTREVISION for gettext-related ports. Have fun, ya'll.ade2010-05-311-1/+1 * fix build with new libxclavieroliver2010-05-171-2/+3 * - update to 1.4.1dinoex2010-03-281-1/+1 * - update to jpeg-8dinoex2010-02-051-0/+1 * update to 4.6.4oliver2010-01-103-6/+19 * - add optional xklavier support (default off)oliver2009-12-031-2/+17 * - bump all port that indirectly depends on libjpeg and have not yet been bump...dinoex2009-07-311-0/+1 * update xfce to 4.6.1oliver2009-05-063-4/+7 * add xfce4-settings:oliver2009-03-03