Bug 41693 - some widgets are not showed correctly on bidi enabled languages
Summary: some widgets are not showed correctly on bidi enabled languages
Status: RESOLVED FIXED
Alias: None
Product: korganizer
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: HI major
Target Milestone: ---
Assignee: Cornelius Schumacher
URL:
Keywords:
: 68780 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-04-26 12:33 UTC by Diego Iastrubni
Modified: 2004-06-20 01:30 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
KOrg_Reverse.png (34.34 KB, image/png)
2003-10-25 19:02 UTC, Reinhold Kainhofer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description iastrubn 2002-04-26 12:32:56 UTC
(*** This bug was imported into bugs.kde.org ***)

Package:           korganizer
Version:           KDE 3.0.0 
Severity:          normal
Installed from:    Compiled From Sources
Compiler:          gcc 2.96 (madk 8.1)
OS:                Linux
OS/Compiler notes: Not Specified

This bugs refear to hebrew translation run korganizer -reverse to test:

1) the month calendar on the main window does not show the days correclty (in hebrew) SAT is on the left and acording to the dates itshould be on the right. The weekend (marked with red) is on the left and should be on the rigth.

2) when I display a week the days of week start from right to left and inside the table they go from left to right the corrent order is SUN is on right and SAT on the left.

please contact me to get screen shots

(Submitted via bugs.kde.org)
Comment 1 Meni Livne 2002-05-03 12:34:09 UTC
Hello again Diego.

I fixed most of the issues here as you can see at:
http://lists.kde.org/?t=3D102033100400003&r=3D1&w=3D2
The fixes should be in KDE 3.0.1.

I'm leaving this bug open since there's still one problem remaining with RT=
L=20
languages with moving and resizing of events that span an entire day or=20
multiple whole days and that is yet to be resolved.


On Friday 03 May 2002 15:28 you wrote:
> Package: korganizer
> Version: KDE 3.0.0
> Severity: normal
> Installed from:    Compiled From Sources
> Compiler:          gcc 2.96 (madk 8.1)
> OS:                Linux
> OS/Compiler notes: Not Specified
>
> This bugs refear to hebrew translation run korganizer -reverse to test:
>
> 1) the month calendar on the main window does not show the days correclty
> (in hebrew) SAT is on the left and acording to the dates itshould be on
> the right. The weekend (marked with red) is on the left and should be on
> the rigth.
>
> 2) when I display a week the days of week start from right to left and
> inside the table they go from left to right the corrent order is SUN is =
on
> right and SAT on the left.
>
> please contact me to get screen shots
Comment 2 Reinhold Kainhofer 2003-10-25 18:38:50 UTC
Subject: Re:

