summaryrefslogtreecommitdiff
path: root/libnautilus-extensions/nautilus-mime-actions.c
diff options
context:
space:
mode:
authorIan McKellar <yakk@src.gnome.org>2000-07-11 18:46:03 +0000
committerIan McKellar <yakk@src.gnome.org>2000-07-11 18:46:03 +0000
commitedb5ed6b358137d0ec5310fbaa5303be827112df (patch)
tree311786dbcd6778c98a525b2f8da05260e90da57b /libnautilus-extensions/nautilus-mime-actions.c
parent595c884593b5ff2159bc56ff54f65023e3b03e19 (diff)
downloadnautilus-edb5ed6b358137d0ec5310fbaa5303be827112df.tar.gz
Load mime->vfs module mapping from gnome-vfs.
* Load mime->vfs module mapping from gnome-vfs.
Diffstat (limited to 'libnautilus-extensions/nautilus-mime-actions.c')
-rw-r--r--libnautilus-extensions/nautilus-mime-actions.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/libnautilus-extensions/nautilus-mime-actions.c b/libnautilus-extensions/nautilus-mime-actions.c
index 32a259cf1..5ecc2f9d6 100644
--- a/libnautilus-extensions/nautilus-mime-actions.c
+++ b/libnautilus-extensions/nautilus-mime-actions.c
@@ -27,6 +27,7 @@
#include <libgnomevfs/gnome-vfs.h>
#include <libgnomevfs/gnome-vfs-mime.h>
+#include <libgnomevfs/gnome-vfs-mime-info.h>
#include "nautilus-lib-self-check-functions.h"
#include "nautilus-directory.h"
#include "nautilus-file.h"
@@ -544,25 +545,17 @@ nautilus_mime_get_short_list_components_for_uri (const char *uri)
return result;
}
-GList *
+gchar *
nautilus_mime_get_short_list_methods_for_uri (const char *uri)
{
gchar *mime_type = get_mime_type_from_uri (uri);
+ const gchar *method = gnome_vfs_mime_get_value (mime_type, "vfs-method");
- /* FIXME - load these mappings from gnome-vfs and/or a config file */
-
- if (mime_type == NULL) return NULL;
-
- if (!strcmp(mime_type, "application/x-gzip"))
- return g_list_append(NULL, "gzip");
-
- if (!strcmp(mime_type, "application/x-bzip"))
- return g_list_append(NULL, "bzip2");
+ g_free(mime_type);
- if (!strcmp(mime_type, "application/zip"))
- return g_list_append(NULL, "zip");
+ if (method == NULL) return NULL;
- return NULL;
+ return g_strdup(method);
}