aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-display.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-02-16 07:34:13 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-02-16 07:34:13 +0800
commitcf668bd306a6d272d6af53781324ab07838147c0 (patch)
tree474faec057a8058783543af34b0044ae1bf13d90 /mail/mail-display.c
parent6dd95a2464859b6eed53a7a09c11d42f3befd45d (diff)
downloadgsoc2013-evolution-cf668bd306a6d272d6af53781324ab07838147c0.tar.gz
gsoc2013-evolution-cf668bd306a6d272d6af53781324ab07838147c0.tar.zst
gsoc2013-evolution-cf668bd306a6d272d6af53781324ab07838147c0.zip
Don't display a down-arrow if the attachment is undisplayable. Fixes bug
2002-02-15 Jeffrey Stedfast <fejj@ximian.com> * mail-display.c (do_attachment_header): Don't display a down-arrow if the attachment is undisplayable. Fixes bug #6919. svn path=/trunk/; revision=15746
Diffstat (limited to 'mail/mail-display.c')
-rw-r--r--mail/mail-display.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/mail/mail-display.c b/mail/mail-display.c
index f88c3b8924..98f083d1f1 100644
--- a/mail/mail-display.c
+++ b/mail/mail-display.c
@@ -893,6 +893,12 @@ do_attachment_header (GtkHTML *html, GtkHTMLEmbedded *eb,
gtk_signal_connect (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC (button_press), part);
+ handler = mail_lookup_handler (eb->type);
+ if (handler && handler->builtin)
+ gtk_widget_set_sensitive (button, TRUE);
+ else
+ gtk_widget_set_sensitive (button, FALSE);
+
/* Drag & Drop */
gtk_drag_source_set (button, GDK_BUTTON1_MASK,
drag_types, num_drag_types,
@@ -905,7 +911,7 @@ do_attachment_header (GtkHTML *html, GtkHTMLEmbedded *eb,
hbox = gtk_hbox_new (FALSE, 2);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 2);
- if (mail_part_is_displayed_inline (part, md))
+ if (handler && mail_part_is_displayed_inline (part, md))
arrow = gnome_stock_new_with_icon (GNOME_STOCK_PIXMAP_DOWN);
else
arrow = gnome_stock_new_with_icon (GNOME_STOCK_PIXMAP_FORWARD);
@@ -930,12 +936,6 @@ do_attachment_header (GtkHTML *html, GtkHTMLEmbedded *eb,
gtk_box_pack_start (GTK_BOX (mainbox), popup, TRUE, TRUE, 0);
gtk_widget_show_all (mainbox);
- handler = mail_lookup_handler (eb->type);
- if (handler && handler->builtin)
- gtk_widget_set_sensitive (button, TRUE);
- else
- gtk_widget_set_sensitive (button, FALSE);
-
gtk_container_add (GTK_CONTAINER (eb), mainbox);
return TRUE;