[virt-tools-list] [virt-manager PATCH] addhardware: fix a chaotic widget naming

Cole Robinson crobinso at redhat.com
Sun Jun 21 19:17:56 UTC 2015


On 06/15/2015 03:39 AM, Chen Hanxiao wrote:
> char-mode:      should be an entry
> char-bind-host: should be an ComboBox
> 
> We mixed them, and much of the code use the improper naming,
> but at least one got lost.
> 
> How to find:
> Add Hardware->Serial->Tcp net console,
> you could find that short-cut for 'Mode' missing :)
> 
> Signed-off-by: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>

Thanks for describing the problem, I can reproduce. However your patch gave me
errors like:

Traceback (most recent call last):
  File "/home/crobinso/src/virt-manager/virtManager/addhardware.py", line
1275, in _change_char_device_type
    if has_mode and self.widget("char-mode").get_active() == -1:
AttributeError: 'Entry' object has no attribute 'get_active'

The root issue is that the UI labels were swapped and weren't in the same row
as their associated fields. Once I fixed that it seems to do the right thing:

commit fc93e154dc522a997689fbb370eac2d87f80b146
Author: Cole Robinson <crobinso at redhat.com>
Date:   Sun Jun 21 15:14:30 2015 -0400

    addhardware: Fix udp/tcp host vs mode UI

Thanks,
Cole




More information about the virt-tools-list mailing list