Commit Graph

43 Commits

Author SHA1 Message Date
Cole Robinson
4b98a471b9 manager: Handle multiple vm-added signals
Our conn.tick idle dispatcher can be racey, handle it in manager.py
2014-02-13 11:17:14 -05:00
Cole Robinson
d220cc5d52 preferences: Allow disabling VM CPU poll
With this, the only libvirt API call we hit on each tick is the
connection nodeinfo.
2014-02-11 15:45:05 -05:00
Cole Robinson
7057afba56 manager: Add File->New Virtual Machine (bz 871682) 2014-02-01 13:36:02 -05:00
Cole Robinson
c5581c01d2 Move sharedui.py to vmmenu.py
Since that's all it contains now
2014-01-29 09:22:28 -05:00
Cole Robinson
889ec18031 uiutil: Use list selection helpers everywhere 2014-01-27 10:46:14 -05:00
Cole Robinson
708a2737cf Split uihelpers into sharedui and uiutil
Reserve uiutil for the little gtk helper functions, rest goes into shared
UI (which all should probably be factored into their own files but thats
a task for another day)
2014-01-26 18:15:50 -05:00
Cole Robinson
58d5e0b799 uihelpers: Move a few more functions closer to their callers 2014-01-26 17:51:15 -05:00
Cole Robinson
55d6b7f377 prefs: Allow disabling all memorystats polling
Similar to how we allow disabling disk/net polling, not sure yet what
effect it might have on remote connections, so best to add this option
just to be safe.

Unlike disk/net stats, we enable this checking by default.
2014-01-12 17:39:21 -05:00
Thorsten Behrens
77b1143965 Add memory stats widget also to manager tree view.
(crobinso: Fix an initialization issue)
2014-01-06 12:08:55 -05:00
Giuseppe Scrivano
0df75c7603 headers: update "Red Hat, Inc." copyright for the year 2013
Ensure that any file touched by a @redhat.com author in 2013 has an
updated copyright header.

The files were updated using the build-aux/update-copyright gnulib
script and manually added where the copyright line wasn't present.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2013-10-28 17:22:26 +01:00
Cole Robinson
e7e97a8088 domain: If title present, print only it
Forcing the name to be in the picture reduces the usefulness IMO
2013-10-04 11:50:19 -04:00
Giuseppe Scrivano
b9e25100f5 virtManager: show the VM title in the manager window
If a title is defined for a VM, append it to the name of the VM.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2013-09-25 19:16:23 +02:00
Cole Robinson
d338bce329 Rename ui files to match source file names 2013-09-22 16:10:16 -04:00
Cole Robinson
e91cc84770 uihelpers: Add VMActionMenu, share between manager and systray 2013-09-22 15:45:53 -04:00
Cole Robinson
268b462126 uihelpers: Add VMShutdownMenu class
And use it in all the places where we are duplicating a similar menu
2013-09-22 15:45:49 -04:00
Giuseppe Scrivano
3861069f99 virt-manager: AUTOSIZE the VM name column in the manager window
Previously, if a very long "title" was shortened, the column was
maintaining its original size, leaving the second column far away.
To avoid it, enforce the first column to be automatically resized
whenever the name of the VM is changed.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2013-09-20 17:11:22 -04:00
Cole Robinson
b86c5b21ec manager: Use consistent row spacing even if we disable all graphs 2013-09-02 10:43:53 -04:00
Cole Robinson
f141c77c45 manager: Separate stats and state update callbacks
There's no need to be resetting row keys like VM name, state, on every
'resources-sampled' signals, since we have had finer grained status-changed
and config-changed signals for a while. This seems to reduce the memory
leak on F19 as well.
2013-09-02 09:32:50 -04:00
Cole Robinson
db7db9ab47 manager: Disable graph data func if graph isn't visible
Seems like pygobject is a bit leaky with tree row accesses, and
the cell cb hammers on that quite a bit, even if the graph isn't showing.
2013-09-02 08:42:25 -04:00
Cole Robinson
9d87b0d342 Replace set_property("visible") with modern set_visible 2013-09-01 20:18:14 -04:00
Cole Robinson
1bd6026515 manager: Merge some row creation, drop unneeded row keys 2013-09-01 18:36:58 -04:00
Cole Robinson
e8531b1f40 Initial snapshot support
This adds initial UI for managing snapshots: list, run/revert, delete,
add, and redefining (for changing <description>) supported, but currently
only for internal snapshots. The UI is mostly in its final form except for
some bells and whistles.

The real remaining question is what do we want to advertise and support.
Internal (qcow2) snapshots are by far the simplest to manage, very
mature, and already have the semantics we want.

However most recent libvirt and qemu work has been to facilitate
external snapshots, which are more extensible and can be performed
live, and with qemu-ga coordination for extra safety. However
they make things much harder for virt-manager at the moment.

