[gnome-disk-utility/udisks2-port] Don't look at IdUsage or IdType, look at D-Bus interfaces instead
- From: David Zeuthen <davidz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-disk-utility/udisks2-port] Don't look at IdUsage or IdType, look at D-Bus interfaces instead
- Date: Tue, 25 Oct 2011 20:51:28 +0000 (UTC)
commit a0885577dd433eece6dcd4a8c981e6263336713c
Author: David Zeuthen <davidz redhat com>
Date: Tue Oct 25 16:50:29 2011 -0400
Don't look at IdUsage or IdType, look at D-Bus interfaces instead
See
http://cgit.freedesktop.org/udisks/commit/?id=6cf7e7c87cbe7695ca4e4cd261f20262625367fe
for why it's a good idea to do this.
Signed-off-by: David Zeuthen <davidz redhat com>
src/palimpsest/gduwindow.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/src/palimpsest/gduwindow.c b/src/palimpsest/gduwindow.c
index 3a3304f..913035a 100644
--- a/src/palimpsest/gduwindow.c
+++ b/src/palimpsest/gduwindow.c
@@ -1580,14 +1580,16 @@ calculate_configuration_for_display (UDisksBlock *block,
if (str->len == 0)
{
+ UDisksObject *object;
+
/* No known configuration... show "No" only if we actually
* know how to configure the device or already offer to
* configure the device...
*/
- if (g_strcmp0 (udisks_block_get_id_usage (block), "filesystem") == 0 ||
- (g_strcmp0 (udisks_block_get_id_usage (block), "other") == 0 &&
- g_strcmp0 (udisks_block_get_id_type (block), "swap") == 0) ||
- g_strcmp0 (udisks_block_get_id_usage (block), "crypto") == 0 ||
+ object = UDISKS_OBJECT (g_dbus_interface_get_object (G_DBUS_INTERFACE (block)));
+ if (udisks_object_peek_filesystem (object) != NULL ||
+ udisks_object_peek_swapspace (object) != NULL ||
+ udisks_object_peek_encrypted (object) != NULL ||
show_flags & (SHOW_FLAGS_POPUP_MENU_CONFIGURE_FSTAB | SHOW_FLAGS_POPUP_MENU_CONFIGURE_CRYPTTAB))
{
/* Translators: Shown when the device is not configured */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]