After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 502205 - Inserting emoticons in HTML messages just inserts a link instead of attaching
Inserting emoticons in HTML messages just inserts a link instead of attaching
Status: RESOLVED FIXED
Product: GtkHtml
Classification: Other
Component: Editing
3.17.x
Other Linux
: Normal normal
: ---
Assigned To: gtkhtml-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2007-12-06 21:34 UTC by Matthew Barnes
Modified: 2007-12-17 14:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (2.39 KB, patch)
2007-12-06 21:35 UTC, Matthew Barnes
committed Details | Review

Description Matthew Barnes 2007-12-06 21:34:49 UTC
Forwarding from a downstream bug report:
http://bugzilla.redhat.com/show_bug.cgi?id=401451

Description of problem:
When composing a message in evolution, the Insert->Emoticon menu option inserts
an HTML <IMG> tag in the message which just references the PNG file on the local
machine.  This is useless for anyone reading the message on a non-Linux (even
non-Fedora, or non-Gnome) platform.  It ought to attach the smiley to the
message and refer to the attachment in the <IMG> tag.

Version-Release number of selected component (if applicable):
evolution-2.12.1-3.fc8

How reproducible:
Insert an emoticon in an HTML message in the evolution message composer.

Steps to Reproduce:
1.Ctrl-N or click on "New Mail Message" in evolution main window.
2.Make sure Format->HTML is checked.
3.Choose Insert->Emoticon->Smiley in the body of the message.
4.Send the message.
  
Actual results:
The body of the message sent contains an HTML tag <IMG
SRC="/usr/share/icons/gnome/16x16/emotes/stock_smiley-1.png"> and the message
has no attachments.  Anyone reading the message on a machine which doesn't have
that file in that particular location won't be able to see the smiley.

Expected results:
The file /usr/share/icons/gnome/16x16/emotes/stock_smiley-1.png should have been
attached to the message, and then the <IMG> HTML tag should have referred to
that attachment.
Comment 1 Matthew Barnes 2007-12-06 21:35:20 UTC
Created attachment 100475 [details] [review]
Proposed patch
Comment 2 Milan Crha 2007-12-07 17:57:43 UTC
It works fine, but should be improved a bit, because if I save the html message into Drafts and insert there say 3 emoticons, then when I restore the message to continue editing, I got on console 3 same messages:
gtkhtml-WARNING **: No such file or directory
Comment 3 Matthew Barnes 2007-12-13 17:19:08 UTC
(In reply to comment #2)
> It works fine, but should be improved a bit, because if I save the html message
> into Drafts and insert there say 3 emoticons, then when I restore the message
> to continue editing, I got on console 3 same messages:
> gtkhtml-WARNING **: No such file or directory

That's a symptom of the problem I'm fixing but I don't see that with the patched version.  The emoticons appear fine for me when saved to Drafts.
Comment 4 Milan Crha 2007-12-14 12:26:07 UTC
Strange, I saw this warning even with the patch applied to gtkhtml. My stack trace for the message is this:

  • #9 load_from_file
    at editor-control-factory.c line 259
  • #10 url_requested_cb
    at editor-control-factory.c line 288
  • #11 html_g_cclosure_marshal_VOID__STRING_POINTER
    at htmlmarshal.c line 160
  • #12 g_closure_invoke
    from /lib64/libgobject-2.0.so.0
  • #13 g_cclosure_marshal_VOID__VOID
    from /lib64/libgobject-2.0.so.0
  • #14 g_signal_emit_valist
    from /lib64/libgobject-2.0.so.0
  • #15 g_signal_emit
    from /lib64/libgobject-2.0.so.0
  • #16 html_engine_url_requested_cb
    at gtkhtml.c line 489
  • #17 html_g_cclosure_marshal_VOID__STRING_POINTER
    at htmlmarshal.c line 160
  • #18 g_closure_invoke
    from /lib64/libgobject-2.0.so.0
  • #19 g_cclosure_marshal_VOID__VOID
    from /lib64/libgobject-2.0.so.0
  • #20 g_signal_emit_valist
    from /lib64/libgobject-2.0.so.0
  • #21 g_signal_emit_by_name
    from /lib64/libgobject-2.0.so.0
  • #22 html_image_factory_register
    at htmlimage.c line 1452
  • #23 html_image_init
    at htmlimage.c line 864
  • #24 html_image_new
    at htmlimage.c line 883
  • #25 element_parse_img
  • #26 parse_one_token
  • #27 new_parse_body
    at htmlengine.c line 1347
  • #28 html_engine_timer_event
    at htmlengine.c line 4663
  • #29 html_engine_stream_end
    at htmlengine.c line 4724
  • #30 gtk_html_stream_close
    at gtkhtml-stream.c line 137
  • #31 gtk_html_end
    at gtkhtml.c line 3570
  • #32 impl_load
    at persist-stream.c line 154
  • #33 Bonobo_PersistStream_load
    from /usr/lib64/libbonobo-2.so.0
  • #34 set_editor_text
    at e-msg-composer.c line 1391
  • #35 e_msg_composer_flush_pending_body
    at e-msg-composer.c line 4060
  • #36 e_msg_composer_new_with_message
    at e-msg-composer.c line 4673
  • #37 edit_message
    at em-composer-utils.c line 770
  • #38 edit_messages
    at em-composer-utils.c line 806
  • #39 get_messages_got
    at mail-ops.c line 1884
  • #40 mail_msgport_replied
    at mail-mt.c line 473
  • #41 g_main_context_dispatch
    from /lib64/libglib-2.0.so.0
  • #42 g_cclosure_marshal_VOID__VOID
    from /lib64/libglib-2.0.so.0
  • #43 g_main_loop_run
    from /lib64/libglib-2.0.so.0
  • #44 bonobo_main
    from /usr/lib64/libbonobo-2.so.0
  • #45 main
    at main.c line 700

Comment 5 Milan Crha 2007-12-14 12:53:54 UTC
I would like to add, I have the patch applied, because the difference between with and without is that the "with" version adds the images as attachments, but the "without" version not. Both shows the message on console.
Comment 6 Matthew Barnes 2007-12-14 13:12:03 UTC
Hmm, okay I'll take another look at it.
Comment 7 Matthew Barnes 2007-12-16 21:43:05 UTC
Milan, I can reproduce the warning you're seeing on an unpatched GtkHTML:

1) Enable the "Automatically insert emoticon images" option in Evolution

2) Compose a message with emoticons by typing things like ":-)" or ":-("
   (instead of via the Insert -> Emoticon menu).  The pictograms should
   change to smiley images.

3) Save the message to your Drafts folder and close it.

4) Reopen the message from your Drafts folder.

5) Warnings appear on the terminal, but the message renders fine.

   (evolution:10984): gtkhtml-WARNING **: No such file or directory


I think this is a separate bug.  Looks like GtkHTML is trying to open the MIME Content-Id as if it were a file on the filesystem.  But the message does reopen correctly, so I think the warning is of minor importance for now.  Feel free to investigate further if you wish.
Comment 8 Milan Crha 2007-12-17 11:45:00 UTC
OK, we can solve the other thing in other bug, as you suggested. In that case, feel free to commit to trunk, but do not forget to file new bug for that issue.
Comment 9 Matthew Barnes 2007-12-17 14:52:31 UTC
Committed to trunk (revision 8653).

Filed bug #504051 for the warning messages observed here.