Commit graph

486 commits

Author SHA1 Message Date
Ramiro Estrugo ee95ca88c4 Preferences work. Make preference registration implicit. Update code that
required preferences to be explicitly registered before using them.
2000-04-05 15:13:44 +00:00
Maciej Stachowiak 491e5af160 Make selection persistent across content view changes (task 105).
* src/file-manager/fm-directory-view.c,
	src/file-manager/fm-directory-view.h
	(fm_directory_view_set_selection): New function.
	(set_selection): New virtual method that must by implemented by
	subclasses.
	(add_nautilus_file_to_uri_map, remove_nautilus_file_from_uri_map,
	free_file_by_uri_map_entry, free_file_by_uri_map): New functions
	to manage a hash table mapping from uri strings to NautilusFile
	objects.
	(notify_selection_change_cb): New function; on a selection change
	notification, either set the selection immediately if the view has
	completed loading, or establish it as pending.
	(display_pending_files): Maintain the uri -> file hash table on
	notifications from the model; do any pending selections required
	when loading completes.

	* src/file-manager/fm-list-view.c (fm_list_view_set_selection):
	New function to implement `set_selection' virtual method.

	* src/file-manager/fm-icon-view.c (fm_icon_view_set_selection):
	New function to implement `set_selection' virtual method.

	* libnautilus/nautilus-list.c (nautilus_list_set_selection): New
	function: set the selection to a specified set of rows.

	* libnautilus/nautilus-icon-container.c,
	libnautilus/nautilus-icon-container.h
	(nautilus_icon_container_set_selection): New function: set the
	selection to a specified set of icons.
2000-04-05 02:32:15 +00:00
Darin Adler cd9618f0c6 Finished task 54 (Set background image by drag/drop).
Fixed bug 346 (Bad icon positions when you change user level).
	Fixed bug 372 (Better icons for common file types).

	* libnautilus/nautilus-background-canvas-group.c:
	(nautilus_background_canvas_group_draw): Got rid of the colormap
	which is not needed now that we use gtk_rgb instead of gtk_color
	calls. Passed in the corner of the canvas as a parameter to
	nautilus_background_draw so it knows where the origin of any
	repeating pattern should be.
	* libnautilus/nautilus-background.h:
	* libnautilus/nautilus-background.c: (nautilus_background_draw):
	Added parameters to determine where the origin of any repeating
	pattern should be. Removed colormap parameter (see above).
	(nautilus_background_draw_flat_box): Passed in origin parameters
	in call to nautilus_background_draw.
	* libnautilus/nautilus-gdk-extensions.h:
	* libnautilus/nautilus-gdk-extensions.c:
	(nautilus_fill_rectangle_with_gradient): Removed colormap
	parameter (see above).
	* libnautilus/nautilus-gdk-pixbuf-extensions.c:
	(nautilus_gdk_pixbuf_render_to_drawable_tiled): Fixed the tiling
	so it will use the dither parameters to set the origin of the
	tiles as well.

	* libnautilus/nautilus-icon-dnd.c: (receive_dropped_tile_image),
	(nautilus_icon_container_receive_dropped_icons): Added code so that
	dropping an image file on the window with the shift key held down
	will customize the background tile image.

	* libnautilus/nautilus-icon-factory.c: (make_full_icon_path),
	(get_themed_icon_file_path): Fixed two bugs that prevented
	MIME-type-based icons from working correctly. First, got rid of
	code that tried to prepend the theme name and "nautilus/" to the
	beginning of a full path. Then made sure that it tries the file
	name without adding a suffix before it starts trying out suffixes.

	* libnautilus/nautilus-icon-grid.c: (nautilus_icon_grid_clear):
	Fixed bug where clearing the grid was resetting the visible width.

	* components/sample/Makefile.am:
	* components/services/startup/Makefile.am:
	Turned on -Werror for these two directories.
	* components/sample/nautilus-sample-content-view.h:
	* components/sample/nautilus-sample-content-view.c:
	(nautilus_sample_content_view_destroy), (bonobo_sample_callback):
	Fixed warnings and did some small cleanup.
2000-04-05 01:28:31 +00:00
John Sullivan dc703c8ba1 Renaming a file from its Set Properties dialog now works, though
there are various odds and ends I still need to clean up.
	It turned out (surprise!) that there was a lot of
	underpinnings work involved in implementing this feature.
	Fortunately most of it will be shared by rename-in-place.

	* libnautilus/nautilus-directory-private.h:
	add #define for METADATA_NODE_NAME_FOR_FILE_NAME
	* libnautilus/nautilus-directory.c:
	(nautilus_directory_get_file_metadata_node): Use
	METADATA_NODE_NAME_FOR_FILE_NAME #define
	(nautilus_directory_set_file_metadata): Use g_return_val_if_fail
	to prevent callers from changing the file name this way, since
	that wouldn't work right.

	* libnautilus/nautilus-file.h:
	* libnautilus/nautilus-file.c:
	(nautilus_file_can_rename): New function, returns TRUE if the
	user has write permission for this file.
	(nautilus_file_rename): New function, uses gnome_vfs_move to
	try to rename the file, updating metadata as appropriate.
	Returns the GnomeVFSResult from gnome_vfs_move.

	* libnautilus/nautilus-list.c
	(row_selected): Renamed this formerly private function to
	nautilus_list_is_row_selected and made it check its parameters
	more carefully.
	* libnautilus/nautilus-list.h:
	(nautilus_list_is_row_selected): Made this public.

	* src/file-manager/fm-error-reporting.c,
	* src/file-manager/fm-error-reporting.h: New files, home for
	UI code to display user error messages and such. It's initial
	occupant is:
	(fm_report_error_renaming_file): New function, puts up a non-modal
	alert reporting the renaming failure.
	* src/file-manager/Makefile.am: Add these two new files to the build.

	* src/file-manager/fm-directory-view.c:
	(bonobo_menu_open_properties_window_cb): New function, opens a
	Properties window for each selected item using the Bonobo callback API.
	(fm_directory_view_real_merge_menus): Include Set Properties item in
	File menu, and rearrange other items a little.
	(fm_directory_view_real_update_menus): Update sensitivity of Set
	Properties menu item.

	* src/file-manager/fm-list-view.c:
	(add_to_list): Return the new row index.
	(fm_list_view_file_changed): Remove and reinsert the changed file; this
	not only does less sorting but also recomputes all the text so name
	changes will be displayed.

	* src/file-manager/fm-properties-window.c:
	(get_pixmap_and_mask_for_properties_window),
	(update_properties_window_icon),
	(create_pixmap_widget_for_file),
	(name_field_done_editing),
	(name_field_update),
	(update_properties_window_title),
	(properties_window_file_changed_callback):
	New functions used to wire up the new editable name field
	and new icon pixmap widget in the properties window.
	(create_properties_window): Added notebook tabs, first
	one is Basic and currently contains icon & name; second
	is Emblems and has all those checkboxes. Use all the
	new functions to create and wire up things so that name
	changes & icon changes are propagated and reflected correctly.

	* src/nautilus-bookmarks-window.c:
	(create_bookmarks_window): Removed a bunch of unnecessary
	and leak-causing gtk_widget_refs that I happened to notice
	in here. I left these behind when modifying code originally
	created by glade, where the refs are necessary.
2000-04-05 00:23:58 +00:00
Darin Adler 276a5a1001 First cut at tiled background images.
First cut at tiled background images.

	There's no UI for setting them yet, they are only in
	the icon view, and they don't work properly with scrolling yet.

	* libnautilus/Makefile.am:
	* libnautilus/nautilus-gdk-extensions.c:
	* libnautilus/nautilus-gdk-extensions.h:
	* libnautilus/nautilus-gdk-pixbuf-extensions.c:
	* libnautilus/nautilus-gdk-pixbuf-extensions.h:
	Split the GdkPixbuf stuff into its own file.

	* libnautilus/nautilus-background.c:
	(nautilus_background_destroy): Fixed a bunch of leaks
	and added new code to stop pixbuf loading.
	(nautilus_background_draw): Added call to draw tiled
	background image. Converted gradients to use gdk_rgb
	instead of gdk_color.
	(nautilus_background_get_tile_image_uri): Implemented.
	(nautilus_background_set_color): Added short-circuit
	for background image case.
	(load_image_callback),
	(nautilus_background_set_tile_image_uri): Implemented.
	Include code to	load in the tiled image when its URI is set.
	(nautilus_background_receive_dropped_color): Set the
	tile image to NULL when a color is dropped.

	* libnautilus/nautilus-gdk-extensions.c:
	* libnautilus/nautilus-gdk-extensions.h:
	(nautilus_fill_rectangle_with_color),
	(nautilus_fill_rectangle_with_color),
	(nautilus_interpolate_color): Changed from gdk_color
	to gdk_rgb.
	(nautilus_parse_rgb_with_white_default): Added function
	for gdk_rgb similar to what we already have for gdk_color.

	* libnautilus/nautilus-icon-canvas-item.c:
	* libnautilus/nautilus-icon-container.c:
	* libnautilus/nautilus-list.c:
	Use gdk-pixbuf extensions in new location.

	* libnautilus/nautilus-metadata.h:
	Added metadata keys for background images.

	* src/ntl-view.c:
	Added lots of stronger checks for NAUTILUS_IS_VIEW since
	this is where we run into trouble with a bug I ran into.

	* src/file-manager/icon-view.c: Added code to handle
	the new background images.
	(create_icon_container): Keep around the handler ID when
	connecting to the "changed" message of the background so
	we can block the handler as needed.
	(fm_icon_view_begin_loading): Load the background image
	as well as the background color. We need to block the
	background changed signal handler so we don't get
	confused while the color but not the image is set up.
	(fm_icon_view_background_changed_callback): Save the
	background image URI as well as the background color in
	the metadata.
2000-04-04 01:00:13 +00:00
Darin Adler 2fe15f1645 Fix the build. Changes in GtkHtml and Bonobo required us
to catch up.

	* libnautilus/ntl-meta-view-frame.h:
	* libnautilus/ntl-meta-view-frame.c:
	Rewrote to use the new property bag. This requires us to
	store our own properties, since the bag no longer provides
	any storage.
	(nautilus_meta_view_frame_initialize): Set up the label.
	(nautilus_meta_view_frame_new_from_bonobo_control): Make it
	actually take a BonoboControl instead of a BonoboObject and
	make it set up the property bag.
	(nautilus_meta_view_destroy): Free the label.
	(autilus_meta_view_frame_set_label): Just set the label.
	The property bag simply uses our stored label.

	* components/html/ntl-web-browser.c (browser_url_load_gone):
	Changed call to match name in new version of GtkHtml.
	Unfortunately, the new name makes it clear the call is
	intended to be private.

	* components/rpmview/.cvsignore: Ignore the actual binary,
	not nautilus-music-view.
	* components/rpmview/Makefile.am: Turned on -Werror.
	* components/music/Makefile.am: Turned on -Werror.
	* components/rpmview/nautilus-rpm-view.c: Fixed warnings.
2000-04-03 18:27:22 +00:00
Pavel Cisler 227b517d02 Disable copy as a drag&drop operation for now. The current copy engine
2000-03-31  Pavel Cisler  <pavel@eazel.com>

	Disable copy as a drag&drop operation for now. The current
	copy engine doesn't handle conflicts properly yet and can
	erase your files.
2000-03-31 21:26:39 +00:00
Darin Adler a1f24785d1 Fixed a bug that Pavel reported where he got a crash in
nautilus_directory_monitor_files_unref when he pushed the
	"Up" button.

	* libnautilus/nautilus-glib-extensions.c:
	* libnautilus/nautilus-glib-extensions.h:
	(nautilus_g_strv_find): Renamed the existing function
	nautilus_g_strfindv to be more consistent with the rest
	of glib, even though it's less consistent with the other
	strv functions.
	(nautilus_g_list_safe_for_each): Added an alternate
	version of g_list_foreach that works even when the current
	item is removed from the list inside the function.

	* libnautilus/nautilus-gtk-extensions.c:
	(nautilus_gtk_object_list_unref): Use the new safe version
	of g_list_foreach so this works even on lists where the
	objects remove themselves in their destroy/finalize methods.
	This is the change that fixes the bug.

	* src/nautilus-bookmark-list.c:
	(nautilus_bookmark_list_load_file): Replaced some explicit
	code with a call to nautilus_gtk_object_list_free.

	* src/nautilus-index-title.c:
	(nautilus_index_title_update_icon): Fixed a bug that would
	prevent you from viewing the root level. The current version
	of nautilus_file_get returns NULL for the root.

	* src/nautilus-window-menus.c:
	(clear_appended_bookmark_items): Replaced some explicit
	code with a call to nautilus_g_list_free_deep.

	* src/file-manager/fm-icon-text-window.c:
	(synch_menus_with_preference): Updated to use the
	nautilus_g_strv_find call by its new name.

	* libnautilus/nautilus-file.c:
	(nautilus_file_set_keywords): Did some minor tweaks to
	simplify the no-keywords case.
2000-03-31 20:29:46 +00:00
John Sullivan 16acc134d8 Show icon emblems in list view. 2000-03-31 04:13:34 +00:00
Darin Adler 1fb5a14a58 Finished task 62 (Set custom icon by drag/drop on index panel)
and fixed some problems from my earlier check-ins today.

	* libnautilus/nautilus-directory.c:
	(nautilus_directory_monitor_files_ref):
	Fixed a bad assert from my last check-in.

	* src/file-manager/fm-list-view.c: (add_to_list):
	The list view had the same missing ref that I fixed for icon
	view in my last check-in.

	* src/nautilus-index-title.c: (release_file),
	(nautilus_index_title_destroy),
	(nautilus_index_title_update_icon),
	(nautilus_index_title_update_label),
	(nautilus_index_title_update_info),
	(nautilus_index_title_set_uri): Changed to hold around the
	NautilusFile object and connect to its "changed" message to update
	the file information. This causes the icon to get updated right
	away when the custom icon is changed.

	* libnautilus/nautilus-directory-private.h:
	* libnautilus/nautilus-directory.c:
	* libnautilus/nautilus-file-private.h:
	* libnautilus/nautilus-file.c:
	* libnautilus/nautilus-file.h:
	Converted NautilusFile to be a GtkObject instead of a plain struct,
	so it can have a "changed" signal. We still recommend using the
	"files_changed" signal on the directory to avoid the overhead
	of a signal connection for each file.

	* libnautilus/nautilus-gtk-extensions.c:
	* libnautilus/nautilus-gtk-extensions.h:
	(nautilus_gtk_object_list_ref), (nautilus_gtk_object_list_unref),
	(nautilus_gtk_object_list_free): Added some functions to be used
	with a list of GtkObjects.

	* libnautilus/nautilus-icon-factory.c:
	(nautilus_icon_factory_get_icon_name_for_file):
	Had to change the name of nautilus_file_get_type to avoid conflict
	with the GtkObject standard get_type routine.
2000-03-31 01:59:36 +00:00
Darin Adler 4c8d9b0be9 Added convenience functions so people don't have to be constantly reminded
* libnautilus/nautilus-directory.c:
	* libnautilus/nautilus-directory.h:
	(nautilus_directory_ref), (nautilus_directory_unref):
	Added convenience functions so people don't have to be constantly
	reminded that a NautilusDirectory is a a GtkObject.

	* libnautilus/nautilus-directory.c: (nautilus_directory_destroy):
	Fixed a problem where the pending files callback might fire after
	the NautilusDirectory is gone.

	* libnautilus/nautilus-directory.c:
	(nautilus_directory_destroy),
	(nautilus_directory_monitor_files_ref),
	(nautilus_directory_monitor_files_unref),
	(dequeue_pending_idle_callback), (nautilus_directory_new_file):
	* libnautilus/nautilus-file-private.h:
	* libnautilus/nautilus-file.c:
	(nautilus_file_get), (nautilus_file_ref), (nautilus_file_unref),
	(nautilus_file_free), (nautilus_file_delete):
	To prepare for changing NautilusFile to a GtkObject, made it use
	ref counts in a way that is standard. Now the directory keeps a
	list of the files, but only keeps a ref to the files if it is
	monitoring them.

	* src/file-manager/fm-directory-view.c: Tiny formatting tweak.
2000-03-30 20:12:34 +00:00
Andy Hertzfeld f95b953215 made the selection rectangle have a semi transparent light blue fill
made the selection rectangle have a semi transparent light blue fill
	color; also tweaked the selection darkening to be a little lighter
2000-03-30 19:30:54 +00:00
Pavel Cisler 1c93ed15f6 More copy/move operations. Fixes a problem I introduced earlier where drop
2000-03-28  Pavel Cisler  <pavel@eazel.com>

	More copy/move operations. Fixes a problem I introduced earlier where
	drop onto a file would lock up Nautilus.
2000-03-30 19:20:38 +00:00
Maciej Stachowiak 4f01fe3665 Connect to the "destroy" signal of the view_frame rather than the sample
* components/sample/main.c (sample_make_object): Connect to the
	"destroy" signal of the view_frame rather than the sample content
	view object, to avoid a race condition where we might exit before
	the view_frame is fully unreffed and has a chance to clean up.
	components/sample/nautilus-sample-content-view.c
	(nautilus_sample_content_view_destroy): Unref the
	NautilusViewFrame when we are destroyed.

	* libnautilus/nautilus-zoomable.c, libnautilus/ntl-view-frame.c,
	libnautilus/ntl-content-view-frame.c,
	libnautilus/ntl-meta-view-frame.c: Use boilerplate macros for
	get_type method and to invoke parent destroy method.

	* libnautilus/nautilus-zoomable.c, libnautilus/ntl-view-frame.c:
	Unref the interface we query_local_interface for, to avoid holding
	a superfluous ref to ourselves, since we eventually add_interface
	that interface.

	* src/ntl-view.c (nautilus_view_destroy_client): Use
	bonobo_object_unref instead of bonobo_object_destroy.
