1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-17 12:02:48 +01:00

Stop using deprecated glib eject functions.

This commit is contained in:
John Maguire 2011-10-26 11:51:11 +02:00
parent c8ca261b33
commit 01f3f5c5ea

View File

@ -480,16 +480,26 @@ void GioLister::UnmountDevice(const QString &id) {
if (info.volume) {
if (g_volume_can_eject(info.volume)) {
g_volume_eject(info.volume, G_MOUNT_UNMOUNT_NONE, NULL,
(GAsyncReadyCallback) VolumeEjectFinished, NULL);
g_volume_eject_with_operation(
info.volume,
G_MOUNT_UNMOUNT_NONE,
NULL,
NULL,
(GAsyncReadyCallback) VolumeEjectFinished,
NULL);
g_object_unref(info.volume);
return;
}
}
if (g_mount_can_eject(info.mount)) {
g_mount_eject(info.mount, G_MOUNT_UNMOUNT_NONE, NULL,
(GAsyncReadyCallback) MountEjectFinished, NULL);
g_mount_eject_with_operation(
info.mount,
G_MOUNT_UNMOUNT_NONE,
NULL,
NULL,
(GAsyncReadyCallback) MountEjectFinished,
NULL);
} else if (g_mount_can_unmount(info.mount)) {
g_mount_unmount(info.mount, G_MOUNT_UNMOUNT_NONE, NULL,
(GAsyncReadyCallback) MountUnmountFinished, NULL);
@ -554,5 +564,3 @@ void GioLister::DoMountDevice(const QString& id, int request_id) {
VolumeMountFinished, NULL);
emit DeviceMounted(id, request_id, true);
}