Skip to content
  • Darin Adler's avatar
    Added a controller object that lets GnomeIconContainer · c8853690
    Darin Adler authored
    	ask questions and perform actions, even though only the
    	FMDirectoryViewIcons knows how to answer the questions
    	and perform the actions.
    
    	Replaced use of nautilus_file_get_info with specific
    	accessors for various file info.
    
    	* libnautilus/Makefile.am:
    	libnautilus/nautilus-icons-controller.h:
    	libnautilus/nautilus-icons-controller.c:
    	libnautilus/gnome-icon-container-private.h:
    	libnautilus/gnome-icon-container.h:
    	libnautilus/gnome-icon-container.c:
    	(icon_new_pixbuf):
    	(gnome_icon_container_new):
    	(gnome_icon_container_add):
    	(gnome_icon_container_add_auto):
    	Added NautilusIconsController, an interface provided so that the
    	file manager can connect the icons up with the file code. This is
    	all so we can keep the view/controller separation. This eliminates
    	the need to pass around the icon name all the time, so the signals
    	have changed to not take the icon name as a parameter.
    
    	* src/file-manager/Makefile.am:
    	src/file-manager/fm-icons-controller.c:
    	src/file-manager/fm-icons-controller.h:
    	Added FMIconsController, the actual controller used by the file
    	manager instance of GnomeIconContainer.
    	src/file-manager/fm-directory-view-icons.c:
    	(create_icon_container):
    	(add_icon_if_already_positioned):
    	(add_icon_at_free_position):
    	(icon_container_activate_cb):
    	(fm_directory_view_icons_icon_moved_cb):
    	Create and use the FMIconController.
    
    	* libnautilus/gnome-icon-container-private.h:
    	libnautilus/gnome-icon-container-dnd.c:
    	(set_gnome_icon_list_selection):
    	(set_uri_list_selection):
    	libnautilus/gnome-icon-container.c:
    	(gnome_icon_container_set_base_uri):
    	src/file-manager/fm-directory-view-icons.c:
    	(set_up_base_uri):
    	(fm_directory_view_icons_begin_loading):
    	Get rid of the old base_uri technique for handling drags. Instead
    	the icon controller supplies URIs for icons when requested.
    
    	* RENAMING: Proposed that we use NautilusIconsView as the new name
    	for GnomeIconContainer instead of NautilusIconContainer.
    
    	* libnautilus/gnome-icon-container-private.h:
    	libnautilus/gnome-icon-container.h:
    	libnautilus/gnome-icon-container.c:
    	(gnome_icon_container_initialize):
    	(handle_icon_enter_notify):
    	(handle_icon_leave_notify):
    	Renamed browser mode to linger selection mode.
    
    	* libnautilus/gnome-icon-container-private.h:
    	libnautilus/gnome-icon-container.h:
    	libnautilus/gnome-icon-container.c:
    	(icon_configure):
    	(icon_position):
    	(change_icon_mode):
    	(gnome_icon_container_initialize):
    	(gnome_icon_container_set_icon_mode):
    	(gnome_icon_container_get_icon_mode):
    	src/file-manager/fm-directory-view-icons.c:
    	(fm_directory_view_icons_initialize):
    	Got rid of icon mode, since we won't be using it.
    
    	* libnautilus/gnome-icon-container-dnd.c:
    	(get_gnome_icon_list_selection):
    	Changed geometry parsing so it will not ignore extra characters
    	after the numeric geometry.
    	(gnome_icon_container_receive_dropped_icons):
    	The code here tried to work when dragging icons between windows,
    	but the implementation was actually only good within the same
    	window, so I modified it to check for that case.
    
    	* libnautilus/gnome-icon-container-dnd.c:
    	(create_selection_shadow):
    	(set_gnome_icon_list_selection):
    	libnautilus/gnome-icon-container.c:
    	(icon_position):
    	Renamed GNOME_ICON_CONTAINER_ICON_XOFFSET to
    	GNOME_ICON_CONTAINER_ICON_X_OFFSET and
    	GNOME_ICON_CONTAINER_ICON_YOFFSET to
    	GNOME_ICON_CONTAINER_ICON_Y_OFFSET. We use an underscore between
    	words in identifiers.
    
    	* libnautilus/gnome-icon-container.c:
    	(destroy):
    	Added code to remove timeouts and idles when the container is
    	destroyed.
    
    	* libnautilus/nautilus-directory.h:
    	libnautilus/nautilus-directory.c:
    	(nautilus_file_get_info):
    	Get rid of the direct call to get GnomeVFSFileInfo. All info is
    	accessed through individual functions.
    	(nautilus_file_get_size):
    	(nautilus_file_get_type):
    	(nautilus_file_get_mime_type):
    	(nautilus_file_is_executable):
    	(nautilus_file_is_symbolic_link):
    	Added new accessor functions as needed.
    	src/file-manager/fm-directory-view.c:
    	(display_selection_info):
    	src/file-manager/fm-icon-cache.c:
    	(fm_icon_cache_get_icon_set_for_file):
    	(fm_icon_cache_get_icon_for_file):
    	Change code to use the accessors instead of get_info.
    
    	* libnautilus/nautilus-gtk-macros.h:
    	(NAUTILUS_ASSIGN_MUST_OVERRIDE_SIGNAL):
    	Changed macro to take a class pointer of the right type instead
    	of taking both a casting macro name and a class pointer.
    	src/file-manager/fm-directory-view.c:
    	(fm_directory_view_initialize_class):
    	Changed existing uses of macro to match.
    
    	* src/file-manager/Makefile.am:
    	src/file-manager/fm-icon-cache.c:
    	src/file-manager/fm-default-file-icon.h:
    	src/file-manager/fm-default-file-icon.c:
    	Moved the default icon into its own file.
    c8853690