aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-cell-text.c
diff options
context:
space:
mode:
authorMiguel de Icaza <miguel@gnu.org>1999-11-28 11:12:22 +0800
committerArturo Espinosa <unammx@src.gnome.org>1999-11-28 11:12:22 +0800
commit8d75b6689bdf5dc7c1efad65867cba2a656f2dcc (patch)
treeb023c7f3a14daa812fd46882017f307cef2cb36f /widgets/table/e-cell-text.c
parentbe9d0c05dbf3a8f10333ee6dc839673afb5befa5 (diff)
downloadgsoc2013-evolution-8d75b6689bdf5dc7c1efad65867cba2a656f2dcc.tar
gsoc2013-evolution-8d75b6689bdf5dc7c1efad65867cba2a656f2dcc.tar.gz
gsoc2013-evolution-8d75b6689bdf5dc7c1efad65867cba2a656f2dcc.tar.bz2
gsoc2013-evolution-8d75b6689bdf5dc7c1efad65867cba2a656f2dcc.tar.lz
gsoc2013-evolution-8d75b6689bdf5dc7c1efad65867cba2a656f2dcc.tar.xz
gsoc2013-evolution-8d75b6689bdf5dc7c1efad65867cba2a656f2dcc.tar.zst
gsoc2013-evolution-8d75b6689bdf5dc7c1efad65867cba2a656f2dcc.zip
beginning of the keyboard navigation.
1999-11-27 Miguel de Icaza <miguel@gnu.org> * e-table-item.c (eti_event): beginning of the keyboard navigation. * e-table-model.c (e_table_model_row_changed): new function. (e_table_model_cell_changed): new function. (e_table_model_class_init): New signals. * e-table-item.c (eti_request_region_redraw): x2, y2 offsets were wrong. (eti_select): Repaint selected region. (eti_request_region_redraw): Fix range. (eti_draw): Correct offset computation here. (e_table_item_class_init): New method: row_selection, handles the selection. Now it implement GTK_SELECTION_SINGLE and GTK_SELECTION_MULTIPLE. Focusing and selection should be correct now. svn path=/trunk/; revision=1441
Diffstat (limited to 'widgets/table/e-cell-text.c')
-rw-r--r--widgets/table/e-cell-text.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/widgets/table/e-cell-text.c b/widgets/table/e-cell-text.c
index da26302664..a997d745d3 100644
--- a/widgets/table/e-cell-text.c
+++ b/widgets/table/e-cell-text.c
@@ -64,13 +64,14 @@ ect_unrealize (ECellView *ecv)
}
static void
-ect_draw (ECellView *ecell_view, GdkDrawable *drawable, int col, int row, int x1, int y1, int x2, int y2)
+ect_draw (ECellView *ecell_view, GdkDrawable *drawable,
+ int col, int row, gboolean selected,
+ int x1, int y1, int x2, int y2)
{
ECellText *ect = E_CELL_TEXT (ecell_view->ecell);
ECellTextView *text_view = (ECellTextView *) ecell_view;
GdkRectangle rect;
const char *str = e_table_model_value_at (ecell_view->ecell->table_model, col, row);
- int selected = e_table_model_get_selected_row (ecell_view->ecell->table_model) == row;
int xoff, w;
rect.x = x1;
@@ -94,6 +95,7 @@ ect_draw (ECellView *ecell_view, GdkDrawable *drawable, int col, int row, int x1
xoff = ((x2 - x1) - gdk_text_width (text_view->font, str, strlen (str))) / 2;
break;
default:
+ xoff = 0;
g_warning ("Can not handle GTK_JUSTIFY_FILL");
break;
}
@@ -135,12 +137,12 @@ ect_event (ECellView *ecell_view, GdkEvent *event, int col, int row)
switch (event->type){
case GDK_BUTTON_PRESS:
- if (e_table_model_get_selected_row (ecell->table_model) == row)
- e_cell_text_start_editing (ect, col, row);
- else
- e_table_model_select_row (ecell->table_model, row);
return TRUE;
+
+ default:
+ break;
}
+ return FALSE;
}
static int