[gnome-boxes/use-mimetypes: 1/2] media-manager, installed-media: Untangle unnecessary object relation




commit ffae5ef6133b4876c89fc96f52beef64470b90d1
Author: Felipe Borges <felipeborges gnome org>
Date:   Wed Dec 22 11:05:47 2021 +0100

    media-manager, installed-media: Untangle unnecessary object relation

 src/installed-media.vala | 2 +-
 src/media-manager.vala   | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/installed-media.vala b/src/installed-media.vala
index 9ee1fa7b..a76eeca6 100644
--- a/src/installed-media.vala
+++ b/src/installed-media.vala
@@ -63,7 +63,7 @@ public InstalledMedia (string path, bool known_qcow2 = false) throws GLib.Error
         label_setup ();
     }
 
-    public async InstalledMedia.guess_os (string path, MediaManager media_manager) throws GLib.Error {
+    public async InstalledMedia.guess_os (string path) throws GLib.Error {
         this (path);
 
         resources = OSDatabase.get_default_resources ();
diff --git a/src/media-manager.vala b/src/media-manager.vala
index 692a6870..04915e2b 100644
--- a/src/media-manager.vala
+++ b/src/media-manager.vala
@@ -25,7 +25,7 @@ public async InstallerMedia create_installer_media_for_path (string       path,
         InstallerMedia media;
 
         try {
-            media = yield new InstalledMedia.guess_os (path, this);
+            media = yield new InstalledMedia.guess_os (path);
         } catch (IOError.NOT_SUPPORTED e) {
             media = yield new InstallerMedia.for_path (path, this, cancellable);
         }
@@ -40,7 +40,7 @@ public async InstallerMedia create_installer_media_for_path (string       path,
 
         try {
             if (VMConfigurator.is_import_config (config))
-                return yield new InstalledMedia.guess_os (path, this);
+                return yield new InstalledMedia.guess_os (path);
             else if (VMConfigurator.is_libvirt_system_import_config (config))
                 return new LibvirtMedia (path, config);
             else if (VMConfigurator.is_libvirt_cloning_config (config))


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