mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-09-21 00:32:06 +00:00
Fixed bug 575 (Make Nautilus use gnome-vfs-mime)
Converted all the (few) places where Nautilus code was using the old gnome-libs MIME API to use the new gnome-vfs MIME API. * components/help/help-method.c (convert_file_to_uri): Use gnome_vfs_mime_type_of_file. This function should probably use NautilusFile rather than calling the MIME stuff directly, but I just couldn't get distracted into trying to improve it. * libnautilus-extensions/nautilus-file.c (nautilus_file_get_type_as_string): Use gnome_vfs_mime_description. * libnautilus-extensions/nautilus-icon-factory.c (nautilus_icon_factory_get_icon_name_for_regular_file): Use gnome_vfs_mime_get_value. * data/mime/nautilus.keys: Added a translation for "special/symlink" because it now starts showing up when using ftp:// locations. Perhaps we need to fix something in ftp also.
This commit is contained in:
parent
ee569ce5d0
commit
6b1364e60f
27
ChangeLog
27
ChangeLog
|
@ -1,3 +1,30 @@
|
|||
2000-05-01 John Sullivan <sullivan@eazel.com>
|
||||
|
||||
Fixed bug 575 (Make Nautilus use gnome-vfs-mime)
|
||||
|
||||
Converted all the (few) places where Nautilus code was
|
||||
using the old gnome-libs MIME API to use the new gnome-vfs
|
||||
MIME API.
|
||||
|
||||
* components/help/help-method.c (convert_file_to_uri):
|
||||
Use gnome_vfs_mime_type_of_file. This function should
|
||||
probably use NautilusFile rather than calling the MIME
|
||||
stuff directly, but I just couldn't get distracted into
|
||||
trying to improve it.
|
||||
|
||||
* libnautilus-extensions/nautilus-file.c
|
||||
(nautilus_file_get_type_as_string):
|
||||
Use gnome_vfs_mime_description.
|
||||
* libnautilus-extensions/nautilus-icon-factory.c
|
||||
(nautilus_icon_factory_get_icon_name_for_regular_file):
|
||||
Use gnome_vfs_mime_get_value.
|
||||
|
||||
|
||||
* data/mime/nautilus.keys: Added a translation for
|
||||
"special/symlink" because it now starts showing up when
|
||||
using ftp:// locations. Perhaps we need to fix something
|
||||
in ftp also.
|
||||
|
||||
2000-05-01 Darin Adler <darin@eazel.com>
|
||||
|
||||
* HACKING: Added option for eog. (Sorry Maciej, I had done it
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include <gnome.h>
|
||||
|
||||
#include <libgnomevfs/gnome-vfs.h>
|
||||
#include <libgnomevfs/gnome-vfs-mime.h>
|
||||
#include "help-method.h"
|
||||
#include <libgnomevfs/gnome-vfs-module.h>
|
||||
#include <libgnomevfs/gnome-vfs-module-shared.h>
|
||||
|
@ -141,7 +142,7 @@ convert_file_to_uri (HelpURI *help_uri, gchar *file)
|
|||
return FALSE;
|
||||
|
||||
help_uri->file = file;
|
||||
mime_type = gnome_mime_type_of_file (file);
|
||||
mime_type = gnome_vfs_mime_type_of_file (file);
|
||||
if (!strcmp (mime_type, "text/sgml") ||
|
||||
!strcmp (mime_type, "exported SGML document text"))
|
||||
help_uri->type = SGML_FILE;
|
||||
|
|
|
@ -281,6 +281,9 @@ message/x-gnu-rmail
|
|||
special/directory
|
||||
description=directory
|
||||
|
||||
special/symlink
|
||||
description=link
|
||||
|
||||
text/css
|
||||
description=style sheet
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include <libgnome/gnome-mime-info.h>
|
||||
#include <libgnome/gnome-mime.h>
|
||||
#include <libgnomevfs/gnome-vfs-file-info.h>
|
||||
#include <libgnomevfs/gnome-vfs-mime-info.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <parser.h>
|
||||
|
@ -1359,7 +1360,7 @@ nautilus_file_get_type_as_string (NautilusFile *file)
|
|||
return g_strdup (_("unknown type"));
|
||||
}
|
||||
|
||||
description = gnome_mime_description (mime_type);
|
||||
description = gnome_vfs_mime_description (mime_type);
|
||||
if (nautilus_strlen (description) > 0) {
|
||||
return g_strdup (description);
|
||||
}
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
|
||||
#include <libgnomevfs/gnome-vfs-types.h>
|
||||
#include <libgnomevfs/gnome-vfs-file-info.h>
|
||||
#include <libgnomevfs/gnome-vfs-mime-info.h>
|
||||
|
||||
#include <parser.h>
|
||||
#include <xmlmemory.h>
|
||||
|
@ -437,7 +438,7 @@ nautilus_icon_factory_get_icon_name_for_regular_file (NautilusFile *file)
|
|||
|
||||
mime_type = nautilus_file_get_mime_type (file);
|
||||
if (mime_type != NULL) {
|
||||
icon_name = gnome_mime_get_value (mime_type, "icon-filename");
|
||||
icon_name = gnome_vfs_mime_get_value (mime_type, "icon-filename");
|
||||
if (icon_name != NULL) {
|
||||
return icon_name;
|
||||
}
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include <libgnome/gnome-mime-info.h>
|
||||
#include <libgnome/gnome-mime.h>
|
||||
#include <libgnomevfs/gnome-vfs-file-info.h>
|
||||
#include <libgnomevfs/gnome-vfs-mime-info.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <parser.h>
|
||||
|
@ -1359,7 +1360,7 @@ nautilus_file_get_type_as_string (NautilusFile *file)
|
|||
return g_strdup (_("unknown type"));
|
||||
}
|
||||
|
||||
description = gnome_mime_description (mime_type);
|
||||
description = gnome_vfs_mime_description (mime_type);
|
||||
if (nautilus_strlen (description) > 0) {
|
||||
return g_strdup (description);
|
||||
}
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
|
||||
#include <libgnomevfs/gnome-vfs-types.h>
|
||||
#include <libgnomevfs/gnome-vfs-file-info.h>
|
||||
#include <libgnomevfs/gnome-vfs-mime-info.h>
|
||||
|
||||
#include <parser.h>
|
||||
#include <xmlmemory.h>
|
||||
|
@ -437,7 +438,7 @@ nautilus_icon_factory_get_icon_name_for_regular_file (NautilusFile *file)
|
|||
|
||||
mime_type = nautilus_file_get_mime_type (file);
|
||||
if (mime_type != NULL) {
|
||||
icon_name = gnome_mime_get_value (mime_type, "icon-filename");
|
||||
icon_name = gnome_vfs_mime_get_value (mime_type, "icon-filename");
|
||||
if (icon_name != NULL) {
|
||||
return icon_name;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue