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 319849 - GtkCalendar in right-to-left (rtl) locales is looking wrong
GtkCalendar in right-to-left (rtl) locales is looking wrong
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
2.12.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks: Hebrew
 
 
Reported: 2005-10-26 13:21 UTC by Farzaneh Sarafraz
Modified: 2008-09-06 21:32 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24


Attachments
The first time to run the clock applet. (14.99 KB, image/png)
2005-10-26 13:22 UTC, Farzaneh Sarafraz
  Details
The clock applet after the first time (14.59 KB, image/png)
2005-10-26 13:24 UTC, Farzaneh Sarafraz
  Details
fix calendar display for RTL locales (1.70 KB, patch)
2008-09-06 15:35 UTC, Yair Hershkovitz
committed Details | Review

Description Farzaneh Sarafraz 2005-10-26 13:21:32 UTC
Distribution/Version: fedora core 4

The clock applet has a weird behaviour in right-to-left locales.

1. Start gnome-panel in Persian locale (fa_IR).
2. Click on the clock applet to open the calendar view. It should be the first
time to run the applet after starting the panel. (the first screenshot)
3. Close the applet.
4. Click on the clock applet again to open the calendar. (the second screenshot)

The place of the blue week number margine in the *first* execution of the applet
is correct, and it's different from that in later executions.
Comment 1 Farzaneh Sarafraz 2005-10-26 13:22:53 UTC
Created attachment 53908 [details]
The first time to run the clock applet.
Comment 2 Farzaneh Sarafraz 2005-10-26 13:24:20 UTC
Created attachment 53909 [details]
The clock applet after the first time
Comment 3 Vincent Untz 2005-10-26 19:46:45 UTC
Looks like a GTK+ bug since I don't think we're doing anything special with the
GtkCalendar. I'll try to make a test case later...
Comment 4 Vincent Untz 2005-12-15 07:22:22 UTC
Moving to GTK+. I'm not sure why I wanted to write a testcase, but if GTK+
people really want it, I can do it :-)
Comment 5 Yair Hershkovitz 2008-08-31 13:03:31 UTC
Still looks wrong on Ubuntu 8.04, gtk 2.12, gnome 2.22.
Comment 6 Yair Hershkovitz 2008-09-06 15:35:17 UTC
Created attachment 118167 [details] [review]
fix calendar display for RTL locales

RTL code does exist in gtk_calendar_size_allocate(), however it is missing in gtk_calendar_realize. Since week_numbers display is on by default then gtk_calendar_size_allocate() is called before gtk_calendar_realize() and does not execute the set position code we get that the week numbers column ies located at the left and not at the right.

The fix is to take RTL into consideration in gtk_calendar_realize, so the week numbers column location is initially created with correct value.
Comment 7 Matthias Clasen 2008-09-06 17:08:03 UTC
Looks ok to me, assuming you've tested it in RTL.
Comment 8 Yair Hershkovitz 2008-09-06 17:41:30 UTC
Would committing this now be considered as breaking UI freeze?
Comment 9 Matthias Clasen 2008-09-06 17:49:01 UTC
No, it is fine. 
Comment 10 Yair Hershkovitz 2008-09-06 21:32:31 UTC
2008-09-07  Yair Hershkovitz  <yairhr@gmail.com>

	Bug 319849 - gtkcalendar look in RTL locales

	* gtk/gtkcalendar.c (calendar_realize_week_numbers),
	(gtk_calendar_realize): added missing RTL code to handle week numbers
	from gtk_calendar_size_alloc.