Add loading single builder objects on Windows
This was still missing from the Windows translation fix
This commit is contained in:
parent
bd4aa0f40f
commit
9b07cf8d41
|
@ -142,6 +142,10 @@ def _translate(gui_file, widget):
|
||||||
xml_text = ET.tostring(tree.getroot(),
|
xml_text = ET.tostring(tree.getroot(),
|
||||||
encoding='unicode',
|
encoding='unicode',
|
||||||
method='xml')
|
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)
|
return Gtk.Builder.new_from_string(xml_text, -1)
|
||||||
else:
|
else:
|
||||||
if widget is not None:
|
if widget is not None:
|
||||||
|
|
Loading…
Reference in New Issue