aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table-item.c
diff options
context:
space:
mode:
authorLi Yuan <li.yuan@sun.com>2005-01-27 13:16:19 +0800
committerHarry Lu <haip@src.gnome.org>2005-01-27 13:16:19 +0800
commitd8d481373ff47bc77432b2f8d8de91afd1bd02a0 (patch)
tree8e8965a9867437704b2a317f2a52ff1a0880f71d /widgets/table/e-table-item.c
parent7b6ba9e828c68f9229bcb8ad41a550119260aef6 (diff)
downloadgsoc2013-evolution-d8d481373ff47bc77432b2f8d8de91afd1bd02a0.tar.gz
gsoc2013-evolution-d8d481373ff47bc77432b2f8d8de91afd1bd02a0.tar.zst
gsoc2013-evolution-d8d481373ff47bc77432b2f8d8de91afd1bd02a0.zip
add an a11y name for the popup list. make shortcut key ALT+Arrow work.
2005-01-27 Li Yuan <li.yuan@sun.com> * e-cell-combo.c: (e_cell_combo_init), (e_cell_combo_do_popup), (e_cell_combo_list_button_press), (e_cell_combo_button_press), (e_cell_combo_button_release), (e_cell_combo_key_press): add an a11y name for the popup list. make shortcut key ALT+Arrow work. Fixes #70261 * e-cell-text.c: (e_cell_text_class_init), (_delete_selection), (_insert): add "text_inserted" and "text_deleted" signals to notify the text has been changed. (e_cell_text_get_text_by_view): new helper function to get the text being editted. * e-cell-text.h: add signal declaration. * e-cell-toggle.c: (etog_draw): add range check for negative values. * e-cell-vbox.c: (e_cell_vbox_class_init): * e-cell-vbox.h: make ECellVboxView public since it will be used in a11y part. * e-table-click-to-add.c: (etcta_style_set), (create_rect_and_text), (etcta_realize), (etcta_class_init), (e_table_click_to_add_commit): add "style_set" signal to click_to_add and implement the style_set function. (etcta_init): add a11y name to click to add. * e-table-click-to-add.h: add "style_set" signal to click_to_add and implement the style_set function. * e-table-config.c: (config_button_up), (config_button_down): check whether the columns are empty. * e-table-group-container.c: * e-table-group-container.h: make ETableGroupContainerChildNode public since it will be used in a11y part. * e-table-item.c: (eti_init): init eti->cols. (eti_event): at GDK_KEY_PRESS event and GDK_Down key pressed, we check view_col value before we pass it to eti_e_cell_event. (eti_class_init): call the new initialize function * e-table.c: (table_canvas_focus_event_cb): if canvas has a focused item but the etable does not have a cursor row, just focus the first item after check whether the click_to_add should get the focus. svn path=/trunk/; revision=28571
Diffstat (limited to 'widgets/table/e-table-item.c')
-rw-r--r--widgets/table/e-table-item.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c
index a582502b7b..33798cc716 100644
--- a/widgets/table/e-table-item.c
+++ b/widgets/table/e-table-item.c
@@ -44,6 +44,7 @@
#include "gal/widgets/e-canvas.h"
#include "gal/widgets/e-canvas-utils.h"
#include "gal/util/e-util.h"
+#include "gal/a11y/e-table/gal-a11y-e-table-item.h"
#include "gal/util/e-i18n.h"
#include <string.h>
#include <stdlib.h>
@@ -1647,6 +1648,7 @@ eti_init (GnomeCanvasItem *item)
eti->cursor_y2 = -1;
eti->rows = -1;
+ eti->cols = -1;
eti->frozen_count = 0;
eti->queue_show_cursor = FALSE;
@@ -2669,9 +2671,10 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
case GDK_KP_Down:
if ((e->key.state & GDK_MOD1_MASK)
&& ((e->key.keyval == GDK_Down ) || (e->key.keyval == GDK_KP_Down))) {
- gint view_col = model_to_view_col(eti, cursor_col);
- if (eti_e_cell_event (eti, eti->cell_views [view_col], e, ((GdkEventKey *)e)->time, cursor_col, view_col, model_to_view_row(eti, cursor_row), E_CELL_CURSOR))
- return TRUE;
+ gint view_col = model_to_view_col(eti, cursor_col);
+ if ((view_col >= 0) && (view_col < eti->cols))
+ if (eti_e_cell_event (eti, eti->cell_views [view_col], e, ((GdkEventKey *)e)->time, cursor_col, view_col, model_to_view_row(eti, cursor_row), E_CELL_CURSOR))
+ return TRUE;
} else
return_val = e_selection_model_key_press(E_SELECTION_MODEL (eti->selection), (GdkEventKey *) e);
break;
@@ -3124,10 +3127,8 @@ eti_class_init (GObjectClass *object_class)
G_TYPE_NONE, 1,
G_TYPE_POINTER);
- atk_registry_set_factory_type (atk_get_default_registry (),
- E_TABLE_ITEM_TYPE,
- gal_a11y_e_table_item_factory_get_type ());
-
+ /* A11y Init */
+ gal_a11y_e_table_item_init ();
}
E_MAKE_TYPE (e_table_item,