Update new VM status icons.

Previous round didn't convey state very well, and looked too much like
buttons.
This commit is contained in:
Cole Robinson 2009-09-17 11:24:18 -04:00
parent 3d22dbf020
commit 54cc845793
6 changed files with 17 additions and 4 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 379 B

After

Width:  |  Height:  |  Size: 921 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 452 B

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 366 B

After

Width:  |  Height:  |  Size: 828 B

View File

@ -90,7 +90,16 @@ class vmmConfig:
libvirt.VIR_DOMAIN_SHUTOFF: gtk.gdk.pixbuf_new_from_file_at_size(self.get_icon_dir() + "/state_shutoff.png", 18, 18),
libvirt.VIR_DOMAIN_NOSTATE: gtk.gdk.pixbuf_new_from_file_at_size(self.get_icon_dir() + "/state_running.png", 18, 18),
}
#initialize the help stuff
self.status_icons_large = {
libvirt.VIR_DOMAIN_BLOCKED: gtk.gdk.pixbuf_new_from_file_at_size(self.get_icon_dir() + "/state_running.png", 32, 32),
libvirt.VIR_DOMAIN_CRASHED: gtk.gdk.pixbuf_new_from_file_at_size(self.get_icon_dir() + "/state_crashed.png", 32, 32),
libvirt.VIR_DOMAIN_PAUSED: gtk.gdk.pixbuf_new_from_file_at_size(self.get_icon_dir() + "/state_paused.png", 32, 32),
libvirt.VIR_DOMAIN_RUNNING: gtk.gdk.pixbuf_new_from_file_at_size(self.get_icon_dir() + "/state_running.png", 32, 32),
libvirt.VIR_DOMAIN_SHUTDOWN: gtk.gdk.pixbuf_new_from_file_at_size(self.get_icon_dir() + "/state_shutoff.png", 32, 32),
libvirt.VIR_DOMAIN_SHUTOFF: gtk.gdk.pixbuf_new_from_file_at_size(self.get_icon_dir() + "/state_shutoff.png", 32, 32),
libvirt.VIR_DOMAIN_NOSTATE: gtk.gdk.pixbuf_new_from_file_at_size(self.get_icon_dir() + "/state_running.png", 32, 32),
}
props = { gnome.PARAM_APP_DATADIR : self.get_data_dir()}
gnome.program_init(self.get_appname(), self.get_appversion(), \
properties=props)
@ -100,6 +109,9 @@ class vmmConfig:
def get_vm_status_icon(self, state):
return self.status_icons[state]
def get_vm_status_icon_large(self, state):
return self.status_icons_large[state]
def get_shutdown_icon_name(self):
theme = gtk.icon_theme_get_default()
if theme.has_icon("system-shutdown"):

View File

@ -728,6 +728,8 @@ class vmmDomain(gobject.GObject):
def run_status_icon(self):
return self.config.get_vm_status_icon(self.status())
def run_status_icon_large(self):
return self.config.get_vm_status_icon_large(self.status())
def _is_serial_console_tty_accessible(self, path):
# pty serial scheme doesn't work over remote

View File

@ -493,7 +493,7 @@ class vmmManager(gobject.GObject):
row.insert(ROW_NAME, vm.get_name())
row.insert(ROW_MARKUP, row[ROW_NAME])
row.insert(ROW_STATUS, vm.run_status())
row.insert(ROW_STATUS_ICON, vm.run_status_icon())
row.insert(ROW_STATUS_ICON, vm.run_status_icon_large())
row.insert(ROW_KEY, vm.get_uuid())
row.insert(ROW_HINT, None)
row.insert(ROW_IS_CONN, False)
@ -575,7 +575,7 @@ class vmmManager(gobject.GObject):
row = self.rows[self.vm_row_key(vm)]
row[ROW_STATUS] = vm.run_status()
row[ROW_STATUS_ICON] = vm.run_status_icon()
row[ROW_STATUS_ICON] = vm.run_status_icon_large()
row[ROW_IS_VM_RUNNING] = vm.is_active()
model.row_changed(row.path, row.iter)
@ -850,7 +850,6 @@ class vmmManager(gobject.GObject):
statusCol.add_attribute(status_icon, 'cell-background', ROW_COLOR)
statusCol.add_attribute(status_icon, 'pixbuf', ROW_STATUS_ICON)
statusCol.add_attribute(status_icon, 'visible', ROW_IS_VM)
statusCol.add_attribute(status_icon, 'sensitive', ROW_IS_VM_RUNNING)
name_txt = gtk.CellRendererText()
nameCol.pack_start(name_txt, True)