aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/print.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2007-12-06 04:50:15 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2007-12-06 04:50:15 +0800
commit7fef4ba1e95a25b78600434b2a71ce0762db47f1 (patch)
tree37ff545517f4afe21db534a1bff3c2fbe59643f0 /calendar/gui/print.c
parentdbc59d48bea9da7292c7a30e37f2f086adb76c2d (diff)
downloadgsoc2013-evolution-7fef4ba1e95a25b78600434b2a71ce0762db47f1.tar
gsoc2013-evolution-7fef4ba1e95a25b78600434b2a71ce0762db47f1.tar.gz
gsoc2013-evolution-7fef4ba1e95a25b78600434b2a71ce0762db47f1.tar.bz2
gsoc2013-evolution-7fef4ba1e95a25b78600434b2a71ce0762db47f1.tar.lz
gsoc2013-evolution-7fef4ba1e95a25b78600434b2a71ce0762db47f1.tar.xz
gsoc2013-evolution-7fef4ba1e95a25b78600434b2a71ce0762db47f1.tar.zst
gsoc2013-evolution-7fef4ba1e95a25b78600434b2a71ce0762db47f1.zip
** Fixes bug #392747 (extra cleanup work)
2007-12-05 Matthew Barnes <mbarnes@redhat.com> ** Fixes bug #392747 (extra cleanup work) * calendar/gui/e-day-view.c (e_day_view_style_set): * calendar/gui/e-week-view-titles-item.c (e_week_view_titles_item_draw): * calendar/gui/e-week-view.c (e_week_view_style_set): * calendar/gui/print.c (print_month_summary): * calendar/gui/e-meeting-time-sel.c (e_meeting_time_selector_recalc_date_form): Call e_get_month_name() or e_get_weekday_name() instead of e_utf8_strftime() or g_date_strftime(). e_utf8_strftime() or g_date_strftime(). * widgets/misc/e-calendar-item.c (e_calendar_item_show_popup_menu): Call e_get_month_name() instead of e_utf8_strftime(). svn path=/trunk/; revision=34659
Diffstat (limited to 'calendar/gui/print.c')
-rw-r--r--calendar/gui/print.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/calendar/gui/print.c b/calendar/gui/print.c
index 855271bb57..1fde0e3495 100644
--- a/calendar/gui/print.c
+++ b/calendar/gui/print.c
@@ -1778,7 +1778,7 @@ print_month_summary (GtkPrintContext *context, GnomeCalendar *gcal, time_t whenc
char buffer[100];
PangoFontDescription *font;
gboolean compress_weekend;
- int columns, col, weekday, len, month;
+ int columns, col, weekday, month;
double font_size, cell_width, x1, x2, y1, y2;
weekday = calendar_config_get_week_start_day ();
@@ -1815,16 +1815,16 @@ print_month_summary (GtkPrintContext *context, GnomeCalendar *gcal, time_t whenc
y2 = top + font_size * 1.5;
for (col = 0; col < columns; col++) {
- if (tm.tm_wday == 6 && compress_weekend) {
- e_utf8_strftime (buffer, sizeof (buffer), "%a/", &tm);
- len = strlen (buffer);
- tm.tm_mday++;
- tm.tm_wday = (tm.tm_wday + 1) % 7;
- e_utf8_strftime (buffer + len, sizeof (buffer) - len,
- "%a", &tm);
- } else {
- e_utf8_strftime (buffer, sizeof (buffer), "%A", &tm);
- }
+ if (tm.tm_wday == 6 && compress_weekend)
+ g_snprintf (
+ buffer, sizeof (buffer), "%s/%s",
+ e_get_weekday_name (G_DATE_SATURDAY, TRUE),
+ e_get_weekday_name (G_DATE_SUNDAY, TRUE));
+ else
+ g_snprintf (
+ buffer, sizeof (buffer), "%s",
+ e_get_weekday_name (
+ tm.tm_wday ? tm.tm_wday : 7, FALSE));
x1 = left + cell_width * col;
x2 = x1 + cell_width;