From 9be836102e745cd3824cd89af1bc30278913b6d7 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Sun, 16 Jun 2019 21:45:19 -0400 Subject: [PATCH] virtManager: move device UI files to virtManager/device/ --- virtManager/addhardware.py | 12 ++++++------ virtManager/console.py | 2 +- virtManager/create.py | 6 +++--- virtManager/details.py | 12 ++++++------ virtManager/device/__init__.py | 0 virtManager/{ => device}/addstorage.py | 4 ++-- virtManager/{ => device}/fsdetails.py | 7 ++++--- virtManager/{ => device}/gfxdetails.py | 5 +++-- virtManager/{ => device}/mediacombo.py | 4 ++-- virtManager/{ => device}/netlist.py | 4 ++-- virtManager/{ => device}/vsockdetails.py | 4 ++-- 11 files changed, 31 insertions(+), 29 deletions(-) create mode 100644 virtManager/device/__init__.py rename virtManager/{ => device}/addstorage.py (99%) rename virtManager/{ => device}/fsdetails.py (99%) rename virtManager/{ => device}/gfxdetails.py (99%) rename virtManager/{ => device}/mediacombo.py (98%) rename virtManager/{ => device}/netlist.py (99%) rename virtManager/{ => device}/vsockdetails.py (97%) diff --git a/virtManager/addhardware.py b/virtManager/addhardware.py index c4f26e60..52ce0f6b 100644 --- a/virtManager/addhardware.py +++ b/virtManager/addhardware.py @@ -17,14 +17,14 @@ from virtinst import (DeviceChannel, DeviceConsole, from virtinst import log from . import uiutil -from .fsdetails import vmmFSDetails -from .gfxdetails import vmmGraphicsDetails -from .netlist import vmmNetworkList from .asyncjob import vmmAsyncJob -from .storagebrowse import vmmStorageBrowser from .baseclass import vmmGObjectUI -from .addstorage import vmmAddStorage -from .vsockdetails import vmmVsockDetails +from .device.addstorage import vmmAddStorage +from .device.fsdetails import vmmFSDetails +from .device.gfxdetails import vmmGraphicsDetails +from .device.netlist import vmmNetworkList +from .device.vsockdetails import vmmVsockDetails +from .storagebrowse import vmmStorageBrowser from .xmleditor import vmmXMLEditor diff --git a/virtManager/console.py b/virtManager/console.py index d7bb1f0c..e61822e4 100644 --- a/virtManager/console.py +++ b/virtManager/console.py @@ -947,7 +947,7 @@ class vmmConsolePages(vmmGObjectUI): radio=False, sensitive=False) return - from .gfxdetails import vmmGraphicsDetails + from .device.gfxdetails import vmmGraphicsDetails active = (self.widget("console-pages").get_current_page() != _CONSOLE_PAGE_SERIAL) diff --git a/virtManager/create.py b/virtManager/create.py index cb85f1da..fbb66d66 100644 --- a/virtManager/create.py +++ b/virtManager/create.py @@ -19,13 +19,13 @@ import virtinst.generatename from virtinst import log from . import uiutil -from .addstorage import vmmAddStorage from .asyncjob import vmmAsyncJob from .baseclass import vmmGObjectUI from .connmanager import vmmConnectionManager +from .device.addstorage import vmmAddStorage +from .device.mediacombo import vmmMediaCombo +from .device.netlist import vmmNetworkList from .engine import vmmEngine -from .mediacombo import vmmMediaCombo -from .netlist import vmmNetworkList from .object.domain import vmmDomainVirtinst from .oslist import vmmOSList from .storagebrowse import vmmStorageBrowser diff --git a/virtManager/details.py b/virtManager/details.py index b1202048..8ab21e81 100644 --- a/virtManager/details.py +++ b/virtManager/details.py @@ -16,16 +16,16 @@ from virtinst import log from . import uiutil from .addhardware import vmmAddHardware -from .addstorage import vmmAddStorage from .baseclass import vmmGObjectUI -from .fsdetails import vmmFSDetails -from .gfxdetails import vmmGraphicsDetails +from .device.addstorage import vmmAddStorage +from .device.fsdetails import vmmFSDetails +from .device.gfxdetails import vmmGraphicsDetails +from .device.mediacombo import vmmMediaCombo +from .device.netlist import vmmNetworkList +from .device.vsockdetails import vmmVsockDetails from .graphwidgets import Sparkline -from .mediacombo import vmmMediaCombo -from .netlist import vmmNetworkList from .oslist import vmmOSList from .storagebrowse import vmmStorageBrowser -from .vsockdetails import vmmVsockDetails from .xmleditor import vmmXMLEditor diff --git a/virtManager/device/__init__.py b/virtManager/device/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/virtManager/addstorage.py b/virtManager/device/addstorage.py similarity index 99% rename from virtManager/addstorage.py rename to virtManager/device/addstorage.py index 6eea08b2..03838b2c 100644 --- a/virtManager/addstorage.py +++ b/virtManager/device/addstorage.py @@ -10,8 +10,8 @@ from gi.repository import Gtk import virtinst from virtinst import log -from . import uiutil -from .baseclass import vmmGObjectUI +from .. import uiutil +from ..baseclass import vmmGObjectUI class vmmAddStorage(vmmGObjectUI): diff --git a/virtManager/fsdetails.py b/virtManager/device/fsdetails.py similarity index 99% rename from virtManager/fsdetails.py rename to virtManager/device/fsdetails.py index 2bb70ce6..97ecf01c 100644 --- a/virtManager/fsdetails.py +++ b/virtManager/device/fsdetails.py @@ -8,9 +8,10 @@ from gi.repository import Gtk from virtinst import DeviceFilesystem -from . import uiutil -from .baseclass import vmmGObjectUI -from .storagebrowse import vmmStorageBrowser + +from .. import uiutil +from ..baseclass import vmmGObjectUI +from ..storagebrowse import vmmStorageBrowser class vmmFSDetails(vmmGObjectUI): diff --git a/virtManager/gfxdetails.py b/virtManager/device/gfxdetails.py similarity index 99% rename from virtManager/gfxdetails.py rename to virtManager/device/gfxdetails.py index 1286a524..1131ae8f 100644 --- a/virtManager/gfxdetails.py +++ b/virtManager/device/gfxdetails.py @@ -8,8 +8,9 @@ from gi.repository import Gtk import virtinst -from . import uiutil -from .baseclass import vmmGObjectUI + +from .. import uiutil +from ..baseclass import vmmGObjectUI class vmmGraphicsDetails(vmmGObjectUI): diff --git a/virtManager/mediacombo.py b/virtManager/device/mediacombo.py similarity index 98% rename from virtManager/mediacombo.py rename to virtManager/device/mediacombo.py index 3963beab..3fcb0488 100644 --- a/virtManager/mediacombo.py +++ b/virtManager/device/mediacombo.py @@ -5,8 +5,8 @@ from gi.repository import Gtk -from . import uiutil -from .baseclass import vmmGObject, vmmGObjectUI +from .. import uiutil +from ..baseclass import vmmGObject, vmmGObjectUI class vmmMediaCombo(vmmGObjectUI): diff --git a/virtManager/netlist.py b/virtManager/device/netlist.py similarity index 99% rename from virtManager/netlist.py rename to virtManager/device/netlist.py index d827a5e9..cffee362 100644 --- a/virtManager/netlist.py +++ b/virtManager/device/netlist.py @@ -10,8 +10,8 @@ from gi.repository import Gtk import virtinst from virtinst import log -from . import uiutil -from .baseclass import vmmGObjectUI +from .. import uiutil +from ..baseclass import vmmGObjectUI NetDev = collections.namedtuple('Netdev', ['name', 'is_bridge', 'slave_names']) diff --git a/virtManager/vsockdetails.py b/virtManager/device/vsockdetails.py similarity index 97% rename from virtManager/vsockdetails.py rename to virtManager/device/vsockdetails.py index 1f40c461..b147dc72 100644 --- a/virtManager/vsockdetails.py +++ b/virtManager/device/vsockdetails.py @@ -3,8 +3,8 @@ # This work is licensed under the GNU GPLv2 or later. # See the COPYING file in the top-level directory. -from . import uiutil -from .baseclass import vmmGObjectUI +from .. import uiutil +from ..baseclass import vmmGObjectUI class vmmVsockDetails(vmmGObjectUI):