summaryrefslogtreecommitdiff
path: root/libnautilus-private/nautilus-link.h
diff options
context:
space:
mode:
authorGene Z. Ragan <gzr@eazel.com>2000-08-22 01:55:37 +0000
committerGene Ragan <gzr@src.gnome.org>2000-08-22 01:55:37 +0000
commit8e49569d9553f3ea24c28bc01e44564e7e8d888d (patch)
treeb5cca04d5b5e190124902da837d490f9590b6aef /libnautilus-private/nautilus-link.h
parent1429dbd30e90b276ae73ee6cb1063251bbd7da79 (diff)
downloadnautilus-8e49569d9553f3ea24c28bc01e44564e7e8d888d.tar.gz
Added a link type argument to API to allow caller to specify type of link.
2000-08-21 Gene Z. Ragan <gzr@eazel.com> * libnautilus-extensions/nautilus-link.c: (nautilus_link_create): Added a link type argument to API to allow caller to specify type of link. (nautilus_link_is_volume_link), (nautilus_link_is_home_link), (nautilus_link_is_trash_link): Renamed old constants to use _TAG at the end of old define. The name of th eprevious define is now used in the enumeration of link types. * libnautilus-extensions/nautilus-link.h: Added argument to nautilus_link_create and created an enum to define the types of links. * src/file-manager/fm-desktop-icon-view.c: (startup_create_mount_links), (volume_mounted_callback), (place_home_directory), (create_or_rename_trash), (get_sort_category): Changed callers of nautilus_link_create to use new argument. * src/file-manager/fm-properties-window.c: (get_and_ref_file_to_display): Changed callers of nautilus_link_create to use new argument.
Diffstat (limited to 'libnautilus-private/nautilus-link.h')
-rw-r--r--libnautilus-private/nautilus-link.h26
1 files changed, 18 insertions, 8 deletions
diff --git a/libnautilus-private/nautilus-link.h b/libnautilus-private/nautilus-link.h
index 4d39c1926..a4f6610f0 100644
--- a/libnautilus-private/nautilus-link.h
+++ b/libnautilus-private/nautilus-link.h
@@ -29,18 +29,28 @@
#include "nautilus-file.h"
/* Link types */
-#define NAUTILUS_LINK_GENERIC "Generic Link"
-#define NAUTILUS_LINK_TRASH "Trash Link"
-#define NAUTILUS_LINK_MOUNT "Mount Link"
-#define NAUTILUS_LINK_HOME "Home Link"
+typedef enum
+{
+ NAUTILUS_LINK_GENERIC,
+ NAUTILUS_LINK_TRASH,
+ NAUTILUS_LINK_MOUNT,
+ NAUTILUS_LINK_HOME
+} NautilusLinkType;
+
+/* Link type XML tags */
+#define NAUTILUS_LINK_GENERIC_TAG "Generic Link"
+#define NAUTILUS_LINK_TRASH_TAG "Trash Link"
+#define NAUTILUS_LINK_MOUNT_TAG "Mount Link"
+#define NAUTILUS_LINK_HOME_TAG "Home Link"
/* Create a new link file. Takes a path, works locally, and uses sync. I/O.
* Returns TRUE if it succeeds, FALSE if it fails.
*/
-gboolean nautilus_link_create (const char *directory_path,
- const char *name,
- const char *image,
- const char *target_uri);
+gboolean nautilus_link_create (const char *directory_path,
+ const char *name,
+ const char *image,
+ const char *target_uri,
+ NautilusLinkType link_type);
/* Change the icon of an existing link file. Takes a path, works
* locally, and uses sync. I/O. Returns TRUE if it succeeds, FALSE if