diff options
author | Christopher James Lahey <clahey@ximian.com> | 2001-10-05 21:27:03 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2001-10-05 21:27:03 +0800 |
commit | 9a92cc103a4cb253f7c9c86a2195ed6c01361e2d (patch) | |
tree | da2fc6200f129fae6205e1655a07653a9b142c32 /widgets/table/e-tree.c | |
parent | cc3e486ed62270d66522dfc0c9d325dd95364b7d (diff) | |
download | gsoc2013-evolution-9a92cc103a4cb253f7c9c86a2195ed6c01361e2d.tar.gz gsoc2013-evolution-9a92cc103a4cb253f7c9c86a2195ed6c01361e2d.tar.zst gsoc2013-evolution-9a92cc103a4cb253f7c9c86a2195ed6c01361e2d.zip |
Adapted height method to deal with a row of -1.
2001-10-05 Christopher James Lahey <clahey@ximian.com>
* e-cell-text, e-cell-pixbuf: Adapted height method to deal with a
row of -1.
* e-table-group-container.c, e-table-group-container.h,
e-table-group-leaf.c, e-table-group-leaf.h, e-table-item.c,
e-table-item.h, e-table.c, e-table.h, e-tree.c: Added
"uniform_row_height" argument.
svn path=/trunk/; revision=13440
Diffstat (limited to 'widgets/table/e-tree.c')
-rw-r--r-- | widgets/table/e-tree.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c index abb5bdcec8..acd841d085 100644 --- a/widgets/table/e-tree.c +++ b/widgets/table/e-tree.c @@ -74,7 +74,8 @@ enum { ARG_HORIZONTAL_DRAW_GRID, ARG_VERTICAL_DRAW_GRID, ARG_DRAW_FOCUS, - ARG_ETTA + ARG_ETTA, + ARG_UNIFORM_ROW_HEIGHT, }; struct ETreePriv { @@ -124,6 +125,8 @@ struct ETreePriv { guint do_drag : 1; + guint uniform_row_height : 1; + ECursorMode cursor_mode; int drop_row; @@ -295,6 +298,7 @@ e_tree_init (GtkObject *object) e_tree->priv->draw_focus = 1; e_tree->priv->cursor_mode = E_CURSOR_SIMPLE; e_tree->priv->length_threshold = 200; + e_tree->priv->uniform_row_height = FALSE; e_tree->priv->row_selection_active = FALSE; e_tree->priv->horizontal_scrolling = FALSE; @@ -652,6 +656,7 @@ et_build_item (ETree *et) "drawfocus", et->priv->draw_focus, "cursor_mode", et->priv->cursor_mode, "length_threshold", et->priv->length_threshold, + "uniform_row_height", et->priv->uniform_row_height, NULL); gtk_signal_connect (GTK_OBJECT (et->priv->item), "cursor_change", @@ -1284,6 +1289,9 @@ et_get_arg (GtkObject *o, GtkArg *arg, guint arg_id) GTK_VALUE_OBJECT (*arg) = GTK_OBJECT (etree->priv->etta); } break; + case ARG_UNIFORM_ROW_HEIGHT: + GTK_VALUE_BOOL (*arg) = etree->priv->uniform_row_height; + break; default: break; @@ -1336,6 +1344,15 @@ et_set_arg (GtkObject *o, GtkArg *arg, guint arg_id) NULL); } break; + + case ARG_UNIFORM_ROW_HEIGHT: + etree->priv->uniform_row_height = GTK_VALUE_BOOL (*arg); + if (etree->priv->item) { + gnome_canvas_item_set (GNOME_CANVAS_ITEM(etree->priv->item), + "uniform_row_height", GTK_VALUE_BOOL (*arg), + NULL); + } + break; } } @@ -2584,6 +2601,8 @@ e_tree_class_init (ETreeClass *class) GTK_ARG_WRITABLE, ARG_DRAW_FOCUS); gtk_object_add_arg_type ("ETree::ETreeTableAdapter", GTK_TYPE_OBJECT, GTK_ARG_READABLE, ARG_ETTA); + gtk_object_add_arg_type ("ETree::uniform_row_height", GTK_TYPE_BOOL, + GTK_ARG_READWRITE, ARG_UNIFORM_ROW_HEIGHT); } E_MAKE_TYPE(e_tree, "ETree", ETree, e_tree_class_init, e_tree_init, PARENT_TYPE); |