From c029712c961ba26c90d9263a185c71f7286e9ece Mon Sep 17 00:00:00 2001 From: Wang Xin Date: Fri, 30 Mar 2007 08:08:14 +0000 Subject: Fixes #415985 and #416028. 2007-03-30 Wang Xin * widgets/ea-calendar-item.c: Fixes #415985 and #416028. svn path=/trunk/; revision=33345 --- a11y/ChangeLog | 4 ++++ a11y/widgets/ea-calendar-item.c | 18 ++++++++++++------ 2 files changed, 16 insertions(+), 6 deletions(-) (limited to 'a11y') diff --git a/a11y/ChangeLog b/a11y/ChangeLog index 0b33665712..d50eb5a4c9 100644 --- a/a11y/ChangeLog +++ b/a11y/ChangeLog @@ -1,3 +1,7 @@ +2007-03-30 Wang Xin + + * widgets/ea-calendar-item.c: Fixes #415985 and #416028. + 2007-03-27 Matthew Barnes * e-table/gal-a11y-e-cell-text.c: diff --git a/a11y/widgets/ea-calendar-item.c b/a11y/widgets/ea-calendar-item.c index 2529cb87b8..fa7e85c397 100644 --- a/a11y/widgets/ea-calendar-item.c +++ b/a11y/widgets/ea-calendar-item.c @@ -282,6 +282,8 @@ ea_calendar_item_get_name (AtkObject *accessible) g_return_val_if_fail (EA_IS_CALENDAR_ITEM (accessible), NULL); g_obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE(accessible)); + if (!g_obj) + return NULL; g_return_val_if_fail (E_IS_CALENDAR_ITEM (g_obj), NULL); calitem = E_CALENDAR_ITEM (g_obj); @@ -637,7 +639,8 @@ table_interface_is_row_selected (AtkTable *table, row_index_end = row_index_start + EA_CALENDAR_COLUMN_NUM - 1; calitem = E_CALENDAR_ITEM (g_obj); - e_calendar_item_get_selection (calitem, &start_date, &end_date); + if (!e_calendar_item_get_selection (calitem, &start_date, &end_date)) + return FALSE; e_calendar_item_get_offset_for_date (calitem, g_date_get_year (&start_date), @@ -689,7 +692,8 @@ table_interface_is_selected (AtkTable *table, index = table_interface_get_index_at (table, row, column); calitem = E_CALENDAR_ITEM (g_obj); - e_calendar_item_get_selection (calitem, &start_date, &end_date); + if (!e_calendar_item_get_selection (calitem, &start_date, &end_date)) + return FALSE; e_calendar_item_get_offset_for_date (calitem, g_date_get_year (&start_date), @@ -932,7 +936,8 @@ selection_interface_ref_selection (AtkSelection *selection, gint i) g_obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (ea_calitem)); calitem = E_CALENDAR_ITEM (g_obj); - e_calendar_item_get_selection (calitem, &start_date, &end_date); + if (!e_calendar_item_get_selection (calitem, &start_date, &end_date)) + return NULL; if (!e_calendar_item_get_offset_for_date (calitem, g_date_get_year (&start_date), g_date_get_month (&start_date) - 1, @@ -958,9 +963,10 @@ selection_interface_get_selection_count (AtkSelection *selection) return 0; calitem = E_CALENDAR_ITEM (g_obj); - e_calendar_item_get_selection (calitem, &start_date, &end_date); - - return g_date_days_between (&start_date, &end_date) + 1; + if (e_calendar_item_get_selection (calitem, &start_date, &end_date)) + return g_date_days_between (&start_date, &end_date) + 1; + else + return 0; } static gboolean -- cgit v1.2.3