summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
0e138ed)
* Now we have ways to get "next cid" instead of last cid
available for attachments and images. Before, we were using
this confusingly, and we caused some bugs because of reusing
the first content id for a new image (fixes NB#82197).
pmo-trunk-r4292
guint scroll_drag_timeout_id;
gdouble last_upper;
guint scroll_drag_timeout_id;
gdouble last_upper;
TnyList *attachments;
TnyList *images;
guint64 images_size;
TnyList *attachments;
TnyList *images;
guint64 images_size;
priv->images = TNY_LIST (tny_simple_list_new ());
priv->images_size = 0;
priv->images_count = 0;
priv->images = TNY_LIST (tny_simple_list_new ());
priv->images_size = 0;
priv->images_count = 0;
priv->cc_caption = NULL;
priv->bcc_caption = NULL;
priv->cc_caption = NULL;
priv->bcc_caption = NULL;
-update_last_cid (ModestMsgEditWindow *self, TnyList *attachments)
+update_next_cid (ModestMsgEditWindow *self, TnyList *attachments)
{
TnyIterator *iter;
ModestMsgEditWindowPrivate *priv = MODEST_MSG_EDIT_WINDOW_GET_PRIVATE (self);
{
TnyIterator *iter;
ModestMsgEditWindowPrivate *priv = MODEST_MSG_EDIT_WINDOW_GET_PRIVATE (self);
if (cid != NULL) {
char *invalid = NULL;
gint int_cid = strtol (cid, &invalid, 10);
if (cid != NULL) {
char *invalid = NULL;
gint int_cid = strtol (cid, &invalid, 10);
- if ((invalid != NULL) && (*invalid == '\0') && (int_cid > priv->last_cid)) {
- priv->last_cid = int_cid;
+ if ((invalid != NULL) && (*invalid == '\0') && (int_cid >= priv->next_cid)) {
+ priv->next_cid = int_cid + 1;
}
}
g_object_unref (part);
}
}
g_object_unref (part);
gtk_widget_show_all (priv->attachments_caption);
}
get_related_images (self, msg);
gtk_widget_show_all (priv->attachments_caption);
}
get_related_images (self, msg);
- update_last_cid (self, priv->attachments);
- update_last_cid (self, priv->images);
+ update_next_cid (self, priv->attachments);
+ update_next_cid (self, priv->images);
replace_with_images (self, priv->images);
if (preserve_is_rich && !is_html) {
replace_with_images (self, priv->images);
if (preserve_is_rich && !is_html) {
TnyStream *stream = create_stream_for_uri (uri);
tny_mime_part_construct (mime_part, stream, mime_type, "base64");
TnyStream *stream = create_stream_for_uri (uri);
tny_mime_part_construct (mime_part, stream, mime_type, "base64");
- content_id = g_strdup_printf ("%d", priv->last_cid);
+ content_id = g_strdup_printf ("%d", priv->next_cid);
tny_mime_part_set_content_id (mime_part, content_id);
g_free (content_id);
tny_mime_part_set_content_id (mime_part, content_id);
g_free (content_id);
basename = g_path_get_basename (filename);
tny_mime_part_set_filename (mime_part, basename);
basename = g_path_get_basename (filename);
tny_mime_part_set_filename (mime_part, basename);
- content_id = g_strdup_printf ("%d", priv->last_cid);
+ content_id = g_strdup_printf ("%d", priv->next_cid);
tny_mime_part_set_content_id (mime_part, content_id);
g_free (content_id);
tny_mime_part_set_content_id (mime_part, content_id);
g_free (content_id);
basename = g_path_get_basename (filename);
tny_mime_part_set_filename (mime_part, basename);
basename = g_path_get_basename (filename);
tny_mime_part_set_filename (mime_part, basename);