aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table-item.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-08-25 03:06:54 +0800
committerChris Lahey <clahey@src.gnome.org>2000-08-25 03:06:54 +0800
commit695baf618d363f760ec81d109c6e6185e510b1e7 (patch)
tree40d7700b26e6041ac8c8ef7e40cc15fe25ba43c0 /widgets/table/e-table-item.c
parent483c3d3ffc0addb346611c0a544f214784e349b1 (diff)
downloadgsoc2013-evolution-695baf618d363f760ec81d109c6e6185e510b1e7.tar
gsoc2013-evolution-695baf618d363f760ec81d109c6e6185e510b1e7.tar.gz
gsoc2013-evolution-695baf618d363f760ec81d109c6e6185e510b1e7.tar.bz2
gsoc2013-evolution-695baf618d363f760ec81d109c6e6185e510b1e7.tar.lz
gsoc2013-evolution-695baf618d363f760ec81d109c6e6185e510b1e7.tar.xz
gsoc2013-evolution-695baf618d363f760ec81d109c6e6185e510b1e7.tar.zst
gsoc2013-evolution-695baf618d363f760ec81d109c6e6185e510b1e7.zip
Added infrastructure for setting the justification of columns. Still need
2000-08-24 Christopher James Lahey <clahey@helixcode.com> * e-cell-text.c, e-cell-toggle.c, e-cell-tree.c, e-cell.c, e-cell.h, e-table-col.c, e-table-col.h, e-table-item.c: Added infrastructure for setting the justification of columns. Still need to change the cells to support it and need to add user interface to change the justification. svn path=/trunk/; revision=5010
Diffstat (limited to 'widgets/table/e-table-item.c')
-rw-r--r--widgets/table/e-table-item.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c
index 0f70861f1e..afa1bb8f96 100644
--- a/widgets/table/e-table-item.c
+++ b/widgets/table/e-table-item.c
@@ -1192,6 +1192,7 @@ eti_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int width,
ETableCol *ecol = e_table_header_get_column (eti->header, col);
ECellView *ecell_view = eti->cell_views [col];
gboolean col_selected = selected;
+ ECellFlags flags;
switch (eti->cursor_mode) {
case E_TABLE_CURSOR_SIMPLE:
if (cursor_col == ecol->col_idx && cursor_row == view_to_model_row(eti, row))
@@ -1215,7 +1216,23 @@ eti_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int width,
gdk_draw_rectangle (drawable, eti->fill_gc, TRUE,
xd, yd, ecol->width, height);
- e_cell_draw (ecell_view, drawable, ecol->col_idx, col, row, col_selected,
+ flags = col_selected ? E_CELL_SELECTED : 0;
+ switch (ecol->justification) {
+ case GTK_JUSTIFY_LEFT:
+ flags |= E_CELL_JUSTIFY_LEFT;
+ break;
+ case GTK_JUSTIFY_RIGHT:
+ flags |= E_CELL_JUSTIFY_RIGHT;
+ break;
+ case GTK_JUSTIFY_CENTER:
+ flags |= E_CELL_JUSTIFY_CENTER;
+ break;
+ case GTK_JUSTIFY_FILL:
+ flags |= E_CELL_JUSTIFY_FILL;
+ break;
+ }
+
+ e_cell_draw (ecell_view, drawable, ecol->col_idx, col, row, flags,
xd, yd, xd + ecol->width, yd + height);
if (view_to_model_col(eti, col) == cursor_col && view_to_model_row(eti, row) == cursor_row){