aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table
diff options
context:
space:
mode:
authorMike Kestner <mkestner@ximian.com>2003-03-19 00:38:30 +0800
committerMike Kestner <mkestner@src.gnome.org>2003-03-19 00:38:30 +0800
commit251ffc55ad742452eb84a9796c85353db4178e61 (patch)
tree7bc15bab3c5f09717a5db79630db027b0bcbc64e /widgets/table
parenta1220a0f1bf93a9695a7dd8286c26df86489edca (diff)
downloadgsoc2013-evolution-251ffc55ad742452eb84a9796c85353db4178e61.tar
gsoc2013-evolution-251ffc55ad742452eb84a9796c85353db4178e61.tar.gz
gsoc2013-evolution-251ffc55ad742452eb84a9796c85353db4178e61.tar.bz2
gsoc2013-evolution-251ffc55ad742452eb84a9796c85353db4178e61.tar.lz
gsoc2013-evolution-251ffc55ad742452eb84a9796c85353db4178e61.tar.xz
gsoc2013-evolution-251ffc55ad742452eb84a9796c85353db4178e61.tar.zst
gsoc2013-evolution-251ffc55ad742452eb84a9796c85353db4178e61.zip
null start_path (etsm_invert_selection): null start_path
2003-03-18 Mike Kestner <mkestner@ximian.com> * e-tree-selection-model.c (select_single_path): null start_path (etsm_invert_selection): null start_path (etsm_toggle_single_row): null start_path (etsm_real_move_selection_end): start at start_path, not cursor (etsm_set_selection_end): set start_path (e_tree_selection_model_init): null start_path svn path=/trunk/; revision=20337
Diffstat (limited to 'widgets/table')
-rw-r--r--widgets/table/e-tree-selection-model.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/widgets/table/e-tree-selection-model.c b/widgets/table/e-tree-selection-model.c
index c02accb4fb..8aa8cb3239 100644
--- a/widgets/table/e-tree-selection-model.c
+++ b/widgets/table/e-tree-selection-model.c
@@ -47,7 +47,7 @@ struct ETreeSelectionModelPriv {
GHashTable *paths;
ETreePath cursor_path;
- ETreePath end_path;
+ ETreePath start_path;
gint cursor_col;
gchar *cursor_save_id;
@@ -74,7 +74,7 @@ static void
clear_selection (ETreeSelectionModel *etsm)
{
g_hash_table_destroy (etsm->priv->paths);
- etsm->priv->paths = g_hash_table_new (NULL, NULL);;
+ etsm->priv->paths = g_hash_table_new (NULL, NULL);
}
static void
@@ -95,6 +95,7 @@ select_single_path (ETreeSelectionModel *etsm, ETreePath path)
clear_selection (etsm);
change_one_path(etsm, path, TRUE);
etsm->priv->cursor_path = path;
+ etsm->priv->start_path = NULL;
}
static void
@@ -516,6 +517,7 @@ etsm_invert_selection (ESelectionModel *selection)
etsm->priv->cursor_col = -1;
etsm->priv->cursor_path = NULL;
+ etsm->priv->start_path = NULL;
e_selection_model_selection_changed(E_SELECTION_MODEL(etsm));
e_selection_model_cursor_changed(E_SELECTION_MODEL(etsm), -1, -1);
}
@@ -595,6 +597,7 @@ etsm_toggle_single_row (ESelectionModel *selection, gint row)
else
g_hash_table_insert (etsm->priv->paths, path, path);
+ etsm->priv->start_path = NULL;
e_selection_model_selection_changed(E_SELECTION_MODEL(etsm));
}
@@ -602,13 +605,13 @@ static void
etsm_real_move_selection_end (ETreeSelectionModel *etsm, gint row)
{
ETreePath end_path = e_tree_table_adapter_node_at_row (etsm->priv->etta, row);
- gint cursor;
+ gint start;
g_return_if_fail (end_path);
- cursor = e_tree_table_adapter_row_of_node(etsm->priv->etta, etsm->priv->cursor_path);
+ start = e_tree_table_adapter_row_of_node(etsm->priv->etta, etsm->priv->start_path);
clear_selection (etsm);
- select_range (etsm, cursor, row);
+ select_range (etsm, start, row);
}
static void
@@ -629,6 +632,8 @@ etsm_set_selection_end (ESelectionModel *selection, gint row)
g_return_if_fail (etsm->priv->cursor_path);
+ if (!etsm->priv->start_path)
+ etsm->priv->start_path = etsm->priv->cursor_path;
etsm_real_move_selection_end(etsm, row);
e_selection_model_selection_changed(E_SELECTION_MODEL(etsm));
}
@@ -709,6 +714,7 @@ e_tree_selection_model_init (ETreeSelectionModel *etsm)
priv->paths = g_hash_table_new (NULL, NULL);
priv->cursor_path = NULL;
+ priv->start_path = NULL;
priv->cursor_col = -1;
priv->cursor_save_id = NULL;