diff options
Diffstat (limited to 'plugins/itip-formatter/itip-formatter.c')
-rw-r--r-- | plugins/itip-formatter/itip-formatter.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/plugins/itip-formatter/itip-formatter.c b/plugins/itip-formatter/itip-formatter.c index 658acc07dc..32fdf23e7d 100644 --- a/plugins/itip-formatter/itip-formatter.c +++ b/plugins/itip-formatter/itip-formatter.c @@ -1502,22 +1502,24 @@ save_vcalendar_cb (GtkWidget *button, struct _itip_puri *pitip) EAttachment *attachment; EShell *shell; GFile *file; + const gchar *suggestion; g_return_if_fail (pitip != NULL); g_return_if_fail (pitip->vcalendar != NULL); g_return_if_fail (pitip->part != NULL); + suggestion = camel_mime_part_get_filename (pitip->part); + if (suggestion == NULL) { + /* Translators: This is a default filename for a calendar. */ + suggestion = _("calendar.ics"); + } + shell = e_shell_get_default (); file = e_shell_run_save_dialog ( - shell, _("Save Calendar"), NULL, NULL); + shell, _("Save Calendar"), suggestion, NULL, NULL); if (file == NULL) return; - if (!camel_mime_part_get_filename (pitip->part)) { - /* Translators: This is a default filename for a calendar. */ - camel_mime_part_set_filename (pitip->part, _("calendar.ics")); - } - attachment = e_attachment_new (); e_attachment_set_mime_part (attachment, pitip->part); |