[virt-tools-list] [virt-manager PATCH v2] ui: improve pause/resume tooltip

Pavel Hrdina phrdina at redhat.com
Thu Nov 12 12:14:39 UTC 2015


Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1238618

Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
---
 virtManager/details.py | 6 ++++++
 virtManager/manager.py | 6 ++++++
 2 files changed, 12 insertions(+)

diff --git a/virtManager/details.py b/virtManager/details.py
index 71ba39d..617235d 100644
--- a/virtManager/details.py
+++ b/virtManager/details.py
@@ -1301,6 +1301,12 @@ class vmmDetails(vmmGObjectUI):
         self.widget("control-shutdown").get_menu().update_widget_states(vm)
         self.widget("control-pause").set_sensitive(stop)
 
+        if paused:
+            pauseTooltip = _("Resume the virtual machine")
+        else:
+            pauseTooltip = _("Pause the virtual machine")
+        self.widget("control-pause").set_tooltip_text(pauseTooltip)
+
         self.widget("details-vm-menu").get_submenu().update_widget_states(vm)
         self.set_pause_state(paused)
 
diff --git a/virtManager/manager.py b/virtManager/manager.py
index 79cf0c5..edc29c7 100644
--- a/virtManager/manager.py
+++ b/virtManager/manager.py
@@ -870,6 +870,12 @@ class vmmManager(vmmGObjectUI):
         self.set_pause_state(is_paused)
         self.widget("vm-pause").set_sensitive(show_pause)
 
+        if is_paused:
+            pauseTooltip = _("Resume the virtual machine")
+        else:
+            pauseTooltip = _("Pause the virtual machine")
+        self.widget("vm-pause").set_tooltip_text(pauseTooltip)
+
         self.widget("menu_edit_details").set_sensitive(show_details)
         self.widget("menu_host_details").set_sensitive(host_details)
 
-- 
2.6.3




More information about the virt-tools-list mailing list