1. 07 Jun, 2000 1 commit
    • Darin Adler's avatar
      The main change here is revamping the undo manager. · 62ae0377
      Darin Adler authored
      	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.
      62ae0377
  2. 23 May, 2000 1 commit
    • Gene Z. Ragan's avatar
      Additonal work on making the undo context CORBA object. · f469d19b
      Gene Z. Ragan authored
      2000-05-23  Gene Z. Ragan  <gzr@eazel.com>
      
      	* libnautilus/nautilus-undo-context.c:
      	* libnautilus/nautilus-undo-context.h:
      	(impl_Nautilus_Undo_Context__get_undo_manager),
      	(nautilus_undo_context_new), (nautilus_undo_context_initialize):
      	Additonal work on making the undo context CORBA object.
      
      	* libnautilus/nautilus-undo-manager.c:
      	* libnautilus/nautilus-undo-manager.h:
      	* libnautilus/nautilus-undo-manager-private.h:
      	(impl_Nautilus_Undo_Manager__undo),
      	(nautilus_undo_manager_initialize),
      	(nautilus_undo_manager_add_transaction),
      	(nautilus_undo_manager_unregister_object),
      	(nautilus_get_undo_manager), (nautilus_attach_undo_manager),
      	Changed APIs to accept and return Nautilus_Undo_Manager CORBA
      	object instead of NautilusUndoManager pointer.
      
      	(nautilus_undo_setup_bonobo_control):
      	Added function stub to be filled later.  This function
      	will attach an undo manager to a bonobo control.
      
      	Removed several functions no longer needed in new design,
      	including nautilus_undo_manager_begin_transaction(),
      	and nautilus_undo_manager_end_transaction().
      
      	* src/nautilus-window-menus.c: (edit_menu_undo_callback),
      	(nautilus_window_initialize_menus), (update_undo_menu_item):
      	Changed to use modified undo API
      
      	* src/ntl-app.c:
      	(nautilus_app_init):
      	Changed to use modified undo API
      
      	* src/ntl-window.c: (nautilus_window_constructed)
      	Changed to use modified undo API
      f469d19b
  3. 19 May, 2000 2 commits
    • Darin Adler's avatar
      File name changes. · f3df1c2b
      Darin Adler authored
      	* components/services/trilobite/sample/command-line/.cvsignore:
      	* components/services/trilobite/sample/service/.cvsignore:
      	File name changes.
      
      	* libnautilus-extensions/nautilus-directory.c:
      	(nautilus_directory_file_monitor_add),
      	(nautilus_self_check_directory):
      	* libnautilus-extensions/nautilus-directory.h:
      	* src/file-manager/fm-directory-view.c: (finish_loading_uri):
      	Added reload interface.
      
      	* libnautilus/nautilus-undoable.c: (nautilus_undo_register),
      	(undo_atom_destroy), (undo_atom_destroy_notify_cover),
      	(undo_atom_destroy_g_func_cover), (save_callback),
      	(restore_callback), (nautilus_undo_register_full),
      	(nautilus_undo_unregister), (nautilus_undo):
      	* libnautilus/nautilus-undoable.h:
      	Implemented new simplified Undo API.
      
      	* libnautilus-extensions/nautilus-entry.c:
      	(nautilus_entry_initialize), (nautilus_entry_destroy),
      	(nautilus_entry_key_press), (nautilus_entry_changed),
      	(register_edit_undo), (update_undo_text),
      	(restore_from_undo_snapshot_callback),
      	(nautilus_entry_enable_undo):
      	* libnautilus-extensions/nautilus-icon-container.c:
      	(hide_rename_widget):
      	* libnautilus-extensions/nautilus-icon-text-item.c: (iti_event),
      	(register_rename_undo), (restore_from_undo_snapshot_callback):
      	* src/nautilus-bookmarks-window.c: (on_window_delete_event):
      	* src/nautilus-location-bar.c: (destroy):
      	Use new simplified Undo API.
      
      	* libnautilus/nautilus-undo-manager.h:
      	Remove UNDO_MANAGER_NAME, which is no longer used.
      
      	* src/file-manager/fm-icon-view.c:
      	(icon_position_changed_callback): Fixed a bad g_free that was
      	cause seg faults when you resized an icon.
      f3df1c2b
    • Gene Z. Ragan's avatar
      More undo framework work. Still incomplete. · 71a5435f
      Gene Z. Ragan authored
      2000-05-19  Gene Z. Ragan  <gzr@eazel.com>
      
      	More undo framework work.  Still incomplete.
      
      	* libnautilus-extensions/nautilus-entry.c:
      	(nautilus_entry_changed):
      	Modified to use new undo manager location API
      
      	* libnautilus-extensions/nautilus-icon-text-item.c:
      	(iti_event),
      	(restore_from_undo_snapshot_callback):
      	Modified to use new undo manager location API
      
      	* libnautilus/nautilus-undo-manager.c:
      	* libnautilus/nautilus-undo-manager.h:
      	(impl_Nautilus_Undo_Manager__create),
      	(impl_Nautilus_Undo_Manager__append),
      	(impl_Nautilus_Undo_Manager__forget),
      	(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),
      	(free_undo_manager_list_data), (prune_undo_manager_list):
      	Modified to use new API and Undo::Manager::Transaction
      
      	* libnautilus/nautilus-undo-transaction.c:
      	* libnautilus/nautilus-undo-transaction.h:
      	(impl_Nautilus_Undo_Transaction__destroy),
      	(impl_Nautilus_Undo_Transaction__create),
      	(impl_Nautilus_Undo_Transaction__get_undo_description),
      	(impl_Nautilus_Undo_Transaction__get_redo_description),
      	(impl_Nautilus_Undo_Transaction__get_base_description),
      	(impl_Nautilus_Undo_Transaction__undo),
      	(nautilus_undo_transaction_new),
      	(nautilus_undo_transaction_initialize),
      	(nautilus_undo_transaction_destroy),
      	(nautilus_undo_transaction_initialize_class),
      	(nautilus_undo_transaction_undo),
      	(nautilus_undo_transaction_contains_object):
      	Added support for new Undo::Manager::Transaction object
      71a5435f
  4. 17 May, 2000 1 commit
    • Gene Z. Ragan's avatar
      CVS: · 19159e79
      Gene Z. Ragan authored
      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.
      19159e79
  5. 11 May, 2000 1 commit
    • Gene Z. Ragan's avatar
      Change makefiles to link against libnautilus. This is so calls to the undo · bc22620f
      Gene Z. Ragan authored
      2000-05-11  Gene Z. Ragan  <gzr@eazel.com>
      
      	* helper-utilities/authenticate/Makefile.am:
      	* nautilus-widgets/Makefile.am:
      	* libnautilus-extensions/Makefile.am:
      	* libnautilus/Makefile.am:
      	Change makefiles to link against libnautilus.  This is so calls
      	to the undo manager code resolve.  There is probably a better way to
      	do this.
      
      	* libnautilus-extensions/nautilus-entry.c:
      	* libnautilus-extensions/nautilus-icon-container.c:
      	* libnautilus-extensions/nautilus-icon-text-item.c:
      	* src/nautilus-bookmarks-window.c:
      	* src/nautilus-location-bar.c:
      	* src/nautilus-window-menus.c:
      	* src/ntl-app.c:
      	Changed to #include <libnautilus-extensions/nautilus-undo-manager.h>
      	to #include <libnautilus/nautilus-undo-manager.h>
      bc22620f
  6. 03 May, 2000 1 commit
    • Gene Z. Ragan's avatar
      libnautilus-extensions/nautilus-entry.c Refined undo support. · 1f47ad6c
      Gene Z. Ragan authored
      2000-05-03  Gene Z. Ragan <gzr@eazel.com>
      
      	* libnautilus-extensions/nautilus-entry.c
      	* libnautilus-extensions/nautilus-entry.h:
      	Refined undo support.
      	(nautilus_entry_enable_undo_key):
      	New function to set internal handling of ctl-z for undo.
      
      	* libnautilus-extensions/nautilus-icon-container.c
      	(hide_rename_widget):
      	Removed deletion of undo transaction.  This is now handled
      	by the owner of the widget.
      
      	* libnautilus-extensions/nautilus-undo-manager.c
      	(nautilus_undo_manager_unregister_object):
      	New function to unregister a GtkObject form the undo manager.
      	Any transaction that contains the object is removed from the
      	undo and redo lists.  This should be called for any object that
      	is no longer available for user interaction.
      
      	* libnautilus-extensions/nautilus-undo-transaction.c
      	(nautilus_undo_transaction_contains_object):
      	Function added to support nautilus_undo_manager_unregister_object()
      	call in the undo manager.  Each NautilusUndoable in a transaction
      	is checked for the object to be removed.
      
      	* src/file-manager/fm-icon-view.c:
      	* src/file-manager/fm-properties-window.c
      	(create_properties_window):
      	Added call to unregister rename widget form undo manager.
      
      	* src/nautilus-bookmarks-window.c
      	Added undo support for entry widgets.
      
      	* src/nautilus-location-bar.c
      	Changed to support modified undo manager APIs.
      1f47ad6c
  7. 02 May, 2000 1 commit
    • Gene Z. Ragan's avatar
      libnautilus-extensions/nautilus-icon-text-item.c · f115ffb6
      Gene Z. Ragan authored
      2000-05-01  Gene Z. Ragan  <gzr@eazel.com>
      
      	* libnautilus-extensions/nautilus-icon-text-item.c
      	* libnautilus-extensions/nautilus-icon-private.h
      	(iti_event),
      	(nautilus_icon_text_item_configure),
      	(nautilus_icon_text_item_start_editing),
      	(save_undo_snapshot_callback),
      	(restore_from_undo_snapshot_callback):
      
      	* libnautilus-extensions/nautilus-undo-manager.c
      	(nautilus_undo_manager_remove_transaction),
      	(nautilus_undo_manager_add_undo_transaction),
      	(nautilus_undo_manager_add_redo_transaction),
      	(prune_undo_manager_list):
      	Fixed bug in above functions where GList was not getting properly updated
      	after an insert or remove operation.
      
      	* src/nautilus-location-bar.c
      	(nautilus_location_bar_initialize_class):
      	Added signal connection to the "changed" signal of the GtkEntry item.
      	(editable_changed_callback):
      	Added undo operation functionality.
      	Original location text is cached in anticipation of an undo operation.
      	(nautilus_location_bar_initialize):
      	Added two new memeber variables, undo_text and undo_registered.  undo_text is
      	a char * that keeps a cache of the location text before editing.
      	undo_registered is a boolean that is set when an undo can be registered.
      	(nautilus_location_bar_set_location):
      	undo_registered is set to FALSE and undo_text is updated.
      	(save_undo_snapshot_callback):
      	Callback called to create undo transaction
      	(restore_from_undo_snapshot_callback):
      	Callback called to restore the location bar text.
      	(destroy):
      	undo_text is freed if it has been allocated.
      f115ffb6
  8. 29 Apr, 2000 1 commit
    • Gene Z. Ragan's avatar
      libnautilus-extensions/nautilus-icon-text-item.c · e33d60fa
      Gene Z. Ragan authored
      2000-04-28  Gene Z. Ragan  <gzr@eazel.com>
      	* libnautilus-extensions/nautilus-icon-text-item.c
      	* libnautilus-extensions/nautilus-icon-text-item.h
      	* libnautilus-extensions/nautilus-undo-manager-private.h
      	Fixed the following FIXME bugs: 684 686 687
      	Hooked up the undo mechanism to work properly with
      	the renaming widget.
      
      	* libnautilus-extensions/nautilus-undo-manager.c
      	* libnautilus-extensions/nautilus-undo-manager.h
      	Add configuration defaults to sets the UndoManager to
      	not use the redo functionality and sets the depth of
      	the undo list to one transaction.
      	(nautilus_undo_manager_enable_redo):
      	Function to toggle on or off the ability to redo undone transactions.
      	(nautilus_undo_manager_set_queue_depth):
      	Function to set the max depth of the undo/redo queues
      	(free_undo_manager_list_data):
      	New utility function to clean up data in undo/redo list
      	(prune_undo_manager_list):
      	New utility function that prunes a set number of items from
      	either the undo or redo list.
      	(nautilus_undo_manager_add_undo_transaction):
      	Manually insert an externally created undo transaction into
      	the undo queue.
      	(nautilus_undo_manager_add_redo_transaction):
      	Manually insert an externally created undo transaction into
      	the redo queue.
      
      	* libnautilus-extensions/nautilus-undo-transaction.c
      	* libnautilus-extensions/nautilus-undo-transaction.h
      	(nautilus_undo_transaction_destroy):
      	Added destructor function for a NautilusUndoTransaction object
      
      	* src/nautilus-window-menus.c
      	(update_undo_menu_item):
      	Fixed bug 755.  Connected to signal sent by undo manager that informs
      	Undo menu item sensitivity to be set.
      e33d60fa
  9. 28 Apr, 2000 1 commit
    • Gene Z. Ragan's avatar
      libnautilus-extensions/nautilus-undoable.c · 3ada85db
      Gene Z. Ragan authored
      2000-04-27  Gene Z. Ragan  <gzr@eazel.com>
      
      	* libnautilus-extensions/nautilus-undoable.c
      	* libnautilus-extensions/nautilus-undoable.h
      	* libnautilus-extensions/nautilus-undo-manager.c
      	* libnautilus-extensions/nautilus-undo-manager.h
      	* libnautilus-extensions/nautilus-undo-transaction.c
      	* libnautilus-extensions/nautilus-undo-transaction.h
      	* libnautilus-extensions/nautilus-undo-manager-private.h
      	Added architecture for undo mechanism.
      	NautilusUndoManager maintains undo and redo queues of NautilusUndoTransactions
      	as well as maintaining various state information pertinant to the user interface.
      	NautilusUndoTransaction contains a transaction name and a list of NautilusUndoables.
      	NautilusUndoable is a object that contains a pointer to an object and a GData object.
      	The GData object contains named data that can be added and retrieved during an undo/
      	redo operation.  The NautilusUndoable also emits signals to the object that enables it
      	to perform the undo and redo operations.  I will write up more complete documents when the
      	code has matured.
      
      	* libnautilus-extensions/nautilus-icon-container.c
      	* libnautilus-extensions/nautilus-icon-container.h
      	* src/file-manager/fm-icon-view.c
      	Removed obsolete undo functions and callbacks.  These were invalidated
      	by the new undo mechanism.
      
      	* src/ntl-main.c
      	Added call to nautilus_undo_manager_initialize_global_manager() in main.
      	This call initializes a Nautilus global undo manager.
      	Also fixed some minor coding style issues.
      
      	* nautilus-window-menus.c
      	edit_menu_undo_callback():
      	Added callback to handle selection of Undo item form edit menu.  Callback
      	checks with Undo Manager for a current undo transaction and asks manager to
      	perform an undo if there is one.
      3ada85db
  10. 27 Apr, 2000 1 commit
    • John Sullivan's avatar
      More FIXME-to-bug work. · 3199885e
      John Sullivan authored
      	* libnautilus/nautilus-view-frame.c,
      	* libnautilus/nautilus-zoomable.c,
      	* libnautilus-extensions/nautilus-icon-text-item.c,
      	* libnautilus-extensions/nautilus-link.c,
      	* libnautilus-extensions/nautilus-mime-type.c:
      
      	Wrote bug reports for all FIXMEs in these files. Down to
      	45 in Nautilus with no bug report.
      3199885e
  11. 22 Apr, 2000 1 commit
    • Gene Z. Ragan's avatar
      libnautilus-extensions/nautilus-icon-canvas-item.c Return value of · aa0ef3fd
      Gene Z. Ragan authored
      2000-04-21  Gene Z. Ragan  <gzr@eazel.com>
      	* libnautilus-extensions/nautilus-icon-canvas-item.c
      	* libnautilus-extensions/nautilus-icon-canvas-item.h
      	(nautilus_icon_canvas_item_get_max_text_width):
      	Return value of MAX_TEXT_WIDTH constant.  Used is positoning the rename
      	text widget.
      
      	* libnautilus-extensions/nautilus-icon-container.c
      	Added signal "icon_text_edit_occurred" called when the text rename widget
      	recieves some sort of edit, such as a keyboard entry.
      	(rename_text_dirty):  Returns boolean indicating edit state of
      	text in rename widget.  Used in undo operation.
      	(text_edited_callback):  Signal callback called when NautilusIconTextItem
      	text is edited.
      	(nautilus_icon_container_start_renaming_selected_item):  Fixed positioning
      	code to address bug #543
      	(nautilus_icon_container_undo_renaming_selected_item):  Added simple undo
      	code.  This needs to be replaced with a global undo system.
      
      	* libnautilus-extensions/nautilus-icon-text-item.c
      	(iti_paint_text):  Fixed drawing of i-beam to address bug #506
      	(iti_event): Added keyboard handling for simple undo
      	(nautilus_icon_text_item_get_margins):  Returns values of MARGIN_X and
      	MARGIN_X constants.  Used when positioning text item in canvas.
      
      	* src/file-manager/fm-directory-view.c
      	Moved menu item title constants to header file.  This is needed so
      	FMIconView can get menu position paths when placing items in the
      	bonobo and contect menus.  Renamed the constants to be specific to
      	FMDirectoryView.
      	(fm_directory_view_get_context_menu_index):  Added function to return
      	index of requested menu item.
      
      	* src/file-manager/fm-icon-view.c
      	(fm_icon_view_icon_text_edit_callback):  Callback that connect to
      	NautilusIconContainer signal.
      	(undo_rename_icon_callback): Added simple undo functionality.
      	(insert_one_context_menu_item): Added function to insert context menu
      	add a specific index.
      	Fixed bug #499, Rename menu in bad place in context menu.
      aa0ef3fd
  12. 19 Apr, 2000 1 commit
    • Gene Z. Ragan's avatar
      *libnautilus-extensions/nautilus-icon-canvas-item.c · da18a3bb
      Gene Z. Ragan authored
      
      2000-04-18  Gene Z. Ragan <gzr@eazel.com>
      
      	*libnautilus-extensions/nautilus-icon-canvas-item.c
      	*libnautilus-extensions/nautilus-icon-canvas-item.h
      	Renamed several public functions to use proper nomenclature.
      	An example would be changing nautilus_icon_canvas_get_editable_text_bounds
      	to nautilus_icon_canvas_item_get_editable_text_bounds.  A few of
      	these misnaming were in my last submission.
      
      	*libnautilus-extensions/nautilus-icon-container.c
      	*libnautilus-extensions/nautilus-icon-container.h
      	Renamed nautilus_icon_container_show_rename_widget to
      	nautilus_icon_container_start_renaming_selected_item
      
      	*libnautilus-extensions/nautilus-icon-text-item.c
      	Fixed the following bugs:
      	487 Trying to rename an icon to empty string should revert to original
      	498 Renaming text field looks silly when empty
      	500 text-editng box too narrow when renaming files with short names
      	508 Icon text appears and disappears incorrectly when zooming
      da18a3bb
  13. 18 Apr, 2000 1 commit
    • Darin Adler's avatar
      Added commands for Auto vs. Manual layout, but the guts behind · 6a3930e9
      Darin Adler authored
      	them is not yet implemented.
      
      	Did some cleanup on the new renaming code.
      
      	* nautilus-glib-extensions.c:
      	* nautilus-glib-extensions.h:
      	Added nautilus_g_list_exactly_one_item and
      	nautilus_g_list_more_than_one_item. These are more-efficient
      	versions of g_list_length (x) == 1 and g_list_length (x) > 1.
      
      	* nautilus-icon-canvas-item.c:
      	(draw_or_measure_label_text): Add a line break between the
      	editable text and the additional text.
      	(nautilus_icon_canvas_get_text_bounds),
      	(nautilus_icon_canvas_get_editable_text_bounds),
      	(nautilus_icon_canvas_get_editable_text),
      	(nautilus_icon_canvas_set_renaming):
      	Replaced g_assert with g_return_if_fail calls, and added the
      	complete set of g_return_if_fail.
      	(nautilus_icon_canvas_set_renaming): Don't update the item
      	unless the renaming state has actually changed.
      
      	* nautilus-icon-canvas-item.h: Fixed formatting.
      
      	* nautilus-icon-container.c:
      	* nautilus-icon-container.h:
      	Added nautilus_icon_container_set_auto_layout and
      	nautilus_icon_container_is_auto_layout. For now they are
      	placeholders that just modify a boolean.
      
      	* nautilus-icon-private.h:
      	Added the auto_layout boolean.
      
      	* nautilus-icon-text-item.c:
      	* nautilus-icon-text-item.h:
      	Just some formatting and other minor cleanup.
      
      	* nautilus-metadata.h:
      	Added NAUTILUS_METADATA_KEY_ICON_VIEW_AUTO_LAYOUT.
      
      	* nautilus-location-bar.c (drag_data_received_cb): Use the new
      	nautilus_g_list_more_than_one_item function.
      
      	* fm-directory-view.c (bonobo_menu_open_cb), (open_cb): Use the
      	new nautilus_g_list_exactly_one_item.
      
      	* fm-icon-text-window.c (attribute_names_string_is_good),
      	(set_preference_string), (synch_menus_with_preference),
      	(preference_changed_callback),
      	(changed_attributes_option_menu_cb): Got rid of the hard-coded
      	first item "name" which is no longer needed.  Also changed to
      	handle bad data in the preferences.
      
      	* fm-icon-view.c (fm_icon_view_initialize_class): Updated since
      	there's no "name" item needed any more.
      	(fm_icon_view_compute_menu_item_info): Merged MENU_PATH_RENAME
      	with MENU_RENAME_TEXT and simplified the logic.
      	(fm_icon_view_append_selection_context_menu_items): Merged
      	MENU_PATH_RENAME with MENU_RENAME_TEXT.
      	(update_layout_menus), (auto_layout_callback),
      	(manual_layout_callback), (fm_icon_view_merge_menus): Added menu
      	items for auto layout and for manual layout.
      	(fm_icon_view_begin_loading): Load setting for auto layout from
      	metadata.
      	(fm_icon_view_get_icon_text_attribute_names): Changed to get rid
      	of the "name" first item from the list of text attributes.
      	(get_icon_editable_text_callback): Simplified since the editable text
      	is always the icon name. Also got rid of copied and pasted code that's
      	no longer needed for this case.
      	(get_icon_additional_text_callback): Got rid of special case for name,
      	since the name is no longer treated as an attribute.
      6a3930e9
  14. 17 Apr, 2000 1 commit
    • Gene Z. Ragan's avatar
      Added functionality to allow files to be renamed in icov view. This · e1827af4
      Gene Z. Ragan authored
      
      
      2000-04-18  Gene Z. Ragan <gzr@eazel.com>
      	Added functionality to allow files to be renamed in icov view.  This feature is
      	available by either context click on the icon or selecting a single file and 			choosing "Rename" form the File menu.
      
      	* libnautilus-extensions/nautilus-icon-text-item.c
      	* libnautilus-extensions/nautilus-icon-text-item.h: New files.
      	This is an editable icon text item used in the renaming feature.
      	It is based on GnomeIconTextItem but modified to fix bugs in the
      	original code and add extended functionality need by nautilus.  If
      	thse changes were rolled into the current GnomeIconTextItem, it would
      	break gmc.
      
      	* libnautilus-extensions/Makefile.am
      	Modified file so that the two new files listed above would properly
      	be included in generated makefiles.
      
      	* libnautilus-extensions/nautilus-icon-canvas-item.c
      	Split text class variable into two variables, editable_text and
      	additonal_text.  editable_text refers to attributes that the user can change
      	via rename in place.  additional_text is any other text that the user cannot
      	edit via the rename in place feature.  Added a boolean flag, is_renaming, to
      	check against during various operations that effect the renaming feature.
      	Removed ARG_TEXT argument ID and replaced with ARG_EDITABLE_TEXT and
      	ARG_ADDITIONAL_TEXT.
      	(nautilus_icon_canvas_item_initialize_class):  Function now check for both
      	ARG_EDITABLE_TEXT and ARG_ADDITIONAL_TEXT.  Removed check for ARG_TEXT.
      	(nautilus_icon_canvas_item_destroy):  Both editable_text and
      	additonal_text are freed.
      	(nautilus_icon_canvas_item_set_arg):  Removed ARG_TEXT and added
      	handling of ARG_EDITABLE_TEXT and ARG_ADDITIONAL_TEXT.
      	(nautilus_icon_canvas_item_get_arg): Removed ARG_TEXT and added
      	handling of ARG_EDITABLE_TEXT and ARG_ADDITIONAL_TEXT.
      	(draw_or_measure_label_text):  Modified function to not draw the label
      	icon text if we are renaming in place.
      	(draw_or_measure_label_text):  Function now combines editable and additional
      	text when performing the measuring operation.
      	(compute_editable_text_rectangle):  Added function to compute bounds of
      	editable text.  This is used to determine size and placement of editable
      	text item when in renaming mode.
      	(nautilus_icon_canvas_get_text_bounds):  Public API to get bounds of
      	icon label text.
      	(nautilus_icon_canvas_get_editable_text_bounds): Public API to get bounds of
      	editable icon label text.
      	(hit_test_pixbuf): Added check against is_renaming flag.
      	(nautilus_icon_canvas_get_editable_text):  Public API to get editable text string.
      	(nautilus_icon_canvas_item_set_renaming):  Public API to toggle is_renaming flag.
      
      	* libnautilus-extensions/nautilus-icon-canvas-item.h
      	Added public API prototypes to functions described above.
      
      	* libnautilus-extensions/nautilus-icon-container.c
      	Added GET_ICON_EDITABLE_TEXT and GET_ICON_ADDITONAL_TEXT signals.
      	Removed GET_ICON_TEXT signal.  Added ICON_TEXT_CHANGED signal.
      	(icon_toggle_selected):  Renaming mode is now exited when a selection/deselection occurs.
      	(key_press_event):  GDK_Return ends rename mode and attempts to accept modification.  GDK_Escpae
      	ends rename mode and reverts modification to original.
      	(nautilus_icon_container_initialize_class):  icon_text_changed, get_icon_editable_text and
      	get_icon_additional_text signals are registered.
      	(editing_started): New function.  Called when an edit begins.  Inits class member variables
      	for edit mode.
      	(editing_stopped): New function.  Called when edit ends.  Cleans up edit mode.
      	(nautilus_icon_container_initialize): rename_widget and original_text private variables
      	are set to NULL.
      	(icon_toggle_selected):  Added call to end_renaming_mode.
      	(nautilus_icon_container_update_icon):  Added emitting of GET_ICON_EDITABLE_TEXT and
      	GET_ICON_ADDITIONAL_TEXT signals.  Updated gnome_canvas_item_set to use new arguments defined
      	in nautilus-icon-text-item.
      	(nautilus_icon_container_show_rename_widget):  New function.  Creates and displays renaming_widget.
      	Creates cached copy of original editable text for later compare, connects signals and enters
      	renaming mode.
      	(end_renaming_mode): New function.  Cleans up and end renaiming mode.
      	(hide_rename_widget):  Called by end_renaming_mode to hide and free renaming_widget.
      
      	* libnautilus-extensions/nautilus-icon-container.h
      	Added prototypes for public functions described above.
      
      	* libnautilus-extensions/nautilus-icon-private.h
      	Added boolean for renaming.  Added a NautilusIconTextItem variable for the renaiming widget.
      
      	* src/file-manager/fm-icon-view.c
      	Added defines MENU_PATH_RENAME. Added a char * to hold original editable text for a later compare.
      	Removed get_icon_text_callback and added get_icon_editable_text_callback and
      	get_icon_additonal_text_callback.  These return the editable and additonal text of the icon view.
      	(rename_icon_callback):  Added callback that attempts to rename the NautilusFile the icon view
      	represents.  Action in not taken if there has been no change to the editable text.  If the operation
      	fails, the user is notified.
      	(fm_icon_view_append_selection_context_menu_items):  Added Rename menu item.
      	(append_bonobo_menu_item):  Added Rename menu item and callback.
      	(update_bonobo_menu_item):  Added senesitivity check for the Rename item.  It is
      	enabled only if a single item is selected.
      	(fm_icon_view_icon_text_changed_callback):  Added function to attempt to change the filename
      	to the new text.  Notify user if operation fails.
      	(get_icon_editable_text_callback): This callback returns the text items that areeditable by
      	the user using the "Rename" command.  In the case of FMIconView, this
      	would be the attribute with the name "name".
      	(get_icon_additional_text_callback): This callback returns the text items that are not
      	editable by the user using the "Rename" command.
      e1827af4