GNOME Bugzilla – Bug 494531
paste a context with some lines longer than 80 chars to evolution composer brought an error
Last modified: 2009-08-31 11:11:25 UTC
Please describe the problem: This is a Upstream bug for the below bug https://bugzilla.novell.com/show_bug.cgi?id=297143 Summary: paste a context with some lines longer than 80 chars to evolution composer brought an error <The composer is not in html styles> When I copy my codes (with some lines longer than 80 chars) from gedit and paste it into evolution composer, the line will be broke to more than one lines. The line is not only broke in the view level, but also broke in its real content. Comments ------- Comment #1 From David Liang 2007-08-03 03:39:54 MST [reply] ------- Created an attachment (id=155413) [details] delete the unnecessary the '\n' char I found that this problem is brought by gtkhtml. In the function src/htmlclueflow.c/save_plain, it append a '\n' char to the text no matter it real got a '\n' or just over the max_width. So I add the gtkhtml-plain-line-break.patch to fix it. ------- Comment #2 From David Liang 2007-08-03 03:42:07 MST [reply] ------- Created an attachment (id=155414) [details] limit the width of email with text/plain or text/html type An other problem is, as RFC suggest, the width of a text in email should better shorter than 76. But now, evolution do not limit the width of email when the body is in type of text/html or text/plain(is that why gtkhtml split the line in text/plain type?). I add the evolution-plain-html-long-line-break.patch to fix it. ------- Comment #3 From Srinivasa Ragavan 2007-08-14 06:36:13 MST [reply] ------- I think this has to be upstreamed along with the patch. (bugzilla.gnome.org) David, it would be great if you can do it, so that you get the credits for both the bug and the patch :-) Steps to reproduce: 1. 2. 3. Actual results: Expected results: Does this happen every time? Other information:
Created attachment 98709 [details] [review] delete the unnecessary the '\n' char
Created attachment 98710 [details] [review] limit the width of email with text/plain or text/html type
Please place declaration of the over_max_width to the beginning of the block. Also you can do 'if (!over_max_width)', it's a bit better readable. In the second patch, if I understand the html part properly, it will ensure that any line in that part will not exceed any limit for the line? If yes, it can solve some issues with sendmail if you have lines longer than 996 characters or so as well. So sounds good. For both, if you make proper changes and add ChangeLog entries to appropriate ChangeLogs, then can be committed to trunk.
Adding the actual patch provider in Cc so that he can get updates and probably he will do rework if time allows.
@David: Were you able to rework on the patch?
*** Bug 484634 has been marked as a duplicate of this bug. ***
Milan, would you mind taking over the owner ship of patches and complete them ? :-)
I did not notice it last year... I'll do it :) (In reply to comment #5) > @David: Were you able to rework on the patch?
Created attachment 141145 [details] [review] gtkhtml patch patch for the current gtkhtml in the truck
Created attachment 141146 [details] [review] patch for evolution patch for evolution of the current trunk version.
Hi, the two patches were changed as your comment. I don't know what is the ChangeLog refers to. (In reply to comment #3) > Please place declaration of the over_max_width to the beginning of the block. > Also you can do 'if (!over_max_width)', it's a bit better readable. > > In the second patch, if I understand the html part properly, it will ensure > that any line in that part will not exceed any limit for the line? If yes, it > can solve some issues with sendmail if you have lines longer than 996 > characters or so as well. So sounds good. > > For both, if you make proper changes and add ChangeLog entries to appropriate > ChangeLogs, then can be committed to trunk.
Yeah, a year later and quite many things can change. The evo patch is fine, (I'm wondering how to change its status to accepted in one commit, same as one was able to do in the old good bugzilla). The gtkhtml patch, hmm, I do not think it's good to have. What was the main reason to use it? If it was only about "when I paste a line of text which is too long, it wraps it", then change the paragraph format to "preformatted", the "normal" paragraph style wraps by default, and it's the expected behaviour. (In reply to comment #11) > I don't know what is the ChangeLog refers to. It's not applicable any more. You can safely forget ChangeLog things.
Created commit cd01125 in evo master (2.29.1+) Created commit 7142d67 in evo gnome-2-28 (2.27.92+)