This bug even got worse recently. Right now, when running korganizer --reverse 
from current cvs, all agenda items are just drawn as one thin line (i.e. they 
don't have any width).

Reinhold

Comment 3 iastrubn 2003-10-25 18:54:04 UTC
Subject: Re:  some widgets are not showed correctly on bidi enabled languages

בשבת, 25 באוקטובר 2003, 18:38, נכתב על ידי Reinhold Kainhofer:
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.
>
> http://bugs.kde.org/show_bug.cgi?id=41693
>
>
>
>
> ------- Additional Comments From reinhold@kainhofer.com  2003-10-25 18:38
> ------- Subject: Re:
>
> This bug even got worse recently. Right now, when running korganizer
> --reverse from current cvs, all agenda items are just drawn as one thin
> line (i.e. they don't have any width).
>
> Reinhold

what are you talking about? i cannot reproduce. 
I have found other bugs, but not this one. I will look in the code now.
Comment 4 Reinhold Kainhofer 2003-10-25 19:02:58 UTC
Subject: Re:  some widgets are not showed correctly on bidi enabled languages

> > Right now, when running korganizer
> > --reverse from current cvs, all agenda items are just drawn as one thin
> > line (i.e. they don't have any width).
> 
> what are you talking about? i cannot reproduce. 

I'm running the english korganizer, but with the --reverse option as told in 
the original bug report. I attach a screenshot, where all agenda items are 
just one pixel wide (using my standard calendar, with quite a lot of items). 
This is perfectly reproducible here.

Reinhold
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/mqyXTqjEwhXvPN0RAh9RAKCa8dsrB0nDFALmCY1JkGb/MBwVaQCeKqRz
Tfvpvk//YFH0axlm7vAGnCA=
=/dnw
-----END PGP SIGNATURE-----


Created an attachment (id=2880)
KOrg_Reverse.png
Comment 5 Reinhold Kainhofer 2003-11-22 13:38:43 UTC
*** Bug 68780 has been marked as a duplicate of this bug. ***
Comment 6 Munzir Taha 2003-12-05 01:42:23 UTC
korganizer version 3.1.1
Mandrake 9.2

Let me also add two issues:
1. If i select any date with the mouse and drag to select more dates, the korganizer will get maximized. The more dates the bigger it becomes untill go out of screen!!

2. The To-do items: should also be reversed
Summary Priority Complete ...
Should be mirrored too

Wow! it's one year since this bug is opened. This is not what we used to from KDE nice team
Comment 7 Stephan Kulow 2004-05-25 09:18:48 UTC
Replaced iastrubn@actcom.co.il with cuco3001@yahoo.com due to bounces by reporter
Comment 8 Diego Iastrubni 2004-05-27 23:19:32 UTC
Stephan Kulow <coolo@kde.org> wrote:
>          ReportedBy|iastrubn actcom co il      
> |cuco3001 yahoo com
>                  CC|cuco3001 yahoo com          |
oops, thanks :)

BTW, since kde 3.2 this widget does not waok AT ALL in
RTL desktops.
This major bug for 2 families deservers a higher
priority. and not only because this app is UNUSABLE
for us, but because it looks bad having such bug open
for 3 families (kde 3.0, kde 3.1, kde 3.2 and now
3.3????)




	
		
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 

Comment 9 Stephan Kulow 2004-05-28 11:00:40 UTC
well, we usually decide which bugs are more severe by the number of votes and this bug got votes by one single person!
Comment 10 Reinhold Kainhofer 2004-05-28 11:09:32 UTC
This bug makes korganizer completely unusable for all people using rtl languages, since the layout will be switched in that case, and all boxes will appear just 1 pixel wide!
Quite serious, I'd say.

Reinhold

PS: About the low count of votes: If you start a program, and even the most basic thing doesn't work, do you really bother to write a bug report for this? Or would you just ignore that application because its developers are actually completely incompetent. (Actually, I think my "fixes" in the agenda view some time ago made this bug even worse, so no, I'm not insulting others here...)
Comment 11 Reinhold Kainhofer 2004-05-31 21:40:40 UTC
CVS commit by kainhofe: 

Correctly place the agenda items in RTL languages (and assign the correct width to them, so far, we tried to assign a negative width with was interpreted as zero).

Bug 41693 also talks about moving items in the agenda view, which is still not solved, so I'm leaving that report open, but the most grave part of the bug should be fixed.

CCMAIL: 41693@bugs.kde.org


  M +24 -8     koagenda.cpp   1.119


--- kdepim/korganizer/koagenda.cpp  #1.118:1.119
@@ -1003,5 +1003,5 @@ void KOAgenda::placeAgendaItem( KOAgenda
 //            << " subCellWidth: " << subCellWidth << endl;
 
-  // left upper corner, no subcells yet
+  // "left" upper corner, no subcells yet, RTL layouts have right/left switched, widths are negative then
   QPoint pt = gridToContents( QPoint( item->cellXLeft(), item->cellYTop() ) );
   // right lower corner
@@ -1013,12 +1013,28 @@ void KOAgenda::placeAgendaItem( KOAgenda
   // we need to add 0.01 to make sure we don't loose one pixed due to
   // numerics (i.e. if it would be x.9998, we want the integer, not rounded down.
+  double delta=0.01;
+  if (subCellWidth<0) delta=-delta;
+  int height, width, xpos, ypos;
   if (mAllDayMode) {
-    item->resize( pt1.x()-pt.x(), int( subCellPos + subCellWidth + 0.01 ) - int( subCellPos ) );
-    pt.setY( pt.y() + int( subCellPos ) );
+    width = pt1.x()-pt.x();
+    height = int( subCellPos + subCellWidth + delta ) - int( subCellPos );
+    xpos = pt.x();
+    ypos = pt.y() + int( subCellPos );
   } else {
-    item->resize( int( subCellPos + subCellWidth + 0.01 ) - int( subCellPos ), pt1.y()-pt.y() );
-    pt.setX( pt.x() + int( subCellPos ) );
+    width = int( subCellPos + subCellWidth + delta ) - int( subCellPos );
+    height = pt1.y()-pt.y();
+    xpos = pt.x() + int( subCellPos );
+    ypos = pt.y();
   }
-  moveChild( item, pt.x(), pt.y() );
+  if (width<0) { // RTL language/layout
+    xpos += width;
+    width = -width;
+  }
+  if (height<0) { // BTT (bottom-to-top) layout ?!?
+    ypos += height;
+    height = -height;
+  }
+  item->resize( width, height );
+  moveChild( item, xpos, ypos );
 }
 


Comment 12 Reinhold Kainhofer 2004-06-20 01:30:06 UTC
Moving events in reverse layout has been fixed recently, and the fix will be released with kde 3.3, so this bug report is finzlly done.

Cheers,
Reinhold