aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2001-11-15 06:26:46 +0800
committerChris Lahey <clahey@src.gnome.org>2001-11-15 06:26:46 +0800
commitf6bbfa3d44ca772031a6c6161cd7e3256955fdc2 (patch)
tree3363e94236049726c286f424a5bf636df3083da4 /widgets/misc
parentd932891f608a7fabaada90056e207b891cf4190a (diff)
downloadgsoc2013-evolution-f6bbfa3d44ca772031a6c6161cd7e3256955fdc2.tar.gz
gsoc2013-evolution-f6bbfa3d44ca772031a6c6161cd7e3256955fdc2.tar.zst
gsoc2013-evolution-f6bbfa3d44ca772031a6c6161cd7e3256955fdc2.zip
Bumped version number to 0.18.1.
2001-11-14 Christopher James Lahey <clahey@ximian.com> * configure.in (GAL_CURRENT): Bumped version number to 0.18.1. * gal/widgets/e-selection-model-array.c (e_selection_model_array_delete_rows): Make sure the cursor row is selected after deleting here. svn path=/trunk/; revision=14711
Diffstat (limited to 'widgets/misc')
-rw-r--r--widgets/misc/e-selection-model-array.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/widgets/misc/e-selection-model-array.c b/widgets/misc/e-selection-model-array.c
index 552e9536ad..13c964bfba 100644
--- a/widgets/misc/e-selection-model-array.c
+++ b/widgets/misc/e-selection-model-array.c
@@ -52,7 +52,6 @@ void
e_selection_model_array_delete_rows(ESelectionModelArray *esma, int row, int count)
{
if (esma->eba) {
-
if (E_SELECTION_MODEL(esma)->mode == GTK_SELECTION_SINGLE)
e_bit_array_delete_single_mode(esma->eba, row, count);
else
@@ -63,6 +62,14 @@ e_selection_model_array_delete_rows(ESelectionModelArray *esma, int row, int cou
else if (esma->cursor_row > row)
esma->cursor_row = row;
+ if (esma->cursor_row >= e_bit_array_bit_count (esma->eba)) {
+ esma->cursor_row = e_bit_array_bit_count (esma->eba) - 1;
+ } else if (esma->cursor_row < 0) {
+ esma->cursor_row = -1;
+ }
+ if (esma->cursor_row >= 0)
+ e_bit_array_change_one_row(esma->eba, esma->cursor_row, TRUE);
+
e_selection_model_selection_changed(E_SELECTION_MODEL(esma));
e_selection_model_cursor_changed(E_SELECTION_MODEL(esma), esma->cursor_row, esma->cursor_col);
}