[virt-tools-list] [PATCH 1/3] vmmConsolePages: toggle visibilities on page change

mzatko at redhat.com mzatko at redhat.com
Fri Feb 28 18:35:48 UTC 2014


From: Maros Zatko <mzatko at redhat.com>

---
 virtManager/console.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/virtManager/console.py b/virtManager/console.py
index 122bf27..dec2657 100644
--- a/virtManager/console.py
+++ b/virtManager/console.py
@@ -1319,8 +1319,13 @@ class vmmConsolePages(vmmGObjectUI):
             self.widget("details-menu-usb-redirection").set_sensitive(True)
             return
 
-    def page_changed(self, ignore1=None, ignore2=None, ignore3=None):
+    def page_changed(self, ignore1=None, ignore2=None, newpage=None):
         pagenum = self.widget("console-pages").get_current_page()
+
+        for i in range(self.widget("console-pages").get_n_pages()):
+          w = self.widget("console-pages").get_nth_page(i)
+          w.set_visible(i == newpage)
+
         if pagenum < CONSOLE_PAGE_OFFSET:
             self.last_gfx_page = pagenum
         self.set_allow_fullscreen()
-- 
1.8.5.3




More information about the virt-tools-list mailing list