Commit Graph

109 Commits

Author SHA1 Message Date
Cole Robinson
62feeb02a8 Switch to python3 style 'except X as Y' notation
Which also works with python2.7
2017-05-05 14:52:11 -04:00
Cole Robinson
0610cd6acb console: Ensure bool value used for set_sensitive call
Seen in a bug log file:

[Tue, 28 Mar 2017 12:05:21 virt-manager 2465] DEBUG (cli:251) Uncaught exception:
Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/details.py", line 1303, in refresh_vm_state
    self.console.details_update_widget_states()
  File "/usr/share/virt-manager/virtManager/console.py", line 1025, in details_update_widget_states
    return self._update_vm_widget_states()
  File "/usr/share/virt-manager/virtManager/console.py", line 597, in _update_vm_widget_states
    self._refresh_widget_states()
  File "/usr/share/virt-manager/virtManager/console.py", line 663, in _refresh_widget_states
    self.widget("details-menu-vm-screenshot").set_sensitive(is_viewer)
TypeError: Argument 1 does not allow None as a value
2017-03-29 12:07:50 -04:00
Cole Robinson
88bfdf4926 console: Fix resize to VM on wayland (bug 1397598)
Yet another issue with not using window.get_size() and instead using
its size allocation directly, which differ on wayland due to client
side decorations.

https://bugzilla.redhat.com/show_bug.cgi?id=1397598
2016-12-13 13:34:09 -05:00
Pavel Hrdina
da81d4c32c console: don't use _close_viewer directly
Function _close_viewer should be always called together with setting
unavailable page.  Call only _activate_unavailable_page which does both things.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-08-18 10:36:04 +02:00
Pavel Hrdina
354877b90e console: set unavailable page while closing details window
We need to set unavailable page in order to trigger _init_viewer() function.

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

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-08-18 10:36:04 +02:00
Pavel Hrdina
09cc6f3832 console: add support to forget password
If password for console is saved currently there is no way how to tell
virt-manager to forget that password.  This patch improves the authentication
page in order to provide a way how to forget password simply by unchecking the
"Save this password in your keyring".

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-06-07 20:03:27 +02:00
Pavel Hrdina
7e1bd1d762 console: fix checkbox to save password if it was loaded from keyring
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1302175

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-06-07 20:02:45 +02:00
Pavel Hrdina
b327191a20 maint: fix pylint warnings wrong-import-order
standard import "import logging" comes before "from gi.repository import GLib"

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-06-07 17:37:06 +02:00
Cole Robinson
eea9b27696 console: Fix and simplify 'Resize to VM' action
We need to resize the window and not try to play crazy games with
the scroll window size. Wish I realized this years ago...
2016-05-20 11:44:18 -04:00
Cole Robinson
8c2adb83ae console: Error for more non-working graphical configs
- If connecting remotely but graphics has no listen address,
    like the spice GL case.
- Trying to connect to a TLS using VM over an ssh tunnel, it doesn't
    seem to work: https://bugzilla.redhat.com/show_bug.cgi?id=1320331
2016-05-18 16:57:38 -04:00
Cole Robinson
0f88ebbc0b console: Enforce text wrapping on 'unavailable' page 2016-05-18 16:32:07 -04:00
Cole Robinson
cb4909dffb console: Fix fullscreen keycombo menu placement
Some pygobject update must have fixed the callback signature,
so handle both versions
2016-05-17 17:49:55 -04:00
Cole Robinson
dc05600324 console: Convert from autodrawer to native Gtk widgets
Gtk 3.10 has a GtkOverlay and GtkRevealer widget which we can
use to more sustainably implement the autodrawer functionality.
2016-05-17 17:49:55 -04:00
Cole Robinson
3221b56ac3 viewers: Show spice error message in the UI on disconnect 2016-05-16 16:28:55 -04:00
Cole Robinson
adef60211f viewers: Pass SSH error output via gobject signal
Rather than have the console fetch it. Just streamlines things a bit
2016-05-16 16:16:13 -04:00
Cole Robinson
bc03ca5caa console: Tweak console window message when VM is inactive 2016-05-16 16:06:04 -04:00
Cole Robinson
7cc6141618 viewer: move vm from ConnectionInfo to Viewer
I don't really like the VM in Viewer either, since it will encourage
layering violations, but it's a better fit than in ConnectionInfo
2016-05-07 18:09:24 -04:00
Cole Robinson
0a1d22f395 console: Remove console_active check
This is largely left over from the old days when a xen VM could
start up but still take a bit of time for the allocated VNC port
to be reflected in the XML.

