diff --git a/ui/vmm-add-hardware.ui b/ui/vmm-add-hardware.ui index ea4c3a952..8bd2fee37 100644 --- a/ui/vmm-add-hardware.ui +++ b/ui/vmm-add-hardware.ui @@ -2363,29 +2363,13 @@ access in the guest. False 24 - + True False - 4 - 2 - 12 6 + 12 - - True - False - 0 - _Type: - True - fs-type-combo - - - GTK_FILL - GTK_FILL - - - - + True False @@ -2416,28 +2400,13 @@ access in the guest. 1 - 2 - GTK_FILL + 0 + 1 + 1 - - True - False - 0 - _Mode: - True - fs-mode-combo - - - 1 - 2 - GTK_FILL - GTK_FILL - - - - + True False @@ -2467,30 +2436,13 @@ access in the guest. 1 - 2 - 1 - 2 - GTK_FILL - - - - - True - False - 0 - _Driver: - True - fs-driver-combo - - 2 - 3 - GTK_FILL - GTK_FILL + 1 + 1 - + True False @@ -2521,30 +2473,13 @@ access in the guest. 1 - 2 - 2 - 3 - GTK_FILL + 1 + 1 + 1 - - True - False - 0 - _Write Policy: - True - fs-wrpolicy-combo - - - 3 - 4 - GTK_FILL - GTK_FILL - - - - + True False @@ -2574,42 +2509,9 @@ access in the guest. 1 - 2 3 - 4 - GTK_FILL - - - - - True - False - 0 - src labelll: - True - fs-source - - - 4 - 5 - GTK_FILL - GTK_FILL - - - - - True - False - 0 - Ta_rget path: - True - fs-target - - - 5 - 6 - GTK_FILL - GTK_FILL + 1 + 1 @@ -2620,10 +2522,9 @@ access in the guest. 1 - 2 5 - 6 - GTK_FILL + 1 + 1 @@ -2638,15 +2539,11 @@ access in the guest. 1 - 2 6 - 7 - GTK_FILL + 1 + 1 - - - True @@ -2682,10 +2579,120 @@ access in the guest. 1 - 2 4 - 5 - GTK_FILL + 1 + 1 + + + + + True + False + 0 + _Type: + True + fs-type-combo + + + 0 + 0 + 1 + 1 + + + + + True + False + 0 + _Mode: + True + fs-mode-combo + + + 0 + 2 + 1 + 1 + + + + + True + False + 0 + _Driver: + True + fs-driver-combo + + + 0 + 1 + 1 + 1 + + + + + True + False + 0 + _Write Policy: + True + fs-wrpolicy-combo + + + 0 + 3 + 1 + 1 + + + + + True + False + 0 + src labelll: + True + fs-source + + + 0 + 4 + 1 + 1 + + + + + True + False + 0 + Ta_rget path: + True + fs-target + + + 0 + 5 + 1 + 1 + + + + + True + False + + + + + + 0 + 6 + 1 + 1 diff --git a/virtManager/addhardware.py b/virtManager/addhardware.py index 0d119243a..61a0faa63 100644 --- a/virtManager/addhardware.py +++ b/virtManager/addhardware.py @@ -1148,30 +1148,21 @@ class vmmAddHardware(vmmGObjectUI): self.show_pair_combo("fs-wrpolicy", show_wrpolicy_combo) def change_fs_driver(self, src): - idx = src.get_active() fsdriver = None - modecombo = self.widget("fs-mode-combo") - modelabel1 = self.widget("fs-mode-title") - wrpcombo = self.widget("fs-wrpolicy-combo") - wrplabel1 = self.widget("fs-wrpolicy-title") - + idx = src.get_active() if idx >= 0 and src.get_property("visible"): fsdriver = src.get_model()[idx][0] - if (fsdriver == virtinst.VirtualFilesystem.DRIVER_PATH or - fsdriver == virtinst.VirtualFilesystem.DRIVER_DEFAULT): - modecombo.set_property("visible", True) - modelabel1.set_property("visible", True) - else: - modecombo.set_property("visible", False) - modelabel1.set_property("visible", False) + show_mode = bool( + fsdriver == virtinst.VirtualFilesystem.DRIVER_PATH or + fsdriver == virtinst.VirtualFilesystem.DRIVER_DEFAULT) + self.widget("fs-mode-title").set_visible(show_mode) + self.widget("fs-mode-box").set_visible(show_mode) - if (fsdriver == virtinst.VirtualFilesystem.DRIVER_DEFAULT): - wrpcombo.set_property("visible", False) - wrplabel1.set_property("visible", False) - else: - wrpcombo.set_property("visible", True) - wrplabel1.set_property("visible", True) + show_wrpol = bool( + fsdriver and fsdriver != virtinst.VirtualFilesystem.DRIVER_DEFAULT) + self.widget("fs-wrpolicy-title").set_visible(show_wrpol) + self.widget("fs-wrpolicy-box").set_visible(show_wrpol)