baseclass: Fix UI file loading on py3

We were passing in a unicode string object, but add_from_string
depends on knowing binary length. This caused signals to not
be registered which broke reopening the details window

Just switch to add_from_file to sidestep the issue
This commit is contained in:
Cole Robinson 2017-12-20 16:04:36 -05:00
parent c174b5509f
commit b5b2433ad5

View File

@ -220,7 +220,7 @@ class vmmGObjectUI(vmmGObject):
self.builder = Gtk.Builder()
self.builder.set_translation_domain("virt-manager")
self.builder.add_from_string(open(uifile).read())
self.builder.add_from_file(uifile)
if not topwin:
self.topwin = self.widget(windowname)