create: Fix some spacing issues

This commit is contained in:
Cole Robinson 2013-10-02 12:12:26 -04:00
parent d6f96f72d5
commit 7c7f3ad0b2
2 changed files with 17 additions and 30 deletions

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.16.0 on Wed Oct 2 10:09:09 2013 -->
<!-- Generated with glade 3.16.0 on Wed Oct 2 12:11:37 2013 -->
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkAdjustment" id="adjustment1">
@ -23,6 +23,8 @@
<property name="stock">gtk-new</property>
</object>
<object class="GtkWindow" id="vmm-create">
<property name="width_request">400</property>
<property name="height_request">400</property>
<property name="can_focus">False</property>
<property name="title" translatable="yes">New VM</property>
<property name="resizable">False</property>
@ -429,6 +431,7 @@
<object class="GtkAlignment" id="alignment13">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="top_padding">8</property>
<property name="left_padding">15</property>
<child>
<object class="GtkGrid" id="table6">

View File

@ -607,10 +607,9 @@ class vmmCreate(vmmGObjectUI):
# Networking
net_list = self.widget("config-netdev")
net_expander = self.widget("config-advanced-expander")
net_warn_icon = self.widget("config-netdev-warn-icon")
net_warn_box = self.widget("config-netdev-warn-box")
net_expander.hide()
net_expander = self.widget("config-advanced-expander")
net_warn_icon.hide()
net_warn_box.hide()
net_expander.set_expanded(False)
@ -1414,37 +1413,22 @@ class vmmCreate(vmmGObjectUI):
# Update page number
self.set_page_num_text(pagenum)
if pagenum == PAGE_NAME:
self.widget("create-back").set_sensitive(False)
else:
self.widget("create-back").set_sensitive(True)
self.widget("create-back").set_sensitive(pagenum != PAGE_NAME)
self.widget("create-forward").set_visible(pagenum != PAGE_FINISH)
self.widget("create-finish").set_visible(pagenum == PAGE_FINISH)
if pagenum == PAGE_INSTALL:
self.detect_media_os()
self.widget("install-os-distro-box").set_property(
"visible",
not self.container_install())
self.widget("install-os-distro-box").set_visible(
not self.container_install())
elif pagenum == PAGE_FINISH:
self.widget("create-finish").grab_focus()
self.populate_summary()
self.widget("config-netdev").emit("changed")
if pagenum != PAGE_FINISH:
self.widget("create-forward").show()
self.widget("create-finish").hide()
return
# PAGE_FINISH
# This is hidden in reset_state, so that it doesn't distort
# the size of the wizard if it is expanded by default due to
# error
self.widget("config-advanced-expander").show()
self.widget("create-forward").hide()
self.widget("create-finish").show()
self.widget("create-finish").grab_focus()
self.populate_summary()
# Make sure the networking selection takes into account
# the install method, so we can warn if trying to PXE boot with
# insufficient network option
self.check_network_selection()
for nr in range(self.widget("create-pages").get_n_pages()):
page = self.widget("create-pages").get_nth_page(nr)
page.set_visible(nr == pagenum)
def get_graphics_device(self, guest):
if guest.os.is_container():