GNOME Bugzilla – Bug 319849
GtkCalendar in right-to-left (rtl) locales is looking wrong
Last modified: 2008-09-06 21:32:31 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.
Created attachment 53908 [details] The first time to run the clock applet.
Created attachment 53909 [details] The clock applet after the first time
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...
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 :-)
Still looks wrong on Ubuntu 8.04, gtk 2.12, gnome 2.22.
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.
Looks ok to me, assuming you've tested it in RTL.
Would committing this now be considered as breaking UI freeze?
No, it is fine.
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.