static GnomeVFSResult captive_vfs_parent_init(CaptiveVfsObject *captive_vfs_object);
+static void captive_vfs_parent_object_dispose(CaptiveVfsParentObject *captive_vfs_parent_object);
static void captive_vfs_parent_object_handler_detach(CaptiveVfsParentObject *captive_vfs_parent_object);
static void captive_vfs_parent_object_handler_cease(CaptiveVfsParentObject *captive_vfs_parent_object);
static void captive_vfs_parent_object_handler_abort(CaptiveVfsParentObject *captive_vfs_parent_object);
(CaptiveVfsObject *captive_vfs_object,CaptiveVfsVolumeInfo *volume_info);
-static void captive_vfs_parent_object_finalize(CaptiveVfsParentObject *captive_vfs_parent_object)
+/* We need to close the filesystem during custom 'dispose'
+ * as the default GObject g_object_real_dispose() destroys all the signals
+ * first and we would not notify our Connectors during captive_vfs_parent_object_finalize().
+ */
+static void captive_vfs_parent_object_dispose(CaptiveVfsParentObject *captive_vfs_parent_object)
{
g_return_if_fail(captive_vfs_parent_object!=NULL);
captive_vfs_parent_close(CAPTIVE_VFS_OBJECT(captive_vfs_parent_object)); /* errors ignored */
+ G_OBJECT_CLASS(captive_vfs_parent_object_parent_class)->dispose((GObject *)captive_vfs_parent_object);
+}
+
+
+static void captive_vfs_parent_object_finalize(CaptiveVfsParentObject *captive_vfs_parent_object)
+{
+ g_return_if_fail(captive_vfs_parent_object!=NULL);
+
G_OBJECT_CLASS(captive_vfs_parent_object_parent_class)->finalize((GObject *)captive_vfs_parent_object);
}
CaptiveVfsObjectClass *captive_vfs_object_class=CAPTIVE_VFS_OBJECT_CLASS(class);
captive_vfs_parent_object_parent_class=g_type_class_ref(g_type_parent(G_TYPE_FROM_CLASS(class)));
+ gobject_class->dispose=(void (*)(GObject *object))captive_vfs_parent_object_dispose;
gobject_class->finalize=(void (*)(GObject *object))captive_vfs_parent_object_finalize;
captive_vfs_object_class->init=captive_vfs_parent_init;
captive_vfs_parent_object=CAPTIVE_VFS_PARENT_OBJECT(captive_vfs_object);
if (captive_vfs_parent_object->corba_Vfs_object!=CORBA_OBJECT_NIL) {
- r=captive_sandbox_parent_vfs_close(captive_vfs_parent_object);
+ r=captive_vfs_parent_object_disconnect(captive_vfs_parent_object);
g_assert(captive_vfs_parent_object->corba_Vfs_object==CORBA_OBJECT_NIL);
}
else