Until we have a plan, this work should be considered experimental
and not be relied upon.
2013-08-21 18:41:42 -04:00
Giuseppe Scrivano
c1fa43ebb9 virt-manager: ignore VIR_ERR_NO_DOMAIN when a domain was just deleted
Some callbacks could try to access a domain that was just deleted and
not accessible anymore.  Detect these cases and don't propagate the
exception.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2013-08-16 11:51:15 -04:00
Cole Robinson
7c55cfeb39 virtManager: Drop util, combine it with virtinst.util and uihelpers 2013-08-11 12:39:28 -04:00
Leonardo Garcia
40cff67836 virt-manager: Properly handle errors when --show-* options are used.
crobinso: Fix some pylint
2013-07-15 16:03:15 -04:00
Richard W.M. Jones
9d5c1cdb1c inspection: Check can_set_row_none before setting icon to None.
Previously one could set the icon field of a tree model to None, but
with Gtk3 and older versions of pygobject3 this would fail.

Use can_set_row_none to test for this condition and work around it.

The previous traceback was:

Traceback (most recent call last):
  File "/home/rjones/d/virt-manager/virtManager/manager.py", line 981, in vm_inspection_changed
    self.get_inspection_icon_pixbuf(vm, 16, 16)
  File "/usr/lib64/python2.7/site-packages/gi/overrides/Gtk.py", line 1152, in __setitem__
    self.model.set_value(self.iter, key, value)
  File "/usr/lib64/python2.7/site-packages/gi/overrides/Gtk.py", line 1298, in set_value
    Gtk.TreeStore.set_value(self, treeiter, column, value)
  File "/usr/lib64/python2.7/site-packages/gi/types.py", line 47, in function
    return info.invoke(*args, **kwargs)
TypeError: Argument 3 does not allow None as a value
2013-06-28 13:46:49 -04:00
Leonardo Garcia
660178abe1 Permit to delete a running VM.
The VM will be forced off before being deleted.

(crobinso: fix a minor pylint violation)
2013-06-18 08:49:18 -04:00
Leonardo Garcia
18bf5f508d Add delete VM option in console viewer.
(crobinso: Fix a minor pep8 warning)
2013-06-17 20:07:37 -04:00
Cole Robinson
cbe8665948 libguestfs: Don't try to create icon if none found 2013-06-13 16:10:44 -04:00
Cole Robinson
91a97d439c manager: Fix loading libguestfs OS icons (bz 905238) 2013-06-13 15:54:12 -04:00
Cole Robinson
c3d54cbd20 manager: Only log 'Closing manager' if it's not already closed
Same with 'Showing manager'
2013-06-13 14:12:19 -04:00
Cole Robinson
a63a83684b manager: Fix a pep8 warning 2013-04-23 14:24:52 -04:00
Cole Robinson
c2aa6db6be manager: Fix weirdly changing row colors
Every launch was giving me different connection row colors, must be
some gtk/gobject bug.
2013-04-23 13:04:33 -04:00
Cole Robinson
4dbb2ee36d manager: Make creating list model more explicit 2013-04-23 12:42:41 -04:00
Cole Robinson
3214cec085 manager: Remove duplicate function 2013-04-20 14:23:21 -04:00
Cole Robinson
76936272c7 manager: Fix connection row spacing when VMs are active
I guess the text ordering/expanding piece was causing some weirdness.
2013-04-20 14:14:15 -04:00
Cole Robinson
232c8608c2 manager: Add _build_conn_row function
More consistent with VM function names
2013-04-20 14:14:15 -04:00
Cole Robinson
f1a0b99a38 manager: Make connection rows a bit taller
Closer to what it was like with the gtk2 version
2013-04-20 14:14:15 -04:00
Cole Robinson
77441ea4d4 manager: Tweak VM row indentation 2013-04-20 14:14:15 -04:00
Cole Robinson
bd7c02ce63 manager: Remove unneeded style theming
Even fixing it doesn't really do anything useful.
2013-04-20 14:14:15 -04:00
Cole Robinson
7e23244096 Port from gconf to gsettings
This unfortunately has a decent amount of fallout: add a wrapper class
in config.py that reduces much of the churn.

Another big piece is that gsettings can't accept arbitrary paths like
gconf would, everything needs to be described in the schema.

Also do a bunch more RPM spec modernizing
2013-04-18 12:43:16 -04:00
Cole Robinson
9515a8575d Disable pylint warnings about gi.repository
Since pylint still can't handle the dynamic nature of gobject
introspection.
2013-04-12 08:27:45 -04:00
Cole Robinson
9d05583c26 Remove autotools, replace with distutils-extra
Despite being a known quantity, autotools is so overkill for our needs,
so let's drop it and replace it with a much simpler and easy to customize
system.
2013-04-03 18:20:51 -04:00