[gnumeric] Auto format: fix breakage from canvas work too.



commit 0613005b0a430ee9c3db1248982ab83bba7bbf40
Author: Morten Welinder <terra gnome org>
Date:   Fri Sep 11 22:26:24 2009 -0400

    Auto format: fix breakage from canvas work too.

 src/dialogs/ChangeLog           |    4 ++++
 src/dialogs/dialog-autoformat.c |   12 +++++++-----
 2 files changed, 11 insertions(+), 5 deletions(-)
---
diff --git a/src/dialogs/ChangeLog b/src/dialogs/ChangeLog
index a8f2131..9e60840 100644
--- a/src/dialogs/ChangeLog
+++ b/src/dialogs/ChangeLog
@@ -1,3 +1,7 @@
+2009-09-11  Morten Welinder  <terra gnome org>
+
+	* dialog-autoformat.c (previews_free): Adapt to new canvas.
+
 2009-09-10  Andreas J. Guelzow <aguelzow pyrshep ca>
 
 	* frequency.glade: fix dialog title
diff --git a/src/dialogs/dialog-autoformat.c b/src/dialogs/dialog-autoformat.c
index 93488fa..e0e3f24 100644
--- a/src/dialogs/dialog-autoformat.c
+++ b/src/dialogs/dialog-autoformat.c
@@ -273,13 +273,15 @@ previews_free (AutoFormatState *state)
 	if (state->previews_locked)
 		return;
 
-	if (state->selrect)
-		gtk_object_destroy (GTK_OBJECT (state->selrect));
-	state->selrect = NULL;
+	if (state->selrect) {
+		goc_group_remove_child (state->selrect->parent, state->selrect);
+		state->selrect = NULL;
+	}
 
 	for (i = 0; i < NUM_PREVIEWS; i++) {
-		if (state->grid[i]) {
-			gtk_object_destroy (GTK_OBJECT (state->grid[i]));
+		GocItem *item = state->grid[i];
+		if (item) {
+			goc_group_remove_child (item->parent, item);
 			state->grid[i] = NULL;
 		}
 	}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]