[Kde-pim] Patch to fix bug 134036

Diego Iastrubni elcuco at kde.org
Sat Apr 26 11:14:49 BST 2008


(cross posting)

Hi Shai,

I cannot directly test this patch yet, as I don't have a development 
environment right now, but I have some issues:

   1. The list of quote makrs is hardcoded in a swicth. If you want to
      hard code it, I think at least use a hard coded QList, as it will
      be easier to add values (even on runtime).
   2. You are using "paraIsRTL = line.isRightToLeft();" to detect the
      direction of the line. This will work on the first strong char of
      the line, which is something we are trying to avoid now.
      We are trying to bring to KDE a new way, in which the number of
      chars is counted, and we use the most suited direction. I have it
      working in konversation3, Thomas has implemented this in KWord,
      and I have implemented this in KatePart. See this code:
      http://api.kde.org/4.x-api/kdelibs-apidocs/kate/html/classKateRenderer.html#a7da26cd0417d3fbee987ee112b05e48
      http://api.kde.org/4.x-api/kdelibs-apidocs/kate/html/katerenderer_8cpp-source.html#l00833

This is how bad I can trash this patch without knowing how mail is 
handled ;-)

My worry is, when will your assumption break? Actually, even if it does 
break, it will not break any more then the way it is now... so, I guess 
it would be Ok.

(BTW, akregator uses the same code for displaying the messages, hint 
hint....)

Shai Berger wrote:
> Hi Pimsters,
>
> A couple of months ago I came to this list to mention some BiDi problems in 
> KMail trunk, and some solutions to them  that I had. I've been following the 
> list since then, and noted the advice that patches posted only in bugzilla 
> tend to stay there, but I couldn't find the time to revalidate my patch so I 
> could post it here.
>
> But now, I have found the time, so I'm attaching an updated  version of the 
> patch against trunk. The horrible regressions are still there, as far as I 
> can tell (starting a paragraph in Hebrew does not make it RTL in the editor, 
> as it does in 3.5 -- and this is probably a Qt issue), but this patch 
> improves the handling of mixed paragraphs. The full details are in 
> http://bugs.kde.org/show_bug.cgi?id=134036, but at a sound-byte level, if you 
> read this message in kmail, then the next line should appear right-justified 
> שלום because it starts with a Hebrew word, and if it had some more hebrew in 
> it, its words would be thrown out of order too; the patch improves this by 
> guessing when a new line is really a new paragraph (issue can't be solved  
> completely because paragraphs are not well-defined in plaintext mail).
>
> Thanks for your good work, and have fun,
>
> 	Shai.
>   

_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list