diff options
author | Gene Z. Ragan <gzr@eazel.com> | 2000-08-23 22:05:45 +0000 |
---|---|---|
committer | Gene Ragan <gzr@src.gnome.org> | 2000-08-23 22:05:45 +0000 |
commit | d8f1bc2499bec966815b9ba32f52a9ceb45a1bfa (patch) | |
tree | 4009e8990ae8b8b503ed3b929c1678a6767ee19b /libnautilus-extensions/nautilus-undo-signal-handlers.c | |
parent | 47a9b00d8bc53f6b4e512a198ae32ff59eeceea0 (diff) | |
download | nautilus-d8f1bc2499bec966815b9ba32f52a9ceb45a1bfa.tar.gz |
Fixed bug 2282, Undo menu item initially sensitive, but nothing to undo.
2000-08-23 Gene Z. Ragan <gzr@eazel.com>
Fixed bug 2282, Undo menu item initially sensitive, but
nothing to undo.
* components/notes/nautilus-notes.c: (finish_loading_note),
(notes_load_location), (make_notes_view):
Disconnect the editable object form the undo manager
while location is being changed so an undo transaction
is not registered during inital text loading.
* libnautilus-extensions/nautilus-undo-signal-handlers.c:
(nautilus_undo_teardown_nautilus_entry_for_undo),
(nautilus_undo_setup_editable_for_undo),
(nautilus_undo_teardown_editable_for_undo):
When a teardown function is called, also unregister the
GtkObject from the undo manager in addtion to signal
disconnection.
Diffstat (limited to 'libnautilus-extensions/nautilus-undo-signal-handlers.c')
-rw-r--r-- | libnautilus-extensions/nautilus-undo-signal-handlers.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libnautilus-extensions/nautilus-undo-signal-handlers.c b/libnautilus-extensions/nautilus-undo-signal-handlers.c index 352a556bb..3f4cb3dac 100644 --- a/libnautilus-extensions/nautilus-undo-signal-handlers.c +++ b/libnautilus-extensions/nautilus-undo-signal-handlers.c @@ -97,6 +97,8 @@ nautilus_undo_teardown_nautilus_entry_for_undo (NautilusEntry *entry) gtk_signal_disconnect_by_func (GTK_OBJECT (entry), GTK_SIGNAL_FUNC (nautilus_entry_user_changed_callback), NULL); + + nautilus_undo_unregister (GTK_OBJECT (entry)); } /* nautilus_undo_setup_nautilus_entry_for_undo @@ -201,7 +203,7 @@ nautilus_undo_setup_editable_for_undo (GtkEditable *editable) NULL); - data = g_new(EditableUndoObjectData, 1); + data = g_new (EditableUndoObjectData, 1); data->undo_registered = FALSE; gtk_object_set_data_full (GTK_OBJECT (editable), "undo_registered", data, free_editable_object_data); @@ -223,6 +225,7 @@ nautilus_undo_teardown_editable_for_undo (GtkEditable *editable) GTK_SIGNAL_FUNC (editable_delete_text_callback), NULL); + nautilus_undo_unregister (GTK_OBJECT (editable)); } /* restore_editable_from_undo_snapshot_callback |