Use consistent widget names for create wizard headers
Makes copying code around simpler
This commit is contained in:
parent
3118821848
commit
60b7365ae9
|
@ -1,4 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.15.4 on Fri Sep 27 10:23:23 2013 -->
|
||||
<interface>
|
||||
<!-- interface-requires gtk+ 3.0 -->
|
||||
<object class="GtkImage" id="image1">
|
||||
|
@ -172,7 +173,7 @@
|
|||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="icon_name">network-idle</property>
|
||||
<property name="icon-size">6</property>
|
||||
<property name="icon_size">6</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
@ -329,7 +330,7 @@
|
|||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="stock">gtk-harddisk</property>
|
||||
<property name="icon-size">6</property>
|
||||
<property name="icon_size">6</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
@ -577,7 +578,7 @@
|
|||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkViewport" id="clone-header">
|
||||
<object class="GtkViewport" id="header">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="resize_mode">queue</property>
|
||||
|
@ -592,7 +593,7 @@
|
|||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="icon_name">vm_clone_wizard</property>
|
||||
<property name="icon-size">6</property>
|
||||
<property name="icon_size">6</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
|
|
11
ui/create.ui
11
ui/create.ui
|
@ -1,4 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.15.4 on Fri Sep 27 10:23:02 2013 -->
|
||||
<interface>
|
||||
<!-- interface-requires gtk+ 3.0 -->
|
||||
<object class="GtkAdjustment" id="adjustment1">
|
||||
|
@ -32,7 +33,7 @@
|
|||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkViewport" id="create-header">
|
||||
<object class="GtkViewport" id="header">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="resize_mode">queue</property>
|
||||
|
@ -47,7 +48,7 @@
|
|||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="icon_name">vm_new_wizard</property>
|
||||
<property name="icon-size">6</property>
|
||||
<property name="icon_size">6</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
|
@ -78,7 +79,7 @@
|
|||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="config-pagenum">
|
||||
<object class="GtkLabel" id="header-pagenum">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xalign">0</property>
|
||||
|
@ -1013,7 +1014,6 @@ User shouldn't see this.</property>
|
|||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="invisible_char">●</property>
|
||||
<property name="invisible_char_set">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
|
@ -1183,7 +1183,6 @@ User shouldn't see this.</property>
|
|||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="invisible_char">●</property>
|
||||
<property name="invisible_char_set">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
|
@ -1293,8 +1292,8 @@ is not yet supported.</small></property>
|
|||
<object class="GtkVBox" id="install-detect-os-box">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<signal name="show" handler="on_install_detect_os_box_show" swapped="no"/>
|
||||
<signal name="hide" handler="on_install_detect_os_box_hide" swapped="no"/>
|
||||
<signal name="show" handler="on_install_detect_os_box_show" swapped="no"/>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="install-detect-os">
|
||||
<property name="label" translatable="yes">A_utomatically detect operating system based on install media</property>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.15.4 on Fri Sep 27 09:56:20 2013 -->
|
||||
<interface>
|
||||
<!-- interface-requires gtk+ 3.0 -->
|
||||
<object class="GtkAdjustment" id="adjustment1">
|
||||
|
@ -31,7 +32,7 @@
|
|||
<property name="can_focus">False</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkViewport" id="migrate-header">
|
||||
<object class="GtkViewport" id="header">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="resize_mode">queue</property>
|
||||
|
@ -46,7 +47,7 @@
|
|||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="icon_name">vm_clone_wizard</property>
|
||||
<property name="icon-size">6</property>
|
||||
<property name="icon_size">6</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
|
@ -55,7 +56,7 @@
|
|||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="migrate-main-label">
|
||||
<object class="GtkLabel" id="header-label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xalign">0</property>
|
||||
|
@ -689,7 +690,7 @@
|
|||
<object class="GtkHButtonBox" id="hbuttonbox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="spacing">12</property>
|
||||
<property name="spacing">6</property>
|
||||
<property name="layout_style">end</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="migrate-cancel">
|
||||
|
|
|
@ -215,11 +215,12 @@ class vmmCloneVM(vmmGObjectUI):
|
|||
|
||||
def set_initial_state(self):
|
||||
blue = Gdk.Color.parse("#0072A8")[1]
|
||||
self.widget("clone-header").modify_bg(Gtk.StateType.NORMAL, blue)
|
||||
self.widget("header").modify_bg(Gtk.StateType.NORMAL, blue)
|
||||
|
||||
context = self.topwin.get_style_context()
|
||||
defcolor = context.get_background_color(Gtk.StateType.NORMAL)
|
||||
self.widget("storage-viewport").override_background_color(Gtk.StateType.NORMAL,
|
||||
self.widget("storage-viewport").override_background_color(
|
||||
Gtk.StateType.NORMAL,
|
||||
defcolor)
|
||||
|
||||
# Populate state
|
||||
|
|
|
@ -221,7 +221,7 @@ class vmmCreate(vmmGObjectUI):
|
|||
self.widget("install-method-pages").set_show_tabs(False)
|
||||
|
||||
blue = Gdk.Color.parse("#0072A8")[1]
|
||||
self.widget("create-header").modify_bg(Gtk.StateType.NORMAL, blue)
|
||||
self.widget("header").modify_bg(Gtk.StateType.NORMAL, blue)
|
||||
|
||||
# Connection list
|
||||
self.widget("create-conn-label").set_text("")
|
||||
|
@ -1336,7 +1336,7 @@ class vmmCreate(vmmGObjectUI):
|
|||
_("Step %(current_page)d of %(max_page)d") %
|
||||
{'current_page': cur, 'max_page': final})
|
||||
|
||||
self.widget("config-pagenum").set_markup(page_lbl)
|
||||
self.widget("header-pagenum").set_markup(page_lbl)
|
||||
|
||||
def page_changed(self, ignore1, ignore2, pagenum):
|
||||
# Update page number
|
||||
|
|
|
@ -71,8 +71,6 @@ class vmmMigrateDialog(vmmGObjectUI):
|
|||
})
|
||||
self.bind_escape_key_close()
|
||||
|
||||
blue = Gdk.color_parse("#0072A8")
|
||||
self.widget("migrate-header").modify_bg(Gtk.StateType.NORMAL, blue)
|
||||
self.init_state()
|
||||
|
||||
def show(self, parent):
|
||||
|
@ -100,6 +98,9 @@ class vmmMigrateDialog(vmmGObjectUI):
|
|||
self.widget("migrate-dest").get_model().clear()
|
||||
|
||||
def init_state(self):
|
||||
blue = Gdk.color_parse("#0072A8")
|
||||
self.widget("header").modify_bg(Gtk.StateType.NORMAL, blue)
|
||||
|
||||
# [hostname, conn, can_migrate, tooltip]
|
||||
dest_model = Gtk.ListStore(str, object, bool, str)
|
||||
dest_combo = self.widget("migrate-dest")
|
||||
|
@ -118,7 +119,7 @@ class vmmMigrateDialog(vmmGObjectUI):
|
|||
def reset_state(self):
|
||||
title_str = ("<span size='large' color='white'>%s '%s'</span>" %
|
||||
(_("Migrate"), util.xml_escape(self.vm.get_name())))
|
||||
self.widget("migrate-main-label").set_markup(title_str)
|
||||
self.widget("header-label").set_markup(title_str)
|
||||
|
||||
self.widget("migrate-cancel").grab_focus()
|
||||
|
||||
|
|
Loading…
Reference in New Issue