createnet: Remove explanatory network labels

This wizard is sufficiently obscure that I don't think it's
really valuable to try to explain networking concepts with
UI labels. If users don't know what they are trying to create
by using this wizard, there's no way we are going to adequately
explain to them what they are looking at. The example values
should be self explanatory enough anyways
This commit is contained in:
Cole Robinson 2019-05-05 11:59:57 -04:00
parent 1fa0f7261b
commit 4b414cbcca
2 changed files with 2 additions and 254 deletions

View File

@ -284,6 +284,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="halign">start</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_net-ipv4-enable_toggled" swapped="no"/>
</object>
@ -354,126 +355,6 @@
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box7">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkImage" id="image105">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">start</property>
<property name="margin_start">3</property>
<property name="margin_end">3</property>
<property name="margin_top">3</property>
<property name="margin_bottom">3</property>
<property name="stock">gtk-dialog-info</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box8">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="label387">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="valign">start</property>
<property name="label" translatable="yes">&lt;b&gt;Hint:&lt;/b&gt; The network should be chosen from one of the IPv4 private address ranges. eg 10.0.0.0/8 or 192.168.0.0/16</property>
<property name="use_markup">True</property>
<property name="wrap">True</property>
<property name="width_chars">40</property>
<property name="max_width_chars">50</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkGrid" id="table35">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="row_spacing">3</property>
<property name="column_spacing">6</property>
<child>
<object class="GtkLabel" id="net-info-gateway">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">192.168.100.1</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="net-info-type">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">?</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label25">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">end</property>
<property name="label" translatable="yes">Gateway:</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label28">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">end</property>
<property name="label" translatable="yes">Type:</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
@ -618,6 +499,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="halign">start</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_net-ipv6-enable_toggled" swapped="no"/>
</object>
@ -688,125 +570,6 @@
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box11">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">start</property>
<property name="margin_start">3</property>
<property name="margin_end">3</property>
<property name="margin_top">3</property>
<property name="margin_bottom">3</property>
<property name="stock">gtk-dialog-info</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box12">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="label11">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="valign">start</property>
<property name="label" translatable="yes">&lt;b&gt;Note:&lt;/b&gt; The network could be chosen from one of the IPv6 private address ranges. eg FC00::/7. The prefix must be &lt;b&gt;64&lt;/b&gt;. A typical IPv6 network address will look something like: fd00:e81d:a6d7:55::/64</property>
<property name="use_markup">True</property>
<property name="wrap">True</property>
<property name="max_width_chars">45</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkGrid" id="table2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="row_spacing">3</property>
<property name="column_spacing">6</property>
<child>
<object class="GtkLabel" id="net-info-gateway-ip6">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">fd00:100::1</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="net-info-type-ip6">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">?</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label7">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">end</property>
<property name="label" translatable="yes">Type:</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label6">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">end</property>
<property name="label" translatable="yes">Gateway:</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>

View File

@ -486,14 +486,10 @@ class vmmCreateNetwork(vmmGObjectUI):
return
valid_ip = (ip.num_addresses >= 8 and ip.is_private)
gateway = (ip.prefixlen != 32 and str(ip.network_address + 1) or "")
info = (ip.is_private and _("Private") or _("Other/Public"))
start = int(ip.num_addresses // 2)
end = int(ip.num_addresses - 2)
src.modify_bg(Gtk.StateType.NORMAL, valid_ip and _green or _red)
self.widget("net-info-gateway").set_text(gateway)
self.widget("net-info-type").set_text(info)
self.widget("net-dhcpv4-start").set_text(
str(ip.network_address + start)
)
@ -507,21 +503,10 @@ class vmmCreateNetwork(vmmGObjectUI):
return
valid_ip = (ip.num_addresses == 64 and ip.is_private)
gateway = (ip.prefixlen != 64 and str(ip.network_address + 1) or "")
start = 256
end = 512 - 1
if ip.is_private:
info = _("Private")
elif ip.is_reserved:
info = _("Reserved")
elif ip.is_unspecified:
info = _("Unspecified")
else:
info = _("Other/Public")
src.modify_bg(Gtk.StateType.NORMAL, valid_ip and _green or _red)
self.widget("net-info-gateway-ip6").set_text(gateway)
self.widget("net-info-type-ip6").set_text(info)
self.widget("net-dhcpv6-start").set_text(
str(ip.network_address + start)
)