fixed task 514, show file/folder permissions with emblems. Added
Susan's images for "can't read" and "can't write", and made
get_emblem_names return their names when appropriate
added an up arrow on the property browser title bar to act as an
affordance for go back; also, made add background check the
mime type of the file selection and only add it if it's an image
stop showing embedded text. Too bad you can't see it in
action until embedded text is turned back on.
* icons/eazel/i-regular.xml: Added an embedded-text rectangle
for one size smaller icon than had one before.
* libnautilus-extensions/nautilus-icon-factory.c:
Added #defines for minimum embedded text rectangle width
and height.
(embedded_text_rect_usable): New function, ensures that the
embedded text rectangle is sufficiently large.
(nautilus_icon_factory_embed_text),
(nautilus_icon_factory_embed_file_text): Use new function to
skip embedded text if rectangle is nonexistent or too small.
* src/file-manager/fm-icon-view.c:
(get_icon_images_callback): Removed the text-rectangle size
limit here since now there's a universal one inside
nautilus_icon_factory.
added framework for using custom images to reflect highlight state;
used it to make folders reflect drop-highlighting by opening (just
in eazel theme for now)
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.
* 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-".
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
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.