Subject: console: Move embeddable_graphics() to console.py
From: Feng Jiang jiangfeng@kylinos.cn Mon Jan 30 15:23:37 2023 +0800
Date: Sun Mar 3 12:52:20 2024 -0500:
Git: 9c242ef79cbe3a2ad94bc5aca02603d508302580

Signed-off-by: Feng Jiang <jiangfeng@kylinos.cn>
Signed-off-by: Weishi Li <liweishi@kylinos.cn>
Reviewed-by: Cole Robinson <crobinso@redhat.com>

diff --git a/virtManager/config.py b/virtManager/config.py
index 2c81b061..438b9aff 100644
--- a/virtManager/config.py
+++ b/virtManager/config.py
@@ -208,10 +208,6 @@ class vmmConfig(object):
     def get_ui_dir(self):
         return self.ui_dir
 
-    def embeddable_graphics(self):
-        ret = ["vnc", "spice"]
-        return ret
-
     def inspection_supported(self):
         if not vmmInspection.libguestfs_installed():
             return False  # pragma: no cover
diff --git a/virtManager/details/console.py b/virtManager/details/console.py
index f1168655..80c9c14e 100644
--- a/virtManager/details/console.py
+++ b/virtManager/details/console.py
@@ -293,6 +293,10 @@ class _ConsoleMenu:
                 return True
         return False
 
+    def embeddable_graphics(self):
+        ret = ["vnc", "spice"]
+        return ret
+
 
 class vmmConsolePages(vmmGObjectUI):
     """
@@ -700,7 +704,7 @@ class vmmConsolePages(vmmGObjectUI):
                 _("Graphical console not configured for guest"))
             return
 
-        if ginfo.gtype not in self.config.embeddable_graphics():
+        if ginfo.gtype not in self._consolemenu.embeddable_graphics():
             log.debug("Don't know how to show graphics type '%s' "
                           "disabling console page", ginfo.gtype)