Add loading single builder objects on Windows

This was still missing from the Windows translation fix
This commit is contained in:
Philipp Hörist 2018-06-23 20:34:53 +02:00
parent bd4aa0f40f
commit 9b07cf8d41
1 changed files with 4 additions and 0 deletions

View File

@ -142,6 +142,10 @@ def _translate(gui_file, widget):
xml_text = ET.tostring(tree.getroot(),
encoding='unicode',
method='xml')
if widget is not None:
builder = Gtk.Builder()
builder.add_objects_from_string(xml_text, [widget])
return builder
return Gtk.Builder.new_from_string(xml_text, -1)
else:
if widget is not None: