aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWang Xin <jedy.wang@sun.com>2007-03-30 16:08:14 +0800
committerJedy Jedy Wang <jedywang@src.gnome.org>2007-03-30 16:08:14 +0800
commitc029712c961ba26c90d9263a185c71f7286e9ece (patch)
tree94fa88d14cfe87f3e136bf3637477ecc51edf7c6
parentb4ed9e8de8cef94bef2b7861e429382fdeeb7e85 (diff)
downloadgsoc2013-evolution-c029712c961ba26c90d9263a185c71f7286e9ece.tar.gz
gsoc2013-evolution-c029712c961ba26c90d9263a185c71f7286e9ece.tar.zst
gsoc2013-evolution-c029712c961ba26c90d9263a185c71f7286e9ece.zip
Fixes #415985 and #416028.
2007-03-30 Wang Xin <jedy.wang@sun.com> * widgets/ea-calendar-item.c: Fixes #415985 and #416028. svn path=/trunk/; revision=33345
-rw-r--r--a11y/ChangeLog4
-rw-r--r--a11y/widgets/ea-calendar-item.c18
2 files changed, 16 insertions, 6 deletions
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 <jedy.wang@sun.com>
+
+ * widgets/ea-calendar-item.c: Fixes #415985 and #416028.
+
2007-03-27 Matthew Barnes <mbarnes@redhat.com>
* 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