aboutsummaryrefslogtreecommitdiffstats
path: root/a11y/calendar/ea-day-view-cell.c
diff options
context:
space:
mode:
authorBolian Yin <bolian.yin@sun.com>2003-12-10 11:56:31 +0800
committerBolian Yin <byin@src.gnome.org>2003-12-10 11:56:31 +0800
commitfa5a7a0472cf4153318c30ab84524529e2d63afe (patch)
tree66447b94674121074a2f70cff06e8f9eb868b559 /a11y/calendar/ea-day-view-cell.c
parentde2f6d31cb030b932a60417e422c07111a101fc6 (diff)
downloadgsoc2013-evolution-fa5a7a0472cf4153318c30ab84524529e2d63afe.tar
gsoc2013-evolution-fa5a7a0472cf4153318c30ab84524529e2d63afe.tar.gz
gsoc2013-evolution-fa5a7a0472cf4153318c30ab84524529e2d63afe.tar.bz2
gsoc2013-evolution-fa5a7a0472cf4153318c30ab84524529e2d63afe.tar.lz
gsoc2013-evolution-fa5a7a0472cf4153318c30ab84524529e2d63afe.tar.xz
gsoc2013-evolution-fa5a7a0472cf4153318c30ab84524529e2d63afe.tar.zst
gsoc2013-evolution-fa5a7a0472cf4153318c30ab84524529e2d63afe.zip
corret index error in week view. impl. get_index_in_parent emit signal
2003-12-05 Bolian Yin <bolian.yin@sun.com> * calendar/ea-cal-view-event.c (ea_cal_view_event_get_index_in_parent): corret index error in week view. * calendar/ea-day-view-cell.c: impl. get_index_in_parent * calendar/ea-day-view-main-item.c: emit signal "active-descendant-changed", fix error in selection_interface_ref_selection. * widgets/ea-calendar-cell.c: impl. get_index_in_parent. * widgets/ea-calendar-item.c: change signature of e_calendar_item_get_offset_for_date, emit signal "active-descendant-changed". svn path=/trunk/; revision=23902
Diffstat (limited to 'a11y/calendar/ea-day-view-cell.c')
-rw-r--r--a11y/calendar/ea-day-view-cell.c27
1 files changed, 24 insertions, 3 deletions
diff --git a/a11y/calendar/ea-day-view-cell.c b/a11y/calendar/ea-day-view-cell.c
index 52fb860fd6..6fe6cf7077 100644
--- a/a11y/calendar/ea-day-view-cell.c
+++ b/a11y/calendar/ea-day-view-cell.c
@@ -95,6 +95,7 @@ static G_CONST_RETURN gchar* ea_day_view_cell_get_name (AtkObject *accessible);
static G_CONST_RETURN gchar* ea_day_view_cell_get_description (AtkObject *accessible);
static AtkStateSet* ea_day_view_cell_ref_state_set (AtkObject *obj);
static AtkObject * ea_day_view_cell_get_parent (AtkObject *accessible);
+static gint ea_day_view_cell_get_index_in_parent (AtkObject *accessible);
/* component interface */
static void atk_component_interface_init (AtkComponentIface *iface);
@@ -160,6 +161,7 @@ ea_day_view_cell_class_init (EaDayViewCellClass *klass)
class->ref_state_set = ea_day_view_cell_ref_state_set;
class->get_parent = ea_day_view_cell_get_parent;
+ class->get_index_in_parent = ea_day_view_cell_get_index_in_parent;
}
AtkObject*
@@ -280,7 +282,28 @@ ea_day_view_cell_get_parent (AtkObject *accessible)
return NULL;
cell = E_DAY_VIEW_CELL (g_obj);
- return gtk_widget_get_accessible (GTK_WIDGET (cell->day_view->main_canvas));
+ return atk_gobject_accessible_for_object (G_OBJECT (cell->day_view->main_canvas_item));
+}
+
+static gint
+ea_day_view_cell_get_index_in_parent (AtkObject *accessible)
+{
+ AtkGObjectAccessible *atk_gobj;
+ GObject *g_obj;
+ EDayViewCell *cell;
+ AtkObject *parent;
+
+ g_return_val_if_fail (EA_IS_DAY_VIEW_CELL (accessible), -1);
+
+ atk_gobj = ATK_GOBJECT_ACCESSIBLE (accessible);
+ g_obj = atk_gobject_accessible_get_object (atk_gobj);
+ if (!g_obj)
+ return -1;
+
+ cell = E_DAY_VIEW_CELL (g_obj);
+ parent = atk_object_get_parent (accessible);
+ return atk_table_get_index_at (ATK_TABLE (parent),
+ cell->row, cell->column);
}
/* Atk Component Interface */
@@ -329,8 +352,6 @@ component_interface_get_extents (AtkComponent *component,
*x += day_view->day_offsets[cell->column] - scroll_x;
*y += day_view->row_height * cell->row
- scroll_y;
- printf ("ybl: cellrow=%d, cellcol=%d, scroll_x=%d, scroll_y=%d\n",
- cell->row, cell->column, scroll_x, scroll_y);
*width = day_view->day_widths[cell->column];
*height = day_view->row_height;
}