addhw: Some UI cleanup and simplification

This commit is contained in:
Cole Robinson 2010-03-04 15:29:33 -05:00
parent 7c92a277b2
commit b4f7383d28
2 changed files with 499 additions and 573 deletions

View File

@ -705,6 +705,9 @@ class vmmAddHardware(gobject.GObject):
self.window.get_widget("create-forward").show()
def page_changed(self, notebook, page, page_number):
devbox = self.window.get_widget("host-device")
devbox.hide()
if page_number == PAGE_CHAR:
devtype = self.window.get_widget("char-device-type")
self.change_char_device_type(devtype)
@ -713,6 +716,9 @@ class vmmAddHardware(gobject.GObject):
elif page_number == PAGE_SUMMARY:
self.populate_summary()
elif page_number == PAGE_HOSTDEV:
devbox.show()
return
def populate_summary(self):

View File

@ -764,7 +764,7 @@
<child>
<widget class="GtkLabel" id="label146">
<property name="visible">True</property>
<property name="label">Storage</property>
<property name="label">disk</property>
</widget>
<packing>
<property name="position">1</property>
@ -1004,7 +1004,7 @@
<child>
<widget class="GtkLabel" id="label355">
<property name="visible">True</property>
<property name="label">Network</property>
<property name="label">net</property>
</widget>
<packing>
<property name="position">2</property>
@ -1061,18 +1061,8 @@
<child>
<widget class="GtkAlignment" id="alignment152">
<property name="visible">True</property>
<property name="left_padding">25</property>
<property name="left_padding">15</property>
<property name="right_padding">15</property>
<child>
<widget class="GtkFrame" id="frame3">
<property name="visible">True</property>
<property name="border_width">6</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<widget class="GtkAlignment" id="alignment153">
<property name="visible">True</property>
<property name="left_padding">12</property>
<child>
<widget class="GtkTable" id="table33">
<property name="visible">True</property>
@ -1136,27 +1126,33 @@
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkHBox" id="hbox7">
<property name="visible">True</property>
<child>
<widget class="GtkComboBox" id="input-type">
<property name="visible">True</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="expand">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkAlignment" id="alignment15">
<property name="visible">True</property>
<child>
<placeholder/>
</child>
</widget>
<packing>
<property name="position">1</property>
</packing>
</child>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Virtual pointer&lt;/b&gt;</property>
<property name="use_markup">True</property>
</widget>
<packing>
<property name="type">label_item</property>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
</packing>
</child>
</widget>
@ -1180,7 +1176,7 @@
<child>
<widget class="GtkLabel" id="label391">
<property name="visible">True</property>
<property name="label">Input</property>
<property name="label">input</property>
</widget>
<packing>
<property name="position">3</property>
@ -1222,12 +1218,12 @@
<child>
<widget class="GtkVBox" id="vbox58">
<property name="visible">True</property>
<property name="border_width">10</property>
<property name="orientation">vertical</property>
<child>
<widget class="GtkLabel" id="label415">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="xpad">20</property>
<property name="ypad">10</property>
<property name="label" translatable="yes">Please indicate how you would like to view the virtual display.</property>
<property name="use_markup">True</property>
@ -1240,24 +1236,12 @@
</packing>
</child>
<child>
<widget class="GtkAlignment" id="alignment155">
<widget class="GtkAlignment" id="alignment3">
<property name="visible">True</property>
<property name="left_padding">25</property>
<property name="right_padding">15</property>
<child>
<widget class="GtkFrame" id="frame4">
<property name="visible">True</property>
<property name="border_width">6</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<widget class="GtkAlignment" id="alignment159">
<property name="visible">True</property>
<property name="left_padding">6</property>
<property name="left_padding">12</property>
<child>
<widget class="GtkTable" id="table38">
<property name="visible">True</property>
<property name="border_width">6</property>
<property name="n_rows">7</property>
<property name="n_columns">2</property>
<property name="column_spacing">6</property>
@ -1283,6 +1267,7 @@
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
@ -1338,6 +1323,7 @@
<widget class="GtkSpinButton" id="graphics-port">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">&#x25CF;</property>
<property name="adjustment">5900 5900 5999 1 10 0</property>
<property name="climb_rate">1</property>
<property name="snap_to_ticks">True</property>
@ -1380,12 +1366,14 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="visibility">False</property>
<property name="invisible_char">&#x25CF;</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">5</property>
<property name="bottom_attach">6</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
@ -1508,6 +1496,7 @@
<packing>
<property name="top_attach">6</property>
<property name="bottom_attach">7</property>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
@ -1564,6 +1553,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="invisible_char">&#x25CF;</property>
</widget>
<packing>
<property name="left_attach">3</property>
@ -1577,26 +1567,33 @@
<property name="right_attach">2</property>
<property name="top_attach">6</property>
<property name="bottom_attach">7</property>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkLabel" id="label418">
<widget class="GtkAlignment" id="alignment5">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Virtual display&lt;/b&gt;</property>
<property name="use_markup">True</property>
<child>
<placeholder/>
</child>
</widget>
<packing>
<property name="type">label_item</property>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
<widget class="GtkAlignment" id="alignment11">
<property name="visible">True</property>
<child>
<placeholder/>
</child>
</widget>
<packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
</widget>
@ -1620,7 +1617,7 @@
<child>
<widget class="GtkLabel" id="label401">
<property name="visible">True</property>
<property name="label">Graphics</property>
<property name="label">gfx</property>
</widget>
<packing>
<property name="position">4</property>
@ -1677,19 +1674,8 @@
<child>
<widget class="GtkAlignment" id="alignment2">
<property name="visible">True</property>
<property name="left_padding">25</property>
<property name="left_padding">20</property>
<property name="right_padding">15</property>
<child>
<widget class="GtkFrame" id="frame5">
<property name="visible">True</property>
<property name="border_width">6</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<widget class="GtkAlignment" id="alignment3">
<property name="visible">True</property>
<property name="top_padding">2</property>
<property name="left_padding">12</property>
<child>
<widget class="GtkTable" id="table2">
<property name="visible">True</property>
@ -1722,20 +1708,6 @@
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkLabel" id="label11">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Sound Device&lt;/b&gt;</property>
<property name="use_markup">True</property>
</widget>
<packing>
<property name="type">label_item</property>
</packing>
</child>
</widget>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="position">1</property>
@ -1754,7 +1726,7 @@
<child>
<widget class="GtkLabel" id="label5">
<property name="visible">True</property>
<property name="label">Sound</property>
<property name="label">sound</property>
</widget>
<packing>
<property name="position">5</property>
@ -1812,19 +1784,8 @@ to connect to the virtual machine.</property>
<child>
<widget class="GtkAlignment" id="alignment4">
<property name="visible">True</property>
<property name="left_padding">25</property>
<property name="left_padding">20</property>
<property name="right_padding">15</property>
<child>
<widget class="GtkFrame" id="frame6">
<property name="visible">True</property>
<property name="border_width">6</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<widget class="GtkAlignment" id="alignment5">
<property name="visible">True</property>
<property name="top_padding">2</property>
<property name="left_padding">12</property>
<child>
<widget class="GtkTable" id="table3">
<property name="visible">True</property>
@ -1833,9 +1794,7 @@ to connect to the virtual machine.</property>
<property name="column_spacing">12</property>
<property name="row_spacing">6</property>
<child>
<widget class="GtkComboBox" id="host-device">
<property name="visible">True</property>
</widget>
<widget class="GtkComboBox" id="host-device"/>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
@ -1884,20 +1843,6 @@ to connect to the virtual machine.</property>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkLabel" id="label19">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Physical Host Device&lt;/b&gt;</property>
<property name="use_markup">True</property>
</widget>
<packing>
<property name="type">label_item</property>
</packing>
</child>
</widget>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="position">1</property>
@ -1916,7 +1861,7 @@ to connect to the virtual machine.</property>
<child>
<widget class="GtkLabel" id="label15">
<property name="visible">True</property>
<property name="label">Hostdev</property>
<property name="label">phys</property>
</widget>
<packing>
<property name="position">6</property>
@ -2311,7 +2256,7 @@ to connect to the virtual machine.</property>
<child>
<widget class="GtkLabel" id="label13">
<property name="visible">True</property>
<property name="label">Char</property>
<property name="label">char</property>
</widget>
<packing>
<property name="position">7</property>
@ -2369,19 +2314,8 @@ to connect to the virtual machine.</property>
<child>
<widget class="GtkAlignment" id="alignment10">
<property name="visible">True</property>
<property name="left_padding">25</property>
<property name="left_padding">20</property>
<property name="right_padding">15</property>
<child>
<widget class="GtkFrame" id="frame10">
<property name="visible">True</property>
<property name="border_width">6</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<widget class="GtkAlignment" id="alignment11">
<property name="visible">True</property>
<property name="top_padding">2</property>
<property name="left_padding">12</property>
<child>
<widget class="GtkTable" id="table5">
<property name="visible">True</property>
@ -2413,20 +2347,6 @@ to connect to the virtual machine.</property>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkLabel" id="label24">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Video Device&lt;/b&gt;</property>
<property name="use_markup">True</property>
</widget>
<packing>
<property name="type">label_item</property>
</packing>
</child>
</widget>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="position">1</property>
@ -2445,7 +2365,7 @@ to connect to the virtual machine.</property>
<child>
<widget class="GtkLabel" id="label25">
<property name="visible">True</property>
<property name="label">Video</property>
<property name="label">vid</property>
</widget>
<packing>
<property name="position">8</property>
@ -2600,7 +2520,7 @@ to connect to the virtual machine.</property>
<child>
<widget class="GtkLabel" id="step6">
<property name="visible">True</property>
<property name="label">Finish</property>
<property name="label">finish</property>
</widget>
<packing>
<property name="position">9</property>