This may still be an issue with old old xen, but I suspect it's
not relevant for anything modern, and it causes some issues with
listen=none behavior that spice supports. Just drop it and see if
anyone complains
2016-05-02 17:19:27 -04:00
Guido Günther
a1383faff3 Make SpiceClientGtk optional
Not all architectures supported by Debian have it. This will allow to
make VNC work nevertheless.
2016-04-07 16:12:06 -04:00
Marc-André Lureau
5c451b6401 virt-manager: connect with openGraphicsFD
This allows to connect to VM without any display listening socket, the
fd passing is done through libvirt connection.

Furthermore, since it uses unix socket, spice can use virgl locally
with texture sharing. This effectively enables spice-gtk to display
local virgl rendering.

Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
2016-03-09 20:25:37 -05:00
Pavel Hrdina
c39592ae7b localization: mark several strings as translatable
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-02-06 16:25:08 +01:00
Cole Robinson
739e31e9b0 console: Fix traceback when switching to fullscreen
Traceback (most recent call last):
  File "/home/crobinso/src/virt-manager/virtManager/details.py", line 1257, in switch_page
    self.console.details_refresh_can_fullscreen()
  File "/home/crobinso/src/virt-manager/virtManager/console.py", line 965, in details_refresh_can_fullscreen
    return self._refresh_can_fullscreen()
  File "/home/crobinso/src/virt-manager/virtManager/console.py", line 464, in _refresh_can_fullscreen
    self.widget("control-fullscreen").set_sensitive(allow_fullscreen)
TypeError: Argument 1 does not allow None as a value
2015-11-24 18:23:36 -05:00
Cole Robinson
ec166e2cc4 console: Centralize more widget state updating 2015-09-18 13:22:48 -04:00
Cole Robinson
0b881591ec console: Add a separate notebook for serial pages
Rather than the 'offset' page hack we previously did that is hard to
keep track of. This allows for a handful of code simplifications
2015-09-18 12:36:06 -04:00
Cole Robinson
3730c31b40 console: Fix some issues with reconnecting to the viewer
Regressed with my recent console rework bits
2015-09-12 12:07:56 -04:00
Cole Robinson
ed48b5d0a8 details: Centralize disabling widgets when console page changes
And fix a few bugs in that area, like disabling sendkey when we are
on the serial console page.
2015-09-05 18:33:31 -04:00
Cole Robinson
364e352e5d console: Show connection name in window title
To differentiate between similarly named VMs on multiple connections.

