From fd079a61321e675ccc00280b2a1dad054deac8a1 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Sat, 19 Feb 2022 09:00:47 -0500 Subject: [PATCH] fsdetails: Drop 'Mode:' UI We only ever show mapped vs squashed, and the difference is pretty advanced, so if users need it they can use the XML editor. Upcoming virtiofs support will also make handling this field more complicated Signed-off-by: Cole Robinson --- ui/fsdetails.ui | 50 ++++++--------------------------- virtManager/device/fsdetails.py | 26 +---------------- 2 files changed, 10 insertions(+), 66 deletions(-) diff --git a/ui/fsdetails.ui b/ui/fsdetails.ui index 6b60144f2..7f0c70741 100644 --- a/ui/fsdetails.ui +++ b/ui/fsdetails.ui @@ -7,7 +7,7 @@ 100 1000 - + True False @@ -22,7 +22,7 @@ 1 - 6 + 5 @@ -37,7 +37,7 @@ 1 - 7 + 6 @@ -76,7 +76,7 @@ 1 - 4 + 3 @@ -93,20 +93,6 @@ 0 - - - True - False - start - M_ode: - True - fs-mode-combo - - - 0 - 3 - - True @@ -132,7 +118,7 @@ 0 - 4 + 3 @@ -146,7 +132,7 @@ 0 - 6 + 5 @@ -159,7 +145,7 @@ 0 - 7 + 6 @@ -173,7 +159,7 @@ 0 - 5 + 4 @@ -212,7 +198,7 @@ 1 - 5 + 4 @@ -283,23 +269,5 @@ 1 - - - True - False - start - True - - - - False - - - - - 1 - 3 - - diff --git a/virtManager/device/fsdetails.py b/virtManager/device/fsdetails.py index 4a8eaf126..ab73913cb 100644 --- a/virtManager/device/fsdetails.py +++ b/virtManager/device/fsdetails.py @@ -14,13 +14,12 @@ from ..baseclass import vmmGObjectUI from ..storagebrowse import vmmStorageBrowser -_EDIT_FS_ENUM = range(1, 9) +_EDIT_FS_ENUM = range(1, 8) ( _EDIT_FS_TYPE, _EDIT_FS_DRIVER, _EDIT_FS_SOURCE, _EDIT_FS_RAM_SOURCE, - _EDIT_FS_MODE, _EDIT_FS_READONLY, _EDIT_FS_TARGET, _EDIT_FS_FORMAT, @@ -51,7 +50,6 @@ class vmmFSDetails(vmmGObjectUI): "on_fs_source_browse_clicked": self._browse_fs_source_cb, "on_fs_type_combo_changed": _e(_EDIT_FS_TYPE), "on_fs_driver_combo_changed": _e(_EDIT_FS_DRIVER), - "on_fs_mode_combo_changed": _e(_EDIT_FS_MODE), "on_fs_readonly_toggled": _e(_EDIT_FS_READONLY), "on_fs_format_combo_changed": _e(_EDIT_FS_FORMAT), "on_fs_source_changed": _e(_EDIT_FS_SOURCE), @@ -99,11 +97,6 @@ class vmmFSDetails(vmmGObjectUI): else: simple_store_set("fs-type-combo", [DeviceFilesystem.TYPE_MOUNT]) - simple_store_set("fs-mode-combo", - [DeviceFilesystem.MODE_MAPPED, - DeviceFilesystem.MODE_SQUASH, - None]) - simple_store_set("fs-driver-combo", [DeviceFilesystem.DRIVER_LOOP, DeviceFilesystem.DRIVER_NBD, @@ -123,10 +116,6 @@ class vmmFSDetails(vmmGObjectUI): def _sync_ui(self): fstype = uiutil.get_list_selection(self.widget("fs-type-combo")) fsdriver = uiutil.get_list_selection(self.widget("fs-driver-combo")) - ismount = bool(fstype == DeviceFilesystem.TYPE_MOUNT) - - show_mode = bool(ismount) - uiutil.set_grid_row_visible(self.widget("fs-mode-combo"), show_mode) show_ram_source = fstype == DeviceFilesystem.TYPE_RAM uiutil.set_grid_row_visible( @@ -140,8 +129,6 @@ class vmmFSDetails(vmmGObjectUI): self.widget("fs-format-combo"), show_format) show_driver_combo = fstype == DeviceFilesystem.TYPE_FILE - show_mode_combo = (fstype == DeviceFilesystem.TYPE_MOUNT and - (self.conn.is_qemu() or self.conn.is_test())) if fstype == DeviceFilesystem.TYPE_TEMPLATE: source_text = _("Te_mplate:") @@ -150,8 +137,6 @@ class vmmFSDetails(vmmGObjectUI): self.widget("fs-source-title").set_text(source_text) self.widget("fs-source-title").set_use_underline(True) - uiutil.set_grid_row_visible( - self.widget("fs-mode-combo"), show_mode_combo) uiutil.set_grid_row_visible( self.widget("fs-driver-combo"), show_driver_combo) @@ -163,7 +148,6 @@ class vmmFSDetails(vmmGObjectUI): def reset_state(self): self.widget("fs-type-combo").set_active(0) - self.widget("fs-mode-combo").set_active(0) self.widget("fs-driver-combo").set_active(0) self.widget("fs-format-combo").set_active(0) self.widget("fs-source").set_text("") @@ -177,8 +161,6 @@ class vmmFSDetails(vmmGObjectUI): uiutil.set_list_selection( self.widget("fs-type-combo"), dev.type) - uiutil.set_list_selection( - self.widget("fs-mode-combo"), dev.accessmode) uiutil.set_list_selection( self.widget("fs-driver-combo"), dev.driver_type) uiutil.set_list_selection( @@ -210,10 +192,6 @@ class vmmFSDetails(vmmGObjectUI): if not self.widget("fs-format-combo").get_visible(): fsformat = None - mode = uiutil.get_list_selection(self.widget("fs-mode-combo")) - if not self.widget("fs-mode-combo").get_visible(): - mode = None - driver = uiutil.get_list_selection(self.widget("fs-driver-combo")) if not self.widget("fs-driver-combo").get_visible(): driver = None @@ -229,8 +207,6 @@ class vmmFSDetails(vmmGObjectUI): dev.source = source if _EDIT_FS_TARGET in self._active_edits: dev.target = target - if _EDIT_FS_MODE in self._active_edits: - dev.accessmode = mode if _EDIT_FS_READONLY in self._active_edits: dev.readonly = readonly if _EDIT_FS_DRIVER in self._active_edits: