[evolution/gnome-3-0] Bug #643526 - Crash in et_get_n_children
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/gnome-3-0] Bug #643526 - Crash in et_get_n_children
- Date: Mon, 6 Jun 2011 13:55:06 +0000 (UTC)
commit 8b7bfa495992a2e6f02f2dd01b18af0dc0a60f13
Author: Milan Crha <mcrha redhat com>
Date: Mon Jun 6 15:54:44 2011 +0200
Bug #643526 - Crash in et_get_n_children
calendar/gui/ea-cal-view.c | 4 +---
widgets/table/gal-a11y-e-table.c | 7 ++++---
widgets/table/gal-a11y-e-tree.c | 3 +--
3 files changed, 6 insertions(+), 8 deletions(-)
---
diff --git a/calendar/gui/ea-cal-view.c b/calendar/gui/ea-cal-view.c
index 71b1c52..f296203 100644
--- a/calendar/gui/ea-cal-view.c
+++ b/calendar/gui/ea-cal-view.c
@@ -171,7 +171,6 @@ static AtkObject*
ea_cal_view_get_parent (AtkObject *accessible)
{
ECalendarView *cal_view;
- GnomeCalendar *gnomeCalendar;
GtkWidget *widget;
g_return_val_if_fail (EA_IS_CAL_VIEW (accessible), NULL);
@@ -181,9 +180,8 @@ ea_cal_view_get_parent (AtkObject *accessible)
return NULL;
cal_view = E_CALENDAR_VIEW (widget);
- gnomeCalendar = e_calendar_view_get_calendar (cal_view);
- return gtk_widget_get_accessible (GTK_WIDGET (gnomeCalendar));
+ return gtk_widget_get_accessible (gtk_widget_get_parent (GTK_WIDGET (cal_view)));
}
static void
diff --git a/widgets/table/gal-a11y-e-table.c b/widgets/table/gal-a11y-e-table.c
index c6ba4e7..5490aa4 100644
--- a/widgets/table/gal-a11y-e-table.c
+++ b/widgets/table/gal-a11y-e-table.c
@@ -129,7 +129,7 @@ et_get_n_children (AtkObject *accessible)
et = E_TABLE (gtk_accessible_get_widget (GTK_ACCESSIBLE (a11y)));
- if (et->group) {
+ if (et && et->group) {
if (E_IS_TABLE_GROUP_LEAF (et->group))
n = 1;
else if (E_IS_TABLE_GROUP_CONTAINER (et->group)) {
@@ -153,6 +153,8 @@ et_ref_child (AtkObject *accessible,
gint child_no;
et = E_TABLE (gtk_accessible_get_widget (GTK_ACCESSIBLE (a11y)));
+ if (!et)
+ return NULL;
child_no = et_get_n_children (accessible);
if (i == 0 || i < child_no - 1) {
@@ -281,8 +283,7 @@ gal_a11y_e_table_new (GObject *widget)
a11y = g_object_new (gal_a11y_e_table_get_type (), NULL);
- /* FIXME No way to do this in GTK 3. */
- /*GTK_ACCESSIBLE (a11y)->widget = GTK_WIDGET (widget);*/
+ gtk_accessible_set_widget (GTK_ACCESSIBLE (a11y), GTK_WIDGET (widget));
/* we need to init all the children for multiple table items */
if (table && gtk_widget_get_mapped (GTK_WIDGET (table)) && table->group && E_IS_TABLE_GROUP_CONTAINER (table->group)) {
diff --git a/widgets/table/gal-a11y-e-tree.c b/widgets/table/gal-a11y-e-tree.c
index d474f96..8c67cc8 100644
--- a/widgets/table/gal-a11y-e-tree.c
+++ b/widgets/table/gal-a11y-e-tree.c
@@ -176,8 +176,7 @@ gal_a11y_e_tree_new (GObject *widget)
a11y = g_object_new (gal_a11y_e_tree_get_type (), NULL);
- /* FIXME No way to do this in GTK 3. */
- /*GTK_ACCESSIBLE (a11y)->widget = GTK_WIDGET (widget);*/
+ gtk_accessible_set_widget (GTK_ACCESSIBLE (a11y), GTK_WIDGET (widget));
return ATK_OBJECT (a11y);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]