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
This commit is contained in:
Jeffrey Stedfast
2002-02-15 23:34:13 +00:00
committed by Jeffrey Stedfast
parent 6dd95a2464
commit cf668bd306
2 changed files with 12 additions and 7 deletions

View File

@ -1,3 +1,8 @@
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.
2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
* mail-account-gui.c (basename_from_uri): Replacement for using

View File

@ -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;