[gnome-disk-utility/udisks2-port] Use new Drive:Ejectable property
- From: David Zeuthen <davidz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-disk-utility/udisks2-port] Use new Drive:Ejectable property
- Date: Fri, 9 Dec 2011 22:18:14 +0000 (UTC)
commit 79d5bee9ab6f1b97afbe6bfcbf3c1878b64694b9
Author: David Zeuthen <davidz redhat com>
Date: Fri Dec 9 17:17:57 2011 -0500
Use new Drive:Ejectable property
Signed-off-by: David Zeuthen <davidz redhat com>
src/palimpsest/gduwindow.c | 23 ++---------------------
1 files changed, 2 insertions(+), 21 deletions(-)
---
diff --git a/src/palimpsest/gduwindow.c b/src/palimpsest/gduwindow.c
index 244975a..1fc2227 100644
--- a/src/palimpsest/gduwindow.c
+++ b/src/palimpsest/gduwindow.c
@@ -1451,35 +1451,16 @@ setup_device_page (GduWindow *window,
if (drive != NULL)
{
GList *blocks;
- gchar *drive_name;
- gchar *drive_desc;
- GIcon *drive_icon;
- gchar *drive_media_desc;
- GIcon *drive_media_icon;
/* TODO: for multipath, ensure e.g. mpathk is before sda, sdb */
blocks = get_top_level_blocks_for_drive (window, g_dbus_object_get_object_path (G_DBUS_OBJECT (object)));
blocks = g_list_sort (blocks, (GCompareFunc) block_compare_on_preferred);
- udisks_client_get_drive_info (window->client,
- drive,
- &drive_name,
- &drive_desc,
- &drive_icon,
- &drive_media_desc,
- &drive_media_icon);
if (blocks != NULL)
gdu_volume_grid_set_block_object (GDU_VOLUME_GRID (window->volume_grid), blocks->data);
else
gdu_volume_grid_set_block_object (GDU_VOLUME_GRID (window->volume_grid), NULL);
- g_free (drive_name);
- g_free (drive_desc);
- g_object_unref (drive_icon);
- g_free (drive_media_desc);
- if (drive_media_icon != NULL)
- g_object_unref (drive_media_icon);
-
g_list_foreach (blocks, (GFunc) g_object_unref, NULL);
g_list_free (blocks);
}
@@ -1633,7 +1614,7 @@ update_device_page_for_drive (GduWindow *window,
}
- if (udisks_drive_get_media_removable (drive))
+ if (udisks_drive_get_ejectable (drive))
{
*show_flags |= SHOW_FLAGS_EJECT_BUTTON;
}
@@ -2013,7 +1994,7 @@ update_device_page_for_block (GduWindow *window,
{
UDisksDrive *drive;
drive = udisks_object_peek_drive (drive_object);
- if (udisks_drive_get_media_removable (drive))
+ if (udisks_drive_get_ejectable (drive))
*show_flags |= SHOW_FLAGS_EJECT_BUTTON;
g_object_unref (drive_object);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]