[gnome-disk-utility] Use media icon, if available
- From: David Zeuthen <davidz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-disk-utility] Use media icon, if available
- Date: Mon, 20 Jan 2014 07:29:50 +0000 (UTC)
commit ed44f1b9e0542ba3ba5f7037af70a7bb16dc0f9b
Author: David Zeuthen <zeuthen gmail com>
Date: Sat Jan 18 16:07:39 2014 -0800
Use media icon, if available
Now that we only show a single icon, it makes sense to choose the
media icon if there is one.
Signed-off-by: David Zeuthen <zeuthen gmail com>
src/disks/gdudevicetreemodel.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/disks/gdudevicetreemodel.c b/src/disks/gdudevicetreemodel.c
index 77ca20f..2ed7c24 100644
--- a/src/disks/gdudevicetreemodel.c
+++ b/src/disks/gdudevicetreemodel.c
@@ -847,6 +847,7 @@ update_drive (GduDeviceTreeModel *model,
GtkTreeIter iter;
guint pulse;
guint64 size = 0;
+ GIcon *icon = NULL;
if (!find_iter_for_object (model,
object,
@@ -907,9 +908,13 @@ update_drive (GduDeviceTreeModel *model,
if (from_timer)
pulse += 1;
+ icon = udisks_object_info_get_media_icon (info);
+ if (icon == NULL)
+ icon = udisks_object_info_get_icon (info);
+
gtk_tree_store_set (GTK_TREE_STORE (model),
&iter,
- GDU_DEVICE_TREE_MODEL_COLUMN_ICON, udisks_object_info_get_icon (info),
+ GDU_DEVICE_TREE_MODEL_COLUMN_ICON, icon,
GDU_DEVICE_TREE_MODEL_COLUMN_NAME, s,
GDU_DEVICE_TREE_MODEL_COLUMN_SORT_KEY, udisks_object_info_get_sort_key (info),
GDU_DEVICE_TREE_MODEL_COLUMN_WARNING, warning,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]