Some comments inline in the patch.
> Matt
>
> From Mon Sep 17 00:00:00 2001
> From: Matt McCutchen <
ma...@mattmccutchen.net>
> Date: Sun, 8 Feb 2015 20:21:43 -0500
>
> Show an icon for VMs whose TemplateVM is running.
>
>
https://groups.google.com/d/topic/qubes-users/woHD9RaHvF8/discussion
> ---
> icons/to-be-outdated.png | Bin 0 -> 2468 bytes
> qubesmanager/table_widgets.py | 31 ++++++++++++++++++++++---------
> resources.qrc | 1 +
> 3 files changed, 23 insertions(+), 9 deletions(-)
>
> diff --git a/icons/to-be-outdated.png b/icons/to-be-outdated.png
> new file mode 100644
> index 0000000000000000000000000000000000000000..42634dd35d378f38ae76018b4213cb27c130b912
> GIT binary patch
(...)
> diff --git a/qubesmanager/table_widgets.py b/qubesmanager/table_widgets.py
> index 258dd3a..5fe317b 100644
> --- a/qubesmanager/table_widgets.py
> +++ b/qubesmanager/table_widgets.py
> @@ -459,7 +459,7 @@ class VmUpdateInfoWidget(QWidget):
> self.set_value(value)
>
> def set_value(self, value):
> - if value == "outdated":
> + if value in ("outdated", "to-be-outdated"):
> self.value = 30
> elif value == "update":
> self.value = 20
> @@ -484,7 +484,7 @@ class VmUpdateInfoWidget(QWidget):
> layout.addWidget(self.icon, alignment=Qt.AlignCenter)
> self.setLayout(layout)
>
> - self.previous_outdated = False
> + self.previous_outdated_state = ""
Why "" here, while the other place uses None?
> self.previous_update_recommended = None
> self.value = None
> self.tableItem = VmUpdateInfoWidget.VmUpdateInfoItem(self.value, vm)
> @@ -493,13 +493,22 @@ class VmUpdateInfoWidget(QWidget):
> if vm.type == "HVM":
> return
>
> - outdated = vm.is_outdated()
> - if outdated and not self.previous_outdated:
> - self.update_status_widget("outdated")
> - elif not outdated and self.previous_outdated:
> - self.update_status_widget(None)
> + if vm.is_outdated():
> + outdated_state = "outdated"
> + # During TemplateVM shutdown, there's an interval of a few seconds
> + # during which vm.template.is_running() returns false but
> + # vm.is_outdated() does not yet return true, so the icon disappears.
> + # This looks goofy, but we've decided not to fix it at this time
> + # (2015-02-09).
> + elif vm.template and vm.template.is_running():
> + outdated_state = "to-be-outdated"
> + else:
> + outdated_state = None
Here is that "other place".
> +
> + if outdated_state != self.previous_outdated_state:
> + self.update_status_widget(outdated_state)
>
> - self.previous_outdated = outdated
> + self.previous_outdated_state = outdated_state
>
> if not vm.is_updateable():
> return
> @@ -551,7 +560,11 @@ class VmUpdateInfoWidget(QWidget):
> elif state == "outdated":
> label_text = "<font color=\"red\">VM outdated</font>"
> icon_path = ":/outdated.png"
> - tooltip_text = "The VM must be restarted for its filesystem to reflect the template's recent changes."
> + tooltip_text = "The VM must be restarted for its filesystem to reflect the template's recent committed changes."
> + elif state == "to-be-outdated":
> + label_text = "<font color=\"#800000\">TemplateVM running</font>"
> + icon_path = ":/to-be-outdated.png"
> + tooltip_text = "The TemplateVM must be stopped before changes from its current session can be picked up by this VM."
> elif state == None:
> label_text = ""
> icon_path = None
> diff --git a/resources.qrc b/resources.qrc
> index 664f506..c9f9172 100644
> --- a/resources.qrc
> +++ b/resources.qrc
> @@ -8,6 +8,7 @@
> <file alias="global-settings.png">icons/global-settings.png</file>
> <file alias="off.png">icons/on-icon/off.png</file>
> <file alias="outdated.png">icons/outdated.png</file>
> + <file alias="to-be-outdated.png">icons/to-be-outdated.png</file>
> <file alias="update-recommended.png">icons/update-recommended.png</file>
> <file alias="show-all-running.png">icons/show-all-running.png</file>
> <file alias="mount.png">icons/mount.png</file>