[virt-tools-list] [virt-manager PATCH] Fix toolbar toggling in details window

Martin Kletzander mkletzan at redhat.com
Tue Jan 7 09:20:44 UTC 2014


When refreshing the details window after it has been already
initialized, we don't change the value of the View->Toolbar item in
the menus on which then the toggle_toolbar() depends and due to the
menu keeping the old value, the toolbar might (not) be shown even if
it should not (or should) be.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1049145
Signed-off-by: Martin Kletzander <mkletzan at redhat.com>
---

Notes:
    I tracked the issue down here, but there might be more problems where
    we depend on such "saved" values.  Don't hesistate to let me know this
    isn't an appropriate fix.

 virtManager/details.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/virtManager/details.py b/virtManager/details.py
index 258bdb0..2940b78 100644
--- a/virtManager/details.py
+++ b/virtManager/details.py
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2008, 2013 Red Hat, Inc.
+# Copyright (C) 2006-2008, 2013, 2014 Red Hat, Inc.
 # Copyright (C) 2006 Daniel P. Berrange <berrange at redhat.com>
 #
 # This program is free software; you can redistribute it and/or modify
@@ -1297,6 +1297,8 @@ class vmmDetails(vmmGObjectUI):
         vm = self.vm
         status = self.vm.status()

+        self.widget("details-menu-view-toolbar").set_active(
+            self.config.get_details_show_toolbar())
         self.toggle_toolbar(self.widget("details-menu-view-toolbar"))

         active = vm.is_active()
-- 
1.8.5.2




More information about the virt-tools-list mailing list