summaryrefslogtreecommitdiff
path: root/libnautilus-extensions/nautilus-icon-factory.h
diff options
context:
space:
mode:
authorDarin Adler <darin@src.gnome.org>2000-03-15 00:31:49 +0000
committerDarin Adler <darin@src.gnome.org>2000-03-15 00:31:49 +0000
commitbdf3c6c1366ad421815e7de00cc3d8a929b0443e (patch)
tree82ad90eaba5fbfa3bdc1b3925c401acf052ce31a /libnautilus-extensions/nautilus-icon-factory.h
parentfbae65f1dc0b01da98006ffeb3c6c13af476e426 (diff)
downloadnautilus-bdf3c6c1366ad421815e7de00cc3d8a929b0443e.tar.gz
Added additional data to icons so they can specify where the
embedded text fits in each icon. * icons/eazel/Makefile.am, icons/eazel/i-regular.xml: Added the file to specify attributes of icons. Specifically added the attribute that says there is space for embedded text in the Eazel-theme regular icon. * libnautilus/nautilus-icon-factory.h: * libnautilus/nautilus-icon-factory.c: (get_child_node_by_property), (get_themed_icon_file_path), (get_icon_file_path), (nautilus_icon_factory_get_thumbnail_uri), (load_specific_image), (load_image_for_scaling), (get_image_from_cache), (load_image_scale_if_necessary), (nautilus_icon_factory_get_pixbuf_for_icon), (nautilus_icon_factory_get_pixbuf_for_file): Added code to read a rectangle for the embedded text along with the icon, cache it with the icon, scale it with the icon, and return it to the caller along with the icon. * libnautilus/nautilus-icons-view-icon-item.c: (nautilus_icons_view_icon_item_initialize_class), (nautilus_icons_view_icon_item_set_arg), (nautilus_icons_view_icon_item_get_arg), (nautilus_icons_view_icon_item_get_image), (nautilus_icons_view_icon_item_set_image), (nautilus_art_irect_to_gdk_rectangle), (draw_mini_text), (draw_embedded_text), (nautilus_icons_view_icon_item_draw): Changed the code that draws the embedded text to respect the text rectangle passed in. Changed the pixbuf setting to use a function instead of the arg interface and take a text rectangle along with the pixbuf. * libnautilus/gnome-icon-container-dnd.c (gnome_icon_container_dnd_begin_drag): * libnautilus/gnome-icon-container.c: (icon_get_actual_size): Got rid of callers who were using the arg interface to get at the image of an icon ("NautilusIconsViewIconItem::pixbuf"). * src/file-manager/fm-directory-view-icons.c: (get_icon_property_cb): Get rid of hard-coded rule that only themes with eazel at the front of their names can display text inside the icons. * libnautilus/gnome-icon-container.c: (icon_new): Fixed a bug where icons would be super-tiny if they got too big, like if you entered a directory that was zoomed all the way in. (start_stretching), (ungrab_stretch_icon), (end_stretching), (gnome_icon_container_show_stretch_handles): Added code to grab the pointer while stretching an icon. (item_event_cb): Added a return statement that John forgot when he was editing. Without that, it was falling through to the next case, which had the same effect anyway. (update_icon): Pass the text rectangle through from the icon factory to the icon canvas item, using the new call instead of the old arg interface approach. * components/help/.cvsignore: Added entries for .la and .lo files. * components/help/Makefile.am: * components/help/hyperbola-nav-index.c: * components/help/hyperbola-nav-search.c: * libnautilus/nautilus-directory-private.h: * libnautilus/nautilus-directory.c: * src/nautilus-bookmarklist.c: Fixed flags for gnome-xml includes. Someone pointed out that you are supposed to include these as "#include <tree.h>", not "#include <gnome-xml/tree.h>" so I fixed our uses to work that way. * libnautilus/nautilus-directory.c: (nautilus_directory_get_file_metadata_node): Fixed code that was destroying something allocated by gnome-xml with g_free instead of xmlFree. * libnautilus/nautilus-file.c: (nautilus_file_get_keywords), (nautilus_file_set_keywords): Fixed storage leak where we were getting a property and not freeing it. * libnautilus/nautilus-default-file-icon.h: * libnautilus/nautilus-default-file-icon.c: * libnautilus/nautilus-icon-factory.c: (load_image_for_scaling): Got rid of the global that tells whether the default icon has an alpha channel -- it's not hardwired TRUE.
Diffstat (limited to 'libnautilus-extensions/nautilus-icon-factory.h')
-rw-r--r--libnautilus-extensions/nautilus-icon-factory.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/libnautilus-extensions/nautilus-icon-factory.h b/libnautilus-extensions/nautilus-icon-factory.h
index 0640a95aa..8b3391ca2 100644
--- a/libnautilus-extensions/nautilus-icon-factory.h
+++ b/libnautilus-extensions/nautilus-icon-factory.h
@@ -29,6 +29,7 @@
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <libnautilus/nautilus-file.h>
#include <gtk/gtkobject.h>
+#include <libart_lgpl/art_rect.h>
/* NautilusIconFactory is a class that knows how to hand out icons to be
* used for representing files and some other objects. It was designed
@@ -97,11 +98,14 @@ GList * nautilus_icon_factory_get_emblem_icons_for_file (Nautil
/* Render an icon to a particular size.
* Ownership of a ref. count in this pixbuf comes with the deal.
* This allows scaling in both dimensions. All other calls assume
- * that X and Y scaling are the same.
+ * that X and Y scaling are the same. The text rectangle tells where
+ * this icon can accomodate text. If the icon can't accomodate any
+ * text, then the rectangle is (0, 0, 0, 0).
*/
GdkPixbuf * nautilus_icon_factory_get_pixbuf_for_icon (NautilusScalableIcon *scalable_icon,
guint size_in_pixels_x,
- guint size_in_pixels_y);
+ guint size_in_pixels_y,
+ ArtIRect *embedded_text_rectangle);
/* Convenience functions for the common case where you want to choose
* and render the icon into a pixbuf all at once.