[gnome-disk-utility/udisks2-port] Catch up with recent API changes in udisks2



commit bb8fbcf02cab0ae9609924bcdc5ab44ec543e954
Author: David Zeuthen <davidz redhat com>
Date:   Fri Jul 22 10:01:29 2011 -0400

    Catch up with recent API changes in udisks2
    
    Signed-off-by: David Zeuthen <davidz redhat com>

 src/palimpsest/gdudevicetreemodel.c |    7 +++++--
 src/palimpsest/gduwindow.c          |    9 +++++----
 2 files changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/src/palimpsest/gdudevicetreemodel.c b/src/palimpsest/gdudevicetreemodel.c
index 44d7bcc..615ef3d 100644
--- a/src/palimpsest/gdudevicetreemodel.c
+++ b/src/palimpsest/gdudevicetreemodel.c
@@ -591,6 +591,7 @@ add_block (GduDeviceTreeModel  *model,
            GtkTreeIter         *parent)
 {
   UDisksBlockDevice *block;
+  UDisksLoop *loop;
   GIcon *icon;
   gchar *s;
   gchar *sort_key;
@@ -601,12 +602,14 @@ add_block (GduDeviceTreeModel  *model,
   gchar *size_str;
 
   block = udisks_object_peek_block_device (object);
+  loop = udisks_object_peek_loop (object);
+
   size = udisks_block_device_get_size (block);
   size_str = udisks_util_get_size_for_display (size, FALSE, FALSE);
 
   preferred_device = udisks_block_device_get_preferred_device (block);
-  loop_backing_file = udisks_block_device_get_loop_backing_file (block);
-  if (strlen (loop_backing_file) > 0)
+  loop_backing_file = loop != NULL ? udisks_loop_get_backing_file (loop) : NULL;
+  if (loop_backing_file != NULL)
     {
       gchar *loop_name;
 
diff --git a/src/palimpsest/gduwindow.c b/src/palimpsest/gduwindow.c
index 826b596..0f67caf 100644
--- a/src/palimpsest/gduwindow.c
+++ b/src/palimpsest/gduwindow.c
@@ -1119,7 +1119,7 @@ update_device_page_for_block (GduWindow          *window,
                               UDisksBlockDevice  *block,
                               guint64             size)
 {
-  const gchar *backing_file;
+  UDisksLoop *loop;
   const gchar *usage;
   const gchar *type;
   const gchar *version;
@@ -1138,13 +1138,14 @@ update_device_page_for_block (GduWindow          *window,
             "devtab-size-label",
             "devtab-size-value-label",
             size);
-  backing_file = udisks_block_device_get_loop_backing_file (block);
-  if (strlen (backing_file) > 0)
+
+  loop = udisks_object_peek_loop (object);
+  if (loop != NULL)
     {
       set_markup (window,
                   "devtab-backing-file-label",
                   "devtab-backing-file-value-label",
-                  backing_file, SET_MARKUP_FLAGS_NONE);
+                  udisks_loop_get_backing_file (loop), SET_MARKUP_FLAGS_NONE);
     }
 
   usage = udisks_block_device_get_id_usage (block);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]