Commit f3b55a7c authored by Alexander Larsson's avatar Alexander Larsson Committed by Alexander Larsson

Pull in gio, not gnome-vfs.

2008-01-04  Alexander Larsson  <alexl@redhat.com>

        * libnautilus-extension/libnautilus-extension.pc.in:
	Pull in gio, not gnome-vfs.
	
        * libnautilus-extension/nautilus-file-info.[ch]:
        * libnautilus-private/nautilus-file.c:
	Export some gio specific things like file type and
	location/parent location.
	
        * libnautilus-private/nautilus-desktop-icon-file.c:
	These are G_FILE_TYPE_SHORTCUT files, not REGULAR files.



svn path=/trunk/; revision=13560
parent b192a5a6
2008-01-04 Alexander Larsson <alexl@redhat.com>
* libnautilus-extension/libnautilus-extension.pc.in:
Pull in gio, not gnome-vfs.
* libnautilus-extension/nautilus-file-info.[ch]:
* libnautilus-private/nautilus-file.c:
Export some gio specific things like file type and
location/parent location.
* libnautilus-private/nautilus-desktop-icon-file.c:
These are G_FILE_TYPE_SHORTCUT files, not REGULAR files.
2008-01-04 Alexander Larsson <alexl@redhat.com>
* configure.in:
......
......@@ -7,6 +7,6 @@ extensiondir=@libdir@/nautilus/extensions-2.0
Name: libnautilus-extension
Description: A library to create Nautilus view extensions
Version: @VERSION@
Requires: glib-2.0 gtk+-2.0 gnome-vfs-2.0
Requires: glib-2.0 gio-2.0 gtk+-2.0
Libs: -L${libdir} -lnautilus-extension
Cflags: -I${includedir}/nautilus
......@@ -90,6 +90,15 @@ nautilus_file_info_is_gone (NautilusFileInfo *file)
return NAUTILUS_FILE_INFO_GET_IFACE (file)->is_gone (file);
}
GFileType
nautilus_file_info_get_file_type (NautilusFileInfo *file)
{
g_return_val_if_fail (NAUTILUS_IS_FILE_INFO (file), G_FILE_TYPE_UNKNOWN);
g_return_val_if_fail (NAUTILUS_FILE_INFO_GET_IFACE (file)->get_file_type != NULL, G_FILE_TYPE_UNKNOWN);
return NAUTILUS_FILE_INFO_GET_IFACE (file)->get_file_type (file);
}
char *
nautilus_file_info_get_name (NautilusFileInfo *file)
{
......@@ -99,6 +108,14 @@ nautilus_file_info_get_name (NautilusFileInfo *file)
return NAUTILUS_FILE_INFO_GET_IFACE (file)->get_name (file);
}
GFile *
nautilus_file_info_get_location (NautilusFileInfo *file)
{
g_return_val_if_fail (NAUTILUS_IS_FILE_INFO (file), NULL);
g_return_val_if_fail (NAUTILUS_FILE_INFO_GET_IFACE (file)->get_location != NULL, NULL);
return NAUTILUS_FILE_INFO_GET_IFACE (file)->get_location (file);
}
char *
nautilus_file_info_get_uri (NautilusFileInfo *file)
{
......@@ -117,11 +134,20 @@ nautilus_file_info_get_activation_uri (NautilusFileInfo *file)
return NAUTILUS_FILE_INFO_GET_IFACE (file)->get_activation_uri (file);
}
GFile *
nautilus_file_info_get_parent_location (NautilusFileInfo *file)
{
g_return_val_if_fail (NAUTILUS_IS_FILE_INFO (file), NULL);
g_return_val_if_fail (NAUTILUS_FILE_INFO_GET_IFACE (file)->get_parent_location != NULL, NULL);
return NAUTILUS_FILE_INFO_GET_IFACE (file)->get_parent_location (file);
}
char *
nautilus_file_info_get_parent_uri (NautilusFileInfo *file)
{
g_return_val_if_fail (NAUTILUS_IS_FILE_INFO (file), NULL);
g_return_val_if_fail (NAUTILUS_FILE_INFO_GET_IFACE (file)->get_uri != NULL, NULL);
g_return_val_if_fail (NAUTILUS_FILE_INFO_GET_IFACE (file)->get_parent_uri != NULL, NULL);
return NAUTILUS_FILE_INFO_GET_IFACE (file)->get_parent_uri (file);
}
......
......@@ -27,6 +27,7 @@
#define NAUTILUS_FILE_INFO_H
#include <glib-object.h>
#include <gio/gio.h>
G_BEGIN_DECLS
......@@ -73,6 +74,11 @@ struct _NautilusFileInfoIface
void (*invalidate_extension_info) (NautilusFileInfo *file);
char * (*get_activation_uri) (NautilusFileInfo *file);
GFileType (*get_file_type) (NautilusFileInfo *file);
GFile * (*get_location) (NautilusFileInfo *file);
GFile * (*get_parent_location) (NautilusFileInfo *file);
};
GList *nautilus_file_info_list_copy (GList *files);
......@@ -83,9 +89,12 @@ GType nautilus_file_info_get_type (void);
gboolean nautilus_file_info_is_gone (NautilusFileInfo *file);
/* Name and Location */
GFileType nautilus_file_info_get_file_type (NautilusFileInfo *file);
GFile * nautilus_file_info_get_location (NautilusFileInfo *file);
char * nautilus_file_info_get_name (NautilusFileInfo *file);
char * nautilus_file_info_get_uri (NautilusFileInfo *file);
char * nautilus_file_info_get_activation_uri (NautilusFileInfo *file);
GFile * nautilus_file_info_get_parent_location (NautilusFileInfo *file);
char * nautilus_file_info_get_parent_uri (NautilusFileInfo *file);
char * nautilus_file_info_get_uri_scheme (NautilusFileInfo *file);
......
......@@ -174,7 +174,7 @@ update_info_from_link (NautilusDesktopIconFile *icon_file)
eel_ref_str_unref (file->details->mime_type);
file->details->mime_type = eel_ref_str_get_unique ("application/x-nautilus-link");
file->details->type = G_FILE_TYPE_REGULAR;
file->details->type = G_FILE_TYPE_SHORTCUT;
file->details->size = 0;
file->details->has_permissions = FALSE;
file->details->can_read = TRUE;
......
......@@ -6869,7 +6869,10 @@ nautilus_file_info_iface_init (NautilusFileInfoIface *iface)
{
iface->is_gone = nautilus_file_is_gone;
iface->get_name = nautilus_file_get_name;
iface->get_file_type = nautilus_file_get_file_type;
iface->get_location = nautilus_file_get_location;
iface->get_uri = nautilus_file_get_uri;
iface->get_parent_location = nautilus_file_get_parent_location;
iface->get_parent_uri = nautilus_file_get_parent_uri;
iface->get_uri_scheme = nautilus_file_get_uri_scheme;
iface->get_activation_uri = nautilus_file_get_activation_uri;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment