diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | src/mimeview.c | 6 | ||||
-rw-r--r-- | src/mimeview.h | 2 |
3 files changed, 14 insertions, 0 deletions
@@ -1,6 +1,12 @@ 2012-06-18 + * src/mimeview.[ch]: disabled 'Save all...' menu if attached files + with file name do not exist. + +2012-06-18 + * src/messageview.c: added attached filenames to the tool menu. + 2012-06-15 * src/messageview.[ch]: changed the Text/Attachments tab to a toggle 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); |