1. 10 Feb, 2000 1 commit
    • Darin Adler's avatar
      Reworked the canvas item class used by the icon · 423b5c48
      Darin Adler authored
      	container. Straightened out the use of various coordinate systems
      	and bounds calculations and removed much unused code inherited
      	from the GdkPixbuf canvas item class that Andy cloned our code
      	from. Changed the class so it doesn't scale icons any more -- we
      	leave that to the icon factory so the scaled icons can be cached.
      
      	* libnautilus/gnome-icon-container-dnd.c:
      	* libnautilus/gnome-icon-container-private.h:
      	* libnautilus/gnome-icon-container.c:
      	* libnautilus/nautilus-icons-view-icon-item.c:
      	* libnautilus/nautilus-icons-view-icon-item.h:
      	Made extensive changes to the icon item class, including getting
      	rid of the "x", "y", "width", and "height" attributes, adding a
      	new "font" attribute, changing the "label" attribute name to "text"
      	to be more consistent with other canvas items, simplifying the
      	update logic for now (we can recomplicate it later if need be),
      	changing the pixbuf to have a fixed size in pixels instead of being
      	scaled with the pixels_per_unit and changing the pixbuf when we change
      	zoom levels, and other misc. cleanup.
      	(nautilus_icons_view_icon_item_get_arg):
      	Fixed bug for "label" which would return a non-strdup'd	piece of text.
      	(draw_or_measure_text_box):
      	Fixed bug where width of the selection box would be based on the
      	length of the last line of text, not the widest, and extra GCs would
      	be created for each line of text.
      
      	* libnautilus/nautilus-icons-controller.h:
      	* libnautilus/nautilus-icons-controller.c:
      	(nautilus_icons_controller_get_icon_image):
      	* src/file-manager/fm-icons-controller.c:
      	(fm_icons_controller_get_icon_image):
      	Changed the interface so that the icons controller specifies the icon
      	as a NautilusScalableIcon instead of a GdkPixbuf. This lets the icon
      	container get the appropriate icon for size as it zooms.
      
      	* libnautilus/gdk-extensions.h:
      	* libnautilus/gdk-extensions.c:
      	(nautilus_gdk_font_equal):
      	Added a version of gdk_font_equal that works with NULL for the font.
      	Maybe we need a naming scheme for these NULL-tolerant variations on
      	basic calls.
      
      	* src/ntl-uri-map.c: (nautilus_navinfo_free):
      	* src/ntl-window-msgs.c: (nautilus_window_change_location_2):
      	Fixed a NULL dereference that would happen when @navi was NULL.
      
      	* libnautilus/nautilus-directory.c:
      	(nautilus_directory_try_to_read_metafile):
      	Fixed error handling for case when gnome_vfs_read fails.  Fixed
      	error handling for case where metafile_info.size won't fit into a
      	size_t.  Switched back to g_malloc instead of g_alloca, since the
      	size of a file might be too big for the stack. In the long run, we
      	will feed the file data directly to the XML code, so this is a bit
      	temporary.  Removed the assert that Elliot added to help track
      	down the giant files sizes coming from gnome-vfs; the failure in
      	g_malloc will be easy to debug, unlike the failure in
      	g_alloca. (The assert was added without a ChangeLog entry.)
      423b5c48
  2. 01 Feb, 2000 1 commit
    • Elliot Lee's avatar
      If an error happens, we need to reset the location bar to current · e1231238
      Elliot Lee authored
      
      
      * src/ntl-window-msgs.c: If an error happens, we need to reset the
      location bar to current location, in case the location change
      happened via a drop on the location bar.
      
      * src/file-manager/fm-directory-view.c: Consensus is to use
      individual headers rather than catch-alls.
      
      * libnautilus/gnome-icon-container-dnd.c,
      libnautilus/nautilus-icons-view-icon-item.c,
      libnautilus/nautilus-icon-factory.c: Use bilinear scaling - almost
      as fast, much nicer looking.
      e1231238
  3. 31 Jan, 2000 2 commits
    • Darin Adler's avatar
      Changed it to not attempt to create a GC just to measure the text. This · 58a9b33c
      Darin Adler authored
      	* nautilus-icons-view-icon-item.c:
      	(nautilus_icons_view_draw_text_box):
      	Changed it to not attempt to create a GC just to measure the text.
      	This makes it work when the widget is not realized.
      
      	* nautilus-icons-view-icon-item.h:
      	nautilus-icons-view-icon-item.c:
      	gnome-icon-container-dnd.c:
      	(nautilus_icons_view_icon_item_center_offset):
      	Changed the parameter type to NautilusIconsViewIconItem.
      
      	* fm-directory-view.c:
      	(stop_load):
      	(fm_directory_view_load_uri):
      	Fixed code so that if you stop loading more than once, or
      	stop before you even start, it won't send extra progress
      	requests to the Nautilus shell or call stop_monitoring
      	extra times on the NautilusDirectory object.
      
      	* nautilus-icons-view-icon-item.h:
      	nautilus-icons-view-icon-item.c:
      	gnome-icon-container-dnd.c:
      	Quick cleanup of the new NautilusIconsViewIconItem class.
      
      	* libnautilus/gdk-extensions.c:
      	libnautilus/gnome-icon-container-dnd.c:
      	libnautilus/gnome-icon-container.c:
      	libnautilus/gtkflist.c:
      	libnautilus/nautilus-background-canvas-group.c:
      	libnautilus/nautilus-background.c:
      	libnautilus/nautilus-debug.c:
      	libnautilus/nautilus-default-file-icon.c:
      	libnautilus/nautilus-directory.c:
      	libnautilus/nautilus-icon-factory.c:
      	libnautilus/nautilus-icons-controller.c:
      	libnautilus/nautilus-icons-view-icon-item.c:
      	libnautilus/nautilus-lib-self-check-functions.c:
      	libnautilus/nautilus-self-checks.c:
      	libnautilus/nautilus-string.c:
      	src/explorer-location-bar.c:
      	src/file-manager/dfos-corba.c:
      	src/file-manager/dfos-xfer-progress-dialog.c:
      	src/file-manager/dfos-xfer.c:
      	src/file-manager/dfos.c:
      	src/file-manager/fm-directory-view-icons.c:
      	src/file-manager/fm-directory-view-list.c:
      	src/file-manager/fm-directory-view.c:
      	src/file-manager/fm-icons-controller.c:
      	src/file-manager/fm-main.c:
      	src/nautilus-self-check-functions.c:
      	src/ntl-index-panel.c:
      	Got rid of #ifdef HAVE_CONFIG_H. Elliot says that we must always
      	include <config.h>, but there's no reason to include that ifdef
      	since we don't plan on building without a <config.h> ever.
      58a9b33c
    • Andy Hertzfeld's avatar
      fixed bug where icons were horizontally mis-positioned after dragging; · e250cfd7
      Andy Hertzfeld authored
      
             fixed bug where icons were horizontally mis-positioned after dragging;
             fixed by taking the center offset into account
      e250cfd7
  4. 28 Jan, 2000 2 commits
  5. 27 Jan, 2000 1 commit
  6. 26 Jan, 2000 1 commit
  7. 25 Jan, 2000 3 commits
    • Darin Adler's avatar
      Redid drag code so that it will work if there are multiple windows · 6d5f07d8
      Darin Adler authored
      	* libnautilus/gnome-icon-container-dnd.c:
      	(create_selection_shadow):
      	(set_gnome_icon_list_selection):
      	(get_gnome_icon_list_selection):
      	(gnome_icon_container_receive_dropped_icons):
      	Redid drag code so that it will work if there are multiple
      	windows involved, although we still don't handle copies.
      	Changed selection to include the width and height of the icon,
      	and to hold the top left of the icon.
      
      	* libnautilus/gnome-icon-container-private.h:
      	libnautilus/gnome-icon-container.c:
      	(move_icon):
      	(gnome_icon_container_move_icon):
      	Made move_icon visible to the DnD code, and added a raise boolean
      	so it could move and icon and bring it to the front.
      	(gnome_icon_container_get_icon_by_uri):
      	(gnome_icon_container_select_list_unselect_others):
      	Added new functions for use by DnD code.
      
      	* libnautilus/gnome-icon-container-private.h:
      	libnautilus/gnome-icon-container.c:
      	(handle_icon_button_press):
      	Got rid of unused drag_x_offset and drag_y_offset.
      
      	* libnautilus/gnome-icon-container.c:
      	(icon_select):
      	(icon_toggle_selected):
      	(select_icon):
      	(select_one_unselect_others):
      	(toggle_icon):
      	(unselect_all_but_one):
      	(unselect_all):
      	(rubberband_select_in_cell):
      	(kbd_move_to):
      	(kbd_space):
      	(linger_select_timeout_cb):
      	(handle_icon_button_press):
      	(gnome_icon_container_select_all):
      	(gnome_icon_container_unselect_all):
      	Cleaned up selection logic and made it simpler.
      
      	* libnautilus/gnome-icon-container.h:
      	libnautilus/gnome-icon-container.c:
      	(gnome_icon_container_xlate_selected):
      	Got rid of unused function.
      
      	* libnautilus/nautilus-self-checks.h:
      	libnautilus/nautilus-self-checks.c:
      	(nautilus_self_checks_failed):
      	(nautilus_exit_if_self_checks_failed):
      	src/ntl-main.c:
      	(main):
      	Added blank lines before and after the first and last failed
      	checks when at least one check fails.
      
      	* src/ntl-view.c:
      	(nautilus_view_destroy):
      	Removed a straggler message. (I hope Elliot's not still using it.)
      
      	* RENAMING: Some new name ideas.
      6d5f07d8
    • Andy Hertzfeld's avatar
      icons are now drawn with a custom canvas item instead of with a group. · 961f18d6
      Andy Hertzfeld authored
      
             icons are now drawn with a custom canvas item instead of with a group.
             This is a first cut, it doesn't work at non-unity scale factors plus
             other small problems.
      961f18d6
    • Darin Adler's avatar
      Removed bogus warning. Need to do some more work to get dragging working · 6b72c37f
      Darin Adler authored
      	* gnome-icon-container-dnd.c:
      	(gnome_icon_container_receive_dropped_icons):
      	Removed bogus warning. Need to do some more work to get
      	dragging working with multiple windows, but there's no
      	easy way to detect that case, so just let it go.
      
      	* fm-directory-view-icons.c:
      	(icon_container_context_click_icon_cb):
      	(icon_container_context_click_background_cb):
      	Fixed the callbacks to match the new interface without the
      	icon name. I missed this in my check-in earlier today.
      6b72c37f
  8. 24 Jan, 2000 1 commit
    • 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
  9. 21 Jan, 2000 1 commit
    • Darin Adler's avatar
      Started some cleanup of the icon view. · 49f7a162
      Darin Adler authored
      	* libnautilus/Makefile.am:
      	libnautilus/gnome-icon-container-layout.c:
      	libnautilus/gnome-icon-container-layout.h:
      	libnautilus/gnome-icon-container.c:
      	libnautilus/gnome-icon-container.h:
      	src/file-manager/fm-directory-view-icons.c:
      	src/file-manager/fm-directory-view-icons.h:
      	Got rid of the GnomeIconContainerLayout.
      	This was the old mechanism for saving and loading
      	icon positions and we have a better signal-based one.
      	Also made the new mechanism work more the way that
      	Ettore had intended to make the layout work, where
      	all the icons that have preassigned positions get
      	positioned first, then the ones that are auto positioned.
      	In the long run, we'll need something a bit fancier.
      
      	* libnautilus/gnome-icon-container-dnd.c:
      	libnautilus/gnome-icon-container.c:
      	libnautilus/gnome-icon-container.h:
      	libnautilus/gnome-icon-container-private.h:
      	Change the priv pointer to be named details to match
      	what we use in other places in Nautilus.
      49f7a162
  10. 19 Jan, 2000 2 commits
    • Darin Adler's avatar
      Allow changing the background of the icon view by dropping colors · 4dc286da
      Darin Adler authored
      	on the icon view.
      
      	* libnautilus/gnome-icon-container-dnd.h:
      	libnautilus/gnome-icon-container-dnd.c:
      	(gnome_icon_container_position_shadow): (drag_data_received_cb):
      	(gnome_icon_container_ensure_drag_data): (drag_motion_cb):
      	(drag_drop_cb): (gnome_icon_container_receive_dropped_icons):
      	(gnome_icon_container_free_drag_data): (drag_leave_cb): Added
      	support for receiving dropped colors to change the background of a
      	GnomeIconContainer.
      
      	* src/file-manager/fm-directory-view-icons.c:
      	(fm_directory_view_icons_initialize_class):
      	(fm_directory_view_icons_clear):
      	(fm_directory_view_icons_background_changed_cb): Added code to
      	load and save the background color from metadata.
      
      	* libnautilus/gdk-extensions.c: (nautilus_gradient_new): Changed
      	nautilus_gradient_new to handle NULLs in the same way that the
      	rest of the gradient functions do instead of NULL being an illegal
      	input value.
      
      	* src/file-manager/fm-directory-view.h:
      	src/file-manager/fm-directory-view.c:
      	(fm_directory_view_initialize): (fm_directory_view_destroy):
      	(fm_directory_view_get_model): (fm_directory_view_load_uri): Added
      	a NautilusDirectory object to each directory view, accessed by
      	subclasses with a call to fm_directory_view_get_model.
      
      	* libnautilus/nautilus-gtk-extensions.h:
      	libnautilus/nautilus-gtk-extensions.c:
      	(gnome_icon_container_dropped_icon_feedback):
      	(nautilus_gdk_selection_data_copy_deep): Added deep versions of
      	these GtkSelectionData functions.
      
      	* libnautilus/nautilus-gtk-macros.h:
      	(NAUTILUS_DEFINE_GET_TYPE_FUNCTION):
      	(NAUTILUS_DEFINE_CLASS_BOILERPLATE): Added definition and
      	initialization of the parent_class global to
      	NAUTILUS_DEFINE_GET_TYPE_FUNCTION and renamed it to
      	NAUTILUS_DEFINE_CLASS_BOILERPLATE.
      
      	* libnautilus/nautilus-background-canvas-group:
      	(nautilus_background_canvas_group_initialize_class):
      	libnautilus/nautilus-background.c:
      	(nautilus_background_initialize_class):
      	libnautilus/nautilus-directory.c:
      	(nautilus_directory_initialize_class): src/ntl-index-panel.c:
      	(nautilus_index_panel_initialize_class):
      	src/file-manager/fm-directory-view-icons.c:
      	(fm_directory_view_icons_initialize_class):
      	src/file-manager/fm-directory-view-list.c:
      	(fm_directory_view_list_initialize_class):
      	src/file-manager/fm-directory-view.c:
      	(fm_directory_view_initialize_class): Take advantage of the new
      	NAUTILUS_DEFINE_CLASS_BOILERPLATE and get rid of existing code to
      	set up parent_class.
      
      	* libnautilus/gnome-icon-container-dnd.h:
      	libnautilus/gnome-icon-container-dnd.c:
      	libnautilus/gnome-icon-container-layout.h:
      	libnautilus/gnome-icon-container-layout.c:
      	libnautilus/gnome-icon-container.c: Minimized includes.
      4dc286da
    • Andy Hertzfeld's avatar
      made icons centered with respect to the text · 2689b7f2
      Andy Hertzfeld authored
      
         made icons centered with respect to the text
      2689b7f2
  11. 17 Jan, 2000 3 commits
  12. 16 Jan, 2000 1 commit
  13. 03 Jan, 2000 1 commit
  14. 22 Dec, 1999 1 commit
  15. 07 Oct, 1999 1 commit