nautilus/libnautilus/nautilus-distributed-undo.idl

104 lines
3.2 KiB
Plaintext
Raw Normal View History

CVS: 2000-05-17 Gene Z. Ragan <gzr@eazel.com> CVS: ---------------------------------------------------------------------- First phase of modifying undo code. These changes CVS: Enter Log. Lines beginning with `CVS:' are removed automatically affect the way undo is handled internally to Nautilus and CVS: also defines a new IDL. This is work in progress. CVS: Committing in . CVS: * libnautilus-extensions/nautilus-entry.c: CVS: Modified Files: Modified to use gtk_object_get_data() mechanism to locate undo manager CVS: ChangeLog libnautilus/.cvsignore libnautilus/Makefile.am CVS: libnautilus/nautilus-undo-manager-private.h * libnautilus-extensions/nautilus-icon-container.c: CVS: libnautilus/nautilus-undo-manager.c (nautilus_icon_container_start_renaming_selected_item): CVS: libnautilus/nautilus-undo-manager.h Modified to use gtk_object_get_data() mechanism to locate undo manager CVS: libnautilus/nautilus-undo-transaction.h CVS: libnautilus/nautilus-undoable.c * libnautilus-extensions/nautilus-icon-text-item.c: (iti_event), CVS: libnautilus/nautilus-undoable.h (restore_from_undo_snapshot_callback): CVS: libnautilus/nautilus-view-component.idl Modified to use gtk_object_get_data() mechanism to locate undo manager CVS: libnautilus-extensions/nautilus-entry.c CVS: libnautilus-extensions/nautilus-entry.h * libnautilus/.cvsignore: CVS: libnautilus-extensions/nautilus-icon-container.c Added generated IDL source and header files to ignore CVS: libnautilus-extensions/nautilus-icon-text-item.c CVS: src/nautilus-bookmarks-window.c * libnautilus/Makefile.am: CVS: src/nautilus-bookmarks-window.h src/nautilus-location-bar.c Modified makefile to include new IDL file for undo manager CVS: src/nautilus-location-bar.h src/nautilus-window-menus.c CVS: src/ntl-app.c src/ntl-window-private.h src/ntl-window.c * libnautilus/nautilus-undo-manager.c: CVS: src/ntl-window.h src/file-manager/fm-properties-window.c (impl_Nautilus_Undo_Manager__destroy), CVS: Added Files: (impl_Nautilus_Undo_Manager__create), CVS: libnautilus/nautilus-undo.idl (impl_Nautilus_Undo_Manager__append), CVS: Removed Files: (impl_Nautilus_Undo_Manager__forget), CVS: libnautilus/nautilus-undo-manager-component.idl (nautilus_undo_manager_initialize), CVS: ---------------------------------------------------------------------- (nautilus_undo_manager_initialize_class), (nautilus_undo_manager_begin_transaction), (nautilus_undo_manager_end_transaction), (nautilus_undo_manager_undo), (nautilus_undo_manager_redo), (nautilus_undo_manager_add_transaction), (nautilus_undo_manager_unregister_object), (nautilus_undo_manager_can_undo), (nautilus_undo_manager_can_redo), (get_current_transaction_name), (nautilus_undo_manager_get_current_undo_transaction_name), (nautilus_undo_manager_get_current_redo_transaction_name), (destroy), (nautilus_undo_manager_enable_redo), (nautilus_undo_manager_set_queue_depth), (free_undo_manager_list_data), (prune_undo_manager_list): Changes to support new IDL and new undo manager mechanism. * libnautilus/nautilus-undo.idl: New undo manager IDL file * libnautilus/nautilus-undo-manager-component.idl: Removed old undo manager IDL file * src/file-manager/fm-properties-window.c: (create_basic_page): Modified to use gtk_object_get_data() mechanism to locate undo manager * src/nautilus-bookmarks-window.c: (create_bookmarks_window), (on_text_field_focus_in_event), (on_window_delete_event): Modified to use gtk_object_get_data() mechanism to locate undo manager * src/nautilus-location-bar.c: (nautilus_location_bar_set_location), (nautilus_location_bar_enable_undo): Modified to use gtk_object_get_data() mechanism to locate undo manager * src/nautilus-window-menus.c: (edit_menu_undo_callback), (edit_menu_cut_callback), (bookmarks_menu_edit_bookmarks_callback), (get_bookmarks_window), (nautilus_bookmarks_exiting), (nautilus_window_edit_bookmarks), (nautilus_window_initialize_menus), (update_undo_menu_item): Modified to use gtk_object_get_data() mechanism to locate undo manager * src/ntl-app.c: (impl_Nautilus_Application__get_view_windows), (impl_Nautilus_Application_new_view_window), (impl_Nautilus_Application_supports), (impl_Nautilus_Application_create_object), (impl_Nautilus_Application__create), (nautilus_app_get_type), (nautilus_app_class_init), (nautilus_app_init), (nautilus_app_new), (nautilus_app_destroy), (nautilus_app_startup), (nautilus_app_create_window): Modified to use gtk_object_get_data() mechanism to locate undo manager. Added and modified IDL C stubs to match new IDL interface. * src/ntl-window.c: (nautilus_window_constructed), (nautilus_window_set_arg): Changed order that arguments are set at time of main window create so the app instance variable is valid when the main window is contructed.
2000-05-17 23:54:25 +00:00
/* -*- Mode: IDL; tab-width: 8; indent-tabs-mode: 8; c-basic-offset: 8 -*- */
Change format to make popt "pop" out more. * HACKING: Change format to make popt "pop" out more. * libnautilus-extensions/nautilus-entry.h: * src/file-manager/fm-properties-window.c: (create_basic_page): * src/nautilus-bookmarks-window.c: (on_text_field_focus_in_event), (on_window_delete_event): * src/nautilus-location-bar.c: (nautilus_location_bar_enable_undo): * src/nautilus-location-bar.h: * src/nautilus-window-menus.c: (edit_menu_undo_callback), (bookmarks_menu_add_bookmark_callback), (bookmarks_menu_edit_bookmarks_callback), (get_or_create_bookmarks_window), (nautilus_bookmarks_exiting), (edit_bookmarks), (nautilus_window_initialize_menus), (update_undo_menu_item): * src/ntl-app.c: (nautilus_app_init), (nautilus_app_destroy): * libnautilus-extensions/nautilus-icon-container.c: (nautilus_icon_container_start_renaming_selected_item): * libnautilus-extensions/nautilus-entry.c: (nautilus_entry_key_press), (nautilus_entry_enable_undo): * libnautilus/nautilus-undo-manager.c: (nautilus_undo_manager_begin_transaction), (nautilus_undo_manager_unregister_object), (prune_undo_manager_list), (nautilus_get_undo_manager), (nautilus_attach_undo_manager), (nautilus_share_undo_manager): * libnautilus/nautilus-undo-manager.h: * src/ntl-window-private.h: * src/ntl-window.c: (nautilus_window_constructed), (nautilus_window_real_set_content_view), (nautilus_window_get_undo_manager): * src/ntl-window.h: Got rid of the undo manager parameter for the enable_undo operation. Eliminated code that sets up the undo manager except for the top widgets. We only need it attached to windows and to the top widget in each component. Change callers to get the undo manager in a few simple ways instead of calling gtk_object_get_data directly. Added some calls to attach the undo manager to an arbitrary object. * libnautilus/nautilus-undo.idl: Added comments to the IDL and also added the Undo::Context class. * libnautilus/nautilus-view-component.idl: Removed the dependency on the undo IDL and the undo_manager attribute. * src/nautilus-bookmarks-window.h: * src/nautilus-bookmarks-window.c: (create_bookmarks_window): Changed interface to take object to inherit the undo manager from instead of the undo manager itself. Got rid of unnecesary undo manager setting. (nautilus_bookmarks_window_save_geometry): Also changed interface to use GtkWindow instead of GtkWidget.
2000-05-18 22:31:58 +00:00
/* nautilus-undo.idl - Interface for view components that
* support undo, used internally by the
* undo support classes.
*
* Copyright (C) 2000 Eazel, Inc.
*
* 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.
*/
Tell everyone that we are back on bonobo HEAD. Make sure Nautilus doesn't * README: Tell everyone that we are back on bonobo HEAD. * configure.in: Make sure Nautilus doesn't try to compile with the old bonobo. * components/adapter/nautilus-adapter-embed-strategy.c: (nautilus_adapter_embed_strategy_get): * components/adapter/nautilus-adapter-load-strategy.c: (nautilus_adapter_load_strategy_get): * components/adapter/nautilus-adapter-progressive-load-strategy.c: (nautilus_adapter_progressive_load_strategy_load_location): * components/history/nautilus-history-view.c: (history_view_frame_call_begin): * libnautilus/nautilus-undo.c: (set_up_bonobo_control): * libnautilus/nautilus-view.c: (view_frame_call_begin): * libnautilus/nautilus-zoomable.c: (nautilus_zoomable_ensure_zoomable_frame): Fix all the callers of query_interface in CORBA to call it queryInterface (I used the Bonobo script to do it). * src/nautilus-window.h: * src/nautilus-window.c: (nautilus_window_constructed), (nautilus_window_set_arg), (nautilus_window_get_arg), (nautilus_window_set_content_view_widget): Update for BonoboWin -> BonoboWindow change. Once again, the change was done by the Bonobo script (but I had to undo the spaces it ate after BONOBO_WIN). * components/services/install/idl/trilobite-eazel-install.idl: * components/services/time/idl/trilobite-eazel-time-service.idl: * components/services/trilobite/idl/trilobite-service.idl: * components/services/trilobite/sample/idl/sample-service.idl: * libnautilus-adapter/nautilus-adapter-factory.idl: * libnautilus/nautilus-distributed-undo.idl: * libnautilus/nautilus-view-component.idl: Since IDL dependencies don't work, I touched every IDL file to make the switchover smoother. This only works if people update before they try to build and fail, otherwise they need to do: find -name '*.xml' | xargs touch (Maciej and I want to add dependency support to orbit-idl to make this problem go away long term). * src/nautilus-desktop-window.c: (realize): The script updated this comment to, so I let it. * user-guide/C/Makefile.am: Took out the botched change I made to this file. Mathieu did the correct one.
2000-11-04 00:48:52 +00:00
#ifndef NAUTILUS_UNDO_IDL_INCLUDED
#define NAUTILUS_UNDO_IDL_INCLUDED
CVS: 2000-05-17 Gene Z. Ragan <gzr@eazel.com> CVS: ---------------------------------------------------------------------- First phase of modifying undo code. These changes CVS: Enter Log. Lines beginning with `CVS:' are removed automatically affect the way undo is handled internally to Nautilus and CVS: also defines a new IDL. This is work in progress. CVS: Committing in . CVS: * libnautilus-extensions/nautilus-entry.c: CVS: Modified Files: Modified to use gtk_object_get_data() mechanism to locate undo manager CVS: ChangeLog libnautilus/.cvsignore libnautilus/Makefile.am CVS: libnautilus/nautilus-undo-manager-private.h * libnautilus-extensions/nautilus-icon-container.c: CVS: libnautilus/nautilus-undo-manager.c (nautilus_icon_container_start_renaming_selected_item): CVS: libnautilus/nautilus-undo-manager.h Modified to use gtk_object_get_data() mechanism to locate undo manager CVS: libnautilus/nautilus-undo-transaction.h CVS: libnautilus/nautilus-undoable.c * libnautilus-extensions/nautilus-icon-text-item.c: (iti_event), CVS: libnautilus/nautilus-undoable.h (restore_from_undo_snapshot_callback): CVS: libnautilus/nautilus-view-component.idl Modified to use gtk_object_get_data() mechanism to locate undo manager CVS: libnautilus-extensions/nautilus-entry.c CVS: libnautilus-extensions/nautilus-entry.h * libnautilus/.cvsignore: CVS: libnautilus-extensions/nautilus-icon-container.c Added generated IDL source and header files to ignore CVS: libnautilus-extensions/nautilus-icon-text-item.c CVS: src/nautilus-bookmarks-window.c * libnautilus/Makefile.am: CVS: src/nautilus-bookmarks-window.h src/nautilus-location-bar.c Modified makefile to include new IDL file for undo manager CVS: src/nautilus-location-bar.h src/nautilus-window-menus.c CVS: src/ntl-app.c src/ntl-window-private.h src/ntl-window.c * libnautilus/nautilus-undo-manager.c: CVS: src/ntl-window.h src/file-manager/fm-properties-window.c (impl_Nautilus_Undo_Manager__destroy), CVS: Added Files: (impl_Nautilus_Undo_Manager__create), CVS: libnautilus/nautilus-undo.idl (impl_Nautilus_Undo_Manager__append), CVS: Removed Files: (impl_Nautilus_Undo_Manager__forget), CVS: libnautilus/nautilus-undo-manager-component.idl (nautilus_undo_manager_initialize), CVS: ---------------------------------------------------------------------- (nautilus_undo_manager_initialize_class), (nautilus_undo_manager_begin_transaction), (nautilus_undo_manager_end_transaction), (nautilus_undo_manager_undo), (nautilus_undo_manager_redo), (nautilus_undo_manager_add_transaction), (nautilus_undo_manager_unregister_object), (nautilus_undo_manager_can_undo), (nautilus_undo_manager_can_redo), (get_current_transaction_name), (nautilus_undo_manager_get_current_undo_transaction_name), (nautilus_undo_manager_get_current_redo_transaction_name), (destroy), (nautilus_undo_manager_enable_redo), (nautilus_undo_manager_set_queue_depth), (free_undo_manager_list_data), (prune_undo_manager_list): Changes to support new IDL and new undo manager mechanism. * libnautilus/nautilus-undo.idl: New undo manager IDL file * libnautilus/nautilus-undo-manager-component.idl: Removed old undo manager IDL file * src/file-manager/fm-properties-window.c: (create_basic_page): Modified to use gtk_object_get_data() mechanism to locate undo manager * src/nautilus-bookmarks-window.c: (create_bookmarks_window), (on_text_field_focus_in_event), (on_window_delete_event): Modified to use gtk_object_get_data() mechanism to locate undo manager * src/nautilus-location-bar.c: (nautilus_location_bar_set_location), (nautilus_location_bar_enable_undo): Modified to use gtk_object_get_data() mechanism to locate undo manager * src/nautilus-window-menus.c: (edit_menu_undo_callback), (edit_menu_cut_callback), (bookmarks_menu_edit_bookmarks_callback), (get_bookmarks_window), (nautilus_bookmarks_exiting), (nautilus_window_edit_bookmarks), (nautilus_window_initialize_menus), (update_undo_menu_item): Modified to use gtk_object_get_data() mechanism to locate undo manager * src/ntl-app.c: (impl_Nautilus_Application__get_view_windows), (impl_Nautilus_Application_new_view_window), (impl_Nautilus_Application_supports), (impl_Nautilus_Application_create_object), (impl_Nautilus_Application__create), (nautilus_app_get_type), (nautilus_app_class_init), (nautilus_app_init), (nautilus_app_new), (nautilus_app_destroy), (nautilus_app_startup), (nautilus_app_create_window): Modified to use gtk_object_get_data() mechanism to locate undo manager. Added and modified IDL C stubs to match new IDL interface. * src/ntl-window.c: (nautilus_window_constructed), (nautilus_window_set_arg): Changed order that arguments are set at time of main window create so the app instance variable is valid when the main window is contructed.
2000-05-17 23:54:25 +00:00
#include <Bonobo.idl>
module Nautilus {
module Undo {
Change format to make popt "pop" out more. * HACKING: Change format to make popt "pop" out more. * libnautilus-extensions/nautilus-entry.h: * src/file-manager/fm-properties-window.c: (create_basic_page): * src/nautilus-bookmarks-window.c: (on_text_field_focus_in_event), (on_window_delete_event): * src/nautilus-location-bar.c: (nautilus_location_bar_enable_undo): * src/nautilus-location-bar.h: * src/nautilus-window-menus.c: (edit_menu_undo_callback), (bookmarks_menu_add_bookmark_callback), (bookmarks_menu_edit_bookmarks_callback), (get_or_create_bookmarks_window), (nautilus_bookmarks_exiting), (edit_bookmarks), (nautilus_window_initialize_menus), (update_undo_menu_item): * src/ntl-app.c: (nautilus_app_init), (nautilus_app_destroy): * libnautilus-extensions/nautilus-icon-container.c: (nautilus_icon_container_start_renaming_selected_item): * libnautilus-extensions/nautilus-entry.c: (nautilus_entry_key_press), (nautilus_entry_enable_undo): * libnautilus/nautilus-undo-manager.c: (nautilus_undo_manager_begin_transaction), (nautilus_undo_manager_unregister_object), (prune_undo_manager_list), (nautilus_get_undo_manager), (nautilus_attach_undo_manager), (nautilus_share_undo_manager): * libnautilus/nautilus-undo-manager.h: * src/ntl-window-private.h: * src/ntl-window.c: (nautilus_window_constructed), (nautilus_window_real_set_content_view), (nautilus_window_get_undo_manager): * src/ntl-window.h: Got rid of the undo manager parameter for the enable_undo operation. Eliminated code that sets up the undo manager except for the top widgets. We only need it attached to windows and to the top widget in each component. Change callers to get the undo manager in a few simple ways instead of calling gtk_object_get_data directly. Added some calls to attach the undo manager to an arbitrary object. * libnautilus/nautilus-undo.idl: Added comments to the IDL and also added the Undo::Context class. * libnautilus/nautilus-view-component.idl: Removed the dependency on the undo IDL and the undo_manager attribute. * src/nautilus-bookmarks-window.h: * src/nautilus-bookmarks-window.c: (create_bookmarks_window): Changed interface to take object to inherit the undo manager from instead of the undo manager itself. Got rid of unnecesary undo manager setting. (nautilus_bookmarks_window_save_geometry): Also changed interface to use GtkWindow instead of GtkWidget.
2000-05-18 22:31:58 +00:00
/* The specifications for a menu item. */
struct MenuItem {
The main change here is revamping the undo manager. To get a complete check-out you might have to delete the file named libnautilus/nautilus-undo.h that used to be a generated file and is now checked-in. * components/help/help-method.c: (vfs_module_transform): Removed a bogus extraneous FIXME. * libnautilus-extensions/Makefile.am: Moved the undo manager into libnautilus-extensions since it's not needed by Nautilus components. * libnautilus-extensions/nautilus-entry.c: * libnautilus-extensions/nautilus-icon-text-item.c: * libnautilus/nautilus-view.c: * src/nautilus-application.c: * src/nautilus-bookmarks-window.c: (create_bookmarks_window): * src/nautilus-view-frame.c: * src/nautilus-window-private.h: * src/nautilus-window.c: Updated includes and a few small function name changes. * libnautilus-extensions/nautilus-gtk-extensions.h: * libnautilus-extensions/nautilus-gtk-extensions.c: (alive_disconnecter), (nautilus_gtk_signal_connect_full_while_alive): Added a new function that combines the features of gtk_signal_connect_full with gtk_signal_connect_while_alive. * libnautilus/nautilus-undo-context.h: [removed] * libnautilus/nautilus-undo-context.c: [removed] * libnautilus-extensions/nautilus-undo-context.h: * libnautilus-extensions/nautilus-undo-context.c: (impl_Nautilus_Undo_Context__destroy), (impl_Nautilus_Undo_Context__create), (impl_Nautilus_Undo_Context__get_undo_manager), (nautilus_undo_context_new), (destroy), (nautilus_undo_context_initialize_class): Rewrote this class to simplify it (after moving it here). * libnautilus/nautilus-undo-manager.h: [removed] * libnautilus/nautilus-undo-manager.c: [removed] * libnautilus/nautilus-undo-manager-private.h: [removed] * libnautilus-extensions/nautilus-undo-manager.h: * libnautilus-extensions/nautilus-undo-manager.c: (impl_Nautilus_Undo_Manager__destroy), (impl_Nautilus_Undo_Manager__create), (impl_Nautilus_Undo_Manager__append), (impl_Nautilus_Undo_Manager__forget), (nautilus_undo_manager_initialize), (nautilus_undo_manager_initialize_class), (nautilus_undo_manager_undo), (nautilus_undo_manager_add_transaction), (nautilus_undo_manager_forget_transaction), (nautilus_undo_manager_set_queue_depth), (nautilus_undo_manager_attach), (nautilus_undo_manager_add_interface), (update_undo_menu_item), (undo_menu_handler_connection_free), (undo_menu_handler_connection_free_cover), (nautilus_undo_manager_set_up_bonobo_ui_handler_undo_item): Rewrote this class to simplify it. Got rid of many old interfaces and added some new ones. * libnautilus/.cvsignore: * libnautilus/Makefile.am: Renamed the old nautilus-undo.idl to nautilus-distributed-undo.idl. The IDL is only about the internal part of the undo framework. Clients use calls that are in nautilus-undo.h. The part that's public needs the prettier name. * libnautilus/nautilus-undo.idl: [removed] * libnautilus/nautilus-distributed-undo.idl: Updated the names of menu-item-related things to better match the standard terminology. * libnautilus/nautilus-undo-private.h: Added this new header for things needed by the undo manager that are in libnautilus. Maybe we can eliminate this later. * libnautilus/nautilus-undo-transaction.h: * libnautilus/nautilus-undo-transaction.c: (impl_Nautilus_Undo_Transaction__destroy), (impl_Nautilus_Undo_Transaction__create), (impl_Nautilus_Undo_Transaction__get_undo_menu_item), (impl_Nautilus_Undo_Transaction__get_redo_menu_item), (impl_Nautilus_Undo_Transaction__get_operation_name), (impl_Nautilus_Undo_Transaction__undo), (nautilus_undo_transaction_new), (nautilus_undo_transaction_initialize), (remove_transaction_from_object), (nautilus_undo_transaction_destroy), (nautilus_undo_transaction_initialize_class), (nautilus_undo_transaction_add_atom), (nautilus_undo_transaction_undo), (nautilus_undo_transaction_add_to_undo_manager), (remove_atoms), (remove_atoms_cover), (nautilus_undo_transaction_unregister_object), (undo_atom_free), (undo_atom_undo_and_free), (undo_atom_free_cover), (undo_atom_undo_and_free_cover), (undo_atom_list_free), (undo_atom_list_undo_and_free): Rewrote and simplified this class and got rid of all uses of NautilusUndoable. * libnautilus/nautilus-undoable.h: [removed] * libnautilus/nautilus-undoable.c: [removed] * libnautilus/nautilus-undo.h: * libnautilus/nautilus-undo.c: (nautilus_undo_register), (nautilus_undo_register_full), (nautilus_undo_unregister), (nautilus_undo), (nautilus_undo_get_undo_manager), (undo_manager_ref), (undo_manager_unref), (undo_manager_unref_cover), (nautilus_undo_attach_undo_manager), (nautilus_undo_share_undo_manager), (set_up_bonobo_control), (nautilus_undo_set_up_bonobo_control): Added this new file with the public interface of the undo code and most of the basic implementation. Most of this was previously in nautilus-undoable.c. * nautilus-widgets/nautilus-preferences.c: (preferences_hash_node_free), (preferences_hash_node_add_callback), (preferences_hash_node_remove_callback), (preferences_hash_node_check_changes_func), (preferences_callback_node_alloc), (preferences_callback_node_free), (preferences_callback_node_free_func), (preferences_callback_node_invoke_func), (preferences_gconf_callback): Fixed a repeated spelling error in this file. * src/nautilus-application.c: (nautilus_app_init): * src/nautilus-view-frame.c: (nautilus_view_frame_load_client): * src/nautilus-window-menus.c: (edit_menu_undo_callback), (nautilus_window_initialize_menus): * src/nautilus-window.c: (nautilus_window_constructed): Changed to use public parts of the undo API instead of the old stuff that used private secret stuff. Many places use nice new convenient calls that do a lot of the work for you.
2000-06-07 02:47:10 +00:00
string label;
string hint;
CVS: 2000-05-17 Gene Z. Ragan <gzr@eazel.com> CVS: ---------------------------------------------------------------------- First phase of modifying undo code. These changes CVS: Enter Log. Lines beginning with `CVS:' are removed automatically affect the way undo is handled internally to Nautilus and CVS: also defines a new IDL. This is work in progress. CVS: Committing in . CVS: * libnautilus-extensions/nautilus-entry.c: CVS: Modified Files: Modified to use gtk_object_get_data() mechanism to locate undo manager CVS: ChangeLog libnautilus/.cvsignore libnautilus/Makefile.am CVS: libnautilus/nautilus-undo-manager-private.h * libnautilus-extensions/nautilus-icon-container.c: CVS: libnautilus/nautilus-undo-manager.c (nautilus_icon_container_start_renaming_selected_item): CVS: libnautilus/nautilus-undo-manager.h Modified to use gtk_object_get_data() mechanism to locate undo manager CVS: libnautilus/nautilus-undo-transaction.h CVS: libnautilus/nautilus-undoable.c * libnautilus-extensions/nautilus-icon-text-item.c: (iti_event), CVS: libnautilus/nautilus-undoable.h (restore_from_undo_snapshot_callback): CVS: libnautilus/nautilus-view-component.idl Modified to use gtk_object_get_data() mechanism to locate undo manager CVS: libnautilus-extensions/nautilus-entry.c CVS: libnautilus-extensions/nautilus-entry.h * libnautilus/.cvsignore: CVS: libnautilus-extensions/nautilus-icon-container.c Added generated IDL source and header files to ignore CVS: libnautilus-extensions/nautilus-icon-text-item.c CVS: src/nautilus-bookmarks-window.c * libnautilus/Makefile.am: CVS: src/nautilus-bookmarks-window.h src/nautilus-location-bar.c Modified makefile to include new IDL file for undo manager CVS: src/nautilus-location-bar.h src/nautilus-window-menus.c CVS: src/ntl-app.c src/ntl-window-private.h src/ntl-window.c * libnautilus/nautilus-undo-manager.c: CVS: src/ntl-window.h src/file-manager/fm-properties-window.c (impl_Nautilus_Undo_Manager__destroy), CVS: Added Files: (impl_Nautilus_Undo_Manager__create), CVS: libnautilus/nautilus-undo.idl (impl_Nautilus_Undo_Manager__append), CVS: Removed Files: (impl_Nautilus_Undo_Manager__forget), CVS: libnautilus/nautilus-undo-manager-component.idl (nautilus_undo_manager_initialize), CVS: ---------------------------------------------------------------------- (nautilus_undo_manager_initialize_class), (nautilus_undo_manager_begin_transaction), (nautilus_undo_manager_end_transaction), (nautilus_undo_manager_undo), (nautilus_undo_manager_redo), (nautilus_undo_manager_add_transaction), (nautilus_undo_manager_unregister_object), (nautilus_undo_manager_can_undo), (nautilus_undo_manager_can_redo), (get_current_transaction_name), (nautilus_undo_manager_get_current_undo_transaction_name), (nautilus_undo_manager_get_current_redo_transaction_name), (destroy), (nautilus_undo_manager_enable_redo), (nautilus_undo_manager_set_queue_depth), (free_undo_manager_list_data), (prune_undo_manager_list): Changes to support new IDL and new undo manager mechanism. * libnautilus/nautilus-undo.idl: New undo manager IDL file * libnautilus/nautilus-undo-manager-component.idl: Removed old undo manager IDL file * src/file-manager/fm-properties-window.c: (create_basic_page): Modified to use gtk_object_get_data() mechanism to locate undo manager * src/nautilus-bookmarks-window.c: (create_bookmarks_window), (on_text_field_focus_in_event), (on_window_delete_event): Modified to use gtk_object_get_data() mechanism to locate undo manager * src/nautilus-location-bar.c: (nautilus_location_bar_set_location), (nautilus_location_bar_enable_undo): Modified to use gtk_object_get_data() mechanism to locate undo manager * src/nautilus-window-menus.c: (edit_menu_undo_callback), (edit_menu_cut_callback), (bookmarks_menu_edit_bookmarks_callback), (get_bookmarks_window), (nautilus_bookmarks_exiting), (nautilus_window_edit_bookmarks), (nautilus_window_initialize_menus), (update_undo_menu_item): Modified to use gtk_object_get_data() mechanism to locate undo manager * src/ntl-app.c: (impl_Nautilus_Application__get_view_windows), (impl_Nautilus_Application_new_view_window), (impl_Nautilus_Application_supports), (impl_Nautilus_Application_create_object), (impl_Nautilus_Application__create), (nautilus_app_get_type), (nautilus_app_class_init), (nautilus_app_init), (nautilus_app_new), (nautilus_app_destroy), (nautilus_app_startup), (nautilus_app_create_window): Modified to use gtk_object_get_data() mechanism to locate undo manager. Added and modified IDL C stubs to match new IDL interface. * src/ntl-window.c: (nautilus_window_constructed), (nautilus_window_set_arg): Changed order that arguments are set at time of main window create so the app instance variable is valid when the main window is contructed.
2000-05-17 23:54:25 +00:00
};
Change format to make popt "pop" out more. * HACKING: Change format to make popt "pop" out more. * libnautilus-extensions/nautilus-entry.h: * src/file-manager/fm-properties-window.c: (create_basic_page): * src/nautilus-bookmarks-window.c: (on_text_field_focus_in_event), (on_window_delete_event): * src/nautilus-location-bar.c: (nautilus_location_bar_enable_undo): * src/nautilus-location-bar.h: * src/nautilus-window-menus.c: (edit_menu_undo_callback), (bookmarks_menu_add_bookmark_callback), (bookmarks_menu_edit_bookmarks_callback), (get_or_create_bookmarks_window), (nautilus_bookmarks_exiting), (edit_bookmarks), (nautilus_window_initialize_menus), (update_undo_menu_item): * src/ntl-app.c: (nautilus_app_init), (nautilus_app_destroy): * libnautilus-extensions/nautilus-icon-container.c: (nautilus_icon_container_start_renaming_selected_item): * libnautilus-extensions/nautilus-entry.c: (nautilus_entry_key_press), (nautilus_entry_enable_undo): * libnautilus/nautilus-undo-manager.c: (nautilus_undo_manager_begin_transaction), (nautilus_undo_manager_unregister_object), (prune_undo_manager_list), (nautilus_get_undo_manager), (nautilus_attach_undo_manager), (nautilus_share_undo_manager): * libnautilus/nautilus-undo-manager.h: * src/ntl-window-private.h: * src/ntl-window.c: (nautilus_window_constructed), (nautilus_window_real_set_content_view), (nautilus_window_get_undo_manager): * src/ntl-window.h: Got rid of the undo manager parameter for the enable_undo operation. Eliminated code that sets up the undo manager except for the top widgets. We only need it attached to windows and to the top widget in each component. Change callers to get the undo manager in a few simple ways instead of calling gtk_object_get_data directly. Added some calls to attach the undo manager to an arbitrary object. * libnautilus/nautilus-undo.idl: Added comments to the IDL and also added the Undo::Context class. * libnautilus/nautilus-view-component.idl: Removed the dependency on the undo IDL and the undo_manager attribute. * src/nautilus-bookmarks-window.h: * src/nautilus-bookmarks-window.c: (create_bookmarks_window): Changed interface to take object to inherit the undo manager from instead of the undo manager itself. Got rid of unnecesary undo manager setting. (nautilus_bookmarks_window_save_geometry): Also changed interface to use GtkWindow instead of GtkWidget.
2000-05-18 22:31:58 +00:00
/* A single undoable operation is represented by a
* transaction. This is the interface a transaction
* must supply for use by an undo manager.
*/
CVS: 2000-05-17 Gene Z. Ragan <gzr@eazel.com> CVS: ---------------------------------------------------------------------- First phase of modifying undo code. These changes CVS: Enter Log. Lines beginning with `CVS:' are removed automatically affect the way undo is handled internally to Nautilus and CVS: also defines a new IDL. This is work in progress. CVS: Committing in . CVS: * libnautilus-extensions/nautilus-entry.c: CVS: Modified Files: Modified to use gtk_object_get_data() mechanism to locate undo manager CVS: ChangeLog libnautilus/.cvsignore libnautilus/Makefile.am CVS: libnautilus/nautilus-undo-manager-private.h * libnautilus-extensions/nautilus-icon-container.c: CVS: libnautilus/nautilus-undo-manager.c (nautilus_icon_container_start_renaming_selected_item): CVS: libnautilus/nautilus-undo-manager.h Modified to use gtk_object_get_data() mechanism to locate undo manager CVS: libnautilus/nautilus-undo-transaction.h CVS: libnautilus/nautilus-undoable.c * libnautilus-extensions/nautilus-icon-text-item.c: (iti_event), CVS: libnautilus/nautilus-undoable.h (restore_from_undo_snapshot_callback): CVS: libnautilus/nautilus-view-component.idl Modified to use gtk_object_get_data() mechanism to locate undo manager CVS: libnautilus-extensions/nautilus-entry.c CVS: libnautilus-extensions/nautilus-entry.h * libnautilus/.cvsignore: CVS: libnautilus-extensions/nautilus-icon-container.c Added generated IDL source and header files to ignore CVS: libnautilus-extensions/nautilus-icon-text-item.c CVS: src/nautilus-bookmarks-window.c * libnautilus/Makefile.am: CVS: src/nautilus-bookmarks-window.h src/nautilus-location-bar.c Modified makefile to include new IDL file for undo manager CVS: src/nautilus-location-bar.h src/nautilus-window-menus.c CVS: src/ntl-app.c src/ntl-window-private.h src/ntl-window.c * libnautilus/nautilus-undo-manager.c: CVS: src/ntl-window.h src/file-manager/fm-properties-window.c (impl_Nautilus_Undo_Manager__destroy), CVS: Added Files: (impl_Nautilus_Undo_Manager__create), CVS: libnautilus/nautilus-undo.idl (impl_Nautilus_Undo_Manager__append), CVS: Removed Files: (impl_Nautilus_Undo_Manager__forget), CVS: libnautilus/nautilus-undo-manager-component.idl (nautilus_undo_manager_initialize), CVS: ---------------------------------------------------------------------- (nautilus_undo_manager_initialize_class), (nautilus_undo_manager_begin_transaction), (nautilus_undo_manager_end_transaction), (nautilus_undo_manager_undo), (nautilus_undo_manager_redo), (nautilus_undo_manager_add_transaction), (nautilus_undo_manager_unregister_object), (nautilus_undo_manager_can_undo), (nautilus_undo_manager_can_redo), (get_current_transaction_name), (nautilus_undo_manager_get_current_undo_transaction_name), (nautilus_undo_manager_get_current_redo_transaction_name), (destroy), (nautilus_undo_manager_enable_redo), (nautilus_undo_manager_set_queue_depth), (free_undo_manager_list_data), (prune_undo_manager_list): Changes to support new IDL and new undo manager mechanism. * libnautilus/nautilus-undo.idl: New undo manager IDL file * libnautilus/nautilus-undo-manager-component.idl: Removed old undo manager IDL file * src/file-manager/fm-properties-window.c: (create_basic_page): Modified to use gtk_object_get_data() mechanism to locate undo manager * src/nautilus-bookmarks-window.c: (create_bookmarks_window), (on_text_field_focus_in_event), (on_window_delete_event): Modified to use gtk_object_get_data() mechanism to locate undo manager * src/nautilus-location-bar.c: (nautilus_location_bar_set_location), (nautilus_location_bar_enable_undo): Modified to use gtk_object_get_data() mechanism to locate undo manager * src/nautilus-window-menus.c: (edit_menu_undo_callback), (edit_menu_cut_callback), (bookmarks_menu_edit_bookmarks_callback), (get_bookmarks_window), (nautilus_bookmarks_exiting), (nautilus_window_edit_bookmarks), (nautilus_window_initialize_menus), (update_undo_menu_item): Modified to use gtk_object_get_data() mechanism to locate undo manager * src/ntl-app.c: (impl_Nautilus_Application__get_view_windows), (impl_Nautilus_Application_new_view_window), (impl_Nautilus_Application_supports), (impl_Nautilus_Application_create_object), (impl_Nautilus_Application__create), (nautilus_app_get_type), (nautilus_app_class_init), (nautilus_app_init), (nautilus_app_new), (nautilus_app_destroy), (nautilus_app_startup), (nautilus_app_create_window): Modified to use gtk_object_get_data() mechanism to locate undo manager. Added and modified IDL C stubs to match new IDL interface. * src/ntl-window.c: (nautilus_window_constructed), (nautilus_window_set_arg): Changed order that arguments are set at time of main window create so the app instance variable is valid when the main window is contructed.
2000-05-17 23:54:25 +00:00
interface Transaction : ::Bonobo::Unknown {
The main change here is revamping the undo manager. To get a complete check-out you might have to delete the file named libnautilus/nautilus-undo.h that used to be a generated file and is now checked-in. * components/help/help-method.c: (vfs_module_transform): Removed a bogus extraneous FIXME. * libnautilus-extensions/Makefile.am: Moved the undo manager into libnautilus-extensions since it's not needed by Nautilus components. * libnautilus-extensions/nautilus-entry.c: * libnautilus-extensions/nautilus-icon-text-item.c: * libnautilus/nautilus-view.c: * src/nautilus-application.c: * src/nautilus-bookmarks-window.c: (create_bookmarks_window): * src/nautilus-view-frame.c: * src/nautilus-window-private.h: * src/nautilus-window.c: Updated includes and a few small function name changes. * libnautilus-extensions/nautilus-gtk-extensions.h: * libnautilus-extensions/nautilus-gtk-extensions.c: (alive_disconnecter), (nautilus_gtk_signal_connect_full_while_alive): Added a new function that combines the features of gtk_signal_connect_full with gtk_signal_connect_while_alive. * libnautilus/nautilus-undo-context.h: [removed] * libnautilus/nautilus-undo-context.c: [removed] * libnautilus-extensions/nautilus-undo-context.h: * libnautilus-extensions/nautilus-undo-context.c: (impl_Nautilus_Undo_Context__destroy), (impl_Nautilus_Undo_Context__create), (impl_Nautilus_Undo_Context__get_undo_manager), (nautilus_undo_context_new), (destroy), (nautilus_undo_context_initialize_class): Rewrote this class to simplify it (after moving it here). * libnautilus/nautilus-undo-manager.h: [removed] * libnautilus/nautilus-undo-manager.c: [removed] * libnautilus/nautilus-undo-manager-private.h: [removed] * libnautilus-extensions/nautilus-undo-manager.h: * libnautilus-extensions/nautilus-undo-manager.c: (impl_Nautilus_Undo_Manager__destroy), (impl_Nautilus_Undo_Manager__create), (impl_Nautilus_Undo_Manager__append), (impl_Nautilus_Undo_Manager__forget), (nautilus_undo_manager_initialize), (nautilus_undo_manager_initialize_class), (nautilus_undo_manager_undo), (nautilus_undo_manager_add_transaction), (nautilus_undo_manager_forget_transaction), (nautilus_undo_manager_set_queue_depth), (nautilus_undo_manager_attach), (nautilus_undo_manager_add_interface), (update_undo_menu_item), (undo_menu_handler_connection_free), (undo_menu_handler_connection_free_cover), (nautilus_undo_manager_set_up_bonobo_ui_handler_undo_item): Rewrote this class to simplify it. Got rid of many old interfaces and added some new ones. * libnautilus/.cvsignore: * libnautilus/Makefile.am: Renamed the old nautilus-undo.idl to nautilus-distributed-undo.idl. The IDL is only about the internal part of the undo framework. Clients use calls that are in nautilus-undo.h. The part that's public needs the prettier name. * libnautilus/nautilus-undo.idl: [removed] * libnautilus/nautilus-distributed-undo.idl: Updated the names of menu-item-related things to better match the standard terminology. * libnautilus/nautilus-undo-private.h: Added this new header for things needed by the undo manager that are in libnautilus. Maybe we can eliminate this later. * libnautilus/nautilus-undo-transaction.h: * libnautilus/nautilus-undo-transaction.c: (impl_Nautilus_Undo_Transaction__destroy), (impl_Nautilus_Undo_Transaction__create), (impl_Nautilus_Undo_Transaction__get_undo_menu_item), (impl_Nautilus_Undo_Transaction__get_redo_menu_item), (impl_Nautilus_Undo_Transaction__get_operation_name), (impl_Nautilus_Undo_Transaction__undo), (nautilus_undo_transaction_new), (nautilus_undo_transaction_initialize), (remove_transaction_from_object), (nautilus_undo_transaction_destroy), (nautilus_undo_transaction_initialize_class), (nautilus_undo_transaction_add_atom), (nautilus_undo_transaction_undo), (nautilus_undo_transaction_add_to_undo_manager), (remove_atoms), (remove_atoms_cover), (nautilus_undo_transaction_unregister_object), (undo_atom_free), (undo_atom_undo_and_free), (undo_atom_free_cover), (undo_atom_undo_and_free_cover), (undo_atom_list_free), (undo_atom_list_undo_and_free): Rewrote and simplified this class and got rid of all uses of NautilusUndoable. * libnautilus/nautilus-undoable.h: [removed] * libnautilus/nautilus-undoable.c: [removed] * libnautilus/nautilus-undo.h: * libnautilus/nautilus-undo.c: (nautilus_undo_register), (nautilus_undo_register_full), (nautilus_undo_unregister), (nautilus_undo), (nautilus_undo_get_undo_manager), (undo_manager_ref), (undo_manager_unref), (undo_manager_unref_cover), (nautilus_undo_attach_undo_manager), (nautilus_undo_share_undo_manager), (set_up_bonobo_control), (nautilus_undo_set_up_bonobo_control): Added this new file with the public interface of the undo code and most of the basic implementation. Most of this was previously in nautilus-undoable.c. * nautilus-widgets/nautilus-preferences.c: (preferences_hash_node_free), (preferences_hash_node_add_callback), (preferences_hash_node_remove_callback), (preferences_hash_node_check_changes_func), (preferences_callback_node_alloc), (preferences_callback_node_free), (preferences_callback_node_free_func), (preferences_callback_node_invoke_func), (preferences_gconf_callback): Fixed a repeated spelling error in this file. * src/nautilus-application.c: (nautilus_app_init): * src/nautilus-view-frame.c: (nautilus_view_frame_load_client): * src/nautilus-window-menus.c: (edit_menu_undo_callback), (nautilus_window_initialize_menus): * src/nautilus-window.c: (nautilus_window_constructed): Changed to use public parts of the undo API instead of the old stuff that used private secret stuff. Many places use nice new convenient calls that do a lot of the work for you.
2000-06-07 02:47:10 +00:00
/* These menu items are used to display undo
Change format to make popt "pop" out more. * HACKING: Change format to make popt "pop" out more. * libnautilus-extensions/nautilus-entry.h: * src/file-manager/fm-properties-window.c: (create_basic_page): * src/nautilus-bookmarks-window.c: (on_text_field_focus_in_event), (on_window_delete_event): * src/nautilus-location-bar.c: (nautilus_location_bar_enable_undo): * src/nautilus-location-bar.h: * src/nautilus-window-menus.c: (edit_menu_undo_callback), (bookmarks_menu_add_bookmark_callback), (bookmarks_menu_edit_bookmarks_callback), (get_or_create_bookmarks_window), (nautilus_bookmarks_exiting), (edit_bookmarks), (nautilus_window_initialize_menus), (update_undo_menu_item): * src/ntl-app.c: (nautilus_app_init), (nautilus_app_destroy): * libnautilus-extensions/nautilus-icon-container.c: (nautilus_icon_container_start_renaming_selected_item): * libnautilus-extensions/nautilus-entry.c: (nautilus_entry_key_press), (nautilus_entry_enable_undo): * libnautilus/nautilus-undo-manager.c: (nautilus_undo_manager_begin_transaction), (nautilus_undo_manager_unregister_object), (prune_undo_manager_list), (nautilus_get_undo_manager), (nautilus_attach_undo_manager), (nautilus_share_undo_manager): * libnautilus/nautilus-undo-manager.h: * src/ntl-window-private.h: * src/ntl-window.c: (nautilus_window_constructed), (nautilus_window_real_set_content_view), (nautilus_window_get_undo_manager): * src/ntl-window.h: Got rid of the undo manager parameter for the enable_undo operation. Eliminated code that sets up the undo manager except for the top widgets. We only need it attached to windows and to the top widget in each component. Change callers to get the undo manager in a few simple ways instead of calling gtk_object_get_data directly. Added some calls to attach the undo manager to an arbitrary object. * libnautilus/nautilus-undo.idl: Added comments to the IDL and also added the Undo::Context class. * libnautilus/nautilus-view-component.idl: Removed the dependency on the undo IDL and the undo_manager attribute. * src/nautilus-bookmarks-window.h: * src/nautilus-bookmarks-window.c: (create_bookmarks_window): Changed interface to take object to inherit the undo manager from instead of the undo manager itself. Got rid of unnecesary undo manager setting. (nautilus_bookmarks_window_save_geometry): Also changed interface to use GtkWindow instead of GtkWidget.
2000-05-18 22:31:58 +00:00
* or redo menu items for this transaction.
The main change here is revamping the undo manager. To get a complete check-out you might have to delete the file named libnautilus/nautilus-undo.h that used to be a generated file and is now checked-in. * components/help/help-method.c: (vfs_module_transform): Removed a bogus extraneous FIXME. * libnautilus-extensions/Makefile.am: Moved the undo manager into libnautilus-extensions since it's not needed by Nautilus components. * libnautilus-extensions/nautilus-entry.c: * libnautilus-extensions/nautilus-icon-text-item.c: * libnautilus/nautilus-view.c: * src/nautilus-application.c: * src/nautilus-bookmarks-window.c: (create_bookmarks_window): * src/nautilus-view-frame.c: * src/nautilus-window-private.h: * src/nautilus-window.c: Updated includes and a few small function name changes. * libnautilus-extensions/nautilus-gtk-extensions.h: * libnautilus-extensions/nautilus-gtk-extensions.c: (alive_disconnecter), (nautilus_gtk_signal_connect_full_while_alive): Added a new function that combines the features of gtk_signal_connect_full with gtk_signal_connect_while_alive. * libnautilus/nautilus-undo-context.h: [removed] * libnautilus/nautilus-undo-context.c: [removed] * libnautilus-extensions/nautilus-undo-context.h: * libnautilus-extensions/nautilus-undo-context.c: (impl_Nautilus_Undo_Context__destroy), (impl_Nautilus_Undo_Context__create), (impl_Nautilus_Undo_Context__get_undo_manager), (nautilus_undo_context_new), (destroy), (nautilus_undo_context_initialize_class): Rewrote this class to simplify it (after moving it here). * libnautilus/nautilus-undo-manager.h: [removed] * libnautilus/nautilus-undo-manager.c: [removed] * libnautilus/nautilus-undo-manager-private.h: [removed] * libnautilus-extensions/nautilus-undo-manager.h: * libnautilus-extensions/nautilus-undo-manager.c: (impl_Nautilus_Undo_Manager__destroy), (impl_Nautilus_Undo_Manager__create), (impl_Nautilus_Undo_Manager__append), (impl_Nautilus_Undo_Manager__forget), (nautilus_undo_manager_initialize), (nautilus_undo_manager_initialize_class), (nautilus_undo_manager_undo), (nautilus_undo_manager_add_transaction), (nautilus_undo_manager_forget_transaction), (nautilus_undo_manager_set_queue_depth), (nautilus_undo_manager_attach), (nautilus_undo_manager_add_interface), (update_undo_menu_item), (undo_menu_handler_connection_free), (undo_menu_handler_connection_free_cover), (nautilus_undo_manager_set_up_bonobo_ui_handler_undo_item): Rewrote this class to simplify it. Got rid of many old interfaces and added some new ones. * libnautilus/.cvsignore: * libnautilus/Makefile.am: Renamed the old nautilus-undo.idl to nautilus-distributed-undo.idl. The IDL is only about the internal part of the undo framework. Clients use calls that are in nautilus-undo.h. The part that's public needs the prettier name. * libnautilus/nautilus-undo.idl: [removed] * libnautilus/nautilus-distributed-undo.idl: Updated the names of menu-item-related things to better match the standard terminology. * libnautilus/nautilus-undo-private.h: Added this new header for things needed by the undo manager that are in libnautilus. Maybe we can eliminate this later. * libnautilus/nautilus-undo-transaction.h: * libnautilus/nautilus-undo-transaction.c: (impl_Nautilus_Undo_Transaction__destroy), (impl_Nautilus_Undo_Transaction__create), (impl_Nautilus_Undo_Transaction__get_undo_menu_item), (impl_Nautilus_Undo_Transaction__get_redo_menu_item), (impl_Nautilus_Undo_Transaction__get_operation_name), (impl_Nautilus_Undo_Transaction__undo), (nautilus_undo_transaction_new), (nautilus_undo_transaction_initialize), (remove_transaction_from_object), (nautilus_undo_transaction_destroy), (nautilus_undo_transaction_initialize_class), (nautilus_undo_transaction_add_atom), (nautilus_undo_transaction_undo), (nautilus_undo_transaction_add_to_undo_manager), (remove_atoms), (remove_atoms_cover), (nautilus_undo_transaction_unregister_object), (undo_atom_free), (undo_atom_undo_and_free), (undo_atom_free_cover), (undo_atom_undo_and_free_cover), (undo_atom_list_free), (undo_atom_list_undo_and_free): Rewrote and simplified this class and got rid of all uses of NautilusUndoable. * libnautilus/nautilus-undoable.h: [removed] * libnautilus/nautilus-undoable.c: [removed] * libnautilus/nautilus-undo.h: * libnautilus/nautilus-undo.c: (nautilus_undo_register), (nautilus_undo_register_full), (nautilus_undo_unregister), (nautilus_undo), (nautilus_undo_get_undo_manager), (undo_manager_ref), (undo_manager_unref), (undo_manager_unref_cover), (nautilus_undo_attach_undo_manager), (nautilus_undo_share_undo_manager), (set_up_bonobo_control), (nautilus_undo_set_up_bonobo_control): Added this new file with the public interface of the undo code and most of the basic implementation. Most of this was previously in nautilus-undoable.c. * nautilus-widgets/nautilus-preferences.c: (preferences_hash_node_free), (preferences_hash_node_add_callback), (preferences_hash_node_remove_callback), (preferences_hash_node_check_changes_func), (preferences_callback_node_alloc), (preferences_callback_node_free), (preferences_callback_node_free_func), (preferences_callback_node_invoke_func), (preferences_gconf_callback): Fixed a repeated spelling error in this file. * src/nautilus-application.c: (nautilus_app_init): * src/nautilus-view-frame.c: (nautilus_view_frame_load_client): * src/nautilus-window-menus.c: (edit_menu_undo_callback), (nautilus_window_initialize_menus): * src/nautilus-window.c: (nautilus_window_constructed): Changed to use public parts of the undo API instead of the old stuff that used private secret stuff. Many places use nice new convenient calls that do a lot of the work for you.
2000-06-07 02:47:10 +00:00
* The operation name is for lists of undoable
Change format to make popt "pop" out more. * HACKING: Change format to make popt "pop" out more. * libnautilus-extensions/nautilus-entry.h: * src/file-manager/fm-properties-window.c: (create_basic_page): * src/nautilus-bookmarks-window.c: (on_text_field_focus_in_event), (on_window_delete_event): * src/nautilus-location-bar.c: (nautilus_location_bar_enable_undo): * src/nautilus-location-bar.h: * src/nautilus-window-menus.c: (edit_menu_undo_callback), (bookmarks_menu_add_bookmark_callback), (bookmarks_menu_edit_bookmarks_callback), (get_or_create_bookmarks_window), (nautilus_bookmarks_exiting), (edit_bookmarks), (nautilus_window_initialize_menus), (update_undo_menu_item): * src/ntl-app.c: (nautilus_app_init), (nautilus_app_destroy): * libnautilus-extensions/nautilus-icon-container.c: (nautilus_icon_container_start_renaming_selected_item): * libnautilus-extensions/nautilus-entry.c: (nautilus_entry_key_press), (nautilus_entry_enable_undo): * libnautilus/nautilus-undo-manager.c: (nautilus_undo_manager_begin_transaction), (nautilus_undo_manager_unregister_object), (prune_undo_manager_list), (nautilus_get_undo_manager), (nautilus_attach_undo_manager), (nautilus_share_undo_manager): * libnautilus/nautilus-undo-manager.h: * src/ntl-window-private.h: * src/ntl-window.c: (nautilus_window_constructed), (nautilus_window_real_set_content_view), (nautilus_window_get_undo_manager): * src/ntl-window.h: Got rid of the undo manager parameter for the enable_undo operation. Eliminated code that sets up the undo manager except for the top widgets. We only need it attached to windows and to the top widget in each component. Change callers to get the undo manager in a few simple ways instead of calling gtk_object_get_data directly. Added some calls to attach the undo manager to an arbitrary object. * libnautilus/nautilus-undo.idl: Added comments to the IDL and also added the Undo::Context class. * libnautilus/nautilus-view-component.idl: Removed the dependency on the undo IDL and the undo_manager attribute. * src/nautilus-bookmarks-window.h: * src/nautilus-bookmarks-window.c: (create_bookmarks_window): Changed interface to take object to inherit the undo manager from instead of the undo manager itself. Got rid of unnecesary undo manager setting. (nautilus_bookmarks_window_save_geometry): Also changed interface to use GtkWindow instead of GtkWidget.
2000-05-18 22:31:58 +00:00
* operations that are listed somewhere other
* than an undo or redo object.
*/
The main change here is revamping the undo manager. To get a complete check-out you might have to delete the file named libnautilus/nautilus-undo.h that used to be a generated file and is now checked-in. * components/help/help-method.c: (vfs_module_transform): Removed a bogus extraneous FIXME. * libnautilus-extensions/Makefile.am: Moved the undo manager into libnautilus-extensions since it's not needed by Nautilus components. * libnautilus-extensions/nautilus-entry.c: * libnautilus-extensions/nautilus-icon-text-item.c: * libnautilus/nautilus-view.c: * src/nautilus-application.c: * src/nautilus-bookmarks-window.c: (create_bookmarks_window): * src/nautilus-view-frame.c: * src/nautilus-window-private.h: * src/nautilus-window.c: Updated includes and a few small function name changes. * libnautilus-extensions/nautilus-gtk-extensions.h: * libnautilus-extensions/nautilus-gtk-extensions.c: (alive_disconnecter), (nautilus_gtk_signal_connect_full_while_alive): Added a new function that combines the features of gtk_signal_connect_full with gtk_signal_connect_while_alive. * libnautilus/nautilus-undo-context.h: [removed] * libnautilus/nautilus-undo-context.c: [removed] * libnautilus-extensions/nautilus-undo-context.h: * libnautilus-extensions/nautilus-undo-context.c: (impl_Nautilus_Undo_Context__destroy), (impl_Nautilus_Undo_Context__create), (impl_Nautilus_Undo_Context__get_undo_manager), (nautilus_undo_context_new), (destroy), (nautilus_undo_context_initialize_class): Rewrote this class to simplify it (after moving it here). * libnautilus/nautilus-undo-manager.h: [removed] * libnautilus/nautilus-undo-manager.c: [removed] * libnautilus/nautilus-undo-manager-private.h: [removed] * libnautilus-extensions/nautilus-undo-manager.h: * libnautilus-extensions/nautilus-undo-manager.c: (impl_Nautilus_Undo_Manager__destroy), (impl_Nautilus_Undo_Manager__create), (impl_Nautilus_Undo_Manager__append), (impl_Nautilus_Undo_Manager__forget), (nautilus_undo_manager_initialize), (nautilus_undo_manager_initialize_class), (nautilus_undo_manager_undo), (nautilus_undo_manager_add_transaction), (nautilus_undo_manager_forget_transaction), (nautilus_undo_manager_set_queue_depth), (nautilus_undo_manager_attach), (nautilus_undo_manager_add_interface), (update_undo_menu_item), (undo_menu_handler_connection_free), (undo_menu_handler_connection_free_cover), (nautilus_undo_manager_set_up_bonobo_ui_handler_undo_item): Rewrote this class to simplify it. Got rid of many old interfaces and added some new ones. * libnautilus/.cvsignore: * libnautilus/Makefile.am: Renamed the old nautilus-undo.idl to nautilus-distributed-undo.idl. The IDL is only about the internal part of the undo framework. Clients use calls that are in nautilus-undo.h. The part that's public needs the prettier name. * libnautilus/nautilus-undo.idl: [removed] * libnautilus/nautilus-distributed-undo.idl: Updated the names of menu-item-related things to better match the standard terminology. * libnautilus/nautilus-undo-private.h: Added this new header for things needed by the undo manager that are in libnautilus. Maybe we can eliminate this later. * libnautilus/nautilus-undo-transaction.h: * libnautilus/nautilus-undo-transaction.c: (impl_Nautilus_Undo_Transaction__destroy), (impl_Nautilus_Undo_Transaction__create), (impl_Nautilus_Undo_Transaction__get_undo_menu_item), (impl_Nautilus_Undo_Transaction__get_redo_menu_item), (impl_Nautilus_Undo_Transaction__get_operation_name), (impl_Nautilus_Undo_Transaction__undo), (nautilus_undo_transaction_new), (nautilus_undo_transaction_initialize), (remove_transaction_from_object), (nautilus_undo_transaction_destroy), (nautilus_undo_transaction_initialize_class), (nautilus_undo_transaction_add_atom), (nautilus_undo_transaction_undo), (nautilus_undo_transaction_add_to_undo_manager), (remove_atoms), (remove_atoms_cover), (nautilus_undo_transaction_unregister_object), (undo_atom_free), (undo_atom_undo_and_free), (undo_atom_free_cover), (undo_atom_undo_and_free_cover), (undo_atom_list_free), (undo_atom_list_undo_and_free): Rewrote and simplified this class and got rid of all uses of NautilusUndoable. * libnautilus/nautilus-undoable.h: [removed] * libnautilus/nautilus-undoable.c: [removed] * libnautilus/nautilus-undo.h: * libnautilus/nautilus-undo.c: (nautilus_undo_register), (nautilus_undo_register_full), (nautilus_undo_unregister), (nautilus_undo), (nautilus_undo_get_undo_manager), (undo_manager_ref), (undo_manager_unref), (undo_manager_unref_cover), (nautilus_undo_attach_undo_manager), (nautilus_undo_share_undo_manager), (set_up_bonobo_control), (nautilus_undo_set_up_bonobo_control): Added this new file with the public interface of the undo code and most of the basic implementation. Most of this was previously in nautilus-undoable.c. * nautilus-widgets/nautilus-preferences.c: (preferences_hash_node_free), (preferences_hash_node_add_callback), (preferences_hash_node_remove_callback), (preferences_hash_node_check_changes_func), (preferences_callback_node_alloc), (preferences_callback_node_free), (preferences_callback_node_free_func), (preferences_callback_node_invoke_func), (preferences_gconf_callback): Fixed a repeated spelling error in this file. * src/nautilus-application.c: (nautilus_app_init): * src/nautilus-view-frame.c: (nautilus_view_frame_load_client): * src/nautilus-window-menus.c: (edit_menu_undo_callback), (nautilus_window_initialize_menus): * src/nautilus-window.c: (nautilus_window_constructed): Changed to use public parts of the undo API instead of the old stuff that used private secret stuff. Many places use nice new convenient calls that do a lot of the work for you.
2000-06-07 02:47:10 +00:00
readonly attribute MenuItem undo_menu_item;
readonly attribute MenuItem redo_menu_item;
readonly attribute string operation_name;
CVS: 2000-05-17 Gene Z. Ragan <gzr@eazel.com> CVS: ---------------------------------------------------------------------- First phase of modifying undo code. These changes CVS: Enter Log. Lines beginning with `CVS:' are removed automatically affect the way undo is handled internally to Nautilus and CVS: also defines a new IDL. This is work in progress. CVS: Committing in . CVS: * libnautilus-extensions/nautilus-entry.c: CVS: Modified Files: Modified to use gtk_object_get_data() mechanism to locate undo manager CVS: ChangeLog libnautilus/.cvsignore libnautilus/Makefile.am CVS: libnautilus/nautilus-undo-manager-private.h * libnautilus-extensions/nautilus-icon-container.c: CVS: libnautilus/nautilus-undo-manager.c (nautilus_icon_container_start_renaming_selected_item): CVS: libnautilus/nautilus-undo-manager.h Modified to use gtk_object_get_data() mechanism to locate undo manager CVS: libnautilus/nautilus-undo-transaction.h CVS: libnautilus/nautilus-undoable.c * libnautilus-extensions/nautilus-icon-text-item.c: (iti_event), CVS: libnautilus/nautilus-undoable.h (restore_from_undo_snapshot_callback): CVS: libnautilus/nautilus-view-component.idl Modified to use gtk_object_get_data() mechanism to locate undo manager CVS: libnautilus-extensions/nautilus-entry.c CVS: libnautilus-extensions/nautilus-entry.h * libnautilus/.cvsignore: CVS: libnautilus-extensions/nautilus-icon-container.c Added generated IDL source and header files to ignore CVS: libnautilus-extensions/nautilus-icon-text-item.c CVS: src/nautilus-bookmarks-window.c * libnautilus/Makefile.am: CVS: src/nautilus-bookmarks-window.h src/nautilus-location-bar.c Modified makefile to include new IDL file for undo manager CVS: src/nautilus-location-bar.h src/nautilus-window-menus.c CVS: src/ntl-app.c src/ntl-window-private.h src/ntl-window.c * libnautilus/nautilus-undo-manager.c: CVS: src/ntl-window.h src/file-manager/fm-properties-window.c (impl_Nautilus_Undo_Manager__destroy), CVS: Added Files: (impl_Nautilus_Undo_Manager__create), CVS: libnautilus/nautilus-undo.idl (impl_Nautilus_Undo_Manager__append), CVS: Removed Files: (impl_Nautilus_Undo_Manager__forget), CVS: libnautilus/nautilus-undo-manager-component.idl (nautilus_undo_manager_initialize), CVS: ---------------------------------------------------------------------- (nautilus_undo_manager_initialize_class), (nautilus_undo_manager_begin_transaction), (nautilus_undo_manager_end_transaction), (nautilus_undo_manager_undo), (nautilus_undo_manager_redo), (nautilus_undo_manager_add_transaction), (nautilus_undo_manager_unregister_object), (nautilus_undo_manager_can_undo), (nautilus_undo_manager_can_redo), (get_current_transaction_name), (nautilus_undo_manager_get_current_undo_transaction_name), (nautilus_undo_manager_get_current_redo_transaction_name), (destroy), (nautilus_undo_manager_enable_redo), (nautilus_undo_manager_set_queue_depth), (free_undo_manager_list_data), (prune_undo_manager_list): Changes to support new IDL and new undo manager mechanism. * libnautilus/nautilus-undo.idl: New undo manager IDL file * libnautilus/nautilus-undo-manager-component.idl: Removed old undo manager IDL file * src/file-manager/fm-properties-window.c: (create_basic_page): Modified to use gtk_object_get_data() mechanism to locate undo manager * src/nautilus-bookmarks-window.c: (create_bookmarks_window), (on_text_field_focus_in_event), (on_window_delete_event): Modified to use gtk_object_get_data() mechanism to locate undo manager * src/nautilus-location-bar.c: (nautilus_location_bar_set_location), (nautilus_location_bar_enable_undo): Modified to use gtk_object_get_data() mechanism to locate undo manager * src/nautilus-window-menus.c: (edit_menu_undo_callback), (edit_menu_cut_callback), (bookmarks_menu_edit_bookmarks_callback), (get_bookmarks_window), (nautilus_bookmarks_exiting), (nautilus_window_edit_bookmarks), (nautilus_window_initialize_menus), (update_undo_menu_item): Modified to use gtk_object_get_data() mechanism to locate undo manager * src/ntl-app.c: (impl_Nautilus_Application__get_view_windows), (impl_Nautilus_Application_new_view_window), (impl_Nautilus_Application_supports), (impl_Nautilus_Application_create_object), (impl_Nautilus_Application__create), (nautilus_app_get_type), (nautilus_app_class_init), (nautilus_app_init), (nautilus_app_new), (nautilus_app_destroy), (nautilus_app_startup), (nautilus_app_create_window): Modified to use gtk_object_get_data() mechanism to locate undo manager. Added and modified IDL C stubs to match new IDL interface. * src/ntl-window.c: (nautilus_window_constructed), (nautilus_window_set_arg): Changed order that arguments are set at time of main window create so the app instance variable is valid when the main window is contructed.
2000-05-17 23:54:25 +00:00
Change format to make popt "pop" out more. * HACKING: Change format to make popt "pop" out more. * libnautilus-extensions/nautilus-entry.h: * src/file-manager/fm-properties-window.c: (create_basic_page): * src/nautilus-bookmarks-window.c: (on_text_field_focus_in_event), (on_window_delete_event): * src/nautilus-location-bar.c: (nautilus_location_bar_enable_undo): * src/nautilus-location-bar.h: * src/nautilus-window-menus.c: (edit_menu_undo_callback), (bookmarks_menu_add_bookmark_callback), (bookmarks_menu_edit_bookmarks_callback), (get_or_create_bookmarks_window), (nautilus_bookmarks_exiting), (edit_bookmarks), (nautilus_window_initialize_menus), (update_undo_menu_item): * src/ntl-app.c: (nautilus_app_init), (nautilus_app_destroy): * libnautilus-extensions/nautilus-icon-container.c: (nautilus_icon_container_start_renaming_selected_item): * libnautilus-extensions/nautilus-entry.c: (nautilus_entry_key_press), (nautilus_entry_enable_undo): * libnautilus/nautilus-undo-manager.c: (nautilus_undo_manager_begin_transaction), (nautilus_undo_manager_unregister_object), (prune_undo_manager_list), (nautilus_get_undo_manager), (nautilus_attach_undo_manager), (nautilus_share_undo_manager): * libnautilus/nautilus-undo-manager.h: * src/ntl-window-private.h: * src/ntl-window.c: (nautilus_window_constructed), (nautilus_window_real_set_content_view), (nautilus_window_get_undo_manager): * src/ntl-window.h: Got rid of the undo manager parameter for the enable_undo operation. Eliminated code that sets up the undo manager except for the top widgets. We only need it attached to windows and to the top widget in each component. Change callers to get the undo manager in a few simple ways instead of calling gtk_object_get_data directly. Added some calls to attach the undo manager to an arbitrary object. * libnautilus/nautilus-undo.idl: Added comments to the IDL and also added the Undo::Context class. * libnautilus/nautilus-view-component.idl: Removed the dependency on the undo IDL and the undo_manager attribute. * src/nautilus-bookmarks-window.h: * src/nautilus-bookmarks-window.c: (create_bookmarks_window): Changed interface to take object to inherit the undo manager from instead of the undo manager itself. Got rid of unnecesary undo manager setting. (nautilus_bookmarks_window_save_geometry): Also changed interface to use GtkWindow instead of GtkWidget.
2000-05-18 22:31:58 +00:00
/* Here's how you actually perform an undo.
* Once it's performed, calling this again is
* safe; it's guaranteed to do nothing.
*/
void undo ();
CVS: 2000-05-17 Gene Z. Ragan <gzr@eazel.com> CVS: ---------------------------------------------------------------------- First phase of modifying undo code. These changes CVS: Enter Log. Lines beginning with `CVS:' are removed automatically affect the way undo is handled internally to Nautilus and CVS: also defines a new IDL. This is work in progress. CVS: Committing in . CVS: * libnautilus-extensions/nautilus-entry.c: CVS: Modified Files: Modified to use gtk_object_get_data() mechanism to locate undo manager CVS: ChangeLog libnautilus/.cvsignore libnautilus/Makefile.am CVS: libnautilus/nautilus-undo-manager-private.h * libnautilus-extensions/nautilus-icon-container.c: CVS: libnautilus/nautilus-undo-manager.c (nautilus_icon_container_start_renaming_selected_item): CVS: libnautilus/nautilus-undo-manager.h Modified to use gtk_object_get_data() mechanism to locate undo manager CVS: libnautilus/nautilus-undo-transaction.h CVS: libnautilus/nautilus-undoable.c * libnautilus-extensions/nautilus-icon-text-item.c: (iti_event), CVS: libnautilus/nautilus-undoable.h (restore_from_undo_snapshot_callback): CVS: libnautilus/nautilus-view-component.idl Modified to use gtk_object_get_data() mechanism to locate undo manager CVS: libnautilus-extensions/nautilus-entry.c CVS: libnautilus-extensions/nautilus-entry.h * libnautilus/.cvsignore: CVS: libnautilus-extensions/nautilus-icon-container.c Added generated IDL source and header files to ignore CVS: libnautilus-extensions/nautilus-icon-text-item.c CVS: src/nautilus-bookmarks-window.c * libnautilus/Makefile.am: CVS: src/nautilus-bookmarks-window.h src/nautilus-location-bar.c Modified makefile to include new IDL file for undo manager CVS: src/nautilus-location-bar.h src/nautilus-window-menus.c CVS: src/ntl-app.c src/ntl-window-private.h src/ntl-window.c * libnautilus/nautilus-undo-manager.c: CVS: src/ntl-window.h src/file-manager/fm-properties-window.c (impl_Nautilus_Undo_Manager__destroy), CVS: Added Files: (impl_Nautilus_Undo_Manager__create), CVS: libnautilus/nautilus-undo.idl (impl_Nautilus_Undo_Manager__append), CVS: Removed Files: (impl_Nautilus_Undo_Manager__forget), CVS: libnautilus/nautilus-undo-manager-component.idl (nautilus_undo_manager_initialize), CVS: ---------------------------------------------------------------------- (nautilus_undo_manager_initialize_class), (nautilus_undo_manager_begin_transaction), (nautilus_undo_manager_end_transaction), (nautilus_undo_manager_undo), (nautilus_undo_manager_redo), (nautilus_undo_manager_add_transaction), (nautilus_undo_manager_unregister_object), (nautilus_undo_manager_can_undo), (nautilus_undo_manager_can_redo), (get_current_transaction_name), (nautilus_undo_manager_get_current_undo_transaction_name), (nautilus_undo_manager_get_current_redo_transaction_name), (destroy), (nautilus_undo_manager_enable_redo), (nautilus_undo_manager_set_queue_depth), (free_undo_manager_list_data), (prune_undo_manager_list): Changes to support new IDL and new undo manager mechanism. * libnautilus/nautilus-undo.idl: New undo manager IDL file * libnautilus/nautilus-undo-manager-component.idl: Removed old undo manager IDL file * src/file-manager/fm-properties-window.c: (create_basic_page): Modified to use gtk_object_get_data() mechanism to locate undo manager * src/nautilus-bookmarks-window.c: (create_bookmarks_window), (on_text_field_focus_in_event), (on_window_delete_event): Modified to use gtk_object_get_data() mechanism to locate undo manager * src/nautilus-location-bar.c: (nautilus_location_bar_set_location), (nautilus_location_bar_enable_undo): Modified to use gtk_object_get_data() mechanism to locate undo manager * src/nautilus-window-menus.c: (edit_menu_undo_callback), (edit_menu_cut_callback), (bookmarks_menu_edit_bookmarks_callback), (get_bookmarks_window), (nautilus_bookmarks_exiting), (nautilus_window_edit_bookmarks), (nautilus_window_initialize_menus), (update_undo_menu_item): Modified to use gtk_object_get_data() mechanism to locate undo manager * src/ntl-app.c: (impl_Nautilus_Application__get_view_windows), (impl_Nautilus_Application_new_view_window), (impl_Nautilus_Application_supports), (impl_Nautilus_Application_create_object), (impl_Nautilus_Application__create), (nautilus_app_get_type), (nautilus_app_class_init), (nautilus_app_init), (nautilus_app_new), (nautilus_app_destroy), (nautilus_app_startup), (nautilus_app_create_window): Modified to use gtk_object_get_data() mechanism to locate undo manager. Added and modified IDL C stubs to match new IDL interface. * src/ntl-window.c: (nautilus_window_constructed), (nautilus_window_set_arg): Changed order that arguments are set at time of main window create so the app instance variable is valid when the main window is contructed.
2000-05-17 23:54:25 +00:00
};
Change format to make popt "pop" out more. * HACKING: Change format to make popt "pop" out more. * libnautilus-extensions/nautilus-entry.h: * src/file-manager/fm-properties-window.c: (create_basic_page): * src/nautilus-bookmarks-window.c: (on_text_field_focus_in_event), (on_window_delete_event): * src/nautilus-location-bar.c: (nautilus_location_bar_enable_undo): * src/nautilus-location-bar.h: * src/nautilus-window-menus.c: (edit_menu_undo_callback), (bookmarks_menu_add_bookmark_callback), (bookmarks_menu_edit_bookmarks_callback), (get_or_create_bookmarks_window), (nautilus_bookmarks_exiting), (edit_bookmarks), (nautilus_window_initialize_menus), (update_undo_menu_item): * src/ntl-app.c: (nautilus_app_init), (nautilus_app_destroy): * libnautilus-extensions/nautilus-icon-container.c: (nautilus_icon_container_start_renaming_selected_item): * libnautilus-extensions/nautilus-entry.c: (nautilus_entry_key_press), (nautilus_entry_enable_undo): * libnautilus/nautilus-undo-manager.c: (nautilus_undo_manager_begin_transaction), (nautilus_undo_manager_unregister_object), (prune_undo_manager_list), (nautilus_get_undo_manager), (nautilus_attach_undo_manager), (nautilus_share_undo_manager): * libnautilus/nautilus-undo-manager.h: * src/ntl-window-private.h: * src/ntl-window.c: (nautilus_window_constructed), (nautilus_window_real_set_content_view), (nautilus_window_get_undo_manager): * src/ntl-window.h: Got rid of the undo manager parameter for the enable_undo operation. Eliminated code that sets up the undo manager except for the top widgets. We only need it attached to windows and to the top widget in each component. Change callers to get the undo manager in a few simple ways instead of calling gtk_object_get_data directly. Added some calls to attach the undo manager to an arbitrary object. * libnautilus/nautilus-undo.idl: Added comments to the IDL and also added the Undo::Context class. * libnautilus/nautilus-view-component.idl: Removed the dependency on the undo IDL and the undo_manager attribute. * src/nautilus-bookmarks-window.h: * src/nautilus-bookmarks-window.c: (create_bookmarks_window): Changed interface to take object to inherit the undo manager from instead of the undo manager itself. Got rid of unnecesary undo manager setting. (nautilus_bookmarks_window_save_geometry): Also changed interface to use GtkWindow instead of GtkWidget.
2000-05-18 22:31:58 +00:00
/* An undo manager deals with a list of transactions
* for a particular application or window. This is the
* interface of the manager from the transaction's
* point of view only.
*/
CVS: 2000-05-17 Gene Z. Ragan <gzr@eazel.com> CVS: ---------------------------------------------------------------------- First phase of modifying undo code. These changes CVS: Enter Log. Lines beginning with `CVS:' are removed automatically affect the way undo is handled internally to Nautilus and CVS: also defines a new IDL. This is work in progress. CVS: Committing in . CVS: * libnautilus-extensions/nautilus-entry.c: CVS: Modified Files: Modified to use gtk_object_get_data() mechanism to locate undo manager CVS: ChangeLog libnautilus/.cvsignore libnautilus/Makefile.am CVS: libnautilus/nautilus-undo-manager-private.h * libnautilus-extensions/nautilus-icon-container.c: CVS: libnautilus/nautilus-undo-manager.c (nautilus_icon_container_start_renaming_selected_item): CVS: libnautilus/nautilus-undo-manager.h Modified to use gtk_object_get_data() mechanism to locate undo manager CVS: libnautilus/nautilus-undo-transaction.h CVS: libnautilus/nautilus-undoable.c * libnautilus-extensions/nautilus-icon-text-item.c: (iti_event), CVS: libnautilus/nautilus-undoable.h (restore_from_undo_snapshot_callback): CVS: libnautilus/nautilus-view-component.idl Modified to use gtk_object_get_data() mechanism to locate undo manager CVS: libnautilus-extensions/nautilus-entry.c CVS: libnautilus-extensions/nautilus-entry.h * libnautilus/.cvsignore: CVS: libnautilus-extensions/nautilus-icon-container.c Added generated IDL source and header files to ignore CVS: libnautilus-extensions/nautilus-icon-text-item.c CVS: src/nautilus-bookmarks-window.c * libnautilus/Makefile.am: CVS: src/nautilus-bookmarks-window.h src/nautilus-location-bar.c Modified makefile to include new IDL file for undo manager CVS: src/nautilus-location-bar.h src/nautilus-window-menus.c CVS: src/ntl-app.c src/ntl-window-private.h src/ntl-window.c * libnautilus/nautilus-undo-manager.c: CVS: src/ntl-window.h src/file-manager/fm-properties-window.c (impl_Nautilus_Undo_Manager__destroy), CVS: Added Files: (impl_Nautilus_Undo_Manager__create), CVS: libnautilus/nautilus-undo.idl (impl_Nautilus_Undo_Manager__append), CVS: Removed Files: (impl_Nautilus_Undo_Manager__forget), CVS: libnautilus/nautilus-undo-manager-component.idl (nautilus_undo_manager_initialize), CVS: ---------------------------------------------------------------------- (nautilus_undo_manager_initialize_class), (nautilus_undo_manager_begin_transaction), (nautilus_undo_manager_end_transaction), (nautilus_undo_manager_undo), (nautilus_undo_manager_redo), (nautilus_undo_manager_add_transaction), (nautilus_undo_manager_unregister_object), (nautilus_undo_manager_can_undo), (nautilus_undo_manager_can_redo), (get_current_transaction_name), (nautilus_undo_manager_get_current_undo_transaction_name), (nautilus_undo_manager_get_current_redo_transaction_name), (destroy), (nautilus_undo_manager_enable_redo), (nautilus_undo_manager_set_queue_depth), (free_undo_manager_list_data), (prune_undo_manager_list): Changes to support new IDL and new undo manager mechanism. * libnautilus/nautilus-undo.idl: New undo manager IDL file * libnautilus/nautilus-undo-manager-component.idl: Removed old undo manager IDL file * src/file-manager/fm-properties-window.c: (create_basic_page): Modified to use gtk_object_get_data() mechanism to locate undo manager * src/nautilus-bookmarks-window.c: (create_bookmarks_window), (on_text_field_focus_in_event), (on_window_delete_event): Modified to use gtk_object_get_data() mechanism to locate undo manager * src/nautilus-location-bar.c: (nautilus_location_bar_set_location), (nautilus_location_bar_enable_undo): Modified to use gtk_object_get_data() mechanism to locate undo manager * src/nautilus-window-menus.c: (edit_menu_undo_callback), (edit_menu_cut_callback), (bookmarks_menu_edit_bookmarks_callback), (get_bookmarks_window), (nautilus_bookmarks_exiting), (nautilus_window_edit_bookmarks), (nautilus_window_initialize_menus), (update_undo_menu_item): Modified to use gtk_object_get_data() mechanism to locate undo manager * src/ntl-app.c: (impl_Nautilus_Application__get_view_windows), (impl_Nautilus_Application_new_view_window), (impl_Nautilus_Application_supports), (impl_Nautilus_Application_create_object), (impl_Nautilus_Application__create), (nautilus_app_get_type), (nautilus_app_class_init), (nautilus_app_init), (nautilus_app_new), (nautilus_app_destroy), (nautilus_app_startup), (nautilus_app_create_window): Modified to use gtk_object_get_data() mechanism to locate undo manager. Added and modified IDL C stubs to match new IDL interface. * src/ntl-window.c: (nautilus_window_constructed), (nautilus_window_set_arg): Changed order that arguments are set at time of main window create so the app instance variable is valid when the main window is contructed.
2000-05-17 23:54:25 +00:00
interface Manager : ::Bonobo::Unknown {
Change format to make popt "pop" out more. * HACKING: Change format to make popt "pop" out more. * libnautilus-extensions/nautilus-entry.h: * src/file-manager/fm-properties-window.c: (create_basic_page): * src/nautilus-bookmarks-window.c: (on_text_field_focus_in_event), (on_window_delete_event): * src/nautilus-location-bar.c: (nautilus_location_bar_enable_undo): * src/nautilus-location-bar.h: * src/nautilus-window-menus.c: (edit_menu_undo_callback), (bookmarks_menu_add_bookmark_callback), (bookmarks_menu_edit_bookmarks_callback), (get_or_create_bookmarks_window), (nautilus_bookmarks_exiting), (edit_bookmarks), (nautilus_window_initialize_menus), (update_undo_menu_item): * src/ntl-app.c: (nautilus_app_init), (nautilus_app_destroy): * libnautilus-extensions/nautilus-icon-container.c: (nautilus_icon_container_start_renaming_selected_item): * libnautilus-extensions/nautilus-entry.c: (nautilus_entry_key_press), (nautilus_entry_enable_undo): * libnautilus/nautilus-undo-manager.c: (nautilus_undo_manager_begin_transaction), (nautilus_undo_manager_unregister_object), (prune_undo_manager_list), (nautilus_get_undo_manager), (nautilus_attach_undo_manager), (nautilus_share_undo_manager): * libnautilus/nautilus-undo-manager.h: * src/ntl-window-private.h: * src/ntl-window.c: (nautilus_window_constructed), (nautilus_window_real_set_content_view), (nautilus_window_get_undo_manager): * src/ntl-window.h: Got rid of the undo manager parameter for the enable_undo operation. Eliminated code that sets up the undo manager except for the top widgets. We only need it attached to windows and to the top widget in each component. Change callers to get the undo manager in a few simple ways instead of calling gtk_object_get_data directly. Added some calls to attach the undo manager to an arbitrary object. * libnautilus/nautilus-undo.idl: Added comments to the IDL and also added the Undo::Context class. * libnautilus/nautilus-view-component.idl: Removed the dependency on the undo IDL and the undo_manager attribute. * src/nautilus-bookmarks-window.h: * src/nautilus-bookmarks-window.c: (create_bookmarks_window): Changed interface to take object to inherit the undo manager from instead of the undo manager itself. Got rid of unnecesary undo manager setting. (nautilus_bookmarks_window_save_geometry): Also changed interface to use GtkWindow instead of GtkWidget.
2000-05-18 22:31:58 +00:00
/* Add a new transaction. This is normally called
* by the code that creates the transaction.
*/
CVS: 2000-05-17 Gene Z. Ragan <gzr@eazel.com> CVS: ---------------------------------------------------------------------- First phase of modifying undo code. These changes CVS: Enter Log. Lines beginning with `CVS:' are removed automatically affect the way undo is handled internally to Nautilus and CVS: also defines a new IDL. This is work in progress. CVS: Committing in . CVS: * libnautilus-extensions/nautilus-entry.c: CVS: Modified Files: Modified to use gtk_object_get_data() mechanism to locate undo manager CVS: ChangeLog libnautilus/.cvsignore libnautilus/Makefile.am CVS: libnautilus/nautilus-undo-manager-private.h * libnautilus-extensions/nautilus-icon-container.c: CVS: libnautilus/nautilus-undo-manager.c (nautilus_icon_container_start_renaming_selected_item): CVS: libnautilus/nautilus-undo-manager.h Modified to use gtk_object_get_data() mechanism to locate undo manager CVS: libnautilus/nautilus-undo-transaction.h CVS: libnautilus/nautilus-undoable.c * libnautilus-extensions/nautilus-icon-text-item.c: (iti_event), CVS: libnautilus/nautilus-undoable.h (restore_from_undo_snapshot_callback): CVS: libnautilus/nautilus-view-component.idl Modified to use gtk_object_get_data() mechanism to locate undo manager CVS: libnautilus-extensions/nautilus-entry.c CVS: libnautilus-extensions/nautilus-entry.h * libnautilus/.cvsignore: CVS: libnautilus-extensions/nautilus-icon-container.c Added generated IDL source and header files to ignore CVS: libnautilus-extensions/nautilus-icon-text-item.c CVS: src/nautilus-bookmarks-window.c * libnautilus/Makefile.am: CVS: src/nautilus-bookmarks-window.h src/nautilus-location-bar.c Modified makefile to include new IDL file for undo manager CVS: src/nautilus-location-bar.h src/nautilus-window-menus.c CVS: src/ntl-app.c src/ntl-window-private.h src/ntl-window.c * libnautilus/nautilus-undo-manager.c: CVS: src/ntl-window.h src/file-manager/fm-properties-window.c (impl_Nautilus_Undo_Manager__destroy), CVS: Added Files: (impl_Nautilus_Undo_Manager__create), CVS: libnautilus/nautilus-undo.idl (impl_Nautilus_Undo_Manager__append), CVS: Removed Files: (impl_Nautilus_Undo_Manager__forget), CVS: libnautilus/nautilus-undo-manager-component.idl (nautilus_undo_manager_initialize), CVS: ---------------------------------------------------------------------- (nautilus_undo_manager_initialize_class), (nautilus_undo_manager_begin_transaction), (nautilus_undo_manager_end_transaction), (nautilus_undo_manager_undo), (nautilus_undo_manager_redo), (nautilus_undo_manager_add_transaction), (nautilus_undo_manager_unregister_object), (nautilus_undo_manager_can_undo), (nautilus_undo_manager_can_redo), (get_current_transaction_name), (nautilus_undo_manager_get_current_undo_transaction_name), (nautilus_undo_manager_get_current_redo_transaction_name), (destroy), (nautilus_undo_manager_enable_redo), (nautilus_undo_manager_set_queue_depth), (free_undo_manager_list_data), (prune_undo_manager_list): Changes to support new IDL and new undo manager mechanism. * libnautilus/nautilus-undo.idl: New undo manager IDL file * libnautilus/nautilus-undo-manager-component.idl: Removed old undo manager IDL file * src/file-manager/fm-properties-window.c: (create_basic_page): Modified to use gtk_object_get_data() mechanism to locate undo manager * src/nautilus-bookmarks-window.c: (create_bookmarks_window), (on_text_field_focus_in_event), (on_window_delete_event): Modified to use gtk_object_get_data() mechanism to locate undo manager * src/nautilus-location-bar.c: (nautilus_location_bar_set_location), (nautilus_location_bar_enable_undo): Modified to use gtk_object_get_data() mechanism to locate undo manager * src/nautilus-window-menus.c: (edit_menu_undo_callback), (edit_menu_cut_callback), (bookmarks_menu_edit_bookmarks_callback), (get_bookmarks_window), (nautilus_bookmarks_exiting), (nautilus_window_edit_bookmarks), (nautilus_window_initialize_menus), (update_undo_menu_item): Modified to use gtk_object_get_data() mechanism to locate undo manager * src/ntl-app.c: (impl_Nautilus_Application__get_view_windows), (impl_Nautilus_Application_new_view_window), (impl_Nautilus_Application_supports), (impl_Nautilus_Application_create_object), (impl_Nautilus_Application__create), (nautilus_app_get_type), (nautilus_app_class_init), (nautilus_app_init), (nautilus_app_new), (nautilus_app_destroy), (nautilus_app_startup), (nautilus_app_create_window): Modified to use gtk_object_get_data() mechanism to locate undo manager. Added and modified IDL C stubs to match new IDL interface. * src/ntl-window.c: (nautilus_window_constructed), (nautilus_window_set_arg): Changed order that arguments are set at time of main window create so the app instance variable is valid when the main window is contructed.
2000-05-17 23:54:25 +00:00
void append (in Transaction transaction);
Change format to make popt "pop" out more. * HACKING: Change format to make popt "pop" out more. * libnautilus-extensions/nautilus-entry.h: * src/file-manager/fm-properties-window.c: (create_basic_page): * src/nautilus-bookmarks-window.c: (on_text_field_focus_in_event), (on_window_delete_event): * src/nautilus-location-bar.c: (nautilus_location_bar_enable_undo): * src/nautilus-location-bar.h: * src/nautilus-window-menus.c: (edit_menu_undo_callback), (bookmarks_menu_add_bookmark_callback), (bookmarks_menu_edit_bookmarks_callback), (get_or_create_bookmarks_window), (nautilus_bookmarks_exiting), (edit_bookmarks), (nautilus_window_initialize_menus), (update_undo_menu_item): * src/ntl-app.c: (nautilus_app_init), (nautilus_app_destroy): * libnautilus-extensions/nautilus-icon-container.c: (nautilus_icon_container_start_renaming_selected_item): * libnautilus-extensions/nautilus-entry.c: (nautilus_entry_key_press), (nautilus_entry_enable_undo): * libnautilus/nautilus-undo-manager.c: (nautilus_undo_manager_begin_transaction), (nautilus_undo_manager_unregister_object), (prune_undo_manager_list), (nautilus_get_undo_manager), (nautilus_attach_undo_manager), (nautilus_share_undo_manager): * libnautilus/nautilus-undo-manager.h: * src/ntl-window-private.h: * src/ntl-window.c: (nautilus_window_constructed), (nautilus_window_real_set_content_view), (nautilus_window_get_undo_manager): * src/ntl-window.h: Got rid of the undo manager parameter for the enable_undo operation. Eliminated code that sets up the undo manager except for the top widgets. We only need it attached to windows and to the top widget in each component. Change callers to get the undo manager in a few simple ways instead of calling gtk_object_get_data directly. Added some calls to attach the undo manager to an arbitrary object. * libnautilus/nautilus-undo.idl: Added comments to the IDL and also added the Undo::Context class. * libnautilus/nautilus-view-component.idl: Removed the dependency on the undo IDL and the undo_manager attribute. * src/nautilus-bookmarks-window.h: * src/nautilus-bookmarks-window.c: (create_bookmarks_window): Changed interface to take object to inherit the undo manager from instead of the undo manager itself. Got rid of unnecesary undo manager setting. (nautilus_bookmarks_window_save_geometry): Also changed interface to use GtkWindow instead of GtkWidget.
2000-05-18 22:31:58 +00:00
/* Forget a transaction. This is typically called
* when the operation that the transaction does
* undo for no longer makes sense.
*/
CVS: 2000-05-17 Gene Z. Ragan <gzr@eazel.com> CVS: ---------------------------------------------------------------------- First phase of modifying undo code. These changes CVS: Enter Log. Lines beginning with `CVS:' are removed automatically affect the way undo is handled internally to Nautilus and CVS: also defines a new IDL. This is work in progress. CVS: Committing in . CVS: * libnautilus-extensions/nautilus-entry.c: CVS: Modified Files: Modified to use gtk_object_get_data() mechanism to locate undo manager CVS: ChangeLog libnautilus/.cvsignore libnautilus/Makefile.am CVS: libnautilus/nautilus-undo-manager-private.h * libnautilus-extensions/nautilus-icon-container.c: CVS: libnautilus/nautilus-undo-manager.c (nautilus_icon_container_start_renaming_selected_item): CVS: libnautilus/nautilus-undo-manager.h Modified to use gtk_object_get_data() mechanism to locate undo manager CVS: libnautilus/nautilus-undo-transaction.h CVS: libnautilus/nautilus-undoable.c * libnautilus-extensions/nautilus-icon-text-item.c: (iti_event), CVS: libnautilus/nautilus-undoable.h (restore_from_undo_snapshot_callback): CVS: libnautilus/nautilus-view-component.idl Modified to use gtk_object_get_data() mechanism to locate undo manager CVS: libnautilus-extensions/nautilus-entry.c CVS: libnautilus-extensions/nautilus-entry.h * libnautilus/.cvsignore: CVS: libnautilus-extensions/nautilus-icon-container.c Added generated IDL source and header files to ignore CVS: libnautilus-extensions/nautilus-icon-text-item.c CVS: src/nautilus-bookmarks-window.c * libnautilus/Makefile.am: CVS: src/nautilus-bookmarks-window.h src/nautilus-location-bar.c Modified makefile to include new IDL file for undo manager CVS: src/nautilus-location-bar.h src/nautilus-window-menus.c CVS: src/ntl-app.c src/ntl-window-private.h src/ntl-window.c * libnautilus/nautilus-undo-manager.c: CVS: src/ntl-window.h src/file-manager/fm-properties-window.c (impl_Nautilus_Undo_Manager__destroy), CVS: Added Files: (impl_Nautilus_Undo_Manager__create), CVS: libnautilus/nautilus-undo.idl (impl_Nautilus_Undo_Manager__append), CVS: Removed Files: (impl_Nautilus_Undo_Manager__forget), CVS: libnautilus/nautilus-undo-manager-component.idl (nautilus_undo_manager_initialize), CVS: ---------------------------------------------------------------------- (nautilus_undo_manager_initialize_class), (nautilus_undo_manager_begin_transaction), (nautilus_undo_manager_end_transaction), (nautilus_undo_manager_undo), (nautilus_undo_manager_redo), (nautilus_undo_manager_add_transaction), (nautilus_undo_manager_unregister_object), (nautilus_undo_manager_can_undo), (nautilus_undo_manager_can_redo), (get_current_transaction_name), (nautilus_undo_manager_get_current_undo_transaction_name), (nautilus_undo_manager_get_current_redo_transaction_name), (destroy), (nautilus_undo_manager_enable_redo), (nautilus_undo_manager_set_queue_depth), (free_undo_manager_list_data), (prune_undo_manager_list): Changes to support new IDL and new undo manager mechanism. * libnautilus/nautilus-undo.idl: New undo manager IDL file * libnautilus/nautilus-undo-manager-component.idl: Removed old undo manager IDL file * src/file-manager/fm-properties-window.c: (create_basic_page): Modified to use gtk_object_get_data() mechanism to locate undo manager * src/nautilus-bookmarks-window.c: (create_bookmarks_window), (on_text_field_focus_in_event), (on_window_delete_event): Modified to use gtk_object_get_data() mechanism to locate undo manager * src/nautilus-location-bar.c: (nautilus_location_bar_set_location), (nautilus_location_bar_enable_undo): Modified to use gtk_object_get_data() mechanism to locate undo manager * src/nautilus-window-menus.c: (edit_menu_undo_callback), (edit_menu_cut_callback), (bookmarks_menu_edit_bookmarks_callback), (get_bookmarks_window), (nautilus_bookmarks_exiting), (nautilus_window_edit_bookmarks), (nautilus_window_initialize_menus), (update_undo_menu_item): Modified to use gtk_object_get_data() mechanism to locate undo manager * src/ntl-app.c: (impl_Nautilus_Application__get_view_windows), (impl_Nautilus_Application_new_view_window), (impl_Nautilus_Application_supports), (impl_Nautilus_Application_create_object), (impl_Nautilus_Application__create), (nautilus_app_get_type), (nautilus_app_class_init), (nautilus_app_init), (nautilus_app_new), (nautilus_app_destroy), (nautilus_app_startup), (nautilus_app_create_window): Modified to use gtk_object_get_data() mechanism to locate undo manager. Added and modified IDL C stubs to match new IDL interface. * src/ntl-window.c: (nautilus_window_constructed), (nautilus_window_set_arg): Changed order that arguments are set at time of main window create so the app instance variable is valid when the main window is contructed.
2000-05-17 23:54:25 +00:00
void forget (in Transaction transaction);
Change format to make popt "pop" out more. * HACKING: Change format to make popt "pop" out more. * libnautilus-extensions/nautilus-entry.h: * src/file-manager/fm-properties-window.c: (create_basic_page): * src/nautilus-bookmarks-window.c: (on_text_field_focus_in_event), (on_window_delete_event): * src/nautilus-location-bar.c: (nautilus_location_bar_enable_undo): * src/nautilus-location-bar.h: * src/nautilus-window-menus.c: (edit_menu_undo_callback), (bookmarks_menu_add_bookmark_callback), (bookmarks_menu_edit_bookmarks_callback), (get_or_create_bookmarks_window), (nautilus_bookmarks_exiting), (edit_bookmarks), (nautilus_window_initialize_menus), (update_undo_menu_item): * src/ntl-app.c: (nautilus_app_init), (nautilus_app_destroy): * libnautilus-extensions/nautilus-icon-container.c: (nautilus_icon_container_start_renaming_selected_item): * libnautilus-extensions/nautilus-entry.c: (nautilus_entry_key_press), (nautilus_entry_enable_undo): * libnautilus/nautilus-undo-manager.c: (nautilus_undo_manager_begin_transaction), (nautilus_undo_manager_unregister_object), (prune_undo_manager_list), (nautilus_get_undo_manager), (nautilus_attach_undo_manager), (nautilus_share_undo_manager): * libnautilus/nautilus-undo-manager.h: * src/ntl-window-private.h: * src/ntl-window.c: (nautilus_window_constructed), (nautilus_window_real_set_content_view), (nautilus_window_get_undo_manager): * src/ntl-window.h: Got rid of the undo manager parameter for the enable_undo operation. Eliminated code that sets up the undo manager except for the top widgets. We only need it attached to windows and to the top widget in each component. Change callers to get the undo manager in a few simple ways instead of calling gtk_object_get_data directly. Added some calls to attach the undo manager to an arbitrary object. * libnautilus/nautilus-undo.idl: Added comments to the IDL and also added the Undo::Context class. * libnautilus/nautilus-view-component.idl: Removed the dependency on the undo IDL and the undo_manager attribute. * src/nautilus-bookmarks-window.h: * src/nautilus-bookmarks-window.c: (create_bookmarks_window): Changed interface to take object to inherit the undo manager from instead of the undo manager itself. Got rid of unnecesary undo manager setting. (nautilus_bookmarks_window_save_geometry): Also changed interface to use GtkWindow instead of GtkWidget.
2000-05-18 22:31:58 +00:00
/* Sometimes an undo has to be "forced" from the
* client side when it recognizes an undo key
* equivalent.
*/
void undo ();
/* FIXME bugzilla.eazel.com 1292:
* We may need additional interface so the
Change format to make popt "pop" out more. * HACKING: Change format to make popt "pop" out more. * libnautilus-extensions/nautilus-entry.h: * src/file-manager/fm-properties-window.c: (create_basic_page): * src/nautilus-bookmarks-window.c: (on_text_field_focus_in_event), (on_window_delete_event): * src/nautilus-location-bar.c: (nautilus_location_bar_enable_undo): * src/nautilus-location-bar.h: * src/nautilus-window-menus.c: (edit_menu_undo_callback), (bookmarks_menu_add_bookmark_callback), (bookmarks_menu_edit_bookmarks_callback), (get_or_create_bookmarks_window), (nautilus_bookmarks_exiting), (edit_bookmarks), (nautilus_window_initialize_menus), (update_undo_menu_item): * src/ntl-app.c: (nautilus_app_init), (nautilus_app_destroy): * libnautilus-extensions/nautilus-icon-container.c: (nautilus_icon_container_start_renaming_selected_item): * libnautilus-extensions/nautilus-entry.c: (nautilus_entry_key_press), (nautilus_entry_enable_undo): * libnautilus/nautilus-undo-manager.c: (nautilus_undo_manager_begin_transaction), (nautilus_undo_manager_unregister_object), (prune_undo_manager_list), (nautilus_get_undo_manager), (nautilus_attach_undo_manager), (nautilus_share_undo_manager): * libnautilus/nautilus-undo-manager.h: * src/ntl-window-private.h: * src/ntl-window.c: (nautilus_window_constructed), (nautilus_window_real_set_content_view), (nautilus_window_get_undo_manager): * src/ntl-window.h: Got rid of the undo manager parameter for the enable_undo operation. Eliminated code that sets up the undo manager except for the top widgets. We only need it attached to windows and to the top widget in each component. Change callers to get the undo manager in a few simple ways instead of calling gtk_object_get_data directly. Added some calls to attach the undo manager to an arbitrary object. * libnautilus/nautilus-undo.idl: Added comments to the IDL and also added the Undo::Context class. * libnautilus/nautilus-view-component.idl: Removed the dependency on the undo IDL and the undo_manager attribute. * src/nautilus-bookmarks-window.h: * src/nautilus-bookmarks-window.c: (create_bookmarks_window): Changed interface to take object to inherit the undo manager from instead of the undo manager itself. Got rid of unnecesary undo manager setting. (nautilus_bookmarks_window_save_geometry): Also changed interface to use GtkWindow instead of GtkWidget.
2000-05-18 22:31:58 +00:00
* client can include an appropriate undo item in
* a contextual menu.
*/
};
/* To locate the appropriate manager, a view component
* can query for this interface on its Bonobo control
* frame. This is done automatically by functions in
* the undo manager.
*/
interface Context : ::Bonobo::Unknown {
readonly attribute Manager undo_manager;
CVS: 2000-05-17 Gene Z. Ragan <gzr@eazel.com> CVS: ---------------------------------------------------------------------- First phase of modifying undo code. These changes CVS: Enter Log. Lines beginning with `CVS:' are removed automatically affect the way undo is handled internally to Nautilus and CVS: also defines a new IDL. This is work in progress. CVS: Committing in . CVS: * libnautilus-extensions/nautilus-entry.c: CVS: Modified Files: Modified to use gtk_object_get_data() mechanism to locate undo manager CVS: ChangeLog libnautilus/.cvsignore libnautilus/Makefile.am CVS: libnautilus/nautilus-undo-manager-private.h * libnautilus-extensions/nautilus-icon-container.c: CVS: libnautilus/nautilus-undo-manager.c (nautilus_icon_container_start_renaming_selected_item): CVS: libnautilus/nautilus-undo-manager.h Modified to use gtk_object_get_data() mechanism to locate undo manager CVS: libnautilus/nautilus-undo-transaction.h CVS: libnautilus/nautilus-undoable.c * libnautilus-extensions/nautilus-icon-text-item.c: (iti_event), CVS: libnautilus/nautilus-undoable.h (restore_from_undo_snapshot_callback): CVS: libnautilus/nautilus-view-component.idl Modified to use gtk_object_get_data() mechanism to locate undo manager CVS: libnautilus-extensions/nautilus-entry.c CVS: libnautilus-extensions/nautilus-entry.h * libnautilus/.cvsignore: CVS: libnautilus-extensions/nautilus-icon-container.c Added generated IDL source and header files to ignore CVS: libnautilus-extensions/nautilus-icon-text-item.c CVS: src/nautilus-bookmarks-window.c * libnautilus/Makefile.am: CVS: src/nautilus-bookmarks-window.h src/nautilus-location-bar.c Modified makefile to include new IDL file for undo manager CVS: src/nautilus-location-bar.h src/nautilus-window-menus.c CVS: src/ntl-app.c src/ntl-window-private.h src/ntl-window.c * libnautilus/nautilus-undo-manager.c: CVS: src/ntl-window.h src/file-manager/fm-properties-window.c (impl_Nautilus_Undo_Manager__destroy), CVS: Added Files: (impl_Nautilus_Undo_Manager__create), CVS: libnautilus/nautilus-undo.idl (impl_Nautilus_Undo_Manager__append), CVS: Removed Files: (impl_Nautilus_Undo_Manager__forget), CVS: libnautilus/nautilus-undo-manager-component.idl (nautilus_undo_manager_initialize), CVS: ---------------------------------------------------------------------- (nautilus_undo_manager_initialize_class), (nautilus_undo_manager_begin_transaction), (nautilus_undo_manager_end_transaction), (nautilus_undo_manager_undo), (nautilus_undo_manager_redo), (nautilus_undo_manager_add_transaction), (nautilus_undo_manager_unregister_object), (nautilus_undo_manager_can_undo), (nautilus_undo_manager_can_redo), (get_current_transaction_name), (nautilus_undo_manager_get_current_undo_transaction_name), (nautilus_undo_manager_get_current_redo_transaction_name), (destroy), (nautilus_undo_manager_enable_redo), (nautilus_undo_manager_set_queue_depth), (free_undo_manager_list_data), (prune_undo_manager_list): Changes to support new IDL and new undo manager mechanism. * libnautilus/nautilus-undo.idl: New undo manager IDL file * libnautilus/nautilus-undo-manager-component.idl: Removed old undo manager IDL file * src/file-manager/fm-properties-window.c: (create_basic_page): Modified to use gtk_object_get_data() mechanism to locate undo manager * src/nautilus-bookmarks-window.c: (create_bookmarks_window), (on_text_field_focus_in_event), (on_window_delete_event): Modified to use gtk_object_get_data() mechanism to locate undo manager * src/nautilus-location-bar.c: (nautilus_location_bar_set_location), (nautilus_location_bar_enable_undo): Modified to use gtk_object_get_data() mechanism to locate undo manager * src/nautilus-window-menus.c: (edit_menu_undo_callback), (edit_menu_cut_callback), (bookmarks_menu_edit_bookmarks_callback), (get_bookmarks_window), (nautilus_bookmarks_exiting), (nautilus_window_edit_bookmarks), (nautilus_window_initialize_menus), (update_undo_menu_item): Modified to use gtk_object_get_data() mechanism to locate undo manager * src/ntl-app.c: (impl_Nautilus_Application__get_view_windows), (impl_Nautilus_Application_new_view_window), (impl_Nautilus_Application_supports), (impl_Nautilus_Application_create_object), (impl_Nautilus_Application__create), (nautilus_app_get_type), (nautilus_app_class_init), (nautilus_app_init), (nautilus_app_new), (nautilus_app_destroy), (nautilus_app_startup), (nautilus_app_create_window): Modified to use gtk_object_get_data() mechanism to locate undo manager. Added and modified IDL C stubs to match new IDL interface. * src/ntl-window.c: (nautilus_window_constructed), (nautilus_window_set_arg): Changed order that arguments are set at time of main window create so the app instance variable is valid when the main window is contructed.
2000-05-17 23:54:25 +00:00
};
};
};
Tell everyone that we are back on bonobo HEAD. Make sure Nautilus doesn't * README: Tell everyone that we are back on bonobo HEAD. * configure.in: Make sure Nautilus doesn't try to compile with the old bonobo. * components/adapter/nautilus-adapter-embed-strategy.c: (nautilus_adapter_embed_strategy_get): * components/adapter/nautilus-adapter-load-strategy.c: (nautilus_adapter_load_strategy_get): * components/adapter/nautilus-adapter-progressive-load-strategy.c: (nautilus_adapter_progressive_load_strategy_load_location): * components/history/nautilus-history-view.c: (history_view_frame_call_begin): * libnautilus/nautilus-undo.c: (set_up_bonobo_control): * libnautilus/nautilus-view.c: (view_frame_call_begin): * libnautilus/nautilus-zoomable.c: (nautilus_zoomable_ensure_zoomable_frame): Fix all the callers of query_interface in CORBA to call it queryInterface (I used the Bonobo script to do it). * src/nautilus-window.h: * src/nautilus-window.c: (nautilus_window_constructed), (nautilus_window_set_arg), (nautilus_window_get_arg), (nautilus_window_set_content_view_widget): Update for BonoboWin -> BonoboWindow change. Once again, the change was done by the Bonobo script (but I had to undo the spaces it ate after BONOBO_WIN). * components/services/install/idl/trilobite-eazel-install.idl: * components/services/time/idl/trilobite-eazel-time-service.idl: * components/services/trilobite/idl/trilobite-service.idl: * components/services/trilobite/sample/idl/sample-service.idl: * libnautilus-adapter/nautilus-adapter-factory.idl: * libnautilus/nautilus-distributed-undo.idl: * libnautilus/nautilus-view-component.idl: Since IDL dependencies don't work, I touched every IDL file to make the switchover smoother. This only works if people update before they try to build and fail, otherwise they need to do: find -name '*.xml' | xargs touch (Maciej and I want to add dependency support to orbit-idl to make this problem go away long term). * src/nautilus-desktop-window.c: (realize): The script updated this comment to, so I let it. * user-guide/C/Makefile.am: Took out the botched change I made to this file. Mathieu did the correct one.
2000-11-04 00:48:52 +00:00
#endif /* NAUTILUS_UNDO_IDL_INCLUDED */