summaryrefslogtreecommitdiff
path: root/libnautilus/nautilus-bookmark.c
diff options
context:
space:
mode:
Diffstat (limited to 'libnautilus/nautilus-bookmark.c')
-rw-r--r--libnautilus/nautilus-bookmark.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/libnautilus/nautilus-bookmark.c b/libnautilus/nautilus-bookmark.c
index 5998eca85..35082f10c 100644
--- a/libnautilus/nautilus-bookmark.c
+++ b/libnautilus/nautilus-bookmark.c
@@ -178,6 +178,24 @@ nautilus_bookmark_get_uri (const NautilusBookmark *bookmark)
return bookmark->details->uri;
}
+
+/**
+ * nautilus_bookmark_set_name:
+ *
+ * Change the user-displayed name of a bookmark.
+ * @new_name: The new user-displayed name for this bookmark, mustn't be NULL.
+ *
+ **/
+void
+nautilus_bookmark_set_name (NautilusBookmark *bookmark, const char *new_name)
+{
+ g_return_if_fail(NAUTILUS_IS_BOOKMARK (bookmark));
+ g_return_if_fail (new_name != NULL);
+
+ g_free (bookmark->details->name);
+ bookmark->details->name = g_strdup (new_name);
+}
+
/**
* nautilus_bookmark_new_with_name:
*