mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
create: Always display the storage path in the summary
This commit is contained in:
61
ui/create.ui
61
ui/create.ui
@@ -2152,22 +2152,6 @@ is not yet supported.</small></property>
|
||||
<property name="top_attach">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="summary-storage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label">label</property>
|
||||
<property name="wrap">True</property>
|
||||
<property name="ellipsize">end</property>
|
||||
<property name="width_chars">31</property>
|
||||
<property name="max_width_chars">31</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">5</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="summary-customize">
|
||||
<property name="label" translatable="yes">C_ustomize configuration before install</property>
|
||||
@@ -2309,6 +2293,51 @@ is not yet supported.</small></property>
|
||||
<property name="top_attach">6</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="box3">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="hexpand">False</property>
|
||||
<property name="vexpand">False</property>
|
||||
<property name="spacing">3</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="summary-storage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label">label</property>
|
||||
<property name="wrap">True</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="summary-storage-path">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label">label</property>
|
||||
<property name="ellipsize">start</property>
|
||||
<property name="width_chars">27</property>
|
||||
<property name="max_width_chars">27</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">5</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
||||
@@ -995,24 +995,20 @@ class vmmCreate(vmmGObjectUI):
|
||||
install = _("Operating system container")
|
||||
|
||||
storagetmpl = "<span size='small' color='#484848'>%s</span>"
|
||||
storagesize = ""
|
||||
storagepath = ""
|
||||
disks = self._guest.get_devices("disk")
|
||||
if disks:
|
||||
disk = disks[0]
|
||||
storage = "%s" % _pretty_storage(disk.get_size())
|
||||
|
||||
# default storage is dependent on the VM name which the user
|
||||
# can change on the last page, so this label can get out of date.
|
||||
# We could dynamically update it if user changes things, but
|
||||
# not sure if anyone cares.
|
||||
if not self._is_default_storage():
|
||||
storage += " " + (storagetmpl % disk.path)
|
||||
storagesize = "%s" % _pretty_storage(disk.get_size())
|
||||
storagepath += " " + (storagetmpl % disk.path)
|
||||
elif len(self._guest.get_devices("filesystem")):
|
||||
fs = self._guest.get_devices("filesystem")[0]
|
||||
storage = storagetmpl % fs.source
|
||||
storagepath = storagetmpl % fs.source
|
||||
elif self._guest.os.is_container():
|
||||
storage = _("Host filesystem")
|
||||
storagepath = _("Host filesystem")
|
||||
else:
|
||||
storage = _("None")
|
||||
storagepath = _("None")
|
||||
|
||||
osstr = ""
|
||||
have_os = True
|
||||
@@ -1032,7 +1028,9 @@ class vmmCreate(vmmGObjectUI):
|
||||
self.widget("summary-install").set_text(install)
|
||||
self.widget("summary-mem").set_text(mem)
|
||||
self.widget("summary-cpu").set_text(cpu)
|
||||
self.widget("summary-storage").set_markup(storage)
|
||||
self.widget("summary-storage").set_markup(storagesize)
|
||||
self.widget("summary-storage").set_visible(bool(storagesize))
|
||||
self.widget("summary-storage-path").set_markup(storagepath)
|
||||
|
||||
self._netdev_changed(None)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user