[virt-tools-list] [PATCH virt-manager] Convert to use GTK3 and GObject Introspection bindings

Daniel P. Berrange berrange at redhat.com
Mon May 14 13:24:56 UTC 2012


From: "Daniel P. Berrange" <berrange at redhat.com>

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.
---
 src/virt-manager.py.in                        |   47 ++--
 src/virtManager/about.py                      |   18 +-
 src/virtManager/addhardware.py                |  109 ++++----
 src/virtManager/asyncjob.py                   |   19 +-
 src/virtManager/autodrawer.py                 |  214 ++++++++--------
 src/virtManager/baseclass.py                  |  109 +++-----
 src/virtManager/choosecd.py                   |   14 +-
 src/virtManager/clone.py                      |   63 ++---
 src/virtManager/config.py                     |  181 +++++++-------
 src/virtManager/connect.py                    |   44 ++--
 src/virtManager/connectauth.py                |   27 +-
 src/virtManager/connection.py                 |   54 ++--
 src/virtManager/console.py                    |  227 +++++++++--------
 src/virtManager/create.py                     |  128 +++++-----
 src/virtManager/createinterface.py            |   90 +++----
 src/virtManager/createnet.py                  |   59 ++---
 src/virtManager/createpool.py                 |   67 +++--
 src/virtManager/createvol.py                  |   30 ++-
 src/virtManager/delete.py                     |   37 ++-
 src/virtManager/details.py                    |  328 ++++++++++++-------------
 src/virtManager/domain.py                     |   17 +-
 src/virtManager/engine.py                     |   31 +--
 src/virtManager/error.py                      |   93 ++++---
 src/virtManager/graphwidgets.py               |  202 +++++++--------
 src/virtManager/guidiff.py                    |   18 +-
 src/virtManager/halhelper.py                  |   15 +-
 src/virtManager/host.py                       |  127 +++++-----
 src/virtManager/inspection.py                 |    7 +-
 src/virtManager/interface.py                  |    2 -
 src/virtManager/keyring.py                    |    8 +-
 src/virtManager/libvirtglib.py                |  250 -------------------
 src/virtManager/libvirtobject.py              |   11 +-
 src/virtManager/manager.py                    |  162 ++++++------
 src/virtManager/mediadev.py                   |   12 +-
 src/virtManager/migrate.py                    |   37 ++-
 src/virtManager/netdev.py                     |    2 -
 src/virtManager/network.py                    |    5 +-
 src/virtManager/nodedev.py                    |    2 -
 src/virtManager/preferences.py                |   34 +--
 src/virtManager/secret.py                     |    1 -
 src/virtManager/serialcon.py                  |   53 ++--
 src/virtManager/storagebrowse.py              |   42 ++--
 src/virtManager/storagepool.py                |    9 +-
 src/virtManager/storagevol.py                 |    2 -
 src/virtManager/systray.py                    |  100 ++++----
 src/virtManager/uihelpers.py                  |  118 ++++-----
 src/virtManager/util.py                       |   94 +------
 src/virtManagerTui/importblacklist/gconf.py   |   21 --
 src/virtManagerTui/importblacklist/gobject.py |   21 --
 src/virtManagerTui/importblacklist/gtk.py     |   21 --
 tests/pylint-virt-manager.sh                  |    3 +
 virt-manager.spec.in                          |   10 +-
 52 files changed, 1467 insertions(+), 1928 deletions(-)
 delete mode 100644 src/virtManager/libvirtglib.py
 delete mode 100644 src/virtManagerTui/importblacklist/gconf.py
 delete mode 100644 src/virtManagerTui/importblacklist/gobject.py
 delete mode 100644 src/virtManagerTui/importblacklist/gtk.py

diff --git a/src/virt-manager.py.in b/src/virt-manager.py.in
index 459da5b..a2f4f01 100755
--- a/src/virt-manager.py.in
+++ b/src/virt-manager.py.in
@@ -27,6 +27,9 @@ import traceback
 import signal
 import optparse
 
+from gi.repository import GObject
+from gi.repository import LibvirtGLib
+
 try:
     # Make sure we have a default '_' implementation, in case something
     # fails before gettext is set up
@@ -258,15 +261,11 @@ def main():
     import warnings
     warnings.filterwarnings('error', module='gtk', append=True)
     try:
-        import gobject
-
         # Set program name for gnome shell (before importing gtk, which
         # seems to call set_prgname on its own)
-        if hasattr(gobject, "set_prgname"):
-            gobject.set_prgname(appname)
+        GObject.set_prgname(appname)
 
-        import gtk
-        globals()["gtk"] = gtk
+        from gi.repository import Gtk
     except Warning, e:
         # ...the risk is we catch too much though
         # Damned if we do, damned if we dont :-)(
@@ -285,32 +284,30 @@ def main():
             raise RuntimeError(_("Unable to initialize GTK: %s") % gtk_error)
         raise gtk_error
 
-    if not hasattr(gtk, "Builder"):
-        raise RuntimeError("virt-manager requires GtkBuilder support. "
-                           "Your gtk version appears to be too old.")
-
     cli.setup_logging(appname, options.debug)
     global logging_setup
     logging_setup = True
 
     logging.debug("Launched as: %s", origargs)
-    logging.debug("GTK version: %s", str(gtk.gtk_version))
+    logging.debug("GTK version: %d.%d.%d",
+                  Gtk.get_major_version(),
+                  Gtk.get_minor_version(),
+                  Gtk.get_micro_version())
     logging.debug("virt-manager version: %s", appversion)
     logging.debug("virtManager import: %s", str(virtManager))
 
     cli.check_virtinst_version(virtinst_str)
 
     # Add our icon dir to icon theme
-    icon_theme = gtk.icon_theme_get_default()
+    icon_theme = Gtk.IconTheme.get_default()
     icon_theme.prepend_search_path(icon_dir)
 
-    gobject.threads_init()
-
-    import dbus
-    import dbus.mainloop.glib
-    dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
-    dbus.mainloop.glib.threads_init()
-    import dbus.service
+    # XXX
+    #import dbus
+    #import dbus.mainloop.glib
+    #dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
+    #dbus.mainloop.glib.threads_init()
+    #import dbus.service
 
     # Specifically init config/gconf before the fork, so that pam
     # doesn't think we closed the app, therefor robbing us of
@@ -339,7 +336,7 @@ def main():
 
     from virtManager.engine import vmmEngine
 
-    gtk.window_set_default_icon_name(appname)
+    Gtk.Window.set_default_icon_name(appname)
 
     if options.show and options.uri == None:
         raise optparse.OptionValueError("can't use --show-* options "
@@ -362,8 +359,8 @@ def main():
                               "disabling DBus service")
 
     # Hook libvirt events into glib main loop
-    import virtManager.libvirtglib
-    virtManager.libvirtglib.register_event_impl()
+    LibvirtGLib.init(0, "")
+    LibvirtGLib.event_register()
 
     # At this point we're either starting a brand new controlling instance,
     # or the dbus comms to existing instance has failed
@@ -374,10 +371,10 @@ def main():
     if options.profile != None:
         import hotshot
         prof = hotshot.Profile(options.profile)
-        prof.runcall(gtk.main)
+        prof.runcall(Gtk.main)
         prof.close()
     else:
-        gtk.main()
+        Gtk.main()
 
 if __name__ == "__main__":
     try:
@@ -389,6 +386,6 @@ if __name__ == "__main__":
     except Exception, run_e:
         if logging_setup:
             logging.exception(run_e)
-        if "gtk" not in globals():
+        if "Gtk" not in globals():
             raise
         _show_startup_error(str(run_e), "".join(traceback.format_exc()))
diff --git a/src/virtManager/about.py b/src/virtManager/about.py
index 7687126..6a99fc0 100644
--- a/src/virtManager/about.py
+++ b/src/virtManager/about.py
@@ -20,27 +20,13 @@
 
 import logging
 
-import gtk
-
 from virtManager.baseclass import vmmGObjectUI
 
-def on_email(about, mail):
-    ignore = about
-    if hasattr(gtk, "show_uri"):
-        gtk.show_uri(None, "mailto:%s" % mail, gtk.get_current_event_time())
-gtk.about_dialog_set_email_hook(on_email)
-
-def on_url(about, link):
-    ignore = about
-    if hasattr(gtk, "show_uri"):
-        gtk.show_uri(None, link, gtk.get_current_event_time())
-gtk.about_dialog_set_url_hook(on_url)
-
 class vmmAbout(vmmGObjectUI):
     def __init__(self):
         vmmGObjectUI.__init__(self, "vmm-about.ui", "vmm-about")
 
-        self.window.connect_signals({
+        self.get_window().connect_signals({
             "on_vmm_about_delete_event": self.close,
             "on_vmm_about_response": self.close,
             })
@@ -57,5 +43,3 @@ class vmmAbout(vmmGObjectUI):
 
     def _cleanup(self):
         pass
-
-vmmGObjectUI.type_register(vmmAbout)
diff --git a/src/virtManager/addhardware.py b/src/virtManager/addhardware.py
index 50852ed..61e9dbd 100644
--- a/src/virtManager/addhardware.py
+++ b/src/virtManager/addhardware.py
@@ -21,7 +21,9 @@
 import logging
 import traceback
 
-import gtk
+from gi.repository import GObject
+from gi.repository import Gtk
+from gi.repository import Gdk
 
 import virtinst
 from virtinst import (VirtualCharDevice, VirtualDevice,
@@ -69,6 +71,10 @@ _comboentry_xml = """
 """
 
 class vmmAddHardware(vmmGObjectUI):
+    __gsignals__ = {
+        "action-show-help": (GObject.SignalFlags.RUN_FIRST, None, [str]),
+    }
+
     def __init__(self, vm):
         vmmGObjectUI.__init__(self,
                               "vmm-add-hardware.ui", "vmm-add-hardware")
@@ -83,11 +89,11 @@ class vmmAddHardware(vmmGObjectUI):
 
         self._dev = None
 
-        self.window.add_from_string(_comboentry_xml)
+        self.get_window().add_from_string(_comboentry_xml)
         self.widget("table7").attach(self.widget("config-storage-format"),
-                                     1, 2, 2, 3, xoptions=gtk.FILL)
+                                     1, 2, 2, 3, xoptions=Gtk.AttachOptions.FILL)
 
-        self.window.connect_signals({
+        self.get_window().connect_signals({
             "on_create_cancel_clicked" : self.close,
             "on_vmm_create_delete_event" : self.close,
             "on_create_finish_clicked" : self.finish,
@@ -126,8 +132,8 @@ class vmmAddHardware(vmmGObjectUI):
         self.widget("create-help").hide()
 
 
-        finish_img = gtk.image_new_from_stock(gtk.STOCK_QUIT,
-                                              gtk.ICON_SIZE_BUTTON)
+        finish_img = Gtk.Image.new_from_stock(Gtk.STOCK_QUIT,
+                                              Gtk.IconSize.BUTTON)
         self.widget("create-finish").set_image(finish_img)
 
         self.set_initial_state()
@@ -186,15 +192,13 @@ class vmmAddHardware(vmmGObjectUI):
     def remove_timers(self):
         try:
             if self.host_storage_timer:
-                self.remove_gobject_timeout(self.host_storage_timer)
+                self.remove_GObject.timeout(self.host_storage_timer)
                 self.host_storage_timer = None
         except:
             pass
 
     def is_visible(self):
-        if self.topwin.flags() & gtk.VISIBLE:
-            return 1
-        return 0
+        return self.topwin.get_visible()
 
 
     ##########################
@@ -205,22 +209,22 @@ class vmmAddHardware(vmmGObjectUI):
         notebook = self.widget("create-pages")
         notebook.set_show_tabs(False)
 
-        black = gtk.gdk.color_parse("#000")
-        self.widget("page-title-box").modify_bg(gtk.STATE_NORMAL, black)
+        black = Gdk.Color.parse("#000")[1]
+        self.widget("page-title-box").modify_bg(Gtk.StateType.NORMAL, black)
 
         # Name, icon name, page number, is sensitive, tooltip, icon size,
         # device type (serial/parallel)...
-        model = gtk.ListStore(str, str, int, bool, str, str)
+        model = Gtk.ListStore(str, str, int, bool, str, str)
         hw_list = self.widget("hardware-list")
         hw_list.set_model(model)
 
-        hw_col = gtk.TreeViewColumn("Hardware")
+        hw_col = Gtk.TreeViewColumn("Hardware")
         hw_col.set_spacing(6)
         hw_col.set_min_width(165)
 
-        icon = gtk.CellRendererPixbuf()
-        icon.set_property("stock-size", gtk.ICON_SIZE_BUTTON)
-        text = gtk.CellRendererText()
+        icon = Gtk.CellRendererPixbuf()
+        icon.set_property("stock-size", Gtk.IconSize.BUTTON)
+        text = Gtk.CellRendererText()
         text.set_property("xpad", 6)
 
         hw_col.pack_start(icon, False)
@@ -241,13 +245,13 @@ class vmmAddHardware(vmmGObjectUI):
 
         # Disk device type / bus
         target_list = self.widget("config-storage-devtype")
-        target_model = gtk.ListStore(str, str, str, str, int)
+        target_model = Gtk.ListStore(str, str, str, str, int)
         target_list.set_model(target_model)
-        icon = gtk.CellRendererPixbuf()
-        icon.set_property("stock-size", gtk.ICON_SIZE_BUTTON)
+        icon = Gtk.CellRendererPixbuf()
+        icon.set_property("stock-size", Gtk.IconSize.BUTTON)
         target_list.pack_start(icon, False)
         target_list.add_attribute(icon, 'icon-name', 2)
-        text = gtk.CellRendererText()
+        text = Gtk.CellRendererText()
         text.set_property("xpad", 6)
         target_list.pack_start(text, True)
         target_list.add_attribute(text, 'text', 3)
@@ -266,18 +270,18 @@ class vmmAddHardware(vmmGObjectUI):
 
         # Input device type
         input_list = self.widget("input-type")
-        input_model = gtk.ListStore(str, str, str, bool)
+        input_model = Gtk.ListStore(str, str, str, bool)
         input_list.set_model(input_model)
-        text = gtk.CellRendererText()
+        text = Gtk.CellRendererText()
         input_list.pack_start(text, True)
         input_list.add_attribute(text, 'text', 0)
         input_list.add_attribute(text, 'sensitive', 3)
 
         # Graphics type
         graphics_list = self.widget("graphics-type")
-        graphics_model = gtk.ListStore(str, str)
+        graphics_model = Gtk.ListStore(str, str)
         graphics_list.set_model(graphics_model)
-        text = gtk.CellRendererText()
+        text = Gtk.CellRendererText()
         graphics_list.pack_start(text, True)
         graphics_list.add_attribute(text, 'text', 0)
 
@@ -288,14 +292,14 @@ class vmmAddHardware(vmmGObjectUI):
         # Host device list
         # model = [ Description, nodedev name ]
         host_dev = self.widget("host-device")
-        host_dev_model = gtk.ListStore(str, str)
+        host_dev_model = Gtk.ListStore(str, str)
         host_dev.set_model(host_dev_model)
 
-        host_col = gtk.TreeViewColumn()
-        text = gtk.CellRendererText()
+        host_col = Gtk.TreeViewColumn()
+        text = Gtk.CellRendererText()
         host_col.pack_start(text, True)
         host_col.add_attribute(text, 'text', 0)
-        host_dev_model.set_sort_column_id(0, gtk.SORT_ASCENDING)
+        host_dev_model.set_sort_column_id(0, Gtk.SortType.ASCENDING)
         host_dev.append_column(host_col)
 
         # Video device
@@ -305,18 +309,18 @@ class vmmAddHardware(vmmGObjectUI):
         # Character dev mode
         char_mode = self.widget("char-mode")
         # Mode name, desc
-        char_mode_model = gtk.ListStore(str, str)
+        char_mode_model = Gtk.ListStore(str, str)
         char_mode.set_model(char_mode_model)
-        text = gtk.CellRendererText()
+        text = Gtk.CellRendererText()
         char_mode.pack_start(text, True)
         char_mode.add_attribute(text, 'text', 1)
-        char_mode_model.set_sort_column_id(0, gtk.SORT_ASCENDING)
+        char_mode_model.set_sort_column_id(0, Gtk.SortType.ASCENDING)
         for t in VirtualCharDevice.char_modes:
             desc = VirtualCharDevice.get_char_mode_desc(t)
             char_mode_model.append([t, desc + " (%s)" % t])
 
-        self.widget("char-info-box").modify_bg(gtk.STATE_NORMAL,
-                                               gtk.gdk.color_parse("grey"))
+        self.widget("char-info-box").modify_bg(Gtk.StateType.NORMAL,
+                                               Gdk.Color.parse("grey")[1])
 
         # Watchdog widgets
         combo = self.widget("watchdog-model")
@@ -327,12 +331,12 @@ class vmmAddHardware(vmmGObjectUI):
 
         def simple_store_set(comboname, values):
             combo = self.widget(comboname)
-            model = gtk.ListStore(str, str)
+            model = Gtk.ListStore(str, str)
             combo.set_model(model)
-            text = gtk.CellRendererText()
+            text = Gtk.CellRendererText()
             combo.pack_start(text, True)
             combo.add_attribute(text, 'text', 1)
-            model.set_sort_column_id(0, gtk.SORT_ASCENDING)
+            model.set_sort_column_id(0, Gtk.SortType.ASCENDING)
             for val in values:
                 model.append([val, val.capitalize()])
 
@@ -381,15 +385,15 @@ class vmmAddHardware(vmmGObjectUI):
         add_hw_option("Sound", "audio-card", PAGE_SOUND,
                       self.vm.is_hvm(),
                       _("Not supported for this guest type."))
-        add_hw_option("Serial", gtk.STOCK_CONNECT, PAGE_CHAR,
+        add_hw_option("Serial", Gtk.STOCK_CONNECT, PAGE_CHAR,
                       self.vm.is_hvm(),
                       _("Not supported for this guest type."),
                       "serial")
-        add_hw_option("Parallel", gtk.STOCK_CONNECT, PAGE_CHAR,
+        add_hw_option("Parallel", Gtk.STOCK_CONNECT, PAGE_CHAR,
                       self.vm.is_hvm(),
                       _("Not supported for this guest type."),
                       "parallel")
-        add_hw_option("Channel", gtk.STOCK_CONNECT, PAGE_CHAR,
+        add_hw_option("Channel", Gtk.STOCK_CONNECT, PAGE_CHAR,
                       self.vm.is_hvm(),
                       _("Not supported for this guest type."),
                       "channel")
@@ -409,7 +413,7 @@ class vmmAddHardware(vmmGObjectUI):
         add_hw_option("Watchdog", "device_pci", PAGE_WATCHDOG,
                       self.vm.is_hvm(),
                       _("Not supported for this guest type."))
-        add_hw_option("Filesystem", gtk.STOCK_DIRECTORY, PAGE_FILESYSTEM,
+        add_hw_option("Filesystem", Gtk.STOCK_DIRECTORY, PAGE_FILESYSTEM,
                       virtinst.support.check_conn_hv_support(
                         self.conn.vmm,
                         virtinst.support.SUPPORT_CONN_HV_FILESYSTEM,
@@ -436,7 +440,7 @@ class vmmAddHardware(vmmGObjectUI):
         self.widget("config-storage-nosparse").set_active(True)
         # Don't specify by default, so we don't overwrite possibly working
         # libvirt detection
-        self.widget("config-storage-format").child.set_text("")
+        self.widget("config-storage-format").get_child().set_text("")
         target_list = self.widget("config-storage-devtype")
         self.populate_target_device_model(target_list.get_model())
         if len(target_list.get_model()) > 0:
@@ -455,7 +459,7 @@ class vmmAddHardware(vmmGObjectUI):
         error = self.conn.netdev_error
         if error:
             net_warn.show()
-            util.tooltip_wrapper(net_warn, error)
+            net_warn.set_tooltip_text(error)
         else:
             net_warn.hide()
 
@@ -528,7 +532,7 @@ class vmmAddHardware(vmmGObjectUI):
                 icon = "media-optical"
             else:
                 icon = "drive-harddisk"
-            model.append([bus, device, icon, desc, gtk.ICON_SIZE_BUTTON])
+            model.append([bus, device, icon, desc, Gtk.IconSize.BUTTON])
 
         if self.vm.is_hvm():
             add_dev("ide", virtinst.VirtualDisk.DEVICE_DISK, "IDE disk")
@@ -631,7 +635,7 @@ class vmmAddHardware(vmmGObjectUI):
 
     def get_config_disk_format(self):
         fmt = self.widget("config-storage-format")
-        return fmt.child.get_text()
+        return fmt.get_child().get_text()
 
     # Input getters
     def get_config_input(self):
@@ -823,10 +827,10 @@ class vmmAddHardware(vmmGObjectUI):
         char_devtype = self.widget("char-device-type")
         dev_type = self.get_char_type()
         # Type name, desc
-        char_devtype_model = gtk.ListStore(str, str)
+        char_devtype_model = Gtk.ListStore(str, str)
         char_devtype.clear()
         char_devtype.set_model(char_devtype_model)
-        text = gtk.CellRendererText()
+        text = Gtk.CellRendererText()
         char_devtype.pack_start(text, True)
         char_devtype.add_attribute(text, 'text', 1)
 
@@ -884,7 +888,7 @@ class vmmAddHardware(vmmGObjectUI):
             return
 
         self.topwin.set_sensitive(False)
-        self.topwin.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))
+        self.topwin.get_window().set_cursor(Gdk.Cursor.new(Gdk.CursorType.WATCH))
 
         try:
             failure, errinfo = self.add_device()
@@ -898,7 +902,7 @@ class vmmAddHardware(vmmGObjectUI):
             self.err.show_err(error, details=details)
 
         self.topwin.set_sensitive(True)
-        self.topwin.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.TOP_LEFT_ARROW))
+        self.topwin.get_window().set_cursor(Gdk.Cursor.new(Gdk.CursorType.TOP_LEFT_ARROW))
 
         self._dev = None
         if not failure:
@@ -1169,8 +1173,8 @@ class vmmAddHardware(vmmGObjectUI):
                 _("This device could not be attached to the running machine. "
                   "Would you like to make the device available after the "
                   "next guest shutdown?")),
-                dialog_type=gtk.MESSAGE_WARNING,
-                buttons=gtk.BUTTONS_YES_NO,
+                dialog_type=Gtk.MessageType.WARNING,
+                buttons=Gtk.ButtonsType.YES_NO,
                 async=False)
 
             if not res:
@@ -1561,6 +1565,3 @@ class vmmAddHardware(vmmGObjectUI):
             self.emit("action-show-help", "virt-manager-storage-space")
         elif page == PAGE_NETWORK:
             self.emit("action-show-help", "virt-manager-network")
-
-vmmAddHardware.type_register(vmmAddHardware)
-vmmAddHardware.signal_new(vmmAddHardware, "action-show-help", [str])
diff --git a/src/virtManager/asyncjob.py b/src/virtManager/asyncjob.py
index e9eb8a2..55b8643 100644
--- a/src/virtManager/asyncjob.py
+++ b/src/virtManager/asyncjob.py
@@ -22,8 +22,9 @@ import logging
 import threading
 import traceback
 
-import gtk
-import gobject
+from gi.repository import GObject
+from gi.repository import Gtk
+from gi.repository import Gdk
 
 import libvirt
 import urlgrabber
@@ -180,7 +181,7 @@ class vmmAsyncJob(vmmGObjectUI):
         self.bg_thread = asyncJobWorker(callback, args)
         logging.debug("Creating async job for function cb=%s", callback)
 
-        self.window.connect_signals({
+        self.get_window().connect_signals({
             "on_async_job_delete_event" : self.delete,
             "on_async_job_cancel_clicked" : self.cancel,
         })
@@ -248,21 +249,21 @@ class vmmAsyncJob(vmmGObjectUI):
     ###########
 
     def run(self):
-        timer = gobject.timeout_add(100, self.exit_if_necessary)
+        timer = GObject.timeout_add(100, self.exit_if_necessary)
 
         if self.show_progress:
             self.topwin.present()
 
         if not self.cancel_job and self.show_progress:
-            self.topwin.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))
+            self.topwin.get_window().set_cursor(Gdk.Cursor.new(Gdk.CursorType.WATCH))
 
         if self.async:
             self.bg_thread.start()
-            gtk.main()
+            Gtk.main()
         else:
             self.bg_thread.run()
 
-        gobject.source_remove(timer)
+        GObject.source_remove(timer)
 
         if self.bg_thread.isAlive():
             # This can happen if the user closes the whole app while the
@@ -282,7 +283,7 @@ class vmmAsyncJob(vmmGObjectUI):
 
         res = self.err.warn_chkbox(
                 text1=_("Cancel the job before closing window?"),
-                buttons=gtk.BUTTONS_YES_NO)
+                buttons=Gtk.ButtonsType.YES_NO)
         if not res:
             return
 
@@ -311,7 +312,7 @@ class vmmAsyncJob(vmmGObjectUI):
 
         if not thread_active or force_exit:
             if self.async:
-                gtk.main_quit()
+                Gtk.main_quit()
             return False
 
         if not self.is_pulsing or not self.show_progress:
diff --git a/src/virtManager/autodrawer.py b/src/virtManager/autodrawer.py
index 9682aa9..1afda6c 100644
--- a/src/virtManager/autodrawer.py
+++ b/src/virtManager/autodrawer.py
@@ -22,32 +22,17 @@
 # MA 02110-1301 USA.
 #
 
-import gobject
-import gtk
-
-parentclass = gtk.VBox
-
-def _set_has_window(widget, val):
-    if hasattr(widget, "set_has_window"):
-        # Only available on gtk 2.18 or later
-        widget.set_has_window(val)
-    elif val:
-        widget.set_flags(widget.flags() & ~gtk.NO_WINDOW)
-    else:
-        widget.set_flags(widget.flags() | gtk.NO_WINDOW)
-
-def _is_toplevel(widget):
-    if hasattr(widget, "is_toplevel"):
-        # Only available on gtk 2.18 or later
-        return widget.is_toplevel()
-    return bool(widget.flags() & gtk.TOPLEVEL)
-
-class OverBox(parentclass):
+from gi.repository import GObject
+from gi.repository import Gtk
+from gi.repository import Gdk
+from gi.repository import cairo
+
+class OverBox(Gtk.Box):
     """
     Implementation of an overlapping box
     """
     def __init__(self):
-        parentclass.__init__(self)
+        Gtk.Box.__init__(self)
 
         self.underWin = None
         self.underWidget = None
@@ -59,18 +44,12 @@ class OverBox(parentclass):
         self._fraction = 0
         self.verticalOffset = 0
 
-        _set_has_window(self, True)
+        self.set_has_window(True)
 
     ####################
     # Internal helpers #
     ####################
 
-    def is_realized(self):
-        return bool(self.flags() & gtk.REALIZED)
-    def set_realized(self):
-        flags = self.flags() | gtk.REALIZED
-        self.set_flags(flags)
-
     def _get_actual_min(self):
         """
         Retrieve the actual 'min' value, i.e. a value that is guaranteed
@@ -80,7 +59,7 @@ class OverBox(parentclass):
         return ret
 
     def _get_under_window_geometry(self):
-        geo = gtk.gdk.Rectangle()
+        geo = cairo.RectangleInt()
         actual_min = self._get_actual_min()
 
         geo.x = 0
@@ -91,7 +70,7 @@ class OverBox(parentclass):
         return geo
 
     def _get_over_window_geometry(self):
-        geo = gtk.gdk.Rectangle()
+        geo = cairo.RectangleInt()
         boxwidth = self.allocation.width
         expand = True
         fill = True
@@ -99,9 +78,11 @@ class OverBox(parentclass):
         actual_min = self._get_actual_min()
 
         if self.overWidget:
-            expand = self.child_get(self.overWidget, "expand")[0]
-            fill = self.child_get(self.overWidget, "fill")[0]
-            padding = self.child_get(self.overWidget, "padding")[0]
+            # XXX
+            expand = self.child_get_property(self.overWidget, "expand", "")
+            fill = self.child_get_property(self.overWidget, "fill", "")
+            padding = self.child_get_property(self.overWidget, "padding", "")
+            padding = 0
 
         if not expand:
             width = min(self.overWidth, boxwidth - padding)
@@ -137,29 +118,31 @@ class OverBox(parentclass):
             self.overWin.show()
 
     def _set_background(self):
-        style = self.get_style()
-        style.set_background(self.window, gtk.STATE_NORMAL)
-        style.set_background(self.underWin, gtk.STATE_NORMAL)
-        style.set_background(self.overWin, gtk.STATE_NORMAL)
+        ctx = self.get_style_context()
+        ctx.set_background(self.window)
+        ctx.set_background(self.underWin)
+        ctx.set_background(self.overWin)
 
     def _size_request(self):
-        underw, underh = self.underWidget.size_request()
-        overw, overh = self.overWidget.size_request()
+        under = self.underWidget.size_request()
+        over = self.overWidget.size_request()
 
-        self.overWidth = overw
-        self.overHeight = overh
+        self.overWidth = over.width
+        self.overHeight = over.height
 
-        expand = self.child_get(self.overWidget, "expand")
-        fill = self.child_get(self.overWidget, "fill")
-        padding = self.child_get(self.overWidget, "padding")
+        # XXXX
+        expand = self.child_get_property(self.overWidget, "expand", "")
+        fill = self.child_get_property(self.overWidget, "fill", "")
+        padding = self.child_get_property(self.overWidget, "padding", "")
+        padding = 0
 
         if expand or fill:
             wpad = 0
         else:
             wpad = padding
 
-        width = max(underw, overw + wpad)
-        height = max(underh + self._get_actual_min(), overh)
+        width = max(under.width, over.width + wpad)
+        height = max(under.height + self._get_actual_min(), over.height)
 
         return width, height
 
@@ -174,7 +157,8 @@ class OverBox(parentclass):
         if self.overWidget:
             self.remove(self.overWidget)
 
-        widget.set_parent_window(self.overWin)
+        if self.overWin:
+            widget.set_parent_window(self.overWin)
         self.add(widget)
         self.overWidget = widget
 
@@ -182,7 +166,8 @@ class OverBox(parentclass):
         if self.underWidget:
             self.remove(self.underWidget)
 
-        widget.set_parent_window(self.underWin)
+        if self.underWin:
+            widget.set_parent_window(self.underWin)
         self.add(widget)
         self.underWidget = widget
         self.underWidget.show_all()
@@ -194,7 +179,7 @@ class OverBox(parentclass):
     def set_fraction(self, newfraction):
         self._fraction = newfraction
 
-        if self.is_realized():
+        if self.get_realized():
             overgeo = self._get_over_window_geometry()
             self.overWin.move(overgeo.x, overgeo.y)
     def get_fraction(self):
@@ -204,7 +189,7 @@ class OverBox(parentclass):
     def set_vertical_offset(self, newoff):
         self.verticalOffset = newoff
 
-        if self.is_realized():
+        if self.get_realized():
             overgeo = self._get_over_window_geometry()
             self.overWin.move(overgeo.x, overgeo.y)
 
@@ -214,61 +199,64 @@ class OverBox(parentclass):
 
     def do_map(self):
         self.get_window().show()
-        parentclass.do_map(self)
+        Gtk.Box.do_map(self)
 
     def do_unmap(self):
         self.get_window().hide()
-        parentclass.do_unmap(self)
+        Gtk.Box.do_unmap(self)
 
     def do_realize(self):
-        event_mask = self.get_events() | gtk.gdk.EXPOSURE_MASK
-        colormap = self.get_colormap()
-        visual = self.get_visual()
-
-        self.set_realized()
-
-        def make_window(parent, rect):
-            return gtk.gdk.Window(parent,
-                                  rect.width,
-                                  rect.height,
-                                  gtk.gdk.WINDOW_CHILD,
-                                  event_mask,
-                                  gtk.gdk.INPUT_OUTPUT,
-                                  x=rect.x,
-                                  y=rect.y,
-                                  colormap=colormap,
-                                  visual=visual)
-
-        window = make_window(self.get_parent_window(), self.allocation)
+        self.set_realized(True)
+
+        attr = Gdk.WindowAttr()
+        attr.window_type = Gdk.WindowType.CHILD
+        attr.wclass = Gdk.WindowWindowClass.INPUT_OUTPUT
+        attr.event_mask = self.get_events() | Gdk.EventMask.EXPOSURE_MASK
+        attr.visual = self.get_visual()
+        attr.x = self.allocation.x
+        attr.y = self.allocation.y
+        attr.width = self.allocation.width
+        attr.height = self.allocation.height
+
+        mask = Gdk.WindowAttributesType.VISUAL | \
+          Gdk.WindowAttributesType.X | \
+          Gdk.WindowAttributesType.Y
+
+        window = Gdk.Window.new(self.get_parent_window(), attr, mask)
         self.window = window
-        self.window.set_user_data(self)
-        self.style.attach(window)
-
-        self.underWin = make_window(window,
-                                    self._get_under_window_geometry())
-        self.underWin.set_user_data(self)
+        self.set_window(window)
+
+        geo = self._get_under_window_geometry()
+        attr.x = geo.x
+        attr.y = geo.y
+        attr.width = geo.width
+        attr.height = geo.height
+        self.underWin = Gdk.Window.new(window, attr, mask)
         if self.underWidget:
             self.underWidget.set_parent_window(self.underWin)
         self.underWin.show()
 
-        overalloc = self._get_over_window_geometry()
-        self.overWin = make_window(window,
-                                   self._get_over_window_geometry())
-        self.overWin.set_user_data(self)
+        geo = self._get_over_window_geometry()
+        attr.x = geo.x
+        attr.y = geo.y
+        attr.width = geo.width
+        attr.height = geo.height
+        self.overWin = Gdk.Window.new(window, attr, mask)
         if self.overWidget:
             self.overWidget.set_parent_window(self.overWin)
-        self._set_overwin_size(overalloc)
+        self._set_overwin_size(geo)
 
         self._set_background()
 
     def do_unrealize(self):
-        parentclass.do_unrealize(self)
+        Gtk.Box.do_unrealize(self)
 
         self.overWin.destroy()
         self.overWin = None
 
         self.underWin.destroy()
         self.underWin = None
+        self.set_realized(False)
 
     def do_size_request(self, req):
         width, height = self._size_request()
@@ -276,14 +264,24 @@ class OverBox(parentclass):
         req.width = width
         req.height = height
 
+    def do_get_preferred_width(self):
+        req = Gtk.Requisition()
+        self.do_size_request(req)
+        return (req.width, req.width)
+
+    def do_get_preferred_heigh(self):
+        req = Gtk.Requisition()
+        self.do_size_request(req)
+        return (req.height, req.height)
+
     def do_size_allocate(self, newalloc):
         self.allocation = newalloc
 
         over = self._get_over_window_geometry()
         under = self._get_under_window_geometry()
 
-        if self.is_realized():
-            self.window.move_resize(newalloc.x, newalloc.y,
+        if self.get_realized():
+            self.get_window().move_resize(newalloc.x, newalloc.y,
                                     newalloc.width, newalloc.height)
             self.underWin.move_resize(under.x, under.y,
                                       under.width, under.height)
@@ -296,12 +294,6 @@ class OverBox(parentclass):
         over.y = 0
         self.overWidget.size_allocate(over)
 
-    def do_style_set(self, style):
-        if self.is_realized():
-            self._set_background()
-
-        parentclass.do_style_set(self, style)
-
 
 class Drawer(OverBox):
     """
@@ -346,8 +338,8 @@ class Drawer(OverBox):
         self.period = period
 
         if self.timer_pending:
-            gobject.source_remove(self.timer_id)
-            self.timer_id = gobject.timeout_add(self.period, self._on_timer)
+            GObject.source_remove(self.timer_id)
+            self.timer_id = GObject.timeout_add(self.period, self._on_timer)
 
         self.step = step
 
@@ -355,7 +347,7 @@ class Drawer(OverBox):
         self.goal = goal
 
         if not self.timer_pending:
-            self.timer_id = gobject.timeout_add(self.period, self._on_timer)
+            self.timer_id = GObject.timeout_add(self.period, self._on_timer)
             self.timer_pending = True
 
     def get_close_time(self):
@@ -387,7 +379,7 @@ class AutoDrawer(Drawer):
         self.overAllocID = None
 
         self.over = None
-        self.eventBox = gtk.EventBox()
+        self.eventBox = Gtk.EventBox()
         self.eventBox.show()
         OverBox.set_over(self, self.eventBox)
 
@@ -433,7 +425,7 @@ class AutoDrawer(Drawer):
 
     def _update(self, do_immediate):
         toplevel = self.get_toplevel()
-        if not toplevel or not _is_toplevel(toplevel):
+        if not toplevel or not toplevel.is_toplevel():
             # The autoDrawer cannot function properly without a toplevel.
             return
 
@@ -462,13 +454,13 @@ class AutoDrawer(Drawer):
             grabbed = None
 
             if toplevel.get_group():
-                # XXX: Not in pygtk?
+                # XXX: Not in pyGtk.
                 #grabbed = toplevel.get_group().get_current_grab()
                 pass
             if not grabbed:
-                grabbed = gtk.grab_get_current()
+                grabbed = Gtk.grab_get_current()
 
-            if grabbed and isinstance(grabbed, gtk.Menu):
+            if grabbed and isinstance(grabbed, Gtk.Menu):
 
                 while True:
                     menuAttach = grabbed.get_attach_widget()
@@ -476,11 +468,11 @@ class AutoDrawer(Drawer):
                         break
 
                     grabbed = menuAttach
-                    if not isinstance(grabbed, gtk.MenuItem):
+                    if not isinstance(grabbed, Gtk.MenuItem):
                         break
 
                     menuItemParent = grabbed.get_parent()
-                    if not isinstance(menuItemParent, gtk.Menu):
+                    if not isinstance(menuItemParent, Gtk.Menu):
                         break
 
                     grabbed = menuItemParent
@@ -490,7 +482,7 @@ class AutoDrawer(Drawer):
                 self.opened = True
 
         if self.delayConnection:
-            gobject.source_remove(self.delayConnection)
+            GObject.source_remove(self.delayConnection)
 
 
         if self.forceClosing:
@@ -498,7 +490,7 @@ class AutoDrawer(Drawer):
         elif do_immediate:
             self._enforce(False)
         else:
-            self.delayConnection = gobject.timeout_add(self.delayValue,
+            self.delayConnection = GObject.timeout_add(self.delayValue,
                                                        self._on_enforce_delay)
 
 
@@ -511,7 +503,7 @@ class AutoDrawer(Drawer):
             padding = self.offset
 
         self.set_child_packing(self.eventBox, expand, self.fill, padding,
-                               gtk.PACK_START)
+                               Gtk.PackType.START)
 
     def _enforce(self, do_animate):
         if not self.active:
@@ -550,10 +542,10 @@ class AutoDrawer(Drawer):
     def _on_hierarchy_changed(self, oldTopLevel, ignore):
         newTopLevel = self.get_toplevel()
 
-        if oldTopLevel and _is_toplevel(oldTopLevel):
+        if oldTopLevel and oldTopLevel.is_toplevel():
             oldTopLevel.disconnect_by_func(self._set_focus)
 
-        if newTopLevel and _is_toplevel(newTopLevel):
+        if newTopLevel and newTopLevel.is_toplevel():
             newTopLevel.connect_after("set_focus", self._set_focus)
 
         self._update(True)
@@ -604,7 +596,7 @@ class AutoDrawer(Drawer):
 
     def drawer_close(self):
         toplevel = self.get_toplevel()
-        if not toplevel or not _is_toplevel(toplevel):
+        if not toplevel or not toplevel.is_toplevel():
             # The autoDrawer cannot function properly without a toplevel.
             return
 
@@ -613,12 +605,8 @@ class AutoDrawer(Drawer):
             toplevel.set_focus(None)
 
         self.forceClosing = True
-        self.closeConnection = gobject.timeout_add(
+        self.closeConnection = GObject.timeout_add(
                                 self.get_close_time() + self.delayValue,
                                 self._on_close_delay)
 
         self._update(True)
-
-gobject.type_register(OverBox)
-gobject.type_register(Drawer)
-gobject.type_register(AutoDrawer)
diff --git a/src/virtManager/baseclass.py b/src/virtManager/baseclass.py
index a35834e..592427a 100644
--- a/src/virtManager/baseclass.py
+++ b/src/virtManager/baseclass.py
@@ -24,34 +24,19 @@ import logging
 
 import virtManager
 import virtManager.guidiff
-from virtManager import util
 
-running_config, gobject, GObject, gtk = virtManager.guidiff.get_imports()
+from gi.repository import GObject
+if virtManager.guidiff.is_gui():
+    from gi.repository import Gtk
+    from gi.repository import Gdk
 
-class vmmGObject(GObject):
-
-    @staticmethod
-    def type_register(*args, **kwargs):
-        if not hasattr(gobject, "type_register"):
-            return
-        gobject.type_register(*args, **kwargs)
-
-    @staticmethod
-    def signal_new(klass, signal, args):
-        if hasattr(gobject, "signal_new"):
-            gobject.signal_new(signal, klass,
-                               gobject.SIGNAL_RUN_FIRST,
-                               gobject.TYPE_NONE,
-                               args)
-        else:
-            klass.fake_signal_listeners[signal] = []
+class vmmGObject(GObject.GObject):
 
     _leak_check = True
-    fake_signal_listeners = {}
 
     def __init__(self):
-        GObject.__init__(self)
-        self.config = running_config
+        GObject.GObject.__init__(self)
+        self.config = virtManager.guidiff.get_running_config()
 
         self._gobject_handles = []
         self._gobject_timeouts = []
@@ -84,42 +69,15 @@ class vmmGObject(GObject):
     def _cleanup(self):
         raise NotImplementedError("_cleanup must be implemented in subclass")
 
-    # Custom signal implementations
-    # These functions duplicate gobject signal behavior since it's
-    # needed for some TUI functionality
-    def _get_signal_listeners(self, signal_name):
-        return self.fake_signal_listeners[signal_name]
-    def _add_signal_listener(self, signal_name, cb, *args):
-        sigid = self._next_signal_id
-        self._next_signal_id += 1
-        self._signal_id_map[sigid] = (signal_name, cb, args)
-        self.fake_signal_listeners[signal_name].append((cb, args))
-        return sigid
-    def _remove_signal_listener(self, sigid):
-        signame, cb, args = self._signal_id_map[sigid]
-        listener_data = (cb, args)
-        if listener_data not in self.fake_signal_listeners[signame]:
-            raise RuntimeError("Didn't find signal listener to remove: %d" %
-                               sigid)
-
-        self.fake_signal_listeners[signame].remove(listener_data)
-        del(self._signal_id_map[sigid])
-
     def connect(self, name, callback, *args):
-        if hasattr(GObject, "connect"):
-            ret = GObject.connect(self, name, callback, *args)
-            self._gobject_handles.append(ret)
-            return ret
-        else:
-            return self._add_signal_listener(name, callback, *args)
+        ret = GObject.GObject.connect(self, name, callback, *args)
+        self._gobject_handles.append(ret)
+        return ret
 
     def disconnect(self, handle):
-        if hasattr(GObject, "disconnect"):
-            ret = GObject.disconnect(self, handle)
-            self._gobject_handles.remove(handle)
-            return ret
-        else:
-            return self._remove_signal_listener(handle)
+        ret = GObject.GObject.disconnect(self, handle)
+        self._gobject_handles.remove(handle)
+        return ret
 
     def add_gconf_handle(self, handle):
         self._gconf_handles.append(handle)
@@ -130,9 +88,7 @@ class vmmGObject(GObject):
     def add_gobject_timeout(self, handle):
         self._gobject_timeouts.append(handle)
     def remove_gobject_timeout(self, handle):
-        if not hasattr(gobject, "source_remove"):
-            return
-        gobject.source_remove(handle)
+        GObject.source_remove(handle)
         self._gobject_timeouts.remove(handle)
 
     def _logtrace(self, msg):
@@ -178,7 +134,7 @@ class vmmGObject(GObject):
 
     def idle_emit(self, signal, *args):
         """
-        Safe wrapper for using 'self.emit' with gobject.idle_add
+        Safe wrapper for using 'self.emit' with GObject.idle_add
         """
         def emitwrap(_s, *_a):
             self.emit(_s, *_a)
@@ -190,30 +146,20 @@ class vmmGObject(GObject):
         """
         Make sure idle functions are run thread safe
         """
-        if not hasattr(gobject, "idle_add"):
-            return func(*args)
-        return gobject.idle_add(func, *args)
+        return GObject.idle_add(func, *args)
 
     def timeout_add(self, timeout, func, *args):
         """
         Make sure timeout functions are run thread safe
         """
-        if not hasattr(gobject, "timeout_add"):
-            return
-        return gobject.timeout_add(timeout, func, *args)
+        return GObject.timeout_add(timeout, func, *args)
 
     def emit(self, signal_name, *args):
-        if hasattr(GObject, "emit"):
-            return GObject.emit(self, signal_name, *args)
-        else:
-            for cb, customargs in self._get_signal_listeners(signal_name):
-                cbargs = (self,) + args + customargs
-                cb(*cbargs)
-            return
+        return GObject.GObject.emit(self, signal_name, *args)
 
     def __del__(self):
-        if hasattr(GObject, "__del__"):
-            getattr(GObject, "__del__")(self)
+        # XXX
+        #GObject.GObject.__del__(self)
 
         try:
             if self.config and self._leak_check:
@@ -234,18 +180,21 @@ class vmmGObjectUI(vmmGObject):
         if filename:
             self.uifile = os.path.join(self.config.get_ui_dir(), filename)
 
-            self.window = gtk.Builder()
-            self.window.set_translation_domain("virt-manager")
-            self.window.add_from_string(
-                util.sanitize_gtkbuilder(self.uifile))
+            self.window = Gtk.Builder()
+            self.get_window().set_translation_domain("virt-manager")
+            self.get_window().add_from_string(
+                file(self.uifile).read())
 
             self.topwin = self.widget(self.windowname)
             self.topwin.hide()
 
             self.err = virtManager.error.vmmErrorDialog(self.topwin)
 
+    def get_window(self):
+        return self.window
+
     def widget(self, name):
-        return self.window.get_object(name)
+        return self.get_window().get_object(name)
 
     def cleanup(self):
         vmmGObject.cleanup(self)
@@ -263,7 +212,7 @@ class vmmGObjectUI(vmmGObject):
 
     def bind_escape_key_close(self):
         def close_on_escape(src_ignore, event):
-            if gtk.gdk.keyval_name(event.keyval) == "Escape":
+            if Gdk.keyval_name(event.keyval) == "Escape":
                 self.close()
 
         self.topwin.connect("key-press-event", close_on_escape)
diff --git a/src/virtManager/choosecd.py b/src/virtManager/choosecd.py
index 96d7217..cf299eb 100644
--- a/src/virtManager/choosecd.py
+++ b/src/virtManager/choosecd.py
@@ -18,15 +18,20 @@
 # MA 02110-1301 USA.
 #
 
+from gi.repository import GObject
+
 import logging
 
 import virtManager.uihelpers as uihelpers
-import virtManager.util as util
 from virtManager.baseclass import vmmGObjectUI
 from virtManager.mediadev import MEDIA_FLOPPY
 from virtManager.storagebrowse import vmmStorageBrowser
 
 class vmmChooseCD(vmmGObjectUI):
+    __gsignals__ = {
+        "cdrom-chosen": (GObject.SignalFlags.RUN_FIRST, None, [object, str])
+    }
+
     def __init__(self, vm, disk):
         vmmGObjectUI.__init__(self, "vmm-choose-cd.ui", "vmm-choose-cd")
 
@@ -36,7 +41,7 @@ class vmmChooseCD(vmmGObjectUI):
         self.storage_browser = None
         self.media_type = disk.device
 
-        self.window.connect_signals({
+        self.get_window().connect_signals({
             "on_media_toggled": self.media_toggled,
             "on_fv_iso_location_browse_clicked": self.browse_fv_iso_location,
             "on_cd_path_changed": self.change_cd_path,
@@ -136,7 +141,7 @@ class vmmChooseCD(vmmGObjectUI):
 
         if error:
             warn.show()
-            util.tooltip_wrapper(warn, error)
+            warn.set_tooltip_text(error)
         else:
             warn.hide()
 
@@ -165,6 +170,3 @@ class vmmChooseCD(vmmGObjectUI):
             self.storage_browser.set_browse_reason(
                                     self.config.CONFIG_DIR_ISO_MEDIA)
         self.storage_browser.show(self.topwin, self.conn)
-
-vmmGObjectUI.type_register(vmmChooseCD)
-vmmChooseCD.signal_new(vmmChooseCD, "cdrom-chosen", [object, str])
diff --git a/src/virtManager/clone.py b/src/virtManager/clone.py
index c5eed5d..6d3a5cb 100644
--- a/src/virtManager/clone.py
+++ b/src/virtManager/clone.py
@@ -21,7 +21,9 @@
 import logging
 import os
 
-import gtk
+from gi.repository import GObject
+from gi.repository import Gtk
+from gi.repository import Gdk
 
 from virtManager.baseclass import vmmGObjectUI
 from virtManager.asyncjob import vmmAsyncJob
@@ -119,6 +121,10 @@ def do_we_default(conn, vol, path, ro, shared, devtype):
     return (not info, info)
 
 class vmmCloneVM(vmmGObjectUI):
+    __gsignals__ = {
+        "action-show-help": (GObject.SignalFlags.RUN_FIRST, None, [str]),
+    }
+
     def __init__(self, orig_vm):
         vmmGObjectUI.__init__(self, "vmm-clone.ui", "vmm-clone")
         self.orig_vm = orig_vm
@@ -140,7 +146,7 @@ class vmmCloneVM(vmmGObjectUI):
         self.change_storage = self.widget("vmm-change-storage")
         self.change_storage.set_transient_for(self.topwin)
 
-        self.window.connect_signals({
+        self.get_window().connect_signals({
             "on_clone_delete_event" : self.close,
             "on_clone_cancel_clicked" : self.close,
             "on_clone_ok_clicked" : self.finish,
@@ -163,8 +169,8 @@ class vmmCloneVM(vmmGObjectUI):
 
         # XXX: Help docs useless/out of date
         self.widget("clone-help").hide()
-        finish_img = gtk.image_new_from_stock(gtk.STOCK_NEW,
-                                              gtk.ICON_SIZE_BUTTON)
+        finish_img = Gtk.Image.new_from_stock(Gtk.STOCK_NEW,
+                                              Gtk.IconSize.BUTTON)
         self.widget("clone-ok").set_image(finish_img)
 
         self.set_initial_state()
@@ -218,14 +224,14 @@ class vmmCloneVM(vmmGObjectUI):
     # First time setup
 
     def set_initial_state(self):
-        blue = gtk.gdk.color_parse("#0072A8")
-        self.widget("clone-header").modify_bg(gtk.STATE_NORMAL, blue)
+        blue = Gdk.Color.parse("#0072A8")[1]
+        self.widget("clone-header").modify_bg(Gtk.StateType.NORMAL, blue)
 
         box = self.widget("clone-vm-icon-box")
-        image = gtk.image_new_from_icon_name("vm_clone_wizard",
-                                             gtk.ICON_SIZE_DIALOG)
+        image = Gtk.Image.new_from_icon_name("vm_clone_wizard",
+                                             Gtk.IconSize.DIALOG)
         image.show()
-        box.pack_end(image, False)
+        box.pack_end(image, False, False, False)
 
     # Populate state
     def reset_state(self):
@@ -273,15 +279,15 @@ class vmmCloneVM(vmmGObjectUI):
 
         def build_net_row(labelstr, origmac, newmac):
 
-            label = gtk.Label(labelstr + " (%s)" % origmac)
+            label = Gtk.Label(label=labelstr + " (%s)" % origmac)
             label.set_alignment(0, .5)
-            button = gtk.Button(_("Details..."))
+            button = Gtk.Button(_("Details..."))
             button.connect("clicked", self.net_change_mac, origmac)
 
-            hbox = gtk.HBox()
+            hbox = Gtk.HBox()
             hbox.set_spacing(12)
-            hbox.pack_start(label)
-            hbox.pack_end(button, False, False)
+            hbox.pack_start(label, True, True, 0)
+            hbox.pack_end(button, False, False, False)
             hbox.show_all()
             net_box.pack_start(hbox, False, False)
 
@@ -475,24 +481,24 @@ class vmmCloneVM(vmmGObjectUI):
         disk_label = os.path.basename(origpath)
         info_label = None
         if not can_clone:
-            info_label = gtk.Label()
+            info_label = Gtk.Label()
             info_label.set_alignment(0, .5)
             info_label.set_markup("<span size='small'>%s</span>" % failinfo)
         if not is_default:
             disk_label += (definfo and " (%s)" % definfo or "")
 
         # Build icon
-        icon = gtk.Image()
+        icon = Gtk.Image()
         if devtype == virtinst.VirtualDisk.DEVICE_FLOPPY:
             iconname = "media-floppy"
         elif devtype == virtinst.VirtualDisk.DEVICE_CDROM:
             iconname = "media-optical"
         else:
             iconname = "drive-harddisk"
-        icon.set_from_icon_name(iconname, gtk.ICON_SIZE_MENU)
-        disk_name_label = gtk.Label(disk_label)
+        icon.set_from_icon_name(iconname, Gtk.IconSize.MENU)
+        disk_name_label = Gtk.Label(label=disk_label)
         disk_name_label.set_alignment(0, .5)
-        disk_name_box = gtk.HBox(spacing=9)
+        disk_name_box = Gtk.HBox(spacing=9)
         disk_name_box.pack_start(icon, False)
         disk_name_box.pack_start(disk_name_label, True)
 
@@ -501,16 +507,16 @@ class vmmCloneVM(vmmGObjectUI):
             return model[it][2]
 
         # [String, sensitive, is sep]
-        model = gtk.ListStore(str, bool, bool)
-        option_combo = gtk.ComboBox(model)
-        text = gtk.CellRendererText()
-        option_combo.pack_start(text)
+        model = Gtk.ListStore(str, bool, bool)
+        option_combo = Gtk.ComboBox(model)
+        text = Gtk.CellRendererText()
+        option_combo.pack_start(text, True, True, 0)
         option_combo.add_attribute(text, "text", 0)
         option_combo.add_attribute(text, "sensitive", 1)
         option_combo.set_row_separator_func(sep_func, option_combo)
         option_combo.connect("changed", self.storage_combo_changed, target)
 
-        vbox = gtk.VBox(spacing=1)
+        vbox = Gtk.VBox(spacing=1)
         if can_clone or can_share:
             model.insert(STORAGE_COMBO_CLONE,
                          [(_("Clone this disk") +
@@ -590,7 +596,7 @@ class vmmCloneVM(vmmGObjectUI):
 
         ok_button = self.widget("clone-ok")
         ok_button.set_sensitive(clone)
-        util.tooltip_wrapper(ok_button, tooltip)
+        ok_button.set_tooltip_text(tooltip)
 
     def net_change_mac(self, ignore, origmac):
         row      = self.net_list[origmac]
@@ -790,7 +796,7 @@ class vmmCloneVM(vmmGObjectUI):
             return
 
         self.topwin.set_sensitive(False)
-        self.topwin.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))
+        self.topwin.get_window().set_cursor(Gdk.Cursor.new(Gdk.CursorType.WATCH))
 
         title = (_("Creating virtual machine clone '%s'") %
                  self.clone_design.clone_name)
@@ -802,7 +808,7 @@ class vmmCloneVM(vmmGObjectUI):
         error, details = progWin.run()
 
         self.topwin.set_sensitive(True)
-        self.topwin.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.TOP_LEFT_ARROW))
+        self.topwin.get_window().set_cursor(Gdk.Cursor.new(Gdk.CursorType.TOP_LEFT_ARROW))
 
         if error is not None:
             error = (_("Error creating virtual machine clone '%s': %s") %
@@ -845,6 +851,3 @@ class vmmCloneVM(vmmGObjectUI):
     def show_help(self, ignore1=None):
         # Nothing yet
         return
-
-vmmGObjectUI.type_register(vmmCloneVM)
-vmmCloneVM.signal_new(vmmCloneVM, "action-show-help", [str])
diff --git a/src/virtManager/config.py b/src/virtManager/config.py
index 20c6a78..ddec9d1 100644
--- a/src/virtManager/config.py
+++ b/src/virtManager/config.py
@@ -20,8 +20,8 @@
 import os
 import logging
 
-import gtk
-import gconf
+from gi.repository import Gtk
+from gi.repository import GConf
 
 import virtinst
 
@@ -46,8 +46,8 @@ class vmmConfig(object):
             "enable_create" : True,
             "storage_title" : _("Locate or create storage volume"),
             "local_title"   : _("Locate existing storage"),
-            "dialog_type"   : gtk.FILE_CHOOSER_ACTION_SAVE,
-            "choose_button" : gtk.STOCK_OPEN,
+            "dialog_type"   : Gtk.FileChooserAction.SAVE,
+            "choose_button" : Gtk.STOCK_OPEN,
         },
 
         CONFIG_DIR_ISO_MEDIA : {
@@ -66,7 +66,7 @@ class vmmConfig(object):
             "enable_create" : False,
             "storage_title" : _("Locate directory volume"),
             "local_title"   : _("Locate directory volume"),
-            "dialog_type"   : gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER,
+            "dialog_type"   : Gtk.FileChooserAction.SELECT_FOLDER,
         },
     }
 
@@ -94,8 +94,8 @@ class vmmConfig(object):
         self.conf_dir = "/apps/" + appname
         self.ui_dir = ui_dir
 
-        self.conf = gconf.client_get_default()
-        self.conf.add_dir(self.conf_dir, gconf.CLIENT_PRELOAD_NONE)
+        self.conf = GConf.Client.get_default()
+        self.conf.add_dir(self.conf_dir, GConf.ClientPreloadType.PRELOAD_NONE)
 
         # We don't create it straight away, since we don't want
         # to block the app pending user authorizaation to access
@@ -118,6 +118,25 @@ class vmmConfig(object):
 
         self._spice_error = None
 
+    def get_string_list(self, path):
+        val = self.conf.get(path)
+        if val is None:
+            return None
+        values = []
+        for v in val.get_list():
+            values.append(v.get_string())
+        return values
+
+    def set_string_list(self, path, values):
+        val = GConf.Value()
+        newValues = []
+        for v in values:
+            nv = GConf.Value.new(GConf.ValueType.STRING)
+            nv.set_string(v)
+            newValues.append(nv)
+        val.set_list(newValues)
+        self.conf.set(path, val)
+
     def check_inspection(self, support_threading):
         if not support_threading:
             return False
@@ -149,7 +168,7 @@ class vmmConfig(object):
     # General app wide helpers (gconf agnostic)
 
     def get_shutdown_icon_name(self):
-        theme = gtk.icon_theme_get_default()
+        theme = Gtk.IconTheme.get_default()
         iconname = "system-shutdown"
         if theme.has_icon(iconname):
             return iconname
@@ -162,21 +181,8 @@ class vmmConfig(object):
     def get_ui_dir(self):
         return self.ui_dir
 
-    def get_spice_error(self):
-        if self._spice_error is None:
-            try:
-                import SpiceClientGtk
-                ignore = SpiceClientGtk
-                self._spice_error = False
-            except Exception, self._spice_error:
-                logging.debug("Error importing spice: %s", self._spice_error)
-
-        return self._spice_error and str(self._spice_error) or None
-
     def embeddable_graphics(self):
-        ret = ["vnc"]
-        if not bool(self.get_spice_error()):
-            ret.append("spice")
+        ret = ["vnc", "spice"]
         return ret
 
     def remove_notifier(self, h):
@@ -193,7 +199,7 @@ class vmmConfig(object):
 
     # Per-VM/Connection/Connection Host Option dealings
     def _perconn_helper(self, uri, pref_func, func_type, value=None):
-        suffix = "connection_prefs/%s" % gconf.escape_key(uri, len(uri))
+        suffix = "connection_prefs/%s" % GConf.escape_key(uri, len(uri))
         return self._perobj_helper(suffix, pref_func, func_type, value)
     def _perhost_helper(self, uri, pref_func, func_type, value=None):
         host = virtinst.util.get_uri_hostname(uri)
@@ -203,7 +209,7 @@ class vmmConfig(object):
         return self._perobj_helper(suffix, pref_func, func_type, value)
     def _pervm_helper(self, uri, uuid, pref_func, func_type, value=None):
         suffix = ("connection_prefs/%s/vms/%s" %
-                  (gconf.escape_key(uri, len(uri)), uuid))
+                  (GConf.escape_key(uri, len(uri)), uuid))
         return self._perobj_helper(suffix, pref_func, func_type, value)
 
     def _perobj_helper(self, suffix, pref_func, func_type, value=None):
@@ -288,7 +294,7 @@ class vmmConfig(object):
         """
         Remove any old VM preference entries for the passed URI
         """
-        uri = gconf.escape_key(uri, len(uri))
+        uri = GConf.escape_key(uri, len(uri))
         key = self.conf_dir + "/connection_prefs/%s/vms" % uri
         kill_vms = []
         gconf_vms = map(lambda inp: inp.split("/")[-1],
@@ -332,18 +338,18 @@ class vmmConfig(object):
         self.conf.set_bool(self.conf_dir + "/vmlist-fields/network_traffic",
                            state)
 
-    def on_vmlist_guest_cpu_usage_visible_changed(self, cb):
+    def on_vmlist_guest_cpu_usage_visible_changed(self, cb, userdata=None):
         return self.conf.notify_add(self.conf_dir + "/vmlist-fields/cpu_usage",
-                                    cb)
-    def on_vmlist_host_cpu_usage_visible_changed(self, cb):
+                                    cb, userdata)
+    def on_vmlist_host_cpu_usage_visible_changed(self, cb, userdata=None):
         return self.conf.notify_add(self.conf_dir +
-                                    "/vmlist-fields/host_cpu_usage", cb)
-    def on_vmlist_disk_io_visible_changed(self, cb):
+                                    "/vmlist-fields/host_cpu_usage", cb, userdata)
+    def on_vmlist_disk_io_visible_changed(self, cb, userdata=None):
         return self.conf.notify_add(self.conf_dir + "/vmlist-fields/disk_usage",
-                                    cb)
-    def on_vmlist_network_traffic_visible_changed(self, cb):
+                                    cb, userdata)
+    def on_vmlist_network_traffic_visible_changed(self, cb, userdata=None):
         return self.conf.notify_add(
-                        self.conf_dir + "/vmlist-fields/network_traffic", cb)
+                        self.conf_dir + "/vmlist-fields/network_traffic", cb, userdata)
 
     # Keys preferences
     def get_keys_combination(self):
@@ -356,8 +362,8 @@ class vmmConfig(object):
         # Val have to be a list of integers
         val = ','.join(map(str, val))
         self.conf.set_string(self.conf_dir + "/keys/grab-keys", val)
-    def on_keys_combination_changed(self, cb):
-        return self.conf.notify_add(self.conf_dir + "/keys/grab-keys", cb)
+    def on_keys_combination_changed(self, cb, userdata=None):
+        return self.conf.notify_add(self.conf_dir + "/keys/grab-keys", cb, userdata)
 
     # Confirmation preferences
     def get_confirm_forcepoweroff(self):
@@ -387,23 +393,23 @@ class vmmConfig(object):
     def set_confirm_unapplied(self, val):
         self.conf.set_bool(self.conf_dir + "/confirm/unapplied_dev", val)
 
-    def on_confirm_forcepoweroff_changed(self, cb):
-        return self.conf.notify_add(self.conf_dir + "/confirm/forcepoweroff", cb)
-    def on_confirm_poweroff_changed(self, cb):
-        return self.conf.notify_add(self.conf_dir + "/confirm/poweroff", cb)
-    def on_confirm_pause_changed(self, cb):
-        return self.conf.notify_add(self.conf_dir + "/confirm/pause", cb)
-    def on_confirm_removedev_changed(self, cb):
-        return self.conf.notify_add(self.conf_dir + "/confirm/removedev", cb)
-    def on_confirm_interface_changed(self, cb):
-        return self.conf.notify_add(self.conf_dir + "/confirm/interface_power", cb)
-    def on_confirm_unapplied_changed(self, cb):
-        return self.conf.notify_add(self.conf_dir + "/confirm/unapplied_dev", cb)
+    def on_confirm_forcepoweroff_changed(self, cb, userdata=None):
+        return self.conf.notify_add(self.conf_dir + "/confirm/forcepoweroff", cb, userdata)
+    def on_confirm_poweroff_changed(self, cb, userdata=None):
+        return self.conf.notify_add(self.conf_dir + "/confirm/poweroff", cb, userdata)
+    def on_confirm_pause_changed(self, cb, userdata=None):
+        return self.conf.notify_add(self.conf_dir + "/confirm/pause", cb, userdata)
+    def on_confirm_removedev_changed(self, cb, userdata=None):
+        return self.conf.notify_add(self.conf_dir + "/confirm/removedev", cb, userdata)
+    def on_confirm_interface_changed(self, cb, userdata=None):
+        return self.conf.notify_add(self.conf_dir + "/confirm/interface_power", cb, userdata)
+    def on_confirm_unapplied_changed(self, cb, userdata=None):
+        return self.conf.notify_add(self.conf_dir + "/confirm/unapplied_dev", cb, userdata)
 
 
     # System tray visibility
-    def on_view_system_tray_changed(self, callback):
-        return self.conf.notify_add(self.conf_dir + "/system-tray", callback)
+    def on_view_system_tray_changed(self, cb, userdata=None):
+        return self.conf.notify_add(self.conf_dir + "/system-tray", cb, userdata)
     def get_view_system_tray(self):
         return self.conf.get_bool(self.conf_dir + "/system-tray")
     def set_view_system_tray(self, val):
@@ -427,10 +433,10 @@ class vmmConfig(object):
     def set_stats_history_length(self, length):
         self.conf.set_int(self.conf_dir + "/stats/history-length", length)
 
-    def on_stats_update_interval_changed(self, callback):
-        return self.conf.notify_add(self.conf_dir + "/stats/update-interval", callback)
-    def on_stats_history_length_changed(self, callback):
-        return self.conf.notify_add(self.conf_dir + "/stats/history-length", callback)
+    def on_stats_update_interval_changed(self, cb, userdata=None):
+        return self.conf.notify_add(self.conf_dir + "/stats/update-interval", cb, userdata)
+    def on_stats_history_length_changed(self, cb, userdata=None):
+        return self.conf.notify_add(self.conf_dir + "/stats/history-length", cb, userdata)
 
 
     # Disable/Enable different stats polling
@@ -452,8 +458,8 @@ class vmmConfig(object):
                                     cb, userdata)
 
     # VM Console preferences
-    def on_console_accels_changed(self, callback):
-        return self.conf.notify_add(self.conf_dir + "/console/enable-accels", callback)
+    def on_console_accels_changed(self, cb, userdata=None):
+        return self.conf.notify_add(self.conf_dir + "/console/enable-accels", cb, userdata)
     def get_console_accels(self):
         console_pref = self.conf.get_bool(self.conf_dir +
                                           "/console/enable-accels")
@@ -463,8 +469,8 @@ class vmmConfig(object):
     def set_console_accels(self, pref):
         self.conf.set_bool(self.conf_dir + "/console/enable-accels", pref)
 
-    def on_console_scaling_changed(self, callback):
-        return self.conf.notify_add(self.conf_dir + "/console/scaling", callback)
+    def on_console_scaling_changed(self, cb, userdata=None):
+        return self.conf.notify_add(self.conf_dir + "/console/scaling", cb, userdata)
     def get_console_scaling(self):
         ret = self.conf.get(self.conf_dir + "/console/scaling")
         if ret != None:
@@ -534,7 +540,7 @@ class vmmConfig(object):
 
     # URL/Media path history
     def _url_add_helper(self, gconf_path, url):
-        urls = self.conf.get_list(gconf_path, gconf.VALUE_STRING)
+        urls = self.get_string_list(gconf_path)
         if urls == None:
             urls = []
 
@@ -544,7 +550,7 @@ class vmmConfig(object):
             length = self.get_url_list_length()
             if len(urls) > length:
                 del urls[len(urls) - 1]
-            self.conf.set_list(gconf_path, gconf.VALUE_STRING, urls)
+            self.set_string_list(gconf_path, urls)
 
     def add_media_url(self, url):
         self._url_add_helper(self.conf_dir + "/urls/media", url)
@@ -554,14 +560,13 @@ class vmmConfig(object):
         self._url_add_helper(self.conf_dir + "/urls/local_media", path)
 
     def get_media_urls(self):
-        return self.conf.get_list(self.conf_dir + "/urls/media",
-                                  gconf.VALUE_STRING)
+        return self.get_string_list(self.conf_dir + "/urls/media")
+
     def get_kickstart_urls(self):
-        return self.conf.get_list(self.conf_dir + "/urls/kickstart",
-                                  gconf.VALUE_STRING)
+        return self.get_string_list(self.conf_dir + "/urls/kickstart")
+
     def get_iso_paths(self):
-        return self.conf.get_list(self.conf_dir + "/urls/local_media",
-                                 gconf.VALUE_STRING)
+        return self.get_string_list(self.conf_dir + "/urls/local_media")
 
     def get_url_list_length(self):
         length = self.conf.get_int(self.conf_dir + "/urls/url-list-length")
@@ -578,47 +583,43 @@ class vmmConfig(object):
             if path in current_list:
                 continue
             current_list.append(path)
-        self.conf.set_list(self.conf_dir + "/paths/perms_fix_ignore",
-                           gconf.VALUE_STRING,
-                           current_list)
+        self.set_string_list(self.conf_dir + "/paths/perms_fix_ignore",
+                                  current_list)
     def get_perms_fix_ignore(self):
-        return self.conf.get_list(self.conf_dir + "/paths/perms_fix_ignore",
-                                  gconf.VALUE_STRING)
+        return self.get_string_list(self.conf_dir + "/paths/perms_fix_ignore")
 
 
     # Manager view connection list
     def add_conn(self, uri):
-        uris = self.conf.get_list(self.conf_dir + "/connections/uris",
-                                  gconf.VALUE_STRING)
+        uris = self.get_string_list(self.conf_dir + "/connections/uris")
         if uris == None:
             uris = []
 
         if uris.count(uri) == 0:
             uris.insert(len(uris) - 1, uri)
-            self.conf.set_list(self.conf_dir + "/connections/uris",
-                               gconf.VALUE_STRING, uris)
+            self.set_string_list(self.conf_dir + "/connections/uris",
+                                      uris)
     def remove_conn(self, uri):
-        uris = self.conf.get_list(self.conf_dir + "/connections/uris",
-                                  gconf.VALUE_STRING)
+        uris = self.get_string_list(self.conf_dir + "/connections/uris")
+
         if uris == None:
             return
 
         if uris.count(uri) != 0:
             uris.remove(uri)
-            self.conf.set_list(self.conf_dir + "/connections/uris",
-                               gconf.VALUE_STRING, uris)
+            self.set_string_list(self.conf_dir + "/connections/uris",
+                                      uris)
 
         if self.get_conn_autoconnect(uri):
-            uris = self.conf.get_list(self.conf_dir +
-                                      "/connections/autoconnect",
-                                      gconf.VALUE_STRING)
+            uris = self.get_string_list(self.conf_dir +
+                                             "/connections/autoconnect")
             uris.remove(uri)
-            self.conf.set_list(self.conf_dir + "/connections/autoconnect",
-                               gconf.VALUE_STRING, uris)
+            self.set_string_list(self.conf_dir + "/connections/autoconnect",
+                                      uris)
 
     def get_conn_uris(self):
-        return self.conf.get_list(self.conf_dir + "/connections/uris",
-                                  gconf.VALUE_STRING)
+        return self.get_string_list(self.conf_dir + "/connections/uris")
+
 
     # Manager default window size
     def get_manager_window_size(self):
@@ -631,13 +632,11 @@ class vmmConfig(object):
 
     # URI autoconnect
     def get_conn_autoconnect(self, uri):
-        uris = self.conf.get_list(self.conf_dir + "/connections/autoconnect",
-                                  gconf.VALUE_STRING)
+        uris = self.get_string_list(self.conf_dir + "/connections/autoconnect")
         return ((uris is not None) and (uri in uris))
 
     def set_conn_autoconnect(self, uri, val):
-        uris = self.conf.get_list(self.conf_dir + "/connections/autoconnect",
-                                  gconf.VALUE_STRING)
+        uris = self.get_string_list(self.conf_dir + "/connections/autoconnect")
         if uris is None:
             uris = []
         if not val and uri in uris:
@@ -645,8 +644,8 @@ class vmmConfig(object):
         elif val and uri not in uris:
             uris.append(uri)
 
-        self.conf.set_list(self.conf_dir + "/connections/autoconnect",
-                           gconf.VALUE_STRING, uris)
+        self.set_string_list(self.conf_dir + "/connections/autoconnect",
+                                  uris)
 
 
     # Default directory location dealings
diff --git a/src/virtManager/connect.py b/src/virtManager/connect.py
index d694477..cb8f799 100644
--- a/src/virtManager/connect.py
+++ b/src/virtManager/connect.py
@@ -21,7 +21,8 @@
 import logging
 import socket
 
-import gtk
+from gi.repository import GObject
+from gi.repository import Gtk
 
 import virtinst
 import dbus
@@ -50,20 +51,26 @@ def default_conn_user(conn):
 
 _hostname_xml = """
 <interface>
-               <object class="GtkComboBoxEntry" id="hostname">
+               <object class="GtkComboBoxText" id="hostname">
                  <property name="visible">True</property>
+                 <property name="has_entry">True</property>
                  <signal name="changed" handler="on_hostname_combo_changed"/>
                </object>
 </interface>
 """
 
 class vmmConnect(vmmGObjectUI):
+    __gsignals__ = {
+        "completed": (GObject.SignalFlags.RUN_FIRST, None, [str, bool]),
+        "cancelled": (GObject.SignalFlags.RUN_FIRST, None, []),
+    }
+
     def __init__(self):
         vmmGObjectUI.__init__(self,
                               "vmm-open-connection.ui",
                               "vmm-open-connection")
 
-        self.window.connect_signals({
+        self.get_window().connect_signals({
             "on_hypervisor_changed": self.hypervisor_changed,
             "on_connection_changed": self.conn_changed,
             "on_hostname_combo_changed": self.hostname_combo_changed,
@@ -79,9 +86,9 @@ class vmmConnect(vmmGObjectUI):
         self.browser_sigs = []
         self.can_browse = False
 
-        self.window.add_from_string(_hostname_xml)
+        self.get_window().add_from_string(_hostname_xml)
         self.widget("table1").attach(self.widget("hostname"),
-                                     1, 2, 4, 5, yoptions=gtk.FILL)
+                                     1, 2, 4, 5, yoptions=Gtk.AttachOptions.FILL)
 
         # Set this if we can't resolve 'hostname.local': means avahi
         # prob isn't configured correctly, and we should strip .local
@@ -127,18 +134,18 @@ class vmmConnect(vmmGObjectUI):
         pass
 
     def set_initial_state(self):
-        stock_img = gtk.image_new_from_stock(gtk.STOCK_CONNECT,
-                                             gtk.ICON_SIZE_BUTTON)
+        stock_img = Gtk.Image.new_from_stock(Gtk.STOCK_CONNECT,
+                                             Gtk.IconSize.BUTTON)
         self.widget("connect").set_image(stock_img)
         self.widget("connect").grab_default()
 
         # Hostname combo box entry
-        hostListModel = gtk.ListStore(str, str, str)
+        hostListModel = Gtk.ListStore(str, str, str)
         host = self.widget("hostname")
         host.set_model(hostListModel)
-        host.set_text_column(2)
-        hostListModel.set_sort_column_id(2, gtk.SORT_ASCENDING)
-        self.widget("hostname").child.connect("changed", self.hostname_changed)
+        host.set_entry_text_column(2)
+        hostListModel.set_sort_column_id(2, Gtk.SortType.ASCENDING)
+        self.widget("hostname").get_child().connect("changed", self.hostname_changed)
 
     def reset_state(self):
         self.set_default_hypervisor()
@@ -146,7 +153,7 @@ class vmmConnect(vmmGObjectUI):
         self.widget("autoconnect").set_sensitive(True)
         self.widget("autoconnect").set_active(True)
         self.widget("hostname").get_model().clear()
-        self.widget("hostname").child.set_text("")
+        self.widget("hostname").get_child().set_text("")
         self.widget("connect-remote").set_active(False)
         self.widget("username-entry").set_text("")
         self.stop_browse()
@@ -248,7 +255,7 @@ class vmmConnect(vmmGObjectUI):
 
     def hostname_combo_changed(self, src):
         model = src.get_model()
-        txt = src.child.get_text()
+        txt = src.get_child().get_text()
         row = None
 
         for currow in model:
@@ -265,7 +272,7 @@ class vmmConnect(vmmGObjectUI):
         if not entry:
             entry = ip
 
-        self.widget("hostname").child.set_text(entry)
+        self.widget("hostname").get_child().set_text(entry)
 
     def hostname_changed(self, src_ignore):
         self.populate_uri()
@@ -306,7 +313,7 @@ class vmmConnect(vmmGObjectUI):
     def generate_uri(self):
         hv = self.widget("hypervisor").get_active()
         conn = self.widget("connection").get_active()
-        host = self.widget("hostname").child.get_text()
+        host = self.widget("hostname").get_child().get_text()
         user = self.widget("username-entry").get_text()
         is_remote = self.is_remote()
 
@@ -343,7 +350,7 @@ class vmmConnect(vmmGObjectUI):
 
     def validate(self):
         is_remote = self.is_remote()
-        host = self.widget("hostname").child.get_text()
+        host = self.widget("hostname").get_child().get_text()
 
         if is_remote and not host:
             return self.err.val_err(_("A hostname is required for "
@@ -415,8 +422,3 @@ class vmmConnect(vmmGObjectUI):
                     self.can_resolve_hostname = True
 
         return host
-
-
-vmmGObjectUI.type_register(vmmConnect)
-vmmConnect.signal_new(vmmConnect, "completed", [str, bool])
-vmmConnect.signal_new(vmmConnect, "cancelled", [])
diff --git a/src/virtManager/connectauth.py b/src/virtManager/connectauth.py
index a44fb61..86e6d41 100644
--- a/src/virtManager/connectauth.py
+++ b/src/virtManager/connectauth.py
@@ -18,6 +18,8 @@
 # MA 02110-1301 USA.
 #
 
+from gi.repository import GObject
+
 import logging
 import os
 import time
@@ -93,7 +95,6 @@ def creds_dialog(creds):
     """
     Thread safe wrapper for libvirt openAuth user/pass callback
     """
-    import gobject
 
     retipc = []
 
@@ -105,7 +106,7 @@ def creds_dialog(creds):
             ret = -1
         retipc.append(ret)
 
-    gobject.idle_add(wrapper, creds_dialog_main, creds)
+    GObject.idle_add(wrapper, creds_dialog_main, creds)
 
     while not retipc:
         time.sleep(.1)
@@ -117,15 +118,15 @@ def creds_dialog_main(creds):
     """
     Libvirt openAuth callback for username/password credentials
     """
-    import gtk
+    from gi.repository import Gtk
 
-    dialog = gtk.Dialog("Authentication required", None, 0,
-                        (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
-                         gtk.STOCK_OK, gtk.RESPONSE_OK))
+    dialog = Gtk.Dialog("Authentication required", None, 0,
+                        (Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL,
+                         Gtk.STOCK_OK, Gtk.ResponseType.OK))
     label = []
     entry = []
 
-    box = gtk.Table(2, len(creds))
+    box = Gtk.Table(2, len(creds))
     box.set_border_width(6)
     box.set_row_spacings(6)
     box.set_col_spacings(12)
@@ -136,7 +137,7 @@ def creds_dialog_main(creds):
         if idx < len(entry) - 1:
             entry[idx + 1].grab_focus()
         else:
-            dialog.response(gtk.RESPONSE_OK)
+            dialog.response(Gtk.ResponseType.OK)
 
     row = 0
     for cred in creds:
@@ -146,21 +147,21 @@ def creds_dialog_main(creds):
             if not prompt.endswith(":"):
                 prompt += ":"
 
-            text_label = gtk.Label(prompt)
+            text_label = Gtk.Label(label=prompt)
             text_label.set_alignment(0.0, 0.5)
 
             label.append(text_label)
         else:
             return -1
 
-        ent = gtk.Entry()
+        ent = Gtk.Entry()
         if cred[0] == libvirt.VIR_CRED_PASSPHRASE:
             ent.set_visibility(False)
         ent.connect("activate", _on_ent_activate)
         entry.append(ent)
 
-        box.attach(label[row], 0, 1, row, row + 1, gtk.FILL, 0, 0, 0)
-        box.attach(entry[row], 1, 2, row, row + 1, gtk.FILL, 0, 0, 0)
+        box.attach(label[row], 0, 1, row, row + 1, Gtk.AttachOptions.FILL, 0, 0, 0)
+        box.attach(entry[row], 1, 2, row, row + 1, Gtk.AttachOptions.FILL, 0, 0, 0)
         row = row + 1
 
     vbox = dialog.get_child()
@@ -170,7 +171,7 @@ def creds_dialog_main(creds):
     res = dialog.run()
     dialog.hide()
 
-    if res == gtk.RESPONSE_OK:
+    if res == Gtk.ResponseType.OK:
         row = 0
         for cred in creds:
             cred[4] = entry[row].get_text()
diff --git a/src/virtManager/connection.py b/src/virtManager/connection.py
index fe96df2..5065922 100644
--- a/src/virtManager/connection.py
+++ b/src/virtManager/connection.py
@@ -18,6 +18,8 @@
 # MA 02110-1301 USA.
 #
 
+from gi.repository import GObject
+
 import logging
 import os
 import re
@@ -49,6 +51,29 @@ def _is_virtinst_test_uri(uri):
 
 
 class vmmConnection(vmmGObject):
+    __gsignals__ = {
+        "vm-added": (GObject.SignalFlags.RUN_FIRST, None, [str]),
+        "vm-removed": (GObject.SignalFlags.RUN_FIRST, None, [str]),
+        "net-added": (GObject.SignalFlags.RUN_FIRST, None, [str]),
+        "net-removed": (GObject.SignalFlags.RUN_FIRST, None, [str]),
+        "net-started": (GObject.SignalFlags.RUN_FIRST, None, [str]),
+        "net-stopped": (GObject.SignalFlags.RUN_FIRST, None, [str]),
+        "pool-added": (GObject.SignalFlags.RUN_FIRST, None, [str]),
+        "pool-removed": (GObject.SignalFlags.RUN_FIRST, None, [str]),
+        "pool-started": (GObject.SignalFlags.RUN_FIRST, None, [str]),
+        "pool-stopped": (GObject.SignalFlags.RUN_FIRST, None, [str]),
+        "interface-added": (GObject.SignalFlags.RUN_FIRST, None, [str]),
+        "interface-removed": (GObject.SignalFlags.RUN_FIRST, None, [str]),
+        "interface-started": (GObject.SignalFlags.RUN_FIRST, None, [str]),
+        "interface-stopped": (GObject.SignalFlags.RUN_FIRST, None, [str]),
+        "nodedev-added": (GObject.SignalFlags.RUN_FIRST, None, [str]),
+        "nodedev-removed": (GObject.SignalFlags.RUN_FIRST, None, [str]),
+        "mediadev-added": (GObject.SignalFlags.RUN_FIRST, None, [object]),
+        "mediadev-removed": (GObject.SignalFlags.RUN_FIRST, None, [str]),
+        "resources-sampled": (GObject.SignalFlags.RUN_FIRST, None, []),
+        "state-changed": (GObject.SignalFlags.RUN_FIRST, None, []),
+        "connect-error": (GObject.SignalFlags.RUN_FIRST, None, [str, str, bool]),
+    }
 
     STATE_DISCONNECTED = 0
     STATE_CONNECTING = 1
@@ -1574,32 +1599,3 @@ class vmmConnection(vmmGObject):
     def config_get_iso_paths(self):
         return self.config.get_perhost(self.get_uri(),
                                        self.config.get_iso_paths)
-
-vmmGObject.type_register(vmmConnection)
-vmmGObject.signal_new(vmmConnection, "vm-added", [str])
-vmmGObject.signal_new(vmmConnection, "vm-removed", [str])
-
-vmmGObject.signal_new(vmmConnection, "net-added", [str])
-vmmGObject.signal_new(vmmConnection, "net-removed", [str])
-vmmGObject.signal_new(vmmConnection, "net-started", [str])
-vmmGObject.signal_new(vmmConnection, "net-stopped", [str])
-
-vmmGObject.signal_new(vmmConnection, "pool-added", [str])
-vmmGObject.signal_new(vmmConnection, "pool-removed", [str])
-vmmGObject.signal_new(vmmConnection, "pool-started", [str])
-vmmGObject.signal_new(vmmConnection, "pool-stopped", [str])
-
-vmmGObject.signal_new(vmmConnection, "interface-added", [str])
-vmmGObject.signal_new(vmmConnection, "interface-removed", [str])
-vmmGObject.signal_new(vmmConnection, "interface-started", [str])
-vmmGObject.signal_new(vmmConnection, "interface-stopped", [str])
-
-vmmGObject.signal_new(vmmConnection, "nodedev-added", [str])
-vmmGObject.signal_new(vmmConnection, "nodedev-removed", [str])
-
-vmmGObject.signal_new(vmmConnection, "mediadev-added", [object])
-vmmGObject.signal_new(vmmConnection, "mediadev-removed", [str])
-
-vmmGObject.signal_new(vmmConnection, "resources-sampled", [])
-vmmGObject.signal_new(vmmConnection, "state-changed", [])
-vmmGObject.signal_new(vmmConnection, "connect-error", [str, str, bool])
diff --git a/src/virtManager/console.py b/src/virtManager/console.py
index 278db2a..1fc2b44 100644
--- a/src/virtManager/console.py
+++ b/src/virtManager/console.py
@@ -20,24 +20,20 @@
 # MA 02110-1301 USA.
 #
 
-import gtk
-import gobject
+from gi.repository import GObject
+from gi.repository import Gtk
+from gi.repository import Gdk
+from gi.repository import GtkVnc
+from gi.repository import SpiceClientGtk
+from gi.repository import SpiceClientGLib
 
 import libvirt
 
-import gtkvnc
-
-try:
-    import SpiceClientGtk as spice
-except:
-    spice = None
-
 import os
 import signal
 import socket
 import logging
 
-import virtManager.util as util
 import virtManager.uihelpers as uihelpers
 from virtManager.autodrawer import AutoDrawer
 from virtManager.baseclass import vmmGObjectUI, vmmGObject
@@ -262,45 +258,14 @@ class Viewer(vmmGObject):
         return self.display.get_pixbuf()
 
     def get_grab_keys(self):
-        keystr = None
-        try:
-            keys = self.display.get_grab_keys()
-            for k in keys:
-                if keystr is None:
-                    keystr = gtk.gdk.keyval_name(k)
-                else:
-                    keystr = keystr + "+" + gtk.gdk.keyval_name(k)
-        except:
-            pass
+        raise NotImplementedError()
 
-        return keystr
+    def set_grab_keys(self):
+        raise NotImplementedError()
 
     def send_keys(self, keys):
         return self.display.send_keys(keys)
 
-    def set_grab_keys(self):
-        try:
-            keys = self.config.get_keys_combination()
-            if not keys:
-                return
-
-            if not hasattr(self.display, "set_grab_keys"):
-                logging.debug("Display class doesn't support custom grab "
-                              "combination.")
-                return
-
-            try:
-                keys = map(int, keys.split(','))
-            except:
-                logging.debug("Error in grab_keys configuration in GConf",
-                              exc_info=True)
-                return
-
-            self.display.set_grab_keys(keys)
-        except Exception, e:
-            logging.debug("Error when getting the grab keys combination: %s",
-                          str(e))
-
     def open_host(self, ginfo, password=None):
         raise NotImplementedError()
 
@@ -313,7 +278,7 @@ class Viewer(vmmGObject):
 class VNCViewer(Viewer):
     def __init__(self, console):
         Viewer.__init__(self, console)
-        self.display = gtkvnc.Display()
+        self.display = GtkVnc.Display.new()
         self.sockfd = None
 
         # Last noticed desktop resolution
@@ -348,18 +313,40 @@ class VNCViewer(Viewer):
 
         self.display.show()
 
+    def get_grab_keys(self):
+        return self.display.get_grab_keys().as_string()
+
+    def set_grab_keys(self):
+        try:
+            keys = self.config.get_keys_combination()
+            if not keys:
+                return
+
+            try:
+                keys = map(int, keys.split(','))
+            except:
+                logging.debug("Error in grab_keys configuration in GConf",
+                              exc_info=True)
+                return
+
+            seq = GtkVnc.GrabSequence.new(keys)
+            self.display.set_grab_keys(seq)
+        except Exception, e:
+            logging.debug("Error when getting the grab keys combination: %s",
+                          str(e))
+
     def _desktop_resize(self, src_ignore, w, h):
         self.desktop_resolution = (w, h)
-        self.console.window.get_object("console-vnc-scroll").queue_resize()
+        self.console.get_window().get_object("console-vnc-scroll").queue_resize()
 
     def get_desktop_resolution(self):
         return self.desktop_resolution
 
     def _auth_credential(self, src_ignore, credList):
         for cred in credList:
-            if cred in [gtkvnc.CREDENTIAL_PASSWORD,
-                        gtkvnc.CREDENTIAL_USERNAME,
-                        gtkvnc.CREDENTIAL_CLIENTNAME]:
+            if cred in [GtkVnc.DisplayCredential.PASSWORD,
+                        GtkVnc.DisplayCredential.USERNAME,
+                        GtkVnc.DisplayCredential.CLIENTNAME]:
                 continue
 
             self.console.err.show_err(
@@ -381,11 +368,11 @@ class VNCViewer(Viewer):
         withPassword = False
         for cred in credList:
             logging.debug("Got credential request %s", cred)
-            if cred == gtkvnc.CREDENTIAL_PASSWORD:
+            if cred == GtkVnc.DisplayCredential.PASSWORD:
                 withPassword = True
-            elif cred == gtkvnc.CREDENTIAL_USERNAME:
+            elif cred == GtkVnc.DisplayCredential.USERNAME:
                 withUsername = True
-            elif cred == gtkvnc.CREDENTIAL_CLIENTNAME:
+            elif cred == GtkVnc.DisplayCredential.CLIENTNAME:
                 self.display.set_credential(cred, "libvirt-vnc")
 
         if withUsername or withPassword:
@@ -436,10 +423,10 @@ class VNCViewer(Viewer):
         self.display.open_fd(fd)
 
     def set_credential_username(self, cred):
-        self.display.set_credential(gtkvnc.CREDENTIAL_USERNAME, cred)
+        self.display.set_credential(GtkVnc.DisplayCredential.USERNAME, cred)
 
     def set_credential_password(self, cred):
-        self.display.set_credential(gtkvnc.CREDENTIAL_PASSWORD, cred)
+        self.display.set_credential(GtkVnc.DisplayCredential.PASSWORD, cred)
 
 
 class SpiceViewer(Viewer):
@@ -465,6 +452,28 @@ class SpiceViewer(Viewer):
 
         self.display.show()
 
+    def get_grab_keys(self):
+        return self.display.get_grab_keys().as_string()
+
+    def set_grab_keys(self):
+        try:
+            keys = self.config.get_keys_combination()
+            if not keys:
+                return
+
+            try:
+                keys = map(int, keys.split(','))
+            except:
+                logging.debug("Error in grab_keys configuration in GConf",
+                              exc_info=True)
+                return
+
+            seq = SpiceClientGtk.GrabSequence.new(keys)
+            self.display.set_grab_keys(seq)
+        except Exception, e:
+            logging.debug("Error when getting the grab keys combination: %s",
+                          str(e))
+
     def close(self):
         if self.spice_session is not None:
             self.spice_session.disconnect()
@@ -479,10 +488,10 @@ class SpiceViewer(Viewer):
         return self.spice_session != None
 
     def _main_channel_event_cb(self, channel, event):
-        if event == spice.CHANNEL_CLOSED:
+        if event == SpiceClientGLib.ChannelEvent.CLOSED:
             if self.console:
                 self.console.disconnected()
-        elif event == spice.CHANNEL_ERROR_AUTH:
+        elif event == SpiceClientGLib.ChannelEvent.ERROR_AUTH:
             if self.console:
                 self.console.activate_auth_page()
 
@@ -495,14 +504,14 @@ class SpiceViewer(Viewer):
         channel.open_fd(fd)
 
     def _channel_new_cb(self, session, channel):
-        gobject.GObject.connect(channel, "open-fd",
+        GObject.GObject.connect(channel, "open-fd",
                                 self._channel_open_fd_request)
 
-        if type(channel) == spice.MainChannel:
+        if type(channel) == SpiceClientGLib.MainChannel:
             channel.connect_after("channel-event", self._main_channel_event_cb)
             return
 
-        if type(channel) == spice.DisplayChannel:
+        if type(channel) == SpiceClientGLib.DisplayChannel:
             channel_id = channel.get_property("channel-id")
 
             if channel_id != 0:
@@ -510,15 +519,15 @@ class SpiceViewer(Viewer):
                 return
 
             self.display_channel = channel
-            self.display = spice.Display(self.spice_session, channel_id)
-            self.console.window.get_object("console-vnc-viewport").add(self.display)
+            self.display = SpiceClientGtk.Display.new(self.spice_session, channel_id)
+            self.console.get_window().get_object("console-vnc-viewport").add(self.display)
             self._init_widget()
             self.console.connected()
             return
 
-        if (type(channel) in [spice.PlaybackChannel, spice.RecordChannel] and
+        if (type(channel) in [SpiceClientGLib.PlaybackChannel, SpiceClientGLib.RecordChannel] and
             not self.audio):
-            self.audio = spice.Audio(self.spice_session)
+            self.audio = SpiceClientGLib.Audio(self.spice_session)
             return
 
     def get_desktop_resolution(self):
@@ -534,19 +543,19 @@ class SpiceViewer(Viewer):
         uri += str(host) + "?port=" + str(port)
         logging.debug("spice uri: %s", uri)
 
-        self.spice_session = spice.Session()
+        self.spice_session = SpiceClientGLib.Session()
         self.spice_session.set_property("uri", uri)
         if password:
             self.spice_session.set_property("password", password)
-        gobject.GObject.connect(self.spice_session, "channel-new",
+        GObject.GObject.connect(self.spice_session, "channel-new",
                                 self._channel_new_cb)
         self.spice_session.connect()
 
     def open_fd(self, fd, password=None):
-        self.spice_session = spice.Session()
+        self.spice_session = SpiceClientGLib.Session()
         if password:
             self.spice_session.set_property("password", password)
-        gobject.GObject.connect(self.spice_session, "channel-new",
+        GObject.GObject.connect(self.spice_session, "channel-new",
                                 self._channel_new_cb)
         self.spice_session.open_fd(fd)
 
@@ -571,14 +580,14 @@ class SpiceViewer(Viewer):
 
 
 class vmmConsolePages(vmmGObjectUI):
-    def __init__(self, vm, window):
+    def __init__(self, vm, window, topwin):
         vmmGObjectUI.__init__(self, None, None)
 
         self.vm = vm
 
         self.windowname = "vmm-details"
         self.window = window
-        self.topwin = self.widget(self.windowname)
+        self.topwin = topwin
         self.err = vmmErrorDialog(self.topwin)
 
         self.pointer_is_grabbed = False
@@ -586,7 +595,7 @@ class vmmConsolePages(vmmGObjectUI):
         self.vm.connect("config-changed", self.change_title)
 
         # State for disabling modifiers when keyboard is grabbed
-        self.accel_groups = gtk.accel_groups_from_object(self.topwin)
+        self.accel_groups = Gtk.accel_groups_from_object(self.topwin)
         self.gtk_settings_accel = None
         self.gtk_settings_mnemonic = None
 
@@ -606,13 +615,13 @@ class vmmConsolePages(vmmGObjectUI):
         self.keycombo_menu = uihelpers.build_keycombo_menu(self.send_key)
         self.init_fs_toolbar()
 
-        finish_img = gtk.image_new_from_stock(gtk.STOCK_YES,
-                                              gtk.ICON_SIZE_BUTTON)
+        finish_img = Gtk.Image.new_from_stock(Gtk.STOCK_YES,
+                                              Gtk.IconSize.BUTTON)
         self.widget("console-auth-login").set_image(finish_img)
 
         # Make viewer widget background always be black
-        black = gtk.gdk.Color(0, 0, 0)
-        self.widget("console-vnc-viewport").modify_bg(gtk.STATE_NORMAL,
+        black = Gdk.Color(0, 0, 0)
+        self.widget("console-vnc-viewport").modify_bg(Gtk.StateType.NORMAL,
                                                       black)
 
         # Signals are added by vmmDetails. Don't use connect_signals here
@@ -631,9 +640,7 @@ class vmmConsolePages(vmmGObjectUI):
         self.page_changed()
 
     def is_visible(self):
-        if self.topwin.flags() & gtk.VISIBLE:
-            return 1
-        return 0
+        return self.topwin.get_visible()
 
     def _cleanup(self):
         self.vm = None
@@ -658,14 +665,14 @@ class vmmConsolePages(vmmGObjectUI):
         pages = self.widget("console-pages")
         pages.remove(scroll)
 
-        self.fs_toolbar = gtk.Toolbar()
+        self.fs_toolbar = Gtk.Toolbar()
         self.fs_toolbar.set_show_arrow(False)
         self.fs_toolbar.set_no_show_all(True)
-        self.fs_toolbar.set_style(gtk.TOOLBAR_BOTH_HORIZ)
+        self.fs_toolbar.set_style(Gtk.ToolbarStyle.BOTH_HORIZ)
 
         # Exit fullscreen button
-        button = gtk.ToolButton(gtk.STOCK_LEAVE_FULLSCREEN)
-        util.tooltip_wrapper(button, _("Leave fullscreen"))
+        button = Gtk.ToolButton.new_from_stock(Gtk.STOCK_LEAVE_FULLSCREEN)
+        button.set_tooltip_text(_("Leave fullscreen"))
         button.show()
         self.fs_toolbar.add(button)
         button.connect("clicked", self.leave_fullscreen)
@@ -674,19 +681,19 @@ class vmmConsolePages(vmmGObjectUI):
             ignore = src
             def menu_location(menu, toolbar):
                 ignore = menu
-                x, y = toolbar.window.get_origin()
-                ignore, height = toolbar.window.get_size()
+                x, y = toolbar.get_window().get_origin()
+                ignore, height = toolbar.get_window().get_size()
 
                 return x, y + height, True
 
             self.keycombo_menu.popup(None, None, menu_location, 0,
-                                     gtk.get_current_event_time(),
+                                     Gtk.get_current_event_time(),
                                      self.fs_toolbar)
 
-        self.send_key_button = gtk.ToolButton()
+        self.send_key_button = Gtk.ToolButton()
         self.send_key_button.set_icon_name(
                                 "preferences-desktop-keyboard-shortcuts")
-        util.tooltip_wrapper(self.send_key_button, _("Send key combination"))
+        self.send_key_button.set_tooltip_text(_("Send key combination"))
         self.send_key_button.show_all()
         self.send_key_button.connect("clicked", keycombo_menu_clicked)
         self.fs_toolbar.add(self.send_key_button)
@@ -714,17 +721,6 @@ class vmmConsolePages(vmmGObjectUI):
 
         self.topwin.set_title(title)
 
-    def grab_keyboard(self, do_grab):
-        if self.viewer and not self.viewer.need_keygrab:
-            return
-
-        if (not do_grab or
-            not self.viewer or
-            not self.viewer.display):
-            gtk.gdk.keyboard_ungrab()
-        else:
-            gtk.gdk.keyboard_grab(self.viewer.display.window)
-
     def viewer_focus_changed(self, ignore1=None, ignore2=None):
         has_focus = (self.viewer and
                      self.viewer.display and
@@ -738,8 +734,6 @@ class vmmConsolePages(vmmGObjectUI):
         else:
             self._enable_modifiers()
 
-        self.grab_keyboard(has_focus)
-
     def pointer_grabbed(self, src_ignore):
         self.pointer_is_grabbed = True
         self.change_title()
@@ -755,7 +749,7 @@ class vmmConsolePages(vmmGObjectUI):
         for g in self.accel_groups:
             self.topwin.remove_accel_group(g)
 
-        settings = gtk.settings_get_default()
+        settings = Gtk.Settings.get_default()
         self.gtk_settings_accel = settings.get_property('gtk-menu-bar-accel')
         settings.set_property('gtk-menu-bar-accel', None)
 
@@ -768,7 +762,7 @@ class vmmConsolePages(vmmGObjectUI):
         if self.gtk_settings_accel is None:
             return
 
-        settings = gtk.settings_get_default()
+        settings = Gtk.Settings.get_default()
         settings.set_property('gtk-menu-bar-accel', self.gtk_settings_accel)
         self.gtk_settings_accel = None
 
@@ -1157,10 +1151,10 @@ class vmmConsolePages(vmmGObjectUI):
 
     def set_credentials(self, src_ignore=None):
         passwd = self.widget("console-auth-password")
-        if passwd.flags() & gtk.VISIBLE:
+        if passwd.get_visible():
             self.viewer.set_credential_password(passwd.get_text())
         username = self.widget("console-auth-username")
-        if username.flags() & gtk.VISIBLE:
+        if username.get_visible():
             self.viewer.set_credential_username(username.get_text())
 
         if self.widget("console-auth-remember").get_active():
@@ -1180,11 +1174,11 @@ class vmmConsolePages(vmmGObjectUI):
             is_scale = self.viewer.get_scaling()
 
             if is_scale:
-                w_policy = gtk.POLICY_NEVER
-                h_policy = gtk.POLICY_NEVER
+                w_policy = Gtk.PolicyType.NEVER
+                h_policy = Gtk.PolicyType.NEVER
             else:
-                w_policy = gtk.POLICY_AUTOMATIC
-                h_policy = gtk.POLICY_AUTOMATIC
+                w_policy = Gtk.PolicyType.AUTOMATIC
+                h_policy = Gtk.PolicyType.AUTOMATIC
 
             src.set_policy(w_policy, h_policy)
             return False
@@ -1206,7 +1200,7 @@ class vmmConsolePages(vmmGObjectUI):
 
         # Disable scroll bars while we resize, since resizing to the VM's
         # dimensions can erroneously show scroll bars when they aren't needed
-        widget.set_policy(gtk.POLICY_NEVER, gtk.POLICY_NEVER)
+        widget.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.NEVER)
 
         signal_id = widget.connect("size-request", request_cb)
         signal_holder.append(signal_id)
@@ -1232,12 +1226,12 @@ class vmmConsolePages(vmmGObjectUI):
         if not is_scale:
             # Scaling disabled is easy, just force the VNC widget size. Since
             # we are inside a scrollwindow, it shouldn't cause issues.
-            scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
+            scroll.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)
             self.viewer.display.set_size_request(desktop_w, desktop_h)
             return
 
         # Make sure we never show scrollbars when scaling
-        scroll.set_policy(gtk.POLICY_NEVER, gtk.POLICY_NEVER)
+        scroll.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.NEVER)
 
         # Make sure there is no hard size requirement so we can scale down
         self.viewer.display.set_size_request(-1, -1)
@@ -1253,11 +1247,10 @@ class vmmConsolePages(vmmGObjectUI):
             desktop_h = int(req.width / desktop_ratio)
             dy = (req.height - desktop_h) / 2
 
-        viewer_alloc = gtk.gdk.Rectangle(x=dx,
-                                         y=dy,
-                                         width=desktop_w,
-                                         height=desktop_h)
-
-        self.viewer.display.size_allocate(viewer_alloc)
+        # XXX
+        #@    viewer_alloc = (x=dx,
+        #                             y=dy,
+        #                             width=desktop_w,
+        #                             height=desktop_h)
 
-vmmGObjectUI.type_register(vmmConsolePages)
+        #self.viewer.display.size_allocate(viewer_alloc)
diff --git a/src/virtManager/create.py b/src/virtManager/create.py
index 0584974..05882f4 100644
--- a/src/virtManager/create.py
+++ b/src/virtManager/create.py
@@ -21,7 +21,9 @@
 import threading
 import logging
 
-import gtk
+from gi.repository import GObject
+from gi.repository import Gtk
+from gi.repository import Gdk
 
 import virtinst
 
@@ -59,21 +61,29 @@ RHEL6_OS_SUPPORT = [
 
 _comboentry_xml = """
 <interface>
-    <object class="GtkComboBoxEntry" id="install-local-box">
+    <object class="GtkComboBoxText" id="install-local-box">
         <property name="visible">True</property>
+        <property name="has_entry">True</property>
         <signal name="changed" handler="on_install_local_box_changed"/>
     </object>
-    <object class="GtkComboBoxEntry" id="install-url-box">
+    <object class="GtkComboBoxText" id="install-url-box">
         <property name="visible">True</property>
+        <property name="has_entry">True</property>
         <signal name="changed" handler="on_install_url_box_changed"/>
     </object>
-    <object class="GtkComboBoxEntry" id="install-ks-box">
+    <object class="GtkComboBoxText" id="install-ks-box">
         <property name="visible">True</property>
+        <property name="has_entry">True</property>
     </object>
 </interface>
 """
 
 class vmmCreate(vmmGObjectUI):
+    __gsignals__ = {
+        "action-show-vm": (GObject.SignalFlags.RUN_FIRST, None, [str, str]),
+        "action-show-help": (GObject.SignalFlags.RUN_FIRST, None, [str]),
+    }
+
     def __init__(self, engine):
         vmmGObjectUI.__init__(self, "vmm-create.ui", "vmm-create")
         self.engine = engine
@@ -109,14 +119,14 @@ class vmmCreate(vmmGObjectUI):
         self.config_window = None
         self.config_window_signals = []
 
-        self.window.add_from_string(_comboentry_xml)
+        self.get_window().add_from_string(_comboentry_xml)
         self.widget("table2").attach(self.widget("install-url-box"),
                                      1, 2, 0, 1)
         self.widget("table7").attach(self.widget("install-ks-box"),
                                      1, 2, 0, 1)
         self.widget("alignment8").add(self.widget("install-local-box"))
 
-        self.window.connect_signals({
+        self.get_window().connect_signals({
             "on_vmm_newcreate_delete_event" : self.close,
 
             "on_create_cancel_clicked": self.close,
@@ -161,9 +171,7 @@ class vmmCreate(vmmGObjectUI):
         self.set_initial_state()
 
     def is_visible(self):
-        if self.topwin.flags() & gtk.VISIBLE:
-            return True
-        return False
+        return self.topwin.get_visible()
 
     def show(self, parent, uri=None):
         logging.debug("Showing new vm wizard")
@@ -206,7 +214,7 @@ class vmmCreate(vmmGObjectUI):
     def remove_timers(self):
         try:
             if self.host_storage_timer:
-                self.remove_gobject_timeout(self.host_storage_timer)
+                self.remove_GObject.timeout(self.host_storage_timer)
                 self.host_storage_timer = None
         except:
             pass
@@ -251,50 +259,50 @@ class vmmCreate(vmmGObjectUI):
 
         # FIXME: Unhide this when we make some documentation
         self.widget("create-help").hide()
-        finish_img = gtk.image_new_from_stock(gtk.STOCK_QUIT,
-                                              gtk.ICON_SIZE_BUTTON)
+        finish_img = Gtk.Image.new_from_stock(Gtk.STOCK_QUIT,
+                                              Gtk.IconSize.BUTTON)
         self.widget("create-finish").set_image(finish_img)
 
-        blue = gtk.gdk.color_parse("#0072A8")
-        self.widget("create-header").modify_bg(gtk.STATE_NORMAL,
+        blue = Gdk.Color.parse("#0072A8")[1]
+        self.widget("create-header").modify_bg(Gtk.StateType.NORMAL,
                                                           blue)
 
         box = self.widget("create-vm-icon-box")
-        image = gtk.image_new_from_icon_name("vm_new_wizard",
-                                             gtk.ICON_SIZE_DIALOG)
+        image = Gtk.Image.new_from_icon_name("vm_new_wizard",
+                                             Gtk.IconSize.DIALOG)
         image.show()
-        box.pack_end(image, False)
+        box.pack_end(image, False, False, False)
 
         # Connection list
         self.widget("create-conn-label").set_text("")
         self.widget("startup-error").set_text("")
         conn_list = self.widget("create-conn")
-        conn_model = gtk.ListStore(str, str)
+        conn_model = Gtk.ListStore(str, str)
         conn_list.set_model(conn_model)
-        text = gtk.CellRendererText()
+        text = Gtk.CellRendererText()
         conn_list.pack_start(text, True)
         conn_list.add_attribute(text, 'text', 1)
 
         # ISO media list
         iso_list = self.widget("install-local-box")
-        iso_model = gtk.ListStore(str)
+        iso_model = Gtk.ListStore(str)
         iso_list.set_model(iso_model)
-        iso_list.set_text_column(0)
-        self.widget("install-local-box").child.connect("activate",
+        iso_list.set_entry_text_column(0)
+        self.widget("install-local-box").get_child().connect("activate",
                                                     self.detect_media_os)
 
         # Lists for the install urls
         media_url_list = self.widget("install-url-box")
-        media_url_model = gtk.ListStore(str)
+        media_url_model = Gtk.ListStore(str)
         media_url_list.set_model(media_url_model)
-        media_url_list.set_text_column(0)
-        self.widget("install-url-box").child.connect("activate",
+        media_url_list.set_entry_text_column(0)
+        self.widget("install-url-box").get_child().connect("activate",
                                                     self.detect_media_os)
 
         ks_url_list = self.widget("install-ks-box")
-        ks_url_model = gtk.ListStore(str)
+        ks_url_model = Gtk.ListStore(str)
         ks_url_list.set_model(ks_url_model)
-        ks_url_list.set_text_column(0)
+        ks_url_list.set_entry_text_column(0)
 
         def sep_func(model, it, combo):
             ignore = combo
@@ -303,17 +311,17 @@ class vmmCreate(vmmGObjectUI):
         # Lists for distro type + variant
         # [os value, os label, is seperator, is 'show all'
         os_type_list = self.widget("install-os-type")
-        os_type_model = gtk.ListStore(str, str, bool, bool)
+        os_type_model = Gtk.ListStore(str, str, bool, bool)
         os_type_list.set_model(os_type_model)
-        text = gtk.CellRendererText()
+        text = Gtk.CellRendererText()
         os_type_list.pack_start(text, True)
         os_type_list.add_attribute(text, 'text', 1)
         os_type_list.set_row_separator_func(sep_func, os_type_list)
 
         os_variant_list = self.widget("install-os-version")
-        os_variant_model = gtk.ListStore(str, str, bool, bool)
+        os_variant_model = Gtk.ListStore(str, str, bool, bool)
         os_variant_list.set_model(os_variant_model)
-        text = gtk.CellRendererText()
+        text = Gtk.CellRendererText()
         os_variant_list.pack_start(text, True)
         os_variant_list.add_attribute(text, 'text', 1)
         os_variant_list.set_row_separator_func(sep_func, os_variant_list)
@@ -330,16 +338,16 @@ class vmmCreate(vmmGObjectUI):
         uihelpers.init_network_list(net_list, bridge_box)
 
         # Archtecture
-        archModel = gtk.ListStore(str)
+        archModel = Gtk.ListStore(str)
         archList = self.widget("config-arch")
-        text = gtk.CellRendererText()
+        text = Gtk.CellRendererText()
         archList.pack_start(text, True)
         archList.add_attribute(text, 'text', 0)
         archList.set_model(archModel)
 
-        hyperModel = gtk.ListStore(str, str, str, bool)
+        hyperModel = Gtk.ListStore(str, str, str, bool)
         hyperList = self.widget("config-hv")
-        text = gtk.CellRendererText()
+        text = Gtk.CellRendererText()
         hyperList.pack_start(text, True)
         hyperList.add_attribute(text, 'text', 0)
         hyperList.add_attribute(text, 'sensitive', 3)
@@ -386,14 +394,14 @@ class vmmCreate(vmmGObjectUI):
         self.populate_os_type_model()
         self.widget("install-os-type").set_active(0)
 
-        self.widget("install-local-box").child.set_text("")
+        self.widget("install-local-box").get_child().set_text("")
         iso_model = self.widget("install-local-box").get_model()
         self.populate_media_model(iso_model, self.conn.config_get_iso_paths())
 
         # Install URL
         self.widget("install-urlopts-entry").set_text("")
-        self.widget("install-ks-box").child.set_text("")
-        self.widget("install-url-box").child.set_text("")
+        self.widget("install-ks-box").get_child().set_text("")
+        self.widget("install-url-box").get_child().set_text("")
         self.widget("install-url-options").set_expanded(False)
         urlmodel = self.widget("install-url-box").get_model()
         ksmodel  = self.widget("install-ks-box").get_model()
@@ -531,10 +539,10 @@ class vmmCreate(vmmGObjectUI):
                     _("No install methods available for this connection."),
                     hideinstall=False)
 
-        util.tooltip_wrapper(method_tree, tree_tt)
-        util.tooltip_wrapper(method_local, local_tt)
-        util.tooltip_wrapper(method_pxe, pxe_tt)
-        util.tooltip_wrapper(method_import, import_tt)
+        method_tree.set_tooltip_text(tree_tt or "")
+        method_local.set_tooltip_text(local_tt or "")
+        method_pxe.set_tooltip_text(pxe_tt or "")
+        method_import.set_tooltip_text(import_tt or "")
 
         # Container install options
         method_container_app.set_active(True)
@@ -556,7 +564,7 @@ class vmmCreate(vmmGObjectUI):
         if self.conn.mediadev_error:
             cdrom_warn.show()
             cdrom_option.set_sensitive(False)
-            util.tooltip_wrapper(cdrom_warn, self.conn.mediadev_error)
+            cdrom_warn.set_tooltip_text(self.conn.mediadev_error)
         else:
             cdrom_warn.hide()
 
@@ -594,7 +602,7 @@ class vmmCreate(vmmGObjectUI):
                            max_v)
         else:
             cpu_tooltip = None
-        util.tooltip_wrapper(self.widget("config-cpus"), cpu_tooltip)
+        self.widget("config-cpus").set_tooltip_text(cpu_tooltip or "")
 
         cmax = int(cmax)
         if cmax <= 0:
@@ -617,7 +625,7 @@ class vmmCreate(vmmGObjectUI):
             storage_tooltip = _("Connection does not support storage"
                                 " management.")
             use_storage.set_sensitive(True)
-        util.tooltip_wrapper(storage_area, storage_tooltip)
+        storage_area.set_tooltip_text(storage_tooltip or "")
 
         # Networking
         net_list        = self.widget("config-netdev")
@@ -649,7 +657,7 @@ class vmmCreate(vmmGObjectUI):
         if do_tooltip:
             net_warn_icon.set_property("visible", show_warn)
             if msg:
-                util.tooltip_wrapper(net_warn_icon, show_warn and msg or "")
+                net_warn_icon.set_tooltip_text(show_warn and msg or "")
         else:
             net_warn_box.set_property("visible", show_warn)
             markup = show_warn and ("<small>%s</small>" % msg) or ""
@@ -695,7 +703,7 @@ class vmmCreate(vmmGObjectUI):
         hv_info = self.widget("config-hv-info")
         if tooltip:
             hv_info.show()
-            util.tooltip_wrapper(hv_info, tooltip)
+            hv_info.set_tooltip_text(tooltip)
         else:
             hv_info.hide()
 
@@ -825,8 +833,9 @@ class vmmCreate(vmmGObjectUI):
 
     def populate_media_model(self, model, urls):
         model.clear()
-        for url in urls:
-            model.append([url])
+        if urls is not None:
+            for url in urls:
+                model.append([url])
 
 
     def change_caps(self, gtype=None, dtype=None, arch=None):
@@ -962,13 +971,14 @@ class vmmCreate(vmmGObjectUI):
             variant = row[0]
             vlabel = row[1]
 
-        return (distro, variant, dlabel, vlabel)
+        print str((distro, variant, dlabel, vlabel))
+        return (str(distro), str(variant), str(dlabel), str(vlabel))
 
     def get_config_local_media(self, store_media=False):
         if self.widget("install-local-cdrom").get_active():
             return self.widget("install-local-cdrom-combo").get_active_text()
         else:
-            ret = self.widget("install-local-box").child.get_text()
+            ret = self.widget("install-local-box").get_child().get_text()
             if ret and store_media:
                 self.conn.config_add_iso_path(ret)
             return ret
@@ -1138,8 +1148,8 @@ class vmmCreate(vmmGObjectUI):
         # If the url_entry has focus, don't fire detect_media_os, it means
         # the user is probably typing
         self.mediaDetected = False
-        if (self.widget("install-url-box").child.flags() &
-            gtk.HAS_FOCUS):
+        if (self.widget("install-url-box").get_child().flags() &
+            Gtk.HAS_FOCUS):
             return
         self.detect_media_os()
 
@@ -1263,7 +1273,7 @@ class vmmCreate(vmmGObjectUI):
 
     def browse_iso(self, ignore1=None, ignore2=None):
         def set_path(ignore, path):
-            self.widget("install-local-box").child.set_text(path)
+            self.widget("install-local-box").get_child().set_text(path)
         self._browse_file(set_path, is_media=True)
         self.widget("install-local-box").activate()
 
@@ -1851,7 +1861,7 @@ class vmmCreate(vmmGObjectUI):
         # Start the install
         self.failed_guest = None
         self.topwin.set_sensitive(False)
-        self.topwin.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))
+        self.topwin.get_window().set_cursor(Gdk.Cursor.new(Gdk.CursorType.WATCH))
 
         def start_install():
             if not self.get_config_customize():
@@ -1864,7 +1874,7 @@ class vmmCreate(vmmGObjectUI):
 
     def _undo_finish(self, ignore=None):
         self.topwin.set_sensitive(True)
-        self.topwin.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.TOP_LEFT_ARROW))
+        self.topwin.get_window().set_cursor(Gdk.Cursor.new(Gdk.CursorType.TOP_LEFT_ARROW))
 
     def _check_start_error(self, cb, *args, **kwargs):
         try:
@@ -1918,7 +1928,7 @@ class vmmCreate(vmmGObjectUI):
         error, details = progWin.run()
 
         self.topwin.set_sensitive(True)
-        self.topwin.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.TOP_LEFT_ARROW))
+        self.topwin.get_window().set_cursor(Gdk.Cursor.new(Gdk.CursorType.TOP_LEFT_ARROW))
 
         if error:
             error = (_("Unable to complete install: '%s'") % error)
@@ -2149,7 +2159,3 @@ class vmmCreate(vmmGObjectUI):
     def show_help(self, ignore):
         # No help available yet.
         pass
-
-vmmGObjectUI.type_register(vmmCreate)
-vmmCreate.signal_new(vmmCreate, "action-show-vm", [str, str])
-vmmCreate.signal_new(vmmCreate, "action-show-help", [str])
diff --git a/src/virtManager/createinterface.py b/src/virtManager/createinterface.py
index 6620a40..996d9ca 100644
--- a/src/virtManager/createinterface.py
+++ b/src/virtManager/createinterface.py
@@ -18,7 +18,9 @@
 # MA 02110-1301 USA.
 #
 
-import gtk
+from gi.repository import GObject
+from gi.repository import Gtk
+from gi.repository import Gdk
 
 import logging
 
@@ -56,6 +58,10 @@ IP_STATIC = 1
 IP_NONE = 2
 
 class vmmCreateInterface(vmmGObjectUI):
+    __gsignals__ = {
+        "action-show-help": (GObject.SignalFlags.RUN_FIRST, None, [str])
+    }
+
     def __init__(self, conn):
         vmmGObjectUI.__init__(self,
                               "vmm-create-interface.ui",
@@ -74,7 +80,7 @@ class vmmCreateInterface(vmmGObjectUI):
 
         self.ip_manually_changed = False
 
-        self.window.connect_signals({
+        self.get_window().connect_signals({
             "on_vmm_create_interface_delete_event" : self.close,
 
             "on_cancel_clicked": self.close,
@@ -169,24 +175,24 @@ class vmmCreateInterface(vmmGObjectUI):
 
         # FIXME: Unhide this when we make some documentation
         self.widget("help").hide()
-        finish_img = gtk.image_new_from_stock(gtk.STOCK_QUIT,
-                                              gtk.ICON_SIZE_BUTTON)
+        finish_img = Gtk.Image.new_from_stock(Gtk.STOCK_QUIT,
+                                              Gtk.IconSize.BUTTON)
         self.widget("finish").set_image(finish_img)
 
-        blue = gtk.gdk.color_parse("#0072A8")
-        self.widget("header").modify_bg(gtk.STATE_NORMAL, blue)
+        blue = Gdk.Color.parse("#0072A8")[1]
+        self.widget("header").modify_bg(Gtk.StateType.NORMAL, blue)
 
         box = self.widget("header-icon-box")
-        image = gtk.image_new_from_icon_name("network-idle",
-                                             gtk.ICON_SIZE_DIALOG)
+        image = Gtk.Image.new_from_icon_name("network-idle",
+                                             Gtk.IconSize.DIALOG)
         image.show()
         box.pack_end(image, False)
 
         # Interface type
         type_list = self.widget("interface-type")
-        type_model = gtk.ListStore(str, str)
+        type_model = Gtk.ListStore(str, str)
         type_list.set_model(type_model)
-        text = gtk.CellRendererText()
+        text = Gtk.CellRendererText()
         type_list.pack_start(text, True)
         type_list.add_attribute(text, 'text', 1)
         type_model.append([Interface.Interface.INTERFACE_TYPE_BRIDGE,
@@ -206,49 +212,49 @@ class vmmCreateInterface(vmmGObjectUI):
         slave_list = self.widget("interface-list")
         # [ vmmInterface, selected, selectabel, name, type, is defined,
         #   is active, in use by str, mac]
-        slave_model = gtk.ListStore(object, bool, bool, str, str, bool, bool,
+        slave_model = Gtk.ListStore(object, bool, bool, str, str, bool, bool,
                                     str, str)
         slave_list.set_model(slave_model)
 
-        selectCol = gtk.TreeViewColumn()
-        nameCol = gtk.TreeViewColumn(_("Name"))
-        typeCol = gtk.TreeViewColumn(_("Type"))
-        useCol = gtk.TreeViewColumn(_("In use by"))
+        selectCol = Gtk.TreeViewColumn()
+        nameCol = Gtk.TreeViewColumn(_("Name"))
+        typeCol = Gtk.TreeViewColumn(_("Type"))
+        useCol = Gtk.TreeViewColumn(_("In use by"))
 
         slave_list.append_column(selectCol)
         slave_list.append_column(nameCol)
         slave_list.append_column(typeCol)
         slave_list.append_column(useCol)
 
-        chk = gtk.CellRendererToggle()
+        chk = Gtk.CellRendererToggle()
         chk.connect("toggled", self.interface_item_toggled, slave_list)
         selectCol.pack_start(chk, False)
         selectCol.add_attribute(chk, "active", INTERFACE_ROW_SELECT)
         selectCol.add_attribute(chk, "inconsistent", INTERFACE_ROW_CANT_SELECT)
         selectCol.set_sort_column_id(INTERFACE_ROW_CANT_SELECT)
 
-        txt = gtk.CellRendererText()
+        txt = Gtk.CellRendererText()
         nameCol.pack_start(txt, True)
         nameCol.add_attribute(txt, "text", INTERFACE_ROW_NAME)
         nameCol.set_sort_column_id(INTERFACE_ROW_NAME)
 
-        txt = gtk.CellRendererText()
+        txt = Gtk.CellRendererText()
         typeCol.pack_start(txt, True)
         typeCol.add_attribute(txt, "text", INTERFACE_ROW_TYPE)
         typeCol.set_sort_column_id(INTERFACE_ROW_TYPE)
         slave_model.set_sort_column_id(INTERFACE_ROW_CANT_SELECT,
-                                       gtk.SORT_ASCENDING)
+                                       Gtk.SortType.ASCENDING)
 
-        txt = gtk.CellRendererText()
+        txt = Gtk.CellRendererText()
         useCol.pack_start(txt, True)
         useCol.add_attribute(txt, "text", INTERFACE_ROW_IN_USE_BY)
         useCol.set_sort_column_id(INTERFACE_ROW_IN_USE_BY)
 
         # Bond config
         mode_list = self.widget("bond-mode")
-        mode_model = gtk.ListStore(str, str)
+        mode_model = Gtk.ListStore(str, str)
         mode_list.set_model(mode_model)
-        txt = gtk.CellRendererText()
+        txt = Gtk.CellRendererText()
         mode_list.pack_start(txt, True)
         mode_list.add_attribute(txt, "text", 0)
         mode_model.append([_("System default"), None])
@@ -256,9 +262,9 @@ class vmmCreateInterface(vmmGObjectUI):
             mode_model.append([m, m])
 
         mon_list = self.widget("bond-monitor-mode")
-        mon_model = gtk.ListStore(str, str)
+        mon_model = Gtk.ListStore(str, str)
         mon_list.set_model(mon_model)
-        txt = gtk.CellRendererText()
+        txt = Gtk.CellRendererText()
         mon_list.pack_start(txt, True)
         mon_list.add_attribute(txt, "text", 0)
         mon_model.append([_("System default"), None])
@@ -266,18 +272,18 @@ class vmmCreateInterface(vmmGObjectUI):
             mon_model.append([m, m])
 
         validate_list = self.widget("arp-validate")
-        validate_model = gtk.ListStore(str)
+        validate_model = Gtk.ListStore(str)
         validate_list.set_model(validate_model)
-        txt = gtk.CellRendererText()
+        txt = Gtk.CellRendererText()
         validate_list.pack_start(txt, True)
         validate_list.add_attribute(txt, "text", 0)
         for m in Interface.InterfaceBond.INTERFACE_BOND_MONITOR_MODE_ARP_VALIDATE_MODES:
             validate_model.append([m])
 
         carrier_list = self.widget("mii-carrier")
-        carrier_model = gtk.ListStore(str)
+        carrier_model = Gtk.ListStore(str)
         carrier_list.set_model(carrier_model)
-        txt = gtk.CellRendererText()
+        txt = Gtk.CellRendererText()
         carrier_list.pack_start(txt, True)
         carrier_list.add_attribute(txt, "text", 0)
         for m in Interface.InterfaceBond.INTERFACE_BOND_MONITOR_MODE_MII_CARRIER_TYPES:
@@ -285,17 +291,17 @@ class vmmCreateInterface(vmmGObjectUI):
 
         # IP config
         copy_iface = self.widget("ip-copy-interface-combo")
-        copy_model = gtk.ListStore(str, object, bool)
+        copy_model = Gtk.ListStore(str, object, bool)
         copy_iface.set_model(copy_model)
-        txt = gtk.CellRendererText()
+        txt = Gtk.CellRendererText()
         copy_iface.pack_start(txt, True)
         copy_iface.add_attribute(txt, "text", 0)
         copy_iface.add_attribute(txt, "sensitive", 2)
 
         ip_mode = self.widget("ipv4-mode")
-        ip_model = gtk.ListStore(str)
+        ip_model = Gtk.ListStore(str)
         ip_mode.set_model(ip_model)
-        txt = gtk.CellRendererText()
+        txt = Gtk.CellRendererText()
         ip_mode.pack_start(txt, True)
         ip_mode.add_attribute(txt, "text", 0)
         ip_model.insert(IP_DHCP, ["DHCP"])
@@ -303,9 +309,9 @@ class vmmCreateInterface(vmmGObjectUI):
         ip_model.insert(IP_NONE, ["No configuration"])
 
         ip_mode = self.widget("ipv6-mode")
-        ip_model = gtk.ListStore(str)
+        ip_model = Gtk.ListStore(str)
         ip_mode.set_model(ip_model)
-        txt = gtk.CellRendererText()
+        txt = Gtk.CellRendererText()
         ip_mode.pack_start(txt, True)
         ip_mode.add_attribute(txt, "text", 0)
         ip_model.insert(IP_DHCP, ["DHCP"])
@@ -313,11 +319,11 @@ class vmmCreateInterface(vmmGObjectUI):
         ip_model.insert(IP_NONE, ["No configuration"])
 
         v6_addr = self.widget("ipv6-address-list")
-        addr_model = gtk.ListStore(str)
+        addr_model = Gtk.ListStore(str)
         v6_addr.set_model(addr_model)
-        txt_col = gtk.TreeViewColumn("")
+        txt_col = Gtk.TreeViewColumn("")
         v6_addr.append_column(txt_col)
-        txt = gtk.CellRendererText()
+        txt = Gtk.CellRendererText()
         txt.set_property("editable", True)
         txt.connect("edited", self.ipv6_address_editted)
         txt_col.pack_start(txt, True)
@@ -610,7 +616,6 @@ class vmmCreateInterface(vmmGObjectUI):
 
         for row in model:
             active = row[INTERFACE_ROW_SELECT]
-            iobj = row[INTERFACE_ROW_KEY]
 
             if active:
                 ret.append(row)
@@ -1107,7 +1112,7 @@ class vmmCreateInterface(vmmGObjectUI):
 
         # Start the install
         self.topwin.set_sensitive(False)
-        self.topwin.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))
+        self.topwin.get_window().set_cursor(Gdk.Cursor.new(Gdk.CursorType.WATCH))
 
         progWin = vmmAsyncJob(self.do_install, [activate],
                               _("Creating virtual interface"),
@@ -1116,7 +1121,7 @@ class vmmCreateInterface(vmmGObjectUI):
         error, details = progWin.run()
 
         self.topwin.set_sensitive(True)
-        self.topwin.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.TOP_LEFT_ARROW))
+        self.topwin.get_window().set_cursor(Gdk.Cursor.new(Gdk.CursorType.TOP_LEFT_ARROW))
 
         if error:
             error = _("Error creating interface: '%s'") % error
@@ -1129,8 +1134,6 @@ class vmmCreateInterface(vmmGObjectUI):
 
     def do_install(self, asyncjob, activate):
         meter = asyncjob.get_meter()
-        error = None
-        details = None
 
         self.interface.conn = util.dup_conn(self.conn).vmm
 
@@ -1140,6 +1143,3 @@ class vmmCreateInterface(vmmGObjectUI):
     def show_help(self, ignore):
         # No help available yet.
         pass
-
-vmmGObjectUI.type_register(vmmCreateInterface)
-vmmCreateInterface.signal_new(vmmCreateInterface, "action-show-help", [str])
diff --git a/src/virtManager/createnet.py b/src/virtManager/createnet.py
index c007d51..bd0e628 100644
--- a/src/virtManager/createnet.py
+++ b/src/virtManager/createnet.py
@@ -21,7 +21,9 @@
 import logging
 import re
 
-import gtk
+from gi.repository import GObject
+from gi.repository import Gtk
+from gi.repository import Gdk
 
 from IPy import IP
 from virtManager.network import vmmNetwork
@@ -36,11 +38,15 @@ PAGE_SUMMARY = 5
 
 
 class vmmCreateNetwork(vmmGObjectUI):
+    __gsignals__ = {
+        "action-show-help": (GObject.SignalFlags.RUN_FIRST, None, [str]),
+    }
+
     def __init__(self, conn):
         vmmGObjectUI.__init__(self, "vmm-create-net.ui", "vmm-create-net")
         self.conn = conn
 
-        self.window.connect_signals({
+        self.get_window().connect_signals({
             "on_create_pages_switch_page" : self.page_changed,
             "on_create_cancel_clicked" : self.close,
             "on_vmm_create_delete_event" : self.close,
@@ -60,8 +66,8 @@ class vmmCreateNetwork(vmmGObjectUI):
 
         # XXX: Help docs useless/out of date
         self.widget("create-help").hide()
-        finish_img = gtk.image_new_from_stock(gtk.STOCK_QUIT,
-                                              gtk.ICON_SIZE_BUTTON)
+        finish_img = Gtk.Image.new_from_stock(Gtk.STOCK_QUIT,
+                                              Gtk.IconSize.BUTTON)
         self.widget("create-finish").set_image(finish_img)
 
         self.set_initial_state()
@@ -73,9 +79,7 @@ class vmmCreateNetwork(vmmGObjectUI):
         self.topwin.present()
 
     def is_visible(self):
-        if self.topwin.flags() & gtk.VISIBLE:
-            return 1
-        return 0
+        return self.topwin.get_visible()
 
     def close(self, ignore1=None, ignore2=None):
         logging.debug("Closing new network wizard")
@@ -90,16 +94,16 @@ class vmmCreateNetwork(vmmGObjectUI):
         notebook = self.widget("create-pages")
         notebook.set_show_tabs(False)
 
-        black = gtk.gdk.color_parse("#000")
+        black = Gdk.Color.parse("#000")[1]
         for num in range(PAGE_SUMMARY + 1):
             name = "page" + str(num) + "-title"
-            self.widget(name).modify_bg(gtk.STATE_NORMAL, black)
+            self.widget(name).modify_bg(Gtk.StateType.NORMAL, black)
 
         fw_list = self.widget("net-forward")
         # [ label, dev name ]
-        fw_model = gtk.ListStore(str, str)
+        fw_model = Gtk.ListStore(str, str)
         fw_list.set_model(fw_model)
-        text = gtk.CellRendererText()
+        text = Gtk.CellRendererText()
         fw_list.pack_start(text, True)
         fw_list.add_attribute(text, 'text', 0)
 
@@ -111,9 +115,9 @@ class vmmCreateNetwork(vmmGObjectUI):
 
         mode_list = self.widget("net-forward-mode")
         # [ label, mode ]
-        mode_model = gtk.ListStore(str, str)
+        mode_model = Gtk.ListStore(str, str)
         mode_list.set_model(mode_model)
-        text = gtk.CellRendererText()
+        text = Gtk.CellRendererText()
         mode_list.pack_start(text, True)
         mode_list.add_attribute(text, 'text', 0)
 
@@ -151,14 +155,14 @@ class vmmCreateNetwork(vmmGObjectUI):
 
     def change_network(self, src):
         ip = self.get_config_ip4()
-        green = gtk.gdk.color_parse("#c0ffc0")
-        red = gtk.gdk.color_parse("#ffc0c0")
-        black = gtk.gdk.color_parse("#000000")
-        src.modify_text(gtk.STATE_NORMAL, black)
+        green = Gdk.Color.parse("#c0ffc0")[1]
+        red = Gdk.Color.parse("#ffc0c0")[1]
+        black = Gdk.Color.parse("#000000")[1]
+        src.modify_text(Gtk.StateType.NORMAL, black)
 
         # No IP specified or invalid IP
         if ip is None or ip.version() != 4:
-            src.modify_base(gtk.STATE_NORMAL, red)
+            src.modify_base(Gtk.StateType.NORMAL, red)
             self.widget("net-info-netmask").set_text("")
             self.widget("net-info-broadcast").set_text("")
             self.widget("net-info-gateway").set_text("")
@@ -168,9 +172,9 @@ class vmmCreateNetwork(vmmGObjectUI):
 
         # We've got a valid IP
         if ip.len() < 4 or ip.iptype() != "PRIVATE":
-            src.modify_base(gtk.STATE_NORMAL, red)
+            src.modify_base(Gtk.StateType.NORMAL, red)
         else:
-            src.modify_base(gtk.STATE_NORMAL, green)
+            src.modify_base(Gtk.StateType.NORMAL, green)
         self.widget("net-info-netmask").set_text(str(ip.netmask()))
         self.widget("net-info-broadcast").set_text(str(ip.broadcast()))
 
@@ -205,15 +209,15 @@ class vmmCreateNetwork(vmmGObjectUI):
 
     def change_dhcp(self, src, addr):
         ip = self.get_config_ip4()
-        black = gtk.gdk.color_parse("#000000")
-        src.modify_text(gtk.STATE_NORMAL, black)
+        black = Gdk.Color.parse("#000000")[1]
+        src.modify_text(Gtk.StateType.NORMAL, black)
 
         if addr is None or not ip.overlaps(addr):
-            red = gtk.gdk.color_parse("#ffc0c0")
-            src.modify_base(gtk.STATE_NORMAL, red)
+            red = Gdk.Color.parse("#ffc0c0")[1]
+            src.modify_base(Gtk.StateType.NORMAL, red)
         else:
-            green = gtk.gdk.color_parse("#c0ffc0")
-            src.modify_base(gtk.STATE_NORMAL, green)
+            green = Gdk.Color.parse("#c0ffc0")[1]
+            src.modify_base(Gtk.StateType.NORMAL, green)
 
     def change_forward_type(self, src_ignore):
         skip_fwd = self.widget("net-forward-none").get_active()
@@ -452,6 +456,3 @@ class vmmCreateNetwork(vmmGObjectUI):
             self.emit("action-show-help", "virt-manager-create-net-forwarding")
         elif page == PAGE_SUMMARY:
             self.emit("action-show-help", "virt-manager-create-net-sumary")
-
-vmmGObjectUI.type_register(vmmCreateNetwork)
-vmmCreateNetwork.signal_new(vmmCreateNetwork, "action-show-help", [str])
diff --git a/src/virtManager/createpool.py b/src/virtManager/createpool.py
index efe02a3..f77a529 100644
--- a/src/virtManager/createpool.py
+++ b/src/virtManager/createpool.py
@@ -18,7 +18,8 @@
 # MA 02110-1301 USA.
 #
 
-import gtk
+from gi.repository import Gtk
+from gi.repository import Gdk
 
 import copy
 import logging
@@ -57,13 +58,13 @@ class vmmCreatePool(vmmGObjectUI):
         self._pool = None
         self._pool_class = Storage.StoragePool
 
-        self.window.add_from_string(_comboentry_xml)
+        self.get_window().add_from_string(_comboentry_xml)
         self.widget("pool-source-box").pack_start(
-            self.widget("pool-source-path"))
+            self.widget("pool-source-path", True, True, 0))
         self.widget("pool-target-box").pack_start(
-            self.widget("pool-target-path"))
+            self.widget("pool-target-path", True, True, 0))
 
-        self.window.connect_signals({
+        self.get_window().connect_signals({
             "on_pool_forward_clicked" : self.forward,
             "on_pool_back_clicked"    : self.back,
             "on_pool_cancel_clicked"  : self.close,
@@ -118,8 +119,8 @@ class vmmCreatePool(vmmGObjectUI):
 
         # XXX: Help docs useless/out of date
         self.widget("pool-help").hide()
-        finish_img = gtk.image_new_from_stock(gtk.STOCK_QUIT,
-                                              gtk.ICON_SIZE_BUTTON)
+        finish_img = Gtk.Image.new_from_stock(Gtk.STOCK_QUIT,
+                                              Gtk.IconSize.BUTTON)
         self.widget("pool-finish").set_image(finish_img)
 
         self.set_initial_state()
@@ -145,45 +146,45 @@ class vmmCreatePool(vmmGObjectUI):
         self.widget("pool-pages").set_show_tabs(False)
 
         type_list = self.widget("pool-type")
-        type_model = gtk.ListStore(str, str)
+        type_model = Gtk.ListStore(str, str)
         type_list.set_model(type_model)
-        text1 = gtk.CellRendererText()
+        text1 = Gtk.CellRendererText()
         type_list.pack_start(text1, True)
         type_list.add_attribute(text1, 'text', 1)
 
         format_list = self.widget("pool-format")
-        format_model = gtk.ListStore(str, str)
+        format_model = Gtk.ListStore(str, str)
         format_list.set_model(format_model)
-        text2 = gtk.CellRendererText()
+        text2 = Gtk.CellRendererText()
         format_list.pack_start(text2, False)
         format_list.add_attribute(text2, 'text', 1)
 
         # Target path combo box entry
         target_list = self.widget("pool-target-path")
         # target_path, Label, pool class instance
-        target_model = gtk.ListStore(str, str, object)
-        target_model.set_sort_column_id(0, gtk.SORT_ASCENDING)
+        target_model = Gtk.ListStore(str, str, object)
+        target_model.set_sort_column_id(0, Gtk.SortType.ASCENDING)
         target_list.set_model(target_model)
         target_list.set_text_column(0)
-        target_list.child.connect("focus-in-event", self.update_doc,
+        target_list.get_child().connect("focus-in-event", self.update_doc,
                                   "target_path", "pool-info2")
 
         # Source path combo box entry
         source_list = self.widget("pool-source-path")
         # source_path, Label, pool class instance
-        source_model = gtk.ListStore(str, str, object)
-        source_model.set_sort_column_id(0, gtk.SORT_ASCENDING)
+        source_model = Gtk.ListStore(str, str, object)
+        source_model.set_sort_column_id(0, Gtk.SortType.ASCENDING)
         source_list.set_model(source_model)
         source_list.set_text_column(0)
-        source_list.child.connect("focus-in-event", self.update_doc,
+        source_list.get_child().connect("focus-in-event", self.update_doc,
                                   "source_path", "pool-info2")
 
         self.populate_pool_type()
 
-        self.widget("pool-info-box1").modify_bg(gtk.STATE_NORMAL,
-                                                gtk.gdk.color_parse("grey"))
-        self.widget("pool-info-box2").modify_bg(gtk.STATE_NORMAL,
-                                                gtk.gdk.color_parse("grey"))
+        self.widget("pool-info-box1").modify_bg(Gtk.StateType.NORMAL,
+                                                Gdk.Color.parse("grey")[1])
+        self.widget("pool-info-box2").modify_bg(Gtk.StateType.NORMAL,
+                                                Gdk.Color.parse("grey")[1])
 
     def reset_state(self):
         self.widget("pool-pages").set_current_page(0)
@@ -194,8 +195,8 @@ class vmmCreatePool(vmmGObjectUI):
         self.widget("pool-name").set_text("")
         self.widget("pool-name").grab_focus()
         self.widget("pool-type").set_active(0)
-        self.widget("pool-target-path").child.set_text("")
-        self.widget("pool-source-path").child.set_text("")
+        self.widget("pool-target-path").get_child().set_text("")
+        self.widget("pool-source-path").get_child().set_text("")
         self.widget("pool-hostname").set_text("")
         self.widget("pool-iqn-chk").set_active(False)
         self.widget("pool-iqn-chk").toggled()
@@ -349,7 +350,7 @@ class vmmCreatePool(vmmGObjectUI):
         show_row("pool-build", buildsens)
         show_row("pool-iqn", iqn)
 
-        self.widget("pool-target-path").child.set_text(self._pool.target_path)
+        self.widget("pool-target-path").get_child().set_text(self._pool.target_path)
         self.widget("pool-target-button").set_sensitive(tgt_b)
         self.widget("pool-source-button").set_sensitive(src_b)
         self.widget("pool-build").set_active(builddef)
@@ -382,7 +383,7 @@ class vmmCreatePool(vmmGObjectUI):
         if selection != -1:
             return model[selection][1]
 
-        return src.child.get_text()
+        return src.get_child().get_text()
 
     def get_config_source_path(self):
         src = self.widget("pool-source-path")
@@ -395,7 +396,7 @@ class vmmCreatePool(vmmGObjectUI):
         if selection != -1:
             return model[selection][1]
 
-        return src.child.get_text().strip()
+        return src.get_child().get_text().strip()
 
     def get_config_host(self):
         host = self.widget("pool-hostname")
@@ -439,14 +440,14 @@ class vmmCreatePool(vmmGObjectUI):
         source = self._browse_file(_("Choose source path"),
                                    startfolder="/dev", foldermode=False)
         if source:
-            self.widget("pool-source-path").child.set_text(source)
+            self.widget("pool-source-path").get_child().set_text(source)
 
     def browse_target_path(self, ignore1=None):
         target = self._browse_file(_("Choose target directory"),
                                    startfolder="/var/lib/libvirt",
                                    foldermode=True)
         if target:
-            self.widget("pool-target-path").child.set_text(target)
+            self.widget("pool-target-path").get_child().set_text(target)
 
 
     def forward(self, ignore=None):
@@ -470,7 +471,7 @@ class vmmCreatePool(vmmGObjectUI):
 
     def finish(self):
         self.topwin.set_sensitive(False)
-        self.topwin.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))
+        self.topwin.get_window().set_cursor(Gdk.Cursor.new(Gdk.CursorType.WATCH))
         build = self.widget("pool-build").get_active()
 
         progWin = vmmAsyncJob(self._async_pool_create, [build],
@@ -481,7 +482,7 @@ class vmmCreatePool(vmmGObjectUI):
         error, details = progWin.run()
 
         self.topwin.set_sensitive(True)
-        self.topwin.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.TOP_LEFT_ARROW))
+        self.topwin.get_window().set_cursor(Gdk.Cursor.new(Gdk.CursorType.TOP_LEFT_ARROW))
 
         if error:
             error = _("Error creating pool: %s") % error
@@ -618,12 +619,10 @@ class vmmCreatePool(vmmGObjectUI):
         return doc
 
     def _browse_file(self, dialog_name, startfolder=None, foldermode=False):
-        mode = gtk.FILE_CHOOSER_ACTION_OPEN
+        mode = Gtk.FileChooserAction.OPEN
         if foldermode:
-            mode = gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER
+            mode = Gtk.FileChooserAction.SELECT_FOLDER
 
         return util.browse_local(self.topwin, dialog_name, self.conn,
                                  dialog_type=mode,
                                  start_folder=startfolder)
-
-vmmGObjectUI.type_register(vmmCreatePool)
diff --git a/src/virtManager/createvol.py b/src/virtManager/createvol.py
index 0218924..ece3e04 100644
--- a/src/virtManager/createvol.py
+++ b/src/virtManager/createvol.py
@@ -20,7 +20,9 @@
 
 import logging
 
-import gtk
+from gi.repository import GObject
+from gi.repository import Gtk
+from gi.repository import Gdk
 
 from virtManager import util
 from virtManager.baseclass import vmmGObjectUI
@@ -32,6 +34,10 @@ DEFAULT_ALLOC = 0
 DEFAULT_CAP   = 1000
 
 class vmmCreateVolume(vmmGObjectUI):
+    __gsignals__ = {
+        "vol-created": (GObject.SignalFlags.RUN_FIRST, None, []),
+    }
+
     def __init__(self, conn, parent_pool):
         vmmGObjectUI.__init__(self, "vmm-create-vol.ui", "vmm-create-vol")
         self.conn = conn
@@ -41,7 +47,7 @@ class vmmCreateVolume(vmmGObjectUI):
         self.vol = None
         self.vol_class = Storage.StoragePool.get_volume_for_pool(parent_pool.get_type())
 
-        self.window.connect_signals({
+        self.get_window().connect_signals({
             "on_vmm_create_vol_delete_event" : self.close,
             "on_vol_cancel_clicked"  : self.close,
             "on_vol_create_clicked"  : self.finish,
@@ -52,18 +58,19 @@ class vmmCreateVolume(vmmGObjectUI):
         self.bind_escape_key_close()
 
         format_list = self.widget("vol-format")
-        format_model = gtk.ListStore(str, str)
+        format_model = Gtk.ListStore(str, str)
         format_list.set_model(format_model)
-        text2 = gtk.CellRendererText()
+        text2 = Gtk.CellRendererText()
         format_list.pack_start(text2, False)
         format_list.add_attribute(text2, 'text', 1)
-        self.widget("vol-info-view").modify_bg(gtk.STATE_NORMAL,
-                                               gtk.gdk.color_parse("grey"))
+
+        self.widget("vol-info-view").modify_bg(Gtk.StateType.NORMAL,
+                                               Gdk.Color.parse("grey")[1])
 
         # XXX: Help docs useless/out of date
         self.widget("pool-help").hide()
-        finish_img = gtk.image_new_from_stock(gtk.STOCK_QUIT,
-                                              gtk.ICON_SIZE_BUTTON)
+        finish_img = Gtk.Image.new_from_stock(Gtk.STOCK_QUIT,
+                                              Gtk.IconSize.BUTTON)
         self.widget("vol-create").set_image(finish_img)
 
         self.reset_state()
@@ -218,7 +225,7 @@ class vmmCreateVolume(vmmGObjectUI):
                       self.vol.get_xml_config())
 
         self.topwin.set_sensitive(False)
-        self.topwin.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))
+        self.topwin.get_window().set_cursor(Gdk.Cursor.new(Gdk.CursorType.WATCH))
 
         progWin = vmmAsyncJob(self._async_vol_create, [],
                               _("Creating storage volume..."),
@@ -228,7 +235,7 @@ class vmmCreateVolume(vmmGObjectUI):
         error, details = progWin.run()
 
         self.topwin.set_sensitive(True)
-        self.topwin.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.TOP_LEFT_ARROW))
+        self.topwin.get_window().set_cursor(Gdk.Cursor.new(Gdk.CursorType.TOP_LEFT_ARROW))
 
         if error:
             error = _("Error creating vol: %s") % error
@@ -283,6 +290,3 @@ class vmmCreateVolume(vmmGObjectUI):
             self.topwin.set_modal(modal)
 
         return ret
-
-vmmGObjectUI.type_register(vmmCreateVolume)
-vmmCreateVolume.signal_new(vmmCreateVolume, "vol-created", [])
diff --git a/src/virtManager/delete.py b/src/virtManager/delete.py
index c0eec53..d231f7a 100644
--- a/src/virtManager/delete.py
+++ b/src/virtManager/delete.py
@@ -18,7 +18,8 @@
 # MA 02110-1301 USA.
 #
 
-import gtk
+from gi.repository import Gtk
+from gi.repository import Gdk
 
 import os
 import stat
@@ -46,7 +47,7 @@ class vmmDeleteDialog(vmmGObjectUI):
         self.vm = None
         self.conn = None
 
-        self.window.connect_signals({
+        self.get_window().connect_signals({
             "on_vmm_delete_delete_event" : self.close,
             "on_delete_cancel_clicked" : self.close,
             "on_delete_ok_clicked" : self.finish,
@@ -54,8 +55,8 @@ class vmmDeleteDialog(vmmGObjectUI):
         })
         self.bind_escape_key_close()
 
-        image = gtk.image_new_from_icon_name("vm_delete_wizard",
-                                             gtk.ICON_SIZE_DIALOG)
+        image = Gtk.Image.new_from_icon_name("vm_delete_wizard",
+                                             Gtk.IconSize.DIALOG)
         image.show()
         self.widget("icon-box").pack_end(image, False)
 
@@ -128,7 +129,7 @@ class vmmDeleteDialog(vmmGObjectUI):
         devs = self.get_paths_to_delete()
 
         self.topwin.set_sensitive(False)
-        self.topwin.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))
+        self.topwin.get_window().set_cursor(Gdk.Cursor.new(Gdk.CursorType.WATCH))
 
         title = _("Deleting virtual machine '%s'") % self.vm.get_name()
         text = title
@@ -140,7 +141,7 @@ class vmmDeleteDialog(vmmGObjectUI):
         error, details = progWin.run()
 
         self.topwin.set_sensitive(True)
-        self.topwin.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.TOP_LEFT_ARROW))
+        self.topwin.get_window().set_cursor(Gdk.Cursor.new(Gdk.CursorType.TOP_LEFT_ARROW))
         conn = self.conn
 
         if error is not None:
@@ -256,8 +257,8 @@ def populate_storage_list(storage_list, vm, conn):
         elif not default:
             info = definfo
 
-        icon = gtk.STOCK_DIALOG_WARNING
-        icon_size = gtk.ICON_SIZE_LARGE_TOOLBAR
+        icon = Gtk.STOCK_DIALOG_WARNING
+        icon_size = Gtk.IconSize.LARGE_TOOLBAR
 
         row = [default, not can_del, path, target,
                bool(info), icon, icon_size, info]
@@ -267,7 +268,7 @@ def populate_storage_list(storage_list, vm, conn):
 def prepare_storage_list(storage_list):
     # Checkbox, deleteable?, storage path, target (hda), icon stock,
     # icon size, tooltip
-    model = gtk.ListStore(bool, bool, str, str, bool, str, int, str)
+    model = Gtk.ListStore(bool, bool, str, str, bool, str, int, str)
     storage_list.set_model(model)
     try:
         storage_list.set_tooltip_column(STORAGE_ROW_TOOLTIP)
@@ -275,17 +276,17 @@ def prepare_storage_list(storage_list):
         # FIXME: use tooltip wrapper for this
         pass
 
-    confirmCol = gtk.TreeViewColumn()
-    pathCol = gtk.TreeViewColumn(_("Storage Path"))
-    targetCol = gtk.TreeViewColumn(_("Target"))
-    infoCol = gtk.TreeViewColumn()
+    confirmCol = Gtk.TreeViewColumn()
+    pathCol = Gtk.TreeViewColumn(_("Storage Path"))
+    targetCol = Gtk.TreeViewColumn(_("Target"))
+    infoCol = Gtk.TreeViewColumn()
 
     storage_list.append_column(confirmCol)
     storage_list.append_column(pathCol)
     storage_list.append_column(targetCol)
     storage_list.append_column(infoCol)
 
-    chkbox = gtk.CellRendererToggle()
+    chkbox = Gtk.CellRendererToggle()
     chkbox.connect('toggled', storage_item_toggled, storage_list)
     confirmCol.pack_start(chkbox, False)
     confirmCol.add_attribute(chkbox, 'active', STORAGE_ROW_CONFIRM)
@@ -293,17 +294,17 @@ def prepare_storage_list(storage_list):
                              STORAGE_ROW_CANT_DELETE)
     confirmCol.set_sort_column_id(STORAGE_ROW_CANT_DELETE)
 
-    path_txt = gtk.CellRendererText()
+    path_txt = Gtk.CellRendererText()
     pathCol.pack_start(path_txt, True)
     pathCol.add_attribute(path_txt, 'text', STORAGE_ROW_PATH)
     pathCol.set_sort_column_id(STORAGE_ROW_PATH)
 
-    target_txt = gtk.CellRendererText()
+    target_txt = Gtk.CellRendererText()
     targetCol.pack_start(target_txt, False)
     targetCol.add_attribute(target_txt, 'text', STORAGE_ROW_TARGET)
     targetCol.set_sort_column_id(STORAGE_ROW_TARGET)
 
-    info_img = gtk.CellRendererPixbuf()
+    info_img = Gtk.CellRendererPixbuf()
     infoCol.pack_start(info_img, False)
     infoCol.add_attribute(info_img, 'visible', STORAGE_ROW_ICON_SHOW)
     infoCol.add_attribute(info_img, 'stock-id', STORAGE_ROW_ICON)
@@ -375,5 +376,3 @@ def do_we_default(conn, vm_name, vol, path, ro, shared):
         logging.exception("Failed checking disk conflict: %s", str(e))
 
     return (not info, info)
-
-vmmGObjectUI.type_register(vmmDeleteDialog)
diff --git a/src/virtManager/details.py b/src/virtManager/details.py
index 5395087..5200581 100644
--- a/src/virtManager/details.py
+++ b/src/virtManager/details.py
@@ -21,7 +21,9 @@
 import logging
 import traceback
 
-import gtk
+from gi.repository import GObject
+from gi.repository import Gtk
+from gi.repository import Gdk
 
 import libvirt
 
@@ -39,12 +41,14 @@ import virtinst
 
 _comboentry_xml = """
 <interface>
-    <object class="GtkComboBoxEntry" id="cpu-model">
+    <object class="GtkComboBoxText" id="cpu-model">
         <property name="visible">True</property>
+        <property name="has_entry">True</property>
         <signal name="changed" handler="on_cpu_model_changed"/>
     </object>
-    <object class="GtkComboBoxEntry" id="disk-format">
+    <object class="GtkComboBoxText" id="disk-format">
         <property name="visible">True</property>
+        <property name="has_entry">True</property>
         <signal name="changed" handler="on_disk_format_changed"/>
     </object>
 </interface>
@@ -309,6 +313,24 @@ def lookup_nodedev(vmmconn, hostdev):
     return found_dev
 
 class vmmDetails(vmmGObjectUI):
+    __gsignals__ = {
+        "action-save-domain": (GObject.SignalFlags.RUN_FIRST, None, [str, str]),
+        "action-destroy-domain": (GObject.SignalFlags.RUN_FIRST, None, [str, str]),
+        "action-suspend-domain": (GObject.SignalFlags.RUN_FIRST, None, [str, str]),
+        "action-resume-domain": (GObject.SignalFlags.RUN_FIRST, None, [str, str]),
+        "action-run-domain": (GObject.SignalFlags.RUN_FIRST, None, [str, str]),
+        "action-shutdown-domain": (GObject.SignalFlags.RUN_FIRST, None, [str, str]),
+        "action-reboot-domain": (GObject.SignalFlags.RUN_FIRST, None, [str, str]),
+        "action-show-help": (GObject.SignalFlags.RUN_FIRST, None, [str]),
+        "action-exit-app": (GObject.SignalFlags.RUN_FIRST, None, []),
+        "action-view-manager": (GObject.SignalFlags.RUN_FIRST, None, []),
+        "action-migrate-domain": (GObject.SignalFlags.RUN_FIRST, None, [str, str]),
+        "action-clone-domain": (GObject.SignalFlags.RUN_FIRST, None, [str, str]),
+        "details-closed": (GObject.SignalFlags.RUN_FIRST, None, []),
+        "details-opened": (GObject.SignalFlags.RUN_FIRST, None, []),
+        "customize-finished": (GObject.SignalFlags.RUN_FIRST, None, []),
+    }
+
     def __init__(self, vm, parent=None):
         vmmGObjectUI.__init__(self, "vmm-details.ui", "vmm-details")
         self.vm = vm
@@ -319,7 +341,7 @@ class vmmDetails(vmmGObjectUI):
             # Details window is being abused as a 'configure before install'
             # dialog, set things as appropriate
             self.is_customize_dialog = True
-            self.topwin.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_DIALOG)
+            self.topwin.set_type_hint(Gdk.WindowTypeHint.DIALOG)
             self.topwin.set_transient_for(parent)
 
             self.widget("toolbar-box").show()
@@ -342,13 +364,13 @@ class vmmDetails(vmmGObjectUI):
         self.ignoreDetails = False
         self._cpu_copy_host = False
 
-        self.window.add_from_string(_comboentry_xml)
+        self.get_window().add_from_string(_comboentry_xml)
         self.widget("hbox17").pack_start(self.widget("disk-format"),
                                          False, True, 0)
         self.widget("hbox21").pack_start(self.widget("cpu-model"),
                                          False, True, 0)
 
-        self.console = vmmConsolePages(self.vm, self.window)
+        self.console = vmmConsolePages(self.vm, self.window, self.topwin)
 
         # Set default window size
         w, h = self.vm.get_details_window_size()
@@ -366,7 +388,7 @@ class vmmDetails(vmmGObjectUI):
         self.network_traffic_graph = None
         self.init_graphs()
 
-        self.window.connect_signals({
+        self.get_window().connect_signals({
             "on_close_details_clicked": self.close,
             "on_details_menu_close_activate": self.close,
             "on_vmm_details_delete_event": self.close,
@@ -399,85 +421,79 @@ class vmmDetails(vmmGObjectUI):
 
             "on_details_pages_switch_page": self.switch_page,
 
-            "on_overview_name_changed": (self.enable_apply, EDIT_NAME),
+            "on_overview_name_changed": lambda *x: self.enable_apply(x, EDIT_NAME),
             "on_overview_acpi_changed": self.config_acpi_changed,
             "on_overview_apic_changed": self.config_apic_changed,
-            "on_overview_clock_changed": (self.enable_apply, EDIT_CLOCK),
-            "on_machine_type_changed": (self.enable_apply, EDIT_MACHTYPE),
-            "on_security_label_changed": (self.enable_apply, EDIT_SECURITY),
+            "on_overview_clock_changed": lambda *x: self.enable_apply(x, EDIT_CLOCK),
+            "on_machine_type_changed": lambda *x: self.enable_apply(x, EDIT_MACHTYPE),
+            "on_security_label_changed": lambda *x: self.enable_apply(x, EDIT_SECURITY),
             "on_security_type_changed": self.security_type_changed,
 
             "on_config_vcpus_changed": self.config_vcpus_changed,
             "on_config_maxvcpus_changed": self.config_maxvcpus_changed,
-            "on_config_vcpupin_changed": (self.enable_apply, EDIT_CPUSET),
+            "on_config_vcpupin_changed": lambda *x: self.enable_apply(x, EDIT_CPUSET),
             "on_config_vcpupin_generate_clicked": self.config_vcpupin_generate,
-            "on_cpu_model_changed": (self.enable_apply, EDIT_CPU),
-            "on_cpu_cores_changed": (self.enable_apply, EDIT_TOPOLOGY),
-            "on_cpu_sockets_changed": (self.enable_apply, EDIT_TOPOLOGY),
-            "on_cpu_threads_changed": (self.enable_apply, EDIT_TOPOLOGY),
+            "on_cpu_model_changed": lambda *x: self.enable_apply(x, EDIT_CPU),
+            "on_cpu_cores_changed": lambda *x: self.enable_apply(x, EDIT_TOPOLOGY),
+            "on_cpu_sockets_changed": lambda *x: self.enable_apply(x, EDIT_TOPOLOGY),
+            "on_cpu_threads_changed": lambda *x: self.enable_apply(x, EDIT_TOPOLOGY),
             "on_cpu_copy_host_clicked": self.config_cpu_copy_host,
             "on_cpu_topology_enable_toggled": self.config_cpu_topology_enable,
 
             "on_config_memory_changed": self.config_memory_changed,
             "on_config_maxmem_changed": self.config_maxmem_changed,
 
-            "on_config_boot_moveup_clicked" : (self.config_boot_move, True),
-            "on_config_boot_movedown_clicked" : (self.config_boot_move,
-                                                 False),
-            "on_config_autostart_changed": (self.enable_apply, EDIT_AUTOSTART),
-            "on_boot_menu_changed": (self.enable_apply, EDIT_BOOTMENU),
-            "on_boot_kernel_changed": (self.enable_apply, EDIT_KERNEL),
-            "on_boot_kernel_initrd_changed": (self.enable_apply, EDIT_KERNEL),
-            "on_boot_kernel_args_changed": (self.enable_apply, EDIT_KERNEL),
+            "on_config_boot_moveup_clicked" : lambda *x: self.config_boot_move(True),
+            "on_config_boot_movedown_clicked" : lambda *x: self.config_boot_move(False),
+            "on_config_autostart_changed": lambda *x: self.enable_apply(x, x, EDIT_AUTOSTART),
+            "on_boot_menu_changed": lambda *x: self.enable_apply(x, EDIT_BOOTMENU),
+            "on_boot_kernel_changed": lambda *x: self.enable_apply(x, EDIT_KERNEL),
+            "on_boot_kernel_initrd_changed": lambda *x: self.enable_apply(x, EDIT_KERNEL),
+            "on_boot_kernel_args_changed": lambda *x: self.enable_apply(x, EDIT_KERNEL),
             "on_boot_kernel_browse_clicked": self.browse_kernel,
             "on_boot_kernel_initrd_browse_clicked": self.browse_initrd,
-            "on_boot_init_path_changed": (self.enable_apply, EDIT_INIT),
-
-            "on_disk_readonly_changed": (self.enable_apply, EDIT_DISK_RO),
-            "on_disk_shareable_changed": (self.enable_apply, EDIT_DISK_SHARE),
-            "on_disk_cache_combo_changed": (self.enable_apply,
-                                            EDIT_DISK_CACHE),
-            "on_disk_io_combo_changed": (self.enable_apply, EDIT_DISK_IO),
-            "on_disk_bus_combo_changed": (self.enable_apply, EDIT_DISK_BUS),
-            "on_disk_format_changed": (self.enable_apply, EDIT_DISK_FORMAT),
-            "on_disk_serial_changed": (self.enable_apply, EDIT_DISK_SERIAL),
-
-            "on_network_source_combo_changed": (self.enable_apply,
-                                                EDIT_NET_SOURCE),
-            "on_network_bridge_changed": (self.enable_apply,
-                                          EDIT_NET_SOURCE),
-            "on_network-source-mode-combo_changed": (self.enable_apply,
-                                                     EDIT_NET_SOURCE),
-            "on_network_model_combo_changed": (self.enable_apply,
-                                               EDIT_NET_MODEL),
-
-            "on_vport_type_changed": (self.enable_apply, EDIT_NET_VPORT),
-            "on_vport_managerid_changed": (self.enable_apply,
+            "on_boot_init_path_changed": lambda *x: self.enable_apply(x, EDIT_INIT),
+
+            "on_disk_readonly_changed": lambda *x: self.enable_apply(x, EDIT_DISK_RO),
+            "on_disk_shareable_changed": lambda *x: self.enable_apply(x, EDIT_DISK_SHARE),
+            "on_disk_cache_combo_changed": lambda *x: self.enable_apply(x, EDIT_DISK_CACHE),
+            "on_disk_io_combo_changed": lambda *x: self.enable_apply(x, EDIT_DISK_IO),
+            "on_disk_bus_combo_changed": lambda *x: self.enable_apply(x, EDIT_DISK_BUS),
+            "on_disk_format_changed": lambda *x: self.enable_apply(x, EDIT_DISK_FORMAT),
+            "on_disk_serial_changed": lambda *x: self.enable_apply(x, EDIT_DISK_SERIAL),
+
+            "on_network_source_combo_changed": lambda *x: self.enable_apply(x, EDIT_NET_SOURCE),
+            "on_network_bridge_changed": lambda *x: self.enable_apply(x, EDIT_NET_SOURCE),
+            "on_network-source-mode-combo_changed": lambda *x: self.enable_apply(x, EDIT_NET_SOURCE),
+            "on_network_model_combo_changed": lambda *x: self.enable_apply(x, EDIT_NET_MODEL),
+
+            "on_vport_type_changed": lambda *x: self.enable_apply(x, EDIT_NET_VPORT),
+            "on_vport_managerid_changed": lambda *x: self.enable_apply(x,
                                            EDIT_NET_VPORT),
-            "on_vport_typeid_changed": (self.enable_apply,
+            "on_vport_typeid_changed": lambda *x: self.enable_apply(x,
                                         EDIT_NET_VPORT),
-            "on_vport_typeidversion_changed": (self.enable_apply,
+            "on_vport_typeidversion_changed": lambda *x: self.enable_apply(x,
                                                EDIT_NET_VPORT),
-            "on_vport_instanceid_changed": (self.enable_apply,
+            "on_vport_instanceid_changed": lambda *x: self.enable_apply(x,
                                             EDIT_NET_VPORT),
 
-            "on_gfx_type_combo_changed": (self.enable_apply, EDIT_GFX_TYPE),
-            "on_vnc_keymap_combo_changed": (self.enable_apply,
+            "on_gfx_type_combo_changed": lambda *x: self.enable_apply(x, EDIT_GFX_TYPE),
+            "on_vnc_keymap_combo_changed": lambda *x: self.enable_apply(x,
                                             EDIT_GFX_KEYMAP),
-            "on_vnc_password_changed": (self.enable_apply, EDIT_GFX_PASSWD),
+            "on_vnc_password_changed": lambda *x: self.enable_apply(x, EDIT_GFX_PASSWD),
 
-            "on_sound_model_combo_changed": (self.enable_apply,
+            "on_sound_model_combo_changed": lambda *x: self.enable_apply(x,
                                              EDIT_SOUND_MODEL),
 
-            "on_video_model_combo_changed": (self.enable_apply,
+            "on_video_model_combo_changed": lambda *x: self.enable_apply(x,
                                              EDIT_VIDEO_MODEL),
 
-            "on_watchdog_model_combo_changed": (self.enable_apply,
+            "on_watchdog_model_combo_changed": lambda *x: self.enable_apply(x,
                                                 EDIT_WATCHDOG_MODEL),
-            "on_watchdog_action_combo_changed": (self.enable_apply,
+            "on_watchdog_action_combo_changed": lambda *x: self.enable_apply(x,
                                                  EDIT_WATCHDOG_ACTION),
 
-            "on_smartcard_mode_combo_changed": (self.enable_apply,
+            "on_smartcard_mode_combo_changed": lambda *x: self.enable_apply(x,
                                                 EDIT_SMARTCARD_MODE),
 
             "on_config_apply_clicked": self.config_apply,
@@ -501,7 +517,7 @@ class vmmDetails(vmmGObjectUI):
             "on_console_pages_switch_page": self.console.page_changed,
             "on_console_auth_password_activate": self.console.auth_login,
             "on_console_auth_login_clicked": self.console.auth_login,
-            "on_controller_model_combo_changed": (self.enable_apply,
+            "on_controller_model_combo_changed": lambda *x: self.enable_apply(x, 
                                                   EDIT_CONTROLLER_MODEL),
         })
 
@@ -515,8 +531,8 @@ class vmmDetails(vmmGObjectUI):
                                             "changed",
                                             self.config_bootdev_selected)
 
-        finish_img = gtk.image_new_from_stock(gtk.STOCK_ADD,
-                                              gtk.ICON_SIZE_BUTTON)
+        finish_img = Gtk.Image.new_from_stock(Gtk.STOCK_ADD,
+                                              Gtk.IconSize.BUTTON)
         self.widget("add-hardware-button").set_image(finish_img)
 
         self.populate_hw_list()
@@ -585,7 +601,7 @@ class vmmDetails(vmmGObjectUI):
         self.topwin.hide()
         if (self.console.viewer and
             self.console.viewer.display and
-            self.console.viewer.display.flags() & gtk.VISIBLE):
+            self.console.viewer.display.get_visible()):
             try:
                 self.console.close_viewer()
             except:
@@ -598,7 +614,7 @@ class vmmDetails(vmmGObjectUI):
         return 1
 
     def is_visible(self):
-        return bool(self.topwin.flags() & gtk.VISIBLE)
+        return bool(self.topwin.get_visible())
 
 
     ##########################
@@ -618,22 +634,22 @@ class vmmDetails(vmmGObjectUI):
                      "details-menu-reboot",
                      "details-menu-poweroff",
                      "details-menu-destroy"]:
-            image = gtk.image_new_from_icon_name(icon_name, gtk.ICON_SIZE_MENU)
+            image = Gtk.Image.new_from_icon_name(icon_name, Gtk.IconSize.MENU)
             self.widget(name).set_image(image)
 
         # Add HW popup menu
-        self.addhwmenu = gtk.Menu()
+        self.addhwmenu = Gtk.Menu()
 
-        addHW = gtk.ImageMenuItem(_("_Add Hardware"))
-        addHWImg = gtk.Image()
-        addHWImg.set_from_stock(gtk.STOCK_ADD, gtk.ICON_SIZE_MENU)
+        addHW = Gtk.ImageMenuItem(_("_Add Hardware"))
+        addHWImg = Gtk.Image()
+        addHWImg.set_from_stock(Gtk.STOCK_ADD, Gtk.IconSize.MENU)
         addHW.set_image(addHWImg)
         addHW.show()
         addHW.connect("activate", self.add_hardware)
 
-        rmHW = gtk.ImageMenuItem(_("_Remove Hardware"))
-        rmHWImg = gtk.Image()
-        rmHWImg.set_from_stock(gtk.STOCK_REMOVE, gtk.ICON_SIZE_MENU)
+        rmHW = Gtk.ImageMenuItem(_("_Remove Hardware"))
+        rmHWImg = Gtk.Image()
+        rmHWImg.set_from_stock(Gtk.STOCK_REMOVE, Gtk.IconSize.MENU)
         rmHW.set_image(rmHWImg)
         rmHW.show()
         rmHW.connect("activate", self.remove_xml_dev)
@@ -642,7 +658,7 @@ class vmmDetails(vmmGObjectUI):
         self.addhwmenu.add(rmHW)
 
         # Serial list menu
-        smenu = gtk.Menu()
+        smenu = Gtk.Menu()
         smenu.connect("show", self.populate_serial_menu)
         self.widget("details-menu-view-serial-list").set_submenu(smenu)
 
@@ -698,14 +714,14 @@ class vmmDetails(vmmGObjectUI):
     def init_details(self):
         # Hardware list
         # [ label, icon name, icon size, hw type, hw data/class]
-        hw_list_model = gtk.ListStore(str, str, int, int, object)
+        hw_list_model = Gtk.ListStore(str, str, int, int, object)
         self.widget("hw-list").set_model(hw_list_model)
 
-        hwCol = gtk.TreeViewColumn("Hardware")
+        hwCol = Gtk.TreeViewColumn("Hardware")
         hwCol.set_spacing(6)
         hwCol.set_min_width(165)
-        hw_txt = gtk.CellRendererText()
-        hw_img = gtk.CellRendererPixbuf()
+        hw_txt = Gtk.CellRendererText()
+        hw_img = Gtk.CellRendererPixbuf()
         hwCol.pack_start(hw_img, False)
         hwCol.pack_start(hw_txt, True)
         hwCol.add_attribute(hw_txt, 'text', HW_LIST_COL_LABEL)
@@ -715,46 +731,46 @@ class vmmDetails(vmmGObjectUI):
 
         # Description text view
         desc = self.widget("overview-description")
-        buf = gtk.TextBuffer()
+        buf = Gtk.TextBuffer()
         buf.connect("changed", self.enable_apply, EDIT_DESC)
         desc.set_buffer(buf)
 
         # List of applications.
         apps_list = self.widget("inspection-apps")
-        apps_model = gtk.ListStore(str, str, str)
+        apps_model = Gtk.ListStore(str, str, str)
         apps_list.set_model(apps_model)
 
-        name_col = gtk.TreeViewColumn(_("Name"))
-        version_col = gtk.TreeViewColumn(_("Version"))
-        summary_col = gtk.TreeViewColumn()
+        name_col = Gtk.TreeViewColumn(_("Name"))
+        version_col = Gtk.TreeViewColumn(_("Version"))
+        summary_col = Gtk.TreeViewColumn()
 
         apps_list.append_column(name_col)
         apps_list.append_column(version_col)
         apps_list.append_column(summary_col)
 
-        name_text = gtk.CellRendererText()
+        name_text = Gtk.CellRendererText()
         name_col.pack_start(name_text, True)
         name_col.add_attribute(name_text, 'text', 0)
         name_col.set_sort_column_id(0)
 
-        version_text = gtk.CellRendererText()
+        version_text = Gtk.CellRendererText()
         version_col.pack_start(version_text, True)
         version_col.add_attribute(version_text, 'text', 1)
         version_col.set_sort_column_id(1)
 
-        summary_text = gtk.CellRendererText()
+        summary_text = Gtk.CellRendererText()
         summary_col.pack_start(summary_text, True)
         summary_col.add_attribute(summary_text, 'text', 2)
         summary_col.set_sort_column_id(2)
 
         # Clock combo
         clock_combo = self.widget("overview-clock-combo")
-        clock_model = gtk.ListStore(str)
+        clock_model = Gtk.ListStore(str)
         clock_combo.set_model(clock_model)
-        text = gtk.CellRendererText()
+        text = Gtk.CellRendererText()
         clock_combo.pack_start(text, True)
         clock_combo.add_attribute(text, 'text', 0)
-        clock_model.set_sort_column_id(0, gtk.SORT_ASCENDING)
+        clock_model.set_sort_column_id(0, Gtk.SortType.ASCENDING)
         for offset in ["localtime", "utc"]:
             clock_model.append([offset])
 
@@ -773,21 +789,21 @@ class vmmDetails(vmmGObjectUI):
             self.widget("hbox30").hide()
         else:
             machtype_combo = self.widget("machine-type-combo")
-            machtype_model = gtk.ListStore(str)
+            machtype_model = Gtk.ListStore(str)
             machtype_combo.set_model(machtype_model)
-            text = gtk.CellRendererText()
+            text = Gtk.CellRendererText()
             machtype_combo.pack_start(text, True)
             machtype_combo.add_attribute(text, 'text', 0)
-            machtype_model.set_sort_column_id(0, gtk.SORT_ASCENDING)
+            machtype_model.set_sort_column_id(0, Gtk.SortType.ASCENDING)
 
             if len(machines) > 0:
                 for machine in machines:
                     machtype_model.append([machine])
 
         # Security info tooltips
-        util.tooltip_wrapper(self.widget("security-static-info"),
+        self.widget("security-static-info").set_tooltip_text(
             _("Static SELinux security type tells libvirt to always start the guest process with the specified label. The administrator is responsible for making sure the images are labeled correctly on disk."))
-        util.tooltip_wrapper(self.widget("security-dynamic-info"),
+        self.widget("security-dynamic-info").set_tooltip_text(
             _("The dynamic SELinux security type tells libvirt to automatically pick a unique label for the guest process and guest image, ensuring total isolation of the guest. (Default)"))
 
         # VCPU Pinning list
@@ -796,34 +812,33 @@ class vmmDetails(vmmGObjectUI):
         if not self.conn.get_capabilities().host.topology:
             generate_cpuset.set_sensitive(False)
             generate_warn.show()
-            util.tooltip_wrapper(generate_warn,
-                                 _("Libvirt did not detect NUMA capabilities."))
+            generate_warn.set_tooltip_text(_("Libvirt did not detect NUMA capabilities."))
 
 
         # [ VCPU #, Currently running on Phys CPU #, CPU Pinning list ]
         vcpu_list = self.widget("config-vcpu-list")
-        vcpu_model = gtk.ListStore(str, str, str)
+        vcpu_model = Gtk.ListStore(str, str, str)
         vcpu_list.set_model(vcpu_model)
 
-        vcpuCol = gtk.TreeViewColumn(_("VCPU"))
-        physCol = gtk.TreeViewColumn(_("On CPU"))
-        pinCol  = gtk.TreeViewColumn(_("Pinning"))
+        vcpuCol = Gtk.TreeViewColumn(_("VCPU"))
+        physCol = Gtk.TreeViewColumn(_("On CPU"))
+        pinCol  = Gtk.TreeViewColumn(_("Pinning"))
 
         vcpu_list.append_column(vcpuCol)
         vcpu_list.append_column(physCol)
         vcpu_list.append_column(pinCol)
 
-        vcpu_text = gtk.CellRendererText()
+        vcpu_text = Gtk.CellRendererText()
         vcpuCol.pack_start(vcpu_text, True)
         vcpuCol.add_attribute(vcpu_text, 'text', 0)
         vcpuCol.set_sort_column_id(0)
 
-        phys_text = gtk.CellRendererText()
+        phys_text = Gtk.CellRendererText()
         physCol.pack_start(phys_text, True)
         physCol.add_attribute(phys_text, 'text', 1)
         physCol.set_sort_column_id(1)
 
-        pin_text = gtk.CellRendererText()
+        pin_text = Gtk.CellRendererText()
         pin_text.set_property("editable", True)
         pin_text.connect("edited", self.config_vcpu_pin)
         pinCol.pack_start(pin_text, True)
@@ -832,25 +847,25 @@ class vmmDetails(vmmGObjectUI):
         # Boot device list
         boot_list = self.widget("config-boot-list")
         # model = [ XML boot type, display name, icon name, enabled ]
-        boot_list_model = gtk.ListStore(str, str, str, bool)
+        boot_list_model = Gtk.ListStore(str, str, str, bool)
         boot_list.set_model(boot_list_model)
 
-        chkCol = gtk.TreeViewColumn()
-        txtCol = gtk.TreeViewColumn()
+        chkCol = Gtk.TreeViewColumn()
+        txtCol = Gtk.TreeViewColumn()
 
         boot_list.append_column(chkCol)
         boot_list.append_column(txtCol)
 
-        chk = gtk.CellRendererToggle()
+        chk = Gtk.CellRendererToggle()
         chk.connect("toggled", self.config_boot_toggled)
         chkCol.pack_start(chk, False)
         chkCol.add_attribute(chk, 'active', BOOT_ACTIVE)
 
-        icon = gtk.CellRendererPixbuf()
+        icon = Gtk.CellRendererPixbuf()
         txtCol.pack_start(icon, False)
         txtCol.add_attribute(icon, 'icon-name', BOOT_ICON)
 
-        text = gtk.CellRendererText()
+        text = Gtk.CellRendererText()
         txtCol.pack_start(text, True)
         txtCol.add_attribute(text, 'text', BOOT_LABEL)
         txtCol.add_attribute(text, 'sensitive', BOOT_ACTIVE)
@@ -873,25 +888,25 @@ class vmmDetails(vmmGObjectUI):
 
         # [ feature name, mode]
         feat_list = self.widget("cpu-features")
-        feat_model = gtk.ListStore(str, str)
+        feat_model = Gtk.ListStore(str, str)
         feat_list.set_model(feat_model)
 
-        nameCol = gtk.TreeViewColumn()
-        polCol = gtk.TreeViewColumn()
+        nameCol = Gtk.TreeViewColumn()
+        polCol = Gtk.TreeViewColumn()
         polCol.set_min_width(80)
 
         feat_list.append_column(nameCol)
         feat_list.append_column(polCol)
 
         # Feature name col
-        name_text = gtk.CellRendererText()
+        name_text = Gtk.CellRendererText()
         nameCol.pack_start(name_text, True)
         nameCol.add_attribute(name_text, 'text', 0)
         nameCol.set_sort_column_id(0)
 
         # Feature policy col
-        feat_combo = gtk.CellRendererCombo()
-        m = gtk.ListStore(str)
+        feat_combo = Gtk.CellRendererCombo()
+        m = Gtk.ListStore(str)
         for p in virtinst.CPUFeature.POLICIES:
             m.append([p])
         m.append(["default"])
@@ -913,10 +928,10 @@ class vmmDetails(vmmGObjectUI):
         # CPU model combo
         cpu_model = self.widget("cpu-model")
 
-        model = gtk.ListStore(str, object)
+        model = Gtk.ListStore(str, object)
         cpu_model.set_model(model)
-        cpu_model.set_text_column(0)
-        model.set_sort_column_id(0, gtk.SORT_ASCENDING)
+        cpu_model.set_entry_text_column(0)
+        model.set_sort_column_id(0, Gtk.SortType.ASCENDING)
         for name in cpu_names:
             model.append([name, cpu_values.get_cpu(name)])
 
@@ -955,9 +970,9 @@ class vmmDetails(vmmGObjectUI):
 
         # Graphics type
         gfx_type = self.widget("gfx-type-combo")
-        model = gtk.ListStore(str, str)
+        model = Gtk.ListStore(str, str)
         gfx_type.set_model(model)
-        text = gtk.CellRendererText()
+        text = Gtk.CellRendererText()
         gfx_type.pack_start(text, True)
         gfx_type.add_attribute(text, 'text', 1)
         model.append([virtinst.VirtualGraphics.TYPE_VNC,
@@ -999,9 +1014,9 @@ class vmmDetails(vmmGObjectUI):
 
         # Controller model
         combo = self.widget("controller-model-combo")
-        model = gtk.ListStore(str, str)
+        model = Gtk.ListStore(str, str)
         combo.set_model(model)
-        text = gtk.CellRendererText()
+        text = Gtk.CellRendererText()
         combo.pack_start(text, True)
         combo.add_attribute(text, 'text', 1)
         combo.set_active(-1)
@@ -1123,16 +1138,16 @@ class vmmDetails(vmmGObjectUI):
         itemlist = self.build_serial_list()
         for msg, err, sensitive, do_radio, cb, ignore in itemlist:
             if do_radio:
-                item = gtk.RadioMenuItem(group, msg)
+                item = Gtk.RadioMenuItem(group, msg)
                 if group is None:
                     group = item
             else:
-                item = gtk.MenuItem(msg)
+                item = Gtk.MenuItem(msg)
 
             item.set_sensitive(sensitive)
 
             if err and not sensitive:
-                util.tooltip_wrapper(item, err)
+                item.set_tooltip_text(err)
 
             if cb:
                 item.connect("toggled", cb)
@@ -1145,17 +1160,17 @@ class vmmDetails(vmmGObjectUI):
 
             src.add(item)
 
-        src.add(gtk.SeparatorMenuItem())
+        src.add(Gtk.SeparatorMenuItem())
 
         # Populate graphical devices
         devs = self.vm.get_graphics_devices()
         if len(devs) == 0:
-            item = gtk.MenuItem(_("No graphical console available"))
+            item = Gtk.MenuItem(_("No graphical console available"))
             item.set_sensitive(False)
             src.add(item)
         else:
             dev = devs[0]
-            item = gtk.RadioMenuItem(group, _("Graphical Console %s") %
+            item = Gtk.RadioMenuItem(group, _("Graphical Console %s") %
                                      dev.pretty_type_simple(dev.type))
             if group == None:
                 group = item
@@ -1230,7 +1245,7 @@ class vmmDetails(vmmGObjectUI):
         if not row1 or not row2:
             return False
 
-        for idx in range(len(row1)):
+        for idx in range(row1.model.get_n_columns()):
             if row1[idx] != row2[idx]:
                 return False
         return True
@@ -1437,7 +1452,7 @@ class vmmDetails(vmmGObjectUI):
         self.widget("overview-status-text").set_text(
                                                     self.vm.run_status())
         self.widget("overview-status-icon").set_from_icon_name(
-                            self.vm.run_status_icon_name(), gtk.ICON_SIZE_MENU)
+                            self.vm.run_status_icon_name(), Gtk.IconSize.MENU)
 
         details = self.widget("details-pages")
         self.page_refresh(details.get_current_page())
@@ -1575,7 +1590,7 @@ class vmmDetails(vmmGObjectUI):
                         _("Save Virtual Machine Screenshot"),
                         self.vm.conn,
                         _type=("png", "PNG files"),
-                        dialog_type=gtk.FILE_CHOOSER_ACTION_SAVE,
+                        dialog_type=Gtk.FileChooserAction.SAVE,
                         browse_reason=self.config.CONFIG_DIR_SCREENSHOT)
         if not path:
             return
@@ -1592,10 +1607,10 @@ class vmmDetails(vmmGObjectUI):
                     'tEXt::Generator App': self.config.get_appname(),
                     'tEXt::Generator Version': self.config.get_appversion()})
 
-        msg = gtk.MessageDialog(self.topwin,
-                                gtk.DIALOG_MODAL,
-                                gtk.MESSAGE_INFO,
-                                gtk.BUTTONS_OK,
+        msg = Gtk.MessageDialog(self.topwin,
+                                Gtk.DialogFlags.MODAL,
+                                Gtk.MessageType.INFO,
+                                Gtk.ButtonsType.OK,
                                 (_("The screenshot has been saved to:\n%s") %
                                  filename))
         msg.set_title(_("Screenshot saved"))
@@ -1627,7 +1642,7 @@ class vmmDetails(vmmGObjectUI):
         if not serial:
             serial = vmmSerialConsole(self.vm, target_port, name)
 
-            title = gtk.Label(name)
+            title = Gtk.Label(label=name)
             self.widget("details-pages").append_page(serial.box, title)
             self.serial_tabs.append(serial)
             serial.open_console()
@@ -1662,7 +1677,7 @@ class vmmDetails(vmmGObjectUI):
 
     def get_config_cpu_model(self):
         cpu_list = self.widget("cpu-model")
-        model = cpu_list.child.get_text()
+        model = cpu_list.get_child().get_text()
 
         for row in cpu_list.get_model():
             if model == row[0]:
@@ -2203,7 +2218,7 @@ class vmmDetails(vmmGObjectUI):
             add_define(self.vm.define_disk_io, dev_id_info, io)
 
         if self.editted(EDIT_DISK_FORMAT):
-            fmt = self.widget("disk-format").child.get_text().strip()
+            fmt = self.widget("disk-format").get_child().get_text().strip()
             add_define(self.vm.define_disk_driver_type, dev_id_info, fmt)
 
         if self.editted(EDIT_DISK_SERIAL):
@@ -2410,8 +2425,8 @@ class vmmDetails(vmmGObjectUI):
             details=(detach_err[0] + "\n\n" + detach_err[1]),
             text2=_("This change will take effect after the next guest "
                     "shutdown."),
-            buttons=gtk.BUTTONS_OK,
-            dialog_type=gtk.MESSAGE_INFO)
+            buttons=Gtk.ButtonsType.OK,
+            dialog_type=Gtk.MessageType.INFO)
 
     # Generic config change helpers
     def _change_config_helper(self,
@@ -2478,14 +2493,14 @@ class vmmDetails(vmmGObjectUI):
                 msg = _("These changes will take effect after "
                         "the next guest shutdown.")
 
-            dtype = hotplug_err and gtk.MESSAGE_WARNING or gtk.MESSAGE_INFO
+            dtype = hotplug_err and Gtk.MessageType.WARNING or Gtk.MessageType.INFO
             hotplug_msg = ""
             for err1, tb in hotplug_err:
                 hotplug_msg += (err1 + "\n\n" + tb + "\n")
 
             self.err.show_err(msg,
                               details=hotplug_msg,
-                              buttons=gtk.BUTTONS_OK,
+                              buttons=Gtk.ButtonsType.OK,
                               dialog_type=dtype)
 
         return True
@@ -2709,9 +2724,11 @@ class vmmDetails(vmmGObjectUI):
                            "VPCU info.")
 
         vcpu_list.set_sensitive(not bool(reason))
-        util.tooltip_wrapper(vcpu_list, reason or None)
         if reason:
+            vcpu_list.set_tooltip_text(reason)
             return
+        else:
+            vcpu_list.set_tooltip_text("")
 
         def build_cpuset_str(pin_info):
             pinstr = ""
@@ -2751,7 +2768,7 @@ class vmmDetails(vmmGObjectUI):
         threads = cpu.threads or 1
 
         self.widget("cpu-topology-enable").set_active(show_top)
-        self.widget("cpu-model").child.set_text(model)
+        self.widget("cpu-model").get_child().set_text(model)
         self.widget("cpu-sockets").set_value(sockets)
         self.widget("cpu-cores").set_value(cores)
         self.widget("cpu-threads").set_value(threads)
@@ -2846,7 +2863,7 @@ class vmmDetails(vmmGObjectUI):
         self.set_combo_label("disk-io", io)
 
         self.widget("disk-format").set_sensitive(show_format)
-        self.widget("disk-format").child.set_text(driver_type)
+        self.widget("disk-format").get_child().set_text(driver_type)
 
         no_default = not self.is_customize_dialog
 
@@ -2858,9 +2875,9 @@ class vmmDetails(vmmGObjectUI):
         if is_cdrom or is_floppy:
             if not path:
                 # source device not connected
-                button.set_label(gtk.STOCK_CONNECT)
+                button.set_label(Gtk.STOCK_CONNECT)
             else:
-                button.set_label(gtk.STOCK_DISCONNECT)
+                button.set_label(Gtk.STOCK_DISCONNECT)
             button.show()
         else:
             button.hide()
@@ -3315,7 +3332,7 @@ class vmmDetails(vmmGObjectUI):
 
         def add_hw_list_option(title, page_id, data, icon_name):
             hw_list_model.append([title, icon_name,
-                                  gtk.ICON_SIZE_LARGE_TOOLBAR,
+                                  Gtk.IconSize.LARGE_TOOLBAR,
                                   page_id, data])
 
         add_hw_list_option("Overview", HW_LIST_TYPE_GENERAL, [], "computer")
@@ -3348,7 +3365,7 @@ class vmmDetails(vmmGObjectUI):
 
         def add_hw_list_option(idx, name, page_id, info, icon_name):
             hw_list_model.insert(idx, [name, icon_name,
-                                       gtk.ICON_SIZE_LARGE_TOOLBAR,
+                                       Gtk.IconSize.LARGE_TOOLBAR,
                                        page_id, info])
 
         def update_hwlist(hwtype, info, name, icon_name):
@@ -3486,7 +3503,7 @@ class vmmDetails(vmmGObjectUI):
             target = fs.target[:8]
             update_hwlist(HW_LIST_TYPE_FILESYSTEM, fs,
                           _("Filesystem %s") % target,
-                          gtk.STOCK_DIRECTORY)
+                          Gtk.STOCK_DIRECTORY)
 
         # Populate list of smartcard devices
         for sc in self.vm.get_smartcard_devices():
@@ -3569,20 +3586,3 @@ class vmmDetails(vmmGObjectUI):
 
         combo.set_property("visible", show)
         label.set_property("visible", show)
-
-vmmGObjectUI.type_register(vmmDetails)
-vmmDetails.signal_new(vmmDetails, "action-save-domain", [str, str])
-vmmDetails.signal_new(vmmDetails, "action-destroy-domain", [str, str])
-vmmDetails.signal_new(vmmDetails, "action-suspend-domain", [str, str])
-vmmDetails.signal_new(vmmDetails, "action-resume-domain", [str, str])
-vmmDetails.signal_new(vmmDetails, "action-run-domain", [str, str])
-vmmDetails.signal_new(vmmDetails, "action-shutdown-domain", [str, str])
-vmmDetails.signal_new(vmmDetails, "action-reboot-domain", [str, str])
-vmmDetails.signal_new(vmmDetails, "action-show-help", [str])
-vmmDetails.signal_new(vmmDetails, "action-exit-app", [])
-vmmDetails.signal_new(vmmDetails, "action-view-manager", [])
-vmmDetails.signal_new(vmmDetails, "action-migrate-domain", [str, str])
-vmmDetails.signal_new(vmmDetails, "action-clone-domain", [str, str])
-vmmDetails.signal_new(vmmDetails, "details-closed", [])
-vmmDetails.signal_new(vmmDetails, "details-opened", [])
-vmmDetails.signal_new(vmmDetails, "customize-finished", [])
diff --git a/src/virtManager/domain.py b/src/virtManager/domain.py
index b547f91..22a58d8 100644
--- a/src/virtManager/domain.py
+++ b/src/virtManager/domain.py
@@ -18,6 +18,8 @@
 # MA 02110-1301 USA.
 #
 
+from gi.repository import GObject
+
 import logging
 import time
 import threading
@@ -131,6 +133,12 @@ class vmmInspectionData(object):
         self.applications = None
 
 class vmmDomain(vmmLibvirtObject):
+    __gsignals__ = {
+        "status-changed": (GObject.SignalFlags.RUN_FIRST, None, [int, int]),
+        "resources-sampled": (GObject.SignalFlags.RUN_FIRST, None, []),
+        "inspection-changed": (GObject.SignalFlags.RUN_FIRST, None, []),
+    }
+
     """
     Class wrapping virDomain libvirt objects. Is also extended to be
     backed by a virtinst.Guest object for new VM 'customize before install'
@@ -1020,7 +1028,7 @@ class vmmDomain(vmmLibvirtObject):
 
     # All these methods are usually run asynchronously from threads, so
     # let's be extra careful and have anything which might touch UI
-    # or gobject props invoked in an idle callback
+    # or GObject.props invoked in an idle callback
 
     def _unregister_reboot_listener(self):
         if self.reboot_listener == None:
@@ -1679,10 +1687,3 @@ class vmmDomainVirtinst(vmmDomain):
         def change(guest):
             guest.name = str(newname)
         return self._redefine_guest(change)
-
-vmmLibvirtObject.type_register(vmmDomain)
-vmmDomain.signal_new(vmmDomain, "status-changed", [int, int])
-vmmDomain.signal_new(vmmDomain, "resources-sampled", [])
-vmmDomain.signal_new(vmmDomain, "inspection-changed", [])
-
-vmmLibvirtObject.type_register(vmmDomainVirtinst)
diff --git a/src/virtManager/engine.py b/src/virtManager/engine.py
index 5bd12d2..1991ebc 100644
--- a/src/virtManager/engine.py
+++ b/src/virtManager/engine.py
@@ -18,8 +18,8 @@
 # MA 02110-1301 USA.
 #
 
-import gobject
-import gtk
+from gi.repository import GObject
+from gi.repository import Gtk
 
 import logging
 import traceback
@@ -196,7 +196,7 @@ def packagekit_search(session, pk_control, package_name, packages):
                             (code, details))
 
     def finished(ignore, runtime_ignore):
-        gtk.main_quit()
+        Gtk.main_quit()
 
     pk_trans.connect_to_signal('Finished', finished)
     pk_trans.connect_to_signal('ErrorCode', error)
@@ -211,13 +211,18 @@ def packagekit_search(session, pk_control, package_name, packages):
         pk_trans.SearchName("installed", package_name)
 
     # Call main() so this function is synchronous
-    gtk.main()
+    Gtk.main()
 
     return found
 
 
 
 class vmmEngine(vmmGObject):
+    __gsignals__ = {
+        "conn-added": (GObject.SignalFlags.RUN_FIRST, None, [object]),
+        "conn-removed": (GObject.SignalFlags.RUN_FIRST, None, [str]),
+    }
+
     def __init__(self):
         vmmGObject.__init__(self)
 
@@ -409,12 +414,12 @@ class vmmEngine(vmmGObject):
         interval = self.config.get_stats_update_interval() * 1000
 
         if self.timer != None:
-            gobject.source_remove(self.timer)
+            GObject.source_remove(self.timer)
             self.timer = None
 
         # No need to use 'timeout_add', the tick should be
         # manually made thread safe
-        self.timer = gobject.timeout_add(interval, self.tick)
+        self.timer = GObject.timeout_add(interval, self.tick)
 
     def tick(self):
         if not self.config.support_threading:
@@ -461,7 +466,7 @@ class vmmEngine(vmmGObject):
         return 1
 
     def change_timer_interval(self, ignore1, ignore2, ignore3, ignore4):
-        gobject.source_remove(self.timer)
+        GObject.source_remove(self.timer)
         self.schedule_timer()
 
     def increment_window_counter(self, src):
@@ -489,7 +494,7 @@ class vmmEngine(vmmGObject):
             self.inspection = None
 
         if self.timer != None:
-            gobject.source_remove(self.timer)
+            GObject.source_remove(self.timer)
 
         if self.systray:
             self.systray.cleanup()
@@ -547,7 +552,7 @@ class vmmEngine(vmmGObject):
                 logging.debug("Leaked %s", name)
 
         logging.debug("Exiting app normally.")
-        gtk.main_quit()
+        Gtk.main_quit()
 
     def _create_inspection_thread(self):
         if not self.config.support_inspection:
@@ -648,7 +653,7 @@ class vmmEngine(vmmGObject):
                 uri += "#%s" % index
 
             logging.debug("Showing help for %s", uri)
-            gtk.show_uri(None, uri, gtk.get_current_event_time())
+            Gtk.show_uri(None, uri, Gtk.get_current_event_time())
         except Exception, e:
             src.err.show_err(_("Unable to display documentation: %s") % e)
 
@@ -906,7 +911,7 @@ class vmmEngine(vmmGObject):
             path = util.browse_local(src.topwin,
                                      _("Save Virtual Machine"),
                                      conn,
-                                     dialog_type=gtk.FILE_CHOOSER_ACTION_SAVE,
+                                     dialog_type=Gtk.FileChooserAction.SAVE,
                                      browse_reason=self.config.CONFIG_DIR_SAVE)
             if not path:
                 return
@@ -1085,7 +1090,3 @@ class vmmEngine(vmmGObject):
                                    str(reboot_err)))
 
         vmmAsyncJob.simple_async_noshow(reboot_cb, [], src, "")
-
-vmmGObject.type_register(vmmEngine)
-vmmEngine.signal_new(vmmEngine, "conn-added", [object])
-vmmEngine.signal_new(vmmEngine, "conn-removed", [str])
diff --git a/src/virtManager/error.py b/src/virtManager/error.py
index 4932522..38ec469 100644
--- a/src/virtManager/error.py
+++ b/src/virtManager/error.py
@@ -17,29 +17,23 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 # MA 02110-1301 USA.
 
-import gtk
+from gi.repository import Gtk
 
 import logging
 import traceback
 
 from virtManager.baseclass import vmmGObject
-import virtManager.util as util
-
-def safe_set_text(self, text):
-    # pygtk < 2.10 doesn't support text property
-    if not util.safe_set_prop(self, "text", text):
-        self.set_markup(text)
 
 def _launch_dialog(dialog, primary_text, secondary_text, title,
                    sync=True):
-    safe_set_text(dialog, primary_text)
+    dialog.set_property("text", primary_text)
     dialog.format_secondary_text(secondary_text or None)
     dialog.set_title(title)
 
     res = False
     if sync:
         res = dialog.run()
-        res = bool(res in [gtk.RESPONSE_YES, gtk.RESPONSE_OK])
+        res = bool(res in [Gtk.ResponseType.YES, Gtk.ResponseType.OK])
         dialog.destroy()
     else:
         def response_destroy(src, ignore):
@@ -65,14 +59,14 @@ class vmmErrorDialog(vmmGObject):
 
     def show_err(self, summary, details=None, title="",
                  async=True, debug=True,
-                 dialog_type=gtk.MESSAGE_ERROR,
-                 buttons=gtk.BUTTONS_CLOSE,
+                 dialog_type=Gtk.MessageType.ERROR,
+                 buttons=Gtk.ButtonsType.CLOSE,
                  text2=None):
         if details is None:
             details = summary + "\n\n" + "".join(traceback.format_exc())
 
         # Make sure we have consistent details for error dialogs
-        if (dialog_type == gtk.MESSAGE_ERROR and not
+        if (dialog_type == Gtk.MessageType.ERROR and not
             details.count(summary)):
             details = summary + "\n\n" + details
 
@@ -80,7 +74,9 @@ class vmmErrorDialog(vmmGObject):
             logging.debug("dialog message: %s : %s", summary, details)
 
         dialog = _errorDialog(parent=self.get_parent(),
-                              type=dialog_type, buttons=buttons)
+                              flags=0,
+                              message_type=dialog_type,
+                              buttons=buttons)
 
         return dialog.show_dialog(primary_text=summary,
                                   secondary_text=text2,
@@ -94,9 +90,10 @@ class vmmErrorDialog(vmmGObject):
     def _simple_dialog(self, dialog_type, buttons, text1,
                        text2, title, async=False):
 
-        dialog = gtk.MessageDialog(self.get_parent(),
-                                   gtk.DIALOG_DESTROY_WITH_PARENT,
-                                   type=dialog_type, buttons=buttons)
+        dialog = Gtk.MessageDialog(self.get_parent(),
+                                   flags=Gtk.DialogFlags.DESTROY_WITH_PARENT,
+                                   message_type=dialog_type,
+                                   buttons=buttons)
         if self._simple:
             self._simple.destroy()
         self._simple = dialog
@@ -115,8 +112,8 @@ class vmmErrorDialog(vmmGObject):
         else:
             self._logtrace(logtext)
 
-        dtype = gtk.MESSAGE_ERROR
-        buttons = gtk.BUTTONS_OK
+        dtype = Gtk.MessageType.ERROR
+        buttons = Gtk.ButtonsType.OK
         self._simple_dialog(dtype, buttons,
                             str(text1),
                             text2 and str(text2) or "",
@@ -124,24 +121,24 @@ class vmmErrorDialog(vmmGObject):
         return False
 
     def show_info(self, text1, text2=None, title="", async=True):
-        dtype = gtk.MESSAGE_INFO
-        buttons = gtk.BUTTONS_OK
+        dtype = Gtk.MessageType.INFO
+        buttons = Gtk.ButtonsType.OK
         self._simple_dialog(dtype, buttons, text1, text2, title, async)
         return False
 
     def yes_no(self, text1, text2=None, title=None):
-        dtype = gtk.MESSAGE_WARNING
-        buttons = gtk.BUTTONS_YES_NO
+        dtype = Gtk.MessageType.WARNING
+        buttons = Gtk.ButtonsType.YES_NO
         return self._simple_dialog(dtype, buttons, text1, text2, title)
 
     def ok_cancel(self, text1, text2=None, title=None):
-        dtype = gtk.MESSAGE_WARNING
-        buttons = gtk.BUTTONS_OK_CANCEL
+        dtype = Gtk.MessageType.WARNING
+        buttons = Gtk.ButtonsType.OK_CANCEL
         return self._simple_dialog(dtype, buttons, text1, text2, title)
 
     def ok(self, text1, text2=None, title=None):
-        dtype = gtk.MESSAGE_WARNING
-        buttons = gtk.BUTTONS_OK
+        dtype = Gtk.MessageType.WARNING
+        buttons = Gtk.ButtonsType.OK
         return self._simple_dialog(dtype, buttons, text1, text2, title)
 
 
@@ -150,32 +147,34 @@ class vmmErrorDialog(vmmGObject):
     ##########################################
 
     def warn_chkbox(self, text1, text2=None, chktext=None, buttons=None):
-        dtype = gtk.MESSAGE_WARNING
-        buttons = buttons or gtk.BUTTONS_OK_CANCEL
+        dtype = Gtk.MessageType.WARNING
+        buttons = buttons or Gtk.ButtonsType.OK_CANCEL
         chkbox = _errorDialog(parent=self.get_parent(),
-                              type=dtype,
+                              flags=0,
+                              message_type=dtype,
                               buttons=buttons)
         return chkbox.show_dialog(primary_text=text1,
                                   secondary_text=text2,
                                   chktext=chktext)
 
     def err_chkbox(self, text1, text2=None, chktext=None, buttons=None):
-        dtype = gtk.MESSAGE_ERROR
-        buttons = buttons or gtk.BUTTONS_OK
+        dtype = Gtk.MessageType.ERROR
+        buttons = buttons or Gtk.ButtonsType.OK
         chkbox = _errorDialog(parent=self.get_parent(),
-                              type=dtype,
+                              flags=0,
+                              message_type=dtype,
                               buttons=buttons)
         return chkbox.show_dialog(primary_text=text1,
                                   secondary_text=text2,
                                   chktext=chktext)
 
 
-class _errorDialog (gtk.MessageDialog):
+class _errorDialog (Gtk.MessageDialog):
     """
     Custom error dialog with optional check boxes or details drop down
     """
     def __init__(self, *args, **kwargs):
-        gtk.MessageDialog.__init__(self, *args, **kwargs)
+        Gtk.MessageDialog.__init__(self, *args, **kwargs)
         self.set_title("")
 
         self.chk_vbox = None
@@ -188,32 +187,32 @@ class _errorDialog (gtk.MessageDialog):
 
     def init_chkbox(self):
         # Init check items
-        self.chk_vbox = gtk.VBox(False, False)
+        self.chk_vbox = Gtk.VBox(False, False)
         self.chk_vbox.set_spacing(0)
 
-        self.chk_align = gtk.Alignment()
+        self.chk_align = Gtk.Alignment()
         self.chk_align.set_padding(0, 0, 62, 0)
         self.chk_align.add(self.chk_vbox)
 
         self.chk_align.show_all()
-        self.vbox.pack_start(self.chk_align)
+        self.vbox.pack_start(self.chk_align, False, False, 0)
 
     def init_details(self):
         # Init details buffer
-        self.buffer = gtk.TextBuffer()
-        self.buf_expander = gtk.Expander(_("Details"))
-        sw = gtk.ScrolledWindow()
-        sw.set_shadow_type(gtk.SHADOW_IN)
+        self.buffer = Gtk.TextBuffer()
+        self.buf_expander = Gtk.Expander.new(_("Details"))
+        sw = Gtk.ScrolledWindow()
+        sw.set_shadow_type(Gtk.ShadowType.IN)
         sw.set_size_request(400, 240)
-        sw.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
-        details = gtk.TextView(self.buffer)
+        sw.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)
+        details = Gtk.TextView.new_with_buffer(self.buffer)
         details.set_editable(False)
         details.set_overwrite(False)
         details.set_cursor_visible(False)
-        details.set_wrap_mode(gtk.WRAP_WORD)
+        details.set_wrap_mode(Gtk.WrapMode.WORD)
         sw.add(details)
         self.buf_expander.add(sw)
-        self.vbox.pack_start(self.buf_expander)
+        self.vbox.pack_start(self.buf_expander, False, False, 0)
         self.buf_expander.show_all()
 
     def show_dialog(self, primary_text, secondary_text="",
@@ -234,7 +233,7 @@ class _errorDialog (gtk.MessageDialog):
             self.buf_expander.show()
 
         if chktext:
-            chkbox = gtk.CheckButton(chktext)
+            chkbox = Gtk.CheckButton(chktext)
             self.chk_vbox.add(chkbox)
             chkbox.show()
 
@@ -247,5 +246,3 @@ class _errorDialog (gtk.MessageDialog):
             res = [res, chkbox.get_active()]
 
         return res
-
-vmmGObject.type_register(vmmErrorDialog)
diff --git a/src/virtManager/graphwidgets.py b/src/virtManager/graphwidgets.py
index 31c3a56..c56d417 100644
--- a/src/virtManager/graphwidgets.py
+++ b/src/virtManager/graphwidgets.py
@@ -15,8 +15,8 @@
 # MA 02110-1301 USA.
 #
 
-import gobject
-import gtk
+from gi.repository import GObject
+from gi.repository import Gtk
 import cairo
 
 # For debugging
@@ -25,11 +25,11 @@ def rect_print(name, rect):
            (name, rect.height, rect.width, rect.x, rect.y))
 
 # For gproperties info, see:
-# http://www.pygtk.org/docs/pygtk/class-gtkcontainer.html#function-gtk--container-class-install-child-property
+# http://www.pyGtk.org/docs/pyGtk.class-Gtk.ontainer.html#function-Gtk.-container-class-install-child-property
 
-def _line_helper(cairo_ct, cell_area, points, for_fill=False):
+def _line_helper(cairo_ct, x, y, w, h, points, for_fill=False):
 
-    bottom_baseline = cell_area.y + cell_area.height
+    bottom_baseline = y + h
     last_was_zero = False
     last_point = None
 
@@ -62,11 +62,11 @@ def _line_helper(cairo_ct, cell_area, points, for_fill=False):
 
     return last_point
 
-def draw_line(cairo_ct, cell_area, points):
+def draw_line(cairo_ct, x, y, w, h, points):
     if not len(points):
         return
 
-    last_point = _line_helper(cairo_ct, cell_area, points)
+    last_point = _line_helper(cairo_ct, x, y, w, h, points)
     if not last_point:
         # Nothing to draw
         return
@@ -74,46 +74,46 @@ def draw_line(cairo_ct, cell_area, points):
     # Paint the line
     cairo_ct.stroke()
 
-def draw_fill(cairo_ct, cell_area, points, taper=False):
+def draw_fill(cairo_ct, x, y, w, h, points, taper=False):
     if not len(points):
         return
 
-    last_point = _line_helper(cairo_ct, cell_area, points, for_fill=True)
+    last_point = _line_helper(cairo_ct, x, y, w, h, points, for_fill=True)
     if not last_point:
         # Nothing to draw
         #return
         pass
 
-    baseline_y = cell_area.height + cell_area.y + 1
+    baseline_y = h + y + 1
     if taper:
-        x = cell_area.width + cell_area.x
+        x = w + x
     else:
         x = points[-1][0]
 
     # Box out the area to fill
     cairo_ct.line_to(x + 1, baseline_y)
-    cairo_ct.line_to(cell_area.x - 1, baseline_y)
+    cairo_ct.line_to(x - 1, baseline_y)
 
     # Paint the fill
     cairo_ct.fill()
 
 
-class CellRendererSparkline(gtk.CellRenderer):
+class CellRendererSparkline(Gtk.CellRenderer):
     __gproperties__ = {
-        # 'name' : (gobject.TYPE_*,
+        # 'name' : (GObject.TYPE_*,
         #           nickname, long desc, (type related args), mode)
         # Type related args can be min, max for int (etc.), or default value
         # for strings and bool
-        'data_array' : (gobject.TYPE_PYOBJECT, "Data Array",
+        'data_array' : (GObject.TYPE_PYOBJECT, "Data Array",
                         "Array of data points for the graph",
-                        gobject.PARAM_READWRITE),
-        'reversed': (gobject.TYPE_BOOLEAN, "Reverse data",
+                        GObject.PARAM_READWRITE),
+        'reversed': (GObject.TYPE_BOOLEAN, "Reverse data",
                      "Process data from back to front.",
-                     0, gobject.PARAM_READWRITE),
+                     0, GObject.PARAM_READWRITE),
     }
 
     def __init__(self):
-        gtk.CellRenderer.__init__(self)
+        Gtk.CellRenderer.__init__(self)
 
         self.data_array = []
         self.num_sets = 0
@@ -121,18 +121,16 @@ class CellRendererSparkline(gtk.CellRenderer):
         self.reversed = False
         self.rgb = None
 
-    def do_render(self, window, widget, background_area, cell_area,
-                  expose_area, flags):
-        # window            : gtk.gdk.Window (not plain window)
-        # widget            : Parent widget (manager treeview)
+    def do_render(self, cr, widget, background_area, cell_area,
+                  flags):
+        # cr                : Cairo context
+        # widget            : GtkWidget instance
         # background_area   : GdkRectangle: entire cell area
         # cell_area         : GdkRectangle: area normally rendered by cell
-        # expose_area       : GdkRectangle: area that needs updating
         # flags             : flags that affect rendering
-        # flags = gtk.CELL_RENDERER_SELECTED, gtk.CELL_RENDERER_PRELIT,
-        #         gtk.CELL_RENDERER_INSENSITIVE or gtk.CELL_RENDERER_SORTED
+        # flags = Gtk.CELL_RENDERER_SELECTED, Gtk.CELL_RENDERER_PRELIT,
+        #         Gtk.CELL_RENDERER_INSENSITIVE or Gtk.CELL_RENDERER_SORTED
         ignore = widget
-        ignore = expose_area
         ignore = background_area
         ignore = flags
 
@@ -171,25 +169,24 @@ class CellRendererSparkline(gtk.CellRenderer):
             cell_area.x += xalign_space
             graph_x += xalign_space
 
-        cairo_ct = window.cairo_create()
-        cairo_ct.set_line_width(3)
-        cairo_ct.set_line_cap(cairo.LINE_CAP_ROUND)
+        cr.set_line_width(3)
+        cr.set_line_cap(cairo.LINE_CAP_ROUND)
 
         # Draw gray graph border
-        cairo_ct.set_source_rgb(0.8828125, 0.8671875, 0.8671875)
-        cairo_ct.rectangle(cell_area.x + BORDER_PADDING,
-                           cell_area.y + BORDER_PADDING,
-                           border_width,
-                           cell_area.height - (BORDER_PADDING * 2))
-        cairo_ct.stroke()
+        cr.set_source_rgb(0.8828125, 0.8671875, 0.8671875)
+        cr.rectangle(cell_area.x + BORDER_PADDING,
+                     cell_area.y + BORDER_PADDING,
+                     border_width,
+                     cell_area.height - (BORDER_PADDING * 2))
+        cr.stroke()
 
         # Fill in white box inside graph outline
-        cairo_ct.set_source_rgb(1, 1, 1)
-        cairo_ct.rectangle(cell_area.x + BORDER_PADDING,
-                           cell_area.y + BORDER_PADDING,
-                           border_width,
-                           cell_area.height - (BORDER_PADDING * 2))
-        cairo_ct.fill()
+        cr.set_source_rgb(1, 1, 1)
+        cr.rectangle(cell_area.x + BORDER_PADDING,
+                     cell_area.y + BORDER_PADDING,
+                     border_width,
+                     cell_area.height - (BORDER_PADDING * 2))
+        cr.fill()
 
         def get_y(index):
             baseline_y = graph_y + graph_height
@@ -220,19 +217,19 @@ class CellRendererSparkline(gtk.CellRenderer):
         cell_area.height = graph_height
 
         # Set color to dark blue for the actual sparkline
-        cairo_ct.set_line_width(2)
-        cairo_ct.set_source_rgb(0.421875, 0.640625, 0.73046875)
-        draw_line(cairo_ct, cell_area, points)
+        cr.set_line_width(2)
+        cr.set_source_rgb(0.421875, 0.640625, 0.73046875)
+        draw_line(cr,
+                  cell_area.x, cell_area.y,
+                  cell_area.width, cell_area.height,
+                  points)
 
         # Set color to light blue for the fill
-        cairo_ct.set_source_rgba(0.71484375, 0.84765625, 0.89453125, .5)
-        draw_fill(cairo_ct, cell_area, points)
-
-        # Stop clipping
-        cairo_ct.clip()
-        cairo_ct.save()
-        cairo_ct.restore()
-        del(cairo_ct)
+        cr.set_source_rgba(0.71484375, 0.84765625, 0.89453125, .5)
+        draw_fill(cr,
+                  cell_area.x, cell_area.y,
+                  cell_area.width, cell_area.height,
+                  points)
         return
 
     def do_get_size(self, widget, cell_area=None):
@@ -268,30 +265,30 @@ class CellRendererSparkline(gtk.CellRenderer):
         name = self._sanitize_param_spec_name(param_spec.name)
         setattr(self, name, value)
 
-class Sparkline(gtk.DrawingArea):
+class Sparkline(Gtk.DrawingArea):
     __gproperties__ = {
-        # 'name' : (gobject.TYPE_*,
+        # 'name' : (GObject.TYPE_*,
         #           nickname, long desc, (type related args), mode)
         # Type related args can be min, max for int (etc.), or default value
         # for strings and bool
-        'data_array' : (gobject.TYPE_PYOBJECT, "Data Array",
+        'data_array' : (GObject.TYPE_PYOBJECT, "Data Array",
                         "Array of data points for the graph",
-                        gobject.PARAM_READWRITE),
-        'filled': (gobject.TYPE_BOOLEAN, 'Filled', 'the foo of the object',
+                        GObject.PARAM_READWRITE),
+        'filled': (GObject.TYPE_BOOLEAN, 'Filled', 'the foo of the object',
                    1,
-                   gobject.PARAM_READWRITE),
-        'num_sets': (gobject.TYPE_INT, "Number of sets",
+                   GObject.PARAM_READWRITE),
+        'num_sets': (GObject.TYPE_INT, "Number of sets",
                      "Number of data sets to graph",
-                     1, 2, 1, gobject.PARAM_READWRITE),
-        'reversed': (gobject.TYPE_BOOLEAN, "Reverse data",
+                     1, 2, 1, GObject.PARAM_READWRITE),
+        'reversed': (GObject.TYPE_BOOLEAN, "Reverse data",
                      "Process data from back to front.",
-                     0, gobject.PARAM_READWRITE),
-        'rgb': (gobject.TYPE_PYOBJECT, "rgb array", "List of rgb values",
-                gobject.PARAM_READWRITE),
+                     0, GObject.PARAM_READWRITE),
+        'rgb': (GObject.TYPE_PYOBJECT, "rgb array", "List of rgb values",
+                GObject.PARAM_READWRITE),
     }
 
     def __init__(self):
-        gtk.DrawingArea.__init__(self)
+        Gtk.DrawingArea.__init__(self)
 
         self._data_array = []
         self.num_sets = 1
@@ -299,7 +296,10 @@ class Sparkline(gtk.DrawingArea):
         self.reversed = False
         self.rgb = []
 
-        self.connect("expose-event", self.do_expose)
+        ctxt = self.get_style_context()
+        ctxt.add_class(Gtk.STYLE_CLASS_ENTRY)
+
+        #self.connect("draw", self.do_draw)
 
     def set_data_array(self, val):
         self._data_array = val
@@ -309,49 +309,38 @@ class Sparkline(gtk.DrawingArea):
     data_array = property(get_data_array, set_data_array)
 
 
-    def do_expose(self, widget, event):
-        # widget    : This widget
-        # event     : GdkEvent
-        # cell_area : GdkRectangle: area normally rendered by cell
-        # window            : gtk.gdk.Window (not plain window)
-        ignore = event
-
-        # cell_area : GdkRectangle: area normally rendered by cell
-        cell_area = widget.allocation
+    def do_draw(self, cr):
+        cr.save()
 
-        # window            : gtk.gdk.Window (not plain window)
-        window = widget.window
+        window = self.get_window()
+        w = window.get_width()
+        h = window.get_height()
 
         points_per_set = (len(self.data_array) / self.num_sets)
-        pixels_per_point = (float(cell_area.width) /
+        pixels_per_point = (float(w) /
                             (float((points_per_set - 1) or 1)))
 
-        # Mid-color graphics context (gtk.GC)
+        widget = self
+        ctx = widget.get_style_context()
+
         # This draws the light gray backing rectangle
-        mid_gc = widget.style.mid_gc[widget.state]
-        window.draw_rectangle(mid_gc, True, 0, 0,
-                              cell_area.width - 1,
-                              cell_area.height - 1)
+        Gtk.render_background(ctx, cr, 0, 0, w - 1, h - 1)
 
         # This draws the marker ticks
         max_ticks = 4
-        dark_gc = widget.style.dark_gc[widget.state]
-        for index in range(0, max_ticks):
-            window.draw_line(dark_gc, 1,
-                             (cell_area.height / max_ticks) * index,
-                             cell_area.width - 2,
-                             (cell_area.height / max_ticks) * index)
+        for index in range(1, max_ticks):
+            Gtk.render_line(ctx, cr, 1,
+                            (h / max_ticks) * index,
+                            w - 2,
+                            (h / max_ticks) * index)
 
         # Foreground-color graphics context
         # This draws the black border
-        fg_gc = widget.style.fg_gc[widget.state]
-        window.draw_rectangle(fg_gc, False, 0, 0,
-                              cell_area.width - 1,
-                              cell_area.height - 1)
+        Gtk.render_frame(ctx, cr, 0, 0, w - 1, h - 1)
 
         # Draw the actual sparkline
         def get_y(dataset, index):
-            baseline_y = cell_area.height
+            baseline_y = h
 
             n = dataset * points_per_set
             if self.reversed:
@@ -360,17 +349,13 @@ class Sparkline(gtk.DrawingArea):
                 n += index
 
             val = self.data_array[n]
-            return baseline_y - ((cell_area.height - 1) * val)
+            return baseline_y - ((h - 1) * val)
 
-        cairo_ct = window.cairo_create()
-        cairo_ct.save()
-        cairo_ct.rectangle(0, 0, cell_area.width, cell_area.height)
-        cairo_ct.clip()
-        cairo_ct.set_line_width(2)
+        cr.set_line_width(2)
 
         for dataset in range(0, self.num_sets):
             if len(self.rgb) == (self.num_sets * 3):
-                cairo_ct.set_source_rgb(self.rgb[(dataset * 3)],
+                cr.set_source_rgb(self.rgb[(dataset * 3)],
                                         self.rgb[(dataset * 3) + 1],
                                         self.rgb[(dataset * 1) + 2])
             points = []
@@ -384,17 +369,16 @@ class Sparkline(gtk.DrawingArea):
             if self.num_sets == 1:
                 pass
 
-            draw_line(cairo_ct, cell_area, points)
+            draw_line(cr, 0, 0, w, h, points)
             if self.filled:
                 # XXX: Fixes a fully filled graph from having an oddly
                 #      tapered in end (bug 560913). Need to figure out
                 #      what's really going on.
-                points = [(0, cell_area.height)] + points
-                draw_fill(cairo_ct, cell_area, points, taper=True)
+                points = [(0, h)] + points
+                draw_fill(cr, 0, 0, w, h, points, taper=True)
+
+        cr.restore()
 
-        # Stop clipping
-        cairo_ct.restore()
-        del(cairo_ct)
         return 0
 
     def do_size_request(self, requisition):
@@ -417,5 +401,3 @@ class Sparkline(gtk.DrawingArea):
         name = self._sanitize_param_spec_name(param_spec.name)
         setattr(self, name, value)
 
-gobject.type_register(Sparkline)
-gobject.type_register(CellRendererSparkline)
diff --git a/src/virtManager/guidiff.py b/src/virtManager/guidiff.py
index bba61b1..abe8520 100644
--- a/src/virtManager/guidiff.py
+++ b/src/virtManager/guidiff.py
@@ -35,19 +35,15 @@ class stubclass(object):
         ignore = attr
         ignore = val
 
-def is_gui(isgui):
+def is_gui(isgui=None):
     global _is_gui
-    _is_gui = isgui
+    if isgui is not None:
+        _is_gui = isgui
+    return _is_gui
 
-def get_imports():
+def get_running_config():
     if _is_gui:
-        import gobject
-        import gtk
         import virtManager.util
-
-        return (virtManager.util.running_config,
-                gobject,
-                gobject.GObject,
-                gtk)
+        return virtManager.util.running_config
     else:
-        return (stubclass(), None, object, None)
+        return stubclass()
diff --git a/src/virtManager/halhelper.py b/src/virtManager/halhelper.py
index 02514c5..92fabd5 100644
--- a/src/virtManager/halhelper.py
+++ b/src/virtManager/halhelper.py
@@ -17,6 +17,8 @@
 # MA 02110-1301 USA.
 #
 
+from gi.repository import GObject
+
 import logging
 import os
 import glob
@@ -86,6 +88,13 @@ def is_net_bonding_slave(name_ignore, sysfspath):
     return False
 
 class vmmHalHelper(vmmGObject):
+    __gsignals__ = {
+        "netdev-added": (GObject.SignalFlags.RUN_FIRST, None, [object]),
+        "optical-added": (GObject.SignalFlags.RUN_FIRST, None, [object]),
+        "optical-media-added": (GObject.SignalFlags.RUN_FIRST, None, [str, str, str]),
+        "device-removed": (GObject.SignalFlags.RUN_FIRST, None, [str]),
+    }
+
     def __init__(self):
         vmmGObject.__init__(self)
 
@@ -332,9 +341,3 @@ class vmmHalHelper(vmmGObject):
                 return (label, path)
 
         return None, None
-
-vmmHalHelper.type_register(vmmHalHelper)
-vmmHalHelper.signal_new(vmmHalHelper, "netdev-added", [object])
-vmmHalHelper.signal_new(vmmHalHelper, "optical-added", [object])
-vmmHalHelper.signal_new(vmmHalHelper, "optical-media-added", [str, str, str])
-vmmHalHelper.signal_new(vmmHalHelper, "device-removed", [str])
diff --git a/src/virtManager/host.py b/src/virtManager/host.py
index f90f243..4ac21e0 100644
--- a/src/virtManager/host.py
+++ b/src/virtManager/host.py
@@ -20,7 +20,8 @@
 
 import logging
 
-import gtk
+from gi.repository import GObject
+from gi.repository import Gtk
 
 from virtinst import VirtualDisk
 from virtinst import Storage
@@ -41,6 +42,15 @@ INTERFACE_PAGE_INFO = 0
 INTERFACE_PAGE_ERROR = 1
 
 class vmmHost(vmmGObjectUI):
+    __gsignals__ = {
+        "action-show-help": (GObject.SignalFlags.RUN_FIRST, None, [str]),
+        "action-exit-app": (GObject.SignalFlags.RUN_FIRST, None, []),
+        "action-view-manager": (GObject.SignalFlags.RUN_FIRST, None, []),
+        "action-restore-domain": (GObject.SignalFlags.RUN_FIRST, None, [str]),
+        "host-closed": (GObject.SignalFlags.RUN_FIRST, None, []),
+        "host-opened": (GObject.SignalFlags.RUN_FIRST, None, []),
+    }
+
     def __init__(self, conn):
         vmmGObjectUI.__init__(self, "vmm-host.ui", "vmm-host")
         self.conn = conn
@@ -92,7 +102,7 @@ class vmmHost(vmmGObjectUI):
 
         self.conn.connect("state-changed", self.conn_state_changed)
 
-        self.window.connect_signals({
+        self.get_window().connect_signals({
             "on_menu_file_view_manager_activate" : self.view_manager,
             "on_menu_file_quit_activate" : self.exit_app,
             "on_menu_file_close_activate": self.close,
@@ -131,11 +141,11 @@ class vmmHost(vmmGObjectUI):
 
         # XXX: Help docs useless/out of date
         self.widget("help_menuitem").hide()
-        finish_img = gtk.image_new_from_stock(gtk.STOCK_DELETE,
-                                              gtk.ICON_SIZE_BUTTON)
+        finish_img = Gtk.Image.new_from_stock(Gtk.STOCK_DELETE,
+                                              Gtk.IconSize.BUTTON)
         self.widget("vol-delete").set_image(finish_img)
-        finish_img = gtk.image_new_from_stock(gtk.STOCK_NEW,
-                                              gtk.ICON_SIZE_BUTTON)
+        finish_img = Gtk.Image.new_from_stock(Gtk.STOCK_NEW,
+                                              Gtk.IconSize.BUTTON)
         self.widget("vol-add").set_image(finish_img)
 
         self.conn.connect("resources-sampled", self.refresh_resources)
@@ -146,13 +156,13 @@ class vmmHost(vmmGObjectUI):
         self.widget("network-pages").set_show_tabs(False)
 
         # [ unique, label, icon name, icon size, is_active ]
-        netListModel = gtk.ListStore(str, str, str, int, bool)
+        netListModel = Gtk.ListStore(str, str, str, int, bool)
         self.widget("net-list").set_model(netListModel)
 
-        netCol = gtk.TreeViewColumn("Networks")
+        netCol = Gtk.TreeViewColumn("Networks")
         netCol.set_spacing(6)
-        net_txt = gtk.CellRendererText()
-        net_img = gtk.CellRendererPixbuf()
+        net_txt = Gtk.CellRendererText()
+        net_img = Gtk.CellRendererPixbuf()
         netCol.pack_start(net_img, False)
         netCol.pack_start(net_txt, True)
         netCol.add_attribute(net_txt, 'text', 1)
@@ -160,54 +170,54 @@ class vmmHost(vmmGObjectUI):
         netCol.add_attribute(net_img, 'icon-name', 2)
         netCol.add_attribute(net_img, 'stock-size', 3)
         self.widget("net-list").append_column(netCol)
-        netListModel.set_sort_column_id(1, gtk.SORT_ASCENDING)
+        netListModel.set_sort_column_id(1, Gtk.SortType.ASCENDING)
 
         self.populate_networks(netListModel)
 
     def init_storage_state(self):
         self.widget("storage-pages").set_show_tabs(False)
 
-        self.volmenu = gtk.Menu()
-        volCopyPath = gtk.ImageMenuItem(_("Copy Volume Path"))
-        volCopyImage = gtk.Image()
-        volCopyImage.set_from_stock(gtk.STOCK_COPY, gtk.ICON_SIZE_MENU)
+        self.volmenu = Gtk.Menu()
+        volCopyPath = Gtk.ImageMenuItem(_("Copy Volume Path"))
+        volCopyImage = Gtk.Image()
+        volCopyImage.set_from_stock(Gtk.STOCK_COPY, Gtk.IconSize.MENU)
         volCopyPath.set_image(volCopyImage)
         volCopyPath.show()
         volCopyPath.connect("activate", self.copy_vol_path)
         self.volmenu.add(volCopyPath)
 
-        volListModel = gtk.ListStore(str, str, str, str, str)
+        volListModel = Gtk.ListStore(str, str, str, str, str)
         self.widget("vol-list").set_model(volListModel)
 
-        volCol = gtk.TreeViewColumn("Volumes")
-        vol_txt1 = gtk.CellRendererText()
+        volCol = Gtk.TreeViewColumn("Volumes")
+        vol_txt1 = Gtk.CellRendererText()
         volCol.pack_start(vol_txt1, True)
         volCol.add_attribute(vol_txt1, 'text', 1)
         volCol.set_sort_column_id(1)
         self.widget("vol-list").append_column(volCol)
 
-        volSizeCol = gtk.TreeViewColumn("Size")
-        vol_txt2 = gtk.CellRendererText()
+        volSizeCol = Gtk.TreeViewColumn("Size")
+        vol_txt2 = Gtk.CellRendererText()
         volSizeCol.pack_start(vol_txt2, False)
         volSizeCol.add_attribute(vol_txt2, 'text', 2)
         volSizeCol.set_sort_column_id(2)
         self.widget("vol-list").append_column(volSizeCol)
 
-        volFormatCol = gtk.TreeViewColumn("Format")
-        vol_txt3 = gtk.CellRendererText()
+        volFormatCol = Gtk.TreeViewColumn("Format")
+        vol_txt3 = Gtk.CellRendererText()
         volFormatCol.pack_start(vol_txt3, False)
         volFormatCol.add_attribute(vol_txt3, 'text', 3)
         volFormatCol.set_sort_column_id(3)
         self.widget("vol-list").append_column(volFormatCol)
 
-        volUseCol = gtk.TreeViewColumn("Used By")
-        vol_txt4 = gtk.CellRendererText()
+        volUseCol = Gtk.TreeViewColumn("Used By")
+        vol_txt4 = Gtk.CellRendererText()
         volUseCol.pack_start(vol_txt4, False)
         volUseCol.add_attribute(vol_txt4, 'text', 4)
         volUseCol.set_sort_column_id(4)
         self.widget("vol-list").append_column(volUseCol)
 
-        volListModel.set_sort_column_id(1, gtk.SORT_ASCENDING)
+        volListModel.set_sort_column_id(1, Gtk.SortType.ASCENDING)
 
         init_pool_list(self.widget("pool-list"),
                        self.pool_selected)
@@ -218,13 +228,13 @@ class vmmHost(vmmGObjectUI):
         self.widget("interface-pages").set_show_tabs(False)
 
         # [ unique, label, icon name, icon size, is_active ]
-        interfaceListModel = gtk.ListStore(str, str, str, int, bool)
+        interfaceListModel = Gtk.ListStore(str, str, str, int, bool)
         self.widget("interface-list").set_model(interfaceListModel)
 
-        interfaceCol = gtk.TreeViewColumn("Interfaces")
+        interfaceCol = Gtk.TreeViewColumn("Interfaces")
         interfaceCol.set_spacing(6)
-        interface_txt = gtk.CellRendererText()
-        interface_img = gtk.CellRendererPixbuf()
+        interface_txt = Gtk.CellRendererText()
+        interface_img = Gtk.CellRendererPixbuf()
         interfaceCol.pack_start(interface_img, False)
         interfaceCol.pack_start(interface_txt, True)
         interfaceCol.add_attribute(interface_txt, 'text', 1)
@@ -232,30 +242,30 @@ class vmmHost(vmmGObjectUI):
         interfaceCol.add_attribute(interface_img, 'icon-name', 2)
         interfaceCol.add_attribute(interface_img, 'stock-size', 3)
         self.widget("interface-list").append_column(interfaceCol)
-        interfaceListModel.set_sort_column_id(1, gtk.SORT_ASCENDING)
+        interfaceListModel.set_sort_column_id(1, Gtk.SortType.ASCENDING)
 
         # Starmode combo
         uihelpers.build_startmode_combo(self.widget("interface-startmode"))
 
         # [ name, type ]
-        childListModel = gtk.ListStore(str, str)
+        childListModel = Gtk.ListStore(str, str)
         childList = self.widget("interface-child-list")
         childList.set_model(childListModel)
 
-        childNameCol = gtk.TreeViewColumn("Name")
-        child_txt1 = gtk.CellRendererText()
+        childNameCol = Gtk.TreeViewColumn("Name")
+        child_txt1 = Gtk.CellRendererText()
         childNameCol.pack_start(child_txt1, True)
         childNameCol.add_attribute(child_txt1, 'text', 0)
         childNameCol.set_sort_column_id(0)
         childList.append_column(childNameCol)
 
-        childTypeCol = gtk.TreeViewColumn("Interface Type")
-        child_txt2 = gtk.CellRendererText()
+        childTypeCol = Gtk.TreeViewColumn("Interface Type")
+        child_txt2 = Gtk.CellRendererText()
         childTypeCol.pack_start(child_txt2, True)
         childTypeCol.add_attribute(child_txt2, 'text', 1)
         childTypeCol.set_sort_column_id(1)
         childList.append_column(childTypeCol)
-        childListModel.set_sort_column_id(0, gtk.SORT_ASCENDING)
+        childListModel.set_sort_column_id(0, Gtk.SortType.ASCENDING)
 
         self.populate_interfaces(interfaceListModel)
 
@@ -296,7 +306,7 @@ class vmmHost(vmmGObjectUI):
         self.emit("host-opened")
 
     def is_visible(self):
-        return bool(self.topwin.flags() & gtk.VISIBLE)
+        return self.topwin.get_visible()
 
     def close(self, ignore1=None, ignore2=None):
         logging.debug("Closing host details: %s", self.conn)
@@ -532,7 +542,7 @@ class vmmHost(vmmGObjectUI):
         self.widget("net-device").set_sensitive(active)
         self.widget("net-state").set_text(state)
         self.widget("net-state-icon").set_from_icon_name(icon,
-                                                         gtk.ICON_SIZE_MENU)
+                                                         Gtk.IconSize.MENU)
 
         self.widget("net-start").set_sensitive(not active)
         self.widget("net-stop").set_sensitive(active)
@@ -553,8 +563,8 @@ class vmmHost(vmmGObjectUI):
         self.widget("net-ip4-dhcp-end").set_text(end)
 
         forward, ignore = net.get_ipv4_forward()
-        iconsize = gtk.ICON_SIZE_MENU
-        icon = forward and gtk.STOCK_CONNECT or gtk.STOCK_DISCONNECT
+        iconsize = Gtk.IconSize.MENU
+        icon = forward and Gtk.STOCK_CONNECT or Gtk.STOCK_DISCONNECT
 
         self.widget("net-ip4-forwarding-icon").set_from_stock(icon, iconsize)
 
@@ -569,7 +579,7 @@ class vmmHost(vmmGObjectUI):
         self.widget("net-device").set_sensitive(False)
         self.widget("net-state").set_text(_("Inactive"))
         self.widget("net-state-icon").set_from_icon_name(self.ICON_SHUTOFF,
-                                                         gtk.ICON_SIZE_MENU)
+                                                         Gtk.IconSize.MENU)
         self.widget("net-start").set_sensitive(False)
         self.widget("net-stop").set_sensitive(False)
         self.widget("net-delete").set_sensitive(False)
@@ -579,7 +589,7 @@ class vmmHost(vmmGObjectUI):
         self.widget("net-ip4-dhcp-start").set_text("")
         self.widget("net-ip4-dhcp-end").set_text("")
         self.widget("net-ip4-forwarding-icon").set_from_stock(
-                                    gtk.STOCK_DISCONNECT, gtk.ICON_SIZE_MENU)
+                                    Gtk.STOCK_DISCONNECT, Gtk.IconSize.MENU)
         self.widget("net-ip4-forwarding").set_text(
                                     _("Isolated virtual network"))
         self.widget("net-apply").set_sensitive(False)
@@ -593,7 +603,7 @@ class vmmHost(vmmGObjectUI):
         for uuid in self.conn.list_net_uuids():
             net = self.conn.get_net(uuid)
             model.append([uuid, net.get_name(), "network-idle",
-                          gtk.ICON_SIZE_LARGE_TOOLBAR,
+                          Gtk.IconSize.LARGE_TOOLBAR,
                           bool(net.is_active())])
 
         _iter = model.get_iter_first()
@@ -796,7 +806,7 @@ class vmmHost(vmmGObjectUI):
                 pool.get_target_path())
         self.widget("pool-state-icon").set_from_icon_name(
                 ((active and self.ICON_RUNNING) or self.ICON_SHUTOFF),
-                gtk.ICON_SIZE_MENU)
+                Gtk.IconSize.MENU)
         self.widget("pool-state").set_text(
                 (active and _("Active")) or _("Inactive"))
         self.widget("pool-autostart").set_label(
@@ -817,8 +827,7 @@ class vmmHost(vmmGObjectUI):
                 Storage.StoragePool.get_volume_for_pool(pool.get_type())
             except Exception, e:
                 self.widget("vol-add").set_sensitive(False)
-                util.tooltip_wrapper(self.widget("vol-add"),
-                                     str(e))
+                self.widget("vol-add").set_tooltip_text(str(e))
 
     def refresh_storage_pool(self, src_ignore, uuid):
         refresh_pool_in_list(self.widget("pool-list"), self.conn, uuid)
@@ -837,7 +846,7 @@ class vmmHost(vmmGObjectUI):
         self.widget("pool-type").set_text("")
         self.widget("pool-location").set_text("")
         self.widget("pool-state-icon").set_from_icon_name(self.ICON_SHUTOFF,
-                                                          gtk.ICON_SIZE_MENU)
+                                                          Gtk.IconSize.MENU)
         self.widget("pool-state").set_text(_("Inactive"))
         self.widget("vol-list").get_model().clear()
         self.widget("pool-autostart").set_label(_("Never"))
@@ -870,7 +879,7 @@ class vmmHost(vmmGObjectUI):
         vol = self.current_vol()
         if not vol:
             return
-        clipboard = gtk.Clipboard()
+        clipboard = Gtk.Clipboard()
         target_path = vol.get_target_path()
         if target_path:
             clipboard.set_text(target_path)
@@ -1053,7 +1062,7 @@ class vmmHost(vmmGObjectUI):
 
         self.widget("interface-state-icon").set_from_icon_name(
             ((active and self.ICON_RUNNING) or self.ICON_SHUTOFF),
-            gtk.ICON_SIZE_MENU)
+            Gtk.IconSize.MENU)
         self.widget("interface-state").set_text(
                                     (active and _("Active")) or _("Inactive"))
 
@@ -1154,7 +1163,7 @@ class vmmHost(vmmGObjectUI):
         for name in self.conn.list_interface_names():
             iface = self.conn.get_interface(name)
             model.append([name, iface.get_name(), "network-idle",
-                          gtk.ICON_SIZE_LARGE_TOOLBAR,
+                          Gtk.IconSize.LARGE_TOOLBAR,
                           bool(iface.is_active())])
 
         _iter = model.get_iter_first()
@@ -1180,21 +1189,21 @@ class vmmHost(vmmGObjectUI):
 # dialog.
 
 def init_pool_list(pool_list, changed_func):
-    poolListModel = gtk.ListStore(str, str, bool, str)
+    poolListModel = Gtk.ListStore(str, str, bool, str)
     pool_list.set_model(poolListModel)
 
     pool_list.get_selection().connect("changed", changed_func)
 
-    poolCol = gtk.TreeViewColumn("Storage Pools")
-    pool_txt = gtk.CellRendererText()
-    pool_per = gtk.CellRendererText()
+    poolCol = Gtk.TreeViewColumn("Storage Pools")
+    pool_txt = Gtk.CellRendererText()
+    pool_per = Gtk.CellRendererText()
     poolCol.pack_start(pool_per, False)
     poolCol.pack_start(pool_txt, True)
     poolCol.add_attribute(pool_txt, 'markup', 1)
     poolCol.add_attribute(pool_txt, 'sensitive', 2)
     poolCol.add_attribute(pool_per, 'markup', 3)
     pool_list.append_column(poolCol)
-    poolListModel.set_sort_column_id(1, gtk.SORT_ASCENDING)
+    poolListModel.set_sort_column_id(1, Gtk.SortType.ASCENDING)
 
 def refresh_pool_in_list(pool_list, conn, uuid):
     for row in pool_list.get_model():
@@ -1231,11 +1240,3 @@ def get_pool_size_percent(conn, uuid):
     else:
         per = int(((float(alloc) / float(cap)) * 100))
     return "<span size='small' color='#484848'>%s%%</span>" % int(per)
-
-vmmGObjectUI.type_register(vmmHost)
-vmmHost.signal_new(vmmHost, "action-show-help", [str])
-vmmHost.signal_new(vmmHost, "action-exit-app", [])
-vmmHost.signal_new(vmmHost, "action-view-manager", [])
-vmmHost.signal_new(vmmHost, "action-restore-domain", [str])
-vmmHost.signal_new(vmmHost, "host-closed", [])
-vmmHost.signal_new(vmmHost, "host-opened", [])
diff --git a/src/virtManager/inspection.py b/src/virtManager/inspection.py
index 81fc897..fab170a 100644
--- a/src/virtManager/inspection.py
+++ b/src/virtManager/inspection.py
@@ -22,8 +22,6 @@ from threading import Thread
 import logging
 import os
 
-import gobject
-
 from guestfs import GuestFS
 
 from virtManager.baseclass import vmmGObject
@@ -80,7 +78,7 @@ class vmmInspection(vmmGObject):
             return 0
 
         logging.debug("waiting")
-        self.add_gobject_timeout(gobject.timeout_add(self._wait, cb))
+        #self.add_gobject_timeout(GObject.timeout_add(self._wait, cb))
 
     def _run(self):
         while True:
@@ -272,6 +270,3 @@ class vmmInspection(vmmGObject):
         vm.inspection = data
         vm.inspection_data_updated()
         self._cached_data[vm.get_uuid()] = data
-
-
-vmmGObject.type_register(vmmInspection)
diff --git a/src/virtManager/interface.py b/src/virtManager/interface.py
index 086ee96..67ac190 100644
--- a/src/virtManager/interface.py
+++ b/src/virtManager/interface.py
@@ -222,5 +222,3 @@ class vmmInterface(vmmLibvirtObject):
 
         newxml = xml_func(origxml, *args)
         self._redefine_xml(newxml)
-
-vmmLibvirtObject.type_register(vmmInterface)
diff --git a/src/virtManager/keyring.py b/src/virtManager/keyring.py
index 43d1574..deb134f 100644
--- a/src/virtManager/keyring.py
+++ b/src/virtManager/keyring.py
@@ -17,15 +17,19 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 # MA 02110-1301 USA.
 #
+
 from virtManager.secret import vmmSecret
 
 import logging
 
+
 haveKeyring = False
 
 try:
-    import gnomekeyring
-    haveKeyring = True
+    # XXX
+    #import gnomekeyring
+    #haveKeyring = True
+    pass
 except:
     logging.warning("gnomekeyring bindings not installed, no keyring support")
 
diff --git a/src/virtManager/libvirtglib.py b/src/virtManager/libvirtglib.py
deleted file mode 100644
index 82138cb..0000000
--- a/src/virtManager/libvirtglib.py
+++ /dev/null
@@ -1,250 +0,0 @@
-#
-# Copyright (C) 2011 Red Hat, Inc.
-# Copyright (C) 2011 Cole Robinson <crobinso at redhat.com>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-# MA 02110-1301 USA.
-#
-
-import threading
-import logging
-
-import gobject
-
-import libvirt
-
-class GlobalState(object):
-    def __init__(self):
-        self.lock = threading.Lock()
-
-        self.nextwatch = 1
-        self.watches = []
-
-        self.nexttimer = 1
-        self.timers = []
-
-class EventWatch(object):
-    def __init__(self):
-        self.watch = -1
-        self.fd = -1
-        self.events = 0
-        self.source = 0
-
-        self.cb = None
-        self.opaque = None
-
-    def clear(self):
-        if self.source:
-            gobject.source_remove(self.source)
-
-        self.source = 0
-        self.events = 0
-
-class EventTimer(object):
-    def __init__(self):
-        self.timer = -1
-        self.interval = -1
-        self.source = 0
-
-        self.cb = None
-        self.opaque = None
-
-    def clear(self):
-        if self.source:
-            gobject.source_remove(self.source)
-
-        self.source = 0
-        self.interval = -1
-
-state = GlobalState()
-
-def find_timer(timer):
-    for t in state.timers:
-        if t.timer == timer:
-            return t
-    return None
-
-def find_watch(watch):
-    for w in state.watches:
-        if w.watch == watch:
-            return w
-    return None
-
-
-
-def glib_event_handle_dispatch(source, cond, opaque):
-    ignore = source
-    data = opaque
-    events = 0
-
-    if cond & gobject.IO_IN:
-        events |= libvirt.VIR_EVENT_HANDLE_READABLE
-    if cond & gobject.IO_OUT:
-        events |= libvirt.VIR_EVENT_HANDLE_WRITABLE
-    if cond & gobject.IO_HUP:
-        events |= libvirt.VIR_EVENT_HANDLE_HANGUP
-    if cond & gobject.IO_ERR:
-        events |= libvirt.VIR_EVENT_HANDLE_ERROR
-
-    data.cb(data.watch, data.fd, events, data.opaque)
-    return True
-
-def glib_event_handle_add(fd, events, cb, opaque):
-    data = EventWatch()
-    cond = 0
-
-    state.lock.acquire()
-    try:
-        if events & libvirt.VIR_EVENT_HANDLE_READABLE:
-            cond |= gobject.IO_IN
-        if events & libvirt.VIR_EVENT_HANDLE_WRITABLE:
-            cond |= gobject.IO_OUT
-
-        data.watch = state.nextwatch
-        state.nextwatch += 1
-        data.fd = fd
-        data.events = events
-        data.cb = cb
-        data.opaque = opaque
-
-        data.source = gobject.io_add_watch(data.fd,
-                                           cond,
-                                           glib_event_handle_dispatch,
-                                           data)
-        state.watches.append(data)
-        return data.watch
-    finally:
-        state.lock.release()
-
-def glib_event_handle_update(watch, events):
-    state.lock.acquire()
-    try:
-        data = find_watch(watch)
-        if not data:
-            return
-
-        if events:
-            cond = 0
-            if events == data.events:
-                # Nothing to update
-                return
-
-            data.clear()
-
-            cond |= gobject.IO_HUP
-            if events & libvirt.VIR_EVENT_HANDLE_READABLE:
-                cond |= gobject.IO_IN
-            if events & libvirt.VIR_EVENT_HANDLE_WRITABLE:
-                cond |= gobject.IO_OUT
-
-            data.source = gobject.io_add_watch(data.fd,
-                                               cond,
-                                               glib_event_handle_dispatch,
-                                               data)
-            data.events = events
-
-        else:
-            data.clear()
-    finally:
-        state.lock.release()
-
-def glib_event_handle_remove(watch):
-    state.lock.acquire()
-    try:
-        data = find_watch(watch)
-        if not data:
-            return
-
-        data.clear()
-        state.watches.remove(data)
-        return 0
-    finally:
-        state.lock.release()
-
-
-
-def glib_event_timeout_dispatch(opaque):
-    data = opaque
-    data.cb(data.timer, data.opaque)
-
-    return True
-
-def glib_event_timeout_add(interval, cb, opaque):
-    data = EventTimer()
-
-    state.lock.acquire()
-    try:
-        data.timer = state.nexttimer
-        state.nexttimer += 1
-        data.interval = interval
-        data.cb = cb
-        data.opaque = opaque
-
-        if interval >= 0:
-            data.source = gobject.timeout_add(interval,
-                                              glib_event_timeout_dispatch,
-                                              data)
-
-        state.timers.append(data)
-        return data.timer
-    finally:
-        state.lock.release()
-
-def glib_event_timeout_update(timer, interval):
-    state.lock.acquire()
-    try:
-        data = find_timer(timer)
-        if not data:
-            return
-
-        if interval >= 0:
-            if data.source:
-                return
-
-            data.interval = interval
-            data.source = gobject.timeout_add(data.interval,
-                                              glib_event_timeout_dispatch,
-                                              data)
-
-        else:
-            data.clear()
-    finally:
-        state.lock.release()
-
-def glib_event_timeout_remove(timer):
-    state.lock.acquire()
-    try:
-        data = find_timer(timer)
-        if not data:
-            return
-
-        data.clear()
-        state.timers.remove(data)
-        return 0
-    finally:
-        state.lock.release()
-
-def register_event_impl():
-    if (hasattr(libvirt, "eventInvokeHandleCallback") and
-        not hasattr(libvirt, "_eventInvokeHandleCallback")):
-        logging.debug("Libvirt version is not new enough for our event loop "
-                      "impl. Skipping registration.")
-        return
-    libvirt.virEventRegisterImpl(glib_event_handle_add,
-                                 glib_event_handle_update,
-                                 glib_event_handle_remove,
-                                 glib_event_timeout_add,
-                                 glib_event_timeout_update,
-                                 glib_event_timeout_remove)
diff --git a/src/virtManager/libvirtobject.py b/src/virtManager/libvirtobject.py
index 16b2294..d2c6eee 100644
--- a/src/virtManager/libvirtobject.py
+++ b/src/virtManager/libvirtobject.py
@@ -18,6 +18,8 @@
 # MA 02110-1301 USA.
 #
 
+from gi.repository import GObject
+
 import difflib
 import logging
 
@@ -35,6 +37,10 @@ def _sanitize_xml(xml):
     return xml
 
 class vmmLibvirtObject(vmmGObject):
+    __gsignals__ = {
+        "config-changed": (GObject.SignalFlags.RUN_FIRST, None, []),
+    }
+
     def __init__(self, conn):
         vmmGObject.__init__(self)
         self._conn = conn
@@ -145,8 +151,3 @@ class vmmLibvirtObject(vmmGObject):
     def _redefine_xml(self, newxml):
         origxml = self._xml_to_redefine()
         return self._redefine_helper(origxml, newxml)
-
-
-vmmGObject.signal_new(vmmLibvirtObject, "config-changed", [])
-
-vmmGObject.type_register(vmmLibvirtObject)
diff --git a/src/virtManager/manager.py b/src/virtManager/manager.py
index a4b2df5..5d83ded 100644
--- a/src/virtManager/manager.py
+++ b/src/virtManager/manager.py
@@ -21,7 +21,10 @@
 import logging
 import re
 
-import gtk
+from gi.repository import GObject
+from gi.repository import Gtk
+from gi.repository import Gdk
+from gi.repository import GdkPixbuf
 
 import virtManager.uihelpers as uihelpers
 from virtManager.connection import vmmConnection
@@ -66,10 +69,35 @@ style "treeview-style" {
 class "GtkToolbar" style "toolbar-style"
 class "GtkTreeView" style "treeview-style"
 """
-gtk.rc_parse_string(rcstring)
+Gtk.rc_parse_string(rcstring)
 
 
 class vmmManager(vmmGObjectUI):
+    __gsignals__ = {
+        "action-show-connect": (GObject.SignalFlags.RUN_FIRST, None, []),
+        "action-show-vm": (GObject.SignalFlags.RUN_FIRST, None, [str, str]),
+        "action-show-about": (GObject.SignalFlags.RUN_FIRST, None, []),
+        "action-show-host": (GObject.SignalFlags.RUN_FIRST, None, [str]),
+        "action-show-preferences": (GObject.SignalFlags.RUN_FIRST, None, []),
+        "action-show-create": (GObject.SignalFlags.RUN_FIRST, None, [str]),
+        "action-suspend-domain": (GObject.SignalFlags.RUN_FIRST, None, [str, str]),
+        "action-resume-domain": (GObject.SignalFlags.RUN_FIRST, None, [str, str]),
+        "action-run-domain": (GObject.SignalFlags.RUN_FIRST, None, [str, str]),
+        "action-shutdown-domain": (GObject.SignalFlags.RUN_FIRST, None, [str, str]),
+        "action-reboot-domain": (GObject.SignalFlags.RUN_FIRST, None, [str, str]),
+        "action-destroy-domain": (GObject.SignalFlags.RUN_FIRST, None, [str, str]),
+        "action-save-domain": (GObject.SignalFlags.RUN_FIRST, None, [str, str]),
+        "action-connect": (GObject.SignalFlags.RUN_FIRST, None, [str]),
+        "action-show-help": (GObject.SignalFlags.RUN_FIRST, None, [str]),
+        "action-migrate-domain": (GObject.SignalFlags.RUN_FIRST, None, [str, str]),
+        "action-clone-domain": (GObject.SignalFlags.RUN_FIRST, None, [str, str]),
+        "action-exit-app": (GObject.SignalFlags.RUN_FIRST, None, []),
+        "manager-closed": (GObject.SignalFlags.RUN_FIRST, None, []),
+        "manager-opened": (GObject.SignalFlags.RUN_FIRST, None, []),
+        "remove-conn": (GObject.SignalFlags.RUN_FIRST, None, [str]),
+        "add-default-conn": (GObject.SignalFlags.RUN_FIRST, None, []),
+    }
+
     def __init__(self):
         vmmGObjectUI.__init__(self, "vmm-manager.ui", "vmm-manager")
 
@@ -84,11 +112,11 @@ class vmmManager(vmmGObjectUI):
         self.topwin.set_default_size(w or 550, h or 550)
         self.prev_position = None
 
-        self.vmmenu = gtk.Menu()
-        self.vmmenushutdown = gtk.Menu()
+        self.vmmenu = Gtk.Menu()
+        self.vmmenushutdown = Gtk.Menu()
         self.vmmenu_items = {}
         self.vmmenushutdown_items = {}
-        self.connmenu = gtk.Menu()
+        self.connmenu = Gtk.Menu()
         self.connmenu_items = {}
 
         # There seem to be ref counting issues with calling
@@ -98,15 +126,15 @@ class vmmManager(vmmGObjectUI):
         self.guestcpucol = None
         self.hostcpucol = None
 
-        self.window.connect_signals({
+        self.get_window().connect_signals({
             "on_menu_view_guest_cpu_usage_activate":
-                    (self.toggle_stats_visible, COL_GUEST_CPU),
+                    self.toggle_stats_visible_guest_cpu,
             "on_menu_view_host_cpu_usage_activate":
-                    (self.toggle_stats_visible, COL_HOST_CPU),
+                    self.toggle_stats_visible_host_cpu,
             "on_menu_view_disk_io_activate" :
-                    (self.toggle_stats_visible, COL_DISK),
+                    self.toggle_stats_visible_disk,
             "on_menu_view_network_traffic_activate":
-                    (self.toggle_stats_visible, COL_NETWORK),
+                    self.toggle_stats_visible_network,
 
             "on_vm_manager_delete_event": self.close,
             "on_vmm_manager_configure_event": self.window_resized,
@@ -217,7 +245,7 @@ class vmmManager(vmmGObjectUI):
         self.connmenu_items = None
 
     def is_visible(self):
-        return bool(self.topwin.flags() & gtk.VISIBLE)
+        return bool(self.topwin.get_visible())
 
     def set_startup_error(self, msg):
         self.widget("vm-notebook").set_current_page(1)
@@ -270,30 +298,33 @@ class vmmManager(vmmGObjectUI):
                                              self.save_vm)
 
         tool = self.widget("vm-toolbar")
-        util.safe_set_prop(tool, "icon-size", gtk.ICON_SIZE_LARGE_TOOLBAR)
+        tool.set_property("icon-size", Gtk.IconSize.LARGE_TOOLBAR)
         for c in tool.get_children():
             c.set_homogeneous(False)
 
     def init_context_menus(self):
         def build_icon(name):
-            return gtk.image_new_from_icon_name(name, gtk.ICON_SIZE_MENU)
+            return Gtk.Image.new_from_icon_name(name, Gtk.IconSize.MENU)
 
         def build_stock(name):
-            return gtk.image_new_from_stock(name, gtk.ICON_SIZE_MENU)
+            return Gtk.Image.new_from_stock(name, Gtk.IconSize.MENU)
 
         icon_name = self.config.get_shutdown_icon_name()
         shutdownmenu_icon   = build_icon(icon_name)
         reboot_icon         = build_icon(icon_name)
         shutdown_icon       = build_icon(icon_name)
         destroy_icon        = build_icon(icon_name)
-        run_icon            = build_stock(gtk.STOCK_MEDIA_PLAY)
-        pause_icon          = build_stock(gtk.STOCK_MEDIA_PAUSE)
-        save_icon           = build_stock(gtk.STOCK_SAVE)
-        resume_icon         = build_stock(gtk.STOCK_MEDIA_PAUSE)
-        delete_icon         = build_stock(gtk.STOCK_DELETE)
+        run_icon            = build_stock(Gtk.STOCK_MEDIA_PLAY)
+        pause_icon          = build_stock(Gtk.STOCK_MEDIA_PAUSE)
+        save_icon           = build_stock(Gtk.STOCK_SAVE)
+        resume_icon         = build_stock(Gtk.STOCK_MEDIA_PAUSE)
+        delete_icon         = build_stock(Gtk.STOCK_DELETE)
 
         def add_to_menu(menu, items, idx, text, icon, cb):
-            item = gtk.ImageMenuItem(text)
+            if text[0:3] == 'gtk':
+                item = Gtk.ImageMenuItem.new_from_stock(text, None)
+            else:
+                item = Gtk.ImageMenuItem.new_with_mnemonic(text)
             if icon:
                 item.set_image(icon)
             item.show()
@@ -311,7 +342,7 @@ class vmmManager(vmmGObjectUI):
             add_to_menu(self.connmenu, self.connmenu_items,
                         idx, text, icon, cb)
         def add_sep(menu, items, idx):
-            sep = gtk.SeparatorMenuItem()
+            sep = Gtk.SeparatorMenuItem()
             sep.show()
             menu.add(sep)
             items[idx] = sep
@@ -337,16 +368,16 @@ class vmmManager(vmmGObjectUI):
         add_vm_menu("delete", _("_Delete"), delete_icon, self.do_delete)
 
         add_sep(self.vmmenu, self.vmmenu_items, "hsep2")
-        add_vm_menu("open", gtk.STOCK_OPEN, None, self.show_vm)
+        add_vm_menu("open", Gtk.STOCK_OPEN, None, self.show_vm)
         self.vmmenu.show()
 
         # Build connection context menu
-        add_conn_menu("create", gtk.STOCK_NEW, None, self.new_vm)
-        add_conn_menu("connect", gtk.STOCK_CONNECT, None, self.open_conn)
-        add_conn_menu("disconnect", gtk.STOCK_DISCONNECT, None,
+        add_conn_menu("create", Gtk.STOCK_NEW, None, self.new_vm)
+        add_conn_menu("connect", Gtk.STOCK_CONNECT, None, self.open_conn)
+        add_conn_menu("disconnect", Gtk.STOCK_DISCONNECT, None,
                       self.close_conn)
         add_sep(self.connmenu, self.connmenu_items, "hsep1")
-        add_conn_menu("delete", gtk.STOCK_DELETE, None, self.do_delete)
+        add_conn_menu("delete", Gtk.STOCK_DELETE, None, self.do_delete)
         add_sep(self.connmenu, self.connmenu_items, "hsep2")
         add_conn_menu("details", _("D_etails"), None, self.show_host)
         self.connmenu.show()
@@ -358,43 +389,43 @@ class vmmManager(vmmGObjectUI):
         # Handle, name, markup, status, status icon name, key/uuid, hint,
         # is conn, is conn connected, is vm, is vm running, fg color,
         # inspection icon
-        model = gtk.TreeStore(object, str, str, str, str, str, str,
-                              bool, bool, bool, bool, gtk.gdk.Color,
-                              gtk.gdk.Pixbuf)
+        model = Gtk.TreeStore(object, str, str, str, str, str, str,
+                              bool, bool, bool, bool, Gdk.Color,
+                              GdkPixbuf.Pixbuf)
         vmlist.set_model(model)
         vmlist.set_tooltip_column(ROW_HINT)
         vmlist.set_headers_visible(True)
         vmlist.set_level_indentation(-15)
 
-        nameCol = gtk.TreeViewColumn(_("Name"))
+        nameCol = Gtk.TreeViewColumn(_("Name"))
         nameCol.set_expand(True)
         nameCol.set_spacing(6)
 
         statusCol = nameCol
         vmlist.append_column(nameCol)
 
-        status_icon = gtk.CellRendererPixbuf()
-        status_icon.set_property("stock-size", gtk.ICON_SIZE_DND)
+        status_icon = Gtk.CellRendererPixbuf()
+        status_icon.set_property("stock-size", Gtk.IconSize.DND)
         statusCol.pack_start(status_icon, False)
         statusCol.add_attribute(status_icon, 'icon-name', ROW_STATUS_ICON)
         statusCol.add_attribute(status_icon, 'visible', ROW_IS_VM)
 
-        inspection_os_icon = gtk.CellRendererPixbuf()
+        inspection_os_icon = Gtk.CellRendererPixbuf()
         statusCol.pack_start(inspection_os_icon, False)
         statusCol.add_attribute(inspection_os_icon, 'pixbuf',
                                 ROW_INSPECTION_OS_ICON)
         statusCol.add_attribute(inspection_os_icon, 'visible', ROW_IS_VM)
 
-        name_txt = gtk.CellRendererText()
+        name_txt = Gtk.CellRendererText()
         nameCol.pack_start(name_txt, True)
         nameCol.add_attribute(name_txt, 'markup', ROW_MARKUP)
         nameCol.add_attribute(name_txt, 'foreground-gdk', ROW_COLOR)
         nameCol.set_sort_column_id(COL_NAME)
 
         def make_stats_column(title, datafunc, is_visible, colnum):
-            col = gtk.TreeViewColumn(title)
+            col = Gtk.TreeViewColumn(title)
             col.set_min_width(140)
-            txt = gtk.CellRendererText()
+            txt = Gtk.CellRendererText()
             img = CellRendererSparkline()
             img.set_property("xpad", 6)
             img.set_property("ypad", 12)
@@ -431,7 +462,7 @@ class vmmManager(vmmGObjectUI):
         model.set_sort_func(COL_HOST_CPU, self.vmlist_host_cpu_usage_sorter)
         model.set_sort_func(COL_DISK, self.vmlist_disk_io_sorter)
         model.set_sort_func(COL_NETWORK, self.vmlist_network_usage_sorter)
-        model.set_sort_column_id(COL_NAME, gtk.SORT_ASCENDING)
+        model.set_sort_column_id(COL_NAME, Gtk.SortType.ASCENDING)
 
     ##################
     # Helper methods #
@@ -746,10 +777,10 @@ class vmmManager(vmmGObjectUI):
         return markup
 
     def _build_conn_color(self, conn):
-        color = None
+        color = Gdk.Color(0, 0, 0)
         if conn.state == conn.STATE_DISCONNECTED:
             # Color code #5b5b5b
-            color = gtk.gdk.Color(23296, 23296, 23296)
+            color = Gdk.Color(23296, 23296, 23296)
         return color
 
     def _build_vm_markup(self, row):
@@ -911,7 +942,7 @@ class vmmManager(vmmGObjectUI):
         row[ROW_MARKUP] = self._build_vm_markup(row)
 
         if config_changed:
-            row[ROW_HINT] = util.xml_escape(vm.get_description())
+            row[ROW_HINT] = util.xml_escape(vm.get_description() or "")
 
         model.row_changed(row.path, row.iter)
 
@@ -933,7 +964,7 @@ class vmmManager(vmmGObjectUI):
         if png_data == None:
             return None
         try:
-            pb = gtk.gdk.PixbufLoader(image_type="png")
+            pb = GdkPixbuf.PixbufLoader(image_type="png")
             pb.set_size(w, h)
             pb.write(png_data)
             pb.close()
@@ -1019,7 +1050,7 @@ class vmmManager(vmmGObjectUI):
         self.widget("menu_edit_delete").set_sensitive(delete)
 
     def popup_vm_menu_key(self, widget_ignore, event):
-        if gtk.gdk.keyval_name(event.keyval) != "Menu":
+        if Gdk.keyval_name(event.keyval) != "Menu":
             return False
 
         vmlist = self.widget("vm-list")
@@ -1067,7 +1098,7 @@ class vmmManager(vmmGObjectUI):
             self.vmmenushutdown_items["reboot"].set_sensitive(stop)
             self.vmmenushutdown_items["forcepoweroff"].set_sensitive(destroy)
             self.vmmenushutdown_items["save"].set_sensitive(destroy)
-            self.vmmenu.popup(None, None, None, 0, event.time)
+            self.vmmenu.popup(None, None, None, None, 0, event.time)
         else:
             # Pop up connection menu
             conn = model.get_value(_iter, ROW_HANDLE)
@@ -1080,38 +1111,38 @@ class vmmManager(vmmGObjectUI):
             self.connmenu_items["connect"].set_sensitive(disconn)
             self.connmenu_items["delete"].set_sensitive(disconn)
 
-            self.connmenu.popup(None, None, None, 0, event.time)
+            self.connmenu.popup(None, None, None, None, 0, event.time)
 
 
     #################
     # Stats methods #
     #################
 
-    def vmlist_name_sorter(self, model, iter1, iter2):
+    def vmlist_name_sorter(self, model, iter1, iter2, ignore):
         return cmp(model.get_value(iter1, ROW_NAME),
                    model.get_value(iter2, ROW_NAME))
 
-    def vmlist_guest_cpu_usage_sorter(self, model, iter1, iter2):
+    def vmlist_guest_cpu_usage_sorter(self, model, iter1, iter2, ignore):
         obj1 = model.get_value(iter1, ROW_HANDLE)
         obj2 = model.get_value(iter2, ROW_HANDLE)
 
         return cmp(obj1.guest_cpu_time_percentage(),
                    obj2.guest_cpu_time_percentage())
 
-    def vmlist_host_cpu_usage_sorter(self, model, iter1, iter2):
+    def vmlist_host_cpu_usage_sorter(self, model, iter1, iter2, ignore):
         obj1 = model.get_value(iter1, ROW_HANDLE)
         obj2 = model.get_value(iter2, ROW_HANDLE)
 
         return cmp(obj1.host_cpu_time_percentage(),
                    obj2.host_cpu_time_percentage())
 
-    def vmlist_disk_io_sorter(self, model, iter1, iter2):
+    def vmlist_disk_io_sorter(self, model, iter1, iter2, ignore):
         obj1 = model.get_value(iter1, ROW_HANDLE)
         obj2 = model.get_value(iter2, ROW_HANDLE)
 
         return cmp(obj1.disk_io_rate(), obj2.disk_io_rate())
 
-    def vmlist_network_usage_sorter(self, model, iter1, iter2):
+    def vmlist_network_usage_sorter(self, model, iter1, iter2, ignore):
         obj1 = model.get_value(iter1, ROW_HANDLE)
         obj2 = model.get_value(iter2, ROW_HANDLE)
 
@@ -1173,6 +1204,15 @@ class vmmManager(vmmGObjectUI):
         }
         set_stats[stats_id](visible)
 
+    def toggle_stats_visible_guest_cpu(self, src):
+        self.toggle_stats_visible(src, COL_GUEST_CPU)
+    def toggle_stats_visible_host_cpu(self, src):
+        self.toggle_stats_visible(src, COL_HOST_CPU)
+    def toggle_stats_visible_disk(self, src):
+        self.toggle_stats_visible(src, COL_DISK)
+    def toggle_stats_visible_network(self, src):
+        self.toggle_stats_visible(src, COL_NETWORK)
+
     def guest_cpu_usage_img(self, column_ignore, cell, model, _iter, data):
         obj = model.get_value(_iter, ROW_HANDLE)
         if obj is None:
@@ -1210,27 +1250,3 @@ class vmmManager(vmmGObjectUI):
 
         data = obj.network_traffic_vector_limit(40, self.max_net_rate)
         cell.set_property('data_array', data)
-
-vmmGObjectUI.type_register(vmmManager)
-vmmManager.signal_new(vmmManager, "action-show-connect", [])
-vmmManager.signal_new(vmmManager, "action-show-vm", [str, str])
-vmmManager.signal_new(vmmManager, "action-show-about", [])
-vmmManager.signal_new(vmmManager, "action-show-host", [str])
-vmmManager.signal_new(vmmManager, "action-show-preferences", [])
-vmmManager.signal_new(vmmManager, "action-show-create", [str])
-vmmManager.signal_new(vmmManager, "action-suspend-domain", [str, str])
-vmmManager.signal_new(vmmManager, "action-resume-domain", [str, str])
-vmmManager.signal_new(vmmManager, "action-run-domain", [str, str])
-vmmManager.signal_new(vmmManager, "action-shutdown-domain", [str, str])
-vmmManager.signal_new(vmmManager, "action-reboot-domain", [str, str])
-vmmManager.signal_new(vmmManager, "action-destroy-domain", [str, str])
-vmmManager.signal_new(vmmManager, "action-save-domain", [str, str])
-vmmManager.signal_new(vmmManager, "action-connect", [str])
-vmmManager.signal_new(vmmManager, "action-show-help", [str])
-vmmManager.signal_new(vmmManager, "action-migrate-domain", [str, str])
-vmmManager.signal_new(vmmManager, "action-clone-domain", [str, str])
-vmmManager.signal_new(vmmManager, "action-exit-app", [])
-vmmManager.signal_new(vmmManager, "manager-closed", [])
-vmmManager.signal_new(vmmManager, "manager-opened", [])
-vmmManager.signal_new(vmmManager, "remove-conn", [str])
-vmmManager.signal_new(vmmManager, "add-default-conn", [])
diff --git a/src/virtManager/mediadev.py b/src/virtManager/mediadev.py
index a046d9e..311b6e1 100644
--- a/src/virtManager/mediadev.py
+++ b/src/virtManager/mediadev.py
@@ -18,6 +18,8 @@
 # MA 02110-1301 USA.
 #
 
+from gi.repository import GObject
+
 import logging
 import time
 
@@ -31,6 +33,11 @@ MEDIA_CDROM = "cdrom"
 MEDIA_TIMEOUT = 3
 
 class vmmMediaDevice(vmmGObject):
+    __gsignals__ = {
+        "media-added": (GObject.SignalFlags.RUN_FIRST, None, []),
+        "media-removed": (GObject.SignalFlags.RUN_FIRST, None, []),
+    }
+
     @staticmethod
     def mediadev_from_nodedev(dev):
         nodedev = dev.get_virtinst_obj()
@@ -163,8 +170,3 @@ class vmmMediaDevice(vmmGObject):
 
         self.set_media(has_media, None, None)
         self.idle_emit(has_media and "media-added" or "media-removed")
-
-
-vmmGObject.type_register(vmmMediaDevice)
-vmmMediaDevice.signal_new(vmmMediaDevice, "media-added", [])
-vmmMediaDevice.signal_new(vmmMediaDevice, "media-removed", [])
diff --git a/src/virtManager/migrate.py b/src/virtManager/migrate.py
index e955638..7523243 100644
--- a/src/virtManager/migrate.py
+++ b/src/virtManager/migrate.py
@@ -22,8 +22,9 @@ import traceback
 import logging
 import threading
 
-import gobject
-import gtk
+from gi.repository import GObject
+from gi.repository import Gtk
+from gi.repository import Gdk
 
 import virtinst
 import libvirt
@@ -54,7 +55,7 @@ class vmmMigrateDialog(vmmGObjectUI):
 
         self.destconn_rows = []
 
-        self.window.connect_signals({
+        self.get_window().connect_signals({
             "on_vmm_migrate_delete_event" : self.close,
 
             "on_migrate_cancel_clicked" : self.close,
@@ -68,13 +69,13 @@ class vmmMigrateDialog(vmmGObjectUI):
         })
         self.bind_escape_key_close()
 
-        blue = gtk.gdk.color_parse("#0072A8")
-        self.widget("migrate-header").modify_bg(gtk.STATE_NORMAL,
+        blue = Gdk.color_parse("#0072A8")
+        self.widget("migrate-header").modify_bg(Gtk.StateType.NORMAL,
                                                            blue)
-        image = gtk.image_new_from_icon_name("vm_clone_wizard",
-                                             gtk.ICON_SIZE_DIALOG)
+        image = Gtk.Image.new_from_icon_name("vm_clone_wizard",
+                                             Gtk.IconSize.DIALOG)
         image.show()
-        self.widget("migrate-vm-icon-box").pack_end(image, False)
+        self.widget("migrate-vm-icon-box").pack_end(image, False, False, False)
 
         self.init_state()
 
@@ -106,14 +107,14 @@ class vmmMigrateDialog(vmmGObjectUI):
 
     def init_state(self):
         # [hostname, conn, can_migrate, tooltip]
-        dest_model = gtk.ListStore(str, object, bool, str)
+        dest_model = Gtk.ListStore(str, object, bool, str)
         dest_combo = self.widget("migrate-dest")
         dest_combo.set_model(dest_model)
-        text = gtk.CellRendererText()
+        text = Gtk.CellRendererText()
         dest_combo.pack_start(text, True)
         dest_combo.add_attribute(text, 'text', 0)
         dest_combo.add_attribute(text, 'sensitive', 2)
-        dest_model.set_sort_column_id(0, gtk.SORT_ASCENDING)
+        dest_model.set_sort_column_id(0, Gtk.SortType.ASCENDING)
         # XXX no way to set tooltips here, kind of annoying
 
         # Hook up signals to get connection listing
@@ -154,7 +155,7 @@ class vmmMigrateDialog(vmmGObjectUI):
             downtime_tooltip = _("Libvirt version does not support setting "
                                  "downtime.")
         downtime_box.set_sensitive(support_downtime)
-        util.tooltip_wrapper(downtime_box, downtime_tooltip)
+        downtime_box.set_tooltip_text(downtime_tooltip)
 
         if self.conn.is_xen():
             # Default xen port is 8002
@@ -171,7 +172,7 @@ class vmmMigrateDialog(vmmGObjectUI):
                                "migration.")
 
         secure_box.set_sensitive(support_secure)
-        util.tooltip_wrapper(secure_box, secure_tooltip)
+        secure_box.set_tooltip_text(secure_tooltip)
 
         self.rebuild_dest_rows()
 
@@ -187,7 +188,7 @@ class vmmMigrateDialog(vmmGObjectUI):
             tooltip = _("A valid destination connection must be selected.")
 
         self.widget("migrate-finish").set_sensitive(active != -1)
-        util.tooltip_wrapper(self.widget("migrate-finish"), tooltip)
+        self.widget("migrate-finish").set_tooltip_text(tooltip)
 
     def toggle_set_rate(self, src):
         enable = src.get_active()
@@ -467,7 +468,7 @@ class vmmMigrateDialog(vmmGObjectUI):
             return
 
         self.topwin.set_sensitive(False)
-        self.topwin.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))
+        self.topwin.get_window().set_cursor(Gdk.Cursor.new(Gdk.CursorType.WATCH))
 
         if self.vm.getjobinfo_supported:
             _cancel_back = self.cancel_migration
@@ -489,7 +490,7 @@ class vmmMigrateDialog(vmmGObjectUI):
         error, details = progWin.run()
 
         self.topwin.set_sensitive(True)
-        self.topwin.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.TOP_LEFT_ARROW))
+        self.topwin.get_window().set_cursor(Gdk.Cursor.new(Gdk.CursorType.TOP_LEFT_ARROW))
 
         if error:
             error = _("Unable to migrate guest: %s") % error
@@ -554,6 +555,4 @@ class vmmMigrateDialog(vmmGObjectUI):
 
         vm.migrate(dstconn, migrate_uri, rate, live, secure, meter=meter)
         if timer:
-            self.idle_add(gobject.source_remove, timer)
-
-vmmGObjectUI.type_register(vmmMigrateDialog)
+            self.idle_add(GObject.source_remove, timer)
diff --git a/src/virtManager/netdev.py b/src/virtManager/netdev.py
index cf9fd5f..2d56bff 100644
--- a/src/virtManager/netdev.py
+++ b/src/virtManager/netdev.py
@@ -48,5 +48,3 @@ class vmmNetDevice(vmmGObject):
 
     def get_hal_path(self):
         return self.hal_path
-
-vmmGObject.type_register(vmmNetDevice)
diff --git a/src/virtManager/network.py b/src/virtManager/network.py
index 644cb21..30347f7 100644
--- a/src/virtManager/network.py
+++ b/src/virtManager/network.py
@@ -18,6 +18,9 @@
 # MA 02110-1301 USA.
 #
 
+from gi.repository import GObject
+
+from IPy import IP
 from virtManager import util
 from IPy import IP
 from virtManager.libvirtobject import vmmLibvirtObject
@@ -133,5 +136,3 @@ class vmmNetwork(vmmLibvirtObject):
         if forward and forward != "nat":
             return True
         return bool(util.xpath(xml, "/network/ip/dhcp/bootp/@file"))
-
-vmmLibvirtObject.type_register(vmmNetwork)
diff --git a/src/virtManager/nodedev.py b/src/virtManager/nodedev.py
index cc102f8..4d5eb63 100644
--- a/src/virtManager/nodedev.py
+++ b/src/virtManager/nodedev.py
@@ -47,5 +47,3 @@ class vmmNodeDevice(vmmLibvirtObject):
             self._virtinst_obj = virtinst.NodeDeviceParser.parse(
                 self._backend.XMLDesc(0))
         return self._virtinst_obj
-
-vmmLibvirtObject.type_register(vmmNodeDevice)
diff --git a/src/virtManager/preferences.py b/src/virtManager/preferences.py
index 0eaf20b..e88f617 100644
--- a/src/virtManager/preferences.py
+++ b/src/virtManager/preferences.py
@@ -20,7 +20,9 @@
 
 import logging
 
-import gtk
+from gi.repository import GObject
+from gi.repository import Gtk
+from gi.repository import Gdk
 
 from virtManager.baseclass import vmmGObjectUI
 
@@ -28,6 +30,10 @@ PREFS_PAGE_STATS    = 0
 PREFS_PAGE_VM_PREFS = 1
 
 class vmmPreferences(vmmGObjectUI):
+    __gsignals__ = {
+        "action-show-help": (GObject.SignalFlags.RUN_FIRST, None, [str]),
+    }
+
     def __init__(self):
         vmmGObjectUI.__init__(self, "vmm-preferences.ui", "vmm-preferences")
 
@@ -69,7 +75,7 @@ class vmmPreferences(vmmGObjectUI):
         self.refresh_confirm_interface()
         self.refresh_confirm_unapplied()
 
-        self.window.connect_signals({
+        self.get_window().connect_signals({
             "on_prefs_system_tray_toggled" : self.change_view_system_tray,
             "on_prefs_stats_update_interval_changed": self.change_update_interval,
             "on_prefs_stats_history_length_changed": self.change_history_length,
@@ -202,9 +208,9 @@ class vmmPreferences(vmmGObjectUI):
 
                 if key is not None:
                     if keystr is None:
-                        keystr = gtk.gdk.keyval_name(key)
+                        keystr = Gdk.keyval_name(key)
                     else:
-                        keystr = keystr + "+" + gtk.gdk.keyval_name(key)
+                        keystr = keystr + "+" + Gdk.keyval_name(key)
 
 
         self.widget("prefs-keys-grab-sequence").set_text(keystr)
@@ -239,7 +245,7 @@ class vmmPreferences(vmmGObjectUI):
         for ignore, keyval in events:
             if keystr:
                 keystr += "+"
-            keystr += gtk.gdk.keyval_name(keyval)
+            keystr += Gdk.keyval_name(keyval)
         return keystr
 
     def grabkeys_dlg_press(self, src_ignore, event, label, events):
@@ -255,21 +261,21 @@ class vmmPreferences(vmmGObjectUI):
         label.set_text(self.grabkeys_get_string(events))
 
     def change_grab_keys(self, src_ignore):
-        dialog = gtk.Dialog(_("Configure grab key combination"),
+        dialog = Gtk.Dialog(_("Configure grab key combination"),
                             self.topwin,
-                            gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,
-                            (gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT,
-                             gtk.STOCK_OK, gtk.RESPONSE_ACCEPT))
+                            Gtk.DialogFlags.MODAL | Gtk.DialogFlags.DESTROY_WITH_PARENT,
+                            (Gtk.STOCK_CANCEL, Gtk.ResponseType.REJECT,
+                             Gtk.STOCK_OK, Gtk.ResponseType.ACCEPT))
         dialog.set_default_size(325, 160)
         dialog.set_border_width(6)
 
-        infolabel = gtk.Label(
+        infolabel = Gtk.Label(label=
                     _("You can now define grab keys by pressing them.\n"
                       "To confirm your selection please click OK button\n"
                       "while you have desired keys pressed."))
-        keylabel = gtk.Label(_("Please press desired grab key combination"))
+        keylabel = Gtk.Label(label=_("Please press desired grab key combination"))
 
-        vbox = gtk.VBox()
+        vbox = Gtk.VBox()
         vbox.set_spacing(12)
         vbox.pack_start(infolabel, False, False)
         vbox.pack_start(keylabel, False, False)
@@ -283,7 +289,7 @@ class vmmPreferences(vmmGObjectUI):
         dialog.show_all()
         result = dialog.run()
 
-        if result == gtk.RESPONSE_ACCEPT:
+        if result == Gtk.ResponseType.ACCEPT:
             self.config.set_keys_combination(map(lambda e: e[1], events))
 
         self.refresh_grabkeys_combination()
@@ -343,5 +349,3 @@ class vmmPreferences(vmmGObjectUI):
         # the Preferences page
         self.emit("action-show-help", "virt-manager-preferences-window")
 
-vmmPreferences.type_register(vmmPreferences)
-vmmPreferences.signal_new(vmmPreferences, "action-show-help", [str])
diff --git a/src/virtManager/secret.py b/src/virtManager/secret.py
index 21d85c3..a23d987 100644
--- a/src/virtManager/secret.py
+++ b/src/virtManager/secret.py
@@ -18,7 +18,6 @@
 # MA 02110-1301 USA.
 #
 
-
 class vmmSecret(object):
     def __init__(self, name, secret=None, attributes=None):
 
diff --git a/src/virtManager/serialcon.py b/src/virtManager/serialcon.py
index b9b7ce7..d9c6981 100644
--- a/src/virtManager/serialcon.py
+++ b/src/virtManager/serialcon.py
@@ -25,14 +25,10 @@ import pty
 import fcntl
 import logging
 
-import gtk
-import gobject
-
-try:
-    import vte
-except ImportError:
-    logging.debug("Could not import vte, no serial console support")
-    vte = None
+from gi.repository import GObject
+from gi.repository import Gtk
+from gi.repository import Gdk
+from gi.repository import Vte
 
 import libvirt
 
@@ -81,8 +77,8 @@ class LocalConsoleConnection(ConsoleConnection):
 
         self.fd = pty.slave_open(ipty)
         fcntl.fcntl(self.fd, fcntl.F_SETFL, os.O_NONBLOCK)
-        self.source = gobject.io_add_watch(self.fd,
-                            gobject.IO_IN | gobject.IO_ERR | gobject.IO_HUP,
+        self.source = GObject.io_add_watch(self.fd,
+                            GObject.IO_IN | GObject.IO_ERR | GObject.IO_HUP,
                             self.display_data, terminal)
 
         # Save term settings & set to raw mode
@@ -104,7 +100,7 @@ class LocalConsoleConnection(ConsoleConnection):
         os.close(self.fd)
         self.fd = None
 
-        gobject.source_remove(self.source)
+        GObject.source_remove(self.source)
         self.source = None
         self.origtermios = None
 
@@ -121,7 +117,7 @@ class LocalConsoleConnection(ConsoleConnection):
     def display_data(self, src, cond, terminal):
         ignore = src
 
-        if cond != gobject.IO_IN:
+        if cond != GObject.IO_IN:
             self.close()
             return False
 
@@ -309,17 +305,14 @@ class vmmSerialConsole(vmmGObject):
         self.vm.connect("status-changed", self.vm_status_changed)
 
     def init_terminal(self):
-        if not vte:
-            return
-
-        self.terminal = vte.Terminal()
+        self.terminal = Vte.Terminal()
         self.terminal.set_cursor_blinks(True)
         self.terminal.set_emulation("xterm")
         self.terminal.set_scrollback_lines(1000)
         self.terminal.set_audible_bell(False)
         self.terminal.set_visible_bell(True)
         # XXX python VTE binding has bug failing to register constants
-        #self.terminal.set_backspace_binding(vte.ERASE_ASCII_BACKSPACE)
+        #self.terminal.set_backspace_binding(Vte.ERASE_ASCII_BACKSPACE)
         self.terminal.set_backspace_binding(1)
 
         self.terminal.connect("button-press-event", self.show_serial_rcpopup)
@@ -327,26 +320,26 @@ class vmmSerialConsole(vmmGObject):
         self.terminal.show()
 
     def init_popup(self):
-        self.serial_popup = gtk.Menu()
+        self.serial_popup = Gtk.Menu()
 
-        self.serial_copy = gtk.ImageMenuItem(gtk.STOCK_COPY)
+        self.serial_copy = Gtk.ImageMenuItem(Gtk.STOCK_COPY)
         self.serial_popup.add(self.serial_copy)
 
-        self.serial_paste = gtk.ImageMenuItem(gtk.STOCK_PASTE)
+        self.serial_paste = Gtk.ImageMenuItem(Gtk.STOCK_PASTE)
         self.serial_popup.add(self.serial_paste)
 
     def init_ui(self):
-        self.box = gtk.Notebook()
+        self.box = Gtk.Notebook()
         self.box.set_show_tabs(False)
         self.box.set_show_border(False)
 
-        align = gtk.Alignment()
+        align = Gtk.Alignment.new()
         align.set_padding(2, 2, 2, 2)
-        evbox = gtk.EventBox()
-        evbox.modify_bg(gtk.STATE_NORMAL, gtk.gdk.Color(0, 0, 0))
-        terminalbox = gtk.HBox()
-        scrollbar = gtk.VScrollbar()
-        self.error_label = gtk.Label()
+        evbox = Gtk.EventBox()
+        evbox.modify_bg(Gtk.StateType.NORMAL, Gdk.Color(0, 0, 0))
+        terminalbox = Gtk.HBox()
+        scrollbar = Gtk.VScrollbar()
+        self.error_label = Gtk.Label()
         self.error_label.set_width_chars(40)
         self.error_label.set_line_wrap(True)
 
@@ -355,7 +348,7 @@ class vmmSerialConsole(vmmGObject):
             align.add(self.terminal)
 
         evbox.add(align)
-        terminalbox.pack_start(evbox)
+        terminalbox.pack_start(evbox, True, True, 0)
         terminalbox.pack_start(scrollbar, expand=False, fill=False)
 
         self.box.append_page(terminalbox)
@@ -376,10 +369,6 @@ class vmmSerialConsole(vmmGObject):
 
     def open_console(self):
         try:
-            if not vte:
-                raise RuntimeError(
-                        _("vte2 is required for text console support"))
-
             self.console.open(self.lookup_dev(), self.terminal)
             self.box.set_current_page(0)
             return True
diff --git a/src/virtManager/storagebrowse.py b/src/virtManager/storagebrowse.py
index bdb787d..f54c0d1 100644
--- a/src/virtManager/storagebrowse.py
+++ b/src/virtManager/storagebrowse.py
@@ -20,7 +20,8 @@
 
 import logging
 
-import gtk
+from gi.repository import GObject
+from gi.repository import Gtk
 
 import virtinst
 
@@ -30,6 +31,10 @@ from virtManager.createvol import vmmCreateVolume
 from virtManager.baseclass import vmmGObjectUI
 
 class vmmStorageBrowser(vmmGObjectUI):
+    __gsignals__ = {
+        "storage-browse-finish": (GObject.SignalFlags.RUN_FIRST, None, [str]),
+    }
+
     def __init__(self, conn):
         vmmGObjectUI.__init__(self,
                             "vmm-storage-browse.ui",
@@ -51,7 +56,7 @@ class vmmStorageBrowser(vmmGObjectUI):
         self.rhel6_defaults = True
         self.local_args = {}
 
-        self.window.connect_signals({
+        self.get_window().connect_signals({
             "on_vmm_storage_browse_delete_event" : self.close,
             "on_browse_cancel_clicked" : self.close,
             "on_browse_local_clicked" : self.browse_local,
@@ -61,11 +66,11 @@ class vmmStorageBrowser(vmmGObjectUI):
         })
         self.bind_escape_key_close()
 
-        finish_img = gtk.image_new_from_stock(gtk.STOCK_NEW,
-                                              gtk.ICON_SIZE_BUTTON)
+        finish_img = Gtk.Image.new_from_stock(Gtk.STOCK_NEW,
+                                              Gtk.IconSize.BUTTON)
         self.widget("new-volume").set_image(finish_img)
-        finish_img = gtk.image_new_from_stock(gtk.STOCK_OPEN,
-                                              gtk.ICON_SIZE_BUTTON)
+        finish_img = Gtk.Image.new_from_stock(Gtk.STOCK_OPEN,
+                                              Gtk.IconSize.BUTTON)
         self.widget("choose-volume").set_image(finish_img)
 
         self.set_initial_state()
@@ -120,43 +125,43 @@ class vmmStorageBrowser(vmmGObjectUI):
 
         # (Key, Name, Cap, Format, Used By, sensitive)
         vol_list = self.widget("vol-list")
-        volListModel = gtk.ListStore(str, str, str, str, str, bool)
+        volListModel = Gtk.ListStore(str, str, str, str, str, bool)
         vol_list.set_model(volListModel)
 
         vol_list.get_selection().connect("changed", self.vol_selected)
-        volCol = gtk.TreeViewColumn(_("Name"))
-        vol_txt1 = gtk.CellRendererText()
+        volCol = Gtk.TreeViewColumn(_("Name"))
+        vol_txt1 = Gtk.CellRendererText()
         volCol.pack_start(vol_txt1, True)
         volCol.add_attribute(vol_txt1, 'text', 1)
         volCol.add_attribute(vol_txt1, 'sensitive', 5)
         volCol.set_sort_column_id(1)
         vol_list.append_column(volCol)
 
-        volSizeCol = gtk.TreeViewColumn(_("Size"))
-        vol_txt2 = gtk.CellRendererText()
+        volSizeCol = Gtk.TreeViewColumn(_("Size"))
+        vol_txt2 = Gtk.CellRendererText()
         volSizeCol.pack_start(vol_txt2, False)
         volSizeCol.add_attribute(vol_txt2, 'text', 2)
         volSizeCol.add_attribute(vol_txt2, 'sensitive', 5)
         volSizeCol.set_sort_column_id(2)
         vol_list.append_column(volSizeCol)
 
-        volPathCol = gtk.TreeViewColumn(_("Format"))
-        vol_txt4 = gtk.CellRendererText()
+        volPathCol = Gtk.TreeViewColumn(_("Format"))
+        vol_txt4 = Gtk.CellRendererText()
         volPathCol.pack_start(vol_txt4, False)
         volPathCol.add_attribute(vol_txt4, 'text', 3)
         volPathCol.add_attribute(vol_txt4, 'sensitive', 5)
         volPathCol.set_sort_column_id(3)
         vol_list.append_column(volPathCol)
 
-        volUseCol = gtk.TreeViewColumn(_("Used By"))
-        vol_txt5 = gtk.CellRendererText()
+        volUseCol = Gtk.TreeViewColumn(_("Used By"))
+        vol_txt5 = Gtk.CellRendererText()
         volUseCol.pack_start(vol_txt5, False)
         volUseCol.add_attribute(vol_txt5, 'text', 4)
         volUseCol.add_attribute(vol_txt5, 'sensitive', 5)
         volUseCol.set_sort_column_id(4)
         vol_list.append_column(volUseCol)
 
-        volListModel.set_sort_column_id(1, gtk.SORT_ASCENDING)
+        volListModel.set_sort_column_id(1, Gtk.SortType.ASCENDING)
 
     def reset_state(self, conn=None):
         if conn and conn != self.conn:
@@ -189,8 +194,7 @@ class vmmStorageBrowser(vmmGObjectUI):
         self.widget("browse-local").set_sensitive(not is_remote)
         if is_remote:
             tooltip = _("Cannot use local storage on remote connection.")
-        util.tooltip_wrapper(self.widget("browse-local"),
-                             tooltip)
+        self.widget("browse-local").set_tooltip_text(tooltip)
 
         # Set data based on browse type
         self.local_args["dialog_type"] = None
@@ -357,5 +361,3 @@ class vmmStorageBrowser(vmmGObjectUI):
                           details=details,
                           async=False)
 
-vmmGObjectUI.type_register(vmmStorageBrowser)
-vmmStorageBrowser.signal_new(vmmStorageBrowser, "storage-browse-finish", [str])
diff --git a/src/virtManager/storagepool.py b/src/virtManager/storagepool.py
index f8a69b0..44b4173 100644
--- a/src/virtManager/storagepool.py
+++ b/src/virtManager/storagepool.py
@@ -20,11 +20,17 @@
 
 import virtinst
 
+from gi.repository import GObject
+
 from virtManager import util
 from virtManager.libvirtobject import vmmLibvirtObject
 from virtManager.storagevol import vmmStorageVolume
 
 class vmmStoragePool(vmmLibvirtObject):
+    __gsignals__ = {
+        "refreshed": (GObject.SignalFlags.RUN_FIRST, None, [])
+    }
+
     def __init__(self, conn, pool, uuid, active):
         vmmLibvirtObject.__init__(self, conn)
 
@@ -138,6 +144,3 @@ class vmmStoragePool(vmmLibvirtObject):
                                     self.pool.storageVolLookupByName(volname),
                                     volname)
         self._volumes = new_vol_list
-
-vmmLibvirtObject.type_register(vmmStoragePool)
-vmmStoragePool.signal_new(vmmStoragePool, "refreshed", [])
diff --git a/src/virtManager/storagevol.py b/src/virtManager/storagevol.py
index d6e7be7..6af643c 100644
--- a/src/virtManager/storagevol.py
+++ b/src/virtManager/storagevol.py
@@ -63,5 +63,3 @@ class vmmStorageVolume(vmmLibvirtObject):
 
     def get_type(self):
         return util.xpath(self.get_xml(), "/volume/format/@type")
-
-vmmLibvirtObject.type_register(vmmStorageVolume)
diff --git a/src/virtManager/systray.py b/src/virtManager/systray.py
index b958bf0..4d67166 100644
--- a/src/virtManager/systray.py
+++ b/src/virtManager/systray.py
@@ -20,7 +20,8 @@
 
 import logging
 
-import gtk
+from gi.repository import GObject
+from gi.repository import Gtk
 
 from virtManager.baseclass import vmmGObject
 from virtManager.error import vmmErrorDialog
@@ -31,17 +32,31 @@ except:
     appindicator = None
 
 def build_image_menu_item(label):
-    hasfunc = hasattr(gtk.ImageMenuItem, "set_use_underline")
+    hasfunc = hasattr(Gtk.ImageMenuItem, "set_use_underline")
     if hasfunc:
         label.replace("_", "__")
 
-    menu_item = gtk.ImageMenuItem(label)
+    menu_item = Gtk.ImageMenuItem(label)
     if hasfunc:
         menu_item.set_use_underline(False)
 
     return menu_item
 
 class vmmSystray(vmmGObject):
+    __gsignals__ = {
+        "action-toggle-manager": (GObject.SignalFlags.RUN_FIRST, None, []),
+        "action-view-manager": (GObject.SignalFlags.RUN_FIRST, None, []),
+        "action-suspend-domain": (GObject.SignalFlags.RUN_FIRST, None, [str, str]),
+        "action-resume-domain": (GObject.SignalFlags.RUN_FIRST, None, [str, str]),
+        "action-run-domain": (GObject.SignalFlags.RUN_FIRST, None, [str, str]),
+        "action-shutdown-domain": (GObject.SignalFlags.RUN_FIRST, None, [str, str]),
+        "action-reboot-domain": (GObject.SignalFlags.RUN_FIRST, None, [str, str]),
+        "action-destroy-domain": (GObject.SignalFlags.RUN_FIRST, None, [str, str]),
+        "action-show-host": (GObject.SignalFlags.RUN_FIRST, None, [str]),
+        "action-show-vm": (GObject.SignalFlags.RUN_FIRST, None, [str, str]),
+        "action-exit-app": (GObject.SignalFlags.RUN_FIRST, None, []),
+    }
+
     def __init__(self, engine):
         vmmGObject.__init__(self)
 
@@ -98,16 +113,16 @@ class vmmSystray(vmmGObject):
             Have one of those 'minimize to tray' notifications?
 
         """
-        self.systray_menu = gtk.Menu()
+        self.systray_menu = Gtk.Menu()
 
-        self.systray_menu.add(gtk.SeparatorMenuItem())
+        self.systray_menu.add(Gtk.SeparatorMenuItem())
 
         if self.systray_indicator:
-            hide_item = gtk.MenuItem("_Show Virtual Machine Manager")
+            hide_item = Gtk.MenuItem("_Show Virtual Machine Manager")
             hide_item.connect("activate", self.systray_activate)
             self.systray_menu.add(hide_item)
 
-        exit_item = gtk.ImageMenuItem(gtk.STOCK_QUIT)
+        exit_item = Gtk.ImageMenuItem.new_from_stock(Gtk.STOCK_QUIT, None)
         exit_item.connect("activate", self.exit_app)
         self.systray_menu.add(exit_item)
         self.systray_menu.show_all()
@@ -125,12 +140,12 @@ class vmmSystray(vmmGObject):
             self.systray_icon.set_menu(self.systray_menu)
 
         else:
-            self.systray_icon = gtk.StatusIcon()
+            self.systray_icon = Gtk.StatusIcon()
             self.systray_icon.set_visible(True)
             self.systray_icon.set_property("icon-name", "virt-manager")
             self.systray_icon.connect("activate", self.systray_activate)
             self.systray_icon.connect("popup-menu", self.systray_popup)
-            self.systray_icon.set_tooltip(_("Virtual Machine Manager"))
+            self.systray_icon.set_tooltip_text(_("Virtual Machine Manager"))
 
     def show_systray(self, ignore1=None, ignore2=None, ignore3=None,
                      ignore4=None):
@@ -150,62 +165,62 @@ class vmmSystray(vmmGObject):
                 self.systray_icon.set_visible(do_show)
 
     def build_vm_menu(self, vm):
-        icon_size = gtk.ICON_SIZE_MENU
+        icon_size = Gtk.IconSize.MENU
         stop_icon = self.config.get_shutdown_icon_name()
 
-        pause_item = gtk.ImageMenuItem(_("_Pause"))
-        pause_img  = gtk.image_new_from_stock(gtk.STOCK_MEDIA_PAUSE, icon_size)
+        pause_item = Gtk.ImageMenuItem.new_with_mnemonic(_("_Pause"))
+        pause_img  = Gtk.Image.new_from_stock(Gtk.STOCK_MEDIA_PAUSE, icon_size)
         pause_item.set_image(pause_img)
         pause_item.connect("activate", self.run_vm_action,
                            "action-suspend-domain", vm.get_uuid())
 
-        resume_item = gtk.ImageMenuItem(_("_Resume"))
-        resume_img  = gtk.image_new_from_stock(gtk.STOCK_MEDIA_PAUSE,
+        resume_item = Gtk.ImageMenuItem.new_with_mnemonic(_("_Resume"))
+        resume_img  = Gtk.Image.new_from_stock(Gtk.STOCK_MEDIA_PAUSE,
                                                icon_size)
         resume_item.set_image(resume_img)
         resume_item.connect("activate", self.run_vm_action,
                             "action-resume-domain", vm.get_uuid())
 
-        run_item = gtk.ImageMenuItem(_("_Run"))
-        run_img  = gtk.image_new_from_stock(gtk.STOCK_MEDIA_PLAY, icon_size)
+        run_item = Gtk.ImageMenuItem.new_with_mnemonic(_("_Run"))
+        run_img  = Gtk.Image.new_from_stock(Gtk.STOCK_MEDIA_PLAY, icon_size)
         run_item.set_image(run_img)
         run_item.connect("activate", self.run_vm_action,
                          "action-run-domain", vm.get_uuid())
 
         # Shutdown menu
-        reboot_item = gtk.ImageMenuItem(_("_Reboot"))
-        reboot_img = gtk.image_new_from_icon_name(stop_icon, icon_size)
+        reboot_item = Gtk.ImageMenuItem.new_with_mnemonic(_("_Reboot"))
+        reboot_img = Gtk.Image.new_from_icon_name(stop_icon, icon_size)
         reboot_item.set_image(reboot_img)
         reboot_item.connect("activate", self.run_vm_action,
                             "action-reboot-domain", vm.get_uuid())
         reboot_item.show()
 
-        shutdown_item = gtk.ImageMenuItem(_("_Shut Down"))
-        shutdown_img = gtk.image_new_from_icon_name(stop_icon, icon_size)
+        shutdown_item = Gtk.ImageMenuItem.new_with_mnemonic(_("_Shut Down"))
+        shutdown_img = Gtk.Image.new_from_icon_name(stop_icon, icon_size)
         shutdown_item.set_image(shutdown_img)
         shutdown_item.connect("activate", self.run_vm_action,
                               "action-shutdown-domain", vm.get_uuid())
         shutdown_item.show()
 
-        destroy_item = gtk.ImageMenuItem(_("_Force Off"))
-        destroy_img = gtk.image_new_from_icon_name(stop_icon, icon_size)
+        destroy_item = Gtk.ImageMenuItem.new_with_mnemonic(_("_Force Off"))
+        destroy_img = Gtk.Image.new_from_icon_name(stop_icon, icon_size)
         destroy_item.set_image(destroy_img)
         destroy_item.show()
         destroy_item.connect("activate", self.run_vm_action,
                              "action-destroy-domain", vm.get_uuid())
 
-        shutdown_menu = gtk.Menu()
+        shutdown_menu = Gtk.Menu()
         shutdown_menu.add(reboot_item)
         shutdown_menu.add(shutdown_item)
         shutdown_menu.add(destroy_item)
-        shutdown_menu_item = gtk.ImageMenuItem(_("_Shut Down"))
-        shutdown_menu_img = gtk.image_new_from_icon_name(stop_icon, icon_size)
+        shutdown_menu_item = Gtk.ImageMenuItem.new_with_mnemonic(_("_Shut Down"))
+        shutdown_menu_img = Gtk.Image.new_from_icon_name(stop_icon, icon_size)
         shutdown_menu_item.set_image(shutdown_menu_img)
         shutdown_menu_item.set_submenu(shutdown_menu)
 
-        sep = gtk.SeparatorMenuItem()
+        sep = Gtk.SeparatorMenuItem()
 
-        open_item = gtk.ImageMenuItem("gtk-open")
+        open_item = Gtk.ImageMenuItem.new_from_stock("gtk-open", None)
         open_item.show()
         open_item.connect("activate", self.run_vm_action,
                           "action-show-vm", vm.get_uuid())
@@ -221,7 +236,7 @@ class vmmSystray(vmmGObject):
         vm_action_dict["sep"] = sep
         vm_action_dict["open"] = open_item
 
-        menu = gtk.Menu()
+        menu = Gtk.Menu()
 
         for key in ["run", "pause", "resume", "shutdown_menu", "sep", "open"]:
             item = vm_action_dict[key]
@@ -241,9 +256,9 @@ class vmmSystray(vmmGObject):
         return None
 
     def _set_vm_status_icon(self, vm, menu_item):
-        image = gtk.Image()
+        image = Gtk.Image()
         image.set_from_icon_name(vm.run_status_icon_name(),
-                                 gtk.ICON_SIZE_MENU)
+                                 Gtk.IconSize.MENU)
         image.set_sensitive(vm.is_active())
         menu_item.set_image(image)
 
@@ -256,8 +271,8 @@ class vmmSystray(vmmGObject):
         if button != 3:
             return
 
-        self.systray_menu.popup(None, None, gtk.status_icon_position_menu,
-                                0, event_time, self.systray_icon)
+        self.systray_menu.popup(None, None, Gtk.StatusIcon.position_menu,
+                                self.systray_icon, 0, event_time)
 
     def repopulate_menu_list(self):
         # Build sorted connection list
@@ -283,9 +298,9 @@ class vmmSystray(vmmGObject):
         if conn.get_uri() in self.conn_menuitems:
             return
 
-        menu_item = gtk.MenuItem(conn.get_pretty_desc_inactive(), False)
+        menu_item = Gtk.MenuItem.new_with_label(conn.get_pretty_desc_inactive())
         menu_item.show()
-        vm_submenu = gtk.Menu()
+        vm_submenu = Gtk.Menu()
         vm_submenu.show()
         menu_item.set_submenu(vm_submenu)
 
@@ -332,7 +347,7 @@ class vmmSystray(vmmGObject):
         vm_names.sort()
 
         if len(vm_names) == 0:
-            menu_item = gtk.MenuItem(_("No virtual machines"))
+            menu_item = Gtk.MenuItem(_("No virtual machines"))
             menu_item.set_sensitive(False)
             vm_submenu.insert(menu_item, 0)
             return
@@ -384,7 +399,7 @@ class vmmSystray(vmmGObject):
             del(vm_mappings[uuid])
 
             if len(vm_menu.get_children()) == 0:
-                placeholder = gtk.MenuItem(_("No virtual machines"))
+                placeholder = Gtk.MenuItem(_("No virtual machines"))
                 placeholder.show()
                 placeholder.set_sensitive(False)
                 vm_menu.add(placeholder)
@@ -425,16 +440,3 @@ class vmmSystray(vmmGObject):
 
     def exit_app(self, ignore):
         self.emit("action-exit-app")
-
-vmmGObject.type_register(vmmSystray)
-vmmSystray.signal_new(vmmSystray, "action-toggle-manager", [])
-vmmSystray.signal_new(vmmSystray, "action-view-manager", [])
-vmmSystray.signal_new(vmmSystray, "action-suspend-domain", [str, str])
-vmmSystray.signal_new(vmmSystray, "action-resume-domain", [str, str])
-vmmSystray.signal_new(vmmSystray, "action-run-domain", [str, str])
-vmmSystray.signal_new(vmmSystray, "action-shutdown-domain", [str, str])
-vmmSystray.signal_new(vmmSystray, "action-reboot-domain", [str, str])
-vmmSystray.signal_new(vmmSystray, "action-destroy-domain", [str, str])
-vmmSystray.signal_new(vmmSystray, "action-show-host", [str])
-vmmSystray.signal_new(vmmSystray, "action-show-vm", [str, str])
-vmmSystray.signal_new(vmmSystray, "action-exit-app", [])
diff --git a/src/virtManager/uihelpers.py b/src/virtManager/uihelpers.py
index 6b80577..44ce85f 100644
--- a/src/virtManager/uihelpers.py
+++ b/src/virtManager/uihelpers.py
@@ -22,7 +22,7 @@ import logging
 import os
 import statvfs
 
-import gtk
+from gi.repository import Gtk
 
 import virtinst
 from virtinst import VirtualNetworkInterface
@@ -60,7 +60,7 @@ def spin_get_helper(widget):
     try:
         ret = int(txt)
     except:
-        ret = adj.value
+        ret = adj.get_value()
     return ret
 
 ############################################################
@@ -73,7 +73,7 @@ def set_sparse_tooltip(widget):
                    "Skipping allocation can also cause space issues on "
                    "the host machine, if the maximum image size exceeds "
                    "available storage space.")
-    util.tooltip_wrapper(widget, sparse_str)
+    widget.set_tooltip_text(sparse_str)
 
 def host_disk_space(conn):
     pool = util.get_default_pool(conn)
@@ -133,12 +133,12 @@ def check_default_pool_active(topwin, conn):
 # Hardware model list building (for details, addhw) #
 #####################################################
 def build_video_combo(vm, video_dev, no_default=None):
-    video_dev_model = gtk.ListStore(str)
+    video_dev_model = Gtk.ListStore(str)
     video_dev.set_model(video_dev_model)
-    text = gtk.CellRendererText()
+    text = Gtk.CellRendererText()
     video_dev.pack_start(text, True)
     video_dev.add_attribute(text, 'text', 0)
-    video_dev_model.set_sort_column_id(0, gtk.SORT_ASCENDING)
+    video_dev_model.set_sort_column_id(0, Gtk.SortType.ASCENDING)
 
     populate_video_combo(vm, video_dev, no_default)
 
@@ -165,12 +165,12 @@ def populate_video_combo(vm, video_dev, no_default=None):
         video_dev.set_active(0)
 
 def build_sound_combo(vm, combo, no_default=False):
-    dev_model = gtk.ListStore(str)
+    dev_model = Gtk.ListStore(str)
     combo.set_model(dev_model)
-    text = gtk.CellRendererText()
+    text = Gtk.CellRendererText()
     combo.pack_start(text, True)
     combo.add_attribute(text, 'text', 0)
-    dev_model.set_sort_column_id(0, gtk.SORT_ASCENDING)
+    dev_model.set_sort_column_id(0, Gtk.SortType.ASCENDING)
 
     disable_rhel = not vm.rhel6_defaults()
     rhel6_soundmodels = ["ich6", "ac97", "es1370"]
@@ -188,12 +188,12 @@ def build_sound_combo(vm, combo, no_default=False):
 
 def build_watchdogmodel_combo(vm, combo, no_default=False):
     ignore = vm
-    dev_model = gtk.ListStore(str)
+    dev_model = Gtk.ListStore(str)
     combo.set_model(dev_model)
-    text = gtk.CellRendererText()
+    text = Gtk.CellRendererText()
     combo.pack_start(text, True)
     combo.add_attribute(text, 'text', 0)
-    dev_model.set_sort_column_id(0, gtk.SORT_ASCENDING)
+    dev_model.set_sort_column_id(0, Gtk.SortType.ASCENDING)
 
     for m in virtinst.VirtualWatchdog.MODELS:
         if m == virtinst.VirtualAudio.MODEL_DEFAULT and no_default:
@@ -204,12 +204,12 @@ def build_watchdogmodel_combo(vm, combo, no_default=False):
 
 def build_watchdogaction_combo(vm, combo, no_default=False):
     ignore = vm
-    dev_model = gtk.ListStore(str, str)
+    dev_model = Gtk.ListStore(str, str)
     combo.set_model(dev_model)
-    text = gtk.CellRendererText()
+    text = Gtk.CellRendererText()
     combo.pack_start(text, True)
     combo.add_attribute(text, 'text', 1)
-    dev_model.set_sort_column_id(0, gtk.SORT_ASCENDING)
+    dev_model.set_sort_column_id(0, Gtk.SortType.ASCENDING)
 
     for m in virtinst.VirtualWatchdog.ACTIONS:
         if m == virtinst.VirtualWatchdog.ACTION_DEFAULT and no_default:
@@ -219,9 +219,9 @@ def build_watchdogaction_combo(vm, combo, no_default=False):
         combo.set_active(0)
 
 def build_source_mode_combo(vm, combo):
-    source_mode = gtk.ListStore(str, str)
+    source_mode = Gtk.ListStore(str, str)
     combo.set_model(source_mode)
-    text = gtk.CellRendererText()
+    text = Gtk.CellRendererText()
     combo.pack_start(text, True)
     combo.add_attribute(text, 'text', 1)
 
@@ -241,12 +241,12 @@ def populate_source_mode_combo(vm, combo):
     model.append(["passthrough", "Passthrough"])
 
 def build_smartcard_mode_combo(vm, combo):
-    dev_model = gtk.ListStore(str, str)
+    dev_model = Gtk.ListStore(str, str)
     combo.set_model(dev_model)
-    text = gtk.CellRendererText()
+    text = Gtk.CellRendererText()
     combo.pack_start(text, True)
     combo.add_attribute(text, 'text', 1)
-    dev_model.set_sort_column_id(0, gtk.SORT_ASCENDING)
+    dev_model.set_sort_column_id(0, Gtk.SortType.ASCENDING)
 
     populate_smartcard_mode_combo(vm, combo)
 
@@ -271,9 +271,9 @@ def populate_smartcard_mode_combo(vm, combo):
 #    model.append(["host-certificates", "Host Certificates"])
 
 def build_redir_type_combo(vm, combo):
-    source_mode = gtk.ListStore(str, str, bool)
+    source_mode = Gtk.ListStore(str, str, bool)
     combo.set_model(source_mode)
-    text = gtk.CellRendererText()
+    text = Gtk.CellRendererText()
     combo.pack_start(text, True)
     combo.add_attribute(text, 'text', 1)
 
@@ -290,12 +290,12 @@ def populate_redir_type_combo(vm, combo):
     model.append(["tcp", "TCP", True])
 
 def build_netmodel_combo(vm, combo):
-    dev_model = gtk.ListStore(str, str)
+    dev_model = Gtk.ListStore(str, str)
     combo.set_model(dev_model)
-    text = gtk.CellRendererText()
+    text = Gtk.CellRendererText()
     combo.pack_start(text, True)
     combo.add_attribute(text, 'text', 1)
-    dev_model.set_sort_column_id(0, gtk.SORT_ASCENDING)
+    dev_model.set_sort_column_id(0, Gtk.SortType.ASCENDING)
 
     populate_netmodel_combo(vm, combo)
     combo.set_active(0)
@@ -322,12 +322,12 @@ def populate_netmodel_combo(vm, combo):
 
 def build_cache_combo(vm, combo, no_default=False):
     ignore = vm
-    dev_model = gtk.ListStore(str, str)
+    dev_model = Gtk.ListStore(str, str)
     combo.set_model(dev_model)
-    text = gtk.CellRendererText()
+    text = Gtk.CellRendererText()
     combo.pack_start(text, True)
     combo.add_attribute(text, 'text', 1)
-    dev_model.set_sort_column_id(0, gtk.SORT_ASCENDING)
+    dev_model.set_sort_column_id(0, Gtk.SortType.ASCENDING)
 
     combo.set_active(-1)
     for m in virtinst.VirtualDisk.cache_types:
@@ -339,12 +339,12 @@ def build_cache_combo(vm, combo, no_default=False):
 
 def build_io_combo(vm, combo, no_default=False):
     ignore = vm
-    dev_model = gtk.ListStore(str, str)
+    dev_model = Gtk.ListStore(str, str)
     combo.set_model(dev_model)
-    text = gtk.CellRendererText()
+    text = Gtk.CellRendererText()
     combo.pack_start(text, True)
     combo.add_attribute(text, 'text', 1)
-    dev_model.set_sort_column_id(0, gtk.SORT_ASCENDING)
+    dev_model.set_sort_column_id(0, Gtk.SortType.ASCENDING)
 
     combo.set_active(-1)
     for m in virtinst.VirtualDisk.io_modes:
@@ -356,12 +356,12 @@ def build_io_combo(vm, combo, no_default=False):
 
 def build_disk_bus_combo(vm, combo, no_default=False):
     ignore = vm
-    dev_model = gtk.ListStore(str, str)
+    dev_model = Gtk.ListStore(str, str)
     combo.set_model(dev_model)
-    text = gtk.CellRendererText()
+    text = Gtk.CellRendererText()
     combo.pack_start(text, True)
     combo.add_attribute(text, 'text', 1)
-    dev_model.set_sort_column_id(0, gtk.SORT_ASCENDING)
+    dev_model.set_sort_column_id(0, Gtk.SortType.ASCENDING)
 
     if not no_default:
         dev_model.append([None, "default"])
@@ -370,9 +370,9 @@ def build_disk_bus_combo(vm, combo, no_default=False):
 def build_vnc_keymap_combo(vm, combo, no_default=False):
     ignore = vm
 
-    model = gtk.ListStore(str, str)
+    model = Gtk.ListStore(str, str)
     combo.set_model(model)
-    text = gtk.CellRendererText()
+    text = Gtk.CellRendererText()
     combo.pack_start(text, True)
     combo.add_attribute(text, 'text', 1)
 
@@ -393,9 +393,9 @@ def build_vnc_keymap_combo(vm, combo, no_default=False):
 #####################################
 
 def build_storage_format_combo(vm, combo):
-    dev_model = gtk.ListStore(str)
+    dev_model = Gtk.ListStore(str)
     combo.set_model(dev_model)
-    combo.set_text_column(0)
+    combo.set_entry_text_column(0)
 
     formats = ["raw", "qcow2", "qed"]
     if vm.rhel6_defaults():
@@ -437,13 +437,13 @@ def init_network_list(net_list, bridge_box,
                       vport_expander=None):
     # [ network type, source name, label, sensitive?, net is active,
     #   manual bridge, net instance]
-    net_model = gtk.ListStore(str, str, str, bool, bool, bool, object)
+    net_model = Gtk.ListStore(str, str, str, bool, bool, bool, object)
     net_list.set_model(net_model)
 
     net_list.connect("changed", net_list_changed, bridge_box, source_mode_box,
                      source_mode_label, vport_expander)
 
-    text = gtk.CellRendererText()
+    text = Gtk.CellRendererText()
     net_list.pack_start(text, True)
     net_list.add_attribute(text, 'text', 2)
     net_list.add_attribute(text, 'sensitive', 3)
@@ -717,11 +717,11 @@ def generate_macaddr(conn):
 def init_mediadev_combo(widget):
     # [Device path, pretty label, has_media?, device key, media key,
     #  vmmMediaDevice, is valid device]
-    model = gtk.ListStore(str, str, bool, str, str, bool)
+    model = Gtk.ListStore(str, str, bool, str, str, bool)
     widget.set_model(model)
     model.clear()
 
-    text = gtk.CellRendererText()
+    text = Gtk.CellRendererText()
     widget.pack_start(text, True)
     widget.add_attribute(text, 'text', OPTICAL_LABEL)
     widget.add_attribute(text, 'sensitive', OPTICAL_IS_VALID)
@@ -842,37 +842,37 @@ def build_shutdown_button_menu(widget, shutdown_cb, reboot_cb,
                                destroy_cb, save_cb):
     icon_name = util.running_config.get_shutdown_icon_name()
     widget.set_icon_name(icon_name)
-    menu = gtk.Menu()
+    menu = Gtk.Menu()
     widget.set_menu(menu)
 
-    rebootimg = gtk.image_new_from_icon_name(icon_name, gtk.ICON_SIZE_MENU)
-    shutdownimg = gtk.image_new_from_icon_name(icon_name, gtk.ICON_SIZE_MENU)
-    destroyimg = gtk.image_new_from_icon_name(icon_name, gtk.ICON_SIZE_MENU)
-    saveimg = gtk.image_new_from_icon_name(gtk.STOCK_SAVE, gtk.ICON_SIZE_MENU)
+    rebootimg = Gtk.Image.new_from_icon_name(icon_name, Gtk.IconSize.MENU)
+    shutdownimg = Gtk.Image.new_from_icon_name(icon_name, Gtk.IconSize.MENU)
+    destroyimg = Gtk.Image.new_from_icon_name(icon_name, Gtk.IconSize.MENU)
+    saveimg = Gtk.Image.new_from_icon_name(Gtk.STOCK_SAVE, Gtk.IconSize.MENU)
 
-    reboot = gtk.ImageMenuItem(_("_Reboot"))
+    reboot = Gtk.ImageMenuItem.new_with_mnemonic(_("_Reboot"))
     reboot.set_image(rebootimg)
     reboot.show()
     reboot.connect("activate", reboot_cb)
     menu.add(reboot)
 
-    shutdown = gtk.ImageMenuItem(_("_Shut Down"))
+    shutdown = Gtk.ImageMenuItem.new_with_mnemonic(_("_Shut Down"))
     shutdown.set_image(shutdownimg)
     shutdown.show()
     shutdown.connect("activate", shutdown_cb)
     menu.add(shutdown)
 
-    destroy = gtk.ImageMenuItem(_("_Force Off"))
+    destroy = Gtk.ImageMenuItem.new_with_mnemonic(_("_Force Off"))
     destroy.set_image(destroyimg)
     destroy.show()
     destroy.connect("activate", destroy_cb)
     menu.add(destroy)
 
-    sep = gtk.SeparatorMenuItem()
+    sep = Gtk.SeparatorMenuItem()
     sep.show()
     menu.add(sep)
 
-    save = gtk.ImageMenuItem(_("Sa_ve"))
+    save = Gtk.ImageMenuItem.new_with_mnemonic(_("Sa_ve"))
     save.set_image(saveimg)
     save.show()
     save.connect("activate", save_cb)
@@ -904,7 +904,7 @@ def check_path_search_for_qemu(parent, conn, path):
                       "for the path '%s'.") % path,
                     _("Do you want to correct this now?"),
                     _("Don't ask about these directories again."),
-                    buttons=gtk.BUTTONS_YES_NO)
+                    buttons=Gtk.ButtonsType.YES_NO)
 
     if chkres:
         util.running_config.add_perms_fix_ignore(broken_paths)
@@ -937,9 +937,9 @@ def check_path_search_for_qemu(parent, conn, path):
 ######################################
 
 def build_startmode_combo(start_list):
-    start_model = gtk.ListStore(str)
+    start_model = Gtk.ListStore(str)
     start_list.set_model(start_model)
-    text = gtk.CellRendererText()
+    text = Gtk.CellRendererText()
     start_list.pack_start(text, True)
     start_list.add_attribute(text, 'text', 0)
     start_model.append(["none"])
@@ -952,21 +952,21 @@ def build_startmode_combo(start_list):
 #########################
 
 def build_keycombo_menu(cb):
-    menu = gtk.Menu()
+    menu = Gtk.Menu()
 
     def make_item(name, combo):
-        item = gtk.MenuItem(name, use_underline=True)
+        item = Gtk.MenuItem.new_with_mnemonic(name)
         item.connect("activate", cb, combo)
 
         menu.add(item)
 
     make_item("Ctrl+Alt+_Backspace", ["Control_L", "Alt_L", "BackSpace"])
     make_item("Ctrl+Alt+_Delete", ["Control_L", "Alt_L", "Delete"])
-    menu.add(gtk.SeparatorMenuItem())
+    menu.add(Gtk.SeparatorMenuItem())
 
     for i in range(1, 13):
         make_item("Ctrl+Alt+F_%d" % i, ["Control_L", "Alt_L", "F%d" % i])
-    menu.add(gtk.SeparatorMenuItem())
+    menu.add(Gtk.SeparatorMenuItem())
 
     make_item("_Printscreen", ["Print"])
 
diff --git a/src/virtManager/util.py b/src/virtManager/util.py
index 6b8a953..7914f52 100644
--- a/src/virtManager/util.py
+++ b/src/virtManager/util.py
@@ -139,19 +139,6 @@ def get_default_path(conn, name, collidelist=None):
     return path
 
 
-def tooltip_wrapper(obj, txt, func="set_tooltip_text"):
-    # Catch & ignore errors - set_tooltip_* is in gtk >= 2.12
-    # and we can easily work with lower versions
-    import gtk
-
-    try:
-        funcptr = getattr(obj, func)
-        funcptr(txt)
-    except:
-        ver = gtk.gtk_version
-        if ver[0] >= 2 and ver[1] >= 12:
-            logging.exception("Couldn't set tooltip.")
-
 def xml_parse_wrapper(xml, parse_func, *args, **kwargs):
     """
     Parse the passed xml string into an xpath context, which is passed
@@ -193,27 +180,27 @@ def browse_local(parent, dialog_name, conn, start_folder=None,
         value, and store the user chosen path.
 
     """
-    import gtk
+    from gi.repository import Gtk
 
     # Initial setup
     overwrite_confirm = False
 
     if dialog_type is None:
-        dialog_type = gtk.FILE_CHOOSER_ACTION_OPEN
-    if dialog_type == gtk.FILE_CHOOSER_ACTION_SAVE:
+        dialog_type = Gtk.FileChooserAction.OPEN
+    if dialog_type == Gtk.FileChooserAction.SAVE:
         if choose_button is None:
-            choose_button = gtk.STOCK_SAVE
+            choose_button = Gtk.STOCK_SAVE
             overwrite_confirm = True
 
     if choose_button is None:
-        choose_button = gtk.STOCK_OPEN
+        choose_button = Gtk.STOCK_OPEN
 
-    fcdialog = gtk.FileChooserDialog(dialog_name, parent,
+    fcdialog = Gtk.FileChooserDialog(dialog_name, parent,
                                      dialog_type,
-                                     (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
-                                      choose_button, gtk.RESPONSE_ACCEPT),
+                                     (Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL,
+                                      choose_button, Gtk.ResponseType.ACCEPT),
                                       None)
-    fcdialog.set_default_response(gtk.RESPONSE_ACCEPT)
+    fcdialog.set_default_response(Gtk.ResponseType.ACCEPT)
 
     # If confirm is set, warn about a file overwrite
     if confirm_func:
@@ -229,7 +216,7 @@ def browse_local(parent, dialog_name, conn, start_folder=None,
             pattern = _type[0]
             name = _type[1]
 
-        f = gtk.FileFilter()
+        f = Gtk.FileFilter()
         f.add_pattern("*." + pattern)
         if name:
             f.set_name(name)
@@ -247,7 +234,7 @@ def browse_local(parent, dialog_name, conn, start_folder=None,
     # Run the dialog and parse the response
     response = fcdialog.run()
     fcdialog.hide()
-    if (response == gtk.RESPONSE_ACCEPT):
+    if (response == Gtk.ResponseType.ACCEPT):
         filename = fcdialog.get_filename()
         fcdialog.destroy()
         ret = filename
@@ -337,20 +324,6 @@ def uuidstr(rawuuid):
             uuid.append('-')
     return "".join(uuid)
 
-def safe_set_prop(self, prop, value):
-    """
-    Make sure a gtk property is supported, and set to value
-
-    Return True if property was sucessfully set, False otherwise
-    """
-
-    try:
-        self.get_property(prop)
-        self.set_property(prop, value)
-        return True
-    except TypeError:
-        return False
-
 def iface_in_use_by(conn, name):
     use_str = ""
     for i in conn.list_interface_names():
@@ -389,7 +362,7 @@ def chkbox_helper(src, getcb, setcb, text1, text2=None,
     @alwaysrecord: Don't require user to select 'yes' to record chkbox value
     @default: What value to return if getcb tells us not to prompt
     """
-    import gtk
+    from gi.repository import Gtk
 
     do_prompt = getcb()
     if not do_prompt:
@@ -397,7 +370,7 @@ def chkbox_helper(src, getcb, setcb, text1, text2=None,
 
     res = src.err.warn_chkbox(text1=text1, text2=text2,
                               chktext=chktext,
-                              buttons=gtk.BUTTONS_YES_NO)
+                              buttons=Gtk.ButtonsType.YES_NO)
     response, skip_prompt = res
     if alwaysrecord or response:
         setcb(not skip_prompt)
@@ -420,44 +393,3 @@ def set_list_selection(widget, rownum):
     selection.unselect_all()
     widget.set_cursor(path)
     selection.select_path(path)
-
-def sanitize_gtkbuilder(filename):
-    """
-    GTKBuilder XML made by glade on f16 doesn't work on RHEL6. If on an old
-    GTK version, strip out the bits that cause problems
-    """
-    import gtk
-    ver = gtk.gtk_version
-    xml = file(filename).read()
-
-    if (ver[0] > 2 or
-        (ver[0] == 2 and ver[1] > 18)):
-        # Skip altering for gtk > 2.18
-        return xml
-
-    import libxml2
-
-    doc = None
-    ctx = None
-    ret = xml
-    try:
-        doc = libxml2.parseDoc(xml)
-        ctx = doc.xpathNewContext()
-
-        nodes = ctx.xpathEval("//child[@internal-child='selection']")
-        if nodes:
-            logging.debug("%s: Altering gtkbuilder XML for old gtk compat",
-                          os.path.basename(filename))
-
-        for node in nodes:
-            node.unlinkNode()
-            node.freeNode()
-
-        ret = doc.serialize()
-    finally:
-        if doc:
-            doc.freeDoc()
-        if ctx:
-            ctx.xpathFreeContext()
-
-    return ret
diff --git a/src/virtManagerTui/importblacklist/gconf.py b/src/virtManagerTui/importblacklist/gconf.py
deleted file mode 100644
index 477db7e..0000000
--- a/src/virtManagerTui/importblacklist/gconf.py
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-# Copyright (C) 2011 Red Hat, Inc.
-# Copyright (C) 2011 Cole Robinson <crobinso at redhat.com>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-# MA 02110-1301 USA.
-#
-
-raise RuntimeError("TUI cannot import gconf")
diff --git a/src/virtManagerTui/importblacklist/gobject.py b/src/virtManagerTui/importblacklist/gobject.py
deleted file mode 100644
index eebae65..0000000
--- a/src/virtManagerTui/importblacklist/gobject.py
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-# Copyright (C) 2011 Red Hat, Inc.
-# Copyright (C) 2011 Cole Robinson <crobinso at redhat.com>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-# MA 02110-1301 USA.
-#
-
-raise RuntimeError("TUI cannot import gobject")
diff --git a/src/virtManagerTui/importblacklist/gtk.py b/src/virtManagerTui/importblacklist/gtk.py
deleted file mode 100644
index aa1275c..0000000
--- a/src/virtManagerTui/importblacklist/gtk.py
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-# Copyright (C) 2011 Red Hat, Inc.
-# Copyright (C) 2011 Cole Robinson <crobinso at redhat.com>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-# MA 02110-1301 USA.
-#
-
-raise RuntimeError("TUI cannot import GTK")
diff --git a/tests/pylint-virt-manager.sh b/tests/pylint-virt-manager.sh
index b4b0267..fcb28a5 100755
--- a/tests/pylint-virt-manager.sh
+++ b/tests/pylint-virt-manager.sh
@@ -24,6 +24,8 @@ UNABLE_IMPORT="Unable to import '(appindicator)"
 # os._exit is needed for forked processes.
 OS_EXIT="protected member _exit of a client class"
 
+GI_IMPORT="in module 'gi.repository'"
+
 # False positives
 MAIN_NONETYPE="main:.*Raising NoneType while.*"
 STYLE_ATTACH="Class 'style' has no 'attach' member"
@@ -106,6 +108,7 @@ egrep -ve "$NO_PYL_CONFIG" \
       -ve "$UNABLE_IMPORT" \
       -ve "$STYLE_ATTACH" \
       -ve "$VBOX_PACK" \
+      -ve "$GI_IMPORT" \
       -ve "$INFER_ERRORS" | \
 $AWK '\
 # Strip out any "*** Module name" lines if we dont list any errors for them
diff --git a/virt-manager.spec.in b/virt-manager.spec.in
index c175941..4c6c0af 100644
--- a/virt-manager.spec.in
+++ b/virt-manager.spec.in
@@ -69,8 +69,10 @@ Source0: http://virt-manager.org/download/sources/%{name}/%{name}-%{version}.tar
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildArch: noarch
 
-# These two are just the oldest version tested
-Requires: pygtk2 >= 1.99.12-6
+Requires: pygobject3
+Requires: gtk3
+Requires: cairo-gobject
+Requires: libvirt-glib
 Requires: gnome-python2-gconf >= 1.99.11-7
 # This version not strictly required: virt-manager should work with older,
 # however varying amounts of functionality will not be enabled.
@@ -98,9 +100,9 @@ Requires: vte >= 0.12.2
 # For online help
 Requires: scrollkeeper
 # For console widget
-Requires: gtk-vnc-python >= 0.3.8
+Requires: gtk-vnc2
 %if %{with_spice}
-Requires: spice-gtk-python
+Requires: spice-gtk3
 %endif
 %if %{with_guestfs}
 Requires: python-libguestfs
-- 
1.7.10.1




More information about the virt-tools-list mailing list