summaryrefslogtreecommitdiff
path: root/libnautilus-private/nautilus-string.h
diff options
context:
space:
mode:
authorDarin Adler <darin@src.gnome.org>2000-02-01 05:34:46 +0000
committerDarin Adler <darin@src.gnome.org>2000-02-01 05:34:46 +0000
commit39b26449f4fcdf53f555e8d2ef03522e883c5c06 (patch)
tree9642f60f64a663609c8d7e981381b85ba305113d /libnautilus-private/nautilus-string.h
parent9bef26f2d771ff19272596ecaf6c2b812cf62945 (diff)
downloadnautilus-39b26449f4fcdf53f555e8d2ef03522e883c5c06.tar.gz
Changed the icon factory interface in a few ways: 1) There's no longer a
* 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.
Diffstat (limited to 'libnautilus-private/nautilus-string.h')
-rw-r--r--libnautilus-private/nautilus-string.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libnautilus-private/nautilus-string.h b/libnautilus-private/nautilus-string.h
index 9beb23dc2..63fc3073b 100644
--- a/libnautilus-private/nautilus-string.h
+++ b/libnautilus-private/nautilus-string.h
@@ -39,6 +39,10 @@ int nautilus_strcmp (const char *string_a_null_allowed,
int nautilus_eat_strcmp (char *string_a_null_allowed_gets_freed,
const char *string_b_null_allowed);
+/* Other basic string operations. */
+gboolean nautilus_has_prefix (const char *target_null_allowed,
+ const char *prefix_null_allowed);
+
/* Conversions to and from strings. */
gboolean nautilus_string_to_int (const char *string,
int *integer);