Get month names and weekdays from locale.

Added modification to extract month names from locale instead
of localization files.
This commit is contained in:
Erick Pérez Castellanos
2012-12-01 15:28:53 -05:00
committed by Rene A. Viant Moran
parent 1062d3e435
commit cc14e10d36
4 changed files with 52 additions and 17 deletions
+4 -1
View File
@@ -1176,13 +1176,16 @@ gcal_week_view_draw_header (GcalWeekView *view,
for (i = 0; i < 7; i++)
{
gchar *weekday_header;
gchar *weekday_abv;
gint n_day;
n_day = start_of_week->day + i;
if (n_day > icaltime_days_in_month (start_of_week->month, start_of_week->year))
n_day = n_day - icaltime_days_in_month (start_of_week->month, start_of_week->year);
weekday_header = g_strdup_printf ("%s %d",gcal_get_weekday (i), n_day);
weekday_abv = gcal_get_weekday (i);
weekday_header = g_strdup_printf ("%s %d",weekday_abv, n_day);
pango_layout_set_text (layout, weekday_header, -1);
pango_cairo_update_layout (cr, layout);
pango_layout_get_pixel_size (layout, NULL, &font_height);