+2003-02-22 [thorsten] 0.8.10claws43
+
+ * src/mimeview.c
+ src/prefs_common.[ch]
+ src/procmime.[ch]
+ do not use description as attachment name
+
2003-02-22 [alfons] 0.8.10claws42
* src/summaryview.c
MICRO_VERSION=10
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=claws42
+EXTRA_VERSION=claws43
VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
dnl set $target
return partinfo->name;
else if (partinfo->filename)
return partinfo->filename;
+ else if (partinfo->description)
+ return partinfo->description;
+ else
+ return "";
+}
+
+static gchar *get_part_description(MimeInfo *partinfo)
+{
+ if (partinfo->description)
+ return partinfo->description;
+ else if (partinfo->name)
+ return partinfo->name;
+ else if (partinfo->filename)
+ return partinfo->filename;
else
return "";
}
str[COL_MIMETYPE] =
partinfo->content_type ? partinfo->content_type : "";
str[COL_SIZE] = to_human_readable(partinfo->size);
- str[COL_NAME] = get_part_name(partinfo);
+ if (prefs_common.attach_desc)
+ str[COL_NAME] = get_part_description(partinfo);
+ else
+ str[COL_NAME] = get_part_name(partinfo);
node = gtk_ctree_insert_node(ctree, parent, NULL, str, 0,
NULL, NULL, NULL, NULL,
GtkWidget *chkbtn_display_img;
GtkWidget *chkbtn_resize_image;
+
+ GtkWidget *chkbtn_attach_desc;
} message;
#if USE_GPGME
{"show_other_header", "FALSE", &prefs_common.show_other_header, P_BOOL,
NULL, NULL, NULL},
+ {"attach_desc", "TRUE", &prefs_common.attach_desc, P_BOOL,
+ &message.chkbtn_attach_desc,
+ prefs_set_data_from_toggle, prefs_set_toggle},
+
/* MIME viewer */
{"mime_image_viewer", "display '%s'",
&prefs_common.mime_image_viewer, P_STRING, NULL, NULL, NULL},
GtkWidget *chkbtn_display_img;
GtkWidget *chkbtn_resize_image;
+ GtkWidget *chkbtn_attach_desc;
+
vbox1 = gtk_vbox_new (FALSE, VSPACING);
gtk_widget_show (vbox1);
gtk_container_add (GTK_CONTAINER (dialog.notebook), vbox1);
PACK_CHECK_BUTTON(vbox3, chkbtn_resize_image,
_("Resize attached images"));
+ PACK_CHECK_BUTTON(vbox3, chkbtn_attach_desc,
+ _("Show attachment descriptions (rather than names)"));
+
+
message.chkbtn_enablecol = chkbtn_enablecol;
message.button_edit_col = button_edit_col;
message.chkbtn_mbalnum = chkbtn_mbalnum;
message.chkbtn_display_img = chkbtn_display_img;
message.chkbtn_resize_image = chkbtn_resize_image;
+
+ message.chkbtn_attach_desc = chkbtn_attach_desc;
}
#if USE_GPGME
gboolean show_other_header;
GSList *disphdr_list;
+ gboolean attach_desc;
+
/* MIME viewer */
gchar *mime_image_viewer;
gchar *mime_audio_player;
blen = strlen(buf) + 1;
Xalloca(tmp, blen, return);
conv_unmime_header(tmp, blen, buf, NULL);
- g_free(mimeinfo->name);
- mimeinfo->name = NULL;
/*pgp signatures should NOT have a name */
if (mimeinfo->content_type
&& strcasecmp(mimeinfo->content_type, "application/pgp-signature"))
- mimeinfo->name = g_strdup(tmp);
+ mimeinfo->description = g_strdup(tmp);
}
void procmime_scan_subject(MimeInfo *mimeinfo,
gchar *content_disposition;
gchar *filename;
+ gchar *description;
glong fpos;
guint size;