mirror of
https://github.com/virt-manager/virt-manager.git
synced 2024-10-27 01:55:20 +03:00
details: When VM is run, always update console page
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
This commit is contained in:
parent
cbba1c4dd3
commit
f815c988aa
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user