summaryrefslogtreecommitdiff
path: root/libnautilus-extensions/nautilus-link.c
diff options
context:
space:
mode:
authorAndy Hertzfeld <andy@src.gnome.org>2000-04-19 06:39:19 +0000
committerAndy Hertzfeld <andy@src.gnome.org>2000-04-19 06:39:19 +0000
commit638912544af85c80c64142581b9d44aac33cbe54 (patch)
treea4237c53d87ef3f799fa383e43a5982e64d2e438 /libnautilus-extensions/nautilus-link.c
parent7a55d8d9024a88c348a6813b8b938484baebdb0b (diff)
downloadnautilus-638912544af85c80c64142581b9d44aac33cbe54.tar.gz
made nautilus link files control the additional text displayed under their
made nautilus link files control the additional text displayed under their name.
Diffstat (limited to 'libnautilus-extensions/nautilus-link.c')
-rw-r--r--libnautilus-extensions/nautilus-link.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/libnautilus-extensions/nautilus-link.c b/libnautilus-extensions/nautilus-link.c
index e844a7e01..eeffd754b 100644
--- a/libnautilus-extensions/nautilus-link.c
+++ b/libnautilus-extensions/nautilus-link.c
@@ -44,6 +44,23 @@ nautilus_link_is_link_file(const char *file_uri)
return nautilus_str_has_suffix(file_uri, LINK_SUFFIX);
}
+/* returns additional text to display under the name, NULL if none */
+char* nautilus_link_get_additional_text(const char *link_file_uri)
+{
+ xmlDoc *doc;
+ char *extra_text = NULL;
+
+ if (link_file_uri == NULL)
+ return NULL;
+
+ doc = xmlParseFile (link_file_uri + 7);
+ if (doc) {
+ extra_text = xmlGetProp (doc->root, NAUTILUS_METADATA_KEY_EXTRA_TEXT);
+ xmlFreeDoc (doc);
+ }
+ return extra_text;
+}
+
/* returns the image associated with a link file */
char*