diff options
author | Peter Williams <peterw@ximian.com> | 2001-06-28 05:11:34 +0800 |
---|---|---|
committer | Peter Williams <peterw@src.gnome.org> | 2001-06-28 05:11:34 +0800 |
commit | 6fa46ef11d80a615733338bfe1f76acaef5eab48 (patch) | |
tree | 4bd3d8d04537d46a2163d5bf9f45b9e92d398483 /widgets/table | |
parent | 780e047c0471ed396ac6ac7f2534fa81034a581f (diff) | |
download | gsoc2013-evolution-6fa46ef11d80a615733338bfe1f76acaef5eab48.tar.gz gsoc2013-evolution-6fa46ef11d80a615733338bfe1f76acaef5eab48.tar.zst gsoc2013-evolution-6fa46ef11d80a615733338bfe1f76acaef5eab48.zip |
Bump version number due to incompatible changes in ETree.
2001-06-27 Peter Williams <peterw@ximian.com>
* configure.in: Bump version number due to incompatible changes
in ETree.
gal/e-table:
2001-06-27 Peter Williams <peterw@ximian.com>
* e-tree-selection-model.c (e_tree_selection_model_add_to_selection): New function,
heavily based on select_single_row.
* e-tree-selection-model.h: Added prototype;
* e-tree.c (e_tree_get_model): New accessor function.
(e_tree_get_selection_model): Same.
(e_tree_selected_count, e_tree_select_all, e_tree_invert_select): Removed. With
the accessors these become pointless.
* e-tree.h: Prototype the functions above. Remove a few functions that
don't make sense anymore.
svn path=/trunk/; revision=10543
Diffstat (limited to 'widgets/table')
-rw-r--r-- | widgets/table/e-tree-selection-model.c | 9 | ||||
-rw-r--r-- | widgets/table/e-tree-selection-model.h | 2 | ||||
-rw-r--r-- | widgets/table/e-tree.c | 63 | ||||
-rw-r--r-- | widgets/table/e-tree.h | 10 |
4 files changed, 50 insertions, 34 deletions
diff --git a/widgets/table/e-tree-selection-model.c b/widgets/table/e-tree-selection-model.c index 4c8a45c92d..375003f35d 100644 --- a/widgets/table/e-tree-selection-model.c +++ b/widgets/table/e-tree-selection-model.c @@ -1137,6 +1137,15 @@ e_tree_selection_model_select_single_path (ETreeSelectionModel *etsm, ETreePath } void +e_tree_selection_model_add_to_selection (ETreeSelectionModel *etsm, ETreePath path) +{ + etsm_change_one_path(etsm, path, TRUE); + etsm->priv->selection_start_path = path; + + e_selection_model_selection_changed(E_SELECTION_MODEL(etsm)); +} + +void e_tree_selection_model_change_cursor (ETreeSelectionModel *etsm, ETreePath path) { int row; diff --git a/widgets/table/e-tree-selection-model.h b/widgets/table/e-tree-selection-model.h index ffed337835..ae5fa9bd3e 100644 --- a/widgets/table/e-tree-selection-model.h +++ b/widgets/table/e-tree-selection-model.h @@ -41,6 +41,8 @@ void e_tree_selection_model_foreach (ETreeSelectionModel gpointer closure); void e_tree_selection_model_select_single_path (ETreeSelectionModel *etsm, ETreePath path); +void e_tree_selection_model_add_to_selection (ETreeSelectionModel *etsm, + ETreePath path); void e_tree_selection_model_change_cursor (ETreeSelectionModel *etsm, ETreePath path); diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c index 49fcc0732f..7291215e0a 100644 --- a/widgets/table/e-tree.c +++ b/widgets/table/e-tree.c @@ -1199,34 +1199,6 @@ e_tree_selected_path_foreach (ETree *e_tree, } #endif -gint -e_tree_selected_count (ETree *e_tree) -{ - g_return_val_if_fail(e_tree != NULL, -1); - g_return_val_if_fail(E_IS_TREE(e_tree), -1); - - return e_selection_model_selected_count(E_SELECTION_MODEL (e_tree->priv->selection)); -} - -void -e_tree_select_all (ETree *tree) -{ - g_return_if_fail (tree != NULL); - g_return_if_fail (E_IS_TREE (tree)); - - e_selection_model_select_all (E_SELECTION_MODEL (tree->priv->selection)); -} - -void -e_tree_invert_selection (ETree *tree) -{ - g_return_if_fail (tree != NULL); - g_return_if_fail (E_IS_TREE (tree)); - - e_selection_model_invert_selection (E_SELECTION_MODEL (tree->priv->selection)); -} - - EPrintable * e_tree_get_printable (ETree *e_tree) { @@ -1493,6 +1465,41 @@ e_tree_get_tooltip (ETree *et) return E_CANVAS(et->priv->table_canvas)->tooltip_window; } +/** + * e_tree_get_model: + * @et: the ETree + * + * Returns the model upon which this ETree is based. + * + * Returns: the model + **/ +ETreeModel * +e_tree_get_model (ETree *et) +{ + g_return_val_if_fail (et != NULL, NULL); + g_return_val_if_fail (E_IS_TREE (et), NULL); + + return et->priv->model; +} + +/** + * e_tree_get_selection_model: + * @et: the ETree + * + * Returns the selection model of this ETree. + * + * Returns: the selection model + **/ +ESelectionModel * +e_tree_get_selection_model (ETree *et) +{ + g_return_val_if_fail (et != NULL, NULL); + g_return_val_if_fail (E_IS_TREE (et), NULL); + + return et->priv->selection; +} + + struct _ETreeDragSourceSite { GdkModifierType start_button_mask; diff --git a/widgets/table/e-tree.h b/widgets/table/e-tree.h index 7ad9873d8b..8034d43c95 100644 --- a/widgets/table/e-tree.h +++ b/widgets/table/e-tree.h @@ -181,6 +181,9 @@ void e_tree_get_cell_geometry (ETree *tree, int *width_return, int *height_return); +/* Useful accessors */ +ETreeModel * e_tree_get_model (ETree *et); +ESelectionModel *e_tree_get_selection_model (ETree *et); /* Drag & drop stuff. */ /* Target */ @@ -226,12 +229,7 @@ GdkDragContext *e_tree_drag_begin (ETree *tree, GtkTargetList *targets, GdkDragAction actions, gint button, - GdkEvent *event); - -/* selection stuff */ -void e_tree_select_all (ETree *tree); -void e_tree_invert_selection (ETree *tree); - + GdkEvent *event); /* Adapter functions */ gboolean e_tree_node_is_expanded (ETree *et, |