* 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.
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.
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.
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.
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-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.
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.
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.
* 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-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.
* 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.
* 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.
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.
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.
* 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.
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-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.
* 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.
* 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.
* 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.
* 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.
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-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...
* 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.
* 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.
* 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.
* 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.
*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.
* 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.
* 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.
* 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 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.
* 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.
* 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.
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.
* 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.
* 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.
* 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.
* 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'.
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.
* 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.
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.
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.
* 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.
* 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-".
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.
* 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.
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.
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.
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
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.
* 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.
* 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.
* 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.
* 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.
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.)
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
* 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().
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.
* 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.
* 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.
* 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.
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.
* 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.
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.
* 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.
* 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.
* 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.
* 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.
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.)
* 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.
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.)
* 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.
* 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.
* 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.
* 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.
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.
* 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.
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.
* 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.
* 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.
* 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.
* 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.
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.
* 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.
* 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.
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.
* 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.
* 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.
* 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.
* 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.
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.
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.
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.
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.
* 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.
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.
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
* 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.
* 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.
* libnautilus/ntl-view-frame.c (nautilus_view_frame_class_init):
Fixed marshall type for "stop_location_change" signal. How could
this ever have worked?
* 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).
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.
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.
* 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.