aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mimeview.c6
-rw-r--r--src/mimeview.h2
2 files changed, 8 insertions, 0 deletions
diff --git a/src/mimeview.c b/src/mimeview.c
index c097e614..09634472 100644
--- a/src/mimeview.c
+++ b/src/mimeview.c
@@ -412,6 +412,7 @@ void mimeview_clear(MimeView *mimeview)
{
procmime_mimeinfo_free_all(mimeview->mimeinfo);
mimeview->mimeinfo = NULL;
+ mimeview->has_attach_file = FALSE;
gtk_tree_store_clear(mimeview->store);
textview_clear(mimeview->textview);
@@ -534,6 +535,8 @@ static gboolean mimeview_append_part(MimeView *mimeview, MimeInfo *partinfo,
mime_type = partinfo->content_type ? partinfo->content_type : "";
size = to_human_readable(partinfo->content_size);
name = get_part_name(partinfo);
+ if (name && *name != '\0')
+ mimeview->has_attach_file = TRUE;
gtk_tree_store_append(mimeview->store, iter, parent);
gtk_tree_store_set(mimeview->store, iter,
@@ -880,6 +883,9 @@ static gint mimeview_button_pressed(GtkWidget *widget, GdkEventButton *event,
menu_set_sensitive(mimeview->popupfactory,
"/Open", TRUE);
+ menu_set_sensitive(mimeview->popupfactory,
+ "/Save all...", mimeview->has_attach_file);
+
if (partinfo && (partinfo->mime_type == MIME_TEXT ||
partinfo->mime_type == MIME_TEXT_HTML ||
partinfo->mime_type == MIME_MESSAGE_RFC822))
diff --git a/src/mimeview.h b/src/mimeview.h
index 6cebcf39..89b41b5c 100644
--- a/src/mimeview.h
+++ b/src/mimeview.h
@@ -71,6 +71,8 @@ struct _MimeView
gchar *file;
gchar *drag_file;
+
+ gboolean has_attach_file;
};
MimeView *mimeview_create (void);