diff options
author | Harry Lu <harry.lu@sun.com> | 2005-02-02 10:10:09 +0800 |
---|---|---|
committer | Harry Lu <haip@src.gnome.org> | 2005-02-02 10:10:09 +0800 |
commit | 53cf58b7cf4b930ada93fd871b3107bb265ac696 (patch) | |
tree | e44c9f30e09ac2c33b68e4fe535468bc4b5af7e1 /a11y/calendar/ea-week-view.c | |
parent | f4fca7e3cb5364d03a482cb9db516e9206ce2335 (diff) | |
download | gsoc2013-evolution-53cf58b7cf4b930ada93fd871b3107bb265ac696.tar gsoc2013-evolution-53cf58b7cf4b930ada93fd871b3107bb265ac696.tar.gz gsoc2013-evolution-53cf58b7cf4b930ada93fd871b3107bb265ac696.tar.bz2 gsoc2013-evolution-53cf58b7cf4b930ada93fd871b3107bb265ac696.tar.lz gsoc2013-evolution-53cf58b7cf4b930ada93fd871b3107bb265ac696.tar.xz gsoc2013-evolution-53cf58b7cf4b930ada93fd871b3107bb265ac696.tar.zst gsoc2013-evolution-53cf58b7cf4b930ada93fd871b3107bb265ac696.zip |
Fix for 71924, 71926, 71932 Don't split sentences that need translation.
2005-02-01 Harry Lu <harry.lu@sun.com>
Fix for 71924, 71926, 71932
Don't split sentences that need translation.
Also remove two useless variables.
* calendar/ea-cal-view-event.c: (ea_cal_view_event_get_name):
* calendar/ea-day-view.c: (ea_day_view_get_name):
* calendar/ea-week-view.c: (ea_week_view_get_name),
(ea_week_view_get_n_children):
* widgets/ea-calendar-item.c: (ea_calendar_item_get_name),
(e_calendar_item_get_offset_for_date):
svn path=/trunk/; revision=28668
Diffstat (limited to 'a11y/calendar/ea-week-view.c')
-rw-r--r-- | a11y/calendar/ea-week-view.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/a11y/calendar/ea-week-view.c b/a11y/calendar/ea-week-view.c index 1b0ea445f8..3b36ac246d 100644 --- a/a11y/calendar/ea-week-view.c +++ b/a11y/calendar/ea-week-view.c @@ -129,15 +129,15 @@ ea_week_view_get_name (AtkObject *accessible) GnomeCalendar *gcal; const gchar *label_text; GnomeCalendarViewType view_type; - gchar buffer[128] = ""; gint n_events; + gchar *event_str, *name_str; g_return_val_if_fail (EA_IS_WEEK_VIEW (accessible), NULL); if (!GTK_ACCESSIBLE (accessible)->widget) return NULL; - week_view = E_WEEK_VIEW (GTK_ACCESSIBLE (accessible)->widget); + week_view = E_WEEK_VIEW (GTK_ACCESSIBLE (accessible)->widget); gcal = e_calendar_view_get_calendar (E_CALENDAR_VIEW (week_view)); label_text = ea_gnome_calendar_get_label_description (gcal); @@ -145,19 +145,24 @@ ea_week_view_get_name (AtkObject *accessible) /* the child main item is always there */ --n_events; if (n_events >= 1) - g_snprintf (buffer, sizeof (buffer), ngettext ( _(", %d event"), _(", %d events"), n_events), n_events); + event_str = g_strdup_printf (ngettext ("It has %d event.", "It has %d events.", n_events), n_events); + else + event_str = g_strdup (_("It has no events.")); view_type = gnome_calendar_get_view (gcal); if (view_type == GNOME_CAL_MONTH_VIEW) - accessible->name = g_strconcat (_("month view:"), - label_text, buffer, - NULL); + name_str = g_strdup_printf (_("Month View: %s. %s"), + label_text, event_str); else - accessible->name = g_strconcat (_("week view:"), - label_text, buffer, - NULL); + name_str = g_strdup_printf (_("Week View: %s. %s"), + label_text, event_str); + + ATK_OBJECT_CLASS (parent_class)->set_name (accessible, name_str); + g_free (name_str); + g_free (event_str); + return accessible->name; } @@ -192,7 +197,6 @@ static gint ea_week_view_get_n_children (AtkObject *accessible) { EWeekView *week_view; - GnomeCanvasGroup *canvas_group; gint i, count = 0; gint event_index; |