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-cal-view-event.c | |
parent | f4fca7e3cb5364d03a482cb9db516e9206ce2335 (diff) | |
download | gsoc2013-evolution-53cf58b7cf4b930ada93fd871b3107bb265ac696.tar.gz 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-cal-view-event.c')
-rw-r--r-- | a11y/calendar/ea-cal-view-event.c | 56 |
1 files changed, 18 insertions, 38 deletions
diff --git a/a11y/calendar/ea-cal-view-event.c b/a11y/calendar/ea-cal-view-event.c index 3a389b2324..cbd53f4ebd 100644 --- a/a11y/calendar/ea-cal-view-event.c +++ b/a11y/calendar/ea-cal-view-event.c @@ -216,8 +216,8 @@ ea_cal_view_event_get_name (AtkObject *accessible) AtkGObjectAccessible *atk_gobj; GObject *g_obj; ECalendarViewEvent *event; - gchar *tmp_name; - gchar *new_name = g_strdup (""); + gchar *name_string; + gchar *alarm_string, *recur_string, *meeting_string, *summary_string; const char *summary; @@ -229,53 +229,33 @@ ea_cal_view_event_get_name (AtkObject *accessible) return NULL; event = ea_calendar_helpers_get_cal_view_event_from (GNOME_CANVAS_ITEM(g_obj)); + alarm_string = recur_string = meeting_string = ""; if (event && event->comp_data) { - if (e_cal_util_component_has_alarms (event->comp_data->icalcomp)) { - tmp_name = new_name; - new_name = g_strconcat (new_name, _("alarm "), NULL); - g_free (tmp_name); - } + if (e_cal_util_component_has_alarms (event->comp_data->icalcomp)) + alarm_string = _("It has alarms."); - if (e_cal_util_component_has_recurrences (event->comp_data->icalcomp)) { - tmp_name = new_name; - new_name = g_strconcat (new_name, _("recurrence "), NULL); - g_free (tmp_name); - } + if (e_cal_util_component_has_recurrences (event->comp_data->icalcomp)) + recur_string = _("It has recurrences."); - if (event->different_timezone) { - tmp_name = new_name; - new_name = g_strconcat (new_name, _("time-zone "), NULL); - g_free (tmp_name); - } - - if (e_cal_util_component_has_organizer (event->comp_data->icalcomp)) { - tmp_name = new_name; - new_name = g_strconcat (new_name, _("meeting "), NULL); - g_free (tmp_name); - } + if (e_cal_util_component_has_organizer (event->comp_data->icalcomp)) + meeting_string = _("It is a meeting."); + } - tmp_name = new_name; - new_name = g_strconcat (new_name, _("event. Summary is "), NULL); - g_free (tmp_name); summary = icalcomponent_get_summary (event->comp_data->icalcomp); - if (summary) { - tmp_name = new_name; - new_name = g_strconcat (new_name, summary, NULL); - g_free (tmp_name); - } - else { - tmp_name = new_name; - new_name = g_strconcat (new_name, _("empty"), NULL); - g_free (tmp_name); - } + if (summary) + summary_string = g_strdup_printf (_("Calendar Event: Summary is %s."), summary); + else + summary_string = g_strdup (_("Calendar Event: It has no summary.")); + + name_string = g_strdup_printf ("%s %s %s %s", summary_string, alarm_string, recur_string, meeting_string); - ATK_OBJECT_CLASS (parent_class)->set_name (accessible, new_name); + ATK_OBJECT_CLASS (parent_class)->set_name (accessible, name_string); #ifdef ACC_DEBUG printf("EvoAcc: name for event accobj=%p, is %s\n", (void *)accessible, new_name); #endif - g_free (new_name); + g_free (name_string); return accessible->name; } |