diff options
author | Alexander Larsson <alexl@redhat.com> | 2003-11-05 16:20:01 +0000 |
---|---|---|
committer | Alexander Larsson <alexl@src.gnome.org> | 2003-11-05 16:20:01 +0000 |
commit | 3613a86b2039395b3ee229c901a00e35b85865b6 (patch) | |
tree | cdbbfdc443182435f71d4c230400c9bfb084d7e2 /libnautilus-private/nautilus-link-desktop-file.c | |
parent | fb27d9086b6448e10a535c6cc4a52ee919096dc5 (diff) | |
download | nautilus-3613a86b2039395b3ee229c901a00e35b85865b6.tar.gz |
Require new gnome-vfs
2003-11-05 Alexander Larsson <alexl@redhat.com>
* configure.in:
Require new gnome-vfs
* components/tree/nautilus-tree-view.c:
* libnautilus-private/nautilus-desktop-link-monitor.c:
* libnautilus-private/nautilus-desktop-link.[ch]:
* libnautilus-private/nautilus-monitor.c:
* libnautilus-private/nautilus-trash-directory.c:
* libnautilus-private/nautilus-trash-monitor.[ch]:
* src/nautilus-application.c:
Use gnome-vfs-volume-manager instead of nautilus-volume-manager.c
* libnautilus-private/nautilus-desktop-icon-file.c:
Set the volume on the nautilusfile
* libnautilus-private/nautilus-directory-async.c:
Load volume info from link
* libnautilus-private/nautilus-file-attributes.h:
* libnautilus-private/nautilus-mime-actions.c:
Add new VOLUMES attribute
* libnautilus-private/nautilus-file-private.h:
Add has_volume and has_drive to NautilusFile
* libnautilus-private/nautilus-file.[ch]:
Add has_volume and has_drive to NautilusFile
Volumes/drives are sorted separately
* libnautilus-private/nautilus-link-desktop-file.[ch]:
* libnautilus-private/nautilus-link.[ch]:
Read drive and volume id from links
* src/file-manager/fm-desktop-icon-view.c:
* src/file-manager/nautilus-desktop-icon-view-ui.xml:
Remove volume ops. Remove disks menu
* src/file-manager/fm-directory-view.c:
* src/file-manager/nautilus-directory-view-ui.xml:
Implement volume ops using gnome-vfs
* src/file-manager/fm-properties-window.c:
Handle drives/volumes
* src/nautilus-window.c:
Make a nicer title for some specific locations
* libnautilus-private/nautilus-volume-monitor.[ch]:
* libnautilus-private/Makefile.am
remove this old crap
Diffstat (limited to 'libnautilus-private/nautilus-link-desktop-file.c')
-rw-r--r-- | libnautilus-private/nautilus-link-desktop-file.c | 65 |
1 files changed, 22 insertions, 43 deletions
diff --git a/libnautilus-private/nautilus-link-desktop-file.c b/libnautilus-private/nautilus-link-desktop-file.c index 1f4be8dfc..f6ad946ff 100644 --- a/libnautilus-private/nautilus-link-desktop-file.c +++ b/libnautilus-private/nautilus-link-desktop-file.c @@ -368,59 +368,38 @@ nautilus_link_desktop_file_local_get_link_uri (const char *uri) return retval; } -char * -nautilus_link_desktop_file_get_link_uri_given_file_contents (const char *uri, - const char *link_file_contents, - int link_file_size) +void +nautilus_link_desktop_file_get_link_info_given_file_contents (const char *file_contents, + int link_file_size, + char **uri, + char **name, + char **icon, + gulong *drive_id, + gulong *volume_id) { GnomeDesktopItem *desktop_file; - char *retval; + const char *id; - desktop_file = gnome_desktop_item_new_from_string (uri, link_file_contents, link_file_size, 0, NULL); + desktop_file = gnome_desktop_item_new_from_string (NULL, file_contents, link_file_size, 0, NULL); if (desktop_file == NULL) { - return NULL; + return; } - retval = nautilus_link_desktop_file_get_link_uri_from_desktop (desktop_file); - - gnome_desktop_item_unref (desktop_file); - return retval; -} - -char * -nautilus_link_desktop_file_get_link_name_given_file_contents (const char *uri, - const char *link_file_contents, - int link_file_size) -{ - GnomeDesktopItem *desktop_file; - char *retval; + + *uri = nautilus_link_desktop_file_get_link_uri_from_desktop (desktop_file); + *name = nautilus_link_desktop_file_get_link_name_from_desktop (desktop_file); + *icon = nautilus_link_desktop_file_get_link_icon_from_desktop (desktop_file); - desktop_file = gnome_desktop_item_new_from_string (uri, link_file_contents, link_file_size, 0, NULL); - if (desktop_file == NULL) { - return NULL; + id = gnome_desktop_item_get_string (desktop_file, "X-Gnome-Volume"); + if (id != NULL) { + *volume_id = atol (id); } - retval = nautilus_link_desktop_file_get_link_name_from_desktop (desktop_file); - gnome_desktop_item_unref (desktop_file); - return retval; -} - - -char * -nautilus_link_desktop_file_get_link_icon_given_file_contents (const char *uri, - const char *link_file_contents, - int link_file_size) -{ - GnomeDesktopItem *desktop_file; - char *retval; - - desktop_file = gnome_desktop_item_new_from_string (uri, link_file_contents, link_file_size, 0, NULL); - if (desktop_file == NULL) { - return NULL; + id = gnome_desktop_item_get_string (desktop_file, "X-Gnome-Drive"); + if (id != NULL) { + *drive_id = atol (id); } - retval = nautilus_link_desktop_file_get_link_icon_from_desktop (desktop_file); - + gnome_desktop_item_unref (desktop_file); - return retval; } |