diff options
author | Peter Williams <peterw@ximian.com> | 2001-07-11 02:05:25 +0800 |
---|---|---|
committer | Peter Williams <peterw@src.gnome.org> | 2001-07-11 02:05:25 +0800 |
commit | 6079b3a3457d5f6a0a9b02e7db6a58f4ff9b0bc8 (patch) | |
tree | 245c07e855aa79cbb776c288d96de8eeb5834fa8 /mail/mail-display.c | |
parent | 7c200467e52ab6e1210788f97a057f85840a0d56 (diff) | |
download | gsoc2013-evolution-6079b3a3457d5f6a0a9b02e7db6a58f4ff9b0bc8.tar gsoc2013-evolution-6079b3a3457d5f6a0a9b02e7db6a58f4ff9b0bc8.tar.gz gsoc2013-evolution-6079b3a3457d5f6a0a9b02e7db6a58f4ff9b0bc8.tar.bz2 gsoc2013-evolution-6079b3a3457d5f6a0a9b02e7db6a58f4ff9b0bc8.tar.lz gsoc2013-evolution-6079b3a3457d5f6a0a9b02e7db6a58f4ff9b0bc8.tar.xz gsoc2013-evolution-6079b3a3457d5f6a0a9b02e7db6a58f4ff9b0bc8.tar.zst gsoc2013-evolution-6079b3a3457d5f6a0a9b02e7db6a58f4ff9b0bc8.zip |
Took the logic of whether or not to make the attachment header out of the
2001-07-10 Peter Williams <peterw@ximian.com>
* mail-format.c (attachment_header): Took the logic of whether or not
to make the attachment header out of the actual function.
(mail_part_is_displayed_inline): Return if the part is being displayed
inline (regardless of whether it is actually inline).
(mail_part_toggle_displayed): Toggle whether it's displayed inline or not.
(get_inline_flags): Determine whether the part is displayed inline and whether
it is actually inline.
(mail_format_mime_message): Initialize the attachment_status hash table.
* mail-display.c (inline_cb): Instead of modifying the CamelMimePart,
use mail_part_toggle_displayed
(button_press): As above.
(pixmap_press): Use mail_part_is_displayed_inline instead of
mail_part_is_inline. Get the MailDisplay from the popup to do this.
* mail.h: Add prototypes.
svn path=/trunk/; revision=10960
Diffstat (limited to 'mail/mail-display.c')
-rw-r--r-- | mail/mail-display.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/mail/mail-display.c b/mail/mail-display.c index 9eda71b942..00212c8868 100644 --- a/mail/mail-display.c +++ b/mail/mail-display.c @@ -311,11 +311,7 @@ inline_cb (GtkWidget *widget, gpointer user_data) MailDisplay *md = gtk_object_get_data (user_data, "MailDisplay"); CamelMimePart *part = gtk_object_get_data (user_data, "CamelMimePart"); - if (mail_part_is_inline (part)) - camel_mime_part_set_disposition (part, "attachment"); - else - camel_mime_part_set_disposition (part, "inline"); - + mail_part_toggle_displayed (part, md); mail_display_queue_redisplay (md); } @@ -330,11 +326,7 @@ button_press (GtkWidget *widget, CamelMimePart *part) return; } - if (mail_part_is_inline (part)) - camel_mime_part_set_disposition (part, "attachment"); - else - camel_mime_part_set_disposition (part, "inline"); - + mail_part_toggle_displayed (part, md); mail_display_queue_redisplay (md); } @@ -348,6 +340,7 @@ pixmap_press (GtkWidget *widget, GdkEventButton *event, EScrollFrame *user_data) GTK_SIGNAL_FUNC (inline_cb), NULL, 2 }; EPopupMenu open_item = { N_("Open in %s..."), NULL, GTK_SIGNAL_FUNC (launch_cb), NULL, 1 }; + MailDisplay *md; CamelMimePart *part; MailMimeHandler *handler; int mask = 0, i, nitems; @@ -383,7 +376,9 @@ pixmap_press (GtkWidget *widget, GdkEventButton *event, EScrollFrame *user_data) /* Inline view item */ memcpy (&menu[1], &view_item, sizeof (menu[1])); if (handler && handler->builtin) { - if (!mail_part_is_inline (part)) { + md = gtk_object_get_data (GTK_OBJECT (widget), "MailDisplay"); + + if (!mail_part_is_displayed_inline (part, md)) { if (handler->component) { OAF_Property *prop; char *name; @@ -833,7 +828,7 @@ on_object_requested (GtkHTML *html, GtkHTMLEmbedded *eb, gpointer data) hbox = gtk_hbox_new (FALSE, 2); gtk_container_set_border_width (GTK_CONTAINER (hbox), 2); - if (mail_part_is_inline (CAMEL_MIME_PART (medium))) { + if (mail_part_is_displayed_inline (CAMEL_MIME_PART (medium), md)) { arrow = gnome_stock_new_with_icon (GNOME_STOCK_PIXMAP_DOWN); } else { arrow = gnome_stock_new_with_icon (GNOME_STOCK_PIXMAP_FORWARD); |