diff options
author | Damon Chaplin <damon@helixcode.com> | 2000-09-30 23:29:22 +0800 |
---|---|---|
committer | Damon Chaplin <damon@src.gnome.org> | 2000-09-30 23:29:22 +0800 |
commit | 0ff98664ba2f06f71508288247b3b25ffb7f8f47 (patch) | |
tree | 8bf1505d4c16c605042d8ab058ee85099863b093 /calendar/gui/e-week-view-main-item.c | |
parent | 32d2e7c670ebc72b8f60172e8f6fddcc5ae7f45d (diff) | |
download | gsoc2013-evolution-0ff98664ba2f06f71508288247b3b25ffb7f8f47.tar gsoc2013-evolution-0ff98664ba2f06f71508288247b3b25ffb7f8f47.tar.gz gsoc2013-evolution-0ff98664ba2f06f71508288247b3b25ffb7f8f47.tar.bz2 gsoc2013-evolution-0ff98664ba2f06f71508288247b3b25ffb7f8f47.tar.lz gsoc2013-evolution-0ff98664ba2f06f71508288247b3b25ffb7f8f47.tar.xz gsoc2013-evolution-0ff98664ba2f06f71508288247b3b25ffb7f8f47.tar.zst gsoc2013-evolution-0ff98664ba2f06f71508288247b3b25ffb7f8f47.zip |
updated to support RDATE end times or durations. Note that if you have two
2000-09-29 Damon Chaplin <damon@helixcode.com>
* cal-util/cal-recur.c: updated to support RDATE end times or
durations. Note that if you have two RDATEs with the same start times,
but with different end dates/durations set, the results are
unpredictable. So the event editor dialog should check for this.
* gui/e-week-view-main-item.c (e_week_view_main_item_draw_day):
make strftime() strings translatable, and changed the formats a bit.
* NOTE: someone needs to check print.c to make sure strftime strings
are OK for i18n.
* gui/e-day-view.h: Changed EDayViewDateFormat enum. We now try to
include the weekday if possible. Also changed EDayView struct so we
store the month & weekdays with the longest names rather than the
actual widths. This helps i18n.
* gui/e-day-view.c (e_day_view_recalc_cell_sizes): used _() for
strftime strings, tried to see if weekday fits, and rearranged a
bit to make i18n easier.
* gui/e-day-view-top-item.c (e_day_view_top_item_draw): used _() for
strftime strings, and updated to use new formats.
* gui/calendar-model.c: added use_24_hour_format boolean to
CalendarModelPrivate so we can display dates in 12-hour format if
requested. This meant adding a CalendarModel argument to a few
functions. Also added get/set functions to set use_24_hour_format.
I suppose ideally we should have an ECellDate renderer and this option
should go there.
svn path=/trunk/; revision=5646
Diffstat (limited to 'calendar/gui/e-week-view-main-item.c')
-rw-r--r-- | calendar/gui/e-week-view-main-item.c | 33 |
1 files changed, 26 insertions, 7 deletions
diff --git a/calendar/gui/e-week-view-main-item.c b/calendar/gui/e-week-view-main-item.c index d30404305d..10990324ff 100644 --- a/calendar/gui/e-week-view-main-item.c +++ b/calendar/gui/e-week-view-main-item.c @@ -315,22 +315,41 @@ e_week_view_main_item_draw_day (EWeekViewMainItem *wvmitem, max_width = width - 4; format_string = NULL; if (show_day_name) { - if (week_view->max_abbr_day_width + - week_view->digit_width * 2 + week_view->space_width * 2 + if (week_view->max_day_width + week_view->digit_width * 2 + + week_view->space_width * 2 + week_view->month_widths[month - 1] < max_width) - format_string = "%a %d %B"; + /* strftime format %A = full weekday name, %d = day of + month, %B = full month name. You can change the + order but don't change the specifiers or add + anything. */ + format_string = _("%A %d %B"); + else if (week_view->max_abbr_day_width + + week_view->digit_width * 2 + + week_view->space_width * 2 + + week_view->abbr_month_widths[month - 1] < max_width) + /* strftime format %a = abbreviated weekday name, + %d = day of month, %b = abbreviated month name. + You can change the order but don't change the + specifiers or add anything. */ + format_string = _("%a %d %b"); } if (!format_string && show_month_name) { if (week_view->digit_width * 2 + week_view->space_width + week_view->month_widths[month - 1] < max_width) - format_string = "%d %B"; + /* strftime format %d = day of month, %B = full + month name. You can change the order but don't + change the specifiers or add anything. */ + format_string = _("%d %B"); else if (week_view->digit_width * 2 + week_view->space_width + week_view->abbr_month_widths[month - 1] < max_width) - format_string = "%d %b"; + /* strftime format %d = day of month, %b = abbreviated + month name. You can change the order but don't + change the specifiers or add anything. */ + format_string = _("%d %b"); } - g_date_strftime (buffer, 128, format_string ? format_string : "%d", - date); + g_date_strftime (buffer, sizeof (buffer), + format_string ? format_string : "%d", date); date_width = gdk_string_width (font, buffer); date_x = x + width - date_width - E_WEEK_VIEW_DATE_R_PAD; date_x = MAX (date_x, x + 1); |