Commit Graph

2082 Commits

Author SHA1 Message Date
Daniel P. Berrange
3c3237b951 Convert to use GTK3 and GObject Introspection bindings
Switch over to use GObject introspection bindings for all python
modules related to GObject/GTK3/etc. It is not possible to mix
and match old pyggtk/pygobject manual bindings with new introspection
based bindings so it must be all changed in one go.

Imports like

    import gtk

Change to

    from gi.repository import Gtk

The vmmGObject class is changed to always inherit from GObject.GObject
There is no compelling reason to avoid a GObject dep for the
virt-manager TUI & it horribly messed up the code.

Signal declarations are changed from

  vmmChooseCD.signal_new(vmmChooseCD, "cdrom-chosen", [object, str])

To

     __gsignals__ = {
        "cdrom-chosen": (GObject.SignalFlags.RUN_FIRST, None, [object, str])
    }

which is required by new GObject bindings

Most of the rest of the change is simply dealing with renamed
constants / classes.

Alot of legacy compat code was removed - ie helpers which
check to see if certain GTK2 methods are available are no
longer required since we're mandating GTK3 only.

The event loop is replaced with LibvirtGLib's event loop.

Still todo

 - Rip out all DBus stuff & make vmmEngine class inherit GtkApplication
   which provides unique support & DBus method handling
 - Switch to use LibvirtGConfig & LibvirtGObject for libvirt interaction
 - Possibly switch to Python 3 too ?
 - Figure out why GNOME keyring is missing Introspection support

My suggestion is that the standalone GIT repo for virt-install
only live on as a support branch for legacy platforms.

A stable-0.9 branch of virt-manager can be kept for legacy PyGtk2
based virt-manager releases.

The virt-manager master branch should exclusively use GObject
inspection and ideally Python3 and contain both the virt-manager
and virt-install codebases in one since they are intimately
related to each other & using separate GIT repos has needlessly
complicated life for everyone.

crobinso:
    Some locking fixes
    Misc cleanups and dropping now-useless code
    Fix dbus usage
    Fix graph cell renderer regression
    Fix a couple tooltip issues
2013-04-03 18:13:24 -04:00
Cole Robinson
12dcebcc0a Disable a bunch of pep8 tests I won't fix before gtk3 port 2013-02-06 15:41:43 -05:00
Cole Robinson
f4aa83e10f Fix pylint detection, and clean up the fallout 2012-01-31 19:07:32 -05:00
Cole Robinson
1ff601138f Specify all logging string format args as function parameters
As warned about by pylint. Also clean up some pylint false positives
and a few scattered legit warnings.
2012-01-16 22:04:40 -05:00
Cole Robinson
a1d2b1a0f0 pylint: s/addmsg/skipmsg/g 2012-01-16 21:13:41 -05:00
Cole Robinson
25f5bc90a7 Actually run pep8 against TUI, fix the fallout 2011-07-14 12:28:05 -04:00
Cole Robinson
303c8c91df tui: Enable pylint check for TUI, fix a bunch of reports
There are still a lot of errors reported, so more patches are required to
make pylint silent.
2011-05-31 15:55:52 -04:00
Cole Robinson
33b67a1c16 pylint: Add a test exception 2011-03-23 10:41:07 -04:00
Cole Robinson
677f73fca7 Run pep8 with check-pylint, fix the fallout 2010-12-10 11:47:07 -05:00
Cole Robinson
0fd57daca1 pylint: Check for unused variables, fix fallout 2010-12-09 11:22:35 -05:00
Cole Robinson
fe14b5e200 Use URI hacking from virtinst to facilitate testing 2010-12-07 14:26:51 -05:00
Cole Robinson
1c3e7a1ea3 Remove some unneeded imports and old pylint workarounds 2010-11-30 15:01:02 -05:00
Cole Robinson
779dcdd824 Don't use old style __gobject_init__() 2010-11-30 14:40:49 -05:00
Cole Robinson
5a8523fc03 Silence a pylint false positive 2010-11-29 18:11:27 -05:00
Cole Robinson
81eb69853f More pylint fixes 2010-11-29 17:28:52 -05:00
Cole Robinson
716bec3e56 Enable some more basic pylint checks and clean the code 2010-11-29 14:06:43 -05:00
Cole Robinson
026934ed3e pylint: Fix script for latest pylint version 2010-11-11 16:29:30 -05:00
Cole Robinson
297c84bbc3 Clean up pylint 2010-05-05 16:16:15 -04:00
Cole Robinson
1e9dcc8615 Drop no longer needed pylint check. 2010-04-21 13:09:15 -04:00
Cole Robinson
5aaae5db86 Fix 'tests' install to not end up in RPM 2010-02-08 22:27:15 -05:00
Cole Robinson
b53a3a5e6b Fix an error detecting pylint features 2010-01-27 13:47:53 -05:00
Cole Robinson
1842a204dd Fix up some pylint. 2009-10-28 20:35:13 -04:00
Cole Robinson
c24ba2fd5d Make sure pylint supports a check before we disable it. 2009-10-28 20:20:14 -04:00
Cole Robinson
994d516ee8 Block a new pylint check. 2009-09-17 12:31:17 -04:00
Cole Robinson
31509207c2 Actually try to fix pylint spamming. 2009-09-16 16:00:47 -04:00
Cole Robinson
2802745e3e Try to avoid 'maximum recursion depth' errors from pylint script. 2009-09-14 10:14:41 -04:00
Cole Robinson
1e603974bd Clean up some pylint warnings on rawhide. 2009-05-11 10:13:32 -04:00
Cole Robinson
dd50d5e141 Check 'defined outside init' w/ pylint script, fix errors. 2009-04-03 14:15:23 -04:00
Cole Robinson
67adc74816 Packages the tests directory with 'make dist' 2009-04-03 14:15:13 -04:00
Cole Robinson
b1f69cffd8 Add libvirt storage aware file browser.
Hook it up to the New VM and Add Hardware wizards, all storage browsing.
2009-03-09 16:19:39 -04:00
Cole Robinson
bdd09af3f7 Mark pylint script as executable. 2009-01-12 14:54:32 -05:00
Cole Robinson
83884c0ef6 Add 'make check-pylint' command. 2008-12-17 15:27:38 -05:00