Suggested-by: Pavel Fedin <p.fedin@samsung.com>
2015-08-31 18:38:05 -04:00
Pavel Hrdina
c7049eb120 pep8 W503: line break before binary operator
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2015-07-14 13:01:20 -04:00
Cole Robinson
1a8c6ba645 console: Use VM title as window title 2015-04-13 17:30:12 -04:00
Cole Robinson
6ecf01a3bd console: Catch and handle password auth errors (bz 1151801) 2015-04-12 14:10:45 -04:00
Cole Robinson
4e47cc9061 console: Fix password entry grab_focus 2015-04-12 12:43:29 -04:00
Cole Robinson
acebd1248c viewers: Add explicit API for removing display from parent
Previously we were hacking it in
2015-04-12 10:33:41 -04:00
Cole Robinson
c3fc4ee5a2 console: Drop timeout retry logic
This was needed in the days of old xen + libvirt, but I don't think
it's required nowadays, and if it is it's busted with our XML caching
I think.
2015-04-12 10:24:35 -04:00
Cole Robinson
792774450f console: Properly cleanup viewer when closing
Otherwise signals aren't properly removed, can cause some backtraces on
shutdown.
2015-04-12 09:53:23 -04:00
Cole Robinson
aec851f73a viewers: Always clean up tunnel FDs when closing viewer
We were basically leaking a lot of FDs. They were still being tracked
but they were stranded and never dealt with.
2015-04-11 22:44:03 -04:00
Cole Robinson
285e345f17 viewer: Simplify tunnel handling
- Cache ginfo, since it is tied to a single viewer instance
- Always create the sshtunnels object
- Track lock state so we can make it idempotent
2015-04-11 21:39:24 -04:00
Cole Robinson
fc171fc31d connection: Bunch of minor tweaks handling TCP URIs 2015-04-11 12:08:57 -04:00
Cole Robinson
a3f8d73a9c libvirtobject: Unify internal status APIs and signals
Drop config-changes vs. status-changed and just use one signal, since they
are largely the same code paths for all users.
2015-04-10 15:00:34 -04:00
Cole Robinson
03dbbac806 console: Make API used by vmmDetails explicit
And hide everything else. Similar to what we did with the Viewers, this
should help clarify what the boundaries are here.
2015-04-03 21:34:03 -04:00
Cole Robinson
f589f01665 console: Move viewer classes to viewers.py 2015-04-03 20:54:38 -04:00
Cole Robinson
3b671a9ac3 console: Large amount of internal API tidying
It's very difficult to tell what bits of Viewer that vmmConsolePages
accesses, and what bits of vmmConsolePages that vmmDetails will access.

Clean up the Viewer side with consistent function names, lots of comments,
and privatizing everything that shouldn't be shared.

Yeah this is a big ugly commit...
2015-04-03 20:43:48 -04:00
Cole Robinson
87c5094745 details: Don't access console.viewer directly
Add accessors for everything details.py needs. Makes separation clearer
2015-03-26 13:16:50 -04:00
Cole Robinson
26abb5a2b5 console: Drop _has_property
All these checks are redundant with modern deps
2015-03-26 13:10:38 -04:00
Marc Deslauriers
8574eedd2e virt-manager: Don't clear all page visibilities during initialization
Since commit dfa23765, page_changed() sets page visibilities based on the
value of the newpage parameter. Calling the function without it being set
makes all pages invisible at once during initialization, resulting in a
weird scenario which prevents the window from getting proper focus events
when another window partially overlaps it, resulting in stuck grabs.
Message-Id: <55114787.6070401@canonical.com>
2015-03-24 12:36:16 -04:00
Cole Robinson
7a1b7b69e3 Drop non-ascii text from files
Seems to be tripping up coverage output on f22
2015-03-23 15:56:55 -04:00
Cole Robinson
a2109f922c console: Drop custom usb format string
It's just recreating the default, and causes a headache with translations
2015-02-11 13:14:19 -05:00
Cole Robinson
c090d18beb console: Show multiple graphics devices in menu list
But actually switching to one isn't supported, so show a tooltip to
that effect.
2014-12-03 12:21:57 -05:00
Cole Robinson
ef99daa3d1 console: Rework serial menu building
Mostly code reorg with some minor bug fixes thrown in.
2014-12-03 12:14:32 -05:00
Cole Robinson
0b391fe9ed virt-manager: Enforce gobject introspection versions
This is needed with freebsd and opensuse at least. See:

https://bugzilla.suse.com/__show_bug.cgi?id=901869
http://www.redhat.com/archives/libvir-list/2014-December/msg00184.html
2014-12-02 14:01:28 -05:00
Giuseppe Scrivano
5c68542151 console: switch to CONSOLE_PAGE_UNAVAILABLE while waiting for login
It fixes a race condition if the ERROR_AUTH error if received while
still on the CONSOLE_PAGE_AUTHENTICATE and skipping the page_changed
event.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1165990

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-11-20 15:51:16 +01:00