summaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorCole Robinson <crobinso@redhat.com>2020-09-20 16:44:52 -0400
committerCole Robinson <crobinso@redhat.com>2020-09-20 17:08:39 -0400
commit2f7931da637a98995fe001097490ad288c3a728e (patch)
treeb8fb8f7053cc1431200d1263b4e1d688a28c5be4 /ui
parent5c1f4b238699dba34d6d7442396c9e1053645d88 (diff)
downloadvirt-manager-2f7931da637a98995fe001097490ad288c3a728e.tar.gz
createvol: Drop Allocation field in favor of checkbox
Inspired by some discussion from here: https://bugzilla.redhat.com/show_bug.cgi?id=1759454 Most libvirt storage volume creation doesn't actually do anything with allocation, besides interpreting cap == alloc and cap != alloc. The exceptions are zfs volumes, and raw file volumes. But it's unclear what the usecase is for the latter at all. This drops the allocation spinner and adds checkbox in its place 'Allocate entire volume now'. When enabled, it sets cap == alloc. We only show this for file volumes. For qcow2 it defaults to unselected (sparse), for all others it defaults to selected. If it's not showing, it defaults to selected. Bundled with this change is showing this field for qcow2, where we previously only allowed nonsparse here. Libvirt and qemu-img support non-sparse qcow2 these days. Signed-off-by: Cole Robinson <crobinso@redhat.com>
Diffstat (limited to 'ui')
-rw-r--r--ui/createvol.ui74
1 files changed, 31 insertions, 43 deletions
diff --git a/ui/createvol.ui b/ui/createvol.ui
index a77048f4..d136d1da 100644
--- a/ui/createvol.ui
+++ b/ui/createvol.ui
@@ -142,7 +142,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
- <property name="row_spacing">4</property>
+ <property name="row_spacing">6</property>
<property name="column_spacing">6</property>
<child>
<object class="GtkBox" id="hbox10">
@@ -284,8 +284,7 @@
<object class="GtkGrid" id="table2">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="border_width">8</property>
- <property name="row_spacing">4</property>
+ <property name="row_spacing">6</property>
<property name="column_spacing">6</property>
<child>
<object class="GtkSpinButton" id="vol-capacity">
@@ -297,7 +296,6 @@
<property name="climb_rate">10</property>
<property name="digits">1</property>
<property name="value">1</property>
- <signal name="value-changed" handler="on_vol_capacity_value_changed" swapped="no"/>
</object>
<packing>
<property name="left_attach">1</property>
@@ -305,35 +303,6 @@
</packing>
</child>
<child>
- <object class="GtkSpinButton" id="vol-allocation">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">●</property>
- <property name="text" translatable="yes">1.0</property>
- <property name="adjustment">adjustment1</property>
- <property name="climb_rate">10</property>
- <property name="digits">1</property>
- <property name="value">1</property>
- <signal name="value-changed" handler="on_vol_allocation_value_changed" swapped="no"/>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label9">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="halign">start</property>
- <property name="label" translatable="yes">GiB</property>
- </object>
- <packing>
- <property name="left_attach">2</property>
- <property name="top_attach">1</property>
- </packing>
- </child>
- <child>
<object class="GtkLabel" id="label8">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -350,7 +319,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">end</property>
- <property name="label" translatable="yes">Max Ca_pacity:</property>
+ <property name="label" translatable="yes">Ca_pacity:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">vol-capacity</property>
</object>
@@ -360,13 +329,27 @@
</packing>
</child>
<child>
- <object class="GtkLabel" id="label7">
+ <object class="GtkCheckButton" id="vol-nonsparse">
+ <property name="label" translatable="yes">_Allocate entire volume now</property>
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="halign">end</property>
- <property name="label" translatable="yes">_Allocation:</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
<property name="use_underline">True</property>
- <property name="mnemonic_widget">vol-allocation</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="width">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <placeholder/>
+ </child>
</object>
<packing>
<property name="left_attach">0</property>
@@ -391,16 +374,20 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="vexpand">False</property>
+ <property name="expanded">True</property>
<child>
<object class="GtkGrid" id="grid1">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="margin_top">4</property>
<property name="column_spacing">6</property>
<child>
<object class="GtkLabel" id="label11">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Path:</property>
+ <property name="label" translatable="yes">Pa_th:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">backing-store</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -412,7 +399,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
- <signal name="changed" handler="on_backing_store_changed" swapped="no"/>
<child internal-child="accessible">
<object class="AtkObject" id="backing-store-atkobject">
<property name="AtkObject::accessible-name">backing-store</property>
@@ -426,11 +412,12 @@
</child>
<child>
<object class="GtkButton" id="backing-browse">
- <property name="label" translatable="yes">Browse...</property>
+ <property name="label" translatable="yes">_Browse...</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="image">image2</property>
+ <property name="use_underline">True</property>
<signal name="clicked" handler="on_backing_browse_clicked" swapped="no"/>
</object>
<packing>
@@ -445,7 +432,8 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">False</property>
- <property name="label" translatable="yes">Backing store</property>
+ <property name="label" translatable="yes">_Backing store</property>
+ <property name="use_underline">True</property>
</object>
</child>
</object>