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 494531 - paste a context with some lines longer than 80 chars to evolution composer brought an error
paste a context with some lines longer than 80 chars to evolution composer br...
Status: RESOLVED FIXED
Product: GtkHtml
Classification: Other
Component: Editing
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkhtml-maintainers
Evolution QA team
: 484634 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-11-07 10:39 UTC by Kandepu Prasad
Modified: 2009-08-31 11:11 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20


Attachments
delete the unnecessary the '\n' char (858 bytes, patch)
2007-11-07 10:49 UTC, Kandepu Prasad
needs-work Details | Review
limit the width of email with text/plain or text/html type (1.03 KB, patch)
2007-11-07 10:50 UTC, Kandepu Prasad
reviewed Details | Review
gtkhtml patch (1.10 KB, patch)
2009-08-19 10:10 UTC, David Liang
rejected Details | Review
patch for evolution (903 bytes, patch)
2009-08-19 10:11 UTC, David Liang
committed Details | Review

Description Kandepu Prasad 2007-11-07 10:39:24 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:
Comment 1 Kandepu Prasad 2007-11-07 10:49:17 UTC
Created attachment 98709 [details] [review]
delete the unnecessary the '\n' char
Comment 2 Kandepu Prasad 2007-11-07 10:50:16 UTC
Created attachment 98710 [details] [review]
limit the width of email with text/plain or text/html type
Comment 3 Milan Crha 2007-11-13 17:00:35 UTC
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.
Comment 4 Akhil Laddha 2008-01-17 12:21:58 UTC
Adding the actual patch provider in Cc so that he can get updates and probably he will do rework if time allows.
Comment 5 Kandepu Prasad 2008-08-08 03:56:12 UTC
@David: Were you able to rework on the patch?
Comment 6 Akhil Laddha 2009-08-18 11:57:26 UTC
*** Bug 484634 has been marked as a duplicate of this bug. ***
Comment 7 Akhil Laddha 2009-08-18 11:59:20 UTC
Milan, would you mind taking over the owner ship of patches and complete them ? :-)
Comment 8 David Liang 2009-08-19 02:01:59 UTC
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?
Comment 9 David Liang 2009-08-19 10:10:24 UTC
Created attachment 141145 [details] [review]
gtkhtml patch

patch for the current gtkhtml in the truck
Comment 10 David Liang 2009-08-19 10:11:34 UTC
Created attachment 141146 [details] [review]
patch for evolution

patch for evolution of the current trunk version.
Comment 11 David Liang 2009-08-19 10:13:35 UTC
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.
Comment 12 Milan Crha 2009-08-19 17:27:38 UTC
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.
Comment 13 Milan Crha 2009-08-31 11:11:25 UTC
Created commit cd01125 in evo master (2.29.1+)
Created commit 7142d67 in evo gnome-2-28 (2.27.92+)