[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[virt-tools-list] [PATCH virt-manager v1] Display operating system icons in main window

This is just for review at the moment.  The reason is that the patch
doesn't give much value to virt-manager as it stands, because all it
does it to add icons, and that only works if you happen to have
libguestfs 1.11.12 installed (only in Rawhide so it's doubtful many
will have that).

The three patches: create an inspection thread, modify the vmmDomain
object to hold the inspection data, and display OS icons in the main

There is a background inspection thread.  When a domain is added
somewhere, a message is sent to the inspection thread via a FIFO queue
(vmmInspection.vm_added).  The inspection thread picks VM names off
the queue and processes them one at a time (vmmInspection._process).
A hash ensures that inspection is never done twice on any domain,
except if you relaunch virt-manager.  Results of inspection aren't
saved between runs of virt-manager, although this might be a good

When inspection finishes successfully for a domain, the results are
sent back to the corresponding vmmDomain object, and vmmDomain emits a
signal ("inspection-changed").  The signal allows other UI elements to
update themselves.

The main window listens for the inspection-changed signal and draws
the OS icon, if there is one.  Because of all the trademark rules we
have to follow[1] we cannot simply give virt-manager a list of icons
corresponding to each OS.  Instead we have to pull the icons we need
out of the OS[2].  These are pulled out as PNG files (which could be
quite large and high quality) and scaled and converted to pixbufs on
the fly (vmmManager.get_inspection_icon_pixbuf).

BTW this is what it looks like:



[1] https://rwmj.wordpress.com/2011/04/19/inspection-in-virt-manager-3/
[2] http://libguestfs.org/guestfs.3.html#guestfs_inspect_get_icon

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]