1. 18 Feb, 2000 1 commit
    • Darin Adler's avatar
      Hand tuned icons for multiple resolutions. · 3bce71a5
      Darin Adler authored
      	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.
      3bce71a5
  2. 17 Feb, 2000 3 commits
    • Jonathan Blandford's avatar
      remember strlen (string) + 1 gives you the length necessary to copy a · ecd7c392
      Jonathan Blandford authored
      2000-02-17  Jonathan Blandford  <jrb@redhat.com>
      
      	* src/nautilus-index-title.c (nautilus_index_title_set_up_label):
      	remember strlen (string) + 1 gives you the length necessary to
      	copy a string, not strlen.
      ecd7c392
    • Andy Hertzfeld's avatar
      made the title in the index panel be above the additional info, which · 83de3177
      Andy Hertzfeld authored
      
             made the title in the index panel be above the additional info, which
             Elliot inadvertently changed with his recent check-in.
      83de3177
    • Elliot Lee's avatar
      Fix the GOAD ID for help index. Add help index. To avoid a warning in case · d9ed7d48
      Elliot Lee authored
      
      
      * 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.
      d9ed7d48
  3. 16 Feb, 2000 2 commits
    • Darin Adler's avatar
      Added icon stretching and did some cleanups. · 9b94323c
      Darin Adler authored
      	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.
      9b94323c
    • Andy Hertzfeld's avatar
      added logic to break the title in the index panel into two lines so it can · d3d8e1d7
      Andy Hertzfeld authored
      
             added logic to break the title in the index panel into two lines
             so it can use a larger font, if it can find an appropriate
             breaking point.
      d3d8e1d7
  4. 14 Feb, 2000 5 commits
    • Darin Adler's avatar
      Handle the case where you try to make a NautilusDirectory object for · db87f5e7
      Darin Adler authored
      	* 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.
      db87f5e7
    • Darin Adler's avatar
      Redid the icon factory to fix a few things: · 291fb2d6
      Darin Adler authored
      	* 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.
      291fb2d6
    • John Sullivan's avatar
      Quick fixes to some NULL-dereference problems in new index title code; · 6db4c052
      John Sullivan authored
      also made zoom level change stick until you visit a location that had a zoom
      level set earlier.
      6db4c052
    • Andy Hertzfeld's avatar
      made index panel display "notes" from metadata if present, made it use · 6245e766
      Andy Hertzfeld authored
      
          made index panel display "notes" from metadata if present,
          made it use custom icons from metadata if present.
      6245e766
    • Andy Hertzfeld's avatar
      made a new class, nautilus-index-title, to display the icon, title and · c85bb8ca
      Andy Hertzfeld authored
      
             made a new class, nautilus-index-title, to display the icon, title
             and other information for the index panel
      c85bb8ca