diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2007-12-06 04:50:15 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@src.gnome.org> | 2007-12-06 04:50:15 +0800 |
commit | 7fef4ba1e95a25b78600434b2a71ce0762db47f1 (patch) | |
tree | 37ff545517f4afe21db534a1bff3c2fbe59643f0 /calendar/gui/e-meeting-time-sel.c | |
parent | dbc59d48bea9da7292c7a30e37f2f086adb76c2d (diff) | |
download | gsoc2013-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/e-meeting-time-sel.c')
-rw-r--r-- | calendar/gui/e-meeting-time-sel.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/calendar/gui/e-meeting-time-sel.c b/calendar/gui/e-meeting-time-sel.c index 5367cd3335..013fa338f9 100644 --- a/calendar/gui/e-meeting-time-sel.c +++ b/calendar/gui/e-meeting-time-sel.c @@ -60,6 +60,7 @@ #include <misc/e-dateedit.h> #include <e-util/e-gui-utils.h> #include <e-util/e-cursor.h> +#include <e-util/e-util.h> #include "calendar-component.h" #include "calendar-config.h" @@ -2064,6 +2065,7 @@ e_meeting_time_selector_recalc_date_format (EMeetingTimeSelector *mts) gint max_date_width, longest_weekday_width, longest_month_width, width; gint day, longest_weekday, month, longest_month; gchar buffer[128]; + const gchar *name; PangoContext *pango_context; PangoLayout *layout; @@ -2081,23 +2083,21 @@ e_meeting_time_selector_recalc_date_format (EMeetingTimeSelector *mts) longest_weekday_width = 0; longest_weekday = G_DATE_MONDAY; for (day = G_DATE_MONDAY; day <= G_DATE_SUNDAY; day++) { - g_date_strftime (buffer, sizeof (buffer), "%A", &date); - pango_layout_set_text (layout, buffer, -1); + name = e_get_weekday_name (day, FALSE); + pango_layout_set_text (layout, name, -1); pango_layout_get_pixel_size (layout, &width, NULL); if (width > longest_weekday_width) { longest_weekday = day; longest_weekday_width = width; } - g_date_add_days (&date, 1); } /* Now find the biggest month name. */ longest_month_width = 0; longest_month = G_DATE_JANUARY; for (month = G_DATE_JANUARY; month <= G_DATE_DECEMBER; month++) { - g_date_set_month (&date, month); - g_date_strftime (buffer, sizeof (buffer), "%B", &date); - pango_layout_set_text (layout, buffer, -1); + name = e_get_month_name (month, FALSE); + pango_layout_set_text (layout, name, -1); pango_layout_get_pixel_size (layout, &width, NULL); if (width > longest_month_width) { longest_month = month; @@ -2130,16 +2130,14 @@ e_meeting_time_selector_recalc_date_format (EMeetingTimeSelector *mts) /* Now try it with abbreviated weekday names. */ longest_weekday_width = 0; longest_weekday = G_DATE_MONDAY; - g_date_set_dmy (&date, 3, 1, 2000); /* Monday 3rd Jan 2000. */ for (day = G_DATE_MONDAY; day <= G_DATE_SUNDAY; day++) { - g_date_strftime (buffer, sizeof (buffer), "%a", &date); - pango_layout_set_text (layout, buffer, -1); + name = e_get_weekday_name (day, TRUE); + pango_layout_set_text (layout, name, -1); pango_layout_get_pixel_size (layout, &width, NULL); if (width > longest_weekday_width) { longest_weekday = day; longest_weekday_width = width; } - g_date_add_days (&date, 1); } g_date_set_dmy (&date, days[longest_month - 1] + longest_weekday, |