aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/ea-week-view.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-06-07 04:08:47 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-06-07 08:09:08 +0800
commitffc019e36fd4703e5342030ca6779032d91c7611 (patch)
tree511ec7fb99746b600e2c176511d8e056831371bf /calendar/gui/ea-week-view.c
parent3fc28cd410369d299f080e44a71797f00c522eec (diff)
downloadgsoc2013-evolution-ffc019e36fd4703e5342030ca6779032d91c7611.tar.gz
gsoc2013-evolution-ffc019e36fd4703e5342030ca6779032d91c7611.tar.zst
gsoc2013-evolution-ffc019e36fd4703e5342030ca6779032d91c7611.zip
Coding style and whitespace cleanups.
Diffstat (limited to 'calendar/gui/ea-week-view.c')
-rw-r--r--calendar/gui/ea-week-view.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/calendar/gui/ea-week-view.c b/calendar/gui/ea-week-view.c
index 14bb456219..fcbae83cb7 100644
--- a/calendar/gui/ea-week-view.c
+++ b/calendar/gui/ea-week-view.c
@@ -147,7 +147,9 @@ ea_week_view_get_name (AtkObject *accessible)
/* the child main item is always there */
--n_events;
if (n_events >= 1)
- event_str = g_strdup_printf (ngettext ("It has %d event.", "It has %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."));
@@ -280,7 +282,8 @@ ea_week_view_ref_child (AtkObject *accessible, gint index)
if (index == 0) {
/* index == 0 is the main item */
- atk_object = atk_gobject_accessible_for_object (G_OBJECT (week_view->main_canvas_item));
+ atk_object = atk_gobject_accessible_for_object (
+ G_OBJECT (week_view->main_canvas_item));
g_object_ref (atk_object);
} else
for (event_index = 0; event_index < max_count; ++event_index) {
@@ -318,7 +321,11 @@ ea_week_view_ref_child (AtkObject *accessible, gint index)
atk_object = ea_calendar_helpers_get_accessible_for (span->text_item);
}
else {
- atk_object = ea_calendar_helpers_get_accessible_for (week_view->jump_buttons[current_day == -1 ? 0 : current_day]);
+ gint index;
+
+ index = (current_day != -1) ? current_day : 0;
+ atk_object = ea_calendar_helpers_get_accessible_for (
+ week_view->jump_buttons[index]);
}
g_object_ref (atk_object);
break;