Fix the adopt_orphan_mount vfunc to take a volume_monitor reference in an
authorAlexander Larsson <alexl@redhat.com>
Mon, 3 Mar 2008 21:38:30 +0000 (21:38 +0000)
committerAlexander Larsson <alexl@src.gnome.org>
Mon, 3 Mar 2008 21:38:30 +0000 (21:38 +0000)
2008-03-03  Alexander Larsson  <alexl@redhat.com>

        * gunionvolumemonitor.c:
        * gvolumemonitor.h:
Fix the adopt_orphan_mount vfunc to take a
volume_monitor reference in an ABI compat way.
This change is not API compat, but the added
arg is not used in the only user of this vfunc, so
all we get is a harmless warning in gvfs (#520169)

svn path=/trunk/; revision=6618

gio/ChangeLog
gio/gunionvolumemonitor.c
gio/gvolumemonitor.h

index f9ed489a6b3b34d74b24bbb89a96bbab58f6ba2d..51bc96676dc9d5570d127e96b9914d41d4142692 100644 (file)
@@ -1,3 +1,13 @@
+2008-03-03  Alexander Larsson  <alexl@redhat.com>
+
+        * gunionvolumemonitor.c:
+        * gvolumemonitor.h:
+       Fix the adopt_orphan_mount vfunc to take a
+       volume_monitor reference in an ABI compat way.
+       This change is not API compat, but the added
+       arg is not used in the only user of this vfunc, so
+       all we get is a harmless warning in gvfs (#520169)
+       
 2008-03-01  Benjamin Otte  <otte@gnome.org>
 
        * gfile.c:
index 77e8aa09554f2391facea7e248cfa5dcfa29e262..2a4152fde420c08162a8d6332c85a76b66421cb9 100644 (file)
@@ -65,12 +65,13 @@ g_union_volume_monitor_finalize (GObject *object)
 
   monitor = G_UNION_VOLUME_MONITOR (object);
 
-  while (monitor->monitors != NULL) {
-    child_monitor = monitor->monitors->data;
-    g_union_volume_monitor_remove_monitor (monitor, 
-                                           child_monitor);
-    g_object_unref (child_monitor);
-  }
+  while (monitor->monitors != NULL)
+    {
+      child_monitor = monitor->monitors->data;
+      g_union_volume_monitor_remove_monitor (monitor, 
+                                             child_monitor);
+      g_object_unref (child_monitor);
+    }
 
   
   if (G_OBJECT_CLASS (g_union_volume_monitor_parent_class)->finalize)
@@ -649,7 +650,7 @@ g_volume_monitor_adopt_orphan_mount (GMount *mount)
 
       if (child_monitor_class->adopt_orphan_mount != NULL)
         {
-          volume = child_monitor_class->adopt_orphan_mount (mount);
+          volume = child_monitor_class->adopt_orphan_mount (mount, child_monitor);
           if (volume != NULL)
             break;
         }
index 9e4a47d05dee1e52d2f25043de1509d1cddf46e0..9d32ceabbdf4a20b4229bc306e971143f5edd689 100644 (file)
@@ -111,8 +111,9 @@ struct _GVolumeMonitorClass {
                                      const char      *uuid);
 
 
-  GVolume * (*adopt_orphan_mount)   (GMount          *mount);
-
+  /* These arguments are unfortunately backwards by mistake (bug #520169) */
+  GVolume * (*adopt_orphan_mount)   (GMount          *mount,
+                                     GVolumeMonitor  *volume_monitor);
   
   /*< private >*/
   /* Padding for future expansion */