Reinstate all combo box entries, f16 glade throws them away
Hardcode them in the python files, since for some reason glade just can't be convinced to hang onto them. I know they are deprecated, but only as of gtk 2.24 which is much newer than our current minimal target of RHEL6 2.18
This commit is contained in:
parent
103c2e0da1
commit
9adab83715
|
@ -61,6 +61,14 @@ char_widget_mappings = {
|
|||
"target_name" : "char-target-name",
|
||||
}
|
||||
|
||||
_comboentry_xml = """
|
||||
<interface>
|
||||
<object class="GtkComboBoxEntry" id="config-storage-format">
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</interface>
|
||||
"""
|
||||
|
||||
class vmmAddHardware(vmmGObjectUI):
|
||||
def __init__(self, vm):
|
||||
vmmGObjectUI.__init__(self,
|
||||
|
@ -76,6 +84,10 @@ class vmmAddHardware(vmmGObjectUI):
|
|||
|
||||
self._dev = None
|
||||
|
||||
self.window.add_from_string(_comboentry_xml)
|
||||
self.widget("table7").attach(self.widget("config-storage-format"),
|
||||
1, 2, 2, 3, xoptions=gtk.FILL)
|
||||
|
||||
self.window.connect_signals({
|
||||
"on_create_cancel_clicked" : self.close,
|
||||
"on_vmm_create_delete_event" : self.close,
|
||||
|
|
|
@ -48,6 +48,15 @@ def default_conn_user(conn):
|
|||
return "root"
|
||||
return current_user()
|
||||
|
||||
_hostname_xml = """
|
||||
<interface>
|
||||
<object class="GtkComboBoxEntry" id="hostname">
|
||||
<property name="visible">True</property>
|
||||
<signal name="changed" handler="on_hostname_combo_changed"/>
|
||||
</object>
|
||||
</interface>
|
||||
"""
|
||||
|
||||
class vmmConnect(vmmGObjectUI):
|
||||
def __init__(self):
|
||||
vmmGObjectUI.__init__(self,
|
||||
|
@ -70,6 +79,10 @@ class vmmConnect(vmmGObjectUI):
|
|||
self.browser_sigs = []
|
||||
self.can_browse = False
|
||||
|
||||
self.window.add_from_string(_hostname_xml)
|
||||
self.widget("table1").attach(self.widget("hostname"),
|
||||
1, 2, 4, 5, yoptions=gtk.FILL)
|
||||
|
||||
# Set this if we can't resolve 'hostname.local': means avahi
|
||||
# prob isn't configured correctly, and we should strip .local
|
||||
self.can_resolve_local = None
|
||||
|
|
|
@ -61,6 +61,22 @@ RHEL6_OS_SUPPORT = [
|
|||
"win2k3", "winxp", "win2k8", "vista", "win7",
|
||||
]
|
||||
|
||||
_comboentry_xml = """
|
||||
<interface>
|
||||
<object class="GtkComboBoxEntry" id="install-local-box">
|
||||
<property name="visible">True</property>
|
||||
<signal name="changed" handler="on_install_local_box_changed"/>
|
||||
</object>
|
||||
<object class="GtkComboBoxEntry" id="install-url-box">
|
||||
<property name="visible">True</property>
|
||||
<signal name="changed" handler="on_install_url_box_changed"/>
|
||||
</object>
|
||||
<object class="GtkComboBoxEntry" id="install-ks-box">
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</interface>
|
||||
"""
|
||||
|
||||
class vmmCreate(vmmGObjectUI):
|
||||
def __init__(self, engine):
|
||||
vmmGObjectUI.__init__(self, "vmm-create.ui", "vmm-create")
|
||||
|
@ -98,6 +114,13 @@ class vmmCreate(vmmGObjectUI):
|
|||
self.config_window = None
|
||||
self.config_window_signals = []
|
||||
|
||||
self.window.add_from_string(_comboentry_xml)
|
||||
self.widget("table2").attach(self.widget("install-url-box"),
|
||||
1, 2, 0, 1)
|
||||
self.widget("table7").attach(self.widget("install-ks-box"),
|
||||
1, 2, 0, 1)
|
||||
self.widget("alignment8").add(self.widget("install-local-box"))
|
||||
|
||||
self.window.connect_signals({
|
||||
"on_vmm_newcreate_delete_event" : self.close,
|
||||
|
||||
|
|
|
@ -33,6 +33,21 @@ from virtinst import Storage
|
|||
PAGE_NAME = 0
|
||||
PAGE_FORMAT = 1
|
||||
|
||||
_comboentry_xml = """
|
||||
<interface>
|
||||
<object class="GtkComboBoxEntry" id="pool-source-path">
|
||||
<property name="visible">True</property>
|
||||
<signal name="changed" handler="on_pool_source_path_changed"/>
|
||||
<signal name="focus" handler="on_pool_source_path_focus"/>
|
||||
</object>
|
||||
<object class="GtkComboBoxEntry" id="pool-target-path">
|
||||
<property name="visible">True</property>
|
||||
<signal name="changed" handler="on_pool_target_path_changed"/>
|
||||
<signal name="focus_in_event" handler="on_pool_target_path_focus_in_event"/>
|
||||
</object>
|
||||
</interface>
|
||||
"""
|
||||
|
||||
class vmmCreatePool(vmmGObjectUI):
|
||||
def __init__(self, conn):
|
||||
vmmGObjectUI.__init__(self,
|
||||
|
@ -43,6 +58,12 @@ class vmmCreatePool(vmmGObjectUI):
|
|||
self._pool = None
|
||||
self._pool_class = Storage.StoragePool
|
||||
|
||||
self.window.add_from_string(_comboentry_xml)
|
||||
self.widget("pool-source-box").pack_start(
|
||||
self.widget("pool-source-path"))
|
||||
self.widget("pool-target-box").pack_start(
|
||||
self.widget("pool-target-path"))
|
||||
|
||||
self.window.connect_signals({
|
||||
"on_pool_forward_clicked" : self.forward,
|
||||
"on_pool_back_clicked" : self.back,
|
||||
|
|
|
@ -37,6 +37,19 @@ from virtManager import util as util
|
|||
|
||||
import virtinst
|
||||
|
||||
_comboentry_xml = """
|
||||
<interface>
|
||||
<object class="GtkComboBoxEntry" id="cpu-model">
|
||||
<property name="visible">True</property>
|
||||
<signal name="changed" handler="on_cpu_model_changed"/>
|
||||
</object>
|
||||
<object class="GtkComboBoxEntry" id="disk-format">
|
||||
<property name="visible">True</property>
|
||||
<signal name="changed" handler="on_disk_format_changed"/>
|
||||
</object>
|
||||
</interface>
|
||||
"""
|
||||
|
||||
# Parameters that can be editted in the details window
|
||||
EDIT_TOTAL = 36
|
||||
(EDIT_NAME,
|
||||
|
@ -326,6 +339,12 @@ class vmmDetails(vmmGObjectUI):
|
|||
self.ignoreDetails = False
|
||||
self._cpu_copy_host = False
|
||||
|
||||
self.window.add_from_string(_comboentry_xml)
|
||||
self.widget("hbox17").pack_start(self.widget("disk-format"),
|
||||
False, True, 0)
|
||||
self.widget("hbox21").pack_start(self.widget("cpu-model"),
|
||||
False, True, 0)
|
||||
|
||||
self.console = vmmConsolePages(self.vm, self.window)
|
||||
|
||||
# Set default window size
|
||||
|
|
|
@ -387,6 +387,7 @@
|
|||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
<property name="pack_type">end</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
|
@ -417,6 +418,7 @@
|
|||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
<property name="pack_type">end</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
|
|
|
@ -2389,6 +2389,7 @@ I/O:</property>
|
|||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
@ -4000,6 +4001,7 @@ I/O:</property>
|
|||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
|
Loading…
Reference in New Issue