2000-03-30 18:25:36 +00:00
Pavel Cisler 713828f46e Started on copy/move operations
2000-03-28  Pavel Cisler  <pavel@eazel.com>

	Started on copy/move operations
2000-03-29 05:02:05 +00:00
Darin Adler 39d18967c5 Preparing for support for background images.
* libnautilus/nautilus-background.h:
	* libnautilus/nautilus-background.c:
	Preparing for support for background images.

	* libnautilus/nautilus-background.c:
	* libnautilus/nautilus-debug.c:
	* libnautilus/nautilus-icon-canvas-item.c:
	* libnautilus/nautilus-icon-dnd.c:
	Add those braces that Maciej, John, and the style guide all prefer.

	* libnautilus/nautilus-file.c: (nautilus_file_set_metadata):
	A change to metadata is considered a change to the file.

	* libnautilus/nautilus-graphic-effects.c:
	* libnautilus/nautilus-graphic-effects.h:
	Added nautilus_ prefix to all the functions in here.

	* libnautilus/nautilus-gtk-extensions.c:
	* libnautilus/nautilus-gtk-extensions.h:
	(nautilus_point_in_allocation),	(nautilus_point_in_widget):
	Added hit testing help functions that check if a point is
	in a particular allocation/widget.

	* libnautilus/nautilus-icon-dnd.c: (get_gnome_icon_list_selection):
	Fixed a bug that happens when you get a 0-length piece of
	selection data.

	* libnautilus/nautilus-icon-dnd.h:
	Changed the icon list back to "x-gnome-icon-list".
	That's how the other GNOME folks want it, not "x-nautilus-icon-list".

	* src/nautilus-index-tabs.c:
	* src/nautilus-index-tabs.h:
	* src/nautilus-index-title.c:
	* src/nautilus-index-title.h:
	* src/ntl-index-panel.c:
	* src/ntl-index-panel.h:
	lite -> light, Other cleanup.

	* src/nautilus-index-title.c:
	* src/nautilus-index-title.h:
	(nautilus_index_title_hit_test_icon):
	* src/ntl-index-panel.c:
	(hit_test), (uri_is_local_image), (receive_dropped_uri_list),
	(receive_dropped_color):
	Added code needed to support dropping an image on the icon to set
	a custom icon. This doesn't yet update the icon in the panel itself,
	but I'll do that soon.
2000-03-29 02:02:45 +00:00
John Sullivan 66d503d189 Removed notify_title_change call and removed initial_title parameter of
notify_location_change call.
2000-03-29 01:56:03 +00:00
John Sullivan 5da770ab1c Switch the behavior of the Control key for keyboard navigation back the way it
is supposed to be.
2000-03-28 19:29:13 +00:00
John Sullivan 79a454c795 Add initial_title parameter to notify_location_change signal and all its
handlers. This completes the change that I did part of last night.
2000-03-28 15:54:36 +00:00
John Sullivan a2d26f63d6 Gave content views the ability to specify the user-displayed title for a
location; this is used initially (and most importantly) by web pages so that
bookmarks, the window title, and the index panel will display the html page title
rather than the url.
2000-03-28 06:05:26 +00:00
Andy Hertzfeld 6179a76438 made it treat pre-lighting and selection darkening independently, so both
made it treat pre-lighting and selection darkening independently, so
       both properties can be visually reflected simultaneously.
2000-03-28 01:54:17 +00:00
Andy Hertzfeld 6c6fad82f9 changed how selection emboldening works, also, clean-ups and bug fixes in
changed how selection emboldening works,
       also, clean-ups and bug fixes in the graphic effects
2000-03-28 01:30:14 +00:00
Ramiro Estrugo f1fbd3790e Removed the ETTORE user level easter egg and bullet proofed the
stuff that uses user levels a bit.
Removed switch handling of ETTORE user
level and added a default case for the unlikely (but poissible)
event when the ~/.gnome/nautilus preferences file contains bogus
values for the user_level enumeration.
2000-03-26 21:55:58 +00:00
Andy Hertzfeld 50735a65b9 improved selection highlighting by darkening the icon and emboldening the
improved selection highlighting by darkening the icon and emboldening
	the font
2000-03-26 05:20:55 +00:00
Andy Hertzfeld eecee1352e moved pixbuf manipulation routines into
moved pixbuf manipulation routines into
      libnautilus/nautilus-graphic-effects
