From f815c988aa275a72acf4461a7966548cf235590f Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Tue, 27 Jan 2015 13:39:23 -0500 Subject: [PATCH] details: When VM is run, always update console page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If we were focused on the VM details page for a container, then clicked 'Run', the console page wouldn't be switched to view the serial console. Make that work, but continue to not switch focus away from the current non-console page. Based on Cédric's patch here: http://www.redhat.com/archives/virt-tools-list/2015-January/msg00078.html --- virtManager/details.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/virtManager/details.py b/virtManager/details.py index ddcacaecc..fe75d4768 100644 --- a/virtManager/details.py +++ b/virtManager/details.py @@ -1345,9 +1345,14 @@ class vmmDetails(vmmGObjectUI): def activate_default_console_page(self): pages = self.widget("details-pages") - if pages.get_current_page() != DETAILS_PAGE_CONSOLE: - return + + # console.activate_default_console_page() will as a side effect + # switch to DETAILS_PAGE_CONSOLE. However this code path is triggered + # when the user runs a VM while they are focused on the details page, + # and we don't want to switch pages out from under them. + origpage = pages.get_current_page() self.console.activate_default_console_page() + pages.set_current_page(origpage) # activate_* are called from engine.py via CLI options def activate_default_page(self):