summaryrefslogtreecommitdiff
path: root/libnautilus-private/nautilus-undo-manager.c
diff options
context:
space:
mode:
authorGene Z. Ragan <gzr@eazel.com>2000-08-05 19:18:55 +0000
committerGene Ragan <gzr@src.gnome.org>2000-08-05 19:18:55 +0000
commitcb36670cefe21c96ef82f5d8c5ab9160daaf862b (patch)
tree8923e649c2a9c3883759db5f9e59600e7e6ab71f /libnautilus-private/nautilus-undo-manager.c
parent598ae456e3289673300fa4c4109554d7ffd847c0 (diff)
downloadnautilus-cb36670cefe21c96ef82f5d8c5ab9160daaf862b.tar.gz
Fixed a bug where transaction)in_progress was always TRUE. This caused a
2000-08-05 Gene Z. Ragan <gzr@eazel.com> * libnautilus-extensions/nautilus-undo-manager.c: (corba_append), (nautilus_undo_manager_undo): Fixed a bug where transaction)in_progress was always TRUE. This caused a g_warning to always be fired. I guess no one noticed because we aren't exercising the undo code. * libnautilus/nautilus-undo-transaction.c: (remove_transaction_from_object), (nautilus_undo_transaction_add_atom), (nautilus_undo_transaction_add_to_undo_manager), (remove_atoms_cover), (nautilus_undo_transaction_unregister_object): Fixed bug 1984, crash when closing window after an undo operation. This crash is caused by a bogus transaction being left in the target objects transaction list. An assert is thrown because the item in the list is not a transaction. I suspect it is the sad remains of an unrefed transaciton that is still in the list somehow. I made a work arund by checking before freeing, but need Darin's help to figure out the true cause.
Diffstat (limited to 'libnautilus-private/nautilus-undo-manager.c')
-rw-r--r--libnautilus-private/nautilus-undo-manager.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libnautilus-private/nautilus-undo-manager.c b/libnautilus-private/nautilus-undo-manager.c
index 481705b3a..c42182b42 100644
--- a/libnautilus-private/nautilus-undo-manager.c
+++ b/libnautilus-private/nautilus-undo-manager.c
@@ -175,9 +175,9 @@ corba_append (PortableServer_Servant servant,
*/
if (manager->details->undo_in_progress) {
manager->details->num_transactions_during_undo += 1;
- g_return_if_fail (manager->details->num_transactions_during_undo == 1);
+ g_return_if_fail (manager->details->num_transactions_during_undo == 1);
}
-
+
g_return_if_fail (!CORBA_Object_is_nil (transaction, ev));
/* Keep a copy of this transaction (dump the old one). */
@@ -296,7 +296,7 @@ nautilus_undo_manager_undo (NautilusUndoManager *manager)
manager->details->undo_in_progress = TRUE;
manager->details->num_transactions_during_undo = 0;
Nautilus_Undo_Transaction_undo (transaction, &ev);
- manager->details->undo_in_progress = TRUE;
+ manager->details->undo_in_progress = FALSE;
manager->details->new_transaction_is_redo = FALSE;
/* Let go of the transaction. */