* 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'.