From 6563f3078f8ddf8860e51b516c28371b7b31a881 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Sat, 10 Oct 2015 20:09:47 +0200 Subject: [PATCH] Fix "block attached" icon This was broken since 8a91c90 "Fix block attach/detach", which changed rows_with_blk list to contain VM qid, not name. One place was left not updated. Additionally document VmRowInTable.update parameters, as some of them may be not obvious (blk_visible=None). Fixes QubesOS/qubes-issues#1291 --- qubesmanager/main.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/qubesmanager/main.py b/qubesmanager/main.py index 13d0bab..12845de 100755 --- a/qubesmanager/main.py +++ b/qubesmanager/main.py @@ -218,6 +218,17 @@ class VmRowInTable(object): def update(self, blk_visible=None, cpu_load=None, update_size_on_disk=False, rec_visible=None): + """ + Update info in a single VM row + :param blk_visible: if not None, show/hide block icon, otherwise + don't change its visibility + :param cpu_load: current CPU load (if applicable), in percents + :param update_size_on_disk: should disk utilization be updated? the + widget will extract the data from VM object + :param rec_visible: if not None, show/hide mic icon, otherwise don't + change its visibility + :return: None + """ self.info_widget.update_vm_state(self.vm, blk_visible, rec_visible) if cpu_load is not None: self.cpu_usage_widget.update_load(self.vm, cpu_load) @@ -779,7 +790,7 @@ class VmManagerWindow(Ui_VmManagerWindow, QMainWindow): else: for vm_row in self.vms_in_table.values(): if rows_with_blk is not None: - if vm_row.vm.name in rows_with_blk: + if vm_row.vm.qid in rows_with_blk: blk_visible = True else: blk_visible = False