2000-03-25 00:36:57 +00:00
Darin Adler 433efe122f Fixed bug 334 (Need proper hit detection when hit-testing icons.
* libnautilus/nautilus-icon-canvas-item.c: (hit_test_pixbuf):
	Fixed a typo-type error where we were checking every pixel of the
	pixbuf instead of only the pixels that we were hit testing against.

	* libnautilus/nautilus-icon-container.c: Tweaks.
2000-03-22 19:36:44 +00:00
John Sullivan 212ed01c76 Emit SELECTION_CHANGED signal after changing selection via keyboard. 2000-03-22 01:39:57 +00:00
Pavel Cisler f713422616 Fixed an annoying bug that would sometimes cause the drag&drop feedback to
2000-03-21  Pavel Cisler  <pavel@eazel.com>

	Fixed an annoying bug that would sometimes cause the drag&drop feedback
	to come up delayed.
2000-03-22 00:45:56 +00:00
Darin Adler 1764f21218 Did some of the items from RENAMING.
* libnautilus/Makefile.am:
	* libnautilus/gnome-icon-container-dnd.c:
	* libnautilus/gnome-icon-container-dnd.h:
	* libnautilus/gnome-icon-container-grid.c:
	* libnautilus/gnome-icon-container-grid.h:
	* libnautilus/gnome-icon-container-private.h:
	* libnautilus/gnome-icon-container.c:
	* libnautilus/gnome-icon-container.h:
	* libnautilus/gtkflist.c:
	* libnautilus/gtkflist.h:
	* libnautilus/nautilus-icon-canvas-item.c:
	* libnautilus/nautilus-icon-canvas-item.h:
	* libnautilus/nautilus-icon-container.c:
	* libnautilus/nautilus-icon-container.h:
	* libnautilus/nautilus-icon-dnd.c:
	* libnautilus/nautilus-icon-dnd.h:
	* libnautilus/nautilus-icon-grid.c:
	* libnautilus/nautilus-icon-grid.h:
	* libnautilus/nautilus-icon-private.h:
	* libnautilus/nautilus-icons-view-icon-item.c:
	* libnautilus/nautilus-icons-view-icon-item.h:
	* libnautilus/nautilus-lib-self-check-functions.h:
	* libnautilus/nautilus-list-column-title.c:
	* libnautilus/nautilus-list.c:
	* libnautilus/nautilus-list.h:
	* src/file-manager/Makefile.am:
	* src/file-manager/fm-directory-view-icons.c:
	* src/file-manager/fm-directory-view-icons.h:
	* src/file-manager/fm-directory-view-list.c:
	* src/file-manager/fm-directory-view-list.h:
	* src/file-manager/fm-icon-view.c:
	* src/file-manager/fm-icon-view.h:
	* src/file-manager/fm-list-view.c:
	* src/file-manager/fm-list-view.h:
	* src/ntl-app.c:
	Did these RENAMING entries:
	  FMDirectoryViewIcons -> FMIconView
	  FMDirectoryViewList  -> FMListView
	  GnomeIconContainer -> NautilusIconContainer
	  GnomeIconContainerIcon -> NautilusIcon
	  NautilusIconsViewIconItem -> NautilusIconCanvasItem

	* RENAMING: Marked the renaming done.
2000-03-22 00:29:07 +00:00
Darin Adler f09362cb59 Fixed arrow keys and worked on the icon grid.
Fixes bugs #314, #324, and #325.

	* components/help/hyperbola.goad:
	Corrected repo_ids -> repo_id, reported by Richard Hult.

	* src/nautilus.goad:
	Added missing = character, reported by Richard Hult.

	* libnautilus/gnome-icon-container-grid.c:
	* libnautilus/gnome-icon-container-grid.h:
	* libnautilus/gnome-icon-container.c:
	* libnautilus/gnome-icon-container-private.h:
	Made the icon grid handle negative coordinates.
	Removed most of the icon grid code.
	Reimplemented the arrow keys. They should work again.

	* libnautilus/nautilus-gnome-extensions.c:
	* libnautilus/nautilus-gnome-extensions.h:
	(nautilus_art_irect_contains_irect):
	Added another helper function.

	* libnautilus/nautilus-icons-view-icon-item.c:

	* libnautilus/nautilus-icons-view-icon-item.h:
	* libnautilus/gnome-icon-container.c:
	* libnautilus/gnome-icon-container-private.h:
	Added user data to each canvas item and got rid of the hash table
	that maps canvas items to icons.

	* RENAMING: Tweaks.
2000-03-21 23:18:01 +00:00
Pavel Cisler ec8d277e18 Center the sort order indicators inside a title better. Make the column
2000-03-20  Pavel Cisler  <pavel@eazel.com>

	Center the sort order indicators inside a title better. Make the column
	title label spacing more like the old CtkCList.
2000-03-21 03:19:17 +00:00
Pavel Cisler a4b40782db Use an offscreen bitmap to draw the column title during column resizing
2000-03-20  Pavel Cisler  <pavel@eazel.com>

	Use an offscreen bitmap to draw the column title during column resizing
	and column prelighting.
2000-03-21 02:40:52 +00:00
Darin Adler 857e8fa26b Fixed the "tall line of icons" bug.
* libnautilus/gnome-icon-container-grid.h:
	* libnautilus/gnome-icon-container-grid.c:
	* libnautilus/gnome-icon-container.c:
	Rewrote the routines to not have a separate concept of the
	actual grid height and the allocated grid height. Most important
	change was to update the first_free variables when resizing.

	* src/file-manager/fm-directory-view-icons.h:
	* src/file-manager/fm-directory-view-icons.c:
	(fm_directory_view_icons_line_up_icons):
	Removed the unused line_up_icons call. This feature will return,
	but for now it's just a waste of space.
2000-03-18 00:46:16 +00:00
Darin Adler e8fcc82dff Simplified the grid a bit and did some redesign. The grid now takes into
* libnautilus/gnome-icon-container-grid.h:
	* libnautilus/gnome-icon-container-grid.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:
	Simplified the grid a bit and did some redesign. The grid now
	takes into account the height and width of the icons. More work
	to come.

	* libnautilus/nautilus-global-preferences.c:
	* nautilus-widgets/nautilus-preferences.h:
	Some cleanup, including types for constants.

	* libnautilus/nautilus-gnome-extensions.h:
	* libnautilus/nautilus-gnome-extensions.c:
	(nautilus_art_irect_equal), (nautilus_art_drect_equal),
	(nautilus_gnome_canvas_item_get_current_canvas_bounds),
	(nautilus_gnome_canvas_item_request_redraw),
	(nautilus_gnome_canvas_request_redraw_rectangle),
	(nautilus_gnome_canvas_item_get_world_bounds):
	More useful canvas and libart routines.

	* RENAMING: More renaming ideas.
2000-03-17 23:03:39 +00:00
Elliot Lee bf66a469cc #include <string.h>
#include <string.h>
2000-03-17 22:40:55 +00:00
Pavel Cisler aa98d924c7 Fix some bugs that John kindly uncovered.
2000-03-17  Pavel Cisler  <pavel@eazel.com>

	Fix some bugs that John kindly uncovered.
2000-03-17 19:19:40 +00:00
Pavel Cisler 53aa5a6308 First pass on making list column resizing live.
2000-03-16  Pavel Cisler  <pavel@eazel.com>

	First pass on making list column resizing live.

	* libnautilus/Makefile.am
	* libnautilus/nautilus-list-column-title.c
	* libnautilus/nautilus-list-column-title.h
	* libnautilus/gtkflist.h
	* libnautilus/gtkflist.c
	* manager/fm-directory-view-list.c
	* libnautilus/nautilus-gdk-extensions.c
	* libnautilus/nautilus-gdk-extensions.h
2000-03-17 04:46:16 +00:00
Darin Adler 8efa4d71d7 Did some of the renamings that were queued in RENAMING.
* libnautilus/Makefile.am:
	* libnautilus/gdk-extensions.c:
	* libnautilus/gdk-extensions.h:
	* libnautilus/nautilus-gdk-extensions.c:
	* libnautilus/nautilus-gdk-extensions.h:
	* libnautilus/gnome-icon-container.c:
	* libnautilus/nautilus-background.c:
	* libnautilus/nautilus-icons-view-icon-item.c:
	Renamed gdk-extensions to add the nautilus- prefix and changed
	all includers.

	* src/Makefile.am:
	* src/explorer-location-bar.c:
	* src/explorer-location-bar.h:
	* src/nautilus-location-bar.c:
	* src/nautilus-location-bar.h:
	* src/ntl-window-msgs.c:
	* src/ntl-window.c:
	Renamed ExplorerLocationBar to NautilusLocationBar.

	* src/Makefile.am:
	* src/nautilus-bookmarklist.c:
	* src/nautilus-bookmarklist.h:
	* src/nautilus-bookmark-list.c:
	* src/nautilus-bookmark-list.h:
	* src/nautilus-bookmarks-window.c:
	* src/nautilus-bookmarks-window.h:
	* src/nautilus-window-menus.c:
	Renamed NautilusBookmarklist to NautilusBookmarkList.

	* RENAMING: Marked items done and added some new ones.

	* nautilus-widgets/nautilus-preferences-item.c:
	* nautilus-widgets/nautilus-preferences.c:
	* nautilus-widgets/test-nautilus-widgets.c:
	* libnautilus/nautilus-icon-factory.c:
	* src/file-manager/fm-directory-view-icons.c:
	* src/file-manager/fm-directory-view.c:
	* src/file-manager/fm-icon-text-window.c:
	Cleaned up the interface to NautilusPreferences a bit.
2000-03-16 21:10:42 +00:00
John Sullivan 3ffd225184 Fixes for a couple of preferences bugs. 2000-03-16 20:10:13 +00:00
John Sullivan c821dce685 Moved a couple of utility functions into the right libnautilus homes. 2000-03-16 18:16:58 +00:00
John Sullivan 0437a094a6 Make icon theme changes persist by using preferences mechanism. 2000-03-16 17:13:49 +00:00
Darin Adler ee495dba40 Tell people about the gnome-xml branch.
* HACKING: Tell people about the gnome-xml branch.

	* libnautilus/Makefile.am:
	* libnautilus/gnome-icon-container-grid.c:
	* libnautilus/gnome-icon-container-grid.h:
	* libnautilus/gnome-icon-container-private.h:
	* libnautilus/gnome-icon-container.c:
	Broke out the grid code from the main container code.
	This is a first step toward improving the layout code.

	* libnautilus/nautilus-directory-private.h:
	* libnautilus/nautilus-directory.c:
	* libnautilus/nautilus-directory.h:
	* src/fm-directory-view.c:
	Got started on making the directory I/O async.
	There's still a long way to go, this was a baby step.

	* libnautilus/nautilus-bookmark.c:
	* libnautilus/nautilus-bookmark.h:
	* libnautilus/nautilus-self-checks.c:
	General cleanup.

	* libnautilus/nautilus-file.h:
	Rearranged a little bit.

	* libnautilus/nautilus-file-utilities.c:
	Put FIXME in where there's code that needs to be changed.
2000-03-16 00:31:18 +00:00
John Sullivan 4df4c1e1ea Used preferences mechanism for text under icons and
open-in-new-window-when-clicked.
2000-03-15 21:13:57 +00:00
Darin Adler b84f3f1d7d A quick cleanup of how we use gnome-xml.
* libnautilus/Makefile.am:
	* libnautilus/nautilus-xml-extensions.c:
	* libnautilus/nautilus-xml-extensions.h:
	Added some new gnome-xml helper functions.

	* libnautilus/nautilus-directory.c:
	(nautilus_directory_get_file_metadata_node):
	* libnautilus/nautilus-file.c:
	(nautilus_file_get_keywords):
	(nautilus_file_set_keywords):
	* libnautilus/nautilus-icon-factory.c:
	(get_child_node_by_property):
	(get_themed_icon_file_path):
	* src/nautilus-bookmarklist.c:
	(nautilus_bookmarklist_load_file):
	Changed to use the new helper functions.

	* src/nautilus-bookmarklist.c:
	(nautilus_bookmarklist_save_file): Changed direct uses of root to
	use xmlDocGet/SetRootElement while I was editing the file.  I
	think this is the same change Pavel made but wasn't able to check
	in.

	* src/nautilus-bookmarklist.c:
	General cleanup.
2000-03-15 16:46:51 +00:00
Darin Adler bdf3c6c136 Added additional data to icons so they can specify where the
embedded text fits in each icon.

	* icons/eazel/Makefile.am, icons/eazel/i-regular.xml: Added the
	file to specify attributes of icons. Specifically added the
	attribute that says there is space for embedded text in the
	Eazel-theme regular icon.

	* libnautilus/nautilus-icon-factory.h:
	* libnautilus/nautilus-icon-factory.c:
	(get_child_node_by_property), (get_themed_icon_file_path),
	(get_icon_file_path), (nautilus_icon_factory_get_thumbnail_uri),
	(load_specific_image), (load_image_for_scaling),
	(get_image_from_cache), (load_image_scale_if_necessary),
	(nautilus_icon_factory_get_pixbuf_for_icon),
	(nautilus_icon_factory_get_pixbuf_for_file):
	Added code to read a rectangle for the embedded text along with
	the icon, cache it with the icon, scale it with the icon, and
	return it to the caller along with the icon.

	* libnautilus/nautilus-icons-view-icon-item.c:
	(nautilus_icons_view_icon_item_initialize_class),
	(nautilus_icons_view_icon_item_set_arg),
	(nautilus_icons_view_icon_item_get_arg),
	(nautilus_icons_view_icon_item_get_image),
	(nautilus_icons_view_icon_item_set_image),
	(nautilus_art_irect_to_gdk_rectangle),
	(draw_mini_text), (draw_embedded_text),
	(nautilus_icons_view_icon_item_draw):
	Changed the code that draws the embedded text to respect the
	text rectangle passed in. Changed the pixbuf setting to use a
	function instead of the arg interface and take a text rectangle
	along with the pixbuf.

	* libnautilus/gnome-icon-container-dnd.c
	(gnome_icon_container_dnd_begin_drag):
	* libnautilus/gnome-icon-container.c:
	(icon_get_actual_size): Got rid of callers who were using the arg
	interface to get at the image of an icon
	("NautilusIconsViewIconItem::pixbuf").

	* src/file-manager/fm-directory-view-icons.c:
	(get_icon_property_cb): Get rid of hard-coded rule that only
	themes with eazel at the front of their names can display text
	inside the icons.

	* libnautilus/gnome-icon-container.c:
	(icon_new): Fixed a bug where icons would be super-tiny if they
	got too big, like if you entered a directory that was zoomed all
	the way in.
	(start_stretching), (ungrab_stretch_icon), (end_stretching),
	(gnome_icon_container_show_stretch_handles): Added code to grab
	the pointer while stretching an icon.
	(item_event_cb): Added a return statement that John forgot when
	he was editing. Without that, it was falling through to the next
	case, which had the same effect anyway.
	(update_icon): Pass the text rectangle through from the icon
	factory to the icon canvas item, using the new call instead of the
	old arg interface approach.

	* components/help/.cvsignore: Added entries for
	.la and .lo files.

	* components/help/Makefile.am:
	* components/help/hyperbola-nav-index.c:
	* components/help/hyperbola-nav-search.c:
	* libnautilus/nautilus-directory-private.h:
	* libnautilus/nautilus-directory.c:
	* src/nautilus-bookmarklist.c:
	Fixed flags for gnome-xml
	includes. Someone pointed out that you are supposed to include
	these as "#include <tree.h>", not "#include <gnome-xml/tree.h>" so
	I fixed our uses to work that way.

	* libnautilus/nautilus-directory.c:
	(nautilus_directory_get_file_metadata_node): Fixed code that was
	destroying something allocated by gnome-xml with g_free instead
	of xmlFree.

	* libnautilus/nautilus-file.c:
	(nautilus_file_get_keywords), (nautilus_file_set_keywords):
	Fixed storage leak where we were getting a property and not freeing it.

	* libnautilus/nautilus-default-file-icon.h:
	* libnautilus/nautilus-default-file-icon.c:
	* libnautilus/nautilus-icon-factory.c:
	(load_image_for_scaling): Got rid of the global that tells whether
	the default icon has an alpha channel -- it's not hardwired TRUE.
2000-03-15 00:31:49 +00:00
John Sullivan ea7cd874d3 Made directories start up using the same view they were last displayed with. 2000-03-14 21:56:24 +00:00
John Sullivan f499337913 Fixed bug where selection-dependent menu items (e.g. "Open in New Window")
didn't update after deleting selected items.
2000-03-14 19:33:20 +00:00
Jonathan Blandford 87179b7dca Add a gtk_drag_finish to hopefully solve half the flying windows problem.
2000-03-14  Jonathan Blandford  <jrb@redhat.com>

	* libnautilus/gnome-icon-container-dnd.c (drag_drop_cb): Add a
	gtk_drag_finish to hopefully solve half the flying windows
	problem.  Needs more thought then this, though...
2000-03-14 18:58:56 +00:00
John Sullivan 92dc45caa1 Fixed two-popup-menus-at-once bug. 2000-03-14 17:50:59 +00:00
John Sullivan 98916dd8ca Improvements & bug fixes to keyboard navigation in file manager. 2000-03-14 05:55:03 +00:00
Darin Adler ec73da2452 Fixed bug that caused a core dump when getting at the root directory
* libnautilus/nautilus-directory.c (nautilus_directory_get):
	Fixed bug that caused a core dump when getting at the root
	directory because all the '/' characters were stripped off
	the URI.

	* /src/file-manager/fm-directory-view.c:
	* nautilus-widgets/nautilus-preferences.c:
	Tiny formatting fixes.
2000-03-13 22:48:12 +00:00
Darin Adler fe7c58d2d1 A quick cleanup pass on the NautilusStringList class: Changed uses of
* libnautilus/nautilus-string-list.h:
	* libnautilus/nautilus-string-list.c:
	A quick cleanup pass on the NautilusStringList class:
	Changed uses of gchar to char, changed g_assert to g_return_if_fail
	as appropriate. Fixed brace style to be emacs-friendly (open brace
	on same line as if statement). Fixed spelling of delimiter.
	Got rid of some unnecessary special cases for NULL and sped up
	the _equal function be eliminating the redundant length check.
	Changed the self-check so that it doesn't write a warning to the
	log when it runs.
2000-03-13 16:41:09 +00:00
Ramiro Estrugo e58c19a4b3 libnautilus/nautilus-global-preferences.c, Add a table of meta view iids
* libnautilus/nautilus-global-preferences.c,
* libnautilus/nautilus-global-preferences.h:
(nautilus_global_preferences_get_meta_view_iids) Add a table of
meta view iids and a function to retrieve them.  This is a hack
until we have better runtime detection of components.
Add some better defaults for which meta views are shown.  By
default none were shown.  Undo a previous gnome_config default
hack.  There is now a better fix in place in the prefs code.

* nautilus-widgets/nautilus-preferences.c:
(nautilus_preferences_make_gnome_config_string) A new function to
make a string as expected by gnome_config with a trailing default
value.  Use this string to fetch the value of the preferences.

* src/Makefile.am,
src/ntl-prefs.c,
src/ntl-prefs.h,
src/nautilus-window-menus.c,
src/nautilus.h:
Retire ntl-prefs.c and ntl-prefs.h.  Remove these 2 from build and
all references to them.

* src/ntl-app.c:
(nautilus_app_startup, nautilus_app_destroy) No need to call
retired ntl-prefs functions.

* src/ntl-uri-map.c:
(add_meta_view_iids_from_preferences): New function.  Factor out
meta iid setup code into one place.  Replace the static meta iid
setup code with something that looks in preferences to see which
meta views are enabled.  Next step is to make the meta view
respond to pref changes.
2000-03-13 01:37:44 +00:00
Ramiro Estrugo 358ad2c9ca Properly remove the item from the list so that we dont crash later trying
* nautilus-widgets/nautilus-preferences.c:
(pref_hash_info_remove_callback) Properly remove the item from
the list so that we dont crash later trying to munge a NULL node.

* libnautilus/nautilus-global-preferences.h:
(NAUTILUS_PREFERENCES_USER_LEVEL) Make sure the user level
defaults to hacker.
2000-03-12 22:47:05 +00:00
Ramiro Estrugo 7398417988 Call clear() from free() instead of duplicating the work. 2000-03-12 21:20:04 +00:00
Ramiro Estrugo 29bb801957 *libnautilus/Makefile.am: Added nautilus_string_table
*libnautilus/nautilus-lib-self-check-functions.h: Added string
table tests hooks.

*libnautilus/nautilus-string-list.c,
libnautilus/nautilus-string-list.h: New class to deal with lists
of strings in a type safe manner.  Also added self tests for this
class.
2000-03-12 21:16:43 +00:00
Ramiro Estrugo b657b1fef3 Make the preference changes persistent.
* nautilus-widgets/nautilus-preferences.c:
(prefs_set_pref, nautilus_preferences_register_from_info,
nautilus_preferences_register_from_values): Make the preference
changes persistent.

*nautilus-widgets/nautilus-preferences-item.c,
nautilus-widgets/nautilus-preferences-item.h,
nautilus-widgets/nautilus-preferences.c,
nautilus-widgets/nautilus-preferences.h,
nautilus-widgets/test-nautilus-widgets.c:
Dont use GtkFunadamentalType, since we obviously wont support
all fundamantal gtk types as preferences.  Use an enum instead.
Makes the preferences type whacking code exactly 14.85% more type
safe.
2000-03-12 21:13:41 +00:00
Ramiro Estrugo e7477fb6ef (nautilus_user_top_directory): New function. Used to obtain
the user's "top" directory.  The top directory is an alternative
home place for naive users.
2000-03-12 17:56:46 +00:00
Ramiro Estrugo 42550b2c43 Use better names for the global preferences macros.
New method for removing callbacks.
Filter files according to the user level.
Add/Remove a preferences callback to keep track of user level changes.
2000-03-12 16:53:35 +00:00
Ramiro Estrugo 63c6d54af8 Moved global preferences to libnautilus. 2000-03-12 12:58:20 +00:00
Darin Adler 374870d5ab Fixed typo that broke all hit testing except for rubber band selection!
* libnautilus/nautilus-icons-view-icon-item.c
	(nautilus_icons_view_icon_item_point):
	Fixed typo that broke all hit testing except for rubber band
	selection! (Sorry.)

	* libnautilus/gnome-icon-container-dnd.c
	(set_gnome_icon_list_selection, set_uri_list_selection),
	libnautilus/gnome-icon-container-private.h,
	libnautilus/gnome-icon-container.h,
	libnautilus/gnome-icon-container.c
	(gnome_icon_container_get_icon_uri,
	gnome_icon_container_initialize_class, gnome_icon_container_new,
	update_icon, gnome_icon_container_update,
	gnome_icon_container_request_update),
	src/file-manager/fm-directory-view-icons.c (create_icon_container,
	get_icon_images_cb, get_icon_uri_cb, get_icon_text_cb,
	get_icon_property_cb): Change code that used to use a separate
	controller object to just use signals on the icon container
	instead.

	* libnautilus/nautilus-gtk-extensions.h,
	libnautilus/nautilus-gtk-extensions.c,
	src/file-manager/fm-directory-view.c: Add new signal marshal
	functions as needed and changed the name of one of the old
	functions.

	* libnautilus/Makefile.am,
	libnautilus/nautilus-icons-controller.h,
	libnautilus/nautilus-icons-controller.c,
	src/file-manager/Makefile.am,
	src/file-manager/fm-icons-controller.h,
	src/file-manager/fm-icons-controller.c: Removed the old controller
	object, it was a bad idea.
2000-03-11 00:46:40 +00:00
Darin Adler bddcc07d4b Fixed rubber banding to hit test with all the parts of the icon, not just
* libnautilus/Makefile.am, libnautilus/gnome-icon-container-dnd.c
	  (set_gnome_icon_list_selection,
	  gnome_icon_container_dnd_begin_drag),
	  libnautilus/gnome-icon-container.c (icon_is_in_region,
	  start_stretching), libnautilus/nautilus-icons-view-icon-item.h,
	  libnautilus/nautilus-icons-view-icon-item.c (hit_stretch_handle,
	  hit_test_pixbuf, hit_test, nautilus_icons_view_icon_item_point,
	  nautilus_icons_view_icon_item_get_icon_world_rectangle,
	  nautilus_icons_view_icon_item_get_icon_rectangle,
	  nautilus_icons_view_icon_item_get_icon_window_rectangle,
	  nautilus_icons_view_icon_item_get_hit_stretch_handle,
	  hit_stretch_handle,
	  nautilus_icons_view_icon_item_hit_test_stretch_handles,
	  nautilus_icons_view_icon_item_hit_test_rectangle):
	Fixed rubber banding to hit test with all the parts of the icon,
	not just the icon pixbuf itself. Did this by changing all the
	internal hit testing to use rects instead of points. At the same
	time changed the external interface to always use world
	coordinates for clarity.

	* libnautilus/nautilus-directory.c (compare_file_with_name),
	libnautilus/nautilus-file.c (nautilus_file_set_keywords): Fixed
	some void * problems that upset newer versions of GCC but not the
	older one that I'm using.

	* libnautilus/nautilus-gtk-extensions.h,
	libnautilus/nautilus-gtk-extensions.c: Formatting and include
	statements fix up.
2000-03-10 22:47:48 +00:00
Jonathan Blandford d21681ac5d Avoid a bug where we get stuck grabs when you double click.
2000-03-10  Jonathan Blandford  <jrb@redhat.com>

	* libnautilus/gnome-icon-container.c (button_press_event): Avoid a
	bug where we get stuck grabs when you double click.
2000-03-10 21:19:06 +00:00
Maciej Stachowiak c81f075c88 store zoom_control object in the window.
* src/ntl-window.c, src/ntl-window.h: store zoom_control object in
	the window.

	* src/nautilus-zoomable-frame-svr.c: New file; implement CORBA
	server for Nautilus::ZommableFrame interface.
	* src/ntl-view-private.h: prototypes for shared stuff needed to make
	this work.
	* src/ntl-view.c: Attach a Nautilus::ZoomableFrame interface to
	the Nautilus::ViewFrame.

	* libnautilus/nautilus-gtk-extensions.h,
	libnautilus/nautilus-gtk-extensions.c
	(nautilus_gtk_marshal_NONE__DOUBLE): New function.
2000-03-10 15:32:03 +00:00
Darin Adler 5f4af6f1ea It turns out that you aren't intended to reset the scroll region once you
* libnautilus/gnome-icon-container.c (set_scroll_region):
	It turns out that you aren't intended to reset the scroll region
	once you have items in the canvas. We need to do that, so I had
	to write some code that would update all the items when that happens.

	* libnautilus/nautilus-icons-view-icon-item.c:
	(recompute_bounding_box): Rewrote this to not assume that the
	icon items are all top-level items.
	(compute_text_rectangle, hit_test,
	nautilus_icons_view_icon_item_bounds): Change hit testing so
	it includes hits on the text. The rubberband still has to be
	fixed so it doesn't have the same problem.

	* libnautilus/nautilus-file.c: Improved a comment.

	* RENAMING: Some more name changes.
2000-03-10 03:20:54 +00:00
John Sullivan 30433daf59 Fixed mistake in recent bug fix. 2000-03-10 02:44:52 +00:00
John Sullivan 0d911a35c0 Fixed storage leak in nautilus_file_list_unref, and added some more self checks. 2000-03-10 01:38:10 +00:00
Andy Hertzfeld 5515799d9f 2 small fixes: tweaked constants used for pre-lighting icons and fixed bug
2 small fixes:  tweaked constants used for pre-lighting icons and
	fixed bug in music view where track numbers were displayed as -1 if
	they were not present in the id3 data; now they are blank.
2000-03-10 00:53:01 +00:00
Maciej Stachowiak 7d9696ef0f Pass the correct thing as the servant to avoid crashing on instantiation.
* libnautilus/nautilus-zoomable.c
	(impl_Nautilus_Zoomable__create): Pass the correct thing as the
	servant to avoid crashing on instantiation.
	(nautilus_zoomable_real_set_bonobo_control): ref and sink the
	BonoboControl Gtk object.
	(nautilus_zoomable_destroy): unref the control instead of
	destroying.
2000-03-10 00:46:31 +00:00
Darin Adler bcf419e81d Andy's check-in yesterday accidentally rolled out some changes to this
* nautilus-icons-view-icon-item.c (emblem_layout_next,
	nautilus_icons_view_icon_item_bounds):
	Andy's check-in yesterday accidentally rolled out some changes
	to this file. The changes include the typos that John and I had
	fixed in emblem_layout_next and nautilus_icons_view_icon_item_bounds.

	* nautilus-icons-view-icon-item.c:
	As Andy was about to do anyway, I tightened up the emblem
	positioning so they are closer to each other by changing the
	hard-coded constant EMBLEM_SPACING.
2000-03-09 21:09:20 +00:00
Darin Adler 8656eb9d85 Fixed bugs relating to multiple directory and file objects for the same
* libnautilus/nautilus-directory-private.h,
	libnautilus/nautilus-directory.c, libnautilus/nautilus-file.c
	(nautilus_directory_find_file, compare_file_with_name,
	nautilus_directory_get, nautilus_file_get): Fixed bugs relating to
	multiple directory and file objects for the same entity. Stripped
	trailing '/' characters in nautilus_directory_get and changed
	nautilus_file_get to return already-existing files instead of
	always creating new ones. Added self-checks to make sure this
	works.

	* libnautilus/nautilus-directory.c
	(nautilus_directory_try_to_read_metafile): Fixed bug where
	metafile reading would fail. The gnome-xml parser requires a null
	character at the end of the file, even though the size is passed
	in!

	* libnautilus/nautilus-directory.c
	(nautilus_directory_remove_write_metafile_idle,
	nautilus_directory_finalize,
	nautilus_directory_try_to_write_metafile,
	nautilus_directory_request_write_metafile, ): Changed metafile
	writing so it always happens at idle time.

	* libnautilus/nautilus-directory.c
	(nautilus_directory_try_to_read_metafile): Fixed bug where
	metafile reading would fail. The gnome-xml parser requires a null
	character at the end of the file, even though the size is passed
	in!

	* libnautilus/nautilus-lib-self-check-functions.h: Changed order
	so lower-level tests come before higher-level ones.

	* libnautilus/nautilus-string.h, libnautilus/nautilus-string.c:
	Renamed functions:
		nautilus_has_prefix -> nautilus_str_has_prefix
		nautilus_strdup_prefix -> nautilus_str_get_prefix
		nautilus_has_suffix -> nautilus_str_has_suffix
		nautilus_strstrip -> nautilus_str_strip_chr
		nautilus_string_to_int -> nautilus_str_to_int
		nautilus_eat_string_to_int -> nautilus_eat_str_to_int
	Changed nautilus_str_strip_chr not to modify in place.
	Added nautilus_str_strip_trailing_chr.

	* components/music/nautilus-music-view.c (is_mp3_file,
	nautilus_music_view_update_from_uri),
	libnautilus/nautilus-icon-factory.c
	(nautilus_icon_factory_get_icon_for_file, make_thumbnail_path,
	load_specific_image), libnautilus/nautilus-icons-view-icon-item.c
	(draw_mini_text), src/ntl-index-panel.c (command_button_cb,
	add_command_buttons), src/ntl-window-msgs.c
	(nautilus_window_change_location_2),
	src/file-manager-fm-directory-view-icons.c
	(fm_directory_view_icons_compute_menu_item_info),
	src/file-manager/fm-directory-view.c (compute_menu_item_info),
	src/file-manager/fm-icons-controller.c
	(fm_icons_controller_get_icon_property): Switched callers to use
	new names for string calls.

	* libnautilus/gnome-icon-container.c (destroy): Reformatting.

	* components/help/converters/gnome-info2html2/main.c (main):
	Fixed a warning.
2000-03-09 20:34:50 +00:00
John Sullivan cb99884c95 Changed decision of when to draw mini-text on an icon to
be based on icon size rather than zoom level, so it works
        more sensibly with stretched icons.
2000-03-09 20:23:50 +00:00
John Sullivan a589b69aed A few bug fixes and memory leak fixes. 2000-03-09 19:48:13 +00:00
Elliot Lee f86e85ad8e Install libnautilus.h Handle mapping of special schemes (i.e. unknown to
* libnautilus/Makefile.am: Install libnautilus.h
* src/ntl-uri-map.c: Handle mapping of special schemes
(i.e. unknown to gnome-vfs). Currently just 'irc'.
2000-03-09 17:43:39 +00:00
John Sullivan 5dd9c624d5 Fixed bug where icon factory was making a thumbnail for a single file multiple
times.
2000-03-09 03:16:17 +00:00
Andy Hertzfeld d015748e01 drag for relatively small icons due to performance limitations
drag for relatively small icons due to performance limitations
2000-03-09 03:09:37 +00:00
Darin Adler 13f23bd385 You can now use Set Properties to attach keywords to a file,
which will cause it to have emblems attached to its icon.

	* libnautilus/gnome-icon-container.h,
	libnautilus/gnome-icon-container.c (gnome_icon_container_update,
	gnome_icon_container_update_icon),
	libnautilus/nautilus-directory-private.h,
	libnautilus/nautilus-directory.c
	(nautilus_directory_files_changed), libnautilus/nautilus-file.h,
	libnautilus/nautilus-file.c (nautilus_file_changed),
	src/file-manager/fm-directory-view.h,
	src/file-manager/fm-directory-view.c,
	src/file-manager/fm-directory-view-icons.c,
	src/file-manager/fm-directory-view-list.c,: Add files_changed
	machinery in so views will notice changes to a NautilusFile.

	* libnautilus/nautilus-icon-factory.h,
	libnautilus/nautilus-icon-factory.c
	(nautilus_icon_factory_get_thumbnail_uri,
	nautilus_icon_factor_get_icon_for_file, check_for_thumbnails),
	libnautilus/nautilus-icons-controller.h,
	libnautilus/nautilus-icons-controller.c,
	(nautilus_icons_controller_update_icon),
	src/file-manager/fm-icons-controller.c
	(fm_icons_controller_update_icon): Use the files_changed machinery
	instead of a special case in the icon controller to tell the view
	about a new thumbnail.

	* libnautilus/nautilus-icons-view-icon-item.c
	(emblem_layout_next): Fixed typo that caused emblems to go down
	one side of the icon instead of going around.

	* libnautilus/nautilus-directory-private.h,
	libnautilus/nautilus-directory.c
	(nautilus_directory_get_file_metadata_node,
	nautilus_directory_request_write_metafile),
	libnautilus/nautilus-file.c (nautilus_file_set_keywords):
	Implemented the set_keywords operation so we can change the
	keywords for a file.

	* src/file-manager/fm-icon-text-window.c
	(create_icon_text_window): Fixed a prototype.

	* src/file-manager/fm-properties-window.c (property_button_update,
	property_button_toggled, create_properties_window,
	fm_properties_window_get_or_create): Implement a first cut at a
	properties window.
2000-03-09 02:38:16 +00:00
John Sullivan 98a347d925 Fixed icon bounds bug, and hid keyboard-selection rectangle unless it diverges
from regular selection.
2000-03-09 00:42:54 +00:00
Darin Adler 6ba4e1e5e3 Broke the file part of nautilus-directory.[ch] into nautilus-file.[ch].
* components/music/nautilus-music-view.c,
	components/notes/ntl-notes.c, libnautilus/Makefile.am,
	libnautilus/nautilus-directory-private.h,
	libnautilus/nautilus-directory.h,
	libnautilus/nautilus-directory.c,
	libnautilus/nautilus-file-private.h, libnautilus/nautilus-file.h,
	libnautilus/nautilus-file.c, libnautilus/nautilus-icon-factory.h,
	src/ntl-index-panel.c, src/file-manager/fm-directory-view.h:
	Broke the file part of nautilus-directory.[ch] into
	nautilus-file.[ch].

	* libnautilus/nautilus-string.c (nautilus_strstrip): Added more
	tests. Changed algorithm on strstrip so it's linear instead of
	n^2.

	* libnautilus/gnome-icon-container.c
	(gnome_icon_container_initialize): Fixed font for "larger" zoom
	level. Also made it assert if the font can't be loaded.

	* components/help/hyperbola-nav-index.c (despace):
	Fixed warning.

	* libnautilus/gnome-icon-container-dnd.c,
	libnautilus/nautilus-string.h: Whitespace.

	* src/file-manager/Makefile.am,
	src/file-manager/fm-directory-view.c,
	src/file-manager/fm-properties-window.h,
	src/file-manager/fm-properties-window.c: Added properties window
	hook, but no window yet. The menu item still needs to be added to
	the main menus as well as the context menus.

	* src/file-manager/fm-directory-view.c,
	src/file-manager/fm-directory-view-icons.c,
	src/file-manager/fm-icon-text-window.h,
	src/file-manager/fm-icon-text-window.c: A little cleanup. Shorter
	names.
2000-03-08 21:16:21 +00:00
Ramiro Estrugo 1bd60d6f60 Added macros to check, assert and invoke class methods for a given GtkOject. 2000-03-08 18:16:26 +00:00
Darin Adler f026b4a2ce Reimplemented the delete command to use NautilusFile instead of
going directly to the file system.

	* libnautilus/gnome-icon-container.h,
	libnautilus/gnome-icon-container.c
	(gnome_icon_container_clear_selected_items),
	(gnome_icon_container_remove): Got rid of the call that removes
	all the icons in the selection and replaced it with a call that
	removes a specific icon.

	* libnautilus/nautilus-directory.h,
	libnautilus/nautilus-directory.c
	(nautilus_directory_initialize_class), (nautilus_file_unref),
	(nautilus_file_detach), (nautilus_file_free),
	(nautilus_file_delete), (nautilus_file_is_gone): Implemented a
	call to delete a file and emit the files_removed signal as needed.

	* src/file-manager/fm-directory-view.h,
	src/file-manager/fm-directory-view.c
	(fm_directory_view_delete_selection),
	(fm_directory_view_begin_adding_entries),
	(fm_directory_view_add_entry),
	(fm_directory_view_done_adding_entries), (display_pending_files),
	(add_or_remove_files), (add_files_cb), (remove_files_cb),
	(delete_one): Changed the delete implementation to call
	nautilus_file_delete and got rid of the explicit call to
	delete_selection. The views now will remove their entries in
	response to the change in the model.

	* src/file-manager/fm-directory-view-icons.c
	(fm_directory_view_icons_remove_entry),
	(fm_directory_view_icons_delete_selection),
	src/file-manager/fm-directory-view-list.c
	(fm_directory_view_list_remove_entry),
	(fm_directory_view_list_delete_selection): Eliminated the
	delete_selection function in favor of the remove_entry function.
2000-03-08 02:32:00 +00:00
Andy Hertzfeld 6c09e03e87 implemented semi-transparent dragging by writing a make_semi_transparent
implemented semi-transparent dragging by writing a make_semi_transparent
	routine that "checkerboards" the alpha channel.  Also, switched to
	a sans-serif font for the text beneath icons.
2000-03-08 02:03:03 +00:00
Darin Adler 96954f0b46 Fixed a typo that was causing the text area to not be included in the
* nautilus-icons-view-icon-item.c (nautilus_icons_view_icon_item_bounds):
	Fixed a typo that was causing the text area to not be included in the
	bounds of an icon item.
2000-03-07 20:08:16 +00:00
Darin Adler 8a960c5ea6 Added nautilus_file_get_keywords, which returns a GList of keywords.
* libnautilus/nautilus-directory.h,
	libnautilus/nautilus-directory.c (get_file_metadata_node),
	(nautilus_directory_get_file_metadata),
	(nautilus_file_get_keywords): Added nautilus_file_get_keywords,
	which returns a GList of keywords.

	* libnautilus/nautilus-icon-factory.c (add_size_to_image_name),
	(get_themed_icon_file_path), (get_icon_file_path), (add_emblem),
	(nautilus_icon_factory_get_emblem_icons_for_file): Changed icon
	names to not include the extension and wired some extensions into
	the icon-reading code. The old code wired the entire file name, so
	this is a bit more flexible. Added code to return an emblem for
	each keyword attached to a file as well as the symbolic link emblem.

	* libnautilus/gnome-icon-container.c (update_icon): Handle NULL
	pixbufs for emblems. This happens when a keyword is specified that
	doesn't have a corresponding emblem icon.  Add g_list_reverse call
	to keep emblems in the correct order.

	* src/file-manager/fm-directory-view-icons.c
	(fm_directory_view_icons_merge_menus): Took out g_message left
	over from Bonobo menu merge work.

	* libnautilus/nautilus-glib-extensions.h,
	libnautilus/nautilus-glib-extensions.c
	(nautilus_g_list_free_deep): Added convenience function for
	getting rid of a GList of things that can be freed with g_free.

	* icons/Makefile.am, icons/certified.gif, icons/changed.gif,
	icons/confidential.gif, icons/emblem-certified.gif,
	icons/emblem-changed.gif, icons/emblem-confidential.gif,
	icons/emblem-encrypted.gif, icons/emblem-important.gif,
	icons/emblem-new.gif, icons/emblem-personal.gif,
	icons/emblem-remote.gif, icons/emblem-symbolic-link.png,
	icons/encrypted.gif, icons/i-symlink.png, icons/important.gif,
	icons/new.gif, icons/personal.gif, icons/remote.gif:
	Changed all emblem icons to have names that start with "emblem-".
2000-03-07 20:04:24 +00:00
John Sullivan bc4cb175a7 Lots of work to use Bonobo menu merging. The file manager now merges various
items into the window's menubar, which has been slightly tweaked also.
2000-03-07 02:52:07 +00:00
Darin Adler 4019aa50d4 Fixed bug in Unstretch I just introduced.
Got emblems drawing.

	* gnome-icon-container.c (gnome_icon_container_is_stretched),
	(gnome_icon_container_unstretch): Fixed bug where Unstretch would do
	all the icons, not just the selected ones.

	* nautilus-icons-view-icon-item.c (draw_stretch_handles),
	(emblem_layout_reset), (emblem_layout_next), (draw_pixbuf),
	(nautilus_icons_view_icon_item_draw), (hit_test_pixbuf),
	(hit_test), (nautilus_icons_view_icon_item_bounds): Added code to
	draw emblems and take them into account for hit testing and bounds
	calculation.

	* gnome-icon-container.c (update_icon):
	* nautilus-icons-view-icon-item.c (nautilus_icons_view_icon_item_draw):
	Moved rule about which zoom levels can have text displayed out of the
	canvas item class into the container. This is only one of many needed
	cleanups to how the "text in an icon" is handled.
2000-03-07 01:10:04 +00:00
Darin Adler 6da20678f6 Added missing code to get stretching to work again. (Oops.)
* libnautilus/gnome-icon-container.c
	(gnome_icon_container_move_icon): Added missing code to get
	stretching to work again. (Oops.)
	(gnome_icon_container_is_stretched), (gnome_icon_container_unstretch):
	Fixed the unstretch code so it will work on multiple icons.

	* src/file-manager/fm-directory-view-icons.c
	(fm_directory_view_icons_append_selection_context_menu_items):
	Make menu item name plural when there are multiple icons to
	unstretch.

	* libnautilus/nautilus-icons-view-icon-item.c
	(nautilus_icons_view_icon_item_draw): Draw a box around the item
	when the stretch handles are visible. This looks better.

	* libnautilus/nautilus-icons-view-icon-item.h: White space.
2000-03-06 22:09:29 +00:00
Darin Adler 2d3c87e1df Added the concept of separate X and Y scale factors to more
of the code. Even though we don't want to scale the two
	dimensions separately at the moment, I figured it was better
	to go in this direction than to remove all the separate X
	and Y stuff that Seth Nickell added.

	* libnautilus/gnome-icon-container-dnd.c
	(gnome_icon_container_receive_dropped_icons):
	* libnautilus/gnome-icon-container-private.h:
	* libnautilus/gnome-icon-container.c (icon_get_actual_size),
	(icon_new), (icon_get_size), (start_stretching), (update_icon),
	(gnome_icon_container_add), (gnome_icon_container_is_stretched),
	(gnome_icon_container_unstretch),
	(gnome_icon_container_move_icon):
	* libnautilus/gnome-icon-container.h:
	Got rid of the old "scale", "xscale", and "yscale" and replaced
	them with "scale_x" and "scale_y". Made the code always set the
	scale factor through the gnome_icon_container_move_icon bottleneck
	so the changes are all reported throught the icon_moved signal.

	* src/file-manager/fm-directory-view-icons.c:
	(add_icon_if_already_positioned),
	(fm_directory_view_icons_icon_moved_cb):
	Store only a single scale factor if the X and Y are both scaled
	exactly the same (the normal case). Also, use a default for
	the scale factor so we don't save 1.0 for every file.

	* libnautilus/nautilus-gtk-extensions.h:
	* libnautilus/nautilus-gtk-extensions.c:
	My original change required an additional marshal function. I
	decided to add it anyway even though I don't need it right now.

	* libnautilus/nautilus/nautilus-bookmark.c
	(nautilus_bookmark_get_pixmap_and_mask):
	Changed to use the nautilus_icon_factory_get_pixbuf_for_file
	convenience function which has a simpler interface.

	* libnautilus/nautilus-icon-factory.h:
	* libnautilus/nautilus-icon-factory.c:
	Added separate X and Y scaling of icons for possible future
	use; the convenience functions still use the same size in
	both dimentions.

	* components/music/.cvsignore:
	  New directory, new .cvsignore needed.

	* RENAMING: Some more name change ideas.
2000-03-06 21:21:15 +00:00
Andy Hertzfeld 3f9cedbede added a nautilus_has_suffix routine and used it in a couple of places;
added a nautilus_has_suffix routine and used it in a couple of places;
       made sure all thumbnail's have the appropriate 'png' suffix;
       made thumbnailing call ImageMagick for formats that gdk-pixbuf comes up
       empty on.
2000-03-06 03:28:36 +00:00
Andy Hertzfeld abb888bc67 added a music view component for displaying directories of mp3 files, and
added a music view component for displaying directories of mp3 files,
      and also made a new mechanism for content view components to be
      explicitly specified in the metadata for a directory
2000-03-06 00:22:44 +00:00
Jonathan Blandford d5c646e815 added libpng to Makefile.am
2000-03-03  Jonathan Blandford  <jrb@redhat.com>

	* libnautilus/Makefile.am (libnautilus_la_LDFLAGS): added libpng
	to Makefile.am

	* configure.in: added autoconf check for png.
2000-03-03 23:52:55 +00:00
Maciej Stachowiak 86c1779810 Don't bomb on a zero-length metafile.
* libnautilus/nautilus-directory.c
	(nautilus_directory_try_to_read_metafile): Don't bomb on a
	zero-length metafile.
2000-03-03 12:01:40 +00:00
Maciej Stachowiak 742ae8748d Icon stretching is now persistent in the metafile, patch from Seth
Nickell <snickell@stanford.edu>:

	* libnautilus/gnome-icon-container.c, gnome-icon-container.h,
	gnome-icon-container-dnd.c: Add xscale and yscale arguments to
	"icon_moved" signal to allow more unified handling of geometry
	changes.
	* libnautilus/nautilus-metadata.h: Add definition of
	ICON_VIEW_SCALE_METADATA_KEY.
	* srf/file-manager/fm-directory-view-icons.c: Save the stretch
	factor to the metafile when stretching and restore it when loading
	the directory.
2000-03-03 11:53:48 +00:00
Andy Hertzfeld 1086c411dd changed thumbnailing code to use gdk-pixbuf to make the thumbnails and
changed thumbnailing code to use gdk-pixbuf to make the thumbnails and
       libpng to save them.
2000-03-03 03:22:10 +00:00
Andy Hertzfeld dae237b696 fixed bugs in thumbnail stuff by quoting parameters to the scaling command
fixed bugs in thumbnail stuff by quoting parameters to the scaling
	command and handling a NULL controller better.
2000-03-02 05:10:45 +00:00
Andy Hertzfeld 618ca4bc4a implemented automatic thumbnail creation for large images
implemented automatic thumbnail creation for large images
2000-03-02 03:13:00 +00:00
Andy Hertzfeld 53c804e28f made the return key activate all selected icons
made the return key activate all selected icons
2000-02-25 22:11:29 +00:00
Andy Hertzfeld 4b0232a0b0 pin icons to specified size, at least initially, currently set to 80
pin icons to specified size, at least initially, currently set to 80 pixels
2000-02-25 09:40:28 +00:00
Maciej Stachowiak d51f25f92b Make sure to gnome_vfs_async_cancel our GnomeVFSAsyncHandle before setting
* src/ntl-uri-map.c (my_notify_when_ready): Make sure to
	gnome_vfs_async_cancel our GnomeVFSAsyncHandle before setting it
	to NULL, to avoid leaking gnome-vfs-slave processes.
	* libnautilus/nautilus-directory.c (nautilus_directory_load_done):
	When loading is complete, make sure to gnome_vfs_async_cancel the
	handle before setting it NULL, to avoid leaking gnome-vfs-slave
	processes.
	* src/file-manager/fm-directory-view.c
	(disconnect_model_handlers): if we have a NautilusDirectory in
	use, make sure to call nautilus_directory_stop_monitoring on it to
	avoid leaking gnome-vfs-slave processes.
2000-02-25 05:07:22 +00:00
John Sullivan 267410d373 Improve the error message framework and the specific error messages when a file
can't be displayed.
2000-02-25 00:55:54 +00:00
Andy Hertzfeld d793b7dc57 implemented delete context menu item. It's still not removing entries from
implemented delete context menu item.  It's still not removing entries from
	the model but it otherwise mostly there.
2000-02-24 21:35:51 +00:00
Maciej Stachowiak 1f887dce94 Nautilus was getting an assertion failure on startup, so I weakened the
* libnautilus/nautilus-icons-view-icon-item.c
	(nautilus_icons_view_icon_item_set_emblems): Nautilus was getting
	an assertion failure on startup, so I weakened the
	assertion. Darin should look at my fix.
2000-02-24 07:09:32 +00:00
Maciej Stachowiak 839744dac3 Added Nautilus::Zoomable and Nautilus::ZoomableFrame interfaces. New files
* idl/nautilus.idl: Added Nautilus::Zoomable and
	Nautilus::ZoomableFrame interfaces.
	* nautilus-zoomable.c, nautilus-zoomable.h: New files for the
	NautilusZoomable class. This class is used to implement the
	Nautilus::Zoomable interface on a nautilus view or other control.
	* Makefile.am: Added nautilus.c and nautilus.h to the build.
2000-02-24 04:02:44 +00:00
Darin Adler 4f2240f04d Some of the underlying work to prepare for emblems on the icons.
* style-guide.html: Some minor updates to the style guide,
	including rules about headers.

	* libnautilus/nautilus-icon-factory.h,
	libnautilus/nautilus-icon-factory.c:
	(nautilus_icon_factory_get_emblem_icons_for_file),
	(nautilus_scalable_icon_get), (nautilus_icon_factor_clear),
	(nautilus_icon_factory_load_file),
	(nautilus_gdk_pixbuf_composite_corner),
	(nautilus_icon_factor_load_icon), (nautilus_scalable_icon_hash),
	(nautilus_scalable_icon_equal),
	(nautilus_icon_factory_get_icon_for_file), (load_specific_image):
	Added interface for getting emblem icons for a file, and got rid
	of the symbolic-link overlay that was previously built into the
	icon.

	* libnautilus/gnome-icon-container.c (update_icon):
	Get pixbufs for all emblems and pass into the icon object.

	* libnautilus/nautilus-icons-controller.c
	(nautius_icons_controller_get_icon_image):
	src/file-manager/fm-icons-controller.h,
	src/file-manager/fm-icons-controller.c
	(fm_icons_controller_get_icon_image): Return a list of emblem
	images along with the main image.

	* libnautilus/nautilus-icons-view-icon-item.h,
	libnautilus/nautilus-icons-view-icon-item.c
	(nautilus_icons_view_icon_item_set_emblems),
	(nautilus_icons_view_icon_item_destroy): Keep a list of emblem
	pixbufs in each icon. We don't draw them quite yet.

	* libnautilus/gdk-extensions.h, libnautilus/gdk-extensions.c:
	(nautilus_gdk_pixbuf_list_ref), (nautilus_gdk_pixbuf_list_unref),
	(nautilus_gdk_pixbuf_list_free): Convenience functions for
	manipulating lists of GdkPixbuf objects.

	* libnautilus/nautilus-directory.h,
	libnautilus/nautilus-directory.c: (nautilus_file_list_ref),
	(nautilus_file_list_unref), (nautilus_file_list_free): Convenience
	functions for manipulating lists of NautilusFile objects. Also got
	rid of NautilusFileList typedef.

	* libnautilus/nautilus-icon-factory.h,
	libnautilus/nautilus-icon-factory.h:
	(nautilus_scalable_icon_list_free): Convenience function for
	manipulating lists of NautilusScalableIcon objects.

	* libnautilus/nautilus-glib-extensions.h,
	libnautilus/nautilus-glib-extensions.c: (nautilus_g_list_equal):
	Function to compare two GLists to see if they are
	identical. Particularly useful with lists of reference-counted
	objects.

	* src/file-manager/fm-directory-view-icons.c
	(fm_directory_view_icons_destroy),
	(add_icon_if_already_positioned),
	(fm_directory_view_icons_append_selection_context_menu_items),
	(display_icons_not_already_positioned),
	(fm_direectory_view_icons_get_selection):
	src/file-manager/fm-directory-view-list.c
	(fm_directory_view_list_get_selection):
	src/file-manager/fm-directory-view.c (display_selection_info),
	(display_pending_files), (add_files_cb), (open_in_new_window_cb),
	(fm_directory_view_real_append_selection_context_menu_items): Got
	rid of use of NautilusFileList typedef, corrected ref. counting of
	files in the lists by using new calls.

	* src/nautilus-bookmarklist.c, src/nautilus-bookmarks-menu.c,
	src/nautilus-index-tabs.c,
	src/file-manager/fm-directory-view-icons.c,
	src/file-manager/fm-directory-view.c,
	src/file-manager/fm-icons-controller.c: A bit of reformatting.
2000-02-24 00:54:57 +00:00
John Sullivan 26fc2ec616 Improved the status text that appears in the file manager after changing the
selection (now accounts for directories and other files separately).
2000-02-22 21:53:25 +00:00
Elliot Lee e344e86ba8 include string.h to avoid warnings
* libnautilus/nautilus-file-utilities.c: include string.h to avoid warnings
2000-02-22 21:29:54 +00:00
Darin Adler 655a582d2e Fixed bug where the Eazel-theme icon for the document reverts to
the non-theme icon when you are zoomed in all the way.

	* nautilus-icon-factory.c: (nautilus_icon_factory_load_file),
	(add_size_to_image_name), (get_icon_file_path),
	(nautilus_icon_factory_load_file),
	(nautilus_icon_factory_load_icon), (load_specific_image): Changed
	logic so the decision about whether to use a theme icon or the
	default icon for each icon is decided based on the presence of the
	non-sized version of the icon rather than the presence of the icon
	for a particular size.

	* nautilus-file-utilities.h, nautilus-file-utilities.c:
	Cleaned up header and includes and changed ".gnomad" to
	".nautilus".  (At first I had added a nautilus_file_exists
	function, but then I remembered the g_file_exists function in
	gnome-utils.h.)
2000-02-22 19:51:09 +00:00
Andy Hertzfeld c407acb457 hi-res versions of the standard gnome folder icon, contributed by Kenneth
hi-res versions of the standard gnome folder icon, contributed by
       Kenneth Christiansen
2000-02-22 19:40:41 +00:00
Andy Hertzfeld a12301dbaf implemented text in icons feature, for eazel-style icons only also, added
implemented text in icons feature, for eazel-style icons only
       also, added multiple sizes of large gnome-style standard document
       icons contributed by Kenneth Christiansen
2000-02-22 10:09:59 +00:00
Maciej Stachowiak 192e04921a Fixed crashes introduced in the course of my reorganization - in one case
* libnautilus/ntl-view-frame.c: Fixed crashes introduced in the
	course of my reorganization - in one case I g_new()'d something
	that should have been g_new0()'d, in another I forgot to
	CORBA_exception_init().
2000-02-22 01:49:16 +00:00
John Sullivan 6f858ac912 Made right-click context-menu selection behavior in the file manager more
sensible. (It now modifies the selection exactly as it would on a normal
left-click, and the context menu applies to the whole set of selected items.)
Note that nautilus is quite broken right now; I can't activate an icon or switch
to View as List without dying in Bonobo-land. I managed to test these changes
even so by tiptoeing around the problems.
2000-02-21 21:34:19 +00:00
Maciej Stachowiak 3d43e3d019 Don't include <gtk/gtkbin.h>; do include <gtk/gtkwidget.h>.
* libnautilus/ntl-view-frame.h: Don't include <gtk/gtkbin.h>; do
	include <gtk/gtkwidget.h>.
2000-02-21 12:30:30 +00:00
Maciej Stachowiak 615368e3e7 Moved fields from object struct to separate private struct.
* libnautilus/ntl-view-frame.c, libnautilus/ntl-view-frame.h:
        Moved fields from object struct to separate private struct.
2000-02-20 02:53:02 +00:00
Maciej Stachowiak 53c5e06a43 Changed NautilusViewFrame to allow creation of `Nautilus::View' objects
* libnautilus/ntl-view-frame.c, libnautilus/ntl-view-frame.h:
	Changed NautilusViewFrame to allow creation of `Nautilus::View'
	objects that have additional interfaces while sharing the actual
	control. This will allow, for instance, the creation of components
	that are both a `Nautilus::View' and a `Bonobo::Embeddable'. The
	basic changes are to require a `BonoboObject' with a
	`Bonobo::Control' interface at construction time.
	- Two creation functions are provided: `nautilus_view_frame_new',
	which takes a GtkWidget, creates a new control that contains that
	widget, and the constructs a NautilusViewFrame with that control,
	and `nautilus_view_frame_new_from_control', which creates a
	NautilusViewFrame that gets added as an additional interface to an
	existing control.
	- In the course of doing this it became clear that it would be
	easier if NautilusViewFrame were changed to inherit from
	BonoboObject rather than GtkBin, so this was done; as a result,
	the nautilus_view_frame_get_bonobo_object call was removed, since
	the view_frame _is_ a bonobo object. However, a
	nautilus_view_frame_get_bonobo_control call was added as a
	convenience, to allow other code to avoid having to
	query_local_interface for the control object manually.
	* libnautilus/ntl-meta-view-frame.c,
	libnautilus/ntl-meta-view-frame.h,
	libnautilus/ntl-content-view-frame.c,
	libnautilus/ntl-content-view-frame.h: Analogous changes; mainly,
	added `nautilus_meta_view_frame_new',
	`nautilus_meta_view_frame_new_from_control',
	`nautilus_content_view_frame_new' and
	`nautilus_content_view_frame_new_from_control'.
	* components/help/hyperbola-nav-index.c,
	components/help/hyperbola-nav-tree.c,
	components/history/ntl-history-view.c,
	components/html/ntl-web-browser.c, components/notes/ntl-notes.c,
	components/websearch/ntl-web-search.c, src/ntl-app.c,
	src/file-manager/fm-directory-view.c: Fixed initialization and
	object creation functions to deal with the above API change.
2000-02-20 01:29:39 +00:00
Darin Adler 02ed5fb6b3 Set up the step_increment so the vertical and horizontal scroll bars will
* gnome-icon-container.c: (set_scroll_region):
	Set up the step_increment so the vertical and horizontal scroll
	bars will scroll when you click on the arrows.
2000-02-18 23:06:45 +00:00
Darin Adler ff1efb492d Hooked up the menu item for using the Eazel Theme Icons so people can try
* src/file-manager/fm-directory-view.c:
	(use_eazel_theme_icons_cb), (finish_adding_menu_item),
	(add_menu_item), (add_check_menu_item),
	(fm_directory_view_real_append_background_context_menu_items):
	Hooked up the menu item for using the Eazel Theme Icons so people
	can try out the icons that are tuned at different sizes.

	* libnautilus/nautilus-icon-factory.h:
	* libnautilus/nautilus-icon-factory.c,
	(nautilus_icon_factory_get), (nautilus_icon_factory_new),
	(nautilus_icon_factory_initialize),
	(nautilus_icon_factory_initialize_class),
	(nautilus_icon_factory_get_theme),
	(nautilus_icon_factory_set_theme): Added a signal "theme_changed"
	to the icon factory, and had to add a visible icon factory object
	so clients can connect to the signal.

	* libnautilus/gnome-icon-container.c,
	(gnome_icon_container_initialize),
	(gnome_icon_container_request_update_all): Update all icons when
	the theme changes.

	* docs/recommended-books.html: Added this since
	style-guide.html refers to it.
2000-02-18 22:29:44 +00:00
John Sullivan 0653c1cccc Made bookmarks display just file/directory name (instead of path) by default;
made history items appear in Go menu.
2000-02-18 17:53:21 +00:00
Andy Hertzfeld aa3046861f more work on index panel command buttons
more work on index panel command buttons
2000-02-18 08:14:00 +00:00
Andy Hertzfeld 1fd49af141 implemented command buttons based on mime-types in the index panel
implemented command buttons based on mime-types in the index panel
2000-02-18 02:51:41 +00:00
Darin Adler 3bce71a502 Hand tuned icons for multiple resolutions.
So for example you can have an icon designed for the 96x96
	size, which is called i-directory-96.png, and it will be
	loaded instead of loading i-directory.png and scaling it.

	* libnautilus/nautilus-icon-factory.c:
	(nautilus_icon_factory_get_icon_name_for_regular_file),
	(add_size_to_icon_name), (nautilus_icon_factory_load_icon),
	(nautilus_icon_factory_create_image_for_item),
	(get_larger_icon_size), (get_smaller_icon_size),
	(get_next_icon_size_to_try), (load_specific_image),
	(load_image_for_scaling), (load_image_scale_if_necessary),
	(nautilus_icon_factory_mark_recently_used), (mark_recently_used),
	(nautilus_icon_factory_get_pixbuf_for_icon),
	(get_image_from_cache), (nautilus_icon_factory_scale): Changed the
	icon factory so it will look for icons of multiple resolutions and
	scale the nearest. Also made other improvements including sharing
	a single fallback icon instead of making multiple ones, using the
	"core-dump" icon for files named "core", adding some additional
	g_return_if_fail.

	* libnautilus/nautilus-icon-factory.c:
	(self_test_next_icon_size_to_try),
	(nautilus_self_check_icon_factory):
	* libnautilus/nautilus-lib-self-check-functions.h:
	The new code needed a bit of self-check code, so I added it.

	* libnautilus/nautilus-directory.c:
	(nautilus_directory_try_to_read_metafile),
	(nautilus_directory_construct_alternate_metafile_uri):
	Since "make check" was failing, I checked to see what was wrong.
	The code that was respecting the new "valid_fields" part of
	GnomeVFSFileInfo was looking at the wrong field (flags instead
	of valid_fields), which caused all metafile reading to fail.
	While debugging this, I noticed that the alternate metafiles
	had particularly bad long names, so I fixed that too.

	* libnautilus/nautilus-directory.c: (nautilus_file_ref):
	* libnautilus/nautilus-glib-extensions.c:
	(nautilus_strdup_strftime):
	* libnautilus/nautilus-string.c: (nautilus_string_to_int):
	Switched from using <limits.h> constants to the ones from
	<glib.h>. I have no idea why I made this change. All hail
	glib! C Standard be damned!

	* fm-directory-view.c:
	(use_eazel_theme_icons_cb), (add_menu_item),
	(fm_directory_view_real_append_background_context_menu_items):
	Started on a user interface to switch to the Eazel theme
	icons so you can see the multiple-resolution icons, but
	I wanted to check in, so I stopped before it was done.

	* src/nautilus-index-title.c:
	Reindented Andy's new code to match the emacs mode header.

	* configure.in:
	* icons/Makefile.am:
	* icons/eazel/.cvsignore:
	* icons/eazel/Makefile.am:
	* icons/eazel/i-directory-24.png:
	* icons/eazel/i-directory-36.png:
	* icons/eazel/i-directory-72.png:
	* icons/eazel/i-directory-96.png:
	* icons/eazel/i-directory.png:
	I needed some variable-size icons to demonstrate the multiple
	resolution support in the icon factory, so I added a few
	directory icons from gnomad. Since these don't match the other
	icons, I made them part of an "eazel" icons theme.

	* RENAMING: Some new name ideas.
2000-02-18 01:17:30 +00:00
John Sullivan 7171baf7d2 Change empty directory string from "empty" to "0 items". 2000-02-17 00:26:10 +00:00
Elliot Lee d9ed7d4863 Fix the GOAD ID for help index. Add help index. To avoid a warning in case
* components/help/hyperbola-main.c: Fix the GOAD ID for help index.
* components/help/hyperbola.goad: Add help index.
* libnautilus/nautilus-directory.c: To avoid a warning in case
nautilus_directory_new fails, and speed things up, remove
unnecessary cast.
* libnautilus/nautilus-icon-factory.c: Add sanity checks to avoid segfaults.
* src/nautilus-index-title.c: Add sanity check, plus try to handle
case where nautilus_file_get() returns NULL.
* src/ntl-window.c, src/ntl-window-msgs.c: Notify the index panel
of a URI change when we notify everyone else, instead of doing it when
the user requests a change.
2000-02-17 00:24:25 +00:00
Darin Adler 9b94323cc3 Added icon stretching and did some cleanups.
Stretched icons aren't yet persistent (the scale factor is not
	saved in metadata), but that's not much more work.

	* libnautilus/gnome-icon-container-private.h:
	* libnautilus/gnome-icon-container.h:
	* libnautilus/gnome-icon-container.c: (icon_new), (icon_position),
	(icon_set_position), (icon_get_size), (icon_set_size),
	(icon_toggle_selected), (icon_select), (icon_set_selected),
	(button_press_event), (gnome_icon_container_begin_stretch),
	(start_stretching), (gnome_icon_container_stretch),
	(continue_stretching), (gnome_icon_container_end_stretch),
	(end_stretching), (button_release_event), (motion_notify_event),
	(handle_icon_button_press), (gnome_icon_container_clear),
	(request_update_one), (update_icon), (get_first_selected_icon),
	(gnome_icon_container_show_stretch_handles),
	(gnome_icon_container_has_stretch_handles),
	(gnome_icon_container_is_stretched),
	(gnome_icon_container_unstretch), (compute_stretch),
	(nautilus_self_check_compute_stretch),
	(nautilus_self_check_gnome_icon_container):
	* libnautilus/nautilus-icons-view-icon-item.h:
	* libnautilus/nautilus-icons-view-icon-item.c:
	(nautilus_icons_view_icon_item_draw),
	(nautilus_icons_view_icon_item_point),
	(nautilus_icons_view_icon_item_set_show_stretch_handles),
	(nautilus_icons_view_icon_item_get_hit_stretch_handle):
	* libnautilus/nautilus-lib-self-check-functions.h:
	Added machinery for stretching icons.

	* src/file-manager/fm-directory-view.h:
	* src/file-manager/fm-directory-view.c:
	(append_item_context_menu_items),
	(fm_directory_view_real_append_item_context_menu_items),
	(fm_directory_view_initialize_class), (create_item_context_menu):
	Added machinery for views to have view-specific menu items for
	icons as well as for the window as a whole.

	* src/file-manager/fm-directory-view-icons.c:
	(fm_directory_view_icons_initialize_class),
	(fm_directory_view_icons_append_item_context_menu_items),
	(show_stretch_handles_cb), (unstretch_item_cb):
	Added menu items for stretching icons.

	* libnautilus/gnome-icon-container.c: (start_rubberbanding):
	Fixed bug that would result in two rubberband timeouts at
	once if you did rubberbanding quickly.

	* components/notes/.cvsignore: Andy's new component needs a
	.cvsignore file for its generated pieces.

	* libnautilus/nautilus-directory.c:
	(nautilus_directory_try_to_read_metafile),
	(nautilus_directory_read_metafile):
	Simplified logic in metafile-reading functions and fixed a bug
	where the vfs handle would be left open if certain categories
	of errors occurred.

	* libnautilus/nautilus-gtk-extensions.h:
	Added a missing gtk_marshal function.

	* libnautilus/nautilus-icon-factory.h:
	* libnautilus/nautilus-icon-factory.c:
	(nautilus_icon_size_for_zoom_level),
	(nautilus_get_icon_size_for_zoom_level),
	(nautilus_icon_factory_get_pixbuf_for_file),
	(nautilus_icon_factory_get_pixmap_and_mask_for_file):
	* src/nautilus-index-title.c: (nautilus_index_title_set_up_icon):
	* src/nautilus-zoom-control.c: (set_zoom_level):
	* src/file-manager/fm-directory-view-list.c:
	(fm_directory_view_list_bump_zoom_level), (install_icon):
	Made some API improvements for the icon factory. Added a missing
	get_ to the name nautilus_get_icon_size_for_zoom_level and added
	convenience functions for the most common uses of the factory.

	* libnautilus/ntl-content-view-frame.c:
	* libnautilus/ntl-meta-view-frame.c:
	* libnautilus/ntl-view-frame.c:
	Weaned all the files in libnautilus itself from using the
	libnautilus.h include file. They instead include the parts that
	they need. Also added some missing <config.h> includes.
2000-02-16 19:43:10 +00:00
Elliot Lee 0189d027a6 Pay attention to the GnomeVFSFileInfo flags to determine whether to read
* libnautilus/nautilus-directory.c: Pay attention to the
GnomeVFSFileInfo flags to determine whether to read the metafile.

* components/html/ntl-web-browser.c: Try to fall back to using
gnome-vfs if we can't load it via libwww. Sort of bad hack, but it
just might work.
2000-02-16 00:59:55 +00:00
Ramiro Estrugo 943a049757 Added displacement offset for popup menus, so that the first item does'nt
get triggered right away.
2000-02-15 20:46:14 +00:00
John Sullivan b9e12ae6ac Moved NautilusBookmark from src/ to libnautilus/, in anticipation of using it in
History metaview.
2000-02-15 19:46:52 +00:00
Andy Hertzfeld 99c33f4baf fixed notes component by initializing gnome-vfs, changed metadata type to
fixed notes component by initializing gnome-vfs, changed metadata
       type to keep it separate from panel notes
2000-02-15 08:00:41 +00:00
John Sullivan 21586bbcfb First checkin for right-click menus on the Back and Forward buttons. They work,
but there are a few finishing touches outstanding.
2000-02-15 01:13:52 +00:00
Darin Adler f90a9976f6 Undo the cast. 2000-02-14 20:55:14 +00:00
Darin Adler 1f59bf3cb2 Need a cast in here so people can build while I wait for the OK from
* libnautilus/nautilus-icon-factory.c:
	(nautilus_icon_factory_load_icon):
	Need a cast in here so people can build while I wait for the OK
	from Federico to check in my const change to gdk-pixbuf.
2000-02-14 20:43:31 +00:00
Elliot Lee e22cc60a7c Use GPOINTER_TO_UINT() instead of a manual cast.
* libnautilus/nautilus-icon-factory.c: Use GPOINTER_TO_UINT() instead of a manual cast.
2000-02-14 20:35:45 +00:00
Darin Adler db87f5e7e0 Handle the case where you try to make a NautilusDirectory object for
* libnautilus/nautilus-directory.c: (nautilus_directory_read_metafile):
	Handle the case where you try to make a NautilusDirectory object for
	something that's a file.

	* libnautilus/nautilus-directory.c: (nautilus_directory_get_metadata):
	Handle NULL directory objects better.

	* src/ntl-index-panel.c:
	Changed handling of NULL directory case so it will display something
	instead of doing early exits that leave the display as-is.

	* src/nautilus-index-title.h:
	* src/nautilus-index-title.c:
	Reformatted, some minor cleanups.
2000-02-14 20:32:09 +00:00
Darin Adler 291fb2d693 Redid the icon factory to fix a few things:
* libnautilus/nautilus-icon-factory.c:
	Redid the icon factory to fix a few things:

	- Replaced the existing non-working count-based LRU algorithm with
	  one that works (uses a linked list).
	- Keep resized icons in the cache.
	- Hand out a single NautilusScalableIcon when multiple callers ask
	  for the same icon instead of a new one each time.
	- Fixed one bug where pixbuf's would get an extra ref and never get
	  freed once they are no longer used.

	* libnautilus/nautilus-metadata.h:
	* src/nautilus-index-title.c (nautilus_index_title_set_up_info):
	* libnautilus/nautilus-icon-factory.c
	(nautilus_icon_factory_get_icon_for_file):
	Added keys for the two pieces of metadata Andy just added.

	* libnautilus/gnome-icon-container-private.h:
	* libnautilus/gnome-icon-container.c: (scroll),
	(make_icon_visible), (set_scroll_region): Fixed the code that
	resizes the canvas as items are added and removed to properly
	handle the case where the canvas extends into negative-coordinate
	territory. This included removing the width and height that were
	stored in the private structure.

	* libnautilus/nautilus-directory.c: (nautilus_directory_get): Tiny
	formatting tweak.
2000-02-14 19:38:45 +00:00
John Sullivan 6db4c052ff Quick fixes to some NULL-dereference problems in new index title code;
also made zoom level change stick until you visit a location that had a zoom
level set earlier.
2000-02-14 18:19:23 +00:00
Andy Hertzfeld 6245e766c4 made index panel display "notes" from metadata if present, made it use
made index panel display "notes" from metadata if present,
    made it use custom icons from metadata if present.
2000-02-14 07:23:10 +00:00
Andy Hertzfeld 3b7bcfece0 made it no longer use a drag shadow rectangle when dragging a single item
made it no longer use a drag shadow rectangle when dragging a single item
2000-02-12 07:17:45 +00:00
John Sullivan c3ac75e6fa Made right-clicking select the clicked item before popping up the menu; also
fixed context-click bug in list view.
2000-02-11 23:01:15 +00:00
John Sullivan a1714db8bf Stored pointers to all buttons & menu items that are accessed later; fixed
off-by-two bug in directory item-counting hack.
2000-02-11 21:39:08 +00:00
John Sullivan edced7c30a Removed : from the list of line-breaking characters to preserve time formatting. 2000-02-11 05:54:13 +00:00
John Sullivan ceb2a085b2 Icon-text-choosing window now supports "owner", "group", and "permissions". 2000-02-11 02:43:28 +00:00
John Sullivan bebdc60801 Sort directories by item count when sorting by size. 2000-02-10 23:17:55 +00:00
John Sullivan 1c03b82405 Quick hack to get item counts showing for directory sizes. 2000-02-10 22:55:25 +00:00
Darin Adler 6b8d90224d Reworked the canvas item class used by the icon
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.)
2000-02-10 02:10:36 +00:00
John Sullivan ba73217b2b Some more icon-text tweaks: UI now prevents multiple lines with same attribute;
blank types say "unknown type", and directories say "--" for size again (to
avoid blank lines).
2000-02-10 02:10:36 +00:00
Elliot Lee 6de18014ef Implement truncate.
Implement truncate.
2000-02-10 02:10:35 +00:00
Elliot Lee a0d4440b0f In notify_location_change, send progress back (because the Bonobo control,
* src/ntl-view-bonobo-control.c: In notify_location_change, send
progress back (because the Bonobo control, which might be the
content view, can't do it).

* src/ntl-view-bonobo-subdoc.c: As above, plus don't use
PersistFile interface, plus use bonobo-stream-vfs instead of
bonobo-stream-fs.

* src/ntl-uri-map.c: If no content type is found, default to text/plain.

* libnautilus/bonobo-stream-vfs.[ch], libnautilus/Makefile.am:
Initial implementation of bonobo streams in terms of Gnome VFS.
2000-02-10 01:54:50 +00:00
Darin Adler 423b5c4817 Reworked the canvas item class used by the icon
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.)
2000-02-10 00:33:49 +00:00
Elliot Lee 071bafd24c Add assert to try and catch the 'man:ls' bug...
Add assert to try and catch the 'man:ls' bug...
2000-02-09 19:02:40 +00:00
John Sullivan 00073501e0 Finished first decent UI for icon-text choosing. 2000-02-09 02:46:56 +00:00
John Sullivan 7b726aa67f Add support for FMDirectoryView subclasses to add additional background context
menu items; first (primitive) cut at UI for choosing which text to display
beneath icons, will improve soon.
2000-02-08 00:41:23 +00:00
Elliot Lee ed8a956763 Include the .idl files of other modules that we use. Define -D_REENTRANT,
* idl/*.idl: Include the .idl files of other modules that we use.
* libnautilus/Makefile.am, src/Makefile.am, src/file-manager/Makefile.am:
Define -D_REENTRANT, just in case.
* src/file-manager/Makefile.am: Add cflags for .idl compilation.
* components/help/Makefile.am: Build converters. Stop installing
the now-unneeded .schemes file.
* components/websearch/ntl-web-search.c: Get rid of
gnome_button_can_default()
* libnautilus/nautilus-icons-view-icon-item.c: Get rid of missing
prototypes and associated warnings by including needed headers.
* src/ntl-types.h, src/ntl-uri-map.[ch], src/ntl-window.h,
src/ntl-window-msgs.c: Remove scheme mapping functionality (now
done in gnome-vfs). Use asynchronous version of get_file_info.
2000-02-07 21:51:19 +00:00
Elliot Lee 256c431a94 Build converters. Stop installing the now-unneeded .schemes file.
* components/help/Makefile.am: Build converters. Stop installing
the now-unneeded .schemes file.

* components/websearch/ntl-web-search.c: Get rid of
gnome_button_can_default()

* libnautilus/nautilus-icons-view-icon-item.c: Get rid of missing
prototypes and associated warnings by including needed headers.

* src/ntl-types.h, src/ntl-uri-map.[ch], src/ntl-window.h,
src/ntl-window-msgs.c: Remove scheme mapping functionality (now
done in gnome-vfs). Use asynchronous version of get_file_info.
2000-02-07 20:34:11 +00:00
John Sullivan 6e68aefbc2 Zooming now shows different pieces of text for each icon at different zoom
levels. Currently the pattern is hardwired; next I'll make it configurable.
2000-02-04 02:40:56 +00:00
John Sullivan e9c820b5ce More groundwork for displaying more textual info under icons at higher zoom
levels.
2000-02-03 23:05:53 +00:00
John Sullivan d09798aab9 Changed icon scaling back to ART_FILTER_BILINEAR again after jrb and federico
both pointed out that the black-scaled-icon problem should be (and was) fixed
with the latest gdk-pixbuf.
2000-02-03 19:04:30 +00:00
John Sullivan 4ce74ec207 Fixed bug where scaled icons in list view were nearly black by reverting
to ART_LEVEL_NEAREST when scaling. Added support for icon labels with
embedded carriage returns.
2000-02-02 20:18:57 +00:00
Elliot Lee e12312388a If an error happens, we need to reset the location bar to current
* 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.
2000-02-01 23:51:09 +00:00
John Sullivan d0c581b5c3 Fixed bug where extra item appeared at each reload or view switch. 2000-02-01 21:09:10 +00:00
Darin Adler 39b26449f4 Changed the icon factory interface in a few ways: 1) There's no longer a
* libnautilus/nautilus-icon-factory.h:
	* libnautilus/nautilus-icon-factory.c:
	(nautilus_icon_factory_new):
	(nautilus_icon_factory_destroy):
	(nautilus_get_current_icon_factory):
	(nautilus_icon_factory_get_icon_for_file):
	(nautilus_icon_factory_set_theme):
	(nautilus_icon_factory_get_icon_by_name):
	(nautilus_icon_factory_get_pixbuf_for_icon):
	(nautilus_scalable_icon_ref):
	(nautilus_scalable_icon_unref):
	(nautilus_scalable_icon_get_name):
	(scalable_icon_get):
	(icon_set_possibly_free):
	(scalable_icon_new):
	Changed the icon factory interface in a few ways: 1) There's no
	longer a NautilusIconFactory object. There's just a single global
	icon factory. If we find that we need multiple factories, we can
	implement that later. 2) Instead of going straight from a file to
	a pixbuf, you get a scalable icon, and then get a pixbuf from
	that. This allows you to choose the icon and then get
	different-sized versions of it without going through the icon
	selection process over and over again. There's also a name for
	each icon which can be stored in the metafile so you can get the
	same icon again before you have full information on a file.

	* src/nautilus-bookmark.c:
	(nautilus_bookmark_get_pixmap_and_mask):
	* src/file-manager/fm-directory-view-list.c:
	(install_icon):
	* src/file-manager/fm-icons-controller.c:
	(fm_icons_controller_get_icon_image):
	Changed icon factory clients to use the new interface. Maybe
	after a while I'll add a convenience function that's as simple as
	the old interface was for the common case where you want to go
	straight to the pixbuf, but lets try it this way for a while.

	* libnautilus/nautilus-string.h:
	* libnautilus/nautilus-string.c:
	(nautilus_has_prefix):
	Added nautilus_has_prefix. This checks to see if a string has a
	particular prefix. It's both clearer to read and more efficient
	than Andy's typical trick of calling strstr.

	* libnautilus/nautilus-lib-self-check-functions.h:
	* libnautilus/nautilus-string.c:
	Added self-checks for nautilus-string.c. The tests uncovered a
	bug in nautilus_string_to_int that I fixed.

	* nautilus-glib-extensions.c:
	Just a stray new-line.
2000-02-01 05:34:46 +00:00
John Sullivan fe8e69affc Fixed bug where Select All in list view didn't put selection info in status bar. 2000-02-01 00:39:49 +00:00
Darin Adler 8b485ee223 Oops. Spelled it wrong. 2000-01-31 22:45:00 +00:00
Darin Adler 78c57693cf Started work on icon stretching. In the process, I am doing some
cleanup on the icon container, and I am checking in some of that
	before the stretching is implemented.

	* libnautilus/gnome-icon-container-private.h:
	* libnautilus/gnome-icon-container.c:
	(icon_is_in_region):
	Got rid of width and height stored in each icon.

	* libnautilus/gnome-icon-container.c:
	A lot of cleanup, including getting rid of the
	icon_get_text_bounding_box function.

	* libnautilus/gnome-icon-container.c:
	(gnome_icon_container_begin_stretch):
	(gnome_icon_container_stretch):
	(gnome_icon_container_end_stretch):
	(button_release_event):
	(motion_notify_event):
	(handle_icon_button_press):
	First cut at adding stretching hooks in button handlers.

	* libnautilus/nautilus-icons-view-icon-item.c:
	(nautilus_icons_view_draw_text_box):
	Rewrote to fix bug with position of text when it's too long for
	a single line.

	* libnautilus/nautilus-glib-extensions.h:
	Added a macro named NAUTILUS_G_N_ELEMENTS.
	src/ntl-index-panel.c:
	src/explorer-location-bar.c:
	libnautilus/gtkflist.c:
	Used the NAUTILUS_G_N_ELEMENTS macro.
2000-01-31 22:25:21 +00:00
Andy Hertzfeld 4e1175d7a8 made the keyboard selection rectangle work again, not as a separate canvas
made the keyboard selection rectangle work again, not as a separate
       canvas item like it used to be, but as an attribute drawn by the
       icon item.
2000-01-31 04:53:50 +00:00
John Sullivan de79345d4a Now saves/restores zoom level, and (in list view) sort column & direction. 2000-01-31 04:27:20 +00:00
Darin Adler 58a9b33c33 Changed it to not attempt to create a GC just to measure the text. This
* 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.
2000-01-31 01:30:16 +00:00
Andy Hertzfeld e250cfd796 fixed bug where icons were horizontally mis-positioned after dragging;
fixed bug where icons were horizontally mis-positioned after dragging;
       fixed by taking the center offset into account
2000-01-31 01:09:42 +00:00
John Sullivan 66762e61ef Added convenience functions for getting/setting boolean & integer metadata. 2000-01-31 01:01:22 +00:00
Darin Adler 7c7932a8ae NautilusDirectory is now in charge of loading directories.
FMDirectoryView has been relieved of that responsibility.

	* nautilus-directory.h:
	nautilus-directory.c:
	(nautilus_directory_start_monitoring):
	(nautilus_directory_stop_monitoring):
	(nautilus_directory_is_ready_for_layout):
	(nautilus_directory_new_file):
	(nautilus_directory_are_all_files_seen):
	Added monitoring API that's used to read the contents of
	a directory. Made nautilus_directory_new_file private since
	we now use the monitoring API instead.

	* fm-directory-view.c:
	(fm_directory_view_initialize):
	(stop_load):
	(display_pending_entries):
	(display_pending_files):
	(display_pending_idle_cb):
	(display_timeout_cb):
	(display_pending_timeout_cb):
	(directory_load_cb):
	(schedule_idle_display_of_pending_files):
	(schedule_timeout_display_of_pending_files):
	(unschedule_idle_display_of_pending_files):
	(unschedule_timeout_display_of_pending_files):
	(unschedule_display_of_pending_files):
	(add_files_cb):
	(fm_directory_view_activate_entry):
	(fm_directory_view_load_uri):
	(disconnect_model_handlers):
	(fm_directory_view_stop):
	Changed to use monitoring instead of directly calling
	gnome_vfs_async_load_directory directly.

	* fm-directory-view.c:
	(update_zoom_menu_items):
	(zoom_in_cb):
	(zoom_out_cb):
	(pop_up_context_menu):
	(pop_up_temporary_context_menu):
	(append_background_items):
	(create_background_context_menu):
	(fm_directory_view_popup_item_context_menu):
	(fm_directory_view_popup_background_context_menu):
	Changed to re-created background menu each time instead of
	keeping a single global menu up to date. This is simpler, and
	the imperceptible additional delay from recreating the menu
	each time should not be a problem.

	* ntl-window.c:	(nautilus_window_up):
	ntl-map.c: (nautilus_navinfo_new):
	Handle the case where the current URI is NULL.

	* fm-directory-view-icons.c: (create_icon_container):
	Removed the leftover puts calls in here.
	This gets rid of "A", "B", "C" on each start of nautilus.
2000-01-30 23:39:22 +00:00
John Sullivan 74e70dc7e5 Put #defines for all metadata keys into new central location. 2000-01-30 21:45:17 +00:00
Andy Hertzfeld dd8153b2d0 made fonts scale according to zoom level enabled/disabled zoom items in
made fonts scale according to zoom level
	enabled/disabled zoom items in context menu as necessary
2000-01-30 11:04:09 +00:00
Andy Hertzfeld 3abb791e41 made the shadow rectangles track the icons properly by adding the center
made the shadow rectangles track the icons properly by adding the center
	offset
2000-01-28 10:02:08 +00:00
John Sullivan ecc10811f9 Added icons to bookmarks menu & window; cleaned up some zoom code; fixed a few
storage leaks.
2000-01-28 06:10:00 +00:00
Andy Hertzfeld 6abbef778c made icons be centered properly
made icons be centered properly
2000-01-28 04:49:07 +00:00
John Sullivan 40698cbec9 Renamed FMIconCache to NautilusIconFactory and moved it to libnautilus. 2000-01-27 22:42:04 +00:00
Andy Hertzfeld d07bae8cad fixed dragging when zoomed by scaling the pixbuf and offsets when
fixed dragging when zoomed by scaling the pixbuf and offsets when
	necessary
2000-01-27 11:31:06 +00:00
Andy Hertzfeld c9c47555cc made it position things better when zoomed by multiplying by
made it position things better when zoomed by multiplying by
       pixels_per_unit when appropriate
2000-01-27 05:18:06 +00:00
John Sullivan 10e2b0004b Finished this round of sorting architecture improvements; list view now handles
sorting itself instead of delegating to superclass. Superclass now knows nothing
about sorting.
2000-01-27 03:51:49 +00:00
Elliot Lee 6f9294eebe Add components/help/converters/* makefiles. Check for NULL directory
* configure.in: Add components/help/converters/* makefiles.
* libnautilus/nautilus-directory.c: Check for NULL directory
  result before doing stuff with it.
* src/ntl-index-panel.c: Ditto.
* src/ntl-prefs.c: Add help browser nav tree to list of possibilities.
* src/ntl-window-msgs.c: Handle non-VFS-handleable URIs correctly WRT 'up' button.
2000-01-27 01:37:08 +00:00
Andy Hertzfeld 8c176f1a74 made it respect the scale factor by removing code from
made it respect the scale factor by removing code from compute_viewport_affine
       that was defeating it.
2000-01-27 01:35:56 +00:00
Andy Hertzfeld c9692eff80 hooked up zooming to the background context menu
hooked up zooming to the background context menu
2000-01-27 01:09:23 +00:00
Darin Adler 612168d185 Fixed a bug that was causing some icons to not get selected or unselected
* libnautilus/gnome-icon-container.c:
	(icon_select):
	Fixed a bug that was causing some icons to not get
	selected or unselected properly due to strangeness of
	bit fields.

	* libnautilus/gnome-progressive-loader.h:
	libnautilus/gnome-progressive-loader.c:
	libnautilus/Makefile.am:
	Got rid of GnomeProgressiveLoader.
	We're not going to use it.

	* RENAMING: Andy added a new file that matched RENAMING,
	but then I changed my mind about a renaming, spawning yet
	more renaming!

	* src/file-manager/fm-directory-view-icons.c:
	Just tiny reformatting.
2000-01-27 01:02:52 +00:00
John Sullivan f588a6af29 Some work towards changing the file-sorting framework. 2000-01-26 23:03:15 +00:00
Elliot Lee fc0007b3f9 Link to $(BONOBO_LIBS) Include <string.h> to get prototype for memset.
* libnautilus/Makefile.am: Link to $(BONOBO_LIBS)
* libnautilus/gnome-icon-container.c: Include <string.h> to get prototype for memset.
2000-01-26 21:19:31 +00:00
Maciej Stachowiak a26d6288b2 Build with the recent Bonobo global renaming, and Havoc's changes. A patch
* components/help/hyperbola-main.c,
	components/help/hyperbola-nav-tree.c,
	components/history/ntl-history-view.c, components/html/main.c,
	components/html/ntl-web-browser.c,
	components/websearch/ntl-web-search.c, idl/nautilus.idl,
	libnautilus/gnome-icon-container.c,
	libnautilus/gnome-progressive-loader.c,
	libnautilus/gnome-progressive-loader.h, libnautilus/libnautilus.h,
	libnautilus/ntl-content-view-frame.c,
	libnautilus/ntl-meta-view-frame.c, libnautilus/ntl-view-frame.c,
	libnautilus/ntl-view-frame.h, src/nautilus.h,
	src/ntl-index-panel.c, src/ntl-view-bonobo-control.c,
	src/ntl-view-bonobo-subdoc.c, src/ntl-view-frame-svr.c,
	src/ntl-view-nautilus.c, src/ntl-view-private.h, src/ntl-view.c,
	src/ntl-view.h, src/ntl-window.c, src/ntl-window.h,
	src/file-manager/dfos-corba.h, src/file-manager/dfos-xfer.c,
	src/file-manager/dfos-xfer.h, src/file-manager/fm-main.c: Build
	with the recent Bonobo global renaming, and Havoc's changes. A
	patch from Kjartan Maraas <kmaraas@online.no> and scripts from Nat
	Friedman <nat@helixcode.com> were a very helpful starting point.
2000-01-26 08:22:44 +00:00
Andy Hertzfeld 920e9eb8b3 made the drag shadow have the same dimensions as the dragged object
made the drag shadow have the same dimensions as the dragged object
2000-01-26 02:46:13 +00:00
Darin Adler 47bf5ad695 Fixed an assert I missed.
* libnautilus/nautilus-directory.c:
	(nautilus_file_get_name):
	Fixed an assert I missed.
2000-01-26 00:56:25 +00:00
Darin Adler c796ee4c97 Added interface to get a NautilusFile for a specific file rather than a
* libnautilus/nautilus-directory.h:
	(nautilus_file_get):
	(nautilus_file_detach):
	(nautilus_directory_finalize):
	(nautilus_file_unref):
	Added interface to get a NautilusFile for a specific file rather than
	a file from a directory that we are scanning.

	* libnautilus/nautilus-glib-extensions.c:
	(check_tm_to_g_date):
	A little cleanup of the self-check code.

	* libnautilus/Makefile.am:
	libnautilus/libnautilus.h:
	libnautilus/nautilus-alloc.h:
	libnautilus/nautilus-directory.h:
	Moved g_alloca into its own header file so you don't have to include
	all the Bonobo stuff just to use g_alloca.
2000-01-26 00:34:30 +00:00
John Sullivan 6d547890b6 A few cleanups to file-date-as-string code. 2000-01-26 00:29:10 +00:00
Andy Hertzfeld ebcee7a778 first cut at making small images (<10K) show as themselves. also, cleaned
first cut at making small images (<10K) show as themselves.
	also, cleaned up icon item class and added boolean for kbd selection
2000-01-26 00:29:08 +00:00
Andy Hertzfeld a320ceead5 disabled icon centering code that was causing glitchy updates
disabled icon centering code that was causing glitchy updates
2000-01-26 00:07:34 +00:00
Darin Adler 6d5f07d86e Redid drag code so that it will work if there are multiple windows
* 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.
2000-01-25 23:49:39 +00:00
John Sullivan c1e840df79 Better text for date column in list view. 2000-01-25 23:38:46 +00:00
Andy Hertzfeld 961f18d600 icons are now drawn with a custom canvas item instead of with a group.
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.
2000-01-25 21:17:05 +00:00
Darin Adler 6b72c37ff1 Removed bogus warning. Need to do some more work to get dragging working
* 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.
2000-01-25 01:08:41 +00:00
Maciej Stachowiak f1c2796128 Rename "row_popup_menu" and "empty_popup_menu" signals to
* libnautilus/gtkflist.c, libnautilus/gtkflist.h: Rename
	"row_popup_menu" and "empty_popup_menu" signals to
	"context_click_row" and "context_click_background" for more
	consistency with the way the icon container does it. Removed
	GdkEvent parameters from these signals. Added an int indicating
	the row right-clicked.
	(gtk_flist_button_press): Do not change the selection to the row
	that gets right-clicked. It was inconsistent with the icon view
	and most of the known universe.
2000-01-24 20:34:25 +00:00
Darin Adler c885369012 Added a controller object that lets GnomeIconContainer
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.
2000-01-24 18:27:20 +00:00
John Sullivan d12bae4bf6 Made Shift as well as Control modify the selection, and prevented
activation on single-click when modifying the selection.
2000-01-24 17:00:08 +00:00
Havoc Pennington 7bc75aef86 fix to gnomecanvaspixbuf
2000-01-21  Havoc Pennington  <hp@redhat.com>

* src/file-manager/Makefile.am (INCLUDES): fix to gnomecanvaspixbuf

* src/Makefile.am (INCLUDES): fix to gnomecanvaspixbuf

* libnautilus/Makefile.am (INCLUDES): fix to use gnomecanvaspixbuf
flags

* configure.in: Look for gnomecanvaspixbuf properly (via
gnome-config)
2000-01-22 00:21:37 +00:00
Elliot Lee dfc585b327 Allocate an extra byte in the buffer, for safety's sake. Fix back/fwd
* libnautilus/nautilus-directory.c: Allocate an extra byte in the
  buffer, for safety's sake.
* src/ntl-window-msgs.c: Fix back/fwd buttons.
2000-01-21 20:56:02 +00:00
Darin Adler 49f7a162e1 Started some cleanup of the icon view.
* 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.
2000-01-21 17:53:19 +00:00
John Sullivan 7c1de70be9 Activate on single-click in list view. 2000-01-21 16:23:06 +00:00
Andy Hertzfeld 8080e76fc8 disabled the pernicious call to relayout in size_allocate, at least
disabled the pernicious call to relayout in size_allocate, at least
      temporarily
2000-01-21 08:23:09 +00:00
Darin Adler 97ce483ddd Fixed double free that was causing lots of nasty errors in the file
* src/file-manager/fm-directory-view.c:
	(fm_directory_view_activate_entry):
	Fixed double free that was causing lots of nasty errors in
	the file manager.
	(fm_directory_view_load_uri):
	Made the old directory hang around a bit longer when loading
	a new uri.
	(display_selection_info):
	(fm_directory_view_send_selection_change):
	(display_selection_info_idle_cb):
	Fixed a storage leak and broke out the selection change into
	its own function instead of mixing it with the status line.
	Also made the selection actually use URIs instead of just
	names for the selected items.

	* libnautilus/nautilus-directory.h:
	libnautilus/nautilus-directory.c:
	(nautilus_file_get_uri):
	Added this function that gets a URI (rather than just a
	leaf name).

	* libnautilus/nautilus-directory.c:
	(nautilus_directory_finalize):
	(nautilus_self_check_directory):
	Added more self checks and fixed a bug where a metadata
	change would get lost if you delete the directory too soon
	after making the change.
2000-01-21 01:13:12 +00:00
John Sullivan fde66d2ddd Moved fields inside private details structure. 2000-01-20 23:27:05 +00:00
Darin Adler c4c5ae7de9 Fixed a bug where dragging an icon would cause the "kbd_selected" icon to
* src/gnome-icon-container.c:
	(gnome_icon_container_xlate_selected):
	Fixed a bug where dragging an icon would cause the "kbd_selected"
	icon to scroll into view. Just passed FALSE instead of TRUE for
	"schedule_visibility".

	* libnautilus/nautilus-background.c:
	(nautilus_background_draw_flat_box):
	Tiny change, to fit our style rule against initializing.
2000-01-20 22:54:35 +00:00
Jonathan Blandford 75cb3ed1f8 fix warning.
2000-01-20  Jonathan Blandford  <jrb@redhat.com>

	* libnautilus/nautilus-background.c
	(nautilus_background_draw_flat_box): fix warning.
2000-01-20 22:45:07 +00:00
Elliot Lee e7df9b4e9b Async notification of navinfo - now we just need an async get_file_info
* src/ntl-uri-map.c: Async notification of navinfo - now we just need an async get_file_info call.
* src/ntl-view.[ch]: Better error handling.
* src/file-manager/fm-directory-view.c (display_selection_info): Send a 'selection change' request.
* src/ntl-window-msgs.c: Totally rewrite the state changing machine. Now handles errors slightly
  better.
* src/ntl-types.h: Remove requesting_view from the navigation info.
* src/ntl-window.h: Move all the state machine stuff into NautilusWindow itself.
* src/ntl-window.c: Update for new 'stop doing stuff' API.
2000-01-20 21:59:03 +00:00
Darin Adler f804c9acd5 Store icon positions as "x,y" in ICON_POSITION instead of
storing ICON_X and ICON_Y.

	Take first step in moving the directory view to use the opaque
	NautilusDirectory and NautilusFile instead of using gnome-vfs
	directly. This will separate the controller from the model:
	FMDirectoryView is a controller and NautilusDirectory a model.

	* src/file-manager/fm-directory-view-icons.c:
	(add_to_icon_container):
	(fm_directory_view_icons_icon_moved_cb):
	Store icons positions as "x,y" in ICON_POSITION instead of storing
	separate numbers in ICON_X and ICON_Y.

	* libnautilus/nautilus-directory.h:
	libnautilus/nautilus-directory.c:
	(nautilus_directory_get_uri):
	Added a new call needed to replace fm_directory_view_get_uri.
	(nautilus_directory_get_file_metadata):
	(nautilus_directory_set_file_metadata):
	(nautilus_file_get_metadata):
	(nautilus_file_set_metadata):
	Moved the calls for getting and setting file metadata into the
	file objects.
	(nautilus_directory_new_file):
	(nautilus_file_get_info):
	Added temporary interfaces for the current situation where we're
	dealing with both NautilusFile and GnomeVFSFileInfo objects at
	once.
	(nautilus_directory_finalize):
	Detach and unref all the files when the directory is destroyed.
	(nautilus_file_unref):
	(nautilus_file_get_name):
	Implemented these functions now that we are using them.

	* src/file-manager/fm-directory-view.h:
	src/file-manager/fm-directory-view.c:
	(fm_directory_view_add_entry):
	(fm_directory_view_activate_entry):
	(display_selection_info):
	(fm_directory_view_get_selection):
	src/file-manager/fm-directory-view-icons.c:
	(add_to_icon_container):
	(fm_directory_view_icons_icon_moved_cb):
	(dm_directory_view_icons_add_entry):
	(fm_directory_view_icons_get_selection):
	(icon_container_activate_cb):
	src/file-manager/fm-directory-view-list.c:
	(add_to_flist):
	(fm_directory_view_list_add_entry):
	Change all the code to work with NautilusFile instead of
	GnomeVFSFileInfo, except for the parts of FMDirectoryView dealing
	with the directory_list.

	* src/file-manager/fm-directory-view.h:
	src/file-manager/fm-directory-view.c:
	(nautilus_file_date_as_string):
	(nautilus_file_size_as_string):
	(nautilus_file_type_as_string):
	libnautilus/nautilus-directory.h:
	libnautilus/nautilus-directory.c:
	(nautilus_file_get_date_as_string):
	(nautilus_file_get_size_as_string):
	(nautilus_file_get_type_as_string):
	Moved and renamed these functions and made them work on
	NautilusFile objects.
2000-01-20 21:23:35 +00:00
Darin Adler 1546a8b2dc Made backgrounds work better in the list view. Gradients still
won't work because the list view draws its background with calls
	to gdk_draw_rectangle explicitly, and doesn't call the functions
	in the style, so it can't be overridden.

	* libnautilus/nautilus-background.c:
	(nautilus_background_set_widget_style): Fix bug where the list
	items were not highlighting properly. Set only the NORMAL and
	ACTIVE background color. That way we don't screw up the SELECTED
	and other background colors.
2000-01-20 18:19:46 +00:00
Darin Adler 390272a371 Fix segfault when viewing a directory without a metafile. 2000-01-20 17:28:47 +00:00
Darin Adler 72acf48fea The list view now has a background color just like the
icon view does. Some more code could be saved, but that's
	a refactoring for another time.

	* libnautilus/gtkflist.c: Added support for receiving dragged
	colors to set the background of the list.

	* src/file-manager/fm-directory-view-list.c:
	(fm_directory_view_list_initialize_class):
	(fm_directory_view_list_clear):
	(fm_directory_view_list_background_changed_cb): Added code to load
	and save the background color from metadata.

	* libnautilus/nautilus-background.c: Put the background color in
	all the bg and base colors in the style instead of putting it only
	in bg[GTK_STATE_NORMAL].

	* libnautilus/nautilus-gtk-macros.h:
	(NAUTILUS_DEFINE_CLASS_BOILERPLATE): Make sure that the macro only
	evaluates the parent_class_type argument once, like it says in the
	comment. (NAUTILUS_CALL_PARENT_CLASS): Fix this macro so it can
	be used in places where an expression is expected.

	* RENAMING: Added this file to list name changes we are
	planning for the future.

	* libnautilus/gtkflist.h: libnautilus/gtkflist.c:
	src/explorer-location-bar.h: src/explorer-location-bar.c:
	Minimized includes.

	* src/ntl-index-panel.c:
	src/file-manager/fm-directory-view-icons.c: Fixed some comments
	and formatting.
2000-01-20 01:08:12 +00:00
Darin Adler 771cbf47d6 Icon positions are now written out when you drag an icon,
and read in when you visit a directory. But the code then
	immediately re-lays out the icons, so the position is lost!

	* src/file-manager/fm-directory-view-icons.c:
	(fm_directory_view_icons_icon_moved_cb):
	(fm_directory_view_icons_initialize): (add_container_icon): Save
	icon position when an icon is moved. Get icon position when an
	icon is first created.

	* libnautilus/nautilus-directory.c:
	(nautilus_directory_get_metadata_from_node):
	(nautilus_directory_get_metadata):
	(nautilus_directory_create_metafile_tree_root):
	(nautilus_directory_get_metadata):
	(nautilus_directory_set_metadata):
	(nautilus_directory_get_file_metadata):
	(nautilus_directory_set_file_metadata): Added the routines to get
	and set metadata for individual files.

	* libnautilus/nautilus-string.h: libnautilus/nautilus-string.c:
	(nautilus_eat_strcmp): (nautilus_string_to_int):
	(nautilus_eat_string_to_int): Made new string functions that free
	the existing strings, and a function to convert an int to a
	string.

	* libnautilus/gnome-icon-container.h:
	libnautilus/gnome-icon-container.c: (move_icon): (class_init):
	(handle_icon_button_press): Added context_click_background and
	icon_moved signals, and renamed context_click to
	context_click_icon.

	* configure.in: Turned -Wunused back on. I had to turn -W off,
	but I think it's worth it.
2000-01-19 23:39:56 +00:00
Darin Adler edb4ab4e6f After Andy explained his change to me, I realized that it would always
* libnautilus/nautilus-directory.c: (nautilus_directory_finalize):
	(nautilus_directory_try_to_read_metafile):
	(nautilus_directory_read_metafile):
	(nautilus_directory_try_to_write_metafile):
	(nautilus_directory_write_metafile):
	(nautilus_directory_construct_alternate_metafile_uri):
	(nautilus_directory_new): After Andy explained his change to me, I
	realized that it would always write the metafile in the alternate
	place if there was no pre-existing metafile. So I changed the
	logic. The new rule is: read the metafile from the alternate
	location first. If we find it there, write it back
	there. Otherwise, try to write in the directory itself. If that
	fails, write it in the alternate location instead.

	* libnautilus/nautilus-directory.c:
	(nautilus_directory_get_metadata): Allow get_metadata on a NULL
	NautilusDirectory and return NULL for data.
2000-01-19 19:08:03 +00:00
Darin Adler 4dc286da90 Allow changing the background of the icon view by dropping colors
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.
2000-01-19 18:34:33 +00:00
Andy Hertzfeld 2689b7f236 made icons centered with respect to the text
made icons centered with respect to the text
2000-01-19 08:03:22 +00:00
Andy Hertzfeld 3067cd62f0 don't activate files if the button was held down for too long
don't activate files if the button was held down for too long
2000-01-19 02:55:48 +00:00
Miguel de Icaza 17c50ced8d Initialize before using.
2000-01-18  Miguel de Icaza  <miguel@gnu.org>

	* libnautilus/gnome-icon-container.c (handle_icon_button_press):
	Initialize before using.
2000-01-18 21:33:26 +00:00
Andy Hertzfeld b0e9bb2005 made reading metafile from directory where we don't have write permissions
made reading metafile from directory where we don't have write
	permissions work properly by looking in the common place on any error,
	not just if we get ACCESS_DENIED
2000-01-18 21:18:26 +00:00
Andy Hertzfeld df3078be57 *** empty log message *** 2000-01-18 20:44:05 +00:00
Elliot Lee b591e4c50a Since the prototypes for GtkObjectInitFunc and GtkClassInitFunc just have
* libnautilus/nautilus-gtk-macros.h: Since the prototypes for
	GtkObjectInitFunc and GtkClassInitFunc just have a 'gpointer' for the args,
	cast the given values to these function types, so that people can use the actual
	pointer types as arguments without receiving a warning.

	* src/ntl-index-panel.c: Change to match. Also set
	object_klass->destroy & object_klass->finalize to point to our
	implementation. Also remove unused variables
	(nautilus_index_panel_initialize,
	nautilus_index_panel_set_up_label).

	* libnautilus/nautilus-background.c, src/ntl-window-msgs.c,
	src/ntl-window.c, src/file-manager/fm-directory-icons.c: Remove
	unused variables.

	* src/ntl-window.h: Add a variable (unused) for future handling of content view loading.

	* libnautilus/libnautilus.h: Add an interim g_alloca.

	* libnautilus/nautilus-directory.c: Clean up a bit further, by
	removing the need for another if(), and using g_alloca instead of
	g_malloc.
2000-01-18 19:21:16 +00:00
Darin Adler 7e292ac004 Added first cut at code to put metafiles in the user's home directory if
* libnautilus/nautilus-directory.c:
	(nautilus_directory_read_metafile):
	(nautilus_directory_try_to_read_metafile):
	(nautilus_directory_write_metafile):
	(nautilus_directory_try_to_write_metafile):
	(nautilus_directory_switch_to_alternate_metafile_uri):
	(nautilus_directory_escape_slashes):
	(nautilus_make_directory_and_parents): Added first cut at code to
	put metafiles in the user's home directory if the directory is not
	accessible and you can't read and write a metafile in the
	directory itself. We'll have to refine this later to handle cases
	where you end up with two metafiles.

	* libnautilus/Makefile.am: libnautilus/nautilus-debug.h:
	libnautilus/nautilus-debug.c: Took trick for getting into the
	debugger and put it into a public header file so it can be used
	outside of the nautilus executable.

	* src/ntl-main.c: (stop_in_debugger):
	(nautilus_stop_after_default_log_handler): (main): Use the new
	calls from libnautilus to set up the drop into debugger for
	criticals and warnings.

	* src/file-manager/fm-main.c: (main): Minimized includes and used
	the new calls from libnautilus to set up the drop into debugger
	for criticals and warnings.

	* src/ntl-uri-map.c: (nautilus_navinfo_add_mapping):
	src/ntl-window.c: (nautilus_window_constructed):
	src/file-manager/fm-directory-view.c:
	(fm_directory_view_initialize): (fm_directory_view_destroy):
	(notify_location_change_cb): (stop_location_change_cb):
	(fm_directory_view_sort): Removed some messages that aren't so
	useful.

	* libnautilus/ntl-view-frame.h: Minimized includes.
	* libnautilus/ntl-view-frame.c: Include "ntl-view-frame.h" first
	so it tests to see that it has sufficient includes in it.

	* src/ntl-view.c: (nautilus_view_load_client): Changed function so
	that NULL for an iid is allowed and simply results in a failed
	load instead of being illegal.

	* src/ntl-window-msgs.c:
	(nautilus_window_change_location_internal): src/ntl-window.c:
	(nautilus_window_up): Got rid of calls to gnome_vfs_uri_destroy;
	use gnome_vfs_uri_unref instead since it's safer and Federico is
	getting rid of gnome_vfs_uri_destroy.

	* src/file-manager/fm-directory-view-icons.h:
	src/file-manager/fm-directory-view-icons.c:
	(fm_directory_view_icons_new):
	src/file-manager/fm-directory-view-list.h:
	src/file-manager/fm-directory-view-list.c:
	(fm_directory_view_list_new):
	src/file-manager/fm-directory-view.h:
	src/file-manager/fm-directory-view.c: (fm_directory_view_new):
	Minimized includes and got rid of the unused _new functions.

	* libnautilus/nautilus-directory.h: Added a missing 2000 copyright
	date.
2000-01-18 18:55:36 +00:00
Andy Hertzfeld e72fb15b13 made dragging work right by rendering a pixbuf to a pixmap and mask to
made dragging work right by rendering a pixbuf to a pixmap and mask
       to pass to the gtk dragging machinery.
2000-01-17 22:36:13 +00:00
Andy Hertzfeld d4ce3fc6d4 made the dragging code set up an image of the canvas item being dragged
made the dragging code set up an image of the canvas item being dragged
       currently disabled because it's not handling the mask yet
2000-01-17 08:43:27 +00:00
Andy Hertzfeld 497e3e7a48 made single-click open work made dragging to desktop work
made single-click open work
	made dragging to desktop work
2000-01-17 05:49:39 +00:00
Andy Hertzfeld 3b781046af made dragging within a window actually move the canvas item correctly, and
made dragging within a window actually move the canvas item correctly,
	and set the stage for copying between directories
2000-01-16 01:23:46 +00:00
Darin Adler b7c1294461 Turned on gradients for backgrounds. 2000-01-14 23:36:00 +00:00
Darin Adler 4a8e99789c Added code to load and save metadata. 2000-01-14 19:36:38 +00:00
John Sullivan fa043157af Defined and deployed macros for signals that must be overridden by
subclass; also deployed Darin's other boilerplate-reducing macros
in fm-directory-view-icons.c and fm-directory-view-list.c
2000-01-13 19:49:33 +00:00
Darin Adler 32f075751e Made the index panel use NautilusBackground. 2000-01-12 00:08:20 +00:00
John Sullivan 8c92ececd0 Added nautilus_gtk_signal_connect_free_data, and deployed it. 2000-01-11 22:12:23 +00:00
Darin Adler 737b238103 Fixed typos and oversights in Maciej's check-in.
He didn't compile his changes :-(
2000-01-11 20:53:40 +00:00
Maciej Stachowiak 2dcd5c3f91 Redo signals the conventional way, to avoid array size mismatches in the
* libnautilus/ntl-view-frame.c, libnautilus/ntl-view-frame.h: Redo
	signals the conventional way, to avoid array size mismatches in
	the future.
2000-01-11 19:57:07 +00:00
Maciej Stachowiak 5fd8689456 Redo signals the conventional way, to avoid array size mismatches in the
* libnautilus/ntl-view-frame.c: Redo signals the conventional way,
	to avoid array size mismatches in the future.
2000-01-11 19:55:49 +00:00
Maciej Stachowiak 8ea96d1d5b Reorder code so "context_click" is actually emitted on a button 3 press.
* libnautilus/gnome-icon-container.c (handle_icon_button_press):
	Reorder code so "context_click" is actually emitted on a button 3
	press.
2000-01-11 05:47:40 +00:00
Maciej Stachowiak 8306cde9ba Fixed marshall type for "stop_location_change" signal. How could this ever
* libnautilus/ntl-view-frame.c (nautilus_view_frame_class_init):
	Fixed marshall type for "stop_location_change" signal. How could
	this ever have worked?
2000-01-11 04:09:00 +00:00
Maciej Stachowiak d9d61b5271 Fixed mismatch between declared signal array size and actual number of
* libnautilus/ntl-view-frame.c, libnautilus/ntl-view-frame.c:
	Fixed mismatch between declared signal array size and actual
	number of signals (this should still be rewritten to follow proper
	style).
2000-01-11 02:12:49 +00:00
Maciej Stachowiak 3d3e02b1f8 Added Eazel copyright to files I've changed non-trivially.
* libnautilus/ntl-content-view-frame.c,
	libnautilus/ntl-content-view-frame.h,
	libnautilus/ntl-meta-view-frame.c,
	libnautilus/ntl-meta-view-frame.h, libnautilus/ntl-view-frame.c,
	libnautilus/ntl-view-frame.h, src/ntl-app.c,
	src/ntl-view-bonobo-control.c, src/ntl-view-bonobo-subdoc.c,
	src/ntl-view-frame-svr.c, src/ntl-view-nautilus.c,
	src/ntl-view-private.h, src/ntl-view.c, src/ntl-view.h,
	src/ntl-window-msgs.c, src/ntl-window-msgs.h,
	src/ntl-window-state.c, src/ntl-window.c, src/ntl-window.h,
	src/file-manager/fm-directory-view.c,
	src/file-manager/fm-directory-view.h, src/file-manager/fm-main.c:
	Added Eazel copyright to files I've changed non-trivially.
2000-01-11 02:09:14 +00:00
Maciej Stachowiak 0018d98d48 Renamed from libnautilus/ntl-view-client.c, libnautilus/ntl-view-client.h,
* libnautilus/ntl-view-frame.c, libnautilus/ntl-view-frame.h,
	libnautilus/ntl-content-view-frame.c,
	libnautilus/ntl-content-view-frame.h,
	libnautilus/ntl-meta-view-frame.c,
	libnautilus/ntl-meta-view-frame.h: Renamed from
	libnautilus/ntl-view-client.c, libnautilus/ntl-view-client.h,
	libnautilus/ntl-content-view-client.c,
	libnautilus/ntl-content-view-client.h,
	libnautilus/ntl-meta-view-client.c,
	libnautilus/ntl-meta-view-client.h.
	* libnautilus/Makefile.am, libnautilus/libnautilus.h: reflect this
	renaming.
2000-01-10 22:54:18 +00:00
Elliot Lee fbd68ec58d use libcanvas_pixbuf 2000-01-10 21:28:40 +00:00
Darin Adler c912e1ef33 Added NautilusBackground class, string functions that allow NULL, made
gradient functions allow NULL and treat it as an empty string, added
gdk_color_parse variants that have a default color, cleanup of
NautilusIndexPanel, and some other minor stuff.
2000-01-10 19:52:24 +00:00
Maciej Stachowiak 78106a7394 Rename NautilusViewClient to NautilusViewFrame, NautilusContentViewClient
* libnautilus/ntl-view-client.c, libnautilus/ntl-view-client.h,
	libnautilus/ntl-content-view-client.c,
	libnautilus/ntl-content-view-client.h,
	libnautilus/ntl-meta-view-client.c,
	libnautilus/ntl-meta-view-client.h,: Rename NautilusViewClient to
	NautilusViewFrame, NautilusContentViewClient to
	NautilusContentViewFrame, and NautilusMetaViewClient to
	NautilusMetaViewFrame.
	* components/help/hyperbola-nav-tree.c,
	components/history/ntl-history-view.c,
	components/html/ntl-web-browser.c,
	components/websearch/ntl-web-search.c, src/ntl-app.c,
	src/file-manager/fm-directory-view.c,
	src/file-manager/fm-directory-view.h: Reflect the above renaming.
2000-01-10 08:37:41 +00:00
John Sullivan 9d0a6860f8 Made there be just one About window, and added a utility function for
presenting a window to the user regardless of its current state.
2000-01-07 21:48:58 +00:00
Darin Adler 313469f413 Moved self-check framework into libnautilus. Added functions so each
check will report if it fails instead of just aborting.

Added new functions to manage a string that specifies a color or
gradient, and added tests for the new functions.
2000-01-07 00:07:34 +00:00
Elliot Lee 5abab532aa Fix previous commit.
Fix previous commit.
2000-01-06 22:50:51 +00:00
Elliot Lee 19c9e26029 Relayout when size changes.
Relayout when size changes.
2000-01-06 17:19:13 +00:00
Elliot Lee 145a5c4a67 Eliminate gratuitous scroll bars.
* libnautilus/gnome-icon-container.c: Eliminate gratuitous scroll bars.
2000-01-06 16:03:42 +00:00
John Sullivan 2ff700028f Backed out nautilus-uri-utilities changes from earlier today. 2000-01-04 20:26:04 +00:00
Darin Adler 2840833e2c Added self-check framework. Added first bits of code for FMDirectory. 2000-01-04 18:09:59 +00:00
John Sullivan fc3d393257 Made location-entering field handle bogus URIs better. 2000-01-04 17:43:23 +00:00
Maciej Stachowiak 78860f9f50 Added stop_location_change method to NautilusView interface. New signal,
* idl/nautilus.idl: Added stop_location_change method to NautilusView interface.
	* ntl-view-client.c, ntl-view-client.h (stop_location_change): New
	signal, triggered on receipt of stop_location_change request via
	CORBA.

	* ntl-view.c, ntl-view.h, ntl-view-private.h, ntl-view-nautilus.c,
	ntl-view-bonobo-control.c, ntl-view-bonobo-subdoc.c
	(nautilus_view_stop_location_change): Added this function; also
	added implementation to nautilus view type function table and
	NULL'd out for now for Bonobo control and subdoc view types (need
	to find out if loading is synchronous or asynchronous for those,
	and if there is a way to abort).

	* ntl-window.c: Stop loading for all views when Stop button is
	pressed.

	* ntl-window-msgs.c: Enable stop button when we start loading;
	enable Stop button when

	* src/file-manager/fm-directory-view.c: Call
	request_progress_change() when loading is done or an error is
	reached; implement handler for stop_location_change signal.
2000-01-04 05:21:45 +00:00