aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2003-02-17 10:58:09 +0800
committerChris Toshok <toshok@src.gnome.org>2003-02-17 10:58:09 +0800
commit0f7100a65c102ee23ae4066ce790f315a68c6adb (patch)
treed96b1c25be987ca37b843806e6890388c2ae9cc4
parentbaa50a5c8934d74573914b6425a5457f420fba93 (diff)
downloadgsoc2013-evolution-0f7100a65c102ee23ae4066ce790f315a68c6adb.tar
gsoc2013-evolution-0f7100a65c102ee23ae4066ce790f315a68c6adb.tar.gz
gsoc2013-evolution-0f7100a65c102ee23ae4066ce790f315a68c6adb.tar.bz2
gsoc2013-evolution-0f7100a65c102ee23ae4066ce790f315a68c6adb.tar.lz
gsoc2013-evolution-0f7100a65c102ee23ae4066ce790f315a68c6adb.tar.xz
gsoc2013-evolution-0f7100a65c102ee23ae4066ce790f315a68c6adb.tar.zst
gsoc2013-evolution-0f7100a65c102ee23ae4066ce790f315a68c6adb.zip
make this actually work: destroy the canvas item, memmove stuff around,
2003-02-16 Chris Toshok <toshok@ximian.com> * gal/widgets/e-reflow.c (item_removed): make this actually work: destroy the canvas item, memmove stuff around, change reflow->count, etc, etc. svn path=/trunk/; revision=19918
-rw-r--r--widgets/misc/e-reflow.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/widgets/misc/e-reflow.c b/widgets/misc/e-reflow.c
index 70b1f4a470..8754c5a042 100644
--- a/widgets/misc/e-reflow.c
+++ b/widgets/misc/e-reflow.c
@@ -334,6 +334,14 @@ item_removed (EReflowModel *model, int i, EReflow *reflow)
if (i < 0 || i >= reflow->count)
return;
+ if (reflow->items[i])
+ gtk_object_destroy (GTK_OBJECT (reflow->items[i]));
+
+ memmove (reflow->heights + i, reflow->heights + i + 1, (reflow->count - i - 1) * sizeof (int));
+ memmove (reflow->items + i, reflow->items + i + 1, (reflow->count - i - 1) * sizeof (GnomeCanvasItem *));
+
+ reflow->count --;
+
sorted = e_sorter_model_to_sorted (E_SORTER (reflow->sorter), i);
for (c = reflow->column_count - 1; c >= 0; c--) {
int start_of_column = reflow->columns[c];
@@ -347,6 +355,10 @@ item_removed (EReflowModel *model, int i, EReflow *reflow)
break;
}
}
+
+ e_sorter_array_set_count (reflow->sorter, reflow->count);
+
+ e_selection_model_simple_delete_rows (E_SELECTION_MODEL_SIMPLE (reflow->selection), i, 1);
}
static void