mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-08-24 18:25:50 +00:00
Fix up indentation
2008-01-21 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-desktop-icon-file.c: Fix up indentation * libnautilus-private/nautilus-file.c: Allow umount and eject for NautilusFiles that have a GMount. (e.g. unix mountpoints) svn path=/trunk/; revision=13626
This commit is contained in:
parent
b881a1361b
commit
b4c4f976a9
|
@ -1,3 +1,12 @@
|
|||
2008-01-21 Alexander Larsson <alexl@redhat.com>
|
||||
|
||||
* libnautilus-private/nautilus-desktop-icon-file.c:
|
||||
Fix up indentation
|
||||
|
||||
* libnautilus-private/nautilus-file.c:
|
||||
Allow umount and eject for NautilusFiles that have
|
||||
a GMount. (e.g. unix mountpoints)
|
||||
|
||||
2008-01-18 Alexander Larsson <alexl@redhat.com>
|
||||
|
||||
* libnautilus-private/nautilus-autorun.c:
|
||||
|
|
|
@ -308,15 +308,15 @@ static void
|
|||
nautilus_desktop_icon_file_unmount (NautilusFile *file)
|
||||
{
|
||||
NautilusDesktopIconFile *desktop_file;
|
||||
GMount *mount;
|
||||
|
||||
desktop_file = NAUTILUS_DESKTOP_ICON_FILE (file);
|
||||
if (desktop_file) {
|
||||
mount = nautilus_desktop_link_get_mount (desktop_file->details->link);
|
||||
if (mount != NULL) {
|
||||
nautilus_file_operations_unmount_mount (NULL, mount, FALSE, TRUE);
|
||||
}
|
||||
}
|
||||
GMount *mount;
|
||||
|
||||
desktop_file = NAUTILUS_DESKTOP_ICON_FILE (file);
|
||||
if (desktop_file) {
|
||||
mount = nautilus_desktop_link_get_mount (desktop_file->details->link);
|
||||
if (mount != NULL) {
|
||||
nautilus_file_operations_unmount_mount (NULL, mount, FALSE, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -324,15 +324,15 @@ static void
|
|||
nautilus_desktop_icon_file_eject (NautilusFile *file)
|
||||
{
|
||||
NautilusDesktopIconFile *desktop_file;
|
||||
GMount *mount;
|
||||
|
||||
desktop_file = NAUTILUS_DESKTOP_ICON_FILE (file);
|
||||
if (desktop_file) {
|
||||
mount = nautilus_desktop_link_get_mount (desktop_file->details->link);
|
||||
if (mount != NULL) {
|
||||
nautilus_file_operations_unmount_mount (NULL, mount, TRUE, TRUE);
|
||||
}
|
||||
}
|
||||
GMount *mount;
|
||||
|
||||
desktop_file = NAUTILUS_DESKTOP_ICON_FILE (file);
|
||||
if (desktop_file) {
|
||||
mount = nautilus_desktop_link_get_mount (desktop_file->details->link);
|
||||
if (mount != NULL) {
|
||||
nautilus_file_operations_unmount_mount (NULL, mount, TRUE, TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#include "nautilus-desktop-icon-file.h"
|
||||
#include "nautilus-file-attributes.h"
|
||||
#include "nautilus-file-private.h"
|
||||
#include "nautilus-file-operations.h"
|
||||
#include "nautilus-file-utilities.h"
|
||||
#include "nautilus-global-preferences.h"
|
||||
#include "nautilus-lib-self-check-functions.h"
|
||||
|
@ -843,7 +844,9 @@ nautilus_file_can_unmount (NautilusFile *file)
|
|||
{
|
||||
g_return_val_if_fail (NAUTILUS_IS_FILE (file), FALSE);
|
||||
|
||||
return file->details->can_unmount;
|
||||
return file->details->can_unmount ||
|
||||
(file->details->mount != NULL &&
|
||||
g_mount_can_unmount (file->details->mount));
|
||||
}
|
||||
|
||||
gboolean
|
||||
|
@ -851,7 +854,9 @@ nautilus_file_can_eject (NautilusFile *file)
|
|||
{
|
||||
g_return_val_if_fail (NAUTILUS_IS_FILE (file), FALSE);
|
||||
|
||||
return file->details->can_eject;
|
||||
return file->details->can_eject ||
|
||||
(file->details->mount != NULL &&
|
||||
g_mount_can_eject (file->details->mount));
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -879,16 +884,26 @@ nautilus_file_mount (NautilusFile *file,
|
|||
void
|
||||
nautilus_file_unmount (NautilusFile *file)
|
||||
{
|
||||
if (NAUTILUS_FILE_GET_CLASS (file)->unmount != NULL) {
|
||||
NAUTILUS_FILE_GET_CLASS (file)->unmount (file);
|
||||
if (file->details->can_unmount) {
|
||||
if (NAUTILUS_FILE_GET_CLASS (file)->unmount != NULL) {
|
||||
NAUTILUS_FILE_GET_CLASS (file)->unmount (file);
|
||||
}
|
||||
} else if (file->details->mount != NULL &&
|
||||
g_mount_can_unmount (file->details->mount)) {
|
||||
nautilus_file_operations_unmount_mount (NULL, file->details->mount, FALSE, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
nautilus_file_eject (NautilusFile *file)
|
||||
{
|
||||
if (NAUTILUS_FILE_GET_CLASS (file)->eject != NULL) {
|
||||
NAUTILUS_FILE_GET_CLASS (file)->eject (file);
|
||||
if (file->details->can_eject) {
|
||||
if (NAUTILUS_FILE_GET_CLASS (file)->eject != NULL) {
|
||||
NAUTILUS_FILE_GET_CLASS (file)->eject (file);
|
||||
}
|
||||
} else if (file->details->mount != NULL &&
|
||||
g_mount_can_eject (file->details->mount)) {
|
||||
nautilus_file_operations_unmount_mount (NULL, file->details->mount, TRUE, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue