summaryrefslogtreecommitdiff
path: root/libnautilus-extensions/nautilus-undo-signal-handlers.h
diff options
context:
space:
mode:
authorGene Ragan <gzr@src.gnome.org>2000-06-12 20:29:32 +0000
committerGene Ragan <gzr@src.gnome.org>2000-06-12 20:29:32 +0000
commit822c600faefc1d8f1e38c846178683a266ff1556 (patch)
tree6cbd881a196964002e32e6151151c121cb72ff61 /libnautilus-extensions/nautilus-undo-signal-handlers.h
parent820f06eb6d24d77955b866d4dfef97950eff3c19 (diff)
downloadnautilus-822c600faefc1d8f1e38c846178683a266ff1556.tar.gz
New file and functions to handle undo in NautilusEntry and GtkEditables.
* libnautilus-extensions/nautilus-undo-signal-handlers.c: * libnautilus-extensions/nautilus-undo-signal-handlers.h: (nautilus_entry_user_changed_callback), (nautilus_undo_setup_nautilus_entry_for_undo), (nautilus_undo_teardown_nautilus_entry_for_undo), (free_editable_undo_data), (free_editable_object_data), (editable_insert_text_callback), (editable_delete_text_callback), (editable_register_edit_undo), (nautilus_undo_setup_editable_for_undo), (nautilus_undo_teardown_editable_for_undo), (restore_editable_from_undo_snapshot_callback), (editable_key_press_event), (nautilus_undo_editable_set_undo_key): New file and functions to handle undo in NautilusEntry and GtkEditables. This file is intended to contain signal handlers that enable undo for a variety of GTK widgets. Calling a setup_for_undo function will prepare the widget to handle undo functionality. * libnautilus-extensions/Makefile.am: Added entries for new files nautilus-undo-signal-handlers.c and nautilus-undo-signal-handlers.h * components/notes/nautilus-notes.c: (make_notes_view): Fixed bug #973. Add undo to notes component. * components/websearch/ntl-web-search.c: (make_obj): Changed to use new undo signal handlers. * libnautilus-extensions/nautilus-entry.c: (nautilus_entry_initialize), (nautilus_entry_key_press), (nautilus_entry_set_text), (nautilus_entry_delete_text): Removed old undo code that had been rendered obsolete by the new signal handlers mentioned above. * src/nautilus-bookmarks-window.c: (create_bookmarks_window): Changed to use new undo signal handlers. ----------------------------------
Diffstat (limited to 'libnautilus-extensions/nautilus-undo-signal-handlers.h')
-rw-r--r--libnautilus-extensions/nautilus-undo-signal-handlers.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/libnautilus-extensions/nautilus-undo-signal-handlers.h b/libnautilus-extensions/nautilus-undo-signal-handlers.h
new file mode 100644
index 000000000..e00ceb05a
--- /dev/null
+++ b/libnautilus-extensions/nautilus-undo-signal-handlers.h
@@ -0,0 +1,37 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+
+/* Signal handlers to enable undo in Gtk Widgets.
+ *
+ * Copyright (C) 2000 Eazel, Inc.
+ *
+ * Author: Gene Z. Ragan <gzr@eazel.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef NAUTILUS_UNDO_SIGNAL_HANDLERS_H
+#define NAUTILUS_UNDO_SIGNAL_HANDLERS_H
+
+#include <libnautilus-extensions/nautilus-entry.h>
+
+void nautilus_undo_setup_nautilus_entry_for_undo (NautilusEntry *entry);
+void nautilus_undo_teardown_nautilus_entry_for_undo (NautilusEntry *entry);
+void nautilus_undo_setup_editable_for_undo (GtkEditable *editable);
+void nautilus_undo_teardown_editable_for_undo (GtkEditable *editable);
+void nautilus_undo_editable_set_undo_key (GtkEditable *editable,
+ gboolean value);
+
+#endif /* NAUTILUS_UNDO_SIGNAL_HANDLERS_H */ \ No